XMLWAN 2 years ago
parent
commit
44f0b4cb52

+ 4 - 4
src/router/index.js View File

158
   dialysis,
158
   dialysis,
159
   stock,
159
   stock,
160
   drugs,
160
   drugs,
161
-  selfPreparedMedicine,  //自备药管理模块
162
-  wareHouseManage,  //仓库管理模块
163
-  DepositManagement, //押金管理模块
164
-  inventoryTransfer,    //库存调拨模块
161
+  selfPreparedMedicine, // 自备药管理模块
162
+  wareHouseManage, // 仓库管理模块
163
+  DepositManagement, // 押金管理模块
164
+  inventoryTransfer, // 库存调拨模块
165
   PatientDispensing, // 患者发药模块
165
   PatientDispensing, // 患者发药模块
166
   DrugDispensing, // 药房管理模块
166
   DrugDispensing, // 药房管理模块
167
   DispensingDetails, // 药房管理模块
167
   DispensingDetails, // 药房管理模块

+ 1 - 1
src/store/modules/globalConfig.js View File

676
         bicarbonate: 1
676
         bicarbonate: 1
677
       },
677
       },
678
       32: {
678
       32: {
679
-        id: 31,
679
+        id: 32,
680
         name: 'HDP',
680
         name: 'HDP',
681
         dialysis_duration: 1,
681
         dialysis_duration: 1,
682
         replacement_way: 1,
682
         replacement_way: 1,

+ 5 - 5
src/xt_pages/Pharmacy/DrugDispensing.vue View File

262
 import drugPrint from "./print/drugPrint.vue";
262
 import drugPrint from "./print/drugPrint.vue";
263
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
263
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
264
 import { getTodayAdviceList,getPharmacyBaseDrug,updatePharmacyBaseDrug,SaveSetting,getPharmacyConfig,getUserdDrugList } from "@/api/his/advice";
264
 import { getTodayAdviceList,getPharmacyBaseDrug,updatePharmacyBaseDrug,SaveSetting,getPharmacyConfig,getUserdDrugList } from "@/api/his/advice";
265
-import {
266
-  waitingdrug,
267
-  issueddrugs,
268
-  getpharmacycontent
269
-} from "@/api/pharmacy"
265
+// import {
266
+//   waitingdrug,
267
+//   issueddrugs,
268
+//   getpharmacycontent
269
+// } from "@/api/pharmacy"
270
 const moment = require('moment')
270
 const moment = require('moment')
271
 export default {
271
 export default {
272
   components: {
272
   components: {

+ 56 - 32
src/xt_pages/stock/detail/print.vue View File

10
         <div class="dialysis-print-order">
10
         <div class="dialysis-print-order">
11
           <div class="order-yy-name">{{orgname}}</div>
11
           <div class="order-yy-name">{{orgname}}</div>
12
           <div class="order-title" v-if="type == 1">入库单</div>
12
           <div class="order-title" v-if="type == 1">入库单</div>
13
-        
13
+
14
           <div class="order-title" v-if="type == 2">出库单</div>
14
           <div class="order-title" v-if="type == 2">出库单</div>
15
           <div class="order-title" v-if="type == 4">退库单</div>
15
           <div class="order-title" v-if="type == 4">退库单</div>
16
 
16
 
27
               <td style="line-height: 50px" width="200">规格型号</td>
27
               <td style="line-height: 50px" width="200">规格型号</td>
28
               <td style="line-height: 50px" width="80">数量</td>
28
               <td style="line-height: 50px" width="80">数量</td>
29
               <td style="line-height: 50px" width="50">单位</td>
29
               <td style="line-height: 50px" width="50">单位</td>
30
-            
30
+
31
               <td style="line-height:50px" width="80">
31
               <td style="line-height:50px" width="80">
32
-                <span v-if="type == 1">进货价</span> 
33
-                <span v-if="type == 2">出货价</span> 
34
-                <span v-if="type == 4">退库价</span> 
32
+                <span v-if="type == 1">进货价</span>
33
+                <span v-if="type == 2">出货价</span>
34
+                <span v-if="type == 4">退库价</span>
35
               </td>
35
               </td>
36
               <td style="line-height: 50px" width="80">总价</td>
36
               <td style="line-height: 50px" width="80">总价</td>
37
               <td style="line-height: 50px" width="80">备 注</td>
37
               <td style="line-height: 50px" width="80">备 注</td>
47
               <td style="line-height: 50px">
47
               <td style="line-height: 50px">
48
                 {{item.specification_name}}
48
                 {{item.specification_name}}
49
               </td>
49
               </td>
50
-             
50
+
51
               <td style="line-height: 50px">
51
               <td style="line-height: 50px">
52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
53
-                <span v-if="type == 2"> 
54
-                  <span  v-if="org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span> 
55
-                   <span  v-if="org_id == 10265 || org_id == 10215">{{getMySelfCount(item.good_id) }}</span>   
56
-                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=10285&&org_id!=9583&&org_id!=10215">{{getStockCount(item.good_id) }}</span>
53
+                <span v-if="type == 2">
54
+                  <span  v-if="org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span>
55
+                   <span  v-if="org_id == 10265 || org_id == 10215">{{getMySelfCount(item.good_id) }}</span>
56
+                   <span v-if="org_id == 10210 || org_id == 9671">{{getWarehouseOut(item.good_id)}}</span>
57
+                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=10285&&org_id!=9583&&org_id!=10215&&org_id!=10210&&org_id!=9671">{{getStockCount(item.good_id) }}</span>
57
                 </span>
58
                 </span>
58
-               
59
+
59
                 <span v-if="type == 4"> {{ item.count }}</span>
60
                 <span v-if="type == 4"> {{ item.count }}</span>
60
               </td>
61
               </td>
61
               <td style="line-height: 50px">
62
               <td style="line-height: 50px">
63
               </td>
64
               </td>
64
               <td style="line-height:50px">
65
               <td style="line-height:50px">
65
                 <span v-if="type == 1"> {{ item.price }}</span>
66
                 <span v-if="type == 1"> {{ item.price }}</span>
66
-                <span v-if="type == 2"> 
67
-                  <span v-if="org_id == 9919">{{ item.buy_price }}</span>  
67
+                <span v-if="type == 2">
68
+                  <span v-if="org_id == 9919">{{ item.buy_price }}</span>
68
                   <span v-else>
69
                   <span v-else>
69
-                    {{ item.packing_price }} 
70
-                  </span>  
70
+                    {{ item.packing_price }}
71
+                  </span>
71
                 </span>
72
                 </span>
72
                  <span v-if="type == 4"> {{ item.price }}</span>
73
                  <span v-if="type == 4"> {{ item.price }}</span>
73
               </td>
74
               </td>
77
                   <span v-if="org_id == 3907 || org_id ==9919">
78
                   <span v-if="org_id == 3907 || org_id ==9919">
78
                      {{(getStockCount(item.good_id) * item.buy_price).toFixed(2)}}
79
                      {{(getStockCount(item.good_id) * item.buy_price).toFixed(2)}}
79
                   </span>
80
                   </span>
80
-                  <span v-if="org_id == 10265 || org_id == 10215">{{(getMySelfCount(item.good_id)*item.packing_price).toFixed(2)}}</span>
81
-                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=9919&&org_id!=10215">{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
81
+                  <span v-if="org_id == 10265 || org_id == 10215 || org_id == 10188 || org_id == 10217 || org_id == 9956 || org_id == 10191 ">{{(getMySelfCount(item.good_id)*item.packing_price).toFixed(2)}}</span>
82
+                   <span v-if="org_id == 10210 || org_id == 9671 ">{{(getWarehouseOut(item.good_id)*item.packing_price).toFixed(2)}}</span>
83
+                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=9919&&org_id!=10215&&org_id!=9671 && org_id!=10188 && org_id!=10217 && org_id!= 9956 && org_id!=10191">{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
82
                 </span>
84
                 </span>
83
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
85
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
84
               </td>
86
               </td>
97
               <td style="line-height: 50px"  width="50"></td>
99
               <td style="line-height: 50px"  width="50"></td>
98
               <td style="line-height: 50px"   width="80"></td>
100
               <td style="line-height: 50px"   width="80"></td>
99
               <td style="line-height: 50px"  width="80">
101
               <td style="line-height: 50px"  width="80">
100
-                <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
102
+                <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span>
101
                 <span v-if="type == 2">
103
                 <span v-if="type == 2">
102
                   <span v-if="org_id == 3907 || org_id == 9919">{{getWareOutTotalOne().toFixed(2)}}</span>
104
                   <span v-if="org_id == 3907 || org_id == 9919">{{getWareOutTotalOne().toFixed(2)}}</span>
103
                   <span v-if="org_id == 10265 || org_id == 10215">{{getWareOutTotalSix().toFixed(2)}}</span>
105
                   <span v-if="org_id == 10265 || org_id == 10215">{{getWareOutTotalSix().toFixed(2)}}</span>
104
                   <span v-if="org_id!=3907 && org_id!=9919 && org_id!=10265 && org_id!=10215"> {{getWareOutTotal().toFixed(2)}}</span>
106
                   <span v-if="org_id!=3907 && org_id!=9919 && org_id!=10265 && org_id!=10215"> {{getWareOutTotal().toFixed(2)}}</span>
105
-                 </span> 
106
-                <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
107
+                 </span>
108
+                <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span>
107
               </td>
109
               </td>
108
               <td style="line-height: 50px" width="80">
110
               <td style="line-height: 50px" width="80">
109
-               
111
+
110
               </td>
112
               </td>
111
             </tr>
113
             </tr>
112
-          </table> 
114
+          </table>
113
 
115
 
114
           <div style="display:flex;margin-top:20px;float:right;">
116
           <div style="display:flex;margin-top:20px;float:right;">
115
             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
117
             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
165
         stockTotal:[],
167
         stockTotal:[],
166
         wareOutInfo:[],
168
         wareOutInfo:[],
167
         org_id:this.$store.getters.xt_user.org.id,
169
         org_id:this.$store.getters.xt_user.org.id,
168
-        informationList:[]
170
+        informationList:[],
171
+        wareOutList:[],
169
       }
172
       }
170
     },
173
     },
171
     methods: {
174
     methods: {
206
         })
209
         })
207
       },
210
       },
208
       calCount(stock) {
211
       calCount(stock) {
209
-      
212
+
210
         let total = 0
213
         let total = 0
211
         var array = []
214
         var array = []
212
         if (this.type == 1) {
215
         if (this.type == 1) {
306
       },
309
       },
307
 
310
 
308
      getStockCount(id){
311
      getStockCount(id){
309
-       
312
+
310
        var count = ""
313
        var count = ""
311
        for(let i=0;i<this.stockTotal.length;i++){
314
        for(let i=0;i<this.stockTotal.length;i++){
312
           if(id == this.stockTotal[i].good_id){
315
           if(id == this.stockTotal[i].good_id){
329
        for(let i=0;i<this.informationList.length;i++){
332
        for(let i=0;i<this.informationList.length;i++){
330
         for(let j=0;j<this.wareOutInfo.length;j++){
333
         for(let j=0;j<this.wareOutInfo.length;j++){
331
            if(this.informationList[i].id == this.wareOutInfo[j].good_id){
334
            if(this.informationList[i].id == this.wareOutInfo[j].good_id){
332
-             this.wareOutInfo[j].buy_price =  this.informationList[i].buy_price 
335
+             this.wareOutInfo[j].buy_price =  this.informationList[i].buy_price
333
            }
336
            }
334
         }
337
         }
335
        }
338
        }
336
-      
339
+
337
        for(let j=0;j<this.wareOutInfo.length;j++){
340
        for(let j=0;j<this.wareOutInfo.length;j++){
338
          if(id == this.wareOutInfo[j].good_id){
341
          if(id == this.wareOutInfo[j].good_id){
339
             sum += (this.wareOutInfo[j].buy_price * this.wareOutInfo[j].count).toFixed(2)
342
             sum += (this.wareOutInfo[j].buy_price * this.wareOutInfo[j].count).toFixed(2)
340
          }
343
          }
341
        }
344
        }
342
-       
345
+
343
        return sum
346
        return sum
344
-       
347
+
345
      },
348
      },
346
      getReailPrice(id){
349
      getReailPrice(id){
347
        var price = 0
350
        var price = 0
379
            this.stockDatas = list
382
            this.stockDatas = list
380
            var stockTotal = response.data.data.stockTotal
383
            var stockTotal = response.data.data.stockTotal
381
           this.stockTotal = stockTotal
384
           this.stockTotal = stockTotal
382
-           
383
-           
385
+
386
+
384
          }
387
          }
385
       })
388
       })
386
      },
389
      },
390
         if(response.data.state == 1){
393
         if(response.data.state == 1){
391
           var total =   response.data.data.total
394
           var total =   response.data.data.total
392
           var list = response.data.data.list
395
           var list = response.data.data.list
393
-          this.stockDatas = list
396
+          this.wareOutList = list
394
         }
397
         }
395
       })
398
       })
396
      },
399
      },
431
        }
434
        }
432
        return total
435
        return total
433
      },
436
      },
437
+    //  getPrintStockGood(){
438
+
439
+    //   getPrintStockGood(this.queryParams).then(response=>{
440
+    //       if(response.data.state == 1){
441
+    //         var list =  response.data.data.list
442
+    //         console.log("list23323232323232",list)
443
+    //         this.stockDatas = list
444
+
445
+    //       }
446
+    //   })
447
+    // },
448
+    getWarehouseOut(good_id){
449
+      var total = 0
450
+      for(let i=0;i<this.wareOutList.length;i++){
451
+         if(this.wareOutList[i].good_id == good_id){
452
+            total += this.wareOutList[i].count
453
+         }
454
+      }
455
+      return total
456
+    }
434
     },
457
     },
435
     created() {
458
     created() {
436
       var xtuser = this.$store.getters.xt_user
459
       var xtuser = this.$store.getters.xt_user
437
       this.orgname = xtuser.org.org_name
460
       this.orgname = xtuser.org.org_name
438
       this.goodUnit = this.$store.getters.good_unit
461
       this.goodUnit = this.$store.getters.good_unit
439
       this.getGoodDetailPrintList()
462
       this.getGoodDetailPrintList()
463
+      this.getStockDetail()
440
     }
464
     }
441
 
465
 
442
   }
466
   }

+ 32 - 5
src/xt_pages/stock/detail/stockOutDetail.vue View File

265
       tableDataList:[],
265
       tableDataList:[],
266
       storehouse_id:0,
266
       storehouse_id:0,
267
       houseList:[],
267
       houseList:[],
268
+      wareOutList:[],
268
     };
269
     };
269
   },
270
   },
270
   methods: {
271
   methods: {
391
           for(let i=0;i<response.data.data.houseList.length;i++){
392
           for(let i=0;i<response.data.data.houseList.length;i++){
392
            this.houseList.push(response.data.data.houseList[i])
393
            this.houseList.push(response.data.data.houseList[i])
393
           }
394
           }
395
+          this.wareOutList =  response.data.data.list
394
           var total = 0
396
           var total = 0
395
           for (let i = 0; i < response.data.data.list.length; i++) {
397
           for (let i = 0; i < response.data.data.list.length; i++) {
396
             this.tableData.push(response.data.data.list[i])
398
             this.tableData.push(response.data.data.list[i])
778
           this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
780
           this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
779
         }else if(this.orgId == 10215){
781
         }else if(this.orgId == 10215){
780
           this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
782
           this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
783
+        }else if(this.orgId == 10210){
784
+          this.tableOut[i].total_price = (this.getWarehouseOut(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
785
+        }else if(this.orgId == 9671){
786
+          this.tableOut[i].total_price = (this.getWarehouseOut(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
787
+        }else if(this.orgId == 9956){
788
+          this.tableOut[i].total_price = (this.getWarehouseOut(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
789
+        }else if(this.orgId == 10217){
790
+          this.tableOut[i].total_price = (this.getWarehouseOut(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
791
+        }else if(this.orgId == 10191){
792
+          this.tableOut[i].total_price = (this.getWarehouseOut(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
793
+        }else if(this.orgId == 10188){
794
+          this.tableOut[i].total_price = (this.getWarehouseOut(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
781
         }else{
795
         }else{
782
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
796
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
783
         }
797
         }
784
 
798
 
785
-        if(this.orgId  == 10265 || this.orgId ==10215 ){
799
+        if(this.orgId  == 10265 || this.orgId ==10215){
786
 
800
 
787
          this.tableOut[i].out_count = this.getMySelfCount(this.tableOut[i].good_id)
801
          this.tableOut[i].out_count = this.getMySelfCount(this.tableOut[i].good_id)
788
         }
802
         }
789
-        if(this.orgId!=10265 && this.orgId !=10215){
803
+        if(this.orgId == 10210 || this.orgId == 9671 || this.orgId == 10210 || this.orgId == 9956 || this.orgId == 10217 || this.orgId == 10188 || this.orgId == 10191){
804
+          this.tableOut[i].out_count = this.getWarehouseOut(this.tableOut[i].good_id)
805
+          console.log("out_count232233232332",this.tableOut[i].out_count)
806
+        }
807
+        if(this.orgId!=10265 && this.orgId !=10215 && this.orgId!=10210&&this.orgId!=9671){
790
           this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
808
           this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
791
         }
809
         }
792
        }
810
        }
821
           if(this.orgId == 9919){
839
           if(this.orgId == 9919){
822
              this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].GoodInfo.buy_price).toFixed(2)
840
              this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].GoodInfo.buy_price).toFixed(2)
823
              total += this.tableDataList[i].count * this.tableDataList[i].buy_price
841
              total += this.tableDataList[i].count * this.tableDataList[i].buy_price
824
-          }else{
842
+          }
843
+          if(this.orgId != 9919){
825
             this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
844
             this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
826
             total += this.tableDataList[i].count * this.tableDataList[i].price
845
             total += this.tableDataList[i].count * this.tableDataList[i].price
827
           }
846
           }
828
 
847
 
829
-
830
         }
848
         }
831
         obj.total_price = total.toFixed(2)
849
         obj.total_price = total.toFixed(2)
832
 
850
 
926
      changeHouseList(){
944
      changeHouseList(){
927
        this.houseList = []
945
        this.houseList = []
928
        this.GetCancelStock()
946
        this.GetCancelStock()
929
-     }
947
+     },
948
+     getWarehouseOut(good_id){
949
+      var total = 0
950
+      for(let i=0;i<this.wareOutList.length;i++){
951
+         if(this.wareOutList[i].good_id == good_id){
952
+            total += this.wareOutList[i].count
953
+         }
954
+      }
955
+      return total
956
+    }
930
   }
957
   }
931
 };
958
 };
932
 </script>
959
 </script>