Qukatie 1 napja
szülő
commit
5056bb1c91

+ 3 - 3
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -63,18 +63,18 @@
             <!--<el-switch v-model="form.explosionProof" :disabled="disabled||editDisabled" active-text="是" inactive-text="否"-->
             <!--    active-value="1" inactive-value="0" />-->
             <!--<el-radio v-model="form.explosionProof"></el-radio>-->
-            <el-checkbox v-model="form.explosionProof" :checked="form.explosionProof == 1" :true-label="1" :false-label="0"></el-checkbox>
+            <el-checkbox v-model="form.explosionProof" :checked="form.explosionProof == 1" :true-label="1" :false-label="0" :disabled="editDisabled"></el-checkbox>
           </template>
 
           <template slot="originalFactory" slot-scope="{ disabled }">
             <!--<el-switch v-model="form.originalFactory" :disabled="disabled||editDisabled" active-text="是" inactive-text="否"-->
             <!--           active-value="1" inactive-value="0" />-->
-            <el-checkbox v-model="form.originalFactory" :checked="form.originalFactory == 1" :true-label="1" :false-label="0"></el-checkbox>
+            <el-checkbox v-model="form.originalFactory" :checked="form.originalFactory == 1" :true-label="1" :false-label="0" :disabled="editDisabled"></el-checkbox>
           </template>
           <template slot="selfRecovery" slot-scope="{ disabled }">
             <!--<el-switch v-model="form.selfRecovery" :disabled="disabled||editDisabled" active-text="是" inactive-text="否"-->
             <!--           active-value="1" inactive-value="0" />-->
-            <el-checkbox v-model="form.selfRecovery" :checked="form.selfRecovery == 1" :true-label="1" :false-label="0"></el-checkbox>
+            <el-checkbox v-model="form.selfRecovery" :checked="form.selfRecovery == 1" :true-label="1" :false-label="0" :disabled="editDisabled"></el-checkbox>
           </template>
         </avue-form>
       </trade-card>

+ 7 - 5
src/views/tirePartsMall/purchaseService/outStorage/components/viewArea.vue

@@ -162,11 +162,13 @@ 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
-        });
+     if (row.dots) {
+        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) {

+ 1 - 1
src/views/tirePartsMall/purchaseService/returns/detailsPage.vue

@@ -615,7 +615,7 @@ export default {
             width: 100
           },
           {
-            label: "实际库存",
+            label: "参考库存",
             prop: "inventory",
             width: 100,
             disabled: false,

+ 13 - 3
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/components/viewArea.vue

@@ -12,14 +12,14 @@
       >
         <template slot-scope="{ scope, row }" slot="menuLeft">
           <div style="display: flex;">
-            <el-button type="primary" size="small" @click="addRow">新增</el-button>
+            <el-button type="primary" size="small" @click="addRow" :disabled="disabled">新增</el-button>
             <dic-select
               v-if="dialogVisible"
               style="width: 300px;"
               v-model="query.dot"
               placeholder="批次号"
               label="dot"
-              :disabled="disabled || query.historyList.length||query.whether == 0"
+              :disabled="disabled || query.historyList.length || query.whether == 0"
               :url="'/blade-sales-part/stockDesc/dotList?storageId=' + form.storageId + '&goodsId=' + query.goodsId"
               :filterable="true"
               :allowCreate="true"
@@ -118,6 +118,16 @@ export default {
         if (row.id) {
           itemRemove({ ids: row.id }).then(res => {
             this.data.splice(index, 1);
+            let sum = 0;
+            for (let item of this.data) {
+              sum += Number(item.quantity);
+            }
+            let obj = {
+              ...this.query,
+              sendNum: sum,
+              historyList: this.data
+            };
+            this.$emit("areaData", obj, this.index);
             this.$message.success("操作成功!");
           });
         } else {
@@ -127,7 +137,7 @@ export default {
       });
     },
     addRow() {
-      if (!this.query.dot&&this.query.whether == 1) {
+      if (!this.query.dot && this.query.whether == 1) {
         return this.$message.error("请选择批次号!");
       }
       this.data.push({

+ 22 - 5
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/components/viewArea.vue

@@ -19,7 +19,7 @@
               v-model="query.dot"
               placeholder="批次号"
               label="dot"
-              :disabled="disabled || query.historyList.length||query.whether == 0"
+              :disabled="disabled || query.historyList.length || query.whether == 0"
               :url="'/blade-sales-part/stockDesc/dotList?storageId=' + form.storageId + '&goodsId=' + query.goodsId"
               :filterable="true"
               :allowCreate="true"
@@ -218,6 +218,23 @@ export default {
         if (row.id) {
           itemRemove({ ids: row.id }).then(res => {
             this.data.splice(index, 1);
+            let sum = 0;
+            let sendNumFinancing = 0;
+            let sendNumHave = 0;
+            for (let item of this.data) {
+              sum += Number(item.quantity);
+              sendNumFinancing += Number(item.quantityFinancing);
+              sendNumHave += Number(item.quantityHave);
+            }
+            let obj = {
+              ...this.query,
+              sendNum: sum,
+              inventory: this.qtyMax,
+              sendNumFinancing: sendNumFinancing,
+              sendNumHave: sendNumHave,
+              historyList: this.data
+            };
+            this.$emit("areaData", obj, this.index);
             this.$message.success("操作成功!");
           });
         } else {
@@ -227,7 +244,7 @@ export default {
       });
     },
     addRow() {
-      if (!this.query.dot&&this.query.whether == 1) {
+      if (!this.query.dot && this.query.whether == 1) {
         return this.$message.error("请选择批次号!");
       }
       this.data.push({
@@ -241,7 +258,7 @@ export default {
       let sendNumFinancing = 0;
       for (let item of this.data.filter(item => item.quantity > 0)) {
         sum += Number(item.quantity ? item.quantity : 0);
-        sendNumFinancing += Number(item.quantityFinancing?item.quantityFinancing:0);
+        sendNumFinancing += Number(item.quantityFinancing ? item.quantityFinancing : 0);
       }
       if (sendNumFinancing > Number(this.query.inventoryFinancing)) {
         return this.$message.error("融资数量不能超过" + this.query.inventoryFinancing);
@@ -256,8 +273,8 @@ export default {
       let sum = 0;
       let sendNumHave = 0;
       for (let item of this.data.filter(item => item.quantity > 0)) {
-        sum += Number(item.quantity?item.quantity:0);
-        sendNumHave += Number(item.quantityHave?item.quantityHave:0);
+        sum += Number(item.quantity ? item.quantity : 0);
+        sendNumHave += Number(item.quantityHave ? item.quantityHave : 0);
       }
 
       if (sendNumHave > Number(this.query.inventoryHave)) {

+ 2 - 1
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/detailsPage.vue

@@ -1137,7 +1137,8 @@ export default {
     picihaolistfun(goodsId) {
       dotList({
         storageId: this.form.storageId,
-        goodsId: goodsId
+        goodsId: goodsId,
+        whether:1
       }).then(res => {
         this.picihaolist = res.data.data;
       });

+ 9 - 7
src/views/tirePartsMall/salesService/inStorage/components/viewArea.vue

@@ -20,7 +20,7 @@
               placeholder="批次号"
               label="dot"
               :mockData="dots"
-              :disabled="disabled||query.whether == 0"
+              :disabled="disabled || query.whether == 0"
               :activateCreated="false"
               :filterable="true"
             ></dic-select>
@@ -128,7 +128,7 @@ export default {
       });
     },
     addRow() {
-      if (!this.query.dot&&this.query.whether == 1) {
+      if (!this.query.dot && this.query.whether == 1) {
         return this.$message.error("请选择批次号!");
       }
       if (this.data.length == 0) {
@@ -169,11 +169,13 @@ export default {
       this.qtyMax = 0;
       this.form = form;
       this.query = row;
-      let list = this.deepClone(row.dots.split(","));
-      for (let item of list) {
-        this.dots.push({
-          dot: item
-        });
+      if (row.dots) {
+        let list = this.deepClone(row.dots.split(","));
+        for (let item of list) {
+          this.dots.push({
+            dot: item
+          });
+        }
       }
       this.index = index;
       this.data = this.deepClone(row.historyList);

+ 1 - 1
src/views/tirePartsMall/salesService/returns/detailsPage.vue

@@ -622,7 +622,7 @@ export default {
             width: 100
           },
           {
-            label: "实际库存",
+            label: "参考库存",
             prop: "inventory",
             width: 100,
             disabled: false,