|
@@ -77,9 +77,9 @@
|
77
|
77
|
>搜索
|
78
|
78
|
</el-button>
|
79
|
79
|
</div>
|
80
|
|
-
|
|
80
|
+
|
81
|
81
|
<el-table :data="tableList" border style="width: 100%">
|
82
|
|
-
|
|
82
|
+
|
83
|
83
|
<el-table-column prop="drug_type" label="药品类型" width="180" align="center">
|
84
|
84
|
<template slot-scope="scope">
|
85
|
85
|
{{getDrugType(scope.row.drug_type)}}
|
|
@@ -107,15 +107,15 @@
|
107
|
107
|
</el-table-column>
|
108
|
108
|
<el-table-column prop="drug_name" label="入库数量" align="center">
|
109
|
109
|
<template slot-scope="scope">
|
110
|
|
- <span v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">{{getWarehoseInfo(scope.row.drug_warehouse_info)}}{{scope.row.max_unit}}</span>
|
|
110
|
+ <span v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">{{getWarehoseInfo(scope.row.drug_warehouse_info)}}{{scope.row.max_unit}}</span>
|
111
|
111
|
</template>
|
112
|
112
|
</el-table-column>
|
113
|
113
|
<el-table-column prop="drug_name" label="出库数量" align="center">
|
114
|
114
|
<template slot-scope="scope">
|
115
|
|
- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id ==10028 || org_id == 10243 || org_id == 10088">
|
116
|
|
- <span>
|
|
115
|
+ <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id ==10028 || org_id == 10243 || org_id == 10088 || org_id == 10245">
|
|
116
|
+ <span>
|
117
|
117
|
{{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
|
118
|
|
- </span>
|
|
118
|
+ </span>
|
119
|
119
|
</span>
|
120
|
120
|
<span v-else>{{getOutCount(scope.row.id)+getAutoCount(scope.row.id)}}{{scope.row.max_unit}}</span>
|
121
|
121
|
</template>
|
|
@@ -123,10 +123,10 @@
|
123
|
123
|
<el-table-column prop="drug_name" label="剩余库存量" align="center">
|
124
|
124
|
<template slot-scope="scope">
|
125
|
125
|
<div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
|
126
|
|
- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id == 10028 || org_id == 10243 || org_id == 10088">
|
|
126
|
+ <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245">
|
127
|
127
|
{{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
|
128
|
128
|
</span>
|
129
|
|
-
|
|
129
|
+
|
130
|
130
|
<span v-else>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span>
|
131
|
131
|
</div>
|
132
|
132
|
</template>
|
|
@@ -148,7 +148,7 @@
|
148
|
148
|
</template>
|
149
|
149
|
</el-table-column>
|
150
|
150
|
</el-table>
|
151
|
|
-
|
|
151
|
+
|
152
|
152
|
<el-pagination
|
153
|
153
|
@size-change="handleSizeChange"
|
154
|
154
|
@current-change="handleCurrentChange"
|
|
@@ -194,13 +194,13 @@ import { min } from 'moment'
|
194
|
194
|
this.getlist()
|
195
|
195
|
var drugCategory = getDictionaryDataConfig('system','drug_category')
|
196
|
196
|
this.drugCategory.push(...drugCategory)
|
197
|
|
- var drugTypeList = getDictionaryDataConfig('system','drug_type')
|
|
197
|
+ var drugTypeList = getDictionaryDataConfig('system','drug_type')
|
198
|
198
|
this.drugTypeList.push(...drugTypeList)
|
199
|
199
|
this.org_id = this.$store.getters.xt_user.org.id
|
200
|
200
|
console.log("机构ID",this.org_id)
|
201
|
201
|
this.getDrugCountList()
|
202
|
|
-
|
203
|
|
-
|
|
202
|
+
|
|
203
|
+
|
204
|
204
|
},
|
205
|
205
|
components: {
|
206
|
206
|
SettingDialog,
|
|
@@ -213,7 +213,7 @@ import { min } from 'moment'
|
213
|
213
|
{ path: '/stock/drugs/stock/query', name: '药品库存查询' }
|
214
|
214
|
],
|
215
|
215
|
keywords: '',
|
216
|
|
-
|
|
216
|
+
|
217
|
217
|
multipleSelection: [],
|
218
|
218
|
signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
|
219
|
219
|
start_time: '',
|
|
@@ -279,7 +279,7 @@ import { min } from 'moment'
|
279
|
279
|
for(let z=0;z<list[i].drug_cancel_stock_info.length;z++){
|
280
|
280
|
if(list[i].drug_cancel_stock_info[z].max_unit == list[i].max_unit){
|
281
|
281
|
list[i].drug_cancel_stock_info[z].count = list[i].drug_cancel_stock_info[z].count * list[i].min_number
|
282
|
|
- }
|
|
282
|
+ }
|
283
|
283
|
}
|
284
|
284
|
}
|
285
|
285
|
console.log("列表list232323323232323223",list)
|
|
@@ -287,7 +287,7 @@ import { min } from 'moment'
|
287
|
287
|
var total = response.data.data.total
|
288
|
288
|
this.total = total
|
289
|
289
|
this.manufacturerList = response.data.data.manufacturerList
|
290
|
|
-
|
|
290
|
+
|
291
|
291
|
}
|
292
|
292
|
})
|
293
|
293
|
},
|
|
@@ -337,7 +337,7 @@ import { min } from 'moment'
|
337
|
337
|
}
|
338
|
338
|
}
|
339
|
339
|
},
|
340
|
|
-
|
|
340
|
+
|
341
|
341
|
getSpecificationName: function(id) {
|
342
|
342
|
let name = ''
|
343
|
343
|
for (let i = 0; i < this.goodInfo.length; i++) {
|
|
@@ -373,7 +373,7 @@ import { min } from 'moment'
|
373
|
373
|
calculate: function(val) {
|
374
|
374
|
return Math.round(parseFloat(val) * 100) / 100
|
375
|
375
|
},
|
376
|
|
-
|
|
376
|
+
|
377
|
377
|
startTimeChange: function(val) {
|
378
|
378
|
window.sessionStorage.removeItem('start_time')
|
379
|
379
|
var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
|
|
@@ -381,7 +381,7 @@ import { min } from 'moment'
|
381
|
381
|
this.$message.error("开始时间不能大于结束时间");
|
382
|
382
|
this.start_time = "";
|
383
|
383
|
} else {
|
384
|
|
-
|
|
384
|
+
|
385
|
385
|
this.getlist()
|
386
|
386
|
}
|
387
|
387
|
},
|
|
@@ -392,10 +392,10 @@ import { min } from 'moment'
|
392
|
392
|
this.$message.error("结束时间不能小于开始时间");
|
393
|
393
|
this.end_time = "";
|
394
|
394
|
} else {
|
395
|
|
-
|
|
395
|
+
|
396
|
396
|
this.getlist()
|
397
|
397
|
}
|
398
|
|
-
|
|
398
|
+
|
399
|
399
|
},
|
400
|
400
|
stockInCount: function(row) {
|
401
|
401
|
let total = 0
|
|
@@ -430,7 +430,7 @@ import { min } from 'moment'
|
430
|
430
|
search: function() {
|
431
|
431
|
this.getlist()
|
432
|
432
|
this.getDrugCountList()
|
433
|
|
- },
|
|
433
|
+ },
|
434
|
434
|
setting: function() {
|
435
|
435
|
this.$refs.dialog.show()
|
436
|
436
|
},
|
|
@@ -446,13 +446,13 @@ import { min } from 'moment'
|
446
|
446
|
this.tableList[i].outCount = this.getWarehouseOutInfo(this.tableList[i].drug_warehouse_out,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
447
|
447
|
this.tableList[i].overplusCount = this.getOverFlushInfo(this.tableList[i].drug_warehouse_info,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
448
|
448
|
}
|
449
|
|
-
|
|
449
|
+
|
450
|
450
|
console.log("hhhhhhhadhfadf 列表",this.tableList)
|
451
|
451
|
import('@/vendor/Export2Excel').then(excel => {
|
452
|
452
|
const tHeader = ['序号', '药品类型', '药品名称','规格型号&单位','进货单价','厂家','入库数量','出库数量','剩余库存量']
|
453
|
453
|
const filterVal = ['index', 'drug_type_name', 'drug_name','unit','last_price','manufacturer_name','inCount','outCount','overplusCount']
|
454
|
|
-
|
455
|
|
-
|
|
454
|
+
|
|
455
|
+
|
456
|
456
|
const data = this.formatJson(filterVal, this.tableList)
|
457
|
457
|
excel.export_json_to_excel({
|
458
|
458
|
header: tHeader,
|
|
@@ -483,7 +483,7 @@ import { min } from 'moment'
|
483
|
483
|
});
|
484
|
484
|
},
|
485
|
485
|
getDrugType(id){
|
486
|
|
-
|
|
486
|
+
|
487
|
487
|
var name = ""
|
488
|
488
|
for(let i=0;i<this.drugTypeList.length;i++){
|
489
|
489
|
if(this.drugTypeList[i].id == id){
|
|
@@ -491,7 +491,7 @@ import { min } from 'moment'
|
491
|
491
|
name = this.drugTypeList[i].name
|
492
|
492
|
}
|
493
|
493
|
}
|
494
|
|
-
|
|
494
|
+
|
495
|
495
|
return name
|
496
|
496
|
},
|
497
|
497
|
getManufacturerList(id){
|
|
@@ -630,10 +630,10 @@ import { min } from 'moment'
|
630
|
630
|
min_str = total%min_number + min_unit
|
631
|
631
|
}
|
632
|
632
|
}
|
633
|
|
-
|
|
633
|
+
|
634
|
634
|
return str + min_str
|
635
|
635
|
},
|
636
|
|
-
|
|
636
|
+
|
637
|
637
|
getCountOne(drug_id){
|
638
|
638
|
var count= 0
|
639
|
639
|
for(let i=0;i<this.drugOutList.length;i++){
|
|
@@ -644,7 +644,7 @@ import { min } from 'moment'
|
644
|
644
|
return count
|
645
|
645
|
},
|
646
|
646
|
getCountTwo(drug_id,min_number,max_unit,min_unit){
|
647
|
|
-
|
|
647
|
+
|
648
|
648
|
var total_count = 0
|
649
|
649
|
var out_count = 0
|
650
|
650
|
var count = 0
|
|
@@ -658,7 +658,7 @@ import { min } from 'moment'
|
658
|
658
|
if(parseInt(count/min_number)!=0){
|
659
|
659
|
str = parseInt(count/min_number) + max_unit
|
660
|
660
|
}
|
661
|
|
-
|
|
661
|
+
|
662
|
662
|
if((count%min_number)!=0){
|
663
|
663
|
str_min = count%min_number + min_unit
|
664
|
664
|
}
|
|
@@ -683,11 +683,11 @@ import { min } from 'moment'
|
683
|
683
|
if(total == 0){
|
684
|
684
|
total = ""
|
685
|
685
|
}
|
686
|
|
-
|
|
686
|
+
|
687
|
687
|
return total
|
688
|
688
|
},
|
689
|
689
|
getOverFlushInfo(arr,max_unit,min_unit,min_number){
|
690
|
|
-
|
|
690
|
+
|
691
|
691
|
var max_str= ""
|
692
|
692
|
var min_str = ""
|
693
|
693
|
var total = 0
|
|
@@ -711,7 +711,7 @@ import { min } from 'moment'
|
711
|
711
|
if(total%min_number!=0){
|
712
|
712
|
min_str = total%min_number + min_unit
|
713
|
713
|
}
|
714
|
|
-
|
|
714
|
+
|
715
|
715
|
}
|
716
|
716
|
return max_str + min_str
|
717
|
717
|
},
|
|
@@ -724,7 +724,7 @@ import { min } from 'moment'
|
724
|
724
|
total += parseInt(arr[i].count)
|
725
|
725
|
}
|
726
|
726
|
}
|
727
|
|
-
|
|
727
|
+
|
728
|
728
|
if (total < min_number){
|
729
|
729
|
min_str = total + min_unit
|
730
|
730
|
}
|
|
@@ -739,7 +739,7 @@ import { min } from 'moment'
|
739
|
739
|
if(total%min_number!=0){
|
740
|
740
|
min_str = total%min_number + min_unit
|
741
|
741
|
}
|
742
|
|
-
|
|
742
|
+
|
743
|
743
|
}
|
744
|
744
|
return max_str + min_str
|
745
|
745
|
|
|
@@ -793,7 +793,7 @@ import { min } from 'moment'
|
793
|
793
|
return str + str_min
|
794
|
794
|
},
|
795
|
795
|
getOutFlush(info,max_unit,min_unit,min_number,cancel_info){
|
796
|
|
-
|
|
796
|
+
|
797
|
797
|
var str = ""
|
798
|
798
|
var str_min = ""
|
799
|
799
|
//总库存
|