Parcourir la source

11月14日 库存扣减更新

XMLWAN il y a 3 ans
Parent
révision
33bbfa8665

+ 12 - 0
src/xt_pages/stock/drugs/drugStockOutOrder.vue Voir le fichier

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

+ 11 - 1
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue Voir le fichier

429
         return name;
429
         return name;
430
       },
430
       },
431
        handleEdit: function(index, row) {
431
        handleEdit: function(index, row) {
432
+        if(row.supply_cancel_out_id >0){
433
+         this.$message.error("采购出库数据不能新增!")
434
+         return
435
+        } 
432
         this.unitShow = false
436
         this.unitShow = false
433
         if(this.drug_show == true){
437
         if(this.drug_show == true){
434
           this.$message.error("自动出库数据不能编辑")
438
           this.$message.error("自动出库数据不能编辑")
449
         tempObj['warehouse_info_id'] = 0
453
         tempObj['warehouse_info_id'] = 0
450
         this.recordInfo.recordData.push(tempObj)
454
         this.recordInfo.recordData.push(tempObj)
451
       }, handleDelete: function(index, row) {
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
         if(this.drug_show == true){
462
         if(this.drug_show == true){
453
-          this.$message.error("自动出库数据不能编辑")
463
+          this.$message.error("采购出库数据不能编辑")
454
           return
464
           return
455
         }
465
         }
456
         if (row.id == 0) {
466
         if (row.id == 0) {

+ 2 - 2
src/xt_pages/stock/stockInOrder.vue Voir le fichier

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

+ 2 - 3
src/xt_pages/stock/stockInOrderEdit.vue Voir le fichier

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

+ 13 - 1
src/xt_pages/stock/stockOutOrder.vue Voir le fichier

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

+ 10 - 1
src/xt_pages/stock/stockOutOrderEdit.vue Voir le fichier

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

+ 4 - 2
src/xt_pages/supply/components/editGoodReturn.vue Voir le fichier

1130
                   orderInfo[i].unitList = [{ id: 1, name: "" }];
1130
                   orderInfo[i].unitList = [{ id: 1, name: "" }];
1131
                   orderInfo[i].unitList[0].name = goodList[j].packing_unit;
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
               orderInfo[i].sum_count = orderInfo[i].count
1136
               orderInfo[i].sum_count = orderInfo[i].count
1135
               orderInfo[i].min_number = 0
1137
               orderInfo[i].min_number = 0
1136
               //orderInfo[i].count = orderInfo[i].count;
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
               orderInfo[i].max_unit =""
1141
               orderInfo[i].max_unit =""
1140
               orderInfo[i].min_unit =""
1142
               orderInfo[i].min_unit =""
1141
             }
1143
             }

+ 1 - 1
src/xt_pages/supply/goodreturn.vue Voir le fichier

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