Sfoglia il codice sorgente

Merge branch '2022-10-17_vue_schedule_branch' of http://git.shengws.com/csx/Vue_New into 20220812

28169 1 anno fa
parent
commit
6b05de83cc

+ 10 - 0
src/api/his/his_hospital.js Vedi File

@@ -19,5 +19,15 @@ export function refundDetail(params) {
19 19
   });
20 20
 }
21 21
 
22
+export function exportData(params) {
23
+  return request({
24
+    url: "/api/exportuncharge/get",
25
+    method: "get",
26
+    params:params
27
+  });
28
+}
29
+
30
+
31
+
22 32
 
23 33
 

+ 0 - 1
src/xt_pages/hospitalStation/invoicePrint.vue Vedi File

@@ -46,7 +46,6 @@ import printThree from "./invoiceTemplate/printThree";
46 46
 export default {
47 47
   name: "invoicePrint",
48 48
   components: {
49
-    PrintNight,
50 49
     printOne,
51 50
     printTwo,
52 51
     printThree,

+ 124 - 5
src/xt_pages/hospitalStation/outpatientChargesManagement.vue Vedi File

@@ -92,10 +92,16 @@
92 92
 
93 93
           <div>
94 94
             <div>入院时间:{{this.hisPatientInfo&&this.hisPatientInfo.in_hosptial_time?this.hisPatientInfo.in_hosptial_time:""}}</div>
95
-            <el-button  size="small"
96
-                       @click="open(1)"
97
-                       type="primary">入院登记
98
-            </el-button>
95
+<!--            <el-button-->
96
+<!--              size="small"-->
97
+<!--              @click="exportUnchargeData"-->
98
+<!--              type="primary">导出未收费数据</el-button>-->
99
+
100
+<!--            -->
101
+<!--            <el-button  size="small"-->
102
+<!--                       @click="open(1)"-->
103
+<!--                       type="primary">入院登记-->
104
+<!--            </el-button>-->
99 105
 
100 106
             <el-button v-loading="loadingone" size="small"
101 107
                        v-if="(this.activeName == 'third' &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
@@ -274,6 +280,28 @@
274 280
                 <el-button type="primary" @click="comfirmTime">确 定</el-button>
275 281
              </span>
276 282
     </el-dialog>
283
+
284
+    <el-dialog
285
+      title="导出时间"
286
+      :visible.sync="dialogExportVisible"
287
+      width="30%"
288
+    >
289
+      <el-date-picker v-model="export_start_time" type="datetime" format="yyyy-MM-dd"
290
+                      value-format="yyyy-MM-dd"
291
+                      placeholder="请选择导出开始时间">
292
+      </el-date-picker>
293
+
294
+      <el-date-picker v-model="export_end_time" type="datetime" format="yyyy-MM-dd"
295
+                      value-format="yyyy-MM-dd"
296
+                      placeholder="请选择导出结束时间">
297
+      </el-date-picker>
298
+
299
+      <span slot="footer" class="dialog-footer">
300
+                <el-button @click="dialogExportVisible = false">取 消</el-button>
301
+                <el-button type="primary" @click="comfirmExportTime">确 定</el-button>
302
+             </span>
303
+    </el-dialog>
304
+
277 305
   </div>
278 306
 
279 307
 </template>
@@ -299,6 +327,12 @@ import {
299 327
   Outhopitaluncheck,
300 328
   Settle
301 329
 } from '@/api/his/his'
330
+
331
+import {
332
+  exportData
333
+} from '@/api/his/his_hospital'
334
+
335
+
302 336
 import { uParseTime } from '@/utils/tools'
303 337
 
304 338
 import RegisterDialog from './components/registerDialog'
@@ -434,7 +468,10 @@ export default {
434 468
       department: [],
435 469
       invoiceVisible: false,
436 470
       invoiceParams: {},
437
-      out_hospital_time: moment(new Date()).add('year',0).format("YYYY-MM-DD HH:mm:ss")
471
+      out_hospital_time: moment(new Date()).add('year',0).format("YYYY-MM-DD HH:mm:ss"),
472
+      dialogExportVisible:false,
473
+      export_start_time: moment(new Date()).add('year',0).format("YYYY-MM-DD"),
474
+      export_end_time: moment(new Date()).add('year',0).format("YYYY-MM-DD"),
438 475
 
439 476
     }
440 477
   },
@@ -457,6 +494,68 @@ export default {
457 494
     this.getPatientList()
458 495
   },
459 496
   methods: {
497
+    comfirmExportTime(){
498
+      let params = {
499
+        'patient_id': this.patientInfo.id,
500
+        'start_time': this.export_start_time,
501
+        'end_time': this.export_end_time,
502
+      }
503
+      exportData(params).then(response => {
504
+        if (response.data.state == 0) {
505
+          this.$message.error(response.data.msg)
506
+          this.dialogExportVisible = false
507
+          return false
508
+        } else {
509
+          this.dialogExportVisible = false
510
+          var prescriptions = response.data.data.month_prescriptions
511
+          var patient_ids = this.unique_patient(prescriptions)
512
+          let list=  []
513
+          for(var i = 0;i < patient_ids.length; i++){
514
+            let obj = {}
515
+            let total = 0
516
+            obj["患者姓名"] = patient_ids[i].patient.name
517
+            for(let b = 0; b < prescriptions.length; b++){
518
+              if(patient_ids[i].patient_id == prescriptions[b].patient_id){
519
+                if (prescriptions[b].type == 1) {
520
+                  if (prescriptions[b].advices != null) {
521
+                    console.log("~~~~~~~~~~~~~~~~~1111")
522
+
523
+                    for (let a = 0; a < prescriptions[b].advices.length; a++) {
524
+                      total = total + parseFloat(prescriptions[b].advices[a].price * prescriptions[b].advices[a].prescribing_number)
525
+                    }
526
+                  }
527
+                } else {
528
+                  if (prescriptions[b].project != null) {
529
+                    console.log("~~~~~~~~~~~~~~~~~22222")
530
+                    for (let c = 0; c < prescriptions[b].project.length; c++) {
531
+                      total = total + parseFloat(prescriptions[b].project[c].price  * prescriptions[b].project[c].count)
532
+                    }
533
+                  }
534
+                }
535
+              }
536
+            }
537
+            obj["总金额"] = total.toFixed(2)
538
+            list.push(obj)
539
+          }
540
+          import("@/vendor/Export2Excel").then((excel) => {
541
+            const tHeader = [
542
+              "患者姓名",
543
+              "总金额"
544
+            ];
545
+            const filterVal = [
546
+              "患者姓名",
547
+              "总金额"
548
+            ];
549
+            const data = this.formatJson(filterVal, list);
550
+            excel.export_json_to_excel({
551
+              header: tHeader,
552
+              data,
553
+              filename: "消费明细",
554
+            });
555
+          });
556
+        }
557
+      })
558
+    },
460 559
     comfirmTime() {
461 560
       var that = this
462 561
       let params = {
@@ -1288,6 +1387,10 @@ export default {
1288 1387
     },
1289 1388
     formatJson(filterVal, jsonData) {
1290 1389
       return jsonData.map(v => filterVal.map(j => v[j]))
1390
+    },exportUnchargeData(){
1391
+
1392
+      this.dialogExportVisible = true
1393
+
1291 1394
     },
1292 1395
     open(index) {
1293 1396
       if (index == 1){
@@ -2871,6 +2974,22 @@ export default {
2871 2974
       this.curSettlePrescriptions = this.settle_prescriptions[0]
2872 2975
 
2873 2976
     },
2977
+    unique_patient(array) {
2978
+      // res用来存储结果
2979
+      var res = []
2980
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
2981
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
2982
+          if (array[i].patient_id === res[j].patient_id) {
2983
+            break
2984
+          }
2985
+        }
2986
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
2987
+        if (j === resLen) {
2988
+          res.push(array[i])
2989
+        }
2990
+      }
2991
+      return res
2992
+    },
2874 2993
     unique_two(array) {
2875 2994
       // res用来存储结果
2876 2995
       var res = []

+ 9 - 9
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Vedi File

@@ -83,15 +83,15 @@
83 83
 
84 84
         <div class="mainCell fixedCell" style="margin-bottom:10px;">
85 85
 
86
-          <div v-if="org_id == 10340 || org_id == 0">
87
-                        <el-button  size="small"
88
-                                   @click="openZb(4)"
89
-                                   v-if=" this.order.id == 0"
90
-                          type="primary">记账
91
-                        </el-button>
92
-          </div>
93
-
94
-          <div  v-if="org_id != 10340 && org_id != 0">
86
+<!--          <div v-if="org_id == 10340 || org_id == 0">-->
87
+<!--                        <el-button  size="small"-->
88
+<!--                                   @click="openZb(4)"-->
89
+<!--                                   v-if=" this.order.id == 0"-->
90
+<!--                          type="primary">记账-->
91
+<!--                        </el-button>-->
92
+<!--          </div>-->
93
+
94
+          <div  v-if="org_id != 10340">
95 95
 <!--            <el-button size="small"-->
96 96
 <!--                       @click="openZb(1)"-->
97 97
 <!--                       type="primary">登记-->

+ 3 - 3
src/xt_pages/outpatientCharges/statementPrint.vue Vedi File

@@ -55,7 +55,7 @@
55 55
          :balanceAccounts="balanceAccounts"
56 56
      >
57 57
      </printSeven>
58
-   <printOne :info="info" v-else></printOne>
58
+   <printOne :info="info" :paramsObj="paramsObj" v-else></printOne>
59 59
 <!--      <printOne :info="info" v-if="org_id != 9990 &&-->
60 60
 <!--          org_id != 10138 &&-->
61 61
 <!--          org_id != 9504 &&-->
@@ -386,7 +386,7 @@ export default {
386 386
       // console.log(json, "json");
387 387
       // this.info = json.data.info
388 388
       //
389
-      if (obj.balance_accounts_type == 2 ) {
389
+      if (obj.balance_accounts_type == 2) {
390 390
         let params = {
391 391
           his_patient_id: obj.his_patient_id,
392 392
           id: obj.order_id,
@@ -828,7 +828,7 @@ export default {
828 828
         }
829 829
 
830 830
       } else {
831
-        if (this.org_id == 10191 || this.org_id == 0) {
831
+        if (this.$store.getters.xt_user.org_id == 10191) {
832 832
           let params = {
833 833
             his_patient_id: obj.his_patient_id,
834 834
             id: obj.order_id,

+ 4 - 1
src/xt_pages/outpatientDoctorStation/checkPrint.vue Vedi File

@@ -13,7 +13,8 @@
13 13
       </template> -->
14 14
 
15 15
       <div class='dialysisPage' style="padding-top:40px;">
16
-        <printOne :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id" :newHisPatient="newHisPatient"></printOne>
16
+        <printOne v-if="$store.getters.xt_user.org_id != 0 && $store.getters.xt_user.org_id != 10402" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id" :newHisPatient="newHisPatient"></printOne>
17
+        <check-print-two v-else :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id" :newHisPatient="newHisPatient"></check-print-two>
17 18
       </div>
18 19
   </div>
19 20
 </template>
@@ -25,9 +26,11 @@ import BreadCrumb from "@/xt_pages/components/bread-crumb";
25 26
 import print from "print-js";
26 27
 import printOne from "./checkTemplate/printOne"
27 28
 import { getAllDoctorList,getAllHisPatientList } from "@/api/project/project"
29
+import CheckPrintTwo from "./checkTemplate/checkPrintTwo";
28 30
 export default {
29 31
   name: "dialysisPrintOrder",
30 32
   components: {
33
+    CheckPrintTwo,
31 34
     BreadCrumb,
32 35
     printOne,
33 36
   },

+ 616 - 0
src/xt_pages/outpatientDoctorStation/checkTemplate/checkPrintTwo.vue Vedi File

@@ -0,0 +1,616 @@
1
+<template>
2
+  <div>
3
+    <div id="prescription-print3" class="prescription-print">
4
+
5
+      <div class="printTitle">检验申请单</div>
6
+
7
+      <div style="border: 1px solid #000">
8
+        <div
9
+          style="
10
+            display: flex;
11
+            justify-content: space-between;
12
+            border-bottom: 1px solid #000;
13
+            line-height: 40px;
14
+            padding: 0 10px;
15
+          "
16
+        >
17
+          <div>是否急诊:否</div>
18
+          <div>
19
+            结算方式:{{
20
+              faber && faber.transBody
21
+                ? getName(faber.transBody.outputlist1)
22
+                : ""
23
+            }}
24
+          </div>
25
+          <div>金额:{{ total }}</div>
26
+        </div>
27
+        <div
28
+          style="
29
+            display: flex;
30
+            justify-content: space-between;
31
+            border-bottom: 1px solid #000;
32
+            line-height: 40px;
33
+            padding: 0 10px;
34
+          "
35
+        >
36
+          <div>
37
+            姓名:{{
38
+              advicePrint[0].patient.name
39
+                ? advicePrint[0].patient.name.indexOf("(") > -1
40
+                ? advicePrint[0].patient.name.substring(
41
+                  0,
42
+                  advicePrint[0].patient.name.indexOf("(")
43
+                )
44
+                : advicePrint[0].patient.name
45
+                : ""
46
+            }}
47
+          </div>
48
+          <div>
49
+            性别:
50
+            <span v-if="advicePrint[0].patient.gender == 1">男</span>
51
+            <span v-if="advicePrint[0].patient.gender == 2">女</span>
52
+          </div>
53
+          <div>
54
+            年龄:{{
55
+              advicePrint[0].patient.age ? advicePrint[0].patient.age : ""
56
+            }}岁
57
+          </div>
58
+        </div>
59
+        <div style="margin-bottom: 20px; padding: 10px 10px 0">
60
+          病史摘要:{{
61
+            history.history_of_present_illness
62
+              ? history.history_of_present_illness
63
+              : ""
64
+          }}
65
+        </div>
66
+        <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
67
+                    <span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
68
+                    <span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
69
+                    <span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
70
+                    <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
71
+                </div> -->
72
+        <div style="margin-bottom: 20px; padding: 0 10px">
73
+          临床诊断:{{ getDiagnosis(advicePrint[0].info.diagnosis) }}
74
+        </div>
75
+        <div style="display: flex; margin-bottom: 20px; padding: 0 10px">
76
+          <div>检验项目:</div>
77
+          <div>
78
+            <div v-for="item in projectPrint" style="margin-bottom: 10px">
79
+              {{ item.project.project_name }}
80
+            </div>
81
+            <!--            <div v-for="item in singleProjectPrint" style="margin-bottom: 10px">-->
82
+            <!--              {{ item.project.project_name }}-->
83
+            <!--            </div>-->
84
+          </div>
85
+        </div>
86
+        <div
87
+          style="
88
+            display: flex;
89
+            justify-content: space-between;
90
+            border-top: 1px solid #000;
91
+            line-height: 40px;
92
+            padding: 0 10px;
93
+          "
94
+        >
95
+          <div>开单医生:{{ doctor ? doctor : "" }}</div>
96
+          <div>
97
+            开单日期:
98
+            {{ getTime(pre_time) ? getTime(pre_time).split(" ")[0] : "" }}
99
+          </div>
100
+          <div>
101
+            医生签字:
102
+
103
+            <img
104
+              v-if="setAdminUserES(advicePrint[0].creator)"
105
+              style="height: 30px"
106
+              :src="setAdminUserES(advicePrint[0].creator)"
107
+              alt=""
108
+              srcset=""
109
+            />
110
+            <span
111
+              style="width: 100px; display: inline-block"
112
+              v-else-if="advicePrint[0].doctor != ''"
113
+            >
114
+              {{ advicePrint[0].doctor ? advicePrint[0].doctor : "" }}
115
+            </span>
116
+            <span v-else>
117
+
118
+            </span>
119
+          </div>
120
+        </div>
121
+      </div>
122
+    </div>
123
+
124
+  </div>
125
+</template>
126
+<script>
127
+import { jsGetAge, uParseTime } from "@/utils/tools";
128
+import {
129
+  getAllDoctorList,
130
+  getPrescriptionPrint,
131
+  getHisPatientDetail,
132
+  getPatientCaseHistory,
133
+} from "@/api/project/project";
134
+import { getInitData } from "@/api/his/his";
135
+export default {
136
+  props: {
137
+    patient_id: Number,
138
+    record_date: String,
139
+    prescription_id: Number,
140
+    ids: String,
141
+  },
142
+  data() {
143
+    return {
144
+      doctorList_1: [],
145
+      doctorList: [],
146
+      advicePrint: {},
147
+      patient: {},
148
+      tableData: [],
149
+      prescriptionInfo: [],
150
+      hisPatient: {},
151
+      department: [],
152
+      prescriptions: [],
153
+      projectList: [],
154
+      doc_name: "",
155
+      orgname: "",
156
+      diagnoses: [],
157
+      pageArr: [],
158
+      faber: {},
159
+      total: 0,
160
+      projectPrint: [],
161
+      time: "",
162
+      doctor: "",
163
+      org_id: "",
164
+      singleProjectPrint: [],
165
+      operatorMaps: {},
166
+    };
167
+  },
168
+  methods: {
169
+    getPatientCaseHistory() {
170
+      const params = {
171
+        patient_id: this.patient_id,
172
+      };
173
+      getPatientCaseHistory(params).then((response) => {
174
+        if (response.data.state == 1) {
175
+          var history = response.data.data.history;
176
+          // console.log("中国history222222", history);
177
+          this.history = history;
178
+        }
179
+      });
180
+    },
181
+    getAllDoctorList() {
182
+      getAllDoctorList().then((response) => {
183
+        if (response.data.state == 1) {
184
+          var doctor = response.data.data.doctor;
185
+
186
+          this.doctorList = doctor;
187
+        }
188
+      });
189
+    },
190
+
191
+    getDoctor(id) {
192
+      var name = "";
193
+      for (let i = 0; i < this.doctorList.length; i++) {
194
+        if (id == this.doctorList[i].admin_user_id) {
195
+          name = this.doctorList[i].user_name;
196
+        }
197
+      }
198
+      return name;
199
+    },
200
+    getTime(value, temp) {
201
+      if (value != undefined) {
202
+        return uParseTime(value, temp);
203
+      }
204
+      return "";
205
+    },
206
+
207
+    getPrescriptionPrint() {
208
+      var params = {
209
+        // patient_id:this.patient_id,
210
+        // record_date:this.record_date,
211
+        // prescription_id:this.prescription_id,
212
+        patient_id: this.patient_id,
213
+        record_date: this.record_date,
214
+        prescription_id: this.prescription_id,
215
+        ids: this.ids,
216
+        p_type: 2,
217
+      };
218
+      // console.log("params", params);
219
+      getPrescriptionPrint(params).then((response) => {
220
+        if (response.data.state == 1) {
221
+          var advicePrint = response.data.data.advicePrint;
222
+          // console.log("adviceprint9999", advicePrint);
223
+          this.advicePrint = advicePrint;
224
+          this.prescriptions = advicePrint;
225
+          // console.log("处方222222", this.prescriptions);
226
+          var hisPatient = response.data.data.hisPatient;
227
+          // console.log("hisPatient", hisPatient);
228
+          this.hisPatient = hisPatient;
229
+          let projectPrint = [];
230
+          let total = 0;
231
+          this.advicePrint.map((item) => {
232
+            // console.log("imte233232323232323223", item.project);
233
+            if (item.project.length > 0) {
234
+              item.project.map((it) => {
235
+                if (it.type == 2) {
236
+                  if (it.project.cost_classify == 3) {
237
+                    projectPrint.push(it);
238
+                    total += it.project.price * parseInt(it.count);
239
+                  }
240
+                }
241
+              });
242
+            }
243
+          });
244
+          this.doctorList_1 = response.data.data.eles;
245
+          // console.log(this.doctorList_1, "医生列表");
246
+          if (this.doctorList_1.length > 0) {
247
+            var operatorsLen = this.doctorList_1.length;
248
+            for (var index = 0; index < operatorsLen; index++) {
249
+              this.$set(
250
+                this.operatorMaps,
251
+                this.doctorList_1[index].creator,
252
+                this.doctorList_1[index]
253
+              );
254
+            }
255
+          }
256
+          let data2 = [];
257
+          projectPrint.map((item) => {
258
+            data2.push(item);
259
+          });
260
+          this.projectPrint = data2;
261
+          console.log("列表", this.projectPrint);
262
+          this.total = total.toFixed(2);
263
+          this.pre_time = this.advicePrint[0].pre_time;
264
+          this.doctor = this.advicePrint[0].doctor;
265
+
266
+          var projectlist = response.data.data.projectlist;
267
+
268
+          var projectlist = response.data.data.projectlist;
269
+          // console.log("所有项目列表", projectlist);
270
+          this.projectList = projectlist;
271
+          this.getPage();
272
+          let outputlist1Name = response.data.data.his.patient_info
273
+            ? JSON.parse(response.data.data.his.patient_info)
274
+            : {};
275
+          this.faber = outputlist1Name;
276
+        }
277
+      });
278
+    },
279
+    // 电子签名
280
+    setAdminUserES(id) {
281
+      // console.log(id, "id");
282
+      if (id == 0) {
283
+        return "";
284
+      }
285
+      if (id in this.operatorMaps) {
286
+        // console.log(this.operatorMaps, "this.operatorMaps");
287
+        return this.operatorMaps[id].url;
288
+      } else {
289
+        // console.log("po");
290
+        return "";
291
+      }
292
+    },
293
+    getHisPatientDetail() {
294
+      const params = {
295
+        patient_id: this.patient_id,
296
+      };
297
+      getHisPatientDetail(params).then((response) => {
298
+        if (response.data.state == 1) {
299
+          var hisPatient = response.data.data.hisPatient;
300
+          // console.log("挂号病人", hisPatient);
301
+          this.hisPatient = hisPatient;
302
+        }
303
+      });
304
+    },
305
+    getInitData() {
306
+      getInitData().then((response) => {
307
+        if (response.data.state == 1) {
308
+          this.department = response.data.data.department;
309
+          this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
310
+          // console.log("争端", this.diagnoses);
311
+        }
312
+      });
313
+    },
314
+    getDepart(id) {
315
+      var name = "";
316
+      for (let i = 0; i < this.department.length; i++) {
317
+        if (id == this.department[i].id) {
318
+          name = this.department[i].name;
319
+        }
320
+      }
321
+      return name;
322
+    },
323
+    getTotalOne(id) {
324
+      var total = 0;
325
+      var addtotal = 0;
326
+      for (let i = 0; i < this.prescriptions.length; i++) {
327
+        if (id == this.prescriptions[i].id) {
328
+          if (this.prescriptions[i].project != null) {
329
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
330
+              total =
331
+                total +
332
+                this.prescriptions[i].project[a].price *
333
+                this.prescriptions[i].project[a].count;
334
+            }
335
+          }
336
+
337
+          if (this.prescriptions[i].additionalcharge != null) {
338
+            for (
339
+              let a = 0;
340
+              a < this.prescriptions[i].additionalcharge.length;
341
+              a++
342
+            ) {
343
+              addtotal =
344
+                addtotal +
345
+                this.prescriptions[i].additionalcharge[a].price *
346
+                this.prescriptions[i].additionalcharge[a].count;
347
+            }
348
+          }
349
+          addtotal = Math.floor(addtotal * 100) / 100;
350
+        }
351
+      }
352
+
353
+      for (let i = 0; i < this.prescriptions.length; i++) {
354
+        if (id == this.prescriptions[i].id) {
355
+          if (this.prescriptions[i].advices != null) {
356
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
357
+              total =
358
+                total +
359
+                this.prescriptions[i].advices[a].price *
360
+                this.prescriptions[i].advices[a].prescribing_number;
361
+            }
362
+          }
363
+
364
+          if (this.prescriptions[i].additionalcharge != null) {
365
+            for (
366
+              let a = 0;
367
+              a < this.prescriptions[i].additionalcharge.length;
368
+              a++
369
+            ) {
370
+              addtotal =
371
+                addtotal +
372
+                this.prescriptions[i].additionalcharge[a].price *
373
+                this.prescriptions[i].additionalcharge[a].count;
374
+            }
375
+          }
376
+          addtotal = Math.floor(addtotal * 100) / 100;
377
+        }
378
+      }
379
+
380
+      return total + addtotal;
381
+    },
382
+
383
+    getProjectName(id) {
384
+      var project_name = "";
385
+      for (let i = 0; i < this.projectList.length; i++) {
386
+        if (id == this.projectList[i].id) {
387
+          project_name = this.projectList[i].project_name;
388
+        }
389
+      }
390
+      return project_name;
391
+    },
392
+
393
+    getDiagnosis(ids) {
394
+      let newIds = ids.split(",").sort(function (a, b) {
395
+        return a - b;
396
+      });
397
+
398
+      var name = "";
399
+      let nameArr = [];
400
+      for (let i = 0; i < this.diagnoses.length; i++) {
401
+        // if(id == this.diagnoses[i].id){
402
+        //    name = this.diagnoses[i].class_name
403
+        // }
404
+
405
+        if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
406
+          // name += diagnoses[i].class_name + ' '
407
+          nameArr.push(this.diagnoses[i].class_name);
408
+        }
409
+      }
410
+      let newNameArr = [];
411
+      nameArr.map((item, index) => {
412
+        if (item == "尿毒症") {
413
+          newNameArr.push(item);
414
+          nameArr.splice(index, 1, "");
415
+        }
416
+      });
417
+      newNameArr.push(...nameArr);
418
+      return newNameArr.join(" ");
419
+    },
420
+    compare(property) {
421
+      return function (a, b) {
422
+        var value1 = a[property];
423
+        var value2 = b[property];
424
+        return value1 - value2; //升序排序
425
+      };
426
+    },
427
+    getPage() {
428
+      this.page = 1;
429
+      this.pageArr = [];
430
+
431
+      this.advicePrint.map((item) => {
432
+        let arr = [];
433
+        item.pageArr = [];
434
+        if (item.advices.length <= 5) {
435
+          this.page = 1;
436
+          arr.push(item.advices.length);
437
+          item.pageArr.push(arr);
438
+        } else if (item.advices.length > 5) {
439
+          this.page = parseInt(item.advices.length / 5);
440
+          let num = item.advices.length % 5;
441
+          for (var i = 0; i < this.page; i++) {
442
+            item.pageArr.push([5]);
443
+          }
444
+          if (num != 0) {
445
+            item.pageArr.push([num]);
446
+          }
447
+        }
448
+      });
449
+      // console.log('this.pageArr',this.pageArr)
450
+    },
451
+    getName(list) {
452
+      console.log("list", list);
453
+      let new_list = [];
454
+      for (let i = 0; i < list.length; i++) {
455
+        if (list[i].aac031 == "1") {
456
+          new_list.push(list[i]);
457
+        }
458
+      }
459
+
460
+      switch (new_list[0].bcc334) {
461
+        case "A31001":
462
+          return "深圳医保1档";
463
+          break;
464
+        case "A31002":
465
+          return "深圳医保2档";
466
+
467
+          break;
468
+        case "A31003":
469
+          return "深圳医保3档";
470
+
471
+          break;
472
+        case "A31004":
473
+          return "二档(少儿)";
474
+
475
+          break;
476
+        case "A31005":
477
+          return "学生二档";
478
+
479
+          break;
480
+        case "A31006":
481
+          return "大学生二档";
482
+
483
+          break;
484
+        case "A32001":
485
+          return "在职公务员";
486
+          break;
487
+        case "A32002":
488
+          return "在职驻深公务员";
489
+
490
+          break;
491
+        case "A39301":
492
+          return "家属统筹医疗";
493
+
494
+          break;
495
+        case "A41001":
496
+          return "工伤在职";
497
+
498
+          break;
499
+        case "A51001":
500
+          return "生育在职";
501
+
502
+          break;
503
+        case "A52001":
504
+          return "生育医疗一档";
505
+
506
+          break;
507
+        case "A52002":
508
+          return "生育医疗一档";
509
+
510
+          break;
511
+        case "C31001":
512
+          return "一档医疗退休";
513
+
514
+          break;
515
+        case "C31002":
516
+          return "二档医疗退休";
517
+          break;
518
+      }
519
+    },
520
+  },
521
+  created() {
522
+    this.getAllDoctorList();
523
+    this.getInitData();
524
+    this.getPrescriptionPrint();
525
+    this.getHisPatientDetail();
526
+    this.getPatientCaseHistory();
527
+    var xtuser = this.$store.getters.xt_user;
528
+    this.orgname = xtuser.org.org_name;
529
+    this.org_id = this.$store.getters.xt_user.org_id;
530
+  },
531
+  watch: {
532
+    ids: function (val) {
533
+      this.ids = val;
534
+      this.getPrescriptionPrint();
535
+    },
536
+  },
537
+};
538
+</script>
539
+
540
+
541
+<style lang="scss" scoped>
542
+.prescription-print {
543
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
544
+  0 0 60px rgba(0, 0, 0, 0.06) inset;
545
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
546
+  0 0 40px rgba(0, 0, 0, 0.06) inset;
547
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
548
+  margin-bottom: 20px;
549
+  padding: 20px 10px;
550
+}
551
+.printTitle {
552
+  font-size: 22px;
553
+  text-align: center;
554
+  font-weight: bold;
555
+  margin-bottom: 10px;
556
+}
557
+.infoTitle {
558
+  display: flex;
559
+  margin-top: 10px;
560
+  line-height: 24px;
561
+}
562
+.infoTitle div {
563
+  width: 200px;
564
+}
565
+.infoMain {
566
+  display: flex;
567
+  flex-wrap: wrap;
568
+  margin-top: 10px;
569
+}
570
+.infoMain div {
571
+  width: 50%;
572
+  line-height: 24px;
573
+}
574
+.prescriptionBox {
575
+  padding: 0 10px;
576
+  min-height: 400px;
577
+}
578
+.Rp {
579
+  font-size: 22px;
580
+  font-weight: bold;
581
+}
582
+.drugsBox {
583
+  padding-left: 40px;
584
+  margin-bottom: 10px;
585
+}
586
+.drugsBox div {
587
+  line-height: 20px;
588
+}
589
+.drugsOne {
590
+  line-height: 24px;
591
+}
592
+.drugsOne span {
593
+  margin-right: 20px;
594
+}
595
+.doctorBox {
596
+  display: flex;
597
+  justify-content: space-between;
598
+  padding: 0 10px;
599
+  line-height: 24px;
600
+  border-bottom: 2px solid #000;
601
+}
602
+.actionBar {
603
+  display: flex;
604
+  justify-content: space-between;
605
+  line-height: 24px;
606
+  padding: 0 10px;
607
+}
608
+.actionBar p {
609
+  width: 150px;
610
+}
611
+.under_line {
612
+  display: inline-block;
613
+  border-bottom: 1px solid #000;
614
+  flex: 1;
615
+}
616
+</style>

+ 1 - 1
src/xt_pages/outpatientDoctorStation/print.vue Vedi File

@@ -18,7 +18,7 @@
18 18
 9675:测试
19 19
  -->
20 20
     <div class="dialysisPage" style="padding-top: 40px">
21
-      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243">
21
+      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243 && org_id != 0">
22 22
 
23 23
         <printOne v-if="org_id != 10088 && org_id != 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
24 24
 

+ 1 - 3
src/xt_pages/outpatientDoctorStation/template/printThree.vue Vedi File

@@ -71,9 +71,7 @@
71 71
             <div style="width: 13%;"></div>
72 72
             <div style="width: 33%; display: flex">
73 73
               处方编号:<span class="under_line">{{
74
-                item.prescription_number.substring(
75
-                  item.prescription_number.length - 6
76
-                )
74
+              item.id
77 75
               }}</span>
78 76
             </div>
79 77
           </div>