diff --git a/klp-ui/src/views/finance/document/components/Voucher.vue b/klp-ui/src/views/finance/document/components/Voucher.vue index 221fac69..1e158b39 100644 --- a/klp-ui/src/views/finance/document/components/Voucher.vue +++ b/klp-ui/src/views/finance/document/components/Voucher.vue @@ -21,7 +21,8 @@ - - - {{ amountInWords }} - - - {{ debitAmount.toFixed(2) }} - - - {{ creditAmount.toFixed(2) }} - - + + + + {{ amountInWords }} + + + + {{ (debitAmount || 0).toFixed(2) }} + + + {{ (creditAmount || 0).toFixed(2) }} + + + @@ -115,27 +119,27 @@ export default { } }, computed: { - // 借方总额和贷方总额(过滤空行) + // 借方总额(修复后) debitAmount() { + // 确保reduce的初始值为0,且返回值为数字 return this.tableData.reduce((total, item) => { - // 只计算有内容的行 if (this.isRowNotEmpty(item)) { return total + (Number(item.debitAmount) || 0); } return total; - }, 0); + }, 0) || 0; // 最后确保即使结果为undefined也返回0 }, + // 贷方总额(修复后) creditAmount() { return this.tableData.reduce((total, item) => { if (this.isRowNotEmpty(item)) { return total + (Number(item.creditAmount) || 0); } return total; - }, 0); + }, 0) || 0; // 同样增加默认值0 }, - // 大写金额 + // 大写金额(保持不变) amountInWords() { - // 如果借贷相等则正常显示,不相等则显示借贷不相等 if (Math.abs(this.debitAmount - this.creditAmount) < 0.01) { return this.numberToChinese(this.debitAmount); } else { @@ -147,7 +151,16 @@ export default { initData: { type: Object, required: false, - default: () => ({}) + default: () => ({ + tableData: [{ + voucherNo: '', + accountId: undefined, + debitAmount: 0, + creditAmount: 0, + remark: '', + voucherNo: '' + }] + }) } }, watch: { @@ -155,7 +168,18 @@ export default { handler(newVal) { console.log(newVal, 'watchData'); if (newVal) { - this.tableData = newVal.detailList; + if (newVal.detailList) { + this.tableData = newVal.detailList; + } else { + this.tableData = [{ + voucherNo: '', + accountId: undefined, + debitAmount: 0, + creditAmount: 0, + remark: '', + voucherNo: '' + }] + } this.form.docNo = newVal.docNo; this.form.docDate = newVal.docDate; this.form.relatedOrderId = newVal.relatedOrderId; diff --git a/klp-ui/src/views/wms/stockIo/panels/detail.vue b/klp-ui/src/views/wms/stockIo/panels/detail.vue index d6cdad9c..546d143f 100644 --- a/klp-ui/src/views/wms/stockIo/panels/detail.vue +++ b/klp-ui/src/views/wms/stockIo/panels/detail.vue @@ -4,14 +4,10 @@ - - {{ getIoTypeLabel(stockIo.ioType) }} - + - - {{ getBizTypeLabel(stockIo.bizType) }} - + @@ -233,7 +229,7 @@ export default { SemiSelect, MaterialSelect }, - dicts: ['stock_item_type'], + dicts: ['stock_item_type', 'stock_biz_type'], props: { stockIo: { type: Object, diff --git a/klp-ui/src/views/wms/stockIo/panels/stockIoPage.vue b/klp-ui/src/views/wms/stockIo/panels/stockIoPage.vue index 6328aa84..635e6d8c 100644 --- a/klp-ui/src/views/wms/stockIo/panels/stockIoPage.vue +++ b/klp-ui/src/views/wms/stockIo/panels/stockIoPage.vue @@ -48,16 +48,15 @@ diff --git a/klp-ui/src/views/wms/work/schedule/index.vue b/klp-ui/src/views/wms/work/schedule/index.vue new file mode 100644 index 00000000..e62de247 --- /dev/null +++ b/klp-ui/src/views/wms/work/schedule/index.vue @@ -0,0 +1,4 @@ + + diff --git a/klp-ui/src/views/wms/work/schedulePlan/detail.vue b/klp-ui/src/views/wms/work/schedulePlan/detail.vue index a6ab0774..6f722985 100644 --- a/klp-ui/src/views/wms/work/schedulePlan/detail.vue +++ b/klp-ui/src/views/wms/work/schedulePlan/detail.vue @@ -2,39 +2,29 @@
- - + + - + + + + + + + + + - @@ -46,7 +36,7 @@ - + --> { this.planInfo = res.data || {}; diff --git a/klp-ui/src/views/wms/work/schedulePlan/index.vue b/klp-ui/src/views/wms/work/schedulePlan/index.vue index 653be4cc..ddccf8d9 100644 --- a/klp-ui/src/views/wms/work/schedulePlan/index.vue +++ b/klp-ui/src/views/wms/work/schedulePlan/index.vue @@ -97,13 +97,13 @@ 新建 - 已排产 + 待排产 生产中 - 已完成 + 已废弃 - - + +