Explorar o código

Merge branch 'master' of http://git.echepei.com/zhujiawei/Warehouse_management_ui

tong %!s(int64=4) %!d(string=hai) anos
pai
achega
a04376523d

+ 5 - 31
src/views/warehouseBusiness/inStock/index.vue

@@ -820,7 +820,7 @@
           <el-button type="warning" prop="打印" @click="showEditDialog_s"
             >入库单
           </el-button>
-          <!-- 
+          <!--
           <el-button
             :disabled="browseStatus"
             type="primary"
@@ -4054,40 +4054,14 @@ export default {
               "tEnclosure",
               JSON.stringify(this.relevantAttachments)
             );
-            for (let li in this.dataListSelection) {
-              this.dataListSelection[li].fBillstatus = 30;
-            }
+            let dataSelection = JSON.parse(JSON.stringify(this.dataListSelection))
             if (!this.form.fId) {
               this.form.fId = this.fid;
             }
             disChargelist(formData).then((response) => {
-              for (let li in this.dataListSelection) {
-                for (let i in this.dataList) {
-                  let fQty =
-                    this.dataList[i].fQty === this.dataListSelection[li].fQty;
-                  let fBsdate =
-                    this.dataList[i].fBsdate ===
-                    this.dataListSelection[li].fBsdate;
-                  let fGoodsid =
-                    this.dataList[i].fGoodsid ===
-                    this.dataListSelection[li].fGoodsid;
-                  let fcntrtype =
-                    this.dataList[i].fcntrtype ===
-                    this.dataListSelection[li].fcntrtype;
-                  let fNetweight =
-                    this.dataList[i].fNetweight ===
-                    this.dataListSelection[li].fNetweight;
-                  let fGrossweight =
-                    this.dataList[i].fGrossweight ===
-                    this.dataListSelection[li].fGrossweight;
-                  if (
-                    fBsdate &&
-                    fGoodsid &&
-                    fcntrtype &&
-                    fGrossweight &&
-                    fNetweight &&
-                    fQty
-                  ) {
+              for (let dt in dataSelection) {
+                for (let li in this.dataList) {
+                  if (this.dataList[li].fId === dataSelection.fId) {
                     this.$set(this.dataList[i], "fBillstatus", 30);
                   }
                 }

+ 9 - 0
src/views/warehouseBusiness/outStock/index.vue

@@ -3351,6 +3351,8 @@ export default {
               this.$set(warehousebillsfees[fees], "fFeeUnitid", warehousebillsfees[fees].fFeeUnitid + "");
               this.warehouseDrList.push(warehousebillsfees[fees]);
             } */
+            this.dataWithdrawList = []
+            this.dataListSelection = []
             this.msgSuccess("出库成功");
             this.$refs.tableList.clearSelection();
             this.formBrowseStatus = true;
@@ -3395,6 +3397,12 @@ export default {
     },
     // 撤回入账
     withdrawClick() {
+      for (let li in this.dataWithdrawList) {
+        if (this.dataWithdrawList[li].fBillstatus < 40) {
+          this.$message.error("所选信息中存在未出库数据!");
+          return false
+        }
+      }
       let formData = new window.FormData();
       // 撤回入库
       let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
@@ -3493,6 +3501,7 @@ export default {
     // 库存明细多选
     selectinventory(selection) {
       this.printinglist = selection;
+      this.dataWithdrawList = [];
       this.dataListSelection = [];
       if (!selection || selection.length === 0) {
         return false