Эх сурвалжийг харах

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom into dev

mlchen 1 долоо хоног өмнө
parent
commit
c03f4b01bf

+ 10 - 10
src/views/saleManage/saleOrder/accountPool/components/detailDialog.vue

@@ -20,8 +20,8 @@
       class="pool-dialog-alert"
     >
       <template slot="title">
-        池状态:{{ statusName }} · 剩余可对账
-        <b>¥{{ money(detail.availableAmount) }}</b>
+        池状态:{{ statusName }} · 可对账金额
+        <b>¥{{ money(detail.accountableAmount) }}</b>
       </template>
       <div>{{ statusDesc }}</div>
     </el-alert>
@@ -93,8 +93,8 @@
       },
       canReconcile() {
         return (
-          this.detail.poolStatus === POOL_STATUS.UNREC &&
-          Number(this.detail.availableAmount) > 0
+          Number(this.detail.poolStatus) === POOL_STATUS.UNREC &&
+          Number(this.detail.accountableAmount) > 0
         );
       },
       alertType() {
@@ -114,11 +114,11 @@
             d.statementNo || '—'
           } 占用:已对账数量 ${this.number(
             d.statedQty
-          )},在途数量 ${this.number(d.inFlightQty)},剩余 ${this.number(
+          )},在途数量 ${this.number(d.inFlightQty)},尚可对账 ${this.number(
             d.availableQty
           )} ${d.unit || ''}。`;
         }
-        return '该明细可对账数量已全部对账完毕,剩余可对账金额为 0。';
+        return '该明细可对账数量已全部对账完毕。';
       },
       /** 9 个字段分组,只展示中文名 */
       fieldGroups() {
@@ -199,9 +199,9 @@
               f('可对账金额', this.money(d.accountableAmount), {
                 hl: true
               }),
-              f('剩余可对账金额', this.money(d.availableAmount), {
-                hl: true
-              })
+              // f('剩余可对账金额', this.money(d.availableAmount), {
+              //   hl: true
+              // })
             ]
           },
           {
@@ -259,7 +259,7 @@
         this.$emit('update:detailDialogFlag', false);
       },
       startRecon() {
-        // 传整条明细:调用方要用 poolStatus / availableAmount 判断是否可发起
+        // 传整条明细:调用方要用 poolStatus / accountableAmount 判断是否可发起
         this.$emit('startRecon', this.detail);
       },
       money(n) {

+ 10 - 7
src/views/saleManage/saleOrder/accountPool/index.vue

@@ -199,7 +199,7 @@
     'noTaxTotalPrice',
     'taxAmount',
     'accountableAmount',
-    'availableAmount',
+    // 剩余可对账金额 availableAmount 只作展示,不参与任何判定,故不纳入标红
     // 单价与税率组
     'taxSinglePrice',
     'noTaxSinglePrice',
@@ -411,8 +411,8 @@
               text('productName', '物料名称', 165, { slot: 'product' }),
               text('spec', '规格型号', 130),
               text('unit', '单位', 75),
-              text('batchNo', '批次号', 100),
-              num('inventoryQuantity', '库存数量', 100)
+              text('batchNo', '批次号', 100)
+              // num('inventoryQuantity', '库存数量', 100)
             ]
           },
 
@@ -471,7 +471,7 @@
               money('noTaxTotalPrice', '不含税金额', 125),
               money('taxAmount', '税额', 110),
               money('accountableAmount', '可对账金额', 130),
-              money('availableAmount', '剩余可对账金额', 145)
+              // money('availableAmount', '剩余可对账金额', 145)
             ]
           },
 
@@ -612,8 +612,10 @@
           return;
         }
 
+        // 发起对账的金额口径按「可对账金额」accountableAmount 计算。
+        // availableAmount(剩余可对账金额)只作为列表/详情里的参考数据展示,不参与判定。
         const total = +list
-          .reduce((s, r) => s + (Number(r.availableAmount) || 0), 0)
+          .reduce((s, r) => s + (Number(r.accountableAmount) || 0), 0)
           .toFixed(2);
         try {
           await this.$confirm(
@@ -624,7 +626,7 @@
               : `确认按已勾选的 ${list.length} 条明细发起对账?`) +
               `<br/>往来单位:${contacts[0]}` +
               `<br/>本次对账金额:<b>¥${this.money(total)}</b>` +
-              `<br/><span style="color:#8b95a5;font-size:12px">对账金额由后端按各明细剩余可对账金额全额生成</span>`,
+              `<br/><span style="color:#8b95a5;font-size:12px">对账金额由后端按各明细可对账金额全额生成</span>`,
             '发起对账',
             {
               type: 'warning',
@@ -681,8 +683,9 @@
           this.handleReconOne(row);
         });
       },
+      /** 行底色:可对账金额为 0 时标记出来 */
       rowClassName({ row }) {
-        return Number(row.availableAmount) <= 0 ? 'pool-row-bad' : '';
+        return Number(row.accountableAmount) <= 0 ? 'pool-row-bad' : '';
       },
       /**
        * 金额类单元格取负值时标红。