Przeglądaj źródła

fix(销售订单): 修复调整单详情和添加对话框的数据绑定问题

liujt 7 miesięcy temu
rodzic
commit
fa58c59735

+ 3 - 0
src/BIZComponents/inventoryTableDetails.vue

@@ -365,6 +365,9 @@ export default {
           width: 45,
           type: 'selection',
           columnKey: 'selection',
+          selectable: (row, index) => {
+              return row.sendTotalCount && row.sendTotalCount > 0;
+          },
           align: 'center'
         },
         orderColumn,

+ 2 - 2
src/views/saleManage/saleOrder/adjustmentNote‌/components/addAdjustDialog.vue

@@ -443,8 +443,8 @@
             // this.$nextTick(() => {
               const tempdata = {
                 // ...data,
-                totalPrice: data.amount,
-                discountTotalPrice: data.discountAmount,
+                totalPrice: row.amount,
+                discountTotalPrice: row.discountAmount,
                 productList: data.originalList
               }
               this.businessId = data.id;

+ 6 - 6
src/views/saleManage/saleOrder/adjustmentNote‌/components/detailAdjustDialog.vue

@@ -366,17 +366,17 @@
       },
 
       //获取详情
-      async getDetail(id) {
-        this.businessId = id;
+      async getDetail(row) {
+        this.businessId = row?.id;
 
         this.loading = true;
-        const data = await getInfo(id);
+        const data = await getInfo(row?.id);
         this.loading = false;
         if (data) {
           const tempdata = {
             // ...data,
-            totalPrice: data.amount,
-            discountTotalPrice: data.discountAmount,
+            totalPrice: row.amount,
+            discountTotalPrice: row.discountAmount,
             productList: data.originalList
           }
           this.businessId = data.id;
@@ -393,7 +393,7 @@
       async open(type, row) {
 
         if (row && row?.id) {
-          await this.getDetail(row?.id);
+          await this.getDetail(row);
         }
 
       },