| | |
| | | colfields: colfields.join(', '), |
| | | uniqueColumns: this.state.uniqueColumns.map(col => { |
| | | if (col.dataIndex === 'field') { |
| | | col.options = _fields |
| | | col.options = unionFields |
| | | } |
| | | return col |
| | | }), |
| | |
| | | item.field.split(',').forEach((_field, index) => { |
| | | let _key = _field.toLowerCase() |
| | | let _val = '' |
| | | let _val2 = '' |
| | | |
| | | arr.push(_key) |
| | | if (_key === 'bid') { // 表单中没有bid则使用系统bid变量 |
| | | _val = BID |
| | | } else if (numForms.includes(_key)) { |
| | | _val = '1' |
| | | } else if (dateForms.includes(_key)) { |
| | | _val = '1949-10-01' |
| | | if (_key === 'bid') { |
| | | _val = `'${BID}'` |
| | | } else { |
| | | _val = `@${_field}` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}='${_val}'`) |
| | | _value.push(`${_labels[index] || ''}:${_val || ''}`) |
| | | if (_key === 'bid') { |
| | | _val2 = BID |
| | | } else { |
| | | _val2 = `' + @${_field} + '` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}=${_val}`) |
| | | _value.push(`${_labels[index] || ''}:${_val2}`) |
| | | }) |
| | | |
| | | if (!arr.includes(primaryKey.toLowerCase())) { |
| | | if (!arr.includes(primaryKey.toLowerCase()) && btn.Ot !== 'notRequired') { |
| | | _fieldValue.push(`${primaryKey} !='${primaryId}'`) |
| | | } |
| | | |
| | |
| | | let hasvoucher = false |
| | | |
| | | // 凭证-显示列中选取,必须选行 |
| | | if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'requiredOnce') { |
| | | if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'notRequired') { |
| | | let _voucher = verify.voucher |
| | | |
| | | hasvoucher = true |
| | |
| | | _sql += ` |
| | | /* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill ='0', |
| | | @Bill = @${_voucher.linkField}, |
| | | @BVoucherType ='${_voucher.BVoucherType}', |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |
| | |
| | | let hasvoucher = false |
| | | |
| | | // 凭证-显示列中选取,必须选行 |
| | | if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'requiredOnce') { |
| | | if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'notRequired') { |
| | | hasvoucher = true |
| | | } |
| | | if (hasvoucher) { |
| | |
| | | |
| | | changeUniques = (uniques) => { |
| | | const { card } = this.props |
| | | const { verify, fields, columnsFields } = this.state |
| | | const { verify, unionFields, columnsFields } = this.state |
| | | |
| | | let _fields = [] |
| | | let change = {} |
| | | if (card.Ot !== 'requiredOnce') { |
| | | _fields = fields |
| | | _fields = unionFields |
| | | } else { |
| | | _fields = columnsFields |
| | | } |
| | |
| | | /> |
| | | <EditTable actions={['move']} data={verify.customverifys} columns={customColumns} onChange={(customverifys) => {this.setState({verify: {...verify, customverifys}})}}/> |
| | | </TabPane> : null} |
| | | {verifyInter === 'system' ? <TabPane tab={ |
| | | {verifyInter === 'system' && (['form', 'pop'].includes(card.OpenType) || !card.OpenType) ? <TabPane tab={ |
| | | <span> |
| | | 单号生成 |
| | | {verify.billcodes.length ? <span className="count-tip">{verify.billcodes.length}</span> : null} |
| | |
| | | /> |
| | | <EditTable actions={['move']} data={verify.billcodes} columns={orderColumns} onChange={(billcodes) => {this.setState({verify: {...verify, billcodes}})}}/> |
| | | </TabPane> : null} |
| | | {verifyInter === 'system' ? <TabPane tab={ |
| | | {verifyInter === 'system' && (card.Ot === 'requiredOnce' || (['form', 'pop'].includes(card.OpenType) || !card.OpenType)) ? <TabPane tab={ |
| | | <span> |
| | | {card.Ot !== 'requiredOnce' ? '唯一性验证' : '同类数据验证'} |
| | | {verify.uniques.length ? <span className="count-tip">{verify.uniques.length}</span> : null} |
| | |
| | | } key="uniques"> |
| | | <UniqueForm |
| | | btn={card} |
| | | fields={card.Ot !== 'requiredOnce' ? fields : columnsFields} |
| | | fields={card.Ot !== 'requiredOnce' ? unionFields : columnsFields} |
| | | uniqueChange={this.uniqueChange} |
| | | /> |
| | | <EditTable actions={['edit', 'move', 'del', 'status', 'sql']} data={verify.uniques} columns={card.Ot !== 'requiredOnce' ? uniqueColumns : onceUniqueColumns} onChange={this.changeUniques}/> |
| | | </TabPane> : null} |
| | | {verifyInter === 'system' ? <TabPane tab={ |
| | | <span> |
| | | <span title={card.Ot === 'notRequired' ? '不选行时创建凭证不可用' : ''}> |
| | | 创建凭证 |
| | | {verify.voucher && verify.voucher.enabled ? <span className="count-tip">1</span> : null} |
| | | </span> |
| | | } key="voucher"> |
| | | } key="voucher" disabled={card.Ot === 'notRequired'}> |
| | | <VoucherForm |
| | | voucher={voucher} |
| | | columns={columns} |