Pārlūkot izejas kodu

11月14日 库存扣减更新

XMLWAN 3 gadus atpakaļ
vecāks
revīzija
33bbfa8665

+ 12 - 0
src/xt_pages/stock/drugs/drugStockOutOrder.vue Parādīt failu

@@ -639,6 +639,10 @@ export default {
639 639
     },
640 640
 
641 641
     handleDelete: function(index, row) {
642
+      if(row.supply_cancel_out_id >0){
643
+        this.$message.error("采购出库数据不能删除!")
644
+        return
645
+      }
642 646
       const ids = [];
643 647
       ids.push(row.id);
644 648
       const idStr = ids.join(",");
@@ -694,11 +698,14 @@ export default {
694 698
       this.getExportOutOrderDrugList()
695 699
     },
696 700
     batchDelete() {
701
+      console.log("232322323",this.selectedTableData)
702
+      
697 703
       if (this.selectedTableData.length <= 0) {
698 704
         this.$message.error("请选择要删除的记录");
699 705
         return;
700 706
       }
701 707
       const ids = [];
708
+      const idsOne = []
702 709
       for (let i = 0; i < this.selectedTableData.length; i++) {
703 710
         if(this.selectedTableData[i].is_sys == 1){
704 711
           this.$message.error("自动出库数据不能删除!")
@@ -706,8 +713,13 @@ export default {
706 713
         }
707 714
         if(this.selectedTableData[i].is_sys == 0){
708 715
           ids.push(this.selectedTableData[i].id);
716
+          idsOne.push(this.selectedTableData[i].supply_cancel_out_id)
709 717
         }
710 718
       }
719
+      if(idsOne.length > 0){
720
+        this.$message.error("采购出库数据不能删除!")
721
+        return 
722
+      }
711 723
       const idStr = ids.join(",");
712 724
       const params = {
713 725
         ids: idStr

+ 11 - 1
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue Parādīt failu

@@ -429,6 +429,10 @@
429 429
         return name;
430 430
       },
431 431
        handleEdit: function(index, row) {
432
+        if(row.supply_cancel_out_id >0){
433
+         this.$message.error("采购出库数据不能新增!")
434
+         return
435
+        } 
432 436
         this.unitShow = false
433 437
         if(this.drug_show == true){
434 438
           this.$message.error("自动出库数据不能编辑")
@@ -449,8 +453,14 @@
449 453
         tempObj['warehouse_info_id'] = 0
450 454
         this.recordInfo.recordData.push(tempObj)
451 455
       }, handleDelete: function(index, row) {
456
+        console.log("row323232232",row)
457
+        if(row.supply_cancel_out_id >0){
458
+         this.$message.error("采购出库数据不能删除!")
459
+         return
460
+        }
461
+       
452 462
         if(this.drug_show == true){
453
-          this.$message.error("自动出库数据不能编辑")
463
+          this.$message.error("采购出库数据不能编辑")
454 464
           return
455 465
         }
456 466
         if (row.id == 0) {

+ 2 - 2
src/xt_pages/stock/stockInOrder.vue Parādīt failu

@@ -1065,7 +1065,7 @@ export default {
1065 1065
     handleDelete: function(index, row) {
1066 1066
      
1067 1067
       if(row.supply_warehouse_id > 0){
1068
-        this.$message.error("自动生成入库单不能删除!")
1068
+        this.$message.error("采购入库单不能删除!")
1069 1069
         return false
1070 1070
       }
1071 1071
       const ids = [];
@@ -1132,7 +1132,7 @@ export default {
1132 1132
       console.log("idson23322323",idOne)
1133 1133
       for(let i=0;i<idOne.length;i++){
1134 1134
         if(idOne[i] >0){
1135
-          this.$message.error("自动入库数据不能删除!")
1135
+          this.$message.error("采购入库数据不能删除!")
1136 1136
           return false
1137 1137
         }
1138 1138
       }

+ 2 - 3
src/xt_pages/stock/stockInOrderEdit.vue Parādīt failu

@@ -494,7 +494,7 @@ export default {
494 494
     },
495 495
     handleEdit: function(index, row) {
496 496
       if(row.supply_warehouse_id > 0){
497
-        this.$message.error("自动入库数据不能新增!")
497
+        this.$message.error("采购入库数据不能新增!")
498 498
         return false
499 499
       }
500 500
       const tempObj = {};
@@ -514,9 +514,8 @@ export default {
514 514
       this.recordInfo.recordData.push(tempObj);
515 515
     },
516 516
     handleDelete: function(index, row) {
517
-      console.log("Row2332233232",row)
518 517
       if(row.supply_warehouse_id >0){
519
-        this.$message.error("自动入库数据不能删除!")
518
+        this.$message.error("采购入库数据不能删除!")
520 519
         return false
521 520
       }
522 521
       if (row.id == 0) {

+ 13 - 1
src/xt_pages/stock/stockOutOrder.vue Parādīt failu

@@ -959,6 +959,11 @@ export default {
959 959
        
960 960
     },
961 961
     handleDelete: function(index, row) {
962
+     
963
+      if(row.supply_cancel_out_id >0){
964
+        this.$message.error("采购出库数据不能删除!")
965
+        return false
966
+      }
962 967
       const ids = [];
963 968
       ids.push(row.id);
964 969
       const idStr = ids.join(",");
@@ -1018,12 +1023,14 @@ export default {
1018 1023
 
1019 1024
     },
1020 1025
     batchDelete() {
1021
-    
1026
+      console.log("this.selectedTableData",this.selectedTableData)
1027
+      
1022 1028
       if (this.selectedTableData.length <= 0) {
1023 1029
         this.$message.error("请选择要删除的记录");
1024 1030
         return;
1025 1031
       }
1026 1032
       const ids = [];
1033
+      const idOne = []
1027 1034
       for (let i = 0; i < this.selectedTableData.length; i++) {
1028 1035
         if(this.selectedTableData[i].is_sys == 1){
1029 1036
           this.$message.error("自动出库数据不能删除!")
@@ -1031,8 +1038,13 @@ export default {
1031 1038
         }
1032 1039
          if(this.selectedTableData[i].is_sys == 0){
1033 1040
            ids.push(this.selectedTableData[i].id);
1041
+           idOne.push(this.selectedTableData[i].supply_cancel_out_id)
1034 1042
          }
1035 1043
       }
1044
+      if(idOne.length >0){
1045
+        this.$message.error("采购出库数据不能删除!")
1046
+        return false
1047
+      }
1036 1048
       const idStr = ids.join(",");
1037 1049
       const params = {
1038 1050
         ids: idStr

+ 10 - 1
src/xt_pages/stock/stockOutOrderEdit.vue Parādīt failu

@@ -400,7 +400,10 @@
400 400
         return name;
401 401
       }, 
402 402
       handleEdit: function(index, row) {
403
-        console.log("hhh2322332323",this.recordInfo.recordData)
403
+       if(row.supply_cancel_out_id >0){
404
+          this.$message.error("采购出库数据不能新增!")
405
+          return 
406
+        }
404 407
         this.stockTrue = false
405 408
         if(this.stockShow == true){
406 409
          this.$message.error("自动出库数据无法编辑")
@@ -420,6 +423,12 @@
420 423
         this.recordInfo.recordData.push(tempObj)
421 424
       }, 
422 425
       handleDelete: function(index, row) {
426
+      
427
+        if(row.supply_cancel_out_id >0){
428
+          this.$message.error("采购出库数据不能删除!")
429
+          return 
430
+        }
431
+ 
423 432
         if(this.stockShow == true){
424 433
          this.$message.error("自动出库数据无法删除")
425 434
          return

+ 4 - 2
src/xt_pages/supply/components/editGoodReturn.vue Parādīt failu

@@ -1130,12 +1130,14 @@ export default {
1130 1130
                   orderInfo[i].unitList = [{ id: 1, name: "" }];
1131 1131
                   orderInfo[i].unitList[0].name = goodList[j].packing_unit;
1132 1132
                 }
1133
+                orderInfo[i].count = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1134
+                orderInfo[i].supply_total = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1133 1135
               }
1134 1136
               orderInfo[i].sum_count = orderInfo[i].count
1135 1137
               orderInfo[i].min_number = 0
1136 1138
               //orderInfo[i].count = orderInfo[i].count;
1137
-              orderInfo[i].count = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1138
-              orderInfo[i].supply_total = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1139
+            
1140
+             
1139 1141
               orderInfo[i].max_unit =""
1140 1142
               orderInfo[i].min_unit =""
1141 1143
             }

+ 1 - 1
src/xt_pages/supply/goodreturn.vue Parādīt failu

@@ -158,7 +158,7 @@
158 158
            <span v-if="scope.row.is_check == 1">已审核</span> -->
159 159
            <span v-if="scope.row.payment == 0">未退款</span>
160 160
            <span v-if="scope.row.payment > 0 && scope.row.payment< getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">部分退款</span>
161
-           <span v-if="scope.row.payment == getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">全部退款</span>
161
+           <span v-if="scope.row.payment > 0 && scope.row.payment == getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">全部退款</span>
162 162
           </template>
163 163
         </el-table-column>
164 164