|
@@ -1,20 +1,33 @@
|
1
|
1
|
<template>
|
|
2
|
+
|
2
|
3
|
<div class="prescriptionTable">
|
3
|
|
- <el-table v-if="prescription.advices && prescription.advices.length > 0" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
|
|
4
|
+ <el-table v-if="prescription.advices && prescription.advices.length > 0" :data="prescription.advices" border
|
|
5
|
+ style="width: 99%;" :row-style="{ color: '#303133' }"
|
4
|
6
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
|
5
|
|
- <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
|
|
7
|
+ <el-table-column align="center" width="70" label="序号">
|
|
8
|
+ <template slot-scope="scope">
|
|
9
|
+ <div style="display:flex;align-items:center;">
|
|
10
|
+ <el-input v-model="scope.row.groupno" placeholder=""></el-input>
|
|
11
|
+ </div>
|
|
12
|
+ </template>
|
|
13
|
+ </el-table-column>
|
6
|
14
|
<el-table-column align="center" prop="drug_name" label="名称">
|
7
|
|
- <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
|
|
15
|
+ <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
|
|
16
|
+ </template>
|
8
|
17
|
</el-table-column>
|
9
|
18
|
|
10
|
19
|
<el-table-column align="center" prop="single_dose" width="120" label="单次用量">
|
11
|
20
|
<template slot-scope="scope">
|
12
|
21
|
<div style="display:flex;align-items:center;">
|
13
|
|
- <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:50%;"></el-input>
|
|
22
|
+ <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)"
|
|
23
|
+ style="width:50%;"></el-input>
|
14
|
24
|
<!-- <div>{{scope.row.single_dose_unit}}</div> -->
|
15
|
|
- <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
|
16
|
|
- <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
|
17
|
|
- <el-option :label="scope.row.drug.dose_unit" v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit" :value="scope.row.drug.dose_unit"></el-option>
|
|
25
|
+ <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
|
|
26
|
+ @change="getAllChange(scope)">
|
|
27
|
+ <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
|
|
28
|
+ <el-option :label="scope.row.drug.dose_unit"
|
|
29
|
+ v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit"
|
|
30
|
+ :value="scope.row.drug.dose_unit"></el-option>
|
18
|
31
|
</el-select>
|
19
|
32
|
</div>
|
20
|
33
|
</template>
|
|
@@ -48,7 +61,8 @@
|
48
|
61
|
<el-table-column align="center" prop="day" width="70" label="天数">
|
49
|
62
|
<template slot-scope="scope">
|
50
|
63
|
<div style="display:flex;align-items:center;">
|
51
|
|
- <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>{{'天'}}
|
|
64
|
+ <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
|
|
65
|
+ {{'天'}}
|
52
|
66
|
</div>
|
53
|
67
|
</template>
|
54
|
68
|
</el-table-column>
|
|
@@ -56,11 +70,15 @@
|
56
|
70
|
<el-table-column align="center" prop="prescribing_number" width="120" label="总量">
|
57
|
71
|
<template slot-scope="scope">
|
58
|
72
|
<div style="display:flex;align-items:center;">
|
59
|
|
- <el-input v-model="scope.row.prescribing_number" style="width:50%" @input="changePrescribingNumber(scope)" placeholder=""></el-input>
|
|
73
|
+ <el-input v-model="scope.row.prescribing_number" style="width:50%"
|
|
74
|
+ @input="changePrescribingNumber(scope)" placeholder=""></el-input>
|
60
|
75
|
<!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
|
61
|
|
- <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
|
62
|
|
- <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
|
63
|
|
- <el-option :label="scope.row.drug.max_unit" v-if="scope.row.drug.min_unit != scope.row.drug.max_unit" :value="scope.row.drug.max_unit"></el-option>
|
|
76
|
+ <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
|
|
77
|
+ @change="getAllChange(scope)">
|
|
78
|
+ <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
|
|
79
|
+ <el-option :label="scope.row.drug.max_unit"
|
|
80
|
+ v-if="scope.row.drug.min_unit != scope.row.drug.max_unit"
|
|
81
|
+ :value="scope.row.drug.max_unit"></el-option>
|
64
|
82
|
</el-select>
|
65
|
83
|
</div>
|
66
|
84
|
</template>
|
|
@@ -79,28 +97,46 @@
|
79
|
97
|
<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
|
80
|
98
|
</template>
|
81
|
99
|
</el-table-column>
|
|
100
|
+
|
|
101
|
+ <el-table-column align="center" prop="remark" width="50" label="推送频率">
|
|
102
|
+ <template slot-scope="scope">
|
|
103
|
+ <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>
|
|
104
|
+ <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>
|
|
105
|
+ <div v-if="scope.row.frequency_type == 3">{{scope.row.week_day}}</div>
|
|
106
|
+
|
|
107
|
+ </template>
|
|
108
|
+ </el-table-column>
|
|
109
|
+
|
|
110
|
+
|
82
|
111
|
<el-table-column align="center" width="40" prop="name" label="操作">
|
83
|
112
|
<template slot-scope="scope">
|
84
|
|
- <i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>
|
|
113
|
+ <!--<i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>-->
|
|
114
|
+ <el-button size="mini" type="primary" @click="handleEdit(scope.row,scope.$index)">推送</el-button>
|
|
115
|
+ <el-button size="mini" type="danger" @click="deleteDrug(scope.row.id,scope.$index)">删除</el-button>
|
85
|
116
|
</template>
|
86
|
117
|
</el-table-column>
|
87
|
118
|
</el-table>
|
88
|
119
|
|
89
|
|
- <el-table v-if="prescription.project &&prescription.project.length > 0" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
|
|
120
|
+ <el-table v-if="prescription.project &&prescription.project.length > 0" :data="prescription.project" border
|
|
121
|
+ style="width: 99%;" :row-style="{ color: '#303133' }"
|
90
|
122
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
|
91
|
123
|
<el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
|
92
|
124
|
<el-table-column align="center" prop="project_name" label="名称">
|
93
|
|
- <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
|
|
125
|
+ <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
|
|
126
|
+ </template>
|
94
|
127
|
</el-table-column>
|
95
|
128
|
<el-table-column align="center" prop="statistical_classification" width="100" label="组">
|
96
|
|
- <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
|
|
129
|
+ <template slot-scope="scope">{{scope.row.type ==
|
|
130
|
+ 2?getGroup(scope.row.statistical_classification):'耗材'}}
|
|
131
|
+ </template>
|
97
|
132
|
</el-table-column>
|
98
|
133
|
<el-table-column align="center" prop="single_dose" width="80" label="单次用量">
|
99
|
134
|
<template slot-scope="scope">
|
100
|
|
- <div style="display:flex;align-items:center;">
|
101
|
|
- <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
|
102
|
|
- <div>{{scope.row.unit}}</div>
|
103
|
|
- </div>
|
|
135
|
+ <div style="display:flex;align-items:center;">
|
|
136
|
+ <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)"
|
|
137
|
+ placeholder=""></el-input>
|
|
138
|
+ <div>{{scope.row.unit}}</div>
|
|
139
|
+ </div>
|
104
|
140
|
|
105
|
141
|
</template>
|
106
|
142
|
</el-table-column>
|
|
@@ -123,7 +159,8 @@
|
123
|
159
|
<el-table-column align="center" prop="number_days" width="70" label="天数">
|
124
|
160
|
<template slot-scope="scope">
|
125
|
161
|
<div style="display:flex;align-items:center;">
|
126
|
|
- <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)" placeholder=""></el-input>
|
|
162
|
+ <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)"
|
|
163
|
+ placeholder=""></el-input>
|
127
|
164
|
<div>{{'天'}}</div>
|
128
|
165
|
</div>
|
129
|
166
|
</template>
|
|
@@ -140,8 +177,8 @@
|
140
|
177
|
<el-table-column align="center" prop="name" width="70" label="单价">
|
141
|
178
|
<template slot-scope="scope">
|
142
|
179
|
<div style="display:flex;align-items:center;">
|
143
|
|
- <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
|
144
|
|
- <div>{{'元'}}</div>
|
|
180
|
+ <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
|
|
181
|
+ <div>{{'元'}}</div>
|
145
|
182
|
</div>
|
146
|
183
|
|
147
|
184
|
</template>
|
|
@@ -151,9 +188,22 @@
|
151
|
188
|
<el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
|
152
|
189
|
</template>
|
153
|
190
|
</el-table-column>
|
|
191
|
+ <el-table-column align="center" prop="remark" width="50" label="推送频率">
|
|
192
|
+ <template slot-scope="scope">
|
|
193
|
+ <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>
|
|
194
|
+ <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>
|
|
195
|
+ <div v-if="scope.row.frequency_type == 3">{{scope.row.week_day}}</div>
|
|
196
|
+
|
|
197
|
+ </template>
|
|
198
|
+ </el-table-column>
|
154
|
199
|
<el-table-column align="center" width="40" prop="name" label="操作">
|
155
|
200
|
<template slot-scope="scope">
|
156
|
|
- <i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>
|
|
201
|
+ <el-button size="mini" type="primary" @click="handleEdit(scope.row,scope.$index)">推送</el-button>
|
|
202
|
+ <el-button size="mini" type="danger" @click="deleteProject(scope.row.id,scope.$index)">删除
|
|
203
|
+ </el-button>
|
|
204
|
+ <!--<i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>-->
|
|
205
|
+ <!--<button class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)">删除</>-->
|
|
206
|
+
|
157
|
207
|
</template>
|
158
|
208
|
</el-table-column>
|
159
|
209
|
</el-table>
|
|
@@ -170,36 +220,91 @@
|
170
|
220
|
</div>
|
171
|
221
|
|
172
|
222
|
|
|
223
|
+ <div>
|
|
224
|
+ <el-dialog title="推送频率设置" :visible.sync="templateFormVisible" width="854px">
|
|
225
|
+ <el-form
|
|
226
|
+ ref="templateForm"
|
|
227
|
+ label-width="90px"
|
|
228
|
+ >
|
|
229
|
+ <el-row>
|
|
230
|
+ <el-col :span="24" >
|
|
231
|
+ <el-form-item label="周期提醒 :">
|
|
232
|
+ <el-radio-group v-model="frequency_type">
|
|
233
|
+ <el-radio :label="1">每次必推</el-radio>
|
|
234
|
+ <el-radio :label="2">天数频率</el-radio>
|
|
235
|
+ <el-radio :label="3">星期频率</el-radio>
|
|
236
|
+ </el-radio-group>
|
|
237
|
+ </el-form-item>
|
|
238
|
+ </el-col>
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+ <el-col :span="12" v-if="frequency_type == 2">
|
|
242
|
+ <el-form-item prop="day_count">
|
|
243
|
+ <el-input style="width: 50px" v-model="day_count"></el-input>
|
|
244
|
+ 天/一次
|
|
245
|
+ </el-form-item>
|
|
246
|
+ </el-col>
|
|
247
|
+
|
|
248
|
+ <el-col :span="24" v-if="frequency_type == 3">
|
|
249
|
+ <el-form-item prop="weekday">
|
|
250
|
+ <el-checkbox-group v-model="week_days">
|
|
251
|
+ <el-checkbox label="周一" name="周一" key="1">周一</el-checkbox>
|
|
252
|
+ <el-checkbox label="周二" name="周二" key="2">周二</el-checkbox>
|
|
253
|
+ <el-checkbox label="周三" name="周三" key="3">周三</el-checkbox>
|
|
254
|
+ <el-checkbox label="周四" name="周四" key="4">周四</el-checkbox>
|
|
255
|
+ <el-checkbox label="周五" name="周五" key="5">周五</el-checkbox>
|
|
256
|
+ <el-checkbox label="周六" name="周六" key="6">周六</el-checkbox>
|
|
257
|
+ <el-checkbox label="周日" name="周日" key="7">周日</el-checkbox>
|
|
258
|
+ </el-checkbox-group>
|
|
259
|
+ </el-form-item>
|
|
260
|
+ </el-col>
|
|
261
|
+
|
|
262
|
+ </el-row>
|
|
263
|
+ </el-form>
|
|
264
|
+ <div slot="footer" class="dialog-footer">
|
|
265
|
+ <el-button @click="templateFormVisible = false">取消</el-button>
|
|
266
|
+ <el-button type="primary" @click="submitTemplate()">保 存</el-button>
|
|
267
|
+ </div>
|
|
268
|
+ </el-dialog>
|
|
269
|
+ </div>
|
|
270
|
+
|
173
|
271
|
|
174
|
272
|
</div>
|
175
|
273
|
</template>
|
176
|
274
|
|
177
|
275
|
<script>
|
178
|
|
- import { getDictionaryDataConfig} from "@/utils/data";
|
179
|
|
- import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
|
180
|
|
- import { delHisPrescriptionAdviceTemplate,delHisPrescriptionProjectTemplate } from '@/api/his/his_config'
|
|
276
|
+ import { getDictionaryDataConfig } from '@/utils/data'
|
|
277
|
+ import { delHisAddition, delHisAdvice, delHisProject, getInitData } from '@/api/his/his'
|
|
278
|
+ import { delHisPrescriptionAdviceTemplate, delHisPrescriptionProjectTemplate } from '@/api/his/his_config'
|
181
|
279
|
|
182
|
280
|
export default {
|
183
|
281
|
props: {
|
184
|
282
|
preDrugs: Array,
|
185
|
283
|
activeType: Number,
|
186
|
|
- addtions_charge:Array,
|
187
|
|
- prescription:{
|
188
|
|
- type:Object,
|
189
|
|
- default: function () {
|
|
284
|
+ addtions_charge: Array,
|
|
285
|
+ prescription: {
|
|
286
|
+ type: Object,
|
|
287
|
+ default: function() {
|
190
|
288
|
return {
|
191
|
|
- name:"",
|
192
|
|
- advices:[],
|
193
|
|
- project:[],
|
194
|
|
- drugways:[],
|
195
|
|
- efs:[],
|
196
|
|
- };
|
|
289
|
+ name: '',
|
|
290
|
+ advices: [],
|
|
291
|
+ project: [],
|
|
292
|
+ drugways: [],
|
|
293
|
+ efs: []
|
|
294
|
+ }
|
197
|
295
|
}
|
198
|
|
- },
|
|
296
|
+ }
|
199
|
297
|
},
|
200
|
298
|
data() {
|
201
|
299
|
return {
|
202
|
|
- advices:[],
|
|
300
|
+ week_days: [],
|
|
301
|
+
|
|
302
|
+ current_row: null,
|
|
303
|
+ current_index: 0,
|
|
304
|
+ templateFormVisible: false,
|
|
305
|
+ frequency_type: 1,
|
|
306
|
+ day_count: 0,
|
|
307
|
+ advices: [],
|
203
|
308
|
tableData: [],
|
204
|
309
|
newoptions: [{
|
205
|
310
|
value: '1',
|
|
@@ -218,18 +323,46 @@
|
218
|
323
|
label: '5'
|
219
|
324
|
}],
|
220
|
325
|
value: '1',
|
221
|
|
- input: 1,
|
|
326
|
+ input: 1
|
222
|
327
|
}
|
223
|
328
|
},
|
224
|
329
|
|
225
|
|
- methods:{
|
|
330
|
+ methods: {
|
|
331
|
+ submitTemplate() {
|
|
332
|
+ console.log(this.current_index)
|
|
333
|
+
|
|
334
|
+ console.log( this.prescription.project[this.current_index])
|
|
335
|
+ if (this.prescription.advices && this.prescription.advices.length > 0 && this.prescription.project && this.prescription.project.length == 0) {
|
|
336
|
+ this.prescription.advices[this.current_index].frequency_type = this.frequency_type
|
|
337
|
+ this.prescription.advices[this.current_index].day_count = this.day_count
|
|
338
|
+ this.prescription.advices[this.current_index].week_day = this.week_days.join(",")
|
|
339
|
+
|
|
340
|
+ }
|
|
341
|
+
|
|
342
|
+ if (this.prescription.advices && this.prescription.advices.length == 0 && this.prescription.project && this.prescription.project.length > 0) {
|
|
343
|
+ this.prescription.project[this.current_index].frequency_type = this.frequency_type
|
|
344
|
+ this.prescription.project[this.current_index].day_count = this.day_count
|
|
345
|
+ this.prescription.project[this.current_index].week_day =this.week_days.join(",")
|
|
346
|
+ }
|
|
347
|
+ this.templateFormVisible = false
|
|
348
|
+ },
|
|
349
|
+ handleEdit(row, index) {
|
|
350
|
+ this.current_row = row
|
|
351
|
+ this.current_index = index
|
|
352
|
+ this.frequency_type = this.current_row.frequency_type
|
|
353
|
+ this.day_count = this.current_row.day_count
|
|
354
|
+ this.week_days = this.current_row.week_day.split(",")
|
|
355
|
+ this.templateFormVisible = true
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+ },
|
226
|
359
|
createFilter(queryString) {
|
227
|
360
|
return (restaurant) => {
|
228
|
361
|
return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
|
229
|
362
|
}
|
230
|
363
|
},
|
231
|
364
|
querySearch2(queryString, cb) {
|
232
|
|
- var restaurants = this.getDictionaryDataConfig("system","project_use")
|
|
365
|
+ var restaurants = this.getDictionaryDataConfig('system', 'project_use')
|
233
|
366
|
restaurants.map(item => {
|
234
|
367
|
item.value = item.name
|
235
|
368
|
})
|
|
@@ -237,18 +370,18 @@
|
237
|
370
|
// 调用 callback 返回建议列表的数据
|
238
|
371
|
cb(results)
|
239
|
372
|
},
|
240
|
|
- delAddition(index, addition){
|
241
|
|
- this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
|
242
|
|
- confirmButtonText: "确 定",
|
243
|
|
- cancelButtonText: "取 消",
|
244
|
|
- type: "warning"
|
|
373
|
+ delAddition(index, addition) {
|
|
374
|
+ this.$confirm('附加费删除后不可恢复,是否确认删除', '删除', {
|
|
375
|
+ confirmButtonText: '确 定',
|
|
376
|
+ cancelButtonText: '取 消',
|
|
377
|
+ type: 'warning'
|
245
|
378
|
}).then(() => {
|
246
|
|
- this.$nextTick(function(){
|
247
|
|
- if(addition.id == 0){
|
|
379
|
+ this.$nextTick(function() {
|
|
380
|
+ if (addition.id == 0) {
|
248
|
381
|
this.prescription.addition.splice(index, 1)
|
249
|
|
- }else{
|
|
382
|
+ } else {
|
250
|
383
|
let params = {
|
251
|
|
- 'id': addition.id,
|
|
384
|
+ 'id': addition.id
|
252
|
385
|
}
|
253
|
386
|
delHisAddition(params).then(response => {
|
254
|
387
|
if (response.data.state == 0) {
|
|
@@ -262,13 +395,14 @@
|
262
|
395
|
}
|
263
|
396
|
})
|
264
|
397
|
}
|
265
|
|
- });
|
|
398
|
+ })
|
266
|
399
|
|
267
|
400
|
})
|
268
|
|
- .catch(() => {});
|
|
401
|
+ .catch(() => {
|
|
402
|
+ })
|
269
|
403
|
|
270
|
404
|
},
|
271
|
|
- getInitData(){
|
|
405
|
+ getInitData() {
|
272
|
406
|
getInitData().then(response => {
|
273
|
407
|
if (response.data.state == 0) {
|
274
|
408
|
this.$message.error(response.data.msg)
|
|
@@ -279,19 +413,19 @@
|
279
|
413
|
}
|
280
|
414
|
})
|
281
|
415
|
|
282
|
|
- },deleteDrug:function(index, row){
|
|
416
|
+ }, deleteDrug: function(index, row) {
|
283
|
417
|
|
284
|
|
- this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
|
285
|
|
- confirmButtonText: "确 定",
|
286
|
|
- cancelButtonText: "取 消",
|
287
|
|
- type: "warning"
|
|
418
|
+ this.$confirm('药品删除后不可恢复,是否确认删除', '删除', {
|
|
419
|
+ confirmButtonText: '确 定',
|
|
420
|
+ cancelButtonText: '取 消',
|
|
421
|
+ type: 'warning'
|
288
|
422
|
}).then(() => {
|
289
|
|
- this.$nextTick(function(){
|
290
|
|
- if(row.advice_id == 0){
|
|
423
|
+ this.$nextTick(function() {
|
|
424
|
+ if (row.advice_id == 0) {
|
291
|
425
|
this.prescription.advices.splice(index, 1)
|
292
|
|
- }else{
|
|
426
|
+ } else {
|
293
|
427
|
let params = {
|
294
|
|
- 'id': row.advice_id,
|
|
428
|
+ 'id': row.advice_id
|
295
|
429
|
}
|
296
|
430
|
delHisPrescriptionAdviceTemplate(params).then(response => {
|
297
|
431
|
if (response.data.state == 0) {
|
|
@@ -305,20 +439,15 @@
|
305
|
439
|
}
|
306
|
440
|
})
|
307
|
441
|
|
308
|
|
-
|
309
|
442
|
}
|
310
|
443
|
|
311
|
|
- });
|
312
|
|
-
|
|
444
|
+ })
|
313
|
445
|
|
314
|
446
|
})
|
315
|
|
- .catch(() => {});
|
316
|
|
-
|
317
|
|
-
|
|
447
|
+ .catch(() => {
|
|
448
|
+ })
|
318
|
449
|
|
319
|
|
-
|
320
|
|
-
|
321
|
|
- },deepClone(source) {
|
|
450
|
+ }, deepClone(source) {
|
322
|
451
|
if (!source && typeof source !== 'object') {
|
323
|
452
|
throw new Error('error arguments', 'shallowClone')
|
324
|
453
|
}
|
|
@@ -333,7 +462,7 @@
|
333
|
462
|
return targetObj
|
334
|
463
|
},
|
335
|
464
|
|
336
|
|
- setNewData:function(data){
|
|
465
|
+ setNewData: function(data) {
|
337
|
466
|
this.prescription = data
|
338
|
467
|
|
339
|
468
|
// this.prescription.advices = data.advices
|
|
@@ -341,41 +470,41 @@
|
341
|
470
|
getDictionaryDataConfig(module, filed_name) {
|
342
|
471
|
return getDictionaryDataConfig(module, filed_name)
|
343
|
472
|
},
|
344
|
|
- getGroup(id){
|
345
|
|
- var name = ""
|
346
|
|
- var statistics_category = getDictionaryDataConfig('system','statistics_category')
|
347
|
|
- console.log("2235",statistics_category)
|
348
|
|
- for(let i=0;i<statistics_category.length;i++){
|
349
|
|
- if(id == statistics_category[i].id){
|
|
473
|
+ getGroup(id) {
|
|
474
|
+ var name = ''
|
|
475
|
+ var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
|
|
476
|
+ console.log('2235', statistics_category)
|
|
477
|
+ for (let i = 0; i < statistics_category.length; i++) {
|
|
478
|
+ if (id == statistics_category[i].id) {
|
350
|
479
|
name = statistics_category[i].name
|
351
|
480
|
}
|
352
|
481
|
}
|
353
|
482
|
return name
|
354
|
483
|
},
|
355
|
|
- deleteProject(row,i){
|
356
|
|
- if(this.prescription.order_status == 2){
|
|
484
|
+ deleteProject(row, i) {
|
|
485
|
+ if (this.prescription.order_status == 2) {
|
357
|
486
|
this.$message.error('该处方已经结算,无法删除')
|
358
|
487
|
return
|
359
|
488
|
}
|
360
|
|
- this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
|
361
|
|
- confirmButtonText: "确 定",
|
362
|
|
- cancelButtonText: "取 消",
|
363
|
|
- type: "warning"
|
|
489
|
+ this.$confirm('项目删除后不可恢复,是否确认删除', '删除', {
|
|
490
|
+ confirmButtonText: '确 定',
|
|
491
|
+ cancelButtonText: '取 消',
|
|
492
|
+ type: 'warning'
|
364
|
493
|
}).then(() => {
|
365
|
|
- if(row.id == 0){
|
|
494
|
+ if (row.id == 0) {
|
366
|
495
|
this.prescription.project.splice(i, 1)
|
367
|
496
|
|
368
|
|
- }else{
|
|
497
|
+ } else {
|
369
|
498
|
let params = {
|
370
|
|
- 'id': row.id,
|
|
499
|
+ 'id': row.id
|
371
|
500
|
}
|
372
|
501
|
delHisPrescriptionProjectTemplate(params).then(response => {
|
373
|
502
|
if (response.data.state == 0) {
|
374
|
503
|
this.$message.error(response.data.msg)
|
375
|
504
|
return false
|
376
|
505
|
} else {
|
377
|
|
- for (let i = 0; i < this.prescription.project.length; i++){
|
378
|
|
- if(this.prescription.project[i].id == row.id){
|
|
506
|
+ for (let i = 0; i < this.prescription.project.length; i++) {
|
|
507
|
+ if (this.prescription.project[i].id == row.id) {
|
379
|
508
|
this.prescription.project.splice(i, 1)
|
380
|
509
|
}
|
381
|
510
|
}
|
|
@@ -384,28 +513,29 @@
|
384
|
513
|
})
|
385
|
514
|
}
|
386
|
515
|
})
|
387
|
|
- .catch(() => {});
|
|
516
|
+ .catch(() => {
|
|
517
|
+ })
|
388
|
518
|
|
389
|
519
|
},
|
390
|
|
- getAllChange(scope){
|
391
|
|
- if(scope.row.drug.min_unit == scope.row.single_dose_unit){
|
392
|
|
- if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
|
520
|
+ getAllChange(scope) {
|
|
521
|
+ if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
|
|
522
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
393
|
523
|
console.log(1)
|
394
|
524
|
scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
|
395
|
|
- }else{
|
|
525
|
+ } else {
|
396
|
526
|
console.log(12)
|
397
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
|
|
527
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
|
398
|
528
|
}
|
399
|
|
- }else{
|
400
|
|
- if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
|
529
|
+ } else {
|
|
530
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
401
|
531
|
console.log(123)
|
402
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
|
403
|
|
- }else{
|
|
532
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
|
|
533
|
+ } else {
|
404
|
534
|
console.log(1234)
|
405
|
535
|
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)
|
406
|
536
|
}
|
407
|
537
|
}
|
408
|
|
- if(scope.row.prescribing_number == 0){
|
|
538
|
+ if (scope.row.prescribing_number == 0) {
|
409
|
539
|
scope.row.prescribing_number = 1
|
410
|
540
|
}
|
411
|
541
|
// if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
|
@@ -419,9 +549,9 @@
|
419
|
549
|
// }
|
420
|
550
|
// // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
|
421
|
551
|
// }
|
422
|
|
-
|
|
552
|
+
|
423
|
553
|
},
|
424
|
|
- changePrescribingNumber(scope){
|
|
554
|
+ changePrescribingNumber(scope) {
|
425
|
555
|
// if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
426
|
556
|
// if(parseInt(scope.row.prescribing_number) > scope.row.drug.total){
|
427
|
557
|
// this.$message.error(scope.row.drug_name + '库存不足')
|
|
@@ -432,29 +562,29 @@
|
432
|
562
|
// }
|
433
|
563
|
// }
|
434
|
564
|
},
|
435
|
|
- getSingleDose(scope){
|
|
565
|
+ getSingleDose(scope) {
|
436
|
566
|
this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
|
437
|
567
|
},
|
438
|
|
- getDay(scope){
|
|
568
|
+ getDay(scope) {
|
439
|
569
|
this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
|
440
|
570
|
},
|
441
|
|
- getProjectSingleDose(scope){
|
|
571
|
+ getProjectSingleDose(scope) {
|
442
|
572
|
this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
|
443
|
|
- if(this.prescription.project[scope.$index].total == 0){
|
|
573
|
+ if (this.prescription.project[scope.$index].total == 0) {
|
444
|
574
|
this.prescription.project[scope.$index].total = 1
|
445
|
575
|
}
|
446
|
576
|
},
|
447
|
|
- getProjectDay(scope){
|
|
577
|
+ getProjectDay(scope) {
|
448
|
578
|
this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
|
449
|
|
- if(this.prescription.project[scope.$index].total == 0){
|
|
579
|
+ if (this.prescription.project[scope.$index].total == 0) {
|
450
|
580
|
this.prescription.project[scope.$index].total = 1
|
451
|
581
|
}
|
452
|
582
|
}
|
453
|
|
- },mounted(){
|
|
583
|
+ }, mounted() {
|
454
|
584
|
this.getInitData()
|
455
|
585
|
|
456
|
586
|
},
|
457
|
|
- watch:{
|
|
587
|
+ watch: {
|
458
|
588
|
// "prescription.advices":{
|
459
|
589
|
// handler(newVal,oldVal){
|
460
|
590
|
// newVal.map(item => {
|
|
@@ -463,7 +593,6 @@
|
463
|
593
|
// item.total = item.single_dose * item.number_days
|
464
|
594
|
// }
|
465
|
595
|
|
466
|
|
-
|
467
|
596
|
// })
|
468
|
597
|
// },
|
469
|
598
|
// deep:true
|
|
@@ -486,31 +615,37 @@
|
486
|
615
|
|
487
|
616
|
<style lang="scss">
|
488
|
617
|
.prescriptionTable {
|
489
|
|
- .el-input__inner{
|
|
618
|
+
|
|
619
|
+ .el-input__inner {
|
490
|
620
|
padding: 0 5px;
|
491
|
621
|
}
|
492
|
|
- .additionalBox{
|
|
622
|
+
|
|
623
|
+ .additionalBox {
|
493
|
624
|
margin-top: 20px;
|
494
|
625
|
display: flex;
|
495
|
626
|
flex-wrap: wrap;
|
496
|
|
- .additionalOne{
|
497
|
|
- margin-right:20px;
|
498
|
|
- margin-bottom:10px;
|
|
627
|
+
|
|
628
|
+ .additionalOne {
|
|
629
|
+ margin-right: 20px;
|
|
630
|
+ margin-bottom: 10px;
|
499
|
631
|
display: flex;
|
500
|
632
|
align-items: center;
|
501
|
|
- >span{
|
|
633
|
+
|
|
634
|
+ > span {
|
502
|
635
|
white-space: nowrap;
|
503
|
636
|
overflow: hidden;
|
504
|
637
|
text-overflow: ellipsis;
|
505
|
|
- width:80px;
|
|
638
|
+ width: 80px;
|
506
|
639
|
display: inline-block;
|
507
|
640
|
font-size: 14px;
|
508
|
641
|
}
|
|
642
|
+
|
509
|
643
|
}
|
510
|
|
- .deleteIcon{
|
511
|
|
- color:red;
|
512
|
|
- margin-left:5px;
|
|
644
|
+ .deleteIcon {
|
|
645
|
+ color: red;
|
|
646
|
+ margin-left: 5px;
|
513
|
647
|
}
|
|
648
|
+
|
514
|
649
|
}
|
515
|
650
|
.el-table th .cell, .el-table td .cell {
|
516
|
651
|
padding: 0 2px;
|