|
@@ -71,28 +71,52 @@
|
71
|
71
|
</div>
|
72
|
72
|
</div> -->
|
73
|
73
|
<el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
|
74
|
|
- <el-table-column align="center" prop="dialysis_no" label="药品名称">
|
|
74
|
+
|
|
75
|
+ <el-table-column align="center" prop="dialysis_no" label="药品编号">
|
|
76
|
+ <template slot-scope="scope">
|
|
77
|
+ {{ scope.row.drug_id }}
|
|
78
|
+ </template>
|
|
79
|
+ </el-table-column>
|
|
80
|
+ <el-table-column align="center" prop="dialysis_no" label="药品名称">
|
75
|
81
|
<template slot-scope="scope">
|
76
|
|
- {{ scope.row.advice_name }}
|
|
82
|
+ <span v-if="scope.row.drug_id >0">
|
|
83
|
+ {{ scope.row.advice_name }}
|
|
84
|
+ </span>
|
|
85
|
+ <span v-if="scope.row.drug_id ==0" style="color: red;">
|
|
86
|
+ {{ scope.row.advice_name }}
|
|
87
|
+ </span>
|
77
|
88
|
</template>
|
78
|
89
|
</el-table-column>
|
79
|
90
|
<el-table-column align="center" prop="name" label="规格名称">
|
80
|
91
|
<template slot-scope="scope">{{ scope.row.specification_name }}</template>
|
81
|
92
|
</el-table-column>
|
|
93
|
+
|
|
94
|
+ <el-table-column align="center" prop="name" label="自备药入库数量">
|
|
95
|
+ <template slot-scope="scope">
|
|
96
|
+ {{ getCountInfo(scope.row.drug_id) }}
|
|
97
|
+ </template>
|
|
98
|
+ </el-table-column>
|
82
|
99
|
|
83
|
100
|
<el-table-column align="center" prop="name" label="开药数量">
|
84
|
101
|
<template slot-scope="scope">
|
85
|
102
|
{{getTotal(scope.row.child)}}
|
86
|
103
|
</template>
|
87
|
104
|
</el-table-column>
|
|
105
|
+
|
|
106
|
+ <el-table-column align="center" prop="name" label="剩余数量">
|
|
107
|
+ <template slot-scope="scope">
|
|
108
|
+ {{ getCountInfo(scope.row.drug_id) - getTotal(scope.row.child)}}
|
|
109
|
+ </template>
|
|
110
|
+ </el-table-column>
|
88
|
111
|
<el-table-column align="center" prop="dialysis_no" label="单位">
|
89
|
112
|
<template slot-scope="scope">{{scope.row.prescribing_number_unit}}</template>
|
90
|
113
|
</el-table-column>
|
91
|
114
|
|
92
|
115
|
|
93
|
|
- <el-table-column align="center" prop="name" label="操作">
|
|
116
|
+ <el-table-column align="center" prop="name" label="操作" width="300">
|
94
|
117
|
<template slot-scope="scope">
|
95
|
|
- <el-button size="mini" type="primary" @click="toDetail(scope.row.advice_name,scope.row.patient_id)">明细</el-button>
|
|
118
|
+ <el-button size="mini" type="primary" @click="getSelfDrugWarhouseInfo(scope.row.drug_id,scope.row.patient_id)">入库明细</el-button>
|
|
119
|
+ <el-button size="mini" type="primary" @click="toDetail(scope.row.advice_name,scope.row.patient_id)">使用明细</el-button>
|
96
|
120
|
</template>
|
97
|
121
|
</el-table-column>
|
98
|
122
|
</el-table>
|
|
@@ -132,6 +156,36 @@
|
132
|
156
|
<el-button type="primary" @click="adviceDialogVisible = false">确 定</el-button>
|
133
|
157
|
</span>
|
134
|
158
|
</el-dialog>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+ <el-dialog
|
|
162
|
+ title="入库详情"
|
|
163
|
+ :visible.sync="drugInfoDialogVisible"
|
|
164
|
+ width="50%">
|
|
165
|
+ <span>
|
|
166
|
+ <el-table :data="drugWarehouseInfo" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
|
|
167
|
+
|
|
168
|
+ <el-table-column align="center" prop="name" label="入库时间">
|
|
169
|
+ <template slot-scope="scope">{{getTime(scope.row.ctime)}}</template>
|
|
170
|
+ </el-table-column>
|
|
171
|
+
|
|
172
|
+ <el-table-column align="center" prop="name" label="入库数量">
|
|
173
|
+ <template slot-scope="scope">
|
|
174
|
+ {{scope.row.warehousing_count}}
|
|
175
|
+ </template>
|
|
176
|
+ </el-table-column>
|
|
177
|
+ <el-table-column align="center" prop="dialysis_no" label="单位">
|
|
178
|
+ <template slot-scope="scope">{{scope.row.max_unit}}</template>
|
|
179
|
+ </el-table-column>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+ </el-table>
|
|
183
|
+ </span>
|
|
184
|
+ <span slot="footer" class="dialog-footer">
|
|
185
|
+ <el-button @click="drugInfoDialogVisible = false">取 消</el-button>
|
|
186
|
+ <el-button type="primary" @click="drugInfoDialogVisible = false">确 定</el-button>
|
|
187
|
+ </span>
|
|
188
|
+ </el-dialog>
|
135
|
189
|
</div>
|
136
|
190
|
</template>
|
137
|
191
|
|
|
@@ -141,7 +195,7 @@
|
141
|
195
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
142
|
196
|
const moment = require('moment')
|
143
|
197
|
import { PostSearch } from '@/api/patient'
|
144
|
|
-import { getCurrentPatient,saveRadio,getPatientAdviceList,DeleteDrugNameById,getDrugSet,getPatientDetail,getPatientAdviceListDetail} from "@/api/drug/drug"
|
|
198
|
+import { getCurrentPatient,saveRadio,getPatientAdviceList,DeleteDrugNameById,getDrugSet,getPatientDetail,getPatientAdviceListDetail,getSelfDrugWarhouseInfo} from "@/api/drug/drug"
|
145
|
199
|
import { TimeSelect } from "element-ui";
|
146
|
200
|
import { uParseTime } from '@/utils/tools'
|
147
|
201
|
export default {
|
|
@@ -172,7 +226,10 @@ export default {
|
172
|
226
|
outStocklist:[],
|
173
|
227
|
outList:[],
|
174
|
228
|
tableList:[],
|
175
|
|
- adviceDialogVisible:false
|
|
229
|
+ adviceDialogVisible:false,
|
|
230
|
+ drugInfo:[],
|
|
231
|
+ drugWarehouseInfo:[],
|
|
232
|
+ drugInfoDialogVisible:false
|
176
|
233
|
}
|
177
|
234
|
},
|
178
|
235
|
methods:{
|
|
@@ -294,6 +351,12 @@ export default {
|
294
|
351
|
}
|
295
|
352
|
this.tableData = []
|
296
|
353
|
this.tableData = arr
|
|
354
|
+
|
|
355
|
+ var drugInfo = response.data.data.drugInfo
|
|
356
|
+
|
|
357
|
+ this.drugInfo = drugInfo
|
|
358
|
+
|
|
359
|
+ console.log("drugInfo============",drugInfo)
|
297
|
360
|
}
|
298
|
361
|
|
299
|
362
|
}
|
|
@@ -406,7 +469,43 @@ export default {
|
406
|
469
|
}else {
|
407
|
470
|
return uParseTime(val, '{y}-{m}-{d}')
|
408
|
471
|
}
|
409
|
|
- },
|
|
472
|
+ },
|
|
473
|
+ getCountInfo(drug_id){
|
|
474
|
+ var count = 0
|
|
475
|
+ var arr = []
|
|
476
|
+ for(let i=0;i<this.drugInfo.length;i++){
|
|
477
|
+ if(drug_id == this.drugInfo[i].drug_id){
|
|
478
|
+ arr.push(this.drugInfo[i])
|
|
479
|
+ }
|
|
480
|
+ }
|
|
481
|
+ if(arr!=null && arr.length>0){
|
|
482
|
+ for(let i =0;i<arr.length;i++){
|
|
483
|
+ count+=arr[i].warehousing_count
|
|
484
|
+ }
|
|
485
|
+ }
|
|
486
|
+ if (count > 0) {
|
|
487
|
+ return count
|
|
488
|
+ }else{
|
|
489
|
+ return ""
|
|
490
|
+ }
|
|
491
|
+ },
|
|
492
|
+ getSelfDrugWarhouseInfo(drug_id,patient_id){
|
|
493
|
+ var params = {
|
|
494
|
+ drug_id:drug_id,
|
|
495
|
+ patient_id:patient_id
|
|
496
|
+ }
|
|
497
|
+ getSelfDrugWarhouseInfo(params).then(response=>{
|
|
498
|
+
|
|
499
|
+ if(response.data.state ==1){
|
|
500
|
+
|
|
501
|
+ var drugWarehouseInfo = response.data.data.drugInfo
|
|
502
|
+
|
|
503
|
+ this.drugWarehouseInfo = drugWarehouseInfo
|
|
504
|
+ this.drugInfoDialogVisible = true
|
|
505
|
+
|
|
506
|
+ }
|
|
507
|
+ })
|
|
508
|
+ }
|
410
|
509
|
|
411
|
510
|
},
|
412
|
511
|
created(){
|