From 84804b405cb88f659d055b16eb3bd00b813ccb4a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 10 十二月 2020 10:58:38 +0800 Subject: [PATCH] 2020-12-10 --- src/templates/zshare/verifycard/index.jsx | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index 85ad0a4..1745fd7 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -467,6 +467,7 @@ _verify.contrasts = _verify.contrasts || [] _verify.accountdate = _verify.accountdate || 'false' _verify.accountfield = _verify.accountfield || '' + _verify.voucherdate = _verify.voucherdate || '' _verify.customverifys = _verify.customverifys || [] _verify.billcodes = _verify.billcodes || [] _verify.voucher = _verify.voucher || {enabled: false} @@ -754,7 +755,11 @@ end ` } else if (card.sqlType === 'LogicDelete' || card.sqlType === 'custom') { - _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@ where ${config.setting.primaryKey}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID from dbo.SplitComma(@ID@))'};` + let _voucher = '' + if (_verify.voucher && _verify.voucher.enabled) { + _voucher = ',BVoucher=@BVoucher,FIBVoucherDate=@FIBVoucherDate,FiYear=@FiYear' + } + _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@${_voucher} where ${config.setting.primaryKey}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID from dbo.SplitComma(@ID@))'};` } else if (card.sqlType === 'delete') { let _msg = '' if (columns && columns.length > 0 && card.Ot !== 'notRequired' && card.Ot !== 'requiredOnce') { @@ -1002,6 +1007,14 @@ this.setState({ verify: {...verify, accountfield: val} + }) + } + + changeAccDate = (val) => { + const { verify } = this.state + + this.setState({ + verify: {...verify, voucherdate: val} }) } @@ -1341,6 +1354,22 @@ </Select> </Form.Item> </Col> : null} + {verify.accountdate === 'true' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title={'楠岃瘉鏃ユ湡涓虹┖鏃讹紝榛樿涓哄綋澶┿��'}> + <Icon type="question-circle" style={{color: '#c49f47', marginRight: '5px'}} /> + 楠岃瘉鏃ユ湡 + </Tooltip> + }> + <Select allowClear defaultValue={verify.voucherdate || ''} onChange={this.changeAccDate}> + {unionFields.map(option => + <Select.Option key={option.uuid} value={option.field}> + {option.label} + </Select.Option> + )} + </Select> + </Form.Item> + </Col> : null} <Col span={8}> <Form.Item label={'澶辨晥楠岃瘉'}> <Radio.Group value={verify.invalid} onChange={(e) => {this.onOptionChange(e, 'invalid')}}> -- Gitblit v1.8.0