| | |
| | | |
| | | verify.billcodes.forEach(item => { |
| | | let _key = item.field.toLowerCase() |
| | | let _linkKey = item.linkField ? item.linkField.toLowerCase() : '' |
| | | |
| | | if (!keys.includes(_key)) return // 表单中不含单号生成字段 |
| | | |
| | | let _lpline = '' |
| | | if (item.TypeCharOne === 'Lp') { |
| | | if (_linkKey === 'bid' && BID) { // 替换bid |
| | | if (/^BID$/ig.test(item.linkField)) { |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@BID@,48)` |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${_linkKey},48)` |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${item.linkField},48)` |
| | | } |
| | | } else if (item.TypeCharOne === 'BN') { |
| | | if (_linkKey === 'bid' && BID) { // 替换bid |
| | | if (/^BID$/ig.test(item.linkField)) { |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@BID@,48)` |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@${_linkKey},48)` |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@${item.linkField},48)` |
| | | } |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= right('${item.ModularDetailCode}',50)` |
| | |
| | | let hasvoucher = false |
| | | |
| | | // 凭证-显示列中选取,必须选行 |
| | | if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'notRequired') { |
| | | if (verify.voucher && verify.voucher.enabled) { |
| | | let _voucher = verify.voucher |
| | | let linkField = `@${_voucher.linkField}` |
| | | |
| | | if (/^BID$/ig.test(_voucher.linkField)) { |
| | | linkField = `'${BID}'` |
| | | } |
| | | |
| | | hasvoucher = true |
| | | |
| | | _sql += ` |
| | | /* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill = @${_voucher.linkField}, |
| | | @Bill = ${linkField}, |
| | | @BVoucherType ='${_voucher.BVoucherType}', |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |
| | |
| | | |
| | | verify.billcodes.forEach(item => { |
| | | let _key = item.field.toLowerCase() |
| | | let _linkKey = item.linkField ? item.linkField.toLowerCase() : '' |
| | | |
| | | if (!keys.includes(_key)) return // 表单中不含单号生成字段 |
| | | |
| | | let _lpline = '' |
| | | if (item.TypeCharOne === 'Lp') { |
| | | if (_linkKey === 'bid' && BID) { // 替换bid |
| | | if (/^BID$/ig.test(item.linkField)) { |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@BID@,48)` |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${_linkKey},48)` |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${item.linkField},48)` |
| | | } |
| | | } else if (item.TypeCharOne === 'BN') { |
| | | if (_linkKey === 'bid' && BID) { // 替换bid |
| | | if (/^BID$/ig.test(item.linkField)) { |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@BID@,48)` |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@${_linkKey},48)` |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@${item.linkField},48)` |
| | | } |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= right('${item.ModularDetailCode}',50)` |
| | |
| | | let hasvoucher = false |
| | | |
| | | // 凭证-显示列中选取,必须选行 |
| | | if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'notRequired') { |
| | | if (verify.voucher && verify.voucher.enabled) { |
| | | let _voucher = verify.voucher |
| | | let linkField = `@${_voucher.linkField}` |
| | | |
| | | if (/^BID$/ig.test(_voucher.linkField)) { |
| | | linkField = `'${BID}'` |
| | | } |
| | | |
| | | hasvoucher = true |
| | | |
| | | _sql += ` |
| | | /* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill = @${_voucher.linkField}, |
| | | @Bill = ${linkField}, |
| | | @BVoucherType ='${_voucher.BVoucherType}', |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |
| | |
| | | let hasvoucher = false |
| | | |
| | | // 凭证-显示列中选取,必须选行 |
| | | if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'notRequired') { |
| | | if (verify.voucher && verify.voucher.enabled) { |
| | | hasvoucher = true |
| | | } |
| | | if (hasvoucher) { |
| | |
| | | <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 title={card.Ot === 'notRequired' ? '不选行时创建凭证不可用' : ''}> |
| | | <span> |
| | | 创建凭证 |
| | | {verify.voucher && verify.voucher.enabled ? <span className="count-tip">1</span> : null} |
| | | </span> |
| | | } key="voucher" disabled={card.Ot === 'notRequired'}> |
| | | } key="voucher"> |
| | | <VoucherForm |
| | | voucher={voucher} |
| | | columns={columns} |
| | | columns={unionFields} |
| | | voucherobj={verify.voucher} |
| | | voucherDetail={voucherDetail} |
| | | voucherChange={this.voucherChange} |
| | |
| | | if (cell.OpenType === 'form' && cell.formType === 'count_line') return |
| | | |
| | | if (cell.intertype === 'system') { |
| | | if (cell.Ot === 'notRequired' && cell.verify && cell.verify.voucher && cell.verify.voucher.enabled) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”使用了创建凭证函数,需要选择行!`}) |
| | | } |
| | | // if (cell.Ot === 'notRequired' && cell.verify && cell.verify.voucher && cell.verify.voucher.enabled) { |
| | | // errors.push({ level: 0, detail: `按钮“${cell.label}”使用了创建凭证函数,需要选择行!`}) |
| | | // } |
| | | } else if (cell.intertype === 'custom' || cell.intertype === 'outer') { |
| | | if (cell.callbackType === 'script' && (!cell.verify || !cell.verify.cbScripts || cell.verify.cbScripts.filter(item => item.status !== 'false').length === 0)) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”使用了自定义脚本回调,回调脚本不可为空!`}) |
| | | } else if (cell.procMode === 'system' && cell.Ot === 'notRequired' && cell.verify && cell.verify.voucher && cell.verify.voucher.enabled) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”使用了创建凭证函数,需要选择行!`}) |
| | | // } else if (cell.procMode === 'system' && cell.Ot === 'notRequired' && cell.verify && cell.verify.voucher && cell.verify.voucher.enabled) { |
| | | // errors.push({ level: 0, detail: `按钮“${cell.label}”使用了创建凭证函数,需要选择行!`}) |
| | | } |
| | | } |
| | | } else if (cell.OpenType === 'funcbutton') { |
| | |
| | | if (formdata && verify.billcodes && verify.billcodes.length > 0) { |
| | | verify.billcodes.forEach(item => { |
| | | let _key = item.field.toLowerCase() |
| | | let _linkKey = item.linkField ? item.linkField.toLowerCase() : '' |
| | | |
| | | if (!formkeys.includes(_key)) return // 表单中不含单号生成字段 |
| | | |
| | | let _lpline = '' |
| | | if (item.TypeCharOne === 'Lp') { |
| | | if (_linkKey === 'bid' && BID) { // 替换bid |
| | | if (/^BID$/ig.test(item.linkField)) { |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@BID@,48)` |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${_linkKey},48)` |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${item.linkField},48)` |
| | | } |
| | | } else if (item.TypeCharOne === 'BN') { |
| | | if (_linkKey === 'bid' && BID) { // 替换bid |
| | | if (/^BID$/ig.test(item.linkField)) { |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@BID@,48)` |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@${_linkKey},48)` |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@${item.linkField},48)` |
| | | } |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= right('${item.ModularDetailCode}',50)` |
| | |
| | | let hasvoucher = false |
| | | |
| | | // 凭证-显示列中选取,必须选行 |
| | | if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'notRequired') { |
| | | if (verify.voucher && verify.voucher.enabled) { |
| | | let _voucher = verify.voucher |
| | | let linkField = `@${_voucher.linkField}` |
| | | |
| | | if (/^BID$/ig.test(_voucher.linkField)) { |
| | | linkField = BID |
| | | } |
| | | |
| | | hasvoucher = true |
| | | |
| | | _sql += ` |
| | | /* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill = @${_voucher.linkField}, |
| | | @Bill = ${linkField}, |
| | | @BVoucherType ='${_voucher.BVoucherType}', |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |
| | |
| | | |
| | | verify.billcodes.forEach(item => { |
| | | let _key = item.field.toLowerCase() |
| | | let _linkKey = item.linkField ? item.linkField.toLowerCase() : '' |
| | | |
| | | if (!keys.includes(_key)) return // 表单中不含单号生成字段 |
| | | |
| | | let _lpline = '' |
| | | if (item.TypeCharOne === 'Lp') { |
| | | if (_linkKey === 'bid' && BID) { // 替换bid |
| | | if (/^BID$/ig.test(item.linkField)) { |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@BID@,48)` |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${_linkKey},48)` |
| | | _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${item.linkField},48)` |
| | | } |
| | | } else if (item.TypeCharOne === 'BN') { |
| | | if (_linkKey === 'bid' && BID) { // 替换bid |
| | | if (/^BID$/ig.test(item.linkField)) { |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@BID@,48)` |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@${_linkKey},48)` |
| | | _lpline = `set @ModularDetailCode= 'BN'+ right(@${item.linkField},48)` |
| | | } |
| | | } else { |
| | | _lpline = `set @ModularDetailCode= right('${item.ModularDetailCode}',50)` |
| | |
| | | let hasvoucher = false |
| | | |
| | | // 凭证-显示列中选取,必须选行 |
| | | if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'notRequired') { |
| | | if (verify.voucher && verify.voucher.enabled) { |
| | | let _voucher = verify.voucher |
| | | let linkField = `@${_voucher.linkField}` |
| | | |
| | | if (/^BID$/ig.test(_voucher.linkField)) { |
| | | linkField = `'${BID}'` |
| | | } |
| | | |
| | | hasvoucher = true |
| | | |
| | | _sql += ` |
| | | /* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill = @${_voucher.linkField}, |
| | | @Bill = ${linkField}, |
| | | @BVoucherType ='${_voucher.BVoucherType}', |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |