Pārlūkot izejas kodu

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

28169 10 mēnešus atpakaļ
vecāks
revīzija
1deef9c45d

+ 39 - 2
src/xt_pages/outpatientCharges/chargeDetailManagement.vue Parādīt failu

@@ -215,6 +215,18 @@
215 215
                           </el-option>
216 216
                         </el-select>
217 217
 
218
+                        <label>
219
+                          就诊类型:
220
+                        </label>
221
+                        <el-select filterable v-model="charge_type" placeholder="请选择就诊类型">
222
+                          <el-option
223
+                            v-for="(item,index) in register"
224
+                            :key="index"
225
+                            :label="item.label"
226
+                            :value="item.value">
227
+                          </el-option>
228
+                        </el-select>
229
+
218 230
                       </div>
219 231
 
220 232
                       <!--<prescription-table :preTableData='preTableData'></prescription-table>-->
@@ -244,6 +256,28 @@
244 256
       </div>
245 257
     </div>
246 258
 
259
+    <el-dialog
260
+      title="提示"
261
+      :visible.sync="dialogVisible"
262
+      width="30%"
263
+    >
264
+      <el-select
265
+                 style="width:50%;" v-model="charge_type"
266
+                 placeholder="上传费用类型" >
267
+        <el-option
268
+          v-for="(item,index) in register"
269
+          :key="index"
270
+          :label="item.label"
271
+          :value="item.value">
272
+        </el-option>
273
+      </el-select>
274
+
275
+      <span slot="footer" class="dialog-footer">
276
+                <el-button @click="dialogVisible = false">取 消</el-button>
277
+                <el-button type="primary" @click="comfirmChangeMedType">确 定</el-button>
278
+             </span>
279
+    </el-dialog>
280
+
247 281
   </div>
248 282
 
249 283
 </template>
@@ -269,13 +303,15 @@ export default {
269 303
   },
270 304
   data() {
271 305
     return {
306
+      dialogVisible:false,
307
+      charge_type:1,
272 308
       isloading: false,
273 309
       isdisabled: false,
274 310
       register: [
275
-        { value: 11, label: '普通门诊' },
311
+        { value: 1, label: '门诊' },
276 312
         // { value: 12, label: '门诊挂号' },
277 313
         // { value: 13, label: '急诊' },
278
-        { value: 14, label: '门诊慢性病' }
314
+        { value: 2, label: '住院' }
279 315
         // { value: 15, label: '门诊统筹' },
280 316
         // { value: 16, label: '门诊慢性病' },
281 317
         // { value: 21, label: '普通住院' }
@@ -739,6 +775,7 @@ export default {
739 775
           sick_type: this.sick_type,
740 776
           settle_type: this.activeName,
741 777
           p_id:id,
778
+          charge_type:this.charge_type,
742 779
         }
743 780
         if (this.activeName == "first"){
744 781
           obj['settle_accounts_type'] = 2

+ 384 - 0
src/xt_pages/outpatientCharges/components/callUnAssociationPrescription.vue Parādīt failu

@@ -0,0 +1,384 @@
1
+<template>
2
+  <el-dialog
3
+    :title="name"
4
+    :visible.sync="isLastOrNextVisible"
5
+    @close="hide"
6
+    width="1010px"
7
+    class="callPrescription"
8
+    :modal-append-to-body="false"
9
+  >
10
+    <div v-for="(item,index) in allPrescription" :key="index">
11
+      <div class="quote" v-if="item.prescriptions.length > 0">引用 {{getTime(item.record_date, '{y}年{m}月{d}日')}} 的处方</div>
12
+      <el-checkbox-group v-model="item.check_group">
13
+        <div v-for="(subItem,index2) in item.prescriptions" :key="index2">
14
+          <el-checkbox style="margin:10px 0;" :label="subItem.id">{{'处方' + (index2+ 1)}}</el-checkbox>
15
+          <el-table v-if="subItem.type  == 1" :data="subItem.doctor_advice" border style="width: 99%;"
16
+                    :row-style="{ color: '#303133' }"
17
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
18
+            <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
19
+            <el-table-column align="center" prop="drug_name"  width="160" label="名称">
20
+              <template slot-scope="scope">
21
+                <span>{{ scope.row.advice_name }}</span>
22
+              </template>
23
+            </el-table-column>
24
+
25
+            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
26
+              <template slot-scope="scope">
27
+                <div>{{scope.row.single_dose}}{{scope.row.single_dose_unit}}</div>
28
+              </template>
29
+            </el-table-column>
30
+            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
31
+              <template slot-scope="scope">
32
+                {{scope.row.delivery_way}}
33
+              </template>
34
+            </el-table-column>
35
+            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
36
+              <template slot-scope="scope">
37
+                {{scope.row.execution_frequency}}
38
+              </template>
39
+            </el-table-column>
40
+
41
+            <el-table-column align="center" prop="day" width="60" label="天数">
42
+              <template slot-scope="scope">
43
+                {{scope.row.day}}
44
+              </template>
45
+            </el-table-column>
46
+
47
+            <el-table-column align="center" prop="prescribing_number" width="100" label="总量">
48
+              <template slot-scope="scope">
49
+                <div>{{scope.row.prescribing_number}} {{scope.row.prescribing_number_unit}}</div>
50
+              </template>
51
+            </el-table-column>
52
+            <el-table-column align="center" prop="retail_price" width="80" label="单价">
53
+              <template slot-scope="scope">
54
+                <div>{{scope.row.price}}元</div>
55
+              </template>
56
+            </el-table-column>
57
+            <el-table-column align="center" prop="remark" label="备注">
58
+              <template slot-scope="scope">
59
+                <div>{{scope.row.remark}}</div>
60
+              </template>
61
+            </el-table-column>
62
+          </el-table>
63
+          <el-table v-if="subItem.type == 2" :data="subItem.project" border style="width: 99%;"
64
+                    :row-style="{ color: '#303133' }"
65
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
66
+            <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
67
+            <el-table-column align="center" prop="project_name" width="160" label="名称">
68
+              <template slot-scope="scope">
69
+                <span>{{ scope.row.type == 2?scope.row.project.project_name:scope.row.good_info.good_name}}</span>
70
+              </template>
71
+            </el-table-column>
72
+            <el-table-column align="center" prop="statistical_classification" width="100" label="组">
73
+              <template slot-scope="scope">{{scope.row.type == 2 ?getGroup(scope.row.statistical_classification):"耗材"}}</template>
74
+            </el-table-column>
75
+            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
76
+              <template slot-scope="scope">
77
+                <!--<el-input v-model="scope.row.single_dose" placeholder=""></el-input>-->
78
+                <span>{{ scope.row.single_dose }}</span>
79
+
80
+              </template>
81
+            </el-table-column>
82
+            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
83
+              <template slot-scope="scope">
84
+                <!--<el-input v-model="scope.row.delivery_way" placeholder=""></el-input>-->
85
+                <span>{{ scope.row.delivery_way }}</span>
86
+
87
+              </template>
88
+            </el-table-column>
89
+            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
90
+              <template slot-scope="scope">
91
+                <!--<el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>-->
92
+                <span>{{ scope.row.execution_frequency }}</span>
93
+
94
+              </template>
95
+            </el-table-column>
96
+            <el-table-column align="center" prop="number_days" width="70" label="天数">
97
+              <template slot-scope="scope">
98
+                <!--<el-input v-model="scope.row.number_days" placeholder=""></el-input>-->
99
+                <span>{{ scope.row.number_days }}</span>
100
+
101
+              </template>
102
+            </el-table-column>
103
+            <el-table-column align="center" prop="total" width="70" label="总量">
104
+              <template slot-scope="scope">
105
+                <div>{{ scope.row.count }}{{scope.row.unit}}</div>
106
+              </template>
107
+            </el-table-column>
108
+            <el-table-column align="center" prop="name" width="60" label="单价">
109
+              <template slot-scope="scope">
110
+                <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
111
+                <span>{{ scope.row.price }}</span>
112
+
113
+              </template>
114
+            </el-table-column>
115
+            <el-table-column align="center" prop="name" label="备注">
116
+              <template slot-scope="scope">
117
+                <!--<el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>-->
118
+                <span>{{ scope.row.remark }}</span>
119
+
120
+              </template>
121
+            </el-table-column>
122
+          </el-table>
123
+        </div>
124
+      </el-checkbox-group>
125
+
126
+    </div>
127
+
128
+
129
+    <div slot="footer" class="dialog-footer">
130
+      <el-button @click="isLastOrNextVisible = false">取 消</el-button>
131
+      <el-button type="primary" @click="save">保存</el-button>
132
+    </div>
133
+  </el-dialog>
134
+
135
+
136
+</template>
137
+
138
+<script>
139
+  import { uParseTime } from '@/utils/tools'
140
+  import { getDictionaryDataConfig} from "@/utils/data";
141
+  const moment = require('moment')
142
+  import {
143
+    getCallHisPrescription
144
+  } from '@/api/his/his'
145
+  export default {
146
+    name: "callUnAssociationPrescription",
147
+    data() {
148
+      return {
149
+        start_time:"",
150
+        end_time:"",
151
+        name:"",
152
+        request_record_date:'',
153
+        patient_id:0,
154
+        allPrescription: [],
155
+        isLastOrNextVisible: false,
156
+
157
+      }
158
+    }, methods: {
159
+      changeTime(){
160
+        let params={
161
+          patient_id:this.patient_id,
162
+          start_time: this.start_time,
163
+          end_time:this.end_time,
164
+          p_type:2,
165
+        };
166
+        this.GetCallHisPrescription(params)
167
+      },
168
+      changeEndTime(){
169
+        let params={
170
+          patient_id:this.patient_id,
171
+          start_time: this.start_time,
172
+          end_time:this.end_time,
173
+          p_type:2,
174
+
175
+        };
176
+        this.GetCallHisPrescription(params)
177
+      },
178
+      GetCallHisPrescription(params){
179
+        console.log("param222222222",params)
180
+        getCallHisPrescription(params).then(response => {
181
+          if (response.data.state == 1) {
182
+            this.allPrescription = response.data.data.prescriptions;
183
+            for (let i = 0; i < this.allPrescription.length; i++){
184
+              this.allPrescription[i].check_group = []
185
+            }
186
+            this.request_record_date = uParseTime(response.data.data.prescriptions[0].record_date, '{y}-{m}-{d}')
187
+          } else {
188
+            this.$message.error(response.data.msg)
189
+
190
+          }
191
+        })
192
+      },
193
+      save() {
194
+        let replace_one = [];
195
+        let replace_two = [];
196
+
197
+        let checkGroup = [];
198
+        let allPrescriptions = [];
199
+        let targetPrescriptions = [];
200
+        let prescriptions = [];
201
+
202
+
203
+
204
+
205
+
206
+
207
+        for (let i = 0; i < this.allPrescription.length; i++) {
208
+          for (let a = 0; a < this.allPrescription[i].check_group.length; a++) {
209
+            checkGroup.push(this.allPrescription[i].check_group[a])
210
+          }
211
+          for (let a = 0; a < this.allPrescription[i].prescriptions.length; a++) {
212
+            allPrescriptions.push(this.allPrescription[i].prescriptions[a])
213
+          }
214
+        }
215
+        for (let i = 0; i < allPrescriptions.length; i++){
216
+          for (let a = 0; a < checkGroup.length; a++){
217
+            if(allPrescriptions[i].id == checkGroup[a]){
218
+              targetPrescriptions.push(allPrescriptions[i])
219
+            }
220
+          }
221
+        }
222
+
223
+        for (let i = 0; i < targetPrescriptions.length; i++) {
224
+          var prescription = targetPrescriptions[i];
225
+          for (let b = 0; b < prescription.doctor_advice.length; b++) {
226
+            console.log(prescription.doctor_advice[b].drug.is_special_diseases)
227
+            if (prescription.med_type == "14" && prescription.doctor_advice[b].drug.is_special_diseases != 1) {
228
+              prescription.doctor_advice.splice(b--,1)
229
+            }
230
+          }
231
+          for (let b = 0; b < prescription.project.length; b++) {
232
+            if(prescription.project[b].type == 2){
233
+              if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
234
+                prescription.project.splice(b--,1)
235
+              }
236
+            }else if(prescription.project[b].type == 3){
237
+              if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
238
+                prescription.project.splice(b--,1)
239
+              }
240
+            }
241
+          }
242
+        }
243
+
244
+
245
+
246
+        if (targetPrescriptions.length > 0) {
247
+          for (let i = 0; i < targetPrescriptions.length; i++) {
248
+            var prescription = targetPrescriptions[i];
249
+            let tempAdvice = [];
250
+            let tempProject = [];
251
+            let tempAddition = [];
252
+            for (let b = 0; b < prescription.doctor_advice.length; b++) {
253
+              let index = b + 1
254
+              let obj = {
255
+                advice_id: 0,
256
+                drug_name: prescription.doctor_advice[b].advice_name,
257
+                single_dose: prescription.doctor_advice[b].single_dose,
258
+                delivery_way: prescription.doctor_advice[b].delivery_way,
259
+                execution_frequency: prescription.doctor_advice[b].execution_frequency,
260
+                // retail_price: prescription.doctor_advice[b].price.toString(),
261
+                remark: prescription.doctor_advice[b].remark,
262
+                day:prescription.doctor_advice[b].day,
263
+                prescribing_number:prescription.doctor_advice[b].prescribing_number.toString(),
264
+                single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
265
+                prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
266
+                medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
267
+                id:prescription.doctor_advice[b].drug_id,
268
+                drug:prescription.doctor_advice[b].drug,
269
+                groupno: index,
270
+                hosp_appr_flag:"1",
271
+              };
272
+              if (obj.prescribing_number_unit == prescription.doctor_advice[b].drug.min_unit){
273
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
274
+              } else if(obj.prescribing_number_unit == prescription.doctor_advice[b].drug.max_unit){
275
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.retail_price
276
+              } else {
277
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
278
+              }
279
+
280
+              tempAdvice.push(obj)
281
+
282
+            }
283
+
284
+
285
+
286
+            for (let b = 0; b < prescription.project.length; b++) {
287
+              let obj = {
288
+                id: 0,
289
+                project_id: prescription.project[b].project_id,
290
+                project_name: prescription.project[b].project.project_name,
291
+                statistical_classification: prescription.project[b].project.statistical_classification,
292
+                single_dose: prescription.project[b].single_dose,
293
+                delivery_way: prescription.project[b].delivery_way,
294
+                execution_frequency: prescription.project[b].execution_frequency,
295
+                number_days: prescription.project[b].day,
296
+                total:prescription.project[b].count,
297
+                remark:prescription.project[b].remark,
298
+                unit: prescription.project[b].unit,
299
+                type: prescription.project[b].type,
300
+                // medical_code:prescription.project[b].project.medical_code,
301
+              };
302
+              if(prescription.project[b].type == 2){
303
+                obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
304
+                obj['medical_code'] =  prescription.project[b].project.medical_code
305
+                obj['project_name'] =  prescription.project[b].project.project_name
306
+                obj['price'] = prescription.project[b].project.price
307
+                obj['project']=prescription.project[b].project
308
+
309
+              }else if(prescription.project[b].type == 3){
310
+                obj['statistical_classification'] = ""
311
+                obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
312
+                obj['project_name'] =  prescription.project[b].good_info.good_name
313
+                obj['price'] = prescription.project[b].good_info.packing_price
314
+                obj['good_info']=prescription.project[b].good_info
315
+
316
+              }
317
+
318
+              tempProject.push(obj)
319
+            }
320
+            let obj = {
321
+              id: 0,
322
+              advices: tempAdvice,
323
+              project: tempProject,
324
+              addition:tempAddition,
325
+              type:prescription.type,
326
+              order_status:0,
327
+              med_type: parseInt(prescription.med_type)
328
+
329
+            };
330
+            prescriptions.push(obj)
331
+          }
332
+        }
333
+
334
+          this.$emit('call',prescriptions)
335
+        }
336
+      },
337
+      show(name,id,end_time, start_time,prescriptions){
338
+        this.isLastOrNextVisible = true
339
+        this.start_time  = start_time
340
+        this.end_time = end_time;
341
+
342
+        this.patient_id = id;
343
+        this.name = '处方调用' + '('+name +')';
344
+
345
+        this.allPrescription = prescriptions;
346
+        for (let i = 0; i < this.allPrescription.length; i++){
347
+          this.allPrescription[i].check_group = []
348
+        }
349
+
350
+      },close(){
351
+        this.isLastOrNextVisible = false
352
+      },hide(){
353
+        this.$emit('callCancel')
354
+
355
+      },getTime(time, template){
356
+        return uParseTime(time,template)
357
+
358
+      }, getGroup(id){
359
+        var name = "";
360
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category');
361
+        for(let i=0;i<statistics_category.length;i++){
362
+          if(id == statistics_category[i].id){
363
+            name = statistics_category[i].name
364
+          }
365
+        }
366
+        return name
367
+      },   getDictionaryDataConfig(module, filed_name) {
368
+        return getDictionaryDataConfig(module, filed_name)
369
+      },
370
+    }
371
+  }
372
+</script>
373
+
374
+<style lang="scss">
375
+.callPrescription{
376
+  .el-dialog__body{
377
+    padding:0px 20px 30px;
378
+  }
379
+  .quote{
380
+    margin-top: 10px;
381
+    font-size: 14px;
382
+  }
383
+}
384
+</style>