Kaynağa Gözat

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

XMLWAN 4 yıl önce
ebeveyn
işleme
6009824c70

+ 12 - 0
src/api/his/his.js Dosyayı Görüntüle

@@ -269,6 +269,18 @@ export function getNextOrLastHisPrescription (params) {
269 269
 
270 270
 
271 271
 
272
+export function getCallHisPrescription (params) {
273
+  return request({
274
+    url: '/api/callhisprescription/get',
275
+    method: 'get',
276
+    params:params,
277
+  })
278
+}
279
+
280
+
281
+
282
+
283
+
272 284
 
273 285
 
274 286
 

+ 2 - 2
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Dosyayı Görüntüle

@@ -55,7 +55,7 @@
55 55
                      v-if="this.hisPatientInfo && this.hisPatientInfo.id == 0"
56 56
                      type="primary">挂号
57 57
           </el-button>
58
-          <el-button v-loading="loadingtwo" size="small"
58
+          <el-button v-loading="loadingtwo" v-if="this.info.prescription_status == 1" size="small"
59 59
                      @click="open(4)"
60 60
                      type="primary">收费
61 61
           </el-button>
@@ -365,7 +365,7 @@
365 365
 
366 366
 
367 367
       }, cancel() {
368
-        
368
+
369 369
         this.$refs.register.hide()
370 370
 
371 371
 

+ 354 - 0
src/xt_pages/outpatientDoctorStation/components/callPrescription.vue Dosyayı Görüntüle

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

Dosya farkı çok büyük olduğundan ihmal edildi
+ 365 - 253
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue


+ 341 - 279
src/xt_pages/outpatientDoctorStation/components/nextOrLastPrescription.vue Dosyayı Görüntüle

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

+ 12 - 6
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Dosyayı Görüntüle

@@ -46,6 +46,7 @@
46 46
           </el-tabs>
47 47
           <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子处方'">
48 48
             <el-button size="small" ref="button_one" @click="open(1)" type="primary" v-loading="saveLoading">保存</el-button>
49
+            <el-button size="small" ref="button_three" @click="open_two()" type="primary">处方调用</el-button>
49 50
             <el-popover
50 51
               placement="bottom"
51 52
               width="200"
@@ -53,8 +54,8 @@
53 54
               <el-button size="small" ref="button_two"   @click="open(2)">处方单</el-button>
54 55
               <el-button size="small" ref="button_six"   @click="open(6)">治疗单</el-button>
55 56
               <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
57
+
56 58
             </el-popover>
57
-            <!-- <el-button size="small" ref="button_three" @click="open(4)" type="primary">选择模板</el-button>-->
58 59
             <!--<el-button size="small" ref="button_four"  @click="open(5)" type="primary" :disabled='prescriptions && prescriptions[0].advices && prescriptions[0].project ? prescriptions[0].advices.length == 0 && prescriptions[0].project.length == 0 : false'>存模板</el-button> -->
59 60
           </div>
60 61
           <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子病历'">
@@ -66,7 +67,7 @@
66 67
         </div>
67 68
         <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
68 69
         <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
69
-        <desk-prescription  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
70
+        <desk-prescription v-on:setData="setData"  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
70 71
                           ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
71 72
                           :hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
72 73
                           v-if="titleType == '电子处方'" style="flex:1;" v-on:change="changeTab"></desk-prescription>
@@ -216,6 +217,9 @@
216 217
       }
217 218
     },
218 219
     methods: {
220
+      setData(val){
221
+        this.prescriptions = val
222
+      },
219 223
       getDictionaryDataConfig(module, filed_name) {
220 224
         console.log(getDictionaryDataConfig(module, filed_name))
221 225
         return getDictionaryDataConfig(module, filed_name)
@@ -508,7 +512,7 @@
508 512
                 this.case_history = response.data.data.case_history
509 513
                 var case_history = response.data.data.case_history
510 514
                 console.log("切换患者查询病历",case_history)
511
-               
515
+
512 516
                 this.case_history = case_history
513 517
                 this.info = response.data.data.info
514 518
                 this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
@@ -655,7 +659,7 @@
655 659
               this.case_history = response.data.data.case_history
656 660
               var case_history = response.data.data.case_history
657 661
               console.log("case_history22222222",case_history)
658
-             
662
+
659 663
               this.case_history = case_history
660 664
               this.info = response.data.data.info
661 665
               this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
@@ -787,7 +791,7 @@
787 791
 
788 792
       },
789 793
       currentChange(currentRow, oldCurrentRow){
790
-       
794
+
791 795
         let isShowDailog = false
792 796
         for (let i = 0; i < this.prescriptions.length; i++){
793 797
           if((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)){
@@ -800,6 +804,8 @@
800 804
         }
801 805
 
802 806
 
807
+      },open_two() {
808
+        this.$refs.prescriptions.open_two()
803 809
       },
804 810
       open(index) {
805 811
          if(this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0){
@@ -885,7 +891,7 @@
885 891
        // console.log("99999",this.selecting_schs)
886 892
       },
887 893
       handleClick(){
888
-       
894
+
889 895
       },
890 896
       savePrint(){
891 897
         var arr = []