Browse Source

修改退货出库

Qukatie 2 days ago
parent
commit
e163101f6a

+ 15 - 3
src/views/tirePartsMall/purchaseService/outStorage/components/viewArea.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-dialog title="查看库区" :visible.sync="dialogVisible" append-to-body width="60%" :before-close="handleClose"  v-dialog-drag>
+    <el-dialog title="查看库区" :visible.sync="dialogVisible" append-to-body width="60%" :before-close="handleClose" v-dialog-drag>
       <div style="display: flex;align-items: center;">
         <dic-select
           v-if="dialogVisible"
@@ -8,8 +8,9 @@
           v-model="query.dot"
           placeholder="批次号"
           label="dot"
-          :disabled="true"
-          :url="'/blade-sales-part/stockDesc/dotList?storageId=' + form.storageId + '&goodsId=' + query.goodsId"
+          :mockData="dots"
+          :disabled="disabled"
+          :activateCreated="false"
           :filterable="true"
           @selectChange="dicChange('dot', $event)"
         ></dic-select>
@@ -61,6 +62,7 @@ export default {
   },
   data() {
     return {
+      dots: [],
       data: [],
       dialogVisible: false,
       loading: false,
@@ -152,6 +154,7 @@ export default {
       this.form = {};
       this.query = {};
       this.index = null;
+      this.dots = [];
       this.data = [];
       this.qtyMax = 0;
       this.form = form;
@@ -159,12 +162,21 @@ export default {
       this.index = index;
       this.data = this.deepClone(row.historyList);
       this.qtyMax = row.remainingNum;
+      let list = this.deepClone(row.dots.split(","));
+      for (let item of list) {
+        this.dots.push({
+          dot: item
+        });
+      }
       this.dialogVisible = true;
       if (row.historyList.length == 0) {
         this.onLoad();
       }
     },
     submit() {
+      if (!this.query.dot) {
+        return this.$message.error("请选择批次号!");
+      }
       if (this.data.filter(item => item.quantity > 0).length == 0) {
         return this.$message.error("至少有一条本次数量不能为0");
       }

+ 3 - 0
src/views/tirePartsMall/salesService/inStorage/components/viewArea.vue

@@ -191,6 +191,9 @@ export default {
       this.dialogVisible = true;
     },
     submit() {
+      if (!this.query.dot) {
+        return this.$message.error("请选择批次号!");
+      }
       let sum = 0;
       for (let item of this.data) {
         if (!item.reservoirAreaId) {