Pārlūkot izejas kodu

feat: 对账单

liujt 2 nedēļas atpakaļ
vecāks
revīzija
c78a95b70c

+ 74 - 19
src/views/saleManage/saleOrder/accountstatement/components/accountDetailTable.vue

@@ -188,7 +188,15 @@
         batchType: '',
         batchValue: '',
         batchLabel: '',
-        columns: [
+        
+      };
+    },
+    computed: {
+      isView() {
+        return this.dialogType === 'view';
+      },
+      columns() {
+        return [
           {
             width: 60,
             label: '序号',
@@ -207,14 +215,14 @@
           {
             minWidth: 140,
             prop: 'statementSubOrderNo',
-            label: '发货单编码',
+            label: this.queryDimension == 1 ? '发货单编码' : '调拨单编码',
             align: 'center',
             showOverflowTooltip: true
           },
           {
             minWidth: 120,
             prop: 'productOperateTime',
-            label: '发货日期',
+            label: this.queryDimension == 1 ? '发货日期' : '调拨单日期',
             align: 'center',
             showOverflowTooltip: true
           },
@@ -262,7 +270,7 @@
           },
           {
             minWidth: 110,
-            prop: 'statementedCount',
+            prop: 'historicalStatementCount',
             label: '已对账数量',
             align: 'center'
           },
@@ -280,6 +288,49 @@
             align: 'center',
             slot: 'statementAmount'
           },
+          {
+            minWidth: 120,
+            prop: 'totalCount',
+            label: this.queryDimension == 1 ? '发货数量' : '调拨数量',
+            align: 'center',
+          },
+          {
+            minWidth: 120,
+            prop: 'outInCount',
+            label: '出库数量',
+            align: 'center',
+          },
+          {
+            minWidth: 120,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            align: 'center',
+          },
+          {
+            minWidth: 120,
+            prop: 'statementAmount',
+            label: '出库重量',
+            align: 'center',
+          },
+          {
+            minWidth: 120,
+            prop: 'weightUnit',
+            label: '重量单位',
+            align: 'center',
+          },
+          {
+            minWidth: 120,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+          },
+          {
+            minWidth: 140,
+            prop: 'technologyRouteName',
+            label: '工艺路线',
+            align: 'center',
+            showOverflowTooltip: true
+          },
           {
             minWidth: 120,
             prop: 'singlePrice',
@@ -294,6 +345,18 @@
             align: 'center',
             slot: 'taxRate'
           },
+          {
+            minWidth: 100,
+            prop: 'noTaxSinglePrice',
+            label: '不含税单价',
+            align: 'center',
+          },
+          {
+            minWidth: 100,
+            prop: 'totalPrice',
+            label: '合计',
+            align: 'center',
+          },
           {
             minWidth: 120,
             prop: 'discountRatio',
@@ -302,26 +365,18 @@
             slot: 'discountRatio'
           },
           {
-            minWidth: 140,
-            prop: 'processRouteName',
-            label: '工艺路线',
+            minWidth: 120,
+            prop: 'discountSinglePrice',
+            label: '折让单价',
             align: 'center',
-            showOverflowTooltip: true
           },
           {
-            minWidth: 80,
-            prop: 'action',
-            label: '操作',
+            minWidth: 120,
+            prop: 'discountTotalPrice',
+            label: '折让合计',
             align: 'center',
-            slot: 'action',
-            fixed: 'right'
-          }
+          },
         ]
-      };
-    },
-    computed: {
-      isView() {
-        return this.dialogType === 'view';
       }
     },
     watch: {

+ 8 - 8
src/views/saleManage/saleOrder/accountstatement/components/saleForm.vue

@@ -86,7 +86,7 @@
             placeholder="请选择"
           >
             <el-option
-              v-for="item in dateTypeOps"
+              v-for="item in dateTypeOp"
               :key="item.value"
               :label="item.label"
               :value="item.value"
@@ -337,21 +337,21 @@
       };
     },
     computed: {
-      dateTypeOps() {
-        return this.dataForm.queryDimension != 2
-          ? this.dateTypeOp.filter((item) => item.value != 5)
-          : this.dateTypeOp;
-      },
+      // dateTypeOps() {
+      //   return this.dataForm.queryDimension != 2
+      //     ? this.dateTypeOp.filter((item) => item.value != 5)
+      //     : this.dateTypeOp;
+      // },
       //计算未对账金额
       accountStatementPrice() {
         return this.datasource.reduce(
-          (pre, cur) => pre + +cur.amountTotalPrice,
+          (pre, cur) => pre + +cur.statementAmount,
           0
         );
       },
       //计算相关订单号
       relatedOrderNumber() {
-        return this.datasource.map((item) => item.orderNo).join(',');
+        return [...new Set(this.datasource.map((item) => item.orderNo))].join(',');
       }
     },
     methods: {