Browse Source

调拨修改操作流程

Qukatie 4 days ago
parent
commit
2ba52831e3

+ 30 - 7
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/components/viewArea.vue

@@ -27,14 +27,30 @@
             <el-tag type="danger" style="margin-left: 10px;">入库数量:{{ qtyMax }}</el-tag>
           </div>
         </template>
+        <template slot="reservoirAreaName" slot-scope="{ row }">
+          <dic-select
+            v-model="row.reservoirAreaName"
+            placeholder="库区"
+            label="cname"
+            res="records"
+            :url="'/blade-sales-part/reservoirarea/list?current=1&size=5&storageId=' + form.storageId"
+            :filterable="true"
+            :remote="true"
+            dataName="cname"
+            :disabled="disabled"
+            @selectChange="rowDicChange('reservoirAreaName', $event, row)"
+            :slotRight="true"
+            rightLabel="balanceQuantity"
+          ></dic-select>
+        </template>
         <template slot="callInReservoirAreaName" slot-scope="{ row }">
           <dic-select
-            :key="callInStorageId"
+            :key="form.callInStorageId"
             v-model="row.callInReservoirAreaName"
             placeholder="库区"
             label="cname"
             res="records"
-            :url="'/blade-sales-part/reservoirarea/list?current=1&size=5&storageId=' + callInStorageId"
+            :url="'/blade-sales-part/reservoirarea/list?current=1&size=5&storageId=' + form.callInStorageId"
             :filterable="true"
             :remote="true"
             dataName="cname"
@@ -91,7 +107,6 @@ export default {
   },
   data() {
     return {
-      callInStorageId: null,
       data: [],
       dialogVisible: false,
       loading: false,
@@ -151,6 +166,16 @@ export default {
   async created() {},
   methods: {
     rowDicChange(name, row, el) {
+      if (name == "reservoirAreaName") {
+        if (row) {
+          el.reservoirAreaId = row.id;
+          el.balanceQuantity = row.balanceQuantity;
+        } else {
+          el.reservoirAreaId = null;
+          el.reservoirAreaName = null;
+          el.balanceQuantity = null;
+        }
+      }
       if (name == "callInReservoirAreaName") {
         if (row) {
           el.callInReservoirAreaId = row.id;
@@ -210,13 +235,11 @@ export default {
       this.index = null;
       this.data = [];
       this.qtyMax = 0;
-      this.callInStorageId = null;
       this.form = form;
       this.query = row;
       this.index = index;
       this.data = this.deepClone(row.historyList);
       this.qtyMax = row.inventory;
-      this.callInStorageId = form.callInStorageId;
       this.dialogVisible = true;
     },
     submit() {
@@ -231,8 +254,8 @@ export default {
           return this.$message.error("本次数量不能为0");
         }
         sum += Number(item.quantity);
-        sendNumFinancing += Number(item.sendNumFinancing);
-        sendNumHave += Number(item.sendNumHave);
+        sendNumFinancing += Number(item.quantityFinancing);
+        sendNumHave += Number(item.quantityHave);
       }
       for (let item of this.data.filter(item => item.quantity > 0)) {
         if (this.data.filter(item => item.quantity > 0)[0].dot != item.dot) {