فهرست منبع

修改盘点切换批次号计算

Qukatie 1 هفته پیش
والد
کامیت
d56d7022b5

+ 13 - 3
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/detailsPage.vue

@@ -155,6 +155,8 @@
               :precision="0"
               style="width: 100%"
               @change="calculator(row)"
+              :disabled="row.inventoryFinancing == 0"
+              :max="row.inventoryFinancing"
             />
             <span v-else>{{ row.sendNumFinancing }}</span>
           </template>
@@ -167,6 +169,8 @@
               :precision="0"
               style="width: 100%"
               @change="calculator(row)"
+              :disabled="row.inventoryHave == 0"
+              :max="row.inventoryHave"
             />
             <span v-else>{{ row.sendNumHave }}</span>
           </template>
@@ -1151,6 +1155,12 @@ export default {
       for (let item of this.picihaolist) {
         if (item.dot == value) {
           this.$set(row, "inventory", item.balanceQuantity);
+          this.$set(row, "inventoryFinancing", item.balanceQuantityFinancing);
+          this.$set(row, "inventoryHave", item.balanceQuantityHave);
+          this.$set(row, "goodsNum", 0);
+          this.$set(row, "sendNumFinancing", 0);
+          this.$set(row, "sendNumHave", 0);
+          this.$set(row, "subTotalMoney", 0);
         }
       }
     },
@@ -1329,11 +1339,11 @@ export default {
     },
     calculator(row) {
       if (row.sendNumFinancing > row.inventoryFinancing) {
-        this.$set(row, "sendNumFinancing", null);
+        this.$set(row, "sendNumFinancing", 0);
         this.$message.error("融资数量不能大于参考库存融资");
       }
       if (row.sendNumHave > row.inventoryHave) {
-        this.$set(row, "sendNumHave", null);
+        this.$set(row, "sendNumHave", 0);
         this.$message.error("自由数量不能大于参考库存自有");
       }
       row.goodsNum = Number(Number(row.sendNumFinancing) + Number(row.sendNumHave));
@@ -1341,7 +1351,7 @@ export default {
     },
     calculator2(row) {
       if (row.goodsNum > row.inventory) {
-        this.$set(row, "goodsNum", null);
+        this.$set(row, "goodsNum", 0);
         this.$message.error("调拨数量不能大于库存");
       }
       row.subTotalMoney = row.goodsNum * row.price;

+ 5 - 3
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/dialogAssembly.vue

@@ -62,6 +62,7 @@
                   @change="amountChange('sendNumFinancing', row)"
                   style="width: 100%"
                   :disabled="row.inventoryFinancing==0"
+                  :max="row.inventoryFinancing"
                 />
               </template>
               <template slot="sendNumHave" slot-scope="{ row }">
@@ -72,6 +73,7 @@
                   @change="amountChange('sendNumHave', row)"
                   style="width: 100%"
                   :disabled="row.inventoryHave==0"
+                  :max="row.inventoryHave"
                 />
               </template>
               <template slot="dot" slot-scope="{ row }">
@@ -271,13 +273,13 @@ export default {
     amountChange(name, row) {
       if (name == "goodsNum") {
         if (row.goodsNum > row.inventory) {
-          this.$set(row, "goodsNum", null);
+          this.$set(row, "goodsNum", 0);
           this.$message.error("数量不能大于库存");
         }
       }
       if (name == "sendNumFinancing") {
         if (row.sendNumFinancing > row.inventoryFinancing) {
-          this.$set(row, "sendNumFinancing", null);
+          this.$set(row, "sendNumFinancing", 0);
           // row.sendNumFinancing = null
           this.$message.error("融资数量不能大于融资库存");
         }
@@ -285,7 +287,7 @@ export default {
       }
       if (name == "sendNumHave") {
         if (row.sendNumHave > row.inventoryHave) {
-          this.$set(row, "sendNumHave", null);
+          this.$set(row, "sendNumHave", 0);
           this.$message.error("自有数量不能大于自有库存");
         }
         this.$set(row, "goodsNum", Number(row.sendNumFinancing) + Number(row.sendNumHave));

+ 2 - 2
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -140,10 +140,10 @@
                   @click="rowAdd(row)"
                   >添加商品</el-button
                 >
-                <el-button type="success" size="small" :disabled="isAddBtn" icon="el-icon-bottom" @click="excelDialogfun('名称')"
+                <el-button type="success" size="small" :disabled="isAddBtn||form.status != '录入'" icon="el-icon-bottom" @click="excelDialogfun('名称')"
                   >按名称导入
                 </el-button>
-                <el-button type="success" size="small" :disabled="isAddBtn" icon="el-icon-bottom" @click="excelDialogfun('code')"
+                <el-button type="success" size="small" :disabled="isAddBtn||form.status != '录入'" icon="el-icon-bottom" @click="excelDialogfun('code')"
                   >按Code导入
                 </el-button>
                 <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>