|
@@ -1,6 +1,7 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="prescriptionTable">
|
3
|
|
- <el-table v-if="activeType == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
|
|
3
|
+ <el-table v-if="activeType == 1" :data="prescription.advices" border style="width: 99%;"
|
|
4
|
+ :row-style="{ color: '#303133' }"
|
4
|
5
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
|
5
|
6
|
<el-table-column align="center" prop="day" width="70" label="序号">
|
6
|
7
|
<template slot-scope="scope">
|
|
@@ -9,15 +10,27 @@
|
9
|
10
|
</div>
|
10
|
11
|
</template>
|
11
|
12
|
</el-table-column>
|
|
13
|
+
|
|
14
|
+
|
12
|
15
|
<el-table-column align="center" prop="drug_name" label="名称">
|
13
|
|
- <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
|
|
16
|
+ <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
|
|
17
|
+ </template>
|
14
|
18
|
</el-table-column>
|
15
|
19
|
|
16
|
|
- <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
|
|
20
|
+
|
|
21
|
+ <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
|
17
|
22
|
<template slot-scope="scope">
|
18
|
23
|
<div style="display:flex;align-items:center;">
|
19
|
|
- <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:65%;"></el-input>
|
20
|
|
- <div>{{scope.row.single_dose_unit}}</div>
|
|
24
|
+ <el-input v-model="scope.row.single_dose" @input="getAllChange(scope)"
|
|
25
|
+ style="width:50%;"></el-input>
|
|
26
|
+ <!-- <div>{{scope.row.single_dose_unit}}</div> -->
|
|
27
|
+ <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
|
|
28
|
+ @change="getAllChange(scope)">
|
|
29
|
+ <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
|
|
30
|
+ <el-option :label="scope.row.drug.dose_unit"
|
|
31
|
+ v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit"
|
|
32
|
+ :value="scope.row.drug.dose_unit"></el-option>
|
|
33
|
+ </el-select>
|
21
|
34
|
</div>
|
22
|
35
|
</template>
|
23
|
36
|
</el-table-column>
|
|
@@ -25,51 +38,71 @@
|
25
|
38
|
<template slot-scope="scope">
|
26
|
39
|
<el-select v-model="scope.row.delivery_way" placeholder="请选择">
|
27
|
40
|
<el-option
|
28
|
|
- v-for="(item,index) in drugways"
|
29
|
|
- :key="index"
|
30
|
|
- :label="item.name"
|
31
|
|
- :value="item.name">
|
|
41
|
+ v-for="(item,index) in drugways"
|
|
42
|
+ :key="index"
|
|
43
|
+ :label="item.name"
|
|
44
|
+ :value="item.name">
|
32
|
45
|
</el-option>
|
33
|
46
|
</el-select>
|
34
|
47
|
</template>
|
35
|
48
|
</el-table-column>
|
36
|
49
|
<el-table-column align="center" prop="execution_frequency" width="100" label="频率">
|
37
|
50
|
<template slot-scope="scope">
|
38
|
|
- <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
|
|
51
|
+ <el-select v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChange(scope)">
|
39
|
52
|
<el-option
|
40
|
|
- v-for="item,index in efs"
|
41
|
|
- :key="index"
|
42
|
|
- :label="item.name"
|
43
|
|
- :value="item.name">
|
|
53
|
+ v-for="item,index in efs"
|
|
54
|
+ :key="index"
|
|
55
|
+ :label="item.name"
|
|
56
|
+ :value="item.name">
|
44
|
57
|
</el-option>
|
45
|
58
|
</el-select>
|
46
|
59
|
</template>
|
47
|
60
|
</el-table-column>
|
48
|
61
|
|
49
|
62
|
|
50
|
|
- <el-table-column align="center" prop="day" width="50" label="天数">
|
|
63
|
+ <el-table-column align="center" prop="day" width="70" label="天数">
|
51
|
64
|
<template slot-scope="scope">
|
52
|
|
- <el-input v-model="scope.row.day" @input="getDay(scope)" placeholder=""></el-input>
|
53
|
|
- <div>{{'天'}}</div>
|
54
|
|
-
|
|
65
|
+ <div style="display:flex;align-items:center;">
|
|
66
|
+ <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
|
|
67
|
+ {{'天'}}
|
|
68
|
+ </div>
|
55
|
69
|
</template>
|
56
|
70
|
</el-table-column>
|
57
|
71
|
|
58
|
|
- <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
|
|
72
|
+ <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
|
59
|
73
|
<template slot-scope="scope">
|
60
|
74
|
<div style="display:flex;align-items:center;">
|
61
|
|
- <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
|
62
|
|
- <div> {{scope.row.prescribing_number_unit}}</div>
|
|
75
|
+ <el-input v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
|
|
76
|
+ style="width:50%" placeholder=""></el-input>
|
|
77
|
+ <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
|
|
78
|
+ <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
|
|
79
|
+ @change="getPrescribingNumberUnit(scope)">
|
|
80
|
+ <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
|
|
81
|
+ <el-option :label="scope.row.drug.max_unit"
|
|
82
|
+ v-if="scope.row.drug.min_unit != scope.row.drug.max_unit"
|
|
83
|
+ :value="scope.row.drug.max_unit"></el-option>
|
|
84
|
+ </el-select>
|
63
|
85
|
</div>
|
64
|
86
|
</template>
|
65
|
87
|
</el-table-column>
|
66
|
|
- <el-table-column align="center" prop="retail_price" width="60" label="单价">
|
|
88
|
+ <el-table-column align="center" prop="retail_price" width="80" label="单价">
|
67
|
89
|
<template slot-scope="scope">
|
68
|
|
- <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
|
69
|
|
- <div>{{'元'}}</div>
|
|
90
|
+ <div style="display:flex;align-items:center;">
|
|
91
|
+ <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
|
|
92
|
+ <div>{{'元'}}</div>
|
|
93
|
+ </div>
|
70
|
94
|
|
71
|
95
|
</template>
|
72
|
96
|
</el-table-column>
|
|
97
|
+ <el-table-column align="center" prop="hosp_appr_flag" width="100" label="医院审批标志">
|
|
98
|
+ <template slot-scope="scope">
|
|
99
|
+ <el-select v-model="scope.row.hosp_appr_flag" placeholder="请选择">
|
|
100
|
+ <el-option label="审批通过" value="1"></el-option>
|
|
101
|
+ <el-option label="无须审批" value="3"></el-option>
|
|
102
|
+ <el-option label="审批不通过" value="2"></el-option>
|
|
103
|
+ </el-select>
|
|
104
|
+ </template>
|
|
105
|
+ </el-table-column>
|
73
|
106
|
<el-table-column align="center" prop="remark" width="50" label="备注">
|
74
|
107
|
<template slot-scope="scope">
|
75
|
108
|
<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
|
|
@@ -81,19 +114,27 @@
|
81
|
114
|
</template>
|
82
|
115
|
</el-table-column>
|
83
|
116
|
</el-table>
|
84
|
|
- <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
|
|
117
|
+
|
|
118
|
+ <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;"
|
|
119
|
+ :row-style="{ color: '#303133' }"
|
85
|
120
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
|
86
|
121
|
<el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
|
87
|
122
|
<el-table-column align="center" prop="project_name" label="名称">
|
88
|
|
- <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
|
|
123
|
+ <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
|
|
124
|
+ </template>
|
89
|
125
|
</el-table-column>
|
90
|
126
|
<el-table-column align="center" prop="statistical_classification" width="100" label="组">
|
91
|
|
- <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
|
|
127
|
+ <template slot-scope="scope">{{scope.row.type ==
|
|
128
|
+ 2?getGroup(scope.row.statistical_classification):'耗材'}}
|
|
129
|
+ </template>
|
92
|
130
|
</el-table-column>
|
93
|
131
|
<el-table-column align="center" prop="single_dose" width="80" label="单次用量">
|
94
|
132
|
<template slot-scope="scope">
|
95
|
|
- <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
|
96
|
|
- <div>{{scope.row.unit}}</div>
|
|
133
|
+ <div style="display:flex;align-items:center;">
|
|
134
|
+ <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)"
|
|
135
|
+ placeholder=""></el-input>
|
|
136
|
+ <div>{{scope.row.unit}}</div>
|
|
137
|
+ </div>
|
97
|
138
|
|
98
|
139
|
</template>
|
99
|
140
|
</el-table-column>
|
|
@@ -110,13 +151,15 @@
|
110
|
151
|
</el-table-column>
|
111
|
152
|
<el-table-column align="center" prop="execution_frequency" width="80" label="频率">
|
112
|
153
|
<template slot-scope="scope">
|
113
|
|
- <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
|
|
154
|
+ <el-input v-model="scope.row.execution_frequency" @input="getProjectSingleDose(scope)"
|
|
155
|
+ placeholder=""></el-input>
|
114
|
156
|
</template>
|
115
|
157
|
</el-table-column>
|
116
|
158
|
<el-table-column align="center" prop="number_days" width="70" label="天数">
|
117
|
159
|
<template slot-scope="scope">
|
118
|
160
|
<div style="display:flex;align-items:center;">
|
119
|
|
- <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)" placeholder=""></el-input>
|
|
161
|
+ <el-input v-model="scope.row.number_days" @input="getProjectSingleDose(scope)"
|
|
162
|
+ placeholder=""></el-input>
|
120
|
163
|
<div>{{'天'}}</div>
|
121
|
164
|
</div>
|
122
|
165
|
</template>
|
|
@@ -130,10 +173,12 @@
|
130
|
173
|
</div>
|
131
|
174
|
</template>
|
132
|
175
|
</el-table-column>
|
133
|
|
- <el-table-column align="center" prop="name" width="50" label="单价">
|
|
176
|
+ <el-table-column align="center" prop="name" width="70" label="单价">
|
134
|
177
|
<template slot-scope="scope">
|
135
|
|
- <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
|
136
|
|
- <div>{{'元'}}</div>
|
|
178
|
+ <div style="display:flex;align-items:center;">
|
|
179
|
+ <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
|
|
180
|
+ <div>{{'元'}}</div>
|
|
181
|
+ </div>
|
137
|
182
|
|
138
|
183
|
</template>
|
139
|
184
|
</el-table-column>
|
|
@@ -161,35 +206,34 @@
|
161
|
206
|
</div>
|
162
|
207
|
|
163
|
208
|
|
164
|
|
-
|
165
|
209
|
</div>
|
166
|
210
|
</template>
|
167
|
211
|
|
168
|
212
|
<script>
|
169
|
|
- import { getDictionaryDataConfig} from "@/utils/data";
|
170
|
|
- import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
|
|
213
|
+ import { getDictionaryDataConfig } from '@/utils/data'
|
|
214
|
+ import { delHisAddition, delHisAdvice, delHisProject, getInitData } from '@/api/his/his'
|
171
|
215
|
|
172
|
216
|
export default {
|
173
|
217
|
props: {
|
174
|
218
|
preDrugs: Array,
|
175
|
219
|
activeType: Number,
|
176
|
|
- addtions_charge:Array,
|
177
|
|
- prescription:{
|
178
|
|
- type:Object,
|
179
|
|
- default: function () {
|
|
220
|
+ addtions_charge: Array,
|
|
221
|
+ prescription: {
|
|
222
|
+ type: Object,
|
|
223
|
+ default: function() {
|
180
|
224
|
return {
|
181
|
|
- name:"",
|
182
|
|
- advices:[],
|
183
|
|
- project:[],
|
184
|
|
- drugways:[],
|
185
|
|
- efs:[],
|
186
|
|
- };
|
|
225
|
+ name: '',
|
|
226
|
+ advices: [],
|
|
227
|
+ project: [],
|
|
228
|
+ drugways: [],
|
|
229
|
+ efs: []
|
|
230
|
+ }
|
187
|
231
|
}
|
188
|
|
- },
|
|
232
|
+ }
|
189
|
233
|
},
|
190
|
234
|
data() {
|
191
|
235
|
return {
|
192
|
|
- advices:[],
|
|
236
|
+ advices: [],
|
193
|
237
|
tableData: [],
|
194
|
238
|
newoptions: [{
|
195
|
239
|
value: '1',
|
|
@@ -209,128 +253,126 @@
|
209
|
253
|
}],
|
210
|
254
|
value: '1',
|
211
|
255
|
input: 1,
|
|
256
|
+ efs: [],
|
|
257
|
+ drugways: []
|
212
|
258
|
}
|
213
|
259
|
},
|
214
|
260
|
|
215
|
|
- methods:{
|
216
|
|
- createFilter(queryString) {
|
217
|
|
- return (restaurant) => {
|
218
|
|
- return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
|
219
|
|
- }
|
220
|
|
- },
|
221
|
|
- querySearch2(queryString, cb) {
|
222
|
|
- var restaurants = this.getDictionaryDataConfig("system","project_use");
|
223
|
|
- restaurants.map(item => {
|
224
|
|
- item.value = item.name
|
225
|
|
- });
|
226
|
|
- var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
227
|
|
- // 调用 callback 返回建议列表的数据
|
228
|
|
- cb(results)
|
229
|
|
- },
|
230
|
|
- delAddition(index, addition){
|
231
|
|
- if(this.prescription.order_status == 2){
|
232
|
|
- this.$message.error('该处方已经结算,无法删除');
|
233
|
|
- return
|
234
|
|
- }
|
235
|
|
- this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
|
236
|
|
- confirmButtonText: "确 定",
|
237
|
|
- cancelButtonText: "取 消",
|
238
|
|
- type: "warning"
|
239
|
|
- }).then(() => {
|
240
|
|
- this.$nextTick(function(){
|
241
|
|
- if(addition.id == 0){
|
242
|
|
- this.prescription.addition.splice(index, 1)
|
243
|
|
- }else{
|
244
|
|
- let params = {
|
245
|
|
- 'id': addition.id,
|
246
|
|
- };
|
247
|
|
- delHisAddition(params).then(response => {
|
248
|
|
- if (response.data.state == 0) {
|
249
|
|
- this.$message.error(response.data.msg);
|
250
|
|
- return false
|
251
|
|
- } else {
|
252
|
|
- var temp2 = this.deepClone(this.prescription.addition);
|
253
|
|
- temp2.splice(index, 1);
|
254
|
|
- this.prescription.addition = temp2;
|
255
|
|
- this.$message.success(response.data.data.msg)
|
256
|
|
- }
|
257
|
|
- })
|
258
|
|
- }
|
259
|
|
- });
|
260
|
|
-
|
261
|
|
- })
|
262
|
|
- .catch(() => {});
|
263
|
|
-
|
264
|
|
- },
|
265
|
|
- getInitData(){
|
|
261
|
+ methods: {
|
|
262
|
+ createFilter(queryString) {
|
|
263
|
+ return (restaurant) => {
|
|
264
|
+ return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
|
|
265
|
+ }
|
|
266
|
+ },
|
|
267
|
+ querySearch2(queryString, cb) {
|
|
268
|
+ var restaurants = this.getDictionaryDataConfig('system', 'project_use')
|
|
269
|
+ restaurants.map(item => {
|
|
270
|
+ item.value = item.name
|
|
271
|
+ })
|
|
272
|
+ var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
|
|
273
|
+ // 调用 callback 返回建议列表的数据
|
|
274
|
+ cb(results)
|
|
275
|
+ },
|
|
276
|
+ delAddition(index, addition) {
|
|
277
|
+ if (this.prescription.order_status == 2) {
|
|
278
|
+ this.$message.error('该处方已经结算,无法删除')
|
|
279
|
+ return
|
|
280
|
+ }
|
|
281
|
+ this.$confirm('附加费删除后不可恢复,是否确认删除', '删除', {
|
|
282
|
+ confirmButtonText: '确 定',
|
|
283
|
+ cancelButtonText: '取 消',
|
|
284
|
+ type: 'warning'
|
|
285
|
+ }).then(() => {
|
|
286
|
+ this.$nextTick(function() {
|
|
287
|
+ if (addition.id == 0) {
|
|
288
|
+ this.prescription.addition.splice(index, 1)
|
|
289
|
+ } else {
|
|
290
|
+ let params = {
|
|
291
|
+ 'id': addition.id
|
|
292
|
+ }
|
|
293
|
+ delHisAddition(params).then(response => {
|
|
294
|
+ if (response.data.state == 0) {
|
|
295
|
+ this.$message.error(response.data.msg)
|
|
296
|
+ return false
|
|
297
|
+ } else {
|
|
298
|
+ var temp2 = this.deepClone(this.prescription.addition)
|
|
299
|
+ temp2.splice(index, 1)
|
|
300
|
+ this.prescription.addition = temp2
|
|
301
|
+ this.$message.success(response.data.data.msg)
|
|
302
|
+ }
|
|
303
|
+ })
|
|
304
|
+ }
|
|
305
|
+ })
|
|
306
|
+
|
|
307
|
+ })
|
|
308
|
+ .catch(() => {
|
|
309
|
+ })
|
|
310
|
+
|
|
311
|
+ },
|
|
312
|
+ getInitData() {
|
266
|
313
|
getInitData().then(response => {
|
267
|
314
|
if (response.data.state == 0) {
|
268
|
|
- this.$message.error(response.data.msg);
|
|
315
|
+ this.$message.error(response.data.msg)
|
269
|
316
|
return false
|
270
|
317
|
} else {
|
271
|
|
- this.drugways = response.data.data.drugways;
|
|
318
|
+ this.drugways = response.data.data.drugways
|
272
|
319
|
this.efs = response.data.data.efs
|
273
|
320
|
}
|
274
|
321
|
})
|
275
|
322
|
|
276
|
|
- },deleteDrug:function(index, row){
|
277
|
|
- if(this.prescription.order_status == 2){
|
278
|
|
- this.$message.error('该处方已经结算,无法删除');
|
279
|
|
- return
|
280
|
|
- }
|
281
|
|
- this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
|
282
|
|
- confirmButtonText: "确 定",
|
283
|
|
- cancelButtonText: "取 消",
|
284
|
|
- type: "warning"
|
285
|
|
- }).then(() => {
|
286
|
|
- this.$nextTick(function(){
|
287
|
|
- if(row.advice_id == 0){
|
288
|
|
- this.prescription.advices.splice(index, 1)
|
289
|
|
- }else{
|
290
|
|
- let params = {
|
291
|
|
- 'id': row.advice_id,
|
292
|
|
- };
|
293
|
|
- delHisAdvice(params).then(response => {
|
294
|
|
- if (response.data.state == 0) {
|
295
|
|
- this.$message.error(response.data.msg);
|
296
|
|
- return false
|
297
|
|
- } else {
|
298
|
|
- var temp2 = this.deepClone(this.prescription.advices);
|
299
|
|
- temp2.splice(index, 1);
|
300
|
|
- this.prescription.advices = temp2;
|
301
|
|
- this.$message.success(response.data.data.msg)
|
302
|
|
- }
|
303
|
|
- })
|
304
|
|
-
|
305
|
|
-
|
306
|
|
- }
|
307
|
|
-
|
308
|
|
- });
|
309
|
|
-
|
310
|
|
-
|
311
|
|
- })
|
312
|
|
- .catch(() => {});
|
313
|
|
-
|
314
|
|
-
|
315
|
|
-
|
316
|
|
-
|
317
|
|
-
|
318
|
|
- },deepClone(source) {
|
319
|
|
- if (!source && typeof source !== 'object') {
|
320
|
|
- throw new Error('error arguments', 'shallowClone')
|
321
|
|
- }
|
322
|
|
- const targetObj = source.constructor === Array ? [] : {};
|
323
|
|
- Object.keys(source).forEach((keys) => {
|
324
|
|
- if (source[keys] && typeof source[keys] === 'object') {
|
325
|
|
- targetObj[keys] = this.deepClone(source[keys])
|
326
|
|
- } else {
|
327
|
|
- targetObj[keys] = source[keys]
|
328
|
|
- }
|
329
|
|
- });
|
330
|
|
- return targetObj
|
331
|
|
- },
|
332
|
|
-
|
333
|
|
- setNewData:function(data){
|
|
323
|
+ }, deleteDrug: function(index, row) {
|
|
324
|
+ if (this.prescription.order_status == 2) {
|
|
325
|
+ this.$message.error('该处方已经结算,无法删除')
|
|
326
|
+ return
|
|
327
|
+ }
|
|
328
|
+ this.$confirm('药品删除后不可恢复,是否确认删除', '删除', {
|
|
329
|
+ confirmButtonText: '确 定',
|
|
330
|
+ cancelButtonText: '取 消',
|
|
331
|
+ type: 'warning'
|
|
332
|
+ }).then(() => {
|
|
333
|
+ this.$nextTick(function() {
|
|
334
|
+ if (row.advice_id == 0) {
|
|
335
|
+ this.prescription.advices.splice(index, 1)
|
|
336
|
+ } else {
|
|
337
|
+ let params = {
|
|
338
|
+ 'id': row.advice_id
|
|
339
|
+ }
|
|
340
|
+ delHisAdvice(params).then(response => {
|
|
341
|
+ if (response.data.state == 0) {
|
|
342
|
+ this.$message.error(response.data.msg)
|
|
343
|
+ return false
|
|
344
|
+ } else {
|
|
345
|
+ var temp2 = this.deepClone(this.prescription.advices)
|
|
346
|
+ temp2.splice(index, 1)
|
|
347
|
+ this.prescription.advices = temp2
|
|
348
|
+ this.$message.success(response.data.data.msg)
|
|
349
|
+ }
|
|
350
|
+ })
|
|
351
|
+
|
|
352
|
+ }
|
|
353
|
+
|
|
354
|
+ })
|
|
355
|
+
|
|
356
|
+ })
|
|
357
|
+ .catch(() => {
|
|
358
|
+ })
|
|
359
|
+
|
|
360
|
+ }, deepClone(source) {
|
|
361
|
+ if (!source && typeof source !== 'object') {
|
|
362
|
+ throw new Error('error arguments', 'shallowClone')
|
|
363
|
+ }
|
|
364
|
+ const targetObj = source.constructor === Array ? [] : {}
|
|
365
|
+ Object.keys(source).forEach((keys) => {
|
|
366
|
+ if (source[keys] && typeof source[keys] === 'object') {
|
|
367
|
+ targetObj[keys] = this.deepClone(source[keys])
|
|
368
|
+ } else {
|
|
369
|
+ targetObj[keys] = source[keys]
|
|
370
|
+ }
|
|
371
|
+ })
|
|
372
|
+ return targetObj
|
|
373
|
+ },
|
|
374
|
+
|
|
375
|
+ setNewData: function(data) {
|
334
|
376
|
this.prescription = data
|
335
|
377
|
|
336
|
378
|
// this.prescription.advices = data.advices
|
|
@@ -338,41 +380,41 @@
|
338
|
380
|
getDictionaryDataConfig(module, filed_name) {
|
339
|
381
|
return getDictionaryDataConfig(module, filed_name)
|
340
|
382
|
},
|
341
|
|
- getGroup(id){
|
342
|
|
- var name = "";
|
343
|
|
- var statistics_category = getDictionaryDataConfig('system','statistics_category');
|
344
|
|
- console.log("2235",statistics_category);
|
345
|
|
- for(let i=0;i<statistics_category.length;i++){
|
346
|
|
- if(id == statistics_category[i].id){
|
347
|
|
- name = statistics_category[i].name
|
348
|
|
- }
|
|
383
|
+ getGroup(id) {
|
|
384
|
+ var name = ''
|
|
385
|
+ var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
|
|
386
|
+ console.log('2235', statistics_category)
|
|
387
|
+ for (let i = 0; i < statistics_category.length; i++) {
|
|
388
|
+ if (id == statistics_category[i].id) {
|
|
389
|
+ name = statistics_category[i].name
|
349
|
390
|
}
|
350
|
|
- return name
|
|
391
|
+ }
|
|
392
|
+ return name
|
351
|
393
|
},
|
352
|
|
- deleteProject(row,i){
|
353
|
|
- if(this.prescription.order_status == 2){
|
354
|
|
- this.$message.error('该处方已经结算,无法删除');
|
|
394
|
+ deleteProject(row, i) {
|
|
395
|
+ if (this.prescription.order_status == 2) {
|
|
396
|
+ this.$message.error('该处方已经结算,无法删除')
|
355
|
397
|
return
|
356
|
398
|
}
|
357
|
|
- this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
|
358
|
|
- confirmButtonText: "确 定",
|
359
|
|
- cancelButtonText: "取 消",
|
360
|
|
- type: "warning"
|
|
399
|
+ this.$confirm('项目删除后不可恢复,是否确认删除', '删除', {
|
|
400
|
+ confirmButtonText: '确 定',
|
|
401
|
+ cancelButtonText: '取 消',
|
|
402
|
+ type: 'warning'
|
361
|
403
|
}).then(() => {
|
362
|
|
- if(row.id == 0){
|
|
404
|
+ if (row.id == 0) {
|
363
|
405
|
this.prescription.project.splice(i, 1)
|
364
|
406
|
|
365
|
|
- }else{
|
|
407
|
+ } else {
|
366
|
408
|
let params = {
|
367
|
|
- 'id': row.id,
|
368
|
|
- };
|
|
409
|
+ 'id': row.id
|
|
410
|
+ }
|
369
|
411
|
delHisProject(params).then(response => {
|
370
|
412
|
if (response.data.state == 0) {
|
371
|
|
- this.$message.error(response.data.msg);
|
|
413
|
+ this.$message.error(response.data.msg)
|
372
|
414
|
return false
|
373
|
415
|
} else {
|
374
|
|
- for (let i = 0; i < this.prescription.project.length; i++){
|
375
|
|
- if(this.prescription.project[i].id == row.id){
|
|
416
|
+ for (let i = 0; i < this.prescription.project.length; i++) {
|
|
417
|
+ if (this.prescription.project[i].id == row.id) {
|
376
|
418
|
this.prescription.project.splice(i, 1)
|
377
|
419
|
}
|
378
|
420
|
}
|
|
@@ -381,39 +423,146 @@
|
381
|
423
|
})
|
382
|
424
|
}
|
383
|
425
|
})
|
384
|
|
- .catch(() => {});
|
|
426
|
+ .catch(() => {
|
|
427
|
+ })
|
385
|
428
|
|
386
|
429
|
},
|
387
|
|
- getSingleDose(scope){
|
388
|
|
- this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
|
|
430
|
+ getAllChange(scope) {
|
|
431
|
+ if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
|
|
432
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
|
433
|
+ console.log(1)
|
|
434
|
+ scope.row.prescribing_number = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)
|
|
435
|
+ } else {
|
|
436
|
+ console.log(12)
|
|
437
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1)) * (scope.row.day ? scope.row.day : 1) / scope.row.drug.min_number)
|
|
438
|
+ }
|
|
439
|
+ } else {
|
|
440
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
|
441
|
+ console.log(123)
|
|
442
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose)
|
|
443
|
+ } else {
|
|
444
|
+ console.log(1234)
|
|
445
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose / scope.row.drug.min_number)
|
|
446
|
+ }
|
|
447
|
+ }
|
|
448
|
+ if (scope.row.prescribing_number == 0) {
|
|
449
|
+ scope.row.prescribing_number = 1
|
|
450
|
+ }
|
|
451
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
|
452
|
+ // scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
|
|
453
|
+ if (scope.row.prescribing_number > scope.row.drug.total) {
|
|
454
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
455
|
+ }
|
|
456
|
+ } else {
|
|
457
|
+ if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
|
|
458
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
459
|
+ }
|
|
460
|
+ // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
|
|
461
|
+ }
|
|
462
|
+
|
389
|
463
|
},
|
390
|
|
- getDay(scope){
|
391
|
|
- this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
|
|
464
|
+ getPrescribingNumberUnit(scope) {
|
|
465
|
+
|
|
466
|
+ // console.log('scope',scope)
|
|
467
|
+ // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
|
|
468
|
+ // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
|
469
|
+ // scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
|
|
470
|
+ // }else{
|
|
471
|
+ // scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
|
|
472
|
+ // }
|
|
473
|
+ // }else{
|
|
474
|
+ // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
|
475
|
+ // scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
|
|
476
|
+ // }else{
|
|
477
|
+ // scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose / scope.row.drug.min_number)
|
|
478
|
+ // }
|
|
479
|
+ // }
|
|
480
|
+ // if(scope.row.prescribing_number == 0){
|
|
481
|
+ // scope.row.prescribing_number = 1
|
|
482
|
+ // }
|
|
483
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
|
484
|
+ scope.row.retail_price = scope.row.drug.min_price
|
|
485
|
+ if (scope.row.prescribing_number > scope.row.drug.total) {
|
|
486
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
487
|
+ }
|
|
488
|
+ } else {
|
|
489
|
+ if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
|
|
490
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
491
|
+ }
|
|
492
|
+ scope.row.retail_price = scope.row.drug.retail_price
|
|
493
|
+ }
|
392
|
494
|
},
|
393
|
|
- getProjectSingleDose(scope){
|
394
|
|
- this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
|
|
495
|
+ changePrescribingNumber(scope) {
|
|
496
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
|
497
|
+ if (parseInt(scope.row.prescribing_number) > scope.row.drug.total) {
|
|
498
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
499
|
+ }
|
|
500
|
+ } else {
|
|
501
|
+ if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
|
|
502
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
503
|
+ }
|
|
504
|
+ }
|
|
505
|
+ },
|
|
506
|
+ getProjectSingleDose(scope) {
|
|
507
|
+ this.prescription.project[scope.$index].total = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.number_days ? scope.row.number_days : 1)
|
|
508
|
+ if (this.prescription.project[scope.$index].total == 0) {
|
|
509
|
+ this.prescription.project[scope.$index].total = 1
|
|
510
|
+ }
|
395
|
511
|
},
|
396
|
|
- getProjectDay(scope){
|
|
512
|
+ getProjectDay(scope) {
|
397
|
513
|
this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
|
|
514
|
+ if (this.prescription.project[scope.$index].total == 0) {
|
|
515
|
+ this.prescription.project[scope.$index].total = 1
|
|
516
|
+ }
|
|
517
|
+
|
|
518
|
+ },
|
|
519
|
+ getNum(execution_frequency) {
|
|
520
|
+ let arr = [
|
|
521
|
+ { name: '立即执行', count: 1 },
|
|
522
|
+ { name: '透析时', count: 1 },
|
|
523
|
+ { name: '透析1h一次', count: 1 },
|
|
524
|
+ { name: '透析2h一次', count: 1 },
|
|
525
|
+ { name: '透析3h一次', count: 1 },
|
|
526
|
+ { name: '每日一次', count: 1 },
|
|
527
|
+ { name: '每日两次', count: 2 },
|
|
528
|
+ { name: '每日三次', count: 3 },
|
|
529
|
+ { name: '每晚一次', count: 1 },
|
|
530
|
+ { name: '每晚', count: 1 },
|
|
531
|
+ { name: '上机前', count: 1 },
|
|
532
|
+ { name: '下机前', count: 1 },
|
|
533
|
+ { name: '透析后立即', count: 1 },
|
|
534
|
+ { name: '持续使用', count: 1 },
|
|
535
|
+ { name: '临时开药', count: 1 },
|
|
536
|
+ { name: '临睡前', count: 1 },
|
|
537
|
+ { name: '隔日一次', count: 1 },
|
|
538
|
+ { name: '隔三日一次', count: 1 },
|
|
539
|
+ { name: '每二小时一次', count: 12 },
|
|
540
|
+ { name: '每四小时一次', count: 6 },
|
|
541
|
+ { name: '每六小时一次', count: 4 },
|
|
542
|
+ { name: '每八小时一次', count: 3 }
|
|
543
|
+ ]
|
|
544
|
+ let num = ''
|
|
545
|
+ arr.map(item => {
|
|
546
|
+ if (item.name == execution_frequency) {
|
|
547
|
+ num = item.count
|
|
548
|
+ }
|
|
549
|
+ })
|
|
550
|
+ if (num == '') {
|
|
551
|
+ num = 1
|
|
552
|
+ }
|
|
553
|
+ return num
|
398
|
554
|
}
|
399
|
|
- },mounted(){
|
|
555
|
+ }, mounted() {
|
400
|
556
|
this.getInitData()
|
401
|
557
|
|
402
|
558
|
},
|
403
|
|
- watch:{
|
404
|
|
- // "prescription.advices":{
|
405
|
|
- // handler(newVal,oldVal){
|
406
|
|
- // newVal.map(item => {
|
407
|
|
- // item.prescribing_number = item.single_dose * item.day
|
408
|
|
- // if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
|
409
|
|
- // item.total = item.single_dose * item.number_days
|
410
|
|
- // }
|
|
559
|
+ watch: {
|
|
560
|
+ 'prescription.advices': {
|
|
561
|
+ handler(newVal, oldVal) {
|
411
|
562
|
|
412
|
|
-
|
413
|
|
- // })
|
414
|
|
- // },
|
415
|
|
- // deep:true
|
416
|
|
- // },
|
|
563
|
+ },
|
|
564
|
+ deep: true
|
|
565
|
+ }
|
417
|
566
|
// "prescription.project":{
|
418
|
567
|
// handler(newVal,oldVal){
|
419
|
568
|
// newVal.map((item,index) => {
|
|
@@ -432,40 +581,46 @@
|
432
|
581
|
|
433
|
582
|
<style lang="scss">
|
434
|
583
|
.prescriptionTable {
|
435
|
|
- .el-input__inner{
|
436
|
|
- padding: 0 5px;
|
437
|
|
- }
|
438
|
|
- .additionalBox{
|
439
|
|
- margin-top: 20px;
|
440
|
|
- display: flex;
|
441
|
|
- flex-wrap: wrap;
|
442
|
|
- .additionalOne{
|
443
|
|
- margin-right:20px;
|
444
|
|
- margin-bottom:10px;
|
445
|
|
- display: flex;
|
446
|
|
- align-items: center;
|
447
|
|
- >span{
|
448
|
|
- white-space: nowrap;
|
449
|
|
- overflow: hidden;
|
450
|
|
- text-overflow: ellipsis;
|
451
|
|
- width:80px;
|
452
|
|
- display: inline-block;
|
453
|
|
- font-size: 14px;
|
454
|
|
- }
|
455
|
|
- }
|
456
|
|
- .deleteIcon{
|
457
|
|
- color:red;
|
458
|
|
- margin-left:5px;
|
459
|
|
- }
|
460
|
|
- }
|
461
|
|
- .el-table th .cell, .el-table td .cell {
|
462
|
|
- padding: 0 2px;
|
463
|
|
- white-space: pre-line;
|
464
|
|
- }
|
465
|
584
|
|
466
|
|
- .el-icon-delete {
|
467
|
|
- color: red;
|
468
|
|
- }
|
|
585
|
+ .el-input__inner {
|
|
586
|
+ padding: 0 5px;
|
|
587
|
+ }
|
|
588
|
+
|
|
589
|
+ .additionalBox {
|
|
590
|
+ margin-top: 20px;
|
|
591
|
+ display: flex;
|
|
592
|
+ flex-wrap: wrap;
|
|
593
|
+
|
|
594
|
+ .additionalOne {
|
|
595
|
+ margin-right: 20px;
|
|
596
|
+ margin-bottom: 10px;
|
|
597
|
+ display: flex;
|
|
598
|
+ align-items: center;
|
|
599
|
+
|
|
600
|
+ > span {
|
|
601
|
+ white-space: nowrap;
|
|
602
|
+ overflow: hidden;
|
|
603
|
+ text-overflow: ellipsis;
|
|
604
|
+ width: 80px;
|
|
605
|
+ display: inline-block;
|
|
606
|
+ font-size: 14px;
|
|
607
|
+ }
|
|
608
|
+
|
|
609
|
+ }
|
|
610
|
+ .deleteIcon {
|
|
611
|
+ color: red;
|
|
612
|
+ margin-left: 5px;
|
|
613
|
+ }
|
|
614
|
+
|
|
615
|
+ }
|
|
616
|
+ .el-table th .cell, .el-table td .cell {
|
|
617
|
+ padding: 0 2px;
|
|
618
|
+ white-space: pre-line;
|
|
619
|
+ }
|
|
620
|
+
|
|
621
|
+ .el-icon-delete {
|
|
622
|
+ color: red;
|
|
623
|
+ }
|
469
|
624
|
|
470
|
625
|
}
|
471
|
626
|
</style>
|