From d5ed6bd23455c63b5de88f8740c7325658f5241e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 一月 2025 18:11:47 +0800 Subject: [PATCH] 2025-01-16 --- src/menu/debug/index.jsx | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/menu/debug/index.jsx b/src/menu/debug/index.jsx index d398ea2..12aa296 100644 --- a/src/menu/debug/index.jsx +++ b/src/menu/debug/index.jsx @@ -1111,22 +1111,21 @@ 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)` @@ -1236,15 +1235,20 @@ 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}', -- Gitblit v1.8.0