XMLWAN vor 3 Jahren
Ursprung
Commit
e0cdcea228

+ 1 - 1
src/xt_pages/stock/cancelStockOrder.vue Datei anzeigen

626
       for(let i=0;i<this.exportList.length;i++){
626
       for(let i=0;i<this.exportList.length;i++){
627
         this.exportList[i].total_price = this.exportList[i].count * this.exportList[i].price
627
         this.exportList[i].total_price = this.exportList[i].count * this.exportList[i].price
628
         this.exportList[i].good_name = this.exportList[i].GoodInfo.good_name
628
         this.exportList[i].good_name = this.exportList[i].GoodInfo.good_name
629
-        this.exportList[i].unit = this.exportList[i].GoodInfo.specification_name + "/" +this.exportList[i].packing_unit
629
+        this.exportList[i].unit = this.exportList[i].GoodInfo.specification_name + "/" +this.exportList[i].GoodInfo.packing_unit
630
         if(this.exportList[i].dealer == 0){
630
         if(this.exportList[i].dealer == 0){
631
           this.exportList[i].dealer = ""
631
           this.exportList[i].dealer = ""
632
         }
632
         }

+ 3 - 3
src/xt_pages/stock/cancelStockOrderPrint.vue Datei anzeigen

29
               <td style="line-height: 50px" width="80">总金额</td>
29
               <td style="line-height: 50px" width="80">总金额</td>
30
             </tr>
30
             </tr>
31
 
31
 
32
-            <tr v-for="(item,i) in it.CancelStockInfo" :key="i">
32
+            <tr v-for="(item,i) in it.XtCancelStockInfo" :key="i">
33
               <td style="line-height: 50px">
33
               <td style="line-height: 50px">
34
                 <span>{{item.GoodInfo.good_name}}</span>
34
                 <span>{{item.GoodInfo.good_name}}</span>
35
               </td>
35
               </td>
314
       },
314
       },
315
 
315
 
316
       getCancelStockOrderPrint(id){
316
       getCancelStockOrderPrint(id){
317
-        console.log("23232322332",id)
317
+       
318
         var params = {
318
         var params = {
319
             id:id
319
             id:id
320
         }
320
         }
330
         var total = 0
330
         var total = 0
331
         var arr = []
331
         var arr = []
332
         for(let i=0;i<this.tableList.length;i++){
332
         for(let i=0;i<this.tableList.length;i++){
333
-          arr.push(...this.tableList[i].CancelStockInfo)
333
+          arr.push(...this.tableList[i].XtCancelStockInfo)
334
         } 
334
         } 
335
         console.log("arr23223",arr)
335
         console.log("arr23223",arr)
336
         for(let i=0;i<arr.length;i++){
336
         for(let i=0;i<arr.length;i++){

+ 25 - 10
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue Datei anzeigen

212
                     v-for="(item,index) in numberList"
212
                     v-for="(item,index) in numberList"
213
                     :key="index"
213
                     :key="index"
214
                     :label="item.batch_number"
214
                     :label="item.batch_number"
215
-                    :value="item.batch_number">
215
+                    :value="item.id">
216
                   </el-option>
216
                   </el-option>
217
               </el-select>
217
               </el-select>
218
               </el-form-item>
218
               </el-form-item>
498
       tempObj["product_date"] = ""
498
       tempObj["product_date"] = ""
499
       tempObj["expiry_date"] = ""
499
       tempObj["expiry_date"] = ""
500
       tempObj["batch_number"] = ""
500
       tempObj["batch_number"] = ""
501
+      tempObj["batch_number_id"] = ""
501
       this.recordInfo.recordData.push(tempObj);
502
       this.recordInfo.recordData.push(tempObj);
502
     },
503
     },
503
     handleDelete: function(index, row) {
504
     handleDelete: function(index, row) {
595
             this.$message.success("请添加退库商品");
596
             this.$message.success("请添加退库商品");
596
             return;
597
             return;
597
           }
598
           }
598
-
599
+          for(let i=0;i<this.recordInfo.recordData.length;i++){
600
+             for(let j=0;j<this.numberList.length;j++){
601
+                if(this.recordInfo.recordData[i].batch_number == this.numberList[j].id){
602
+                   this.recordInfo.recordData[i].batch_number = this.numberList[j].batch_number
603
+                   this.recordInfo.recordData[i].batch_number_id = this.numberList[j].id
604
+                }
605
+             }
606
+          }
599
           const params = {
607
           const params = {
600
             cancelStock: this.recordInfo.recordData
608
             cancelStock: this.recordInfo.recordData
601
           };
609
           };
610
+          console.log("params2222",params)
602
           postDrugCancelStock(
611
           postDrugCancelStock(
603
             params,
612
             params,
604
             this.return_time,
613
             this.return_time,
610
               this.$message.error(response.data.msg);
619
               this.$message.error(response.data.msg);
611
               return false;
620
               return false;
612
             } else {
621
             } else {
613
-              this.$notify({
614
-                title: "成功",
615
-                message: "退库成功",
616
-                type: "success",
617
-                duration: 2000
618
-              });
619
-              this.recordInfo.recordData = [];
620
-              this.$router.back(-1);
622
+              if(response.data.data.msg == 1){
623
+                this.$notify({
624
+                  title: "成功",
625
+                  message: "退库成功",
626
+                  type: "success",
627
+                  duration: 2000
628
+                });
629
+                this.recordInfo.recordData = [];
630
+                this.$router.back(-1);
631
+              }
632
+              if(response.data.data.msg == 2){
633
+                this.$message.error("退库数量大于入库数量")
634
+              }
621
             }
635
             }
622
           });
636
           });
623
         } else {
637
         } else {
737
     tempObj["product_date"] = ""
751
     tempObj["product_date"] = ""
738
     tempObj["expiry_date"] = ""
752
     tempObj["expiry_date"] = ""
739
     tempObj["batch_number"] = ""
753
     tempObj["batch_number"] = ""
754
+    tempObj["batch_number_id"] = ""
740
     this.unitList =  getDataConfig('hemodialysis','units')
755
     this.unitList =  getDataConfig('hemodialysis','units')
741
     console.log("单位",this.unitList)
756
     console.log("单位",this.unitList)
742
     this.recordInfo.recordData.push(tempObj);
757
     this.recordInfo.recordData.push(tempObj);

+ 1 - 1
src/xt_pages/stock/drugs/drugStockOutOrder.vue Datei anzeigen

1172
           this.exportList[i].unit = this.exportList[i].dose + this.exportList[i].dose_unit + "*" + this.exportList[i].min_number + this.exportList[i].min_unit + "/"+this.exportList[i].max_unit
1172
           this.exportList[i].unit = this.exportList[i].dose + this.exportList[i].dose_unit + "*" + this.exportList[i].min_number + this.exportList[i].min_unit + "/"+this.exportList[i].max_unit
1173
 
1173
 
1174
           this.exportList[i].total_price = (this.exportList[i].count * this.exportList[i].price).toFixed(2)
1174
           this.exportList[i].total_price = (this.exportList[i].count * this.exportList[i].price).toFixed(2)
1175
-          this.exportList[i].expire_date  = this.getTime(this.exportList[i].expiry_date,"{y}-{h}-{d}")
1175
+          this.exportList[i].expiry_date  = this.getTime(this.exportList[i].expiry_date,"{y}-{h}-{d}")
1176
            this.exportList[i].product_date = this.getTime(this.exportList[i].product_date,"{y}-{h}-{d}")
1176
            this.exportList[i].product_date = this.getTime(this.exportList[i].product_date,"{y}-{h}-{d}")
1177
           for(let j=0;j<this.manufacturerList.length;j++){
1177
           for(let j=0;j<this.manufacturerList.length;j++){
1178
             if(this.exportList[i].manufacturer == this.manufacturerList[j].id){
1178
             if(this.exportList[i].manufacturer == this.manufacturerList[j].id){

+ 19 - 2
src/xt_pages/stock/drugs/query.vue Datei anzeigen

121
              {{getCount(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
121
              {{getCount(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
122
            </template>
122
            </template>
123
         </el-table-column>
123
         </el-table-column>
124
+        <el-table-column prop="drug_name" label="退库数量" align="center">
125
+           <template slot-scope="scope">
126
+             {{getCancelCount(scope.row.drug_id)}}
127
+           </template>
128
+        </el-table-column>
124
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
129
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
125
            <template slot-scope="scope">
130
            <template slot-scope="scope">
126
              <span v-if="getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)!=''">{{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span>
131
              <span v-if="getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)!=''">{{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span>
246
         drug_type:0,
251
         drug_type:0,
247
         minCount:[],
252
         minCount:[],
248
         drugOutList:[],
253
         drugOutList:[],
249
-        
254
+        cancelCountList:[],
250
       }
255
       }
251
     },
256
     },
252
     methods: {
257
     methods: {
571
             var minCount = response.data.data.minCount
576
             var minCount = response.data.data.minCount
572
             console.log("minCount",minCount)
577
             console.log("minCount",minCount)
573
             this.minCount = minCount
578
             this.minCount = minCount
579
+            var cancelCountList =  response.data.data.cancelCountList
580
+            console.log("退库数据",cancelCountList)
581
+            this.cancelCountList = cancelCountList
574
             var info = response.data.data.info
582
             var info = response.data.data.info
575
             for(let i=0;i<info.length;i++){
583
             for(let i=0;i<info.length;i++){
576
               if(info[i].count_unit == info[i].max_unit){
584
               if(info[i].count_unit == info[i].max_unit){
668
 
676
 
669
        console.log("str0000000",str,str_min)
677
        console.log("str0000000",str,str_min)
670
        return str+str_min
678
        return str+str_min
671
-     }
679
+     },
680
+      getCancelCount(id){
681
+        var count= 0
682
+        for(let i=0;i<this.cancelCountList.length;i++){
683
+          if(id == this.cancelCountList[i].drug_id){
684
+            count = this.cancelCountList[i].count
685
+          }
686
+        }
687
+        return count
688
+      },
672
     }
689
     }
673
   }
690
   }
674
 </script>
691
 </script>

+ 5 - 7
src/xt_pages/stock/stockFlow.vue Datei anzeigen

71
            <template slot-scope="scope">
71
            <template slot-scope="scope">
72
             <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
72
             <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
73
             <span v-if="scope.row.consumable_type == 2">{{scope.row.warehouse_out_order_number}}</span>  
73
             <span v-if="scope.row.consumable_type == 2">{{scope.row.warehouse_out_order_number}}</span>  
74
+            <span v-if="scope.row.consumable_type == 3">{{scope.row.warehouse_out_order_number}}</span>  
74
            </template>
75
            </template>
75
         </el-table-column>
76
         </el-table-column>
76
         <el-table-column prop="drug_name" label="操作日期" align="center">
77
         <el-table-column prop="drug_name" label="操作日期" align="center">
391
      },
392
      },
392
      changeDrug(val){
393
      changeDrug(val){
393
        this.tableList= []
394
        this.tableList= []
394
-       if(val == 4 || val == 0){
395
-        this.getlist()
396
-       }
397
-       if(val == 2 || val == 3 || val == 0){
398
-        this.getStockOutList()
399
-       }
395
+       this.stock_type = val
396
+       this.getStockFlow()
400
      },
397
      },
401
      getStockCount(id){
398
      getStockCount(id){
402
       var stock_count = 0
399
       var stock_count = 0
415
           good_id:this.$route.query.id,
412
           good_id:this.$route.query.id,
416
           start_time:this.start_time,
413
           start_time:this.start_time,
417
           end_time:this.end_time,
414
           end_time:this.end_time,
418
-          is_sys:this.stockType 
415
+          is_sys:this.stock_type 
419
         } 
416
         } 
417
+        
420
        getStockFlow(params).then(response=>{
418
        getStockFlow(params).then(response=>{
421
           if(response.data.state == 1){
419
           if(response.data.state == 1){
422
             var list =  response.data.data.list
420
             var list =  response.data.data.list

+ 28 - 3
src/xt_pages/stock/stockPrint.vue Datei anzeigen

39
                                    <td>{{item.price}}</td>
39
                                    <td>{{item.price}}</td>
40
                                    <td>{{getManufacture(item.manufacturer)}}</td>
40
                                    <td>{{getManufacture(item.manufacturer)}}</td>
41
                                    <td>{{getInCount(item.good_id)}}</td>
41
                                    <td>{{getInCount(item.good_id)}}</td>
42
-                                   <td><span>{{getOutCount(item.good_id) + getAutoCount(item.good_id)}}</span></td> 
43
-                                   <td>{{getInCount(item.good_id)- getOutCount(item.good_id) - getAutoCount(item.good_id)}}</td>
42
+                                   <!-- <td><span>{{getOutCount(item.good_id) + getAutoCount(item.good_id)}}</span></td>  -->
43
+                                   <td><span>{{getInCount(item.good_id) - getStockCount(item.good_id)}}{{item.packing_unit}}</span></td>
44
+                                   <!-- <td>{{getInCount(item.good_id)- getOutCount(item.good_id) - getAutoCount(item.good_id)}}</td> -->
45
+                                   <!-- <td>{{getCancelCount(item.good_id)}}{{item .packing_unit}}</td> -->
46
+                                   <td> {{getStockCount(item.good_id)}} {{item.packing_unit}} </td>
44
                                 </tr>
47
                                 </tr>
45
                             </tbody>
48
                             </tbody>
46
                         </table>
49
                         </table>
87
           countList:[],
90
           countList:[],
88
           outCountList:[],
91
           outCountList:[],
89
           autoCountList:[],
92
           autoCountList:[],
93
+          cancelCountList:[],
90
         }
94
         }
91
     },
95
     },
92
     methods:{
96
     methods:{
197
            var autoCount = response.data.data.autoCount
201
            var autoCount = response.data.data.autoCount
198
            console.log("autoCount",autoCount)
202
            console.log("autoCount",autoCount)
199
            this.autoCountList = autoCount
203
            this.autoCountList = autoCount
204
+           var totalCount = response.data.data.totalCount
205
+           console.log("totalcount",totalCount)
206
+           this.cancelCountList = totalCount
200
          }
207
          }
201
       })
208
       })
202
     },
209
     },
226
           }
233
           }
227
         }
234
         }
228
         return count
235
         return count
229
-      }
236
+      },
237
+      getCancelCount(id){
238
+        var count = 0
239
+        for(let i=0;i<this.cancelCountList.length;i++){
240
+          if(id == this.cancelCountList[i].good_id){
241
+              count = this.cancelCountList[i].count
242
+          }
243
+        }
244
+        return count
245
+     },
246
+    getStockCount(id){
247
+     var stock_count = 0
248
+     for(let i=0;i<this.countList.length;i++){
249
+       if(id == this.countList[i].good_id){
250
+         stock_count = this.countList[i].stock_count
251
+       }
252
+     }
253
+     return stock_count
254
+     }
230
     },
255
     },
231
     created(){
256
     created(){
232
       var starttime =  this.$route.query.start_time
257
       var starttime =  this.$route.query.start_time

+ 4 - 2
src/xt_pages/stock/stockQuery.vue Datei anzeigen

414
            this.tableList[i].unit = this.tableList[i].specification_name + "/" + this.tableList[i].packing_unit
414
            this.tableList[i].unit = this.tableList[i].specification_name + "/" + this.tableList[i].packing_unit
415
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
415
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
416
            this.tableList[i].inCount =  this.getInCount(this.tableList[i].good_id)
416
            this.tableList[i].inCount =  this.getInCount(this.tableList[i].good_id)
417
-           this.tableList[i].outCount = this.getOutCount(this.tableList[i].good_id) + this.getAutoCount(this.tableList[i].good_id)
418
-           this.tableList[i].overplus =this.getInCount(this.tableList[i].good_id)- this.getOutCount(this.tableList[i].good_id) - this.getAutoCount(this.tableList[i].good_id)
417
+          //  this.tableList[i].outCount = this.getOutCount(this.tableList[i].good_id) + this.getAutoCount(this.tableList[i].good_id)
418
+          //  this.tableList[i].overplus =this.getInCount(this.tableList[i].good_id)- this.getOutCount(this.tableList[i].good_id) - this.getAutoCount(this.tableList[i].good_id)
419
+          this.tableList[i].outCount =  this.getInCount(this.tableList[i].good_id) - this.getStockCount(this.tableList[i].good_id)
420
+          this.tableList[i].overplus = this.getStockCount(this.tableList[i].good_id)
419
          }
421
          }
420
          console.log("table",this.tableList)
422
          console.log("table",this.tableList)
421
          const data = this.formatJson(filterVal, this.tableList)
423
          const data = this.formatJson(filterVal, this.tableList)