| | |
| | | ['小规模纳税人征收率', 'small_tax_rate', 'Decimal(18,2)'], |
| | | ['是否享受优惠政策', 'free_tax_mark'], |
| | | ['优惠政策类型', 'vat_special_management'], |
| | | ['tax_item', 'tax_item'], |
| | | ['tax_method', 'tax_method'], |
| | | ['征税项目', 'tax_item'], |
| | | ['计税方法', 'tax_method'], |
| | | ] |
| | | |
| | | details.forEach((cell, index) => { |
| | |
| | | ['税额', 'tax_amount', 'Decimal(18,2)'], |
| | | ['是否享受优惠政策', 'free_tax_mark'], |
| | | ['优惠政策类型', 'vat_special_management'], |
| | | ['tax_item', 'tax_item'], |
| | | ['tax_method', 'tax_method'], |
| | | ['征税项目', 'tax_item'], |
| | | ['计税方法', 'tax_method'], |
| | | ] |
| | | |
| | | cols.forEach((cell, index) => { |
| | |
| | | </Popover> |
| | | <div className="inv-action"> |
| | | {card.wrap.backBtn === 'show' ? <Button className="mk-back"><LeftOutlined />返回</Button> : null} |
| | | <Button className="mk-addinv">新增发票</Button> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <EditOutlined style={{color: '#1890ff'}} onClick={() => this.setState({btn: card.billSaveBtn})} title="编辑"/> |
| | |
| | | .mk-back::after { |
| | | display: none; |
| | | } |
| | | .mk-addinv, .mk-addinv:active, .mk-addinv:focus { |
| | | color: #52c41a; |
| | | border-color: #52c41a; |
| | | } |
| | | .mk-bill:hover, .mk-bill:active, .mk-bill:focus { |
| | | color: var(--mk-sys-color); |
| | | border-color: var(--mk-sys-color); |
| | |
| | | /* 工作流默认sql */ |
| | | insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@,@works_flow_param@,@status@,@statusname@,@work_group@,@works_flow_detail_id@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_detail_id@,@userid@,@start_type@,@userid@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid,typecharone) |
| | | select @ID@,@works_flow_code@,@userid@,@works_flow_detail_id@,@userid@,@UserName,@FullName,@time_id@,'begin' |
| | | ` |
| | | } else { |
| | | _sql += ` |
| | | /* 工作流默认sql */ |
| | | update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname${verify.flowRemark ? ',remark=@' + verify.flowRemark : ''} |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid${verify.flowRemark ? ',remark' : ''}) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@${verify.flowRemark ? ',@' + verify.flowRemark : ''} |
| | | |
| | | update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 |
| | |
| | | import SubTable from './subTable' |
| | | import './index.scss' |
| | | |
| | | const { confirm } = Modal |
| | | |
| | | class InvoiceModule extends Component { |
| | | static propTpyes = { |
| | | config: PropTypes.object |
| | |
| | | |
| | | _config.buyer = this.formatSetting(_config.buyer, 'buyer') |
| | | _config.detail = this.formatSetting(_config.detail, 'detail') |
| | | _config.detail.uuid = _config.uuid |
| | | |
| | | let book = null |
| | | let pas = {} |
| | |
| | | cell.Hide = 'true' |
| | | } else if (['from_to_email', 'from_to_mob'].includes(cell.field)) { |
| | | cell.Width = 80 |
| | | } else if (['from_to_name'].includes(cell.field)) { |
| | | cell.Width = 140 |
| | | } |
| | | return cell |
| | | }) |
| | |
| | | cell.field = 'tax_rate' |
| | | cell.label = '税率' |
| | | } |
| | | if (['Description', 'id', 'small_tax_rate', 'free_tax_mark', 'vat_special_management'].includes(cell.field)) { |
| | | if (['Description', 'id', 'small_tax_rate', 'free_tax_mark', 'vat_special_management', 'tax_item', 'tax_method'].includes(cell.field)) { |
| | | cell.Hide = 'true' |
| | | } else if (['spec'].includes(cell.field)) { |
| | | cell.Width = 150 |
| | |
| | | } |
| | | |
| | | clearData = () => { |
| | | const { from_to_tax_no, oriDetails, details } = this.state |
| | | |
| | | if (from_to_tax_no || oriDetails.length || details.length) { |
| | | this.setState({ |
| | | from_to_name: '', |
| | | from_to_tax_no: '', |
| | | from_to_addr: '', |
| | | from_to_tel: '', |
| | | from_to_bank_name: '', |
| | | from_to_account_no: '', |
| | | from_to_mob: '', |
| | | from_to_email: '', |
| | | from_to_code: '', |
| | | business_type: '', |
| | | details: [], |
| | | oriDetails: [], |
| | | timestamp: new Date().getTime() + '', |
| | | }) |
| | | } |
| | | this.setState({ |
| | | ID: Utils.getguid(), |
| | | from_to_name: '', |
| | | from_to_tax_no: '', |
| | | from_to_addr: '', |
| | | from_to_tel: '', |
| | | from_to_bank_name: '', |
| | | from_to_account_no: '', |
| | | from_to_mob: '', |
| | | from_to_email: '', |
| | | from_to_code: '', |
| | | business_type: '', |
| | | details: [], |
| | | oriDetails: [], |
| | | timestamp: new Date().getTime() + '', |
| | | }) |
| | | } |
| | | |
| | | changeType = (val) => { |
| | |
| | | saveType: '' |
| | | }) |
| | | if (res.status) { |
| | | const that = this |
| | | |
| | | confirm({ |
| | | title: '保存成功。', |
| | | okText: '继续填开', |
| | | cancelText: '关闭', |
| | | onOk() { |
| | | if (config.billSaveBtn.reTabId) { |
| | | MKEmitter.emit('reloadMenuView', config.billSaveBtn.reTabId, 'table') |
| | | } |
| | | if (config.billSaveBtn.syncComId) { |
| | | MKEmitter.emit('reloadData', config.billSaveBtn.syncComId) |
| | | } |
| | | that.clearData() |
| | | }, |
| | | onCancel() { |
| | | if (config.billSaveBtn.reTabId) { |
| | | MKEmitter.emit('reloadMenuView', config.billSaveBtn.reTabId, 'table') |
| | | } |
| | | if (config.billSaveBtn.syncComId) { |
| | | MKEmitter.emit('reloadData', config.billSaveBtn.syncComId) |
| | | } |
| | | MKEmitter.emit('closeTabView', config.$pageId) |
| | | } |
| | | if (config.billSaveBtn.reTabId) { |
| | | MKEmitter.emit('reloadMenuView', config.billSaveBtn.reTabId, 'table') |
| | | } |
| | | if (config.billSaveBtn.syncComId) { |
| | | MKEmitter.emit('reloadData', config.billSaveBtn.syncComId) |
| | | } |
| | | notification.success({ |
| | | top: 92, |
| | | message: '保存成功。', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | notification.warning({ |
| | |
| | | }) |
| | | |
| | | keys = keys.join(',') |
| | | vals = vals.join(',') |
| | | |
| | | lines.push({ |
| | | table: md5(tb + keys), |
| | | insert: `Insert into ${tbName} (${keys},[mk_level],[mk_id],[mk_bid])`, |
| | | select: `Select ${vals.join(',')},'${level}','${id}','${bid}'` |
| | | insert: `Insert into ${tbName} (${keys ? keys + ',' : ''}[mk_level],[mk_id],[mk_bid])`, |
| | | select: `Select ${keys ? vals + ',' : ''}'${level}','${id}','${bid}'` |
| | | }) |
| | | |
| | | subObjs.forEach(item => { |
| | |
| | | } |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | this.setState({ |
| | | saveType: '' |
| | | }) |
| | | if (res.status) { |
| | | const that = this |
| | | if (config.billOutBtn.reTabId) { |
| | | MKEmitter.emit('reloadMenuView', config.billOutBtn.reTabId, 'table') |
| | | } |
| | | if (config.billOutBtn.syncComId) { |
| | | MKEmitter.emit('reloadData', config.billOutBtn.syncComId) |
| | | } |
| | | this.clearData() |
| | | |
| | | confirm({ |
| | | title: '保存成功。', |
| | | okText: '继续填开', |
| | | cancelText: '关闭', |
| | | onOk() { |
| | | if (config.billOutBtn.reTabId) { |
| | | MKEmitter.emit('reloadMenuView', config.billOutBtn.reTabId, 'table') |
| | | } |
| | | if (config.billOutBtn.syncComId) { |
| | | MKEmitter.emit('reloadData', config.billOutBtn.syncComId) |
| | | } |
| | | that.clearData() |
| | | }, |
| | | onCancel() { |
| | | if (config.billOutBtn.reTabId) { |
| | | MKEmitter.emit('reloadMenuView', config.billOutBtn.reTabId, 'table') |
| | | } |
| | | if (config.billOutBtn.syncComId) { |
| | | MKEmitter.emit('reloadData', config.billOutBtn.syncComId) |
| | | } |
| | | MKEmitter.emit('closeTabView', config.$pageId) |
| | | } |
| | | notification.success({ |
| | | top: 92, |
| | | message: '开票成功。', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 5 |
| | | }) |
| | | this.setState({ |
| | | saveType: '' |
| | | }) |
| | | } |
| | | }) |
| | |
| | | }) |
| | | } |
| | | |
| | | addInvice = () => { |
| | | const { saveType } = this.state |
| | | |
| | | if (saveType) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: saveType === 'bill' ? '单据保存中,请稍后。' : '开票中,请稍后。', |
| | | duration: 3 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.clearData() |
| | | |
| | | notification.success({ |
| | | top: 92, |
| | | message: '单据已更新。', |
| | | duration: 3 |
| | | }) |
| | | } |
| | | |
| | | render() { |
| | | const { config, book, loading, invTypes, reqfields, saveType, date, timestamp, invoice_type, from_to_name, from_to_tax_no, from_to_addr, from_to_tel, from_to_bank_name, from_to_account_no, from_to_mob, from_to_email, orgname, tax_no, addr, tel, bank_name, account_no, remark, reviewer, drawer, payee, details, visible, tax_type } = this.state |
| | | |
| | |
| | | } |
| | | <div className="inv-action"> |
| | | {config.wrap.backBtn === 'show' ? <Button className="mk-back" onClick={this.goback}><LeftOutlined />返回</Button> : null} |
| | | <Button className="mk-addinv" onClick={this.addInvice}>新增发票</Button> |
| | | <Button className="mk-bill" loading={saveType === 'bill'} onClick={this.saveBill}>保存单据</Button> |
| | | <Button className="mk-submit" loading={saveType === 'out'} onClick={this.outBill}>提交开票</Button> |
| | | </div> |
| | |
| | | <div className="inv-buyer"> |
| | | <div className="inv-label">购买方</div> |
| | | <div className="inv-content"> |
| | | <Form.Item required={reqfields.includes('from_to_name')} label={<>名<span></span>称</>} extra={<EllipsisOutlined onClick={() => this.setState({visible: true})}/>}> |
| | | <Form.Item className="mk-name" required={reqfields.includes('from_to_name')} label={<>名<span></span>称</>} extra={<EllipsisOutlined onClick={() => this.setState({visible: true})}/>}> |
| | | <Input placeholder="请输入购买方名称" allowClear value={from_to_name} autoComplete="off" onChange={(e) => this.setState({from_to_name: e.target.value})}/> |
| | | </Form.Item> |
| | | <Form.Item required={reqfields.includes('from_to_tax_no')} label="纳税人识别号"> |
| | |
| | | <Modal |
| | | title="客户信息" |
| | | visible={visible} |
| | | width="70vw" |
| | | width="75vw" |
| | | maskClosable={false} |
| | | onCancel={() => { this.setState({ visible: false }) }} |
| | | footer={null} |
| | |
| | | .mk-back:hover, .mk-back:active, .mk-back:focus { |
| | | color: var(--mk-sys-color); |
| | | } |
| | | .mk-addinv, .mk-addinv:active, .mk-addinv:focus { |
| | | color: #52c41a; |
| | | border-color: #52c41a; |
| | | } |
| | | .mk-bill:hover, .mk-bill:active, .mk-bill:focus { |
| | | color: var(--mk-sys-color); |
| | | border-color: var(--mk-sys-color); |
| | |
| | | flex: 1; |
| | | padding: 6px 0; |
| | | |
| | | .mk-name .ant-input-affix-wrapper .ant-input-suffix { |
| | | right: 35px; |
| | | } |
| | | |
| | | .ant-form-item { |
| | | display: flex; |
| | | padding: 0 5px 0 15px; |
| | |
| | | } |
| | | } |
| | | .inv-table { |
| | | .ant-table .ant-table-tbody tr:hover td { |
| | | background-color: var(--mk-sys-color1); |
| | | .ant-table .ant-table-tbody { |
| | | td { |
| | | vertical-align: top; |
| | | } |
| | | tr:hover td { |
| | | background-color: var(--mk-sys-color1); |
| | | } |
| | | } |
| | | } |
| | | .tb-search-wrap { |
| | |
| | | }) |
| | | } |
| | | |
| | | onChange = (value, key) => { |
| | | onChange = (value, key, nextkey) => { |
| | | let line = {...this.props.line} |
| | | |
| | | if (['bill_count', 'unitprice', 'amount_line'].includes(key)) { |
| | |
| | | }) |
| | | |
| | | this.props.changeLine(line, key) |
| | | |
| | | if (nextkey) { |
| | | let node = document.getElementById(nextkey) |
| | | if (node) { |
| | | if (node.select) { |
| | | node.select() |
| | | } else if (node.focus) { |
| | | node.focus() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | onSkip = (key) => { |
| | | let node = document.getElementById(key) |
| | | if (node) { |
| | | if (node.select) { |
| | | node.select() |
| | | } else if (node.focus) { |
| | | node.focus() |
| | | } |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { line, delLine, trigger, field } = this.props |
| | | const { line, delLine, trigger, field, pid } = this.props |
| | | const { bill_count, unitprice, amount_line } = this.state |
| | | |
| | | return <div className="mk-tr active"> |
| | |
| | | <div className="mk-input">{line.productname || ''}<EllipsisOutlined onClick={trigger}/></div> |
| | | </div> |
| | | <div className="mk-td"> |
| | | <Input defaultValue={line.spec || ''} autoFocus={field === 'spec'} onChange={(e) => this.onChange(e.target.value, 'spec')}/> |
| | | <Input defaultValue={line.spec || ''} autoFocus={field === 'spec'} onChange={(e) => this.onChange(e.target.value, 'spec')} onPressEnter={() => this.onSkip(pid + 'mk-invoice-unit')}/> |
| | | </div> |
| | | <div className="mk-td"> |
| | | <Input defaultValue={line.unit || ''} autoFocus={field === 'unit'} onChange={(e) => this.onChange(e.target.value, 'unit')}/> |
| | | <Input id={pid + 'mk-invoice-unit'} defaultValue={line.unit || ''} autoFocus={field === 'unit'} onChange={(e) => this.onChange(e.target.value, 'unit')} onPressEnter={() => this.onSkip(pid + 'mk-invoice-billcount')}/> |
| | | </div> |
| | | <div className="mk-td"> |
| | | <InputNumber value={bill_count} autoFocus={field === 'bill_count'} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} onChange={(val) => this.setState({bill_count: val})} onBlur={() => this.onChange(bill_count, 'bill_count')}/> |
| | | <InputNumber id={pid + 'mk-invoice-billcount'} value={bill_count} autoFocus={field === 'bill_count'} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} onChange={(val) => this.setState({bill_count: val})} onPressEnter={() => this.onChange(bill_count, 'bill_count', pid + 'mk-invoice-unitprice')} onBlur={() => this.onChange(bill_count, 'bill_count')}/> |
| | | </div> |
| | | <div className="mk-td"> |
| | | <InputNumber value={unitprice} autoFocus={field === 'unitprice'} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} onChange={(val) => this.setState({unitprice: val})} onBlur={() => this.onChange(unitprice, 'unitprice')}/> |
| | | <InputNumber id={pid + 'mk-invoice-unitprice'} value={unitprice} autoFocus={field === 'unitprice'} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} onChange={(val) => this.setState({unitprice: val})} onPressEnter={() => this.onChange(unitprice, 'unitprice', pid + 'mk-invoice-amount')} onBlur={() => this.onChange(unitprice, 'unitprice')}/> |
| | | </div> |
| | | <div className="mk-td"> |
| | | <InputNumber value={amount_line} autoFocus={field === 'amount_line'} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} onChange={(val) => this.setState({amount_line: val})} onBlur={() => this.onChange(amount_line, 'amount_line')}/> |
| | | <InputNumber id={pid + 'mk-invoice-amount'} value={amount_line} autoFocus={field === 'amount_line'} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} onChange={(val) => this.setState({amount_line: val})} onPressEnter={() => this.onChange(amount_line, 'amount_line')} onBlur={() => this.onChange(amount_line, 'amount_line')}/> |
| | | </div> |
| | | <div className="mk-td mk-right">{line.tax_name}</div> |
| | | <div className="mk-td mk-right">{line.tax_amount.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ',')} <span className="del-line" onClick={(e) => delLine(line.uuid, e)}></span> </div> |
| | |
| | | </div> |
| | | {data.map(item => { |
| | | if (editKey === item.uuid) { |
| | | return <DetailLine key={item.uuid} line={item} field={key} changeLine={this.changeLine} delLine={this.delLine} trigger={() => this.setState({visible: true})}/> |
| | | return <DetailLine key={item.uuid} pid={config.uuid} line={item} field={key} changeLine={this.changeLine} delLine={this.delLine} trigger={() => this.setState({visible: true})}/> |
| | | } |
| | | |
| | | return <div className="mk-tr" key={item.uuid} onClick={() => this.checkLine(item.uuid)}> |
| | |
| | | config.columns.forEach(item => { |
| | | if (item.Hide === 'true') return |
| | | _columns.push({ |
| | | align: 'center', |
| | | align: 'left', |
| | | dataIndex: item.field, |
| | | title: item.label, |
| | | sorter: false, |
| | |
| | | }) |
| | | |
| | | keys = keys.join(',') |
| | | vals = vals.join(',') |
| | | |
| | | lines.push({ |
| | | table: md5(tb + keys), |
| | | insert: `Insert into ${tbName} (${keys},[mk_level],[mk_id],[mk_bid])`, |
| | | select: `Select ${vals.join(',')},'${level}','${id}','${bid}'` |
| | | insert: `Insert into ${tbName} (${keys ? keys + ',' : ''}[mk_level],[mk_id],[mk_bid])`, |
| | | select: `Select ${keys ? vals + ',' : ''}'${level}','${id}','${bid}'` |
| | | }) |
| | | |
| | | subObjs.forEach(item => { |
| | |
| | | } |
| | | |
| | | let _columns = [] |
| | | let remarks = [] |
| | | if (window.GLOB.process && card.intertype !== 'inner') { |
| | | let cols = [] |
| | | fields.forEach(col => { |
| | |
| | | |
| | | cols.push(col.field.toLowerCase()) |
| | | _columns.push(col) |
| | | |
| | | if (col.type === 'text' && col.field !== 'BID') { |
| | | remarks.push(col) |
| | | } |
| | | }) |
| | | |
| | | columns.forEach(col => { |
| | |
| | | </Select> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' && verify.flowType !== 'start' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title="可通过表单字段填写审批或驳回的备注信息。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 备注字段 |
| | | </Tooltip> |
| | | }> |
| | | <Select allowClear value={verify.flowRemark} onChange={(val) => {this.onOptionChange(val || '', 'flowRemark')}}> |
| | | {remarks.map(option => |
| | | <Select.Option key={option.field} value={option.field}> |
| | | {option.label} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={24}></Col> |
| | | <Col span={8}> |
| | | <Form.Item label={ |
| | |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | | const { type, workFlow, flowType, flowSql, useDefaultSql, defaultsql } = this.props |
| | | const { type, workFlow, flowType, flowSql, flowRemark, useDefaultSql, defaultsql } = this.props |
| | | const { editItem, skip } = this.state |
| | | // 表单提交时检查输入值是否正确 |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | |
| | | /* 工作流默认sql */ |
| | | insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@,@works_flow_param@,@status@,@statusname@,@work_group@,@works_flow_detail_id@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_detail_id@,@userid@,@start_type@,@userid@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid,typecharone) |
| | | select @ID@,@works_flow_code@,@userid@,@works_flow_detail_id@,@userid@,@UserName,@FullName,@time_id@,'begin' |
| | | ` |
| | | } else { |
| | | sql += ` |
| | | /* 工作流默认sql */ |
| | | update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname${flowRemark ? ',remark=@' + flowRemark : ''} |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid${flowRemark ? ',remark' : ''}) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@${flowRemark ? ',@' + flowRemark : ''} |
| | | |
| | | update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 |
| | |
| | | } |
| | | |
| | | selectScript = (value, option) => { |
| | | const { flowType } = this.props |
| | | const { flowType, flowRemark } = this.props |
| | | |
| | | if (!value || !option) return |
| | | |
| | |
| | | if (flowType === 'start') { |
| | | value = `insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@,@works_flow_param@,@status@,@statusname@,@work_group@,@works_flow_detail_id@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_detail_id@,@userid@,@start_type@,@userid@,@UserName,@FullName,@time_id@` |
| | | select @ID@,@works_flow_code@,@works_flow_detail_id@,@userid@,@start_type@,@userid@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid,typecharone) |
| | | select @ID@,@works_flow_code@,@userid@,@works_flow_detail_id@,@userid@,@UserName,@FullName,@time_id@,'begin'` |
| | | } else { |
| | | value = `update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | value = `update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname${flowRemark ? ',remark=@' + flowRemark : ''} |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid${flowRemark ? ',remark' : ''}) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@${flowRemark ? ',@' + flowRemark : ''} |
| | | |
| | | update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 |
| | |
| | | _verify.scripts = _verify.scripts || [] |
| | | _verify.cbScripts = _verify.cbScripts || [] |
| | | |
| | | if (window.GLOB.process) { |
| | | if (window.GLOB.process && card.intertype !== 'inner') { |
| | | _verify.workFlow = _verify.workFlow || 'false' |
| | | _verify.flowType = _verify.flowType || (card.sqlType === 'insert' ? 'start' : 'approval') |
| | | _verify.flowSql = _verify.flowSql || 'true' |
| | | } else { |
| | | delete _verify.workFlow |
| | | delete _verify.flowRemark |
| | | delete _verify.flowType |
| | | delete _verify.flowSql |
| | | } |
| | |
| | | |
| | | // 表单提交时检查输入值是否正确 |
| | | return new Promise((resolve, reject) => { |
| | | if ((card.sqlType === 'custom' || verify.default === 'false') && verify.scripts.length === 0) { |
| | | if ((card.sqlType === 'custom' || verify.default === 'false') && !(verify.workFlow === 'true' && verify.flowSql === 'true') && verify.scripts.length === 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '不执行默认sql时,必须设置自定义脚本!', |
| | |
| | | btn={this.props.card} |
| | | initsql={this.state.initsql} |
| | | workFlow={verify.workFlow} |
| | | flowRemark={verify.flowRemark} |
| | | flowType={verify.flowType} |
| | | flowSql={verify.flowSql} |
| | | customScripts={verify.scripts} |
| | |
| | | btn={this.props.card} |
| | | initsql={this.state.initsql} |
| | | workFlow={verify.workFlow} |
| | | flowRemark={verify.flowRemark} |
| | | flowType={verify.flowType} |
| | | flowSql={verify.flowSql} |
| | | customScripts={verify.scripts} |
| | |
| | | /* 工作流默认sql */ |
| | | insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@,@works_flow_param@,@status@,@statusname@,@work_group@,@works_flow_detail_id@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_detail_id@,@userid@,@start_type@,@userid@,@UserName,@FullName,@time_id@ |
| | | insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid,typecharone) |
| | | select @ID@,@works_flow_code@,@userid@,@works_flow_detail_id@,@userid@,@UserName,@FullName,@time_id@,'begin' |
| | | ` |
| | | } else if (line && line.approvalMethod === 'countersign' && (!node.checkIds || !node.checkIds.includes(userid))) { |
| | | status = 0 |
| | |
| | | |
| | | if @works_flow_key_status='Y' |
| | | begin |
| | | update s_my_works_flow set ${field}=${label},status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | update s_my_works_flow set ${field}=${label},status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname${verify.flowRemark ? ',remark=@' + verify.flowRemark : ''} |
| | | where id=@works_flow_key_id |
| | | |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid,${field}) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@,${label} |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid${verify.flowRemark ? ',remark' : ''},${field}) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@${verify.flowRemark ? ',@' + verify.flowRemark : ''},${label} |
| | | |
| | | update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 |
| | |
| | | end |
| | | else |
| | | begin |
| | | update s_my_works_flow set ${field}=${label},modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | update s_my_works_flow set ${field}=${label},modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname${verify.flowRemark ? ',remark=@' + verify.flowRemark : ''} |
| | | where id =@works_flow_key_id |
| | | |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid,${field}) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@s_my_works_flow_log_param,@s_my_works_flow_log_status,@s_my_works_flow_log_statusname,@s_my_works_flow_log_detail_id,@work_group@,@work_grade@,@time_id@,${label} |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid${verify.flowRemark ? ',remark' : ''},${field}) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@s_my_works_flow_log_param,@s_my_works_flow_log_status,@s_my_works_flow_log_statusname,@s_my_works_flow_log_detail_id,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@${verify.flowRemark ? ',@' + verify.flowRemark : ''},${label} |
| | | |
| | | update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 and userid =@userid@ |
| | |
| | | end |
| | | set @retmsg='' |
| | | |
| | | update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname${verify.flowRemark ? ',remark=@' + verify.flowRemark : ''} |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@ |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,bid,createuserid,CreateUser,CreateStaff,upid${verify.flowRemark ? ',remark' : ''}) |
| | | select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@bid@,@UserID@,@UserName,@FullName,@time_id@${verify.flowRemark ? ',@' + verify.flowRemark : ''} |
| | | |
| | | update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 |
| | | |
| | | ${line.mknode === 'startEdge' ? `update s_my_works_flow_role set deleted=0,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname |
| | | where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and typecharone='begin'` : ''} |
| | | |
| | | if @check_userids@ != '' |
| | | begin |
| | | insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid) |
| | |
| | | const { oriConfig, config } = this.state |
| | | |
| | | if (!is(fromJS(oriConfig), fromJS(config))) { |
| | | const _this = this |
| | | const that = this |
| | | |
| | | confirm({ |
| | | title: '配置已修改,放弃保存吗?', |
| | | content: '', |
| | | onOk() { |
| | | _this.props.cancel() |
| | | that.props.cancel() |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | |
| | | const { oriConfig, config } = this.state |
| | | |
| | | if (!is(fromJS(oriConfig), fromJS(config))) { |
| | | const _this = this |
| | | const that = this |
| | | |
| | | confirm({ |
| | | title: '配置已修改,放弃保存吗?', |
| | | content: '', |
| | | onOk() { |
| | | _this.props.cancel() |
| | | that.props.cancel() |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | |
| | | const { oriConfig, config } = this.state |
| | | |
| | | if (!is(fromJS(oriConfig), fromJS(config))) { |
| | | const _this = this |
| | | const that = this |
| | | |
| | | confirm({ |
| | | title: '配置已修改,放弃保存吗?', |
| | | content: '', |
| | | onOk() { |
| | | _this.props.cancel() |
| | | that.props.cancel() |
| | | }, |
| | | onCancel() {} |
| | | }) |