Просмотр исходного кода

订单管理、订货业务、订货订单,订单明细修改调整为一次只传一行的数据

qymljy 2 месяцев назад
Родитель
Сommit
06bc50a253

+ 3 - 3
src/HDrpManagement/orderManage/details/tabs/productlist.vue

@@ -455,7 +455,7 @@ export default {
         "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
         "sa_contractid": this.data.contacts.contactsid, //合同ID
         "type": this.data.type, //订单类型
-        "items": this.tableData
+        "items": [this.tableData[row.index]]
       })
     },
     rowChange (val,index) {
@@ -480,7 +480,7 @@ export default {
           "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
           "sa_contractid": this.data.contacts.contactsid, //合同ID
           "type": this.data.type, //订单类型
-          "items": this.tableData
+          "items": [this.tableData[val.index]]
         })
       },1000)
     },
@@ -491,7 +491,7 @@ export default {
         "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
         "sa_contractid": this.data.contacts.contactsid, //合同ID
         "type": this.data.type, //订单类型
-        "items": this.tableData
+        "items": [this.tableData[val.index]]
       })
     },
     async updateOrder (val,fn) {

+ 18 - 3
src/SDrpManagement/agentOrder/modules/productlist.vue

@@ -187,7 +187,7 @@
               v-model="scope.column.data.remarks"
               :placeholder="$t(`输入订单备注`)"
               size="mini"
-              @blur="onConfirm([scope.column.data], true, true)"
+              @blur="inputChange(scope.column.data, scope.$index)"
             ></el-input>
           </div>
           <div v-else-if="scope.column.columnname == 'cansaleqty' || scope.column.columnname == 'undeliqty' || scope.column.columnname == 'aftersalesmagqty'">
@@ -402,7 +402,7 @@ export default {
           sys_enterpriseid: this.data.sys_enterpriseid, //企业ID
           sa_contractid: this.data.contacts.contactsid, //合同ID
           type: this.data.type, //订单类型
-          items: this.tableData,
+          items: [this.tableData[val.index]],
         });
         this.$emit("qtyChange");
       }, 500);
@@ -415,7 +415,7 @@ export default {
         sys_enterpriseid: this.data.sys_enterpriseid, //企业ID
         sa_contractid: this.data.contacts.contactsid, //合同ID
         type: this.data.type, //订单类型
-        items: this.tableData,
+        items: [this.tableData[val.index]],
       });
     },
     async dateChange(row) {
@@ -433,6 +433,21 @@ export default {
         },
       });
     },
+    inputChange(row, index) {
+      this.updateOrder(
+          {
+            sa_orderid: this.data.sa_orderid, //订单ID
+            sys_enterpriseid: this.data.sys_enterpriseid, //企业ID
+            sa_contractid: this.data.contacts.contactsid, //合同ID
+            type: this.data.type, //订单类型
+            items: [this.tableData[row.index]],
+          },
+          () => {
+            console.log(row);
+            this.$set(this.tableData, index, row);
+          }
+      );
+    },
     async updateOrder(val) {
       const res = await this.$api.requested({
         id: 20221109093602,

+ 4 - 4
src/SDrpManagement/salerOrder/modules/productlist.vue

@@ -193,7 +193,7 @@
               v-model="scope.column.data.remarks"
               :placeholder="$t(`输入订单备注`)"
               size="mini"
-              @blur="onConfirm([scope.column.data], true, true)"
+              @blur="inputChange(scope.column.data, scope.$index)"
             ></el-input>
           </div>
           <div v-else-if="scope.column.columnname == 'cansaleqty' || scope.column.columnname == 'undeliqty' || scope.column.columnname == 'aftersalesmagqty'">
@@ -627,7 +627,7 @@ export default {
           sys_enterpriseid: this.data.sys_enterpriseid, //企业ID
           sa_contractid: this.data.contacts.contactsid, //合同ID
           type: this.data.type, //订单类型
-          items: this.tableData,
+          items: [this.tableData[val.index]],
         });
       }, 500);
     },
@@ -639,7 +639,7 @@ export default {
         sys_enterpriseid: this.data.sys_enterpriseid, //企业ID
         sa_contractid: this.data.contacts.contactsid, //合同ID
         type: this.data.type, //订单类型
-        items: this.tableData,
+        items: [this.tableData[val.index]],
       });
     },
     async dateChange(row) {
@@ -748,7 +748,7 @@ export default {
           sys_enterpriseid: this.data.sys_enterpriseid, //企业ID
           sa_contractid: this.data.contacts.contactsid, //合同ID
           type: this.data.type, //订单类型
-          items: this.tableData,
+          items: [this.tableData[row.index]],
         },
         () => {
           console.log(row);