Browse Source

库存新加检索条件
修改数量是否相等判断

Qukatie 2 days ago
parent
commit
2e3a04a921

+ 13 - 0
src/views/tirePartsMall/inventory/index.vue

@@ -58,6 +58,12 @@
                     {{ row.balanceQuantity }}
                   </span>
                 </template>
+                <template slot-scope="{ row }" slot="sortSearch">
+                  <el-radio-group v-model="search.sort">
+                    <el-radio :label="0">库存数量</el-radio>
+                    <el-radio :label="1">商品名称</el-radio>
+                  </el-radio-group>
+                </template>
               </avue-crud>
             </el-col>
           </el-row>
@@ -344,6 +350,13 @@ export default {
               }
             ],
             searchValue: "1"
+          },
+          {
+            label: "排序",
+            prop: "sort",
+            overHidden: true,
+            search: true,
+            searchValue:0
           }
         ]
       },

+ 23 - 9
src/views/tirePartsMall/purchaseService/outStorage/components/viewArea.vue

@@ -174,16 +174,30 @@ export default {
         return this.$message.error("总数量不能超过" + this.qtyMax);
       }
       if (Number(sum) != Number(this.qtyMax)) {
-        return this.$message.error("本次数量合计必须达到:" + this.qtyMax);
-      }
-      let obj = {
-        ...this.query,
-        sendNum: sum,
-        historyList: this.data.filter(item => item.quantity > 0)
-      };
-      this.$emit("areaData", obj, this.index);
+        this.$confirm("本次总数量和出库数量不相等,是否继续出库?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {
+            ...this.query,
+            sendNum: sum,
+            historyList: this.data.filter(item => item.quantity > 0)
+          };
+          this.$emit("areaData", obj, this.index);
 
-      this.dialogVisible = false;
+          this.dialogVisible = false;
+        });
+      } else {
+        let obj = {
+          ...this.query,
+          sendNum: sum,
+          historyList: this.data.filter(item => item.quantity > 0)
+        };
+        this.$emit("areaData", obj, this.index);
+
+        this.dialogVisible = false;
+      }
     },
     //自定义列保存
     async saveColumn(ref, option, optionBack, code) {

+ 22 - 17
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/components/viewArea.vue

@@ -33,14 +33,7 @@
             placeholder="库区"
             label="cname"
             res="records"
-            :url="
-              '/blade-sales-part/reservoirarea/listZero?current=1&size=5&storageId=' +
-                form.storageId +
-                '&goodsId=' +
-                query.goodsId +
-                '&dot=' +
-                query.dot
-            "
+            :url="'/blade-sales-part/reservoirarea/listZero?current=1&size=5&storageId=' + form.storageId + '&goodsId=' + query.goodsId"
             :filterable="true"
             :remote="true"
             dataName="cname"
@@ -205,16 +198,28 @@ export default {
         return this.$message.error("总数量不能超过" + this.qtyMax);
       }
       if (Number(sum) != Number(this.qtyMax)) {
-        return this.$message.error("本次数量合计必须达到:" + this.qtyMax);
+        this.$confirm("本次总数量和入库数量不相等,是否继续入库?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {
+            ...this.query,
+            sendNum: sum,
+            historyList: this.data
+          };
+          this.$emit("areaData", obj, this.index);
+          this.dialogVisible = false;
+        });
+      } else {
+        let obj = {
+          ...this.query,
+          sendNum: sum,
+          historyList: this.data
+        };
+        this.$emit("areaData", obj, this.index);
+        this.dialogVisible = false;
       }
-      let obj = {
-        ...this.query,
-        sendNum: sum,
-        historyList: this.data
-      };
-      this.$emit("areaData", obj, this.index);
-
-      this.dialogVisible = false;
     },
     //自定义列保存
     async saveColumn(ref, option, optionBack, code) {

+ 23 - 9
src/views/tirePartsMall/salesManagement/outboundWorkOrder/components/viewArea.vue

@@ -181,16 +181,30 @@ export default {
         return this.$message.error("总数量不能超过" + this.qtyMax);
       }
       if (Number(sum) != Number(this.qtyMax)) {
-        return this.$message.error("本次数量合计必须达到:" + this.qtyMax);
-      }
-      let obj = {
-        ...this.query,
-        sendNum: sum,
-        historyList: this.data.filter(item => item.quantity > 0)
-      };
-      this.$emit("areaData", obj, this.index);
+        this.$confirm("本次总数量和出库数量不相等,是否继续出库?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {
+            ...this.query,
+            sendNum: sum,
+            historyList: this.data.filter(item => item.quantity > 0)
+          };
+          this.$emit("areaData", obj, this.index);
 
-      this.dialogVisible = false;
+          this.dialogVisible = false;
+        });
+      } else {
+        let obj = {
+          ...this.query,
+          sendNum: sum,
+          historyList: this.data.filter(item => item.quantity > 0)
+        };
+        this.$emit("areaData", obj, this.index);
+
+        this.dialogVisible = false;
+      }
     },
     //自定义列保存
     async saveColumn(ref, option, optionBack, code) {

+ 26 - 25
src/views/tirePartsMall/salesService/inStorage/components/viewArea.vue

@@ -23,6 +23,7 @@
               :disabled="disabled"
               :activateCreated="false"
               :filterable="true"
+              :allowCreate="true"
             ></dic-select>
             <el-tag type="danger" style="margin-left: 10px;">销售数量:{{ qtyMax }}</el-tag>
           </div>
@@ -33,14 +34,7 @@
             placeholder="库区"
             label="cname"
             res="records"
-            :url="
-              '/blade-sales-part/reservoirarea/listZero?current=1&size=5&storageId=' +
-                form.storageId +
-                '&goodsId=' +
-                query.goodsId +
-                '&dot=' +
-                query.dot
-            "
+            :url="'/blade-sales-part/reservoirarea/listZero?current=1&size=5&storageId=' + form.storageId + '&goodsId=' + query.goodsId"
             :filterable="true"
             :remote="true"
             dataName="cname"
@@ -51,14 +45,7 @@
           ></dic-select>
         </template>
         <template slot="quantity" slot-scope="{ row }">
-          <el-input-number
-            v-model="row.quantity"
-            size="small"
-            :controls="false"
-            style="width: 100%"
-            :disabled="disabled"
-            @change="qtyChange(row)"
-          />
+          <el-input-number v-model="row.quantity" size="small" :controls="false" style="width: 100%" :disabled="disabled" @change="qtyChange(row)" />
         </template>
         <template slot-scope="{ row, index }" slot="menu">
           <el-button icon="el-icon-delete" :disabled="disabled" size="small" type="text" @click="rowDel(row, index)">删除 </el-button>
@@ -218,16 +205,30 @@ export default {
         return this.$message.error("总数量不能超过" + this.qtyMax);
       }
       if (Number(sum) != Number(this.qtyMax)) {
-        return this.$message.error("本次数量合计必须达到:" + this.qtyMax);
-      }
-      let obj = {
-        ...this.query,
-        sendNum: sum,
-        historyList: this.data
-      };
-      this.$emit("areaData", obj, this.index);
+        this.$confirm("本次总数量和入库数量不相等,是否继续入库?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {
+            ...this.query,
+            sendNum: sum,
+            historyList: this.data
+          };
+          this.$emit("areaData", obj, this.index);
+
+          this.dialogVisible = false;
+        });
+      } else {
+        let obj = {
+          ...this.query,
+          sendNum: sum,
+          historyList: this.data
+        };
+        this.$emit("areaData", obj, this.index);
 
-      this.dialogVisible = false;
+        this.dialogVisible = false;
+      }
     },
     //自定义列保存
     async saveColumn(ref, option, optionBack, code) {