Browse Source

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

csx 2 years ago
parent
commit
f3f1ef728d

+ 5 - 0
src/router/modules/hisTool.js View File

@@ -57,6 +57,11 @@ export default {
57 57
       component: () => import('@/xt_pages/outpatientTool/yidiClear'),
58 58
       name: 'yidiClear',
59 59
       meta: { title: 'yidiClear', noCache: true }
60
+    },{
61
+      path: '/hisTool/statistics',
62
+      component: () => import('@/xt_pages/outpatientTool/statistics'),
63
+      name: 'statistics',
64
+      meta: { title: 'statistics', noCache: true }
60 65
     },
61 66
 
62 67
   ]

+ 2 - 2
src/xt_pages/hospitalStation/invoiceTemplate/printTwo.vue View File

@@ -35,8 +35,8 @@
35 35
             <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
36 36
             <div v-if="paramsObj.gend == 1" style="position: absolute;top:110px;left:100px;">√</div>
37 37
             <div v-else style="position: absolute;top:110px;left:140px;">√</div>
38
-            <div style="position: absolute;top:110px;left:260px;">{{ list.number.length <= 13 ? (totalPrice - list.psn_cash_money).toFixed(2) : '0.00' }}</div>
39
-            <div style="position: absolute;top:110px;left:420px;">{{ list.number.length <= 13 ? list.psn_cash_money.toFixed(2) : (totalPrice - list.psn_cash_money).toFixed(2) }}</div>
38
+            <div style="position: absolute;top:110px;left:260px;">{{ list.his_hospital_record.number.length <= 13 ? (totalPrice - list.order.psn_cash_money).toFixed(2) : '0.00' }}</div>
39
+            <div style="position: absolute;top:110px;left:420px;">{{ list.his_hospital_record.number.length <= 13 ? list.order.psn_cash_money.toFixed(2) : (totalPrice - list.psn_cash_money).toFixed(2) }}</div>
40 40
             <div style="position: absolute;top:110px;left:540px;">现金</div>
41 41
         </div>
42 42
         <div style="display:flex;justify-content: space-between;">

+ 7 - 7
src/xt_pages/hospitalStation/settlementTemplate/hospitalSettlePrint.vue View File

@@ -696,7 +696,7 @@
696 696
                   </tr>
697 697
                   <tr>
698 698
                     <td>其他支付:</td>
699
-                    <td>&nbsp;</td>
699
+                    <td>&nbsp;{{info.oth_pay}}</td>
700 700
                   </tr>
701 701
                   <tr>
702 702
                     <td>大病保险</td>
@@ -712,11 +712,11 @@
712 712
                   </tr>
713 713
                   <tr>
714 714
                     <td>大额补充</td>
715
-                    <td>&nbsp;</td>
715
+                    <td>&nbsp;{{info.hifob_pay}}</td>
716 716
                   </tr>
717 717
                   <tr>
718 718
                     <td>企业补充</td>
719
-                    <td>&nbsp;</td>
719
+                    <td>&nbsp;{{info.hifes_pay}}</td>
720 720
                   </tr>
721 721
                   <tr>
722 722
                     <td>......</td>
@@ -736,19 +736,19 @@
736 736
                   <tr>
737 737
                     <td rowspan="4" style="width:4%;">个人支付</td>
738 738
                     <td style="width:36%">个人自付</td>
739
-                    <td>{{info.psn_pay}}</td>
739
+                    <td>{{info.psn_part_amt}}</td>
740 740
                   </tr>
741 741
                   <tr>
742 742
                     <td style="width:36%">个人自费</td>
743
-                    <td>&nbsp;</td>
743
+                    <td>{{info.psn_cash_pay}}</td>
744 744
                   </tr>
745 745
                   <tr>
746 746
                     <td style="width:36%">个人账户支付</td>
747
-                    <td>&nbsp;</td>
747
+                    <td>{{info.acct_pay}}</td>
748 748
                   </tr>
749 749
                   <tr>
750 750
                     <td style="width:36%">个人现金支付</td>
751
-                    <td>&nbsp;</td>
751
+                    <td>{{info.psn_cash_pay}}</td>
752 752
                   </tr>
753 753
 
754 754
                   </tbody>

+ 4 - 1
src/xt_pages/outpatientCharges/allListPrint.vue View File

@@ -15,6 +15,7 @@
15 15
 
16 16
     <div class='dialysisPage' style="padding-top:40px;">
17 17
       <printOne :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printOne>
18
+<!--      <list-print-two :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></list-print-two>-->
18 19
     </div>
19 20
   </div>
20 21
 </template>
@@ -23,10 +24,12 @@
23 24
   import { getHisOrderDetailCollect } from '@/api/his/his'
24 25
   import { uParseTime } from '@/utils/tools'
25 26
   import printOne from './allListTemplate/printOne'
27
+  import ListPrintTwo from './listTemplate/listPrintTwo'
26 28
 
27 29
   export default {
28 30
     name: 'allListPrint',
29 31
     components: {
32
+      ListPrintTwo,
30 33
       printOne
31 34
     },
32 35
     props: {
@@ -276,7 +279,7 @@
276 279
       printThisPage() {
277 280
 
278 281
         const style =
279
-          '@media print {.allListTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.allListInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .allListTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;text-align:left;}.allListTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
282
+          '@media print {.allListTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.allListInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .allListTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 20px;font-size: 14px;border-color: #000;text-align:left;}.allListTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
280 283
         printJS({
281 284
           printable: 'allList-print',
282 285
           type: 'html',

+ 1 - 1
src/xt_pages/outpatientCharges/allListTemplate/printOne.vue View File

@@ -167,7 +167,7 @@ export default {
167 167
   width: 100%;
168 168
   text-align: center;
169 169
   border-collapse: collapse;
170
-  line-height: 40px;
170
+  line-height: 20px;
171 171
   font-size: 14px;
172 172
   border-color: #000;
173 173
   text-align: left;

+ 13 - 0
src/xt_pages/outpatientCharges/allListTemplate/summary.vue View File

@@ -0,0 +1,13 @@
1
+<template>
2
+
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  name: 'summary'
8
+}
9
+</script>
10
+
11
+<style scoped>
12
+
13
+</style>

+ 4 - 1
src/xt_pages/outpatientCharges/listPrint.vue View File

@@ -17,6 +17,7 @@
17 17
       <printOne v-if="org_id != 10106" :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
18 18
       <printTwo v-if="org_id == 10106 && this.paramsObj.balance_accounts_type != 2" :info="info" :order_infos="order_infos" :p_admin="p_admin" :charge_admin="charge_admin"></printTwo>
19 19
       <print-three v-if="org_id == 10106 && this.paramsObj.balance_accounts_type == 2" :info="info" :order_infos="order_infos" :p_admin="p_admin" :charge_admin="charge_admin"></print-three>
20
+<!--      <list-print-two></list-print-two>-->
20 21
     </div>
21 22
   </div>
22 23
 </template>
@@ -30,10 +31,12 @@
30 31
   import { uParseTime } from '@/utils/tools'
31 32
   import axios from 'axios'
32 33
   import PrintThree from './listTemplate/printThree'
34
+  import ListPrintTwo from './listTemplate/listPrintTwo'
33 35
 
34 36
   export default {
35 37
     name: 'listPrint',
36 38
     components: {
39
+      ListPrintTwo,
37 40
       PrintThree,
38 41
       printOne,
39 42
       printTwo
@@ -190,7 +193,7 @@
190 193
       printThisPage() {
191 194
         if(this.org_id != 10106){
192 195
           const style =
193
-          '@media print {.listTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
196
+          '@media print {.listTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 20px;font-size: 14px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 10px;}.tableBottomOne{margin-right: 40px;}}'
194 197
           printJS({
195 198
             printable: 'list-print',
196 199
             type: 'html',

+ 173 - 0
src/xt_pages/outpatientCharges/listTemplate/listPrintTwo.vue View File

@@ -0,0 +1,173 @@
1
+<template>
2
+  <div id="allList-print" class="allList-print">
3
+      <div class="allListTitle">{{ $store.getters.xt_user.org.org_name }}费用清单</div>
4
+      <div class="allListInfo">
5
+        <div>患者姓名:{{ patient.name }}</div>
6
+        <div>性别:{{ patient.gender == 1 ? '男' : '女' }}</div>
7
+        <div>结算类型:{{balance_accounts_type == 1 ?'医保':'自费'}}</div>
8
+        <div>发票号码:</div>
9
+        <div>住院/门诊号:{{order.mdtrt_id}}</div>
10
+        <div>科室:</div>
11
+        <div>就诊流水号:</div>
12
+        <div>总费用:{{order.medfee_sumamt}}</div>
13
+        <div>个人支付:{{order.psn_part_amt}}</div>
14
+        <div>基金支付记账:{{order.fund_pay_sumamt}}</div>
15
+        <div>补充医疗支付记账:0.00</div>
16
+        <div>救助支付金额:{{order.maf_pay}}</div>
17
+      </div>
18
+      <table class="allListTable" border="1">
19
+        <tr>
20
+          <td style="width:10%">序号</td>
21
+          <td style="width:10%">处方日期</td>
22
+          <td style="width:10%">费用编号</td>
23
+          <td style="width:10%">费用名称/规格</td>
24
+          <td style="width:10%">单位</td>
25
+          <td style="width:10%">数量</td>
26
+          <td style="width:10%">单价</td>
27
+          <td style="width:10%">金额</td>
28
+        </tr>
29
+        <template v-for='(item,index) in list'>
30
+          <tr>
31
+            <td style="width:10%">{{index + 1}}</td>
32
+            <td style="width:10%">{{}}</td>
33
+            <td style="width:10%">{{ item.feedetl_sn }}</td>
34
+            <td style="width:50%">{{ }}</td>
35
+            <td style="width:10%">{{ }}</td>
36
+            <td style="width:10%">{{ item.cnt }}</td>
37
+            <td style="width:10%">{{ item.pric }}</td>
38
+            <td style="width:10%">{{ (item.pric * item.cnt).toFixed(2) }}</td>
39
+          </tr>
40
+        </template>
41
+      </table>
42
+
43
+    </div>
44
+</template>
45
+
46
+<script>
47
+import { uParseTime } from '@/utils/tools'
48
+
49
+export default {
50
+  props: {
51
+    list: {
52
+      type: Array,
53
+      default: function() {
54
+        return []
55
+      }
56
+    }, patient: {
57
+      type: Object,
58
+      default: function() {
59
+        return {}
60
+      }
61
+    }, order: {
62
+      type: Object,
63
+      default: function() {
64
+        return {}
65
+      }
66
+    }, admin: {
67
+      type: Object,
68
+      default: function() {
69
+        return {}
70
+      }
71
+    }, hospital: {
72
+      type: Object,
73
+      default: function() {
74
+        return {}
75
+      }
76
+
77
+    }
78
+  },
79
+  data() {
80
+    return {
81
+      page: 1,
82
+      pageArr: []
83
+    }
84
+  },
85
+  methods: {
86
+    getNowTime: function() {
87
+      let dateTime
88
+      let yy = new Date().getFullYear()
89
+      let mm = new Date().getMonth() + 1
90
+      let dd = new Date().getDate()
91
+      let hh = new Date().getHours()
92
+      let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
93
+          :
94
+          new Date().getMinutes()
95
+      let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
96
+          :
97
+          new Date().getSeconds()
98
+      dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
99
+      return dateTime
100
+    },
101
+    getTimes(time) {
102
+      return uParseTime(time, '{y}-{m}-{d}')
103
+    }, getTotal: function(items) {
104
+      let total = 0
105
+      for (let i = 0; i < items.length; i++) {
106
+        total = total + (items[i].count * items[i].price).toFixed(2)
107
+      }
108
+      return total
109
+
110
+    },
111
+
112
+
113
+  },
114
+  watch: {
115
+    list: {
116
+      handler(newVal) {
117
+        this.getPage()
118
+      },
119
+      deep: true
120
+    }
121
+  }
122
+}
123
+
124
+
125
+</script>
126
+
127
+<style lang="scss" scoped>
128
+.allList-print {
129
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
130
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
131
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
132
+  margin-bottom: 20px;
133
+  padding: 20px 10px;
134
+}
135
+
136
+.allListTitle {
137
+  font-size: 24px;
138
+  text-align: center;
139
+  font-weight: bold;
140
+  margin-bottom: 10px;
141
+}
142
+
143
+.allListInfo {
144
+  display: flex;
145
+  font-size: 16px;
146
+  justify-content: space-between;
147
+  margin: 10px 0;
148
+}
149
+
150
+.allListTable {
151
+  width: 100%;
152
+  text-align: center;
153
+  border-collapse: collapse;
154
+  line-height: 20px;
155
+  font-size: 14px;
156
+  border-color: #000;
157
+  text-align: left;
158
+}
159
+
160
+.allListTable tr td {
161
+  padding: 0 5px;
162
+}
163
+
164
+.tableBottom {
165
+  font-size: 16px;
166
+  display: flex;
167
+  margin-top: 20px;
168
+}
169
+
170
+.tableBottomOne {
171
+  margin-right: 40px;
172
+}
173
+</style>

+ 1 - 1
src/xt_pages/outpatientCharges/listTemplate/printOne.vue View File

@@ -153,7 +153,7 @@
153 153
     width: 100%;
154 154
     text-align: center;
155 155
     border-collapse: collapse;
156
-    line-height: 40px;
156
+    line-height: 20px;
157 157
     font-size: 14px;
158 158
     border-color: #000;
159 159
     text-align: left;

+ 2 - 2
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -142,7 +142,7 @@
142 142
                           >
143 143
 
144 144
                             <el-button
145
-                           su     v-if="radio == 1"
145
+                                v-if="radio == 1"
146 146
                                 size="small"
147 147
                                 @click="openDialog(item)"
148 148
                                 type="primary"
@@ -2960,7 +2960,7 @@ export default {
2960 2960
           }).catch(() => {
2961 2961
           })
2962 2962
         } else {
2963
-          if(this.order.id > 0){
2963
+          if(this.$store.getters.xt_user.org_id == 10215 && this.order.id > 0){
2964 2964
             this.$message.error("该就诊号尚未撤销明细或者退费无法进行退号操作")
2965 2965
             return
2966 2966
           }

+ 16 - 1
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printOne.vue View File

@@ -15,7 +15,7 @@
15 15
           class="prescription-print"
16 16
           style="page-break-after: always"
17 17
           v-for="(item, index) in i.prescriptions"
18
-          v-if="getTeam(i.prescriptions).length > 0"
18
+          v-if="item.project.length > 0 && getTeam(i.prescriptions).length > 0"
19 19
           :key="index"
20 20
       >
21 21
         <div class="printTitle">检验申请单</div>
@@ -172,6 +172,19 @@ export default {
172 172
         }
173 173
       }
174 174
       return name
175
+    }, unique_two(array) {
176
+      var res = []
177
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
178
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
179
+          if (array[i].team_id === res[j].team_id) {
180
+            break
181
+          }
182
+        }
183
+        if (j === resLen) {
184
+          res.push(array[i])
185
+        }
186
+      }
187
+      return res
175 188
     },
176 189
     getTime(value, temp) {
177 190
       if (value != undefined) {
@@ -200,6 +213,8 @@ export default {
200 213
         // }
201 214
       })
202 215
       let data = []
216
+      console.log(projectPrint)
217
+      projectPrint =  this.unique_two(projectPrint)
203 218
       projectPrint.map((item) => {
204 219
         // console.log(item, "999");
205 220
         if (item.team.id == 0) {

+ 365 - 0
src/xt_pages/outpatientDoctorStation/batch_print_template/batchPrintTwo.vue View File

@@ -0,0 +1,365 @@
1
+<template>
2
+  <div id='prescriptionPrint'>
3
+    <div v-for="(i, index) in printData" :key="index">
4
+      <div v-for="(item, index) in i.prescriptions" :key="index">
5
+        <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
6
+          <div class="printTitle">{{orgname}}处方笺</div>
7
+          <div class="infoTitle">
8
+            <p>姓名:{{i.his_patient.id != 0 ? i.his_patient.name : i.name}}</p>
9
+            <p>性别:
10
+              <span v-if="item.gender == 1">男</span>
11
+              <span v-if="item.gender == 2">女</span>
12
+            </p>
13
+            <p>年龄:{{ i.his_patient.id != 0 ? getAge(i.his_patient) : i.age}}岁</p>
14
+          </div>
15
+          <div class="infoMain">
16
+            <div style="margin-bottom: 10px;">门诊号:{{ i.his_patient.id != 0 ? i.his_patient.number : ""}}</div>
17
+            <div style="margin-bottom: 10px;">科室:{{ i.info.id != 0
18
+                ? getDepart(i.info.departments)
19
+                : ""}}</div>
20
+            <div style="margin-bottom: 10px;">医保卡号:</div>
21
+            <div style="margin-bottom: 10px;">电话:{{i.phone}}</div>
22
+            <div>地址:{{i.home_address}}</div>
23
+            <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(i.info.diagnosis)}}</div>
24
+          </div>
25
+          <div class="prescriptionBox">
26
+            <div class="Rp">Rp:</div>
27
+            <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
28
+              <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div> -->
29
+              <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;<span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
30
+              <div style="margin-left:100px;"><span>{{it.drug.drug_spec}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</span></div>
31
+            </div>
32
+            <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
33
+              <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
34
+            </div>
35
+
36
+            <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
37
+              <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;<span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
38
+              <div style="margin-left:100px;"><span>{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</span></div>
39
+            </div>
40
+            <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
41
+              <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
42
+            </div>
43
+            <div style="text-align:center;" >(以下空白)</div>
44
+
45
+          </div>
46
+          <div class="doctorBox">
47
+            <p>医师:{{item.doctor?item.doctor:""}}</p>
48
+            <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
49
+          </div>
50
+          <div class="actionBar">
51
+            <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
52
+            <p>配对:</p>
53
+            <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
54
+            <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
55
+            <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
56
+
57
+            <p>审核:</p>
58
+            <p>配对:</p>
59
+            <p>核对:</p>
60
+            <p>发药:</p>
61
+            药费:{{
62
+              getTotalOne(item.advices).toFixed(2)
63
+                  ? getTotalOne(item.advices).toFixed(2)
64
+                  : 0
65
+            }}元
66
+            <!--            <p>药费:551.2元</p>-->
67
+            <!--            <p>药费:466.2元</p>-->
68
+
69
+
70
+          </div>
71
+          <div style="page-break-after:always"></div>
72
+        </div>
73
+      </div>
74
+
75
+    </div>
76
+
77
+  </div>
78
+
79
+
80
+</template>
81
+<script>
82
+import { jsGetAge, uParseTime } from '@/utils/tools'
83
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
84
+import {getInitData} from "@/api/his/his"
85
+export default {
86
+    props:{
87
+      patient_id: String,
88
+      record_date: String,
89
+      prescription_id: String,
90
+      ids: String,
91
+      printData: Array,
92
+    },
93
+    data(){
94
+      return {
95
+        doctorList: [],
96
+        advicePrint: {},
97
+        patient: {},
98
+        tableData: [],
99
+        prescriptionInfo: [],
100
+        hisPatient: {},
101
+        department: [],
102
+        prescriptions: [],
103
+        projectList: [],
104
+        orgname: "",
105
+        diagnoses: [],
106
+        org_id: 0,
107
+      }
108
+    },
109
+   methods:{
110
+     getAge(patient){
111
+       var thisLen = patient.id_card_no.length
112
+       var birth = ''
113
+       if (thisLen == 15) {
114
+         birth = '19' + patient.id_card_no.substr(6, 6)
115
+       } else {
116
+         birth = patient.id_card_no.substr(6, 8)
117
+       }
118
+       var births =
119
+         birth.substr(0, 4) +
120
+         '-' +
121
+         birth.substr(4, 2) +
122
+         '-' +
123
+         birth.substr(6, 2)
124
+        return jsGetAge(births, '-')
125
+
126
+     },
127
+
128
+     getAllDoctorList(){
129
+      getAllDoctorList().then(response=>{
130
+        if(response.data.state == 1){
131
+               var doctor =  response.data.data.doctor
132
+
133
+               this.doctorList = doctor
134
+             }
135
+         })
136
+     },
137
+
138
+      getDoctor(id){
139
+        var name = ""
140
+        for(let i=0;i<this.doctorList.length;i++){
141
+          if(id == this.doctorList[i].admin_user_id){
142
+              name = this.doctorList[i].user_name
143
+          }
144
+        }
145
+        return name
146
+      },
147
+      getTime(value, temp) {
148
+        if (value != undefined) {
149
+            return uParseTime(value, temp)
150
+        }
151
+        return ''
152
+     },
153
+       getPrescriptionPrint(){
154
+         var params = {
155
+          // patient_id:this.patient_id,
156
+          // record_date:this.record_date,
157
+          // prescription_id:this.prescription_id,
158
+          patient_id:this.patient_id,
159
+          record_date:this.record_date,
160
+          prescription_id:this.prescription_id,
161
+          ids:this.ids,
162
+           p_type:2,
163
+
164
+         }
165
+        console.log("params",params)
166
+       getPrescriptionPrint(params).then(response=>{
167
+         if(response.data.state == 1){
168
+            var advicePrint =  response.data.data.advicePrint
169
+            console.log("adviceprint9999",advicePrint)
170
+            this.advicePrint = advicePrint
171
+            this.prescriptions = advicePrint
172
+            console.log("处方222222",this.prescriptions)
173
+            var hisPatient = response.data.data.hisPatient
174
+            console.log("hisPatient",hisPatient)
175
+            this.hisPatient = hisPatient
176
+            var projectlist =  response.data.data.projectlist
177
+            console.log("所有项目列表",projectlist)
178
+            this.projectList = projectlist
179
+          }
180
+       })
181
+     },
182
+     getHisPatientDetail(){
183
+          const params = {
184
+              patient_id:this.patient_id
185
+          }
186
+       getHisPatientDetail(params).then(response=>{
187
+          if(response.data.state == 1){
188
+             var hisPatient =  response.data.data.hisPatient
189
+             console.log("挂号病人",hisPatient)
190
+             this.hisPatient = hisPatient
191
+          }
192
+       })
193
+     },
194
+     getInitData(){
195
+       getInitData().then(response=>{
196
+          if(response.data.state == 1){
197
+            this.department = response.data.data.department
198
+            this.diagnoses = response.data.data.diagnose
199
+            console.log("争端",this.diagnoses)
200
+          }
201
+       })
202
+     },
203
+     getDepart(id){
204
+         var name = ""
205
+       for(let i=0;i<this.department.length;i++){
206
+           if(id == this.department[i].id){
207
+               name = this.department[i].name
208
+           }
209
+       }
210
+       return name
211
+     },
212
+    getTotalOne(id) {
213
+
214
+        var total = 0
215
+        var addtotal = 0
216
+        for (let i = 0; i < this.prescriptions.length; i++) {
217
+          if(id == this.prescriptions[i].id){
218
+            if (this.prescriptions[i].project != null) {
219
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
220
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
221
+              }
222
+            }
223
+
224
+            if (this.prescriptions[i].additionalcharge != null) {
225
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
226
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
227
+              }
228
+            }
229
+              addtotal =  Math.floor(addtotal * 100) / 100
230
+        }
231
+
232
+       }
233
+
234
+      for (let i = 0; i < this.prescriptions.length; i++) {
235
+          if(id == this.prescriptions[i].id){
236
+            if (this.prescriptions[i].advices != null) {
237
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
238
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
239
+              }
240
+            }
241
+
242
+            if (this.prescriptions[i].additionalcharge != null) {
243
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
244
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
245
+              }
246
+            }
247
+              addtotal =  Math.floor(addtotal * 100) / 100
248
+        }
249
+       }
250
+
251
+        return total + addtotal
252
+      },
253
+
254
+     getProjectName(id){
255
+        var project_name = ""
256
+        for(let i=0;i<this.projectList.length;i++){
257
+           if(id == this.projectList[i].id){
258
+               project_name = this.projectList[i].project_name
259
+           }
260
+        }
261
+        return project_name
262
+     },
263
+
264
+     getDiagnosis(id){
265
+       let arr = id.split(',')
266
+       var name = ""
267
+       for(let i=0;i<this.diagnoses.length;i++){
268
+         if(arr.indexOf(String(this.diagnoses[i].id)) > -1){
269
+           name += this.diagnoses[i].class_name + ' '
270
+         }
271
+       }
272
+       return name
273
+     }
274
+
275
+   },
276
+   created(){
277
+      this.getAllDoctorList()
278
+      this.getInitData()
279
+      this.getPrescriptionPrint()
280
+      this.getHisPatientDetail()
281
+      var xtuser = this.$store.getters.xt_user;
282
+      this.orgname = xtuser.org.org_name;
283
+
284
+   },
285
+   watch:{
286
+     ids:function(val){
287
+      this.ids = val
288
+      this.getPrescriptionPrint()
289
+    }
290
+   }
291
+}
292
+</script>
293
+
294
+
295
+<style lang="scss" scoped>
296
+.prescription-print{
297
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
298
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
299
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
300
+    margin-bottom: 20px;
301
+    padding:20px 10px;
302
+}
303
+.printTitle{
304
+    font-size: 22px;
305
+    text-align: center;
306
+    font-weight: bold;
307
+}
308
+.infoTitle{
309
+    display: flex;
310
+    border-bottom: 2px solid #000;
311
+    margin-top:10px;
312
+    line-height: 24px;
313
+    padding:0 10px;
314
+}
315
+.infoTitle p{
316
+    width: 200px;
317
+}
318
+.infoMain{
319
+    display: flex;
320
+    flex-wrap: wrap;
321
+    border-bottom: 2px solid #000;
322
+    padding:0 10px;
323
+}
324
+.infoMain div{
325
+    width: 50%;
326
+    line-height: 24px;
327
+}
328
+.prescriptionBox{
329
+    padding:0 10px;
330
+    min-height:450px;
331
+}
332
+.Rp{
333
+    font-size: 22px;
334
+    font-weight: bold;
335
+}
336
+.drugsBox{
337
+    padding-left: 40px;
338
+    margin-bottom: 10px;
339
+}
340
+.drugsBox div{
341
+    line-height: 20px;
342
+}
343
+.drugsOne{
344
+    line-height: 24px;
345
+}
346
+.drugsOne span{
347
+    margin-right: 20px;
348
+}
349
+.doctorBox{
350
+    display: flex;
351
+    justify-content: space-between;
352
+    padding:0 10px;
353
+    line-height: 24px;
354
+    border-bottom: 2px solid #000;
355
+}
356
+.actionBar{
357
+    display: flex;
358
+    justify-content: space-between;
359
+    line-height: 24px;
360
+    padding:0 10px;
361
+}
362
+.actionBar p{
363
+    width:150px;
364
+}
365
+</style>

+ 11 - 9
src/xt_pages/outpatientDoctorStation/batch_print_template/index.vue View File

@@ -14,13 +14,13 @@
14 14
 
15 15
     <div class='dialysisPage' style="padding-top:40px;">
16 16
       <div v-if="org_id != 10138 && org_id != 10278">
17
-        <printOne v-if="org_id != 10088 && org_id != 10215" :printData="printData"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18
-        <printFour v-if="org_id == 10088" 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"></printFour>
19
-        <printFive v-if="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"></printFive>
20
-      </div>
21
-      <div v-else>
22
-        <printThree 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"></printThree>
17
+        <printOne v-if="org_id != 10088 && org_id != 10215  && org_id != 0" :printData="printData"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18
+        <batch-print-two v-if="org_id == 10088 || org_id == 0" :printData="printData"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></batch-print-two>
19
+<!--        <print-six v-if="org_id == 10088 || org_id == 0" :printData="printData"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></print-six>-->
20
+<!--        <printFour v-if="org_id == 10088 || org_id == 0"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>-->
21
+<!--        <printFive v-if="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"></printFive>-->
23 22
       </div>
23
+
24 24
     </div>
25 25
   </div>
26 26
 </template>
@@ -36,13 +36,15 @@ import { jsGetAge, uParseTime } from "@/utils/tools";
36 36
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
37 37
 import print from "print-js";
38 38
 import printOne from "./printOne"
39
-// import printThree from "./template/printThree"
40
-// import printFour from "./template/printFour"
41
-// import printFive from "./template/printFive"
39
+import printFour from "./batchPrintTwo"
42 40
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
41
+import PrintSix from '../template/printSix'
42
+import BatchPrintTwo from './batchPrintTwo'
43 43
 export default {
44 44
   name: "dialysisPrintOrder",
45 45
   components: {
46
+    BatchPrintTwo,
47
+    PrintSix,
46 48
     BreadCrumb,
47 49
     printOne
48 50
   },

+ 2 - 2
src/xt_pages/outpatientDoctorStation/batch_print_template/printOne.vue View File

@@ -43,8 +43,8 @@
43 43
             </div>
44 44
             <div style="margin-bottom: 10px">
45 45
               科室:{{
46
-                i.his_patient.id != 0
47
-                  ? getDepart(i.his_patient.departments)
46
+                i.info.id != 0
47
+                  ? getDepart(i.info.departments)
48 48
                   : ""
49 49
               }}
50 50
             </div>

+ 1 - 2
src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/printOne.vue View File

@@ -1,8 +1,7 @@
1 1
 <template>
2 2
   <div id='prescriptionPrint'>
3 3
     <div v-for="(i,index) in printData">
4
-      <div id='prescription-print' class="prescription-print" v-for="(item,index) in i.prescriptions" :key="index">
5
-
4
+      <div id='prescription-print' class="prescription-print" v-for="(item,index) in i.prescriptions" :key="index" v-if="item.project.length > 0">
6 5
         <div style="display:flex;justify-content: space-between;font-weight:bold;align-items:center;">
7 6
           <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
8 7
             <span>费别</span>

+ 9 - 5
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -134,7 +134,7 @@
134 134
             <!-- <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> -->
135 135
           </div>
136 136
           <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子病历'">
137
-            <el-button size="small" :loading="keepLoad" @click="opentwo(1)" type="primary">保存</el-button>
137
+            <el-button size="small" @click="opentwo(1)" type="primary">保存</el-button>
138 138
             <el-button size="small" @click="opentwo(2)" type="primary">打印</el-button>
139 139
             <el-button size="small" @click="opentwo(3)" type="primary">病历调用</el-button>
140 140
             <el-button size="small" @click="opentwo(4)" type="primary">存模板</el-button>
@@ -275,7 +275,6 @@
275 275
         <template>
276 276
           <el-button
277 277
               style="float:right;"
278
-              :loading="loading"
279 278
               size="small"
280 279
               icon="el-icon-printer"
281 280
               @click="printThisPage"
@@ -4504,7 +4503,8 @@ export default {
4504 4503
           record: this.record_date,
4505 4504
           prescription_id: this.prescription_id,
4506 4505
           ids: ids1,
4507
-          patient_id: this.patientid
4506
+          patient_id: this.patientid,
4507
+          his_patient_id: this.hisPatientInfo.id,
4508 4508
         }
4509 4509
         this.paramsObj = obj1
4510 4510
       }
@@ -4520,7 +4520,9 @@ export default {
4520 4520
           record: this.record_date,
4521 4521
           prescription_id: this.prescription_id,
4522 4522
           ids: ids2,
4523
-          patient_id: this.patientid
4523
+          patient_id: this.patientid,
4524
+          his_patient_id: this.hisPatientInfo.id,
4525
+
4524 4526
         }
4525 4527
         this.paramsObj2 = obj2
4526 4528
       }
@@ -4534,7 +4536,9 @@ export default {
4534 4536
           record: this.record_date,
4535 4537
           prescription_id: this.prescription_id,
4536 4538
           ids: ids2,
4537
-          patient_id: this.patientid
4539
+          patient_id: this.patientid,
4540
+          his_patient_id: this.hisPatientInfo.id,
4541
+
4538 4542
         }
4539 4543
         this.paramsObj3 = obj3
4540 4544
       }

+ 259 - 248
src/xt_pages/outpatientDoctorStation/pastInquiries.vue View File

@@ -6,94 +6,99 @@
6 6
     <div class="app-container">
7 7
       <div class="cell clearfix">
8 8
         <el-input
9
-          size="small"
10
-          style="width: 150px"
11
-          v-model="keywords"
12
-          class="filter-item"
9
+            size="small"
10
+            style="width: 150px"
11
+            v-model="keywords"
12
+            class="filter-item"
13 13
         />
14 14
         <el-button
15
-          size="small"
16
-          style="margin: 0 10px"
17
-          class="filter-item"
18
-          type="primary"
19
-          @click="searchAction"
20
-          >搜索
15
+            size="small"
16
+            style="margin: 0 10px"
17
+            class="filter-item"
18
+            type="primary"
19
+            @click="searchAction"
20
+        >搜索
21 21
         </el-button>
22 22
         <el-date-picker
23
-          v-model="record_date"
24
-          prefix-icon="el-icon-date"
25
-          @change="handleScheduleDateChange"
26
-          :editable="false"
27
-          :clearable="false"
28
-          style="width: 196px; margin-right: 10px"
29
-          type="date"
30
-          format="yyyy-MM-dd"
31
-          value-format="yyyy-MM-dd"
32
-          placeholder="选择日期时间"
33
-          align="right"
23
+            v-model="record_date"
24
+            prefix-icon="el-icon-date"
25
+            @change="handleScheduleDateChange"
26
+            :editable="false"
27
+            :clearable="false"
28
+            style="width: 196px; margin-right: 10px"
29
+            type="date"
30
+            format="yyyy-MM-dd"
31
+            value-format="yyyy-MM-dd"
32
+            placeholder="选择日期时间"
33
+            align="right"
34 34
         ></el-date-picker>
35 35
         <el-button
36
-          size="small"
37
-          style="margin: 0 10px"
38
-          class="filter-item"
39
-          type="primary"
40
-          @click="batchPrint(1)"
41
-          >处方筏批量打印</el-button
36
+            size="small"
37
+            style="margin: 0 10px"
38
+            class="filter-item"
39
+            type="primary"
40
+            @click="batchPrint(1)"
41
+        >处方筏批量打印
42
+        </el-button
42 43
         >
43 44
         <el-button
44
-          size="small"
45
-          style="margin: 0 10px"
46
-          class="filter-item"
47
-          type="primary"
48
-          @click="batchPrint(2)"
49
-          >治疗单批量打印</el-button
45
+            size="small"
46
+            style="margin: 0 10px"
47
+            class="filter-item"
48
+            type="primary"
49
+            @click="batchPrint(2)"
50
+        >治疗单批量打印
51
+        </el-button
50 52
         >
51 53
         <el-button
52
-          size="small"
53
-          style="margin: 0 10px"
54
-          class="filter-item"
55
-          type="primary"
56
-          @click="batchPrint(3)"
57
-          >检验单批量打印</el-button
54
+            size="small"
55
+            style="margin: 0 10px"
56
+            class="filter-item"
57
+            type="primary"
58
+            @click="batchPrint(3)"
59
+        >检验单批量打印
60
+        </el-button
58 61
         >
59 62
       </div>
60 63
       <el-table
61
-        :data="tableData"
62
-        border
63
-        ref="table"
64
-        style="width: 100%"
65
-        :row-style="{ color: '#303133' }"
66
-        @selection-change="handleSelectionChange"
67
-        :header-cell-style="{
64
+          :data="tableData"
65
+          border
66
+          ref="table"
67
+          style="width: 100%"
68
+          :row-style="{ color: '#303133' }"
69
+          @selection-change="handleSelectionChange"
70
+          :header-cell-style="{
68 71
           backgroundColor: 'rgb(245, 247, 250)',
69 72
           color: '#606266',
70 73
         }"
71
-        highlight-current-row
74
+          highlight-current-row
72 75
       >
73 76
         <el-table-column
74
-          align="center"
75
-          type="selection"
76
-          width="55"
77
+            align="center"
78
+            type="selection"
79
+            width="55"
77 80
         ></el-table-column>
78 81
         <el-table-column
79
-          align="center"
80
-          label="序号"
81
-          width="60"
82
-          type="index"
82
+            align="center"
83
+            label="序号"
84
+            width="60"
85
+            type="index"
83 86
         ></el-table-column>
84 87
         <el-table-column align="center" prop="name" label="姓名" width="100">
85 88
           <template slot-scope="scope">{{
86
-            scope.row.patients ? scope.row.patients.name : ""
87
-          }}</template>
89
+              scope.row.patients ? scope.row.patients.name : ''
90
+            }}
91
+          </template>
88 92
         </el-table-column>
89 93
         <el-table-column
90
-          align="center"
91
-          prop="name"
92
-          label="处方日期"
93
-          width="200"
94
+            align="center"
95
+            prop="name"
96
+            label="处方日期"
97
+            width="200"
94 98
         >
95 99
           <template slot-scope="scope">
96
-            {{ getTimes(scope.row.ctime) }}</template
100
+            {{ getTimes(scope.row.ctime) }}
101
+          </template
97 102
           >
98 103
         </el-table-column>
99 104
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
@@ -101,16 +106,18 @@
101 106
         <!--</el-table-column>-->
102 107
         <el-table-column align="center" prop="name" label="处方号">
103 108
           <template slot-scope="scope">{{
104
-            scope.row.prescription_number
105
-          }}</template>
109
+              scope.row.prescription_number
110
+            }}
111
+          </template>
106 112
         </el-table-column>
107 113
         <el-table-column align="center" prop="name" label="开立医生">
108 114
           <template slot-scope="scope">{{ scope.row.doctor }}</template>
109 115
         </el-table-column>
110 116
         <el-table-column align="center" prop="name" label="诊断">
111 117
           <template slot-scope="scope">{{
112
-            getDiagnosis(scope.row.diagnosis)
113
-          }}</template>
118
+              getDiagnosis(scope.row.diagnosis)
119
+            }}
120
+          </template>
114 121
         </el-table-column>
115 122
         <el-table-column align="center" prop="name" label="状态" width="100">
116 123
           <template slot-scope="scope">
@@ -121,58 +128,59 @@
121 128
         <el-table-column align="center" prop="name" label="操作" width="100">
122 129
           <template slot-scope="scope">
123 130
             <el-button
124
-              size="mini"
125
-              type="primary"
126
-              @click="handerShowDetail(scope.row)"
127
-              >详情</el-button
131
+                size="mini"
132
+                type="primary"
133
+                @click="handerShowDetail(scope.row)"
134
+            >详情
135
+            </el-button
128 136
             >
129 137
           </template>
130 138
         </el-table-column>
131 139
       </el-table>
132 140
       <el-pagination
133
-        @size-change="handleSizeChange"
134
-        @current-change="handleCurrentChange"
135
-        :page-sizes="[10, 50, 100]"
136
-        :page-size="10"
137
-        background
138
-        style="margin-top: 20px; float: right"
139
-        layout="total, sizes, prev, pager, next, jumper"
140
-        :total="total"
141
+          @size-change="handleSizeChange"
142
+          @current-change="handleCurrentChange"
143
+          :page-sizes="[10, 50, 100]"
144
+          :page-size="10"
145
+          background
146
+          style="margin-top: 20px; float: right"
147
+          layout="total, sizes, prev, pager, next, jumper"
148
+          :total="total"
141 149
       >
142 150
       </el-pagination>
143 151
       <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
144 152
       <el-dialog
145
-        class="centerDialog"
146
-        width="600px"
147
-        title="打印"
148
-        :visible.sync="innerVisible"
149
-        append-to-body
153
+          class="centerDialog"
154
+          width="600px"
155
+          title="打印"
156
+          :visible.sync="innerVisible"
157
+          append-to-body
150 158
       >
151 159
         <template>
152 160
           <el-button
153
-            style="float: right"
154
-            size="small"
155
-            icon="el-icon-printer"
156
-            @click="printThisPage(printData)"
157
-            type="primary"
158
-            >打印
161
+              style="float: right"
162
+              size="small"
163
+              icon="el-icon-printer"
164
+              @click="printThisPage(printData)"
165
+              type="primary"
166
+          >打印
159 167
           </el-button>
160 168
         </template>
161 169
         <div id="printMain">
162 170
           <print
163
-            ref="print"
164
-            v-if="printType == 1"
165
-            :printData="printData"
171
+              ref="print"
172
+              v-if="printType == 1"
173
+              :printData="printData"
166 174
           ></print>
167 175
           <treatPrint
168
-            ref="treatPrint"
169
-            v-if="printType == 2"
170
-            :printData="printData"
176
+              ref="treatPrint"
177
+              v-if="printType == 2"
178
+              :printData="printData"
171 179
           ></treatPrint>
172 180
           <checkPrint
173
-            ref="checkPrint"
174
-            v-if="printType == 3"
175
-            :printData="printData"
181
+              ref="checkPrint"
182
+              v-if="printType == 3"
183
+              :printData="printData"
176 184
           ></checkPrint>
177 185
         </div>
178 186
       </el-dialog>
@@ -181,32 +189,32 @@
181 189
 </template>
182 190
 
183 191
 <script>
184
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
185
-import inquiriesDetail from "./components/inquiriesDetail";
186
-import { getHisPrescriptionList } from "@/api/his/his";
187
-import { uParseTime } from "@/utils/tools";
188
-import { getInitData, getBatchPrint } from "@/api/his/his";
189
-import print from "./batch_print_template/index";
190
-import treatPrint from "./batch_print_treatTemplate/index";
191
-import checkPrint from "./batch_print_checkTemplate/index";
192
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
193
+import inquiriesDetail from './components/inquiriesDetail'
194
+import { getBatchPrint, getHisPrescriptionList, getInitData } from '@/api/his/his'
195
+import { uParseTime } from '@/utils/tools'
196
+import print from './batch_print_template/index'
197
+import treatPrint from './batch_print_treatTemplate/index'
198
+import checkPrint from './batch_print_checkTemplate/index'
199
+
192 200
 export default {
193 201
   components: {
194 202
     BreadCrumb,
195 203
     inquiriesDetail,
196 204
     print,
197 205
     treatPrint,
198
-    checkPrint,
206
+    checkPrint
199 207
   },
200 208
   data() {
201 209
     return {
202
-      keywords: "",
210
+      keywords: '',
203 211
       total: 0,
204
-      record_date: "",
212
+      record_date: '',
205 213
       page: 1,
206 214
       limit: 10,
207 215
       crumbs: [
208
-        { path: false, name: "门诊医生站" },
209
-        { path: false, name: "既往查询" },
216
+        { path: false, name: '门诊医生站' },
217
+        { path: false, name: '既往查询' }
210 218
       ],
211 219
       tableData: [],
212 220
       diagnoses: [],
@@ -214,55 +222,56 @@ export default {
214 222
       selecting_schs: [],
215 223
       printData: [],
216 224
       printType: 0,
217
-      org_id: "",
218
-    };
225
+      org_id: ''
226
+    }
219 227
   },
220 228
   methods: {
221 229
     printThisPage(printData) {
222 230
       printData.forEach((item) => {
223 231
         const print = new Promise((resolve, reject) => {
224 232
           if (item.prescriptions.length != 0) {
225
-            resolve(item.prescriptions);
233
+            resolve(item.prescriptions)
226 234
           } else {
227
-            reject(false);
235
+            reject(false)
228 236
           }
229
-        });
237
+        })
230 238
         print
231
-          .then((printData) => {
232
-            if (this.org_id == 10138) {
233
-              const style =
234
-                "@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 88%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 87%;}}}";
235
-              printJS({
236
-                printable: "printMain",
237
-                type: "html",
238
-                style: style,
239
-                scanStyles: false,
240
-              });
241
-            }
242
-            if (this.printType == 3) {
243
-              const style =
244
-                "@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}#prescriptionPrint div{box-shadow:none;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}";
245
-              printJS({
246
-                printable: "printMain",
247
-                type: "html",
248
-                style: style,
249
-                scanStyles: false,
250
-              });
251
-            } else {
252
-              const style =
253
-                "@media print {html {height: auto;margin: 0px;} #prescription-print{font-size:14px;border:1px solid white;margin-bottom:40px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}";
254
-              printJS({
255
-                printable: "printMain",
256
-                type: "html",
257
-                style: style,
258
-                scanStyles: false,
259
-              });
260
-            }
261
-          })
262
-          .catch((reject) => {});
263
-      });
239
+            .then((printData) => {
240
+              if (this.org_id == 10138) {
241
+                const style =
242
+                    '@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 88%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 87%;}}}'
243
+                printJS({
244
+                  printable: 'printMain',
245
+                  type: 'html',
246
+                  style: style,
247
+                  scanStyles: false
248
+                })
249
+              }
250
+              if (this.printType == 3) {
251
+                const style =
252
+                    '@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}#prescriptionPrint div{box-shadow:none;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}'
253
+                printJS({
254
+                  printable: 'printMain',
255
+                  type: 'html',
256
+                  style: style,
257
+                  scanStyles: false
258
+                })
259
+              } else {
260
+                const style =
261
+                    '@media print {html {height: auto;margin: 0px;} #prescription-print{font-size:14px;border:1px solid white;margin-bottom:40px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}'
262
+                printJS({
263
+                  printable: 'printMain',
264
+                  type: 'html',
265
+                  style: style,
266
+                  scanStyles: false
267
+                })
268
+              }
269
+            })
270
+            .catch((reject) => {
271
+            })
272
+      })
264 273
 
265
-      this.innerVisible = false;
274
+      this.innerVisible = false
266 275
       // this.$nextTick(() => {
267 276
       //   this.$refs.print.printThisPage()
268 277
       //   this.$refs.treatPrint.printThisPage()
@@ -271,202 +280,204 @@ export default {
271 280
     },
272 281
 
273 282
     searchAction() {
274
-      this.page = 1;
275
-      this.limit = 10;
276
-      this.getHisPrescriptionList();
283
+      this.page = 1
284
+      this.limit = 10
285
+      this.getHisPrescriptionList()
277 286
     },
278 287
     handleScheduleDateChange() {
279
-      this.page = 1;
280
-      this.limit = 10;
281
-      this.getHisPrescriptionList();
288
+      this.page = 1
289
+      this.limit = 10
290
+      this.getHisPrescriptionList()
282 291
     },
283 292
     handleCurrentChange(page) {
284
-      this.page = page;
285
-      this.getHisPrescriptionList();
293
+      this.page = page
294
+      this.getHisPrescriptionList()
286 295
     },
287 296
 
288 297
     handleSizeChange(limit) {
289
-      this.limit = limit;
290
-      this.getHisPrescriptionList();
298
+      this.limit = limit
299
+      this.getHisPrescriptionList()
291 300
     },
292 301
     getTimes(time) {
293
-      return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
302
+      return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
294 303
     },
295 304
     handerShowDetail(row) {
296 305
       if (row.id == 0) {
297
-        this.$message.error("未就诊");
298
-        return;
306
+        this.$message.error('未就诊')
307
+        return
299 308
       }
300
-      this.$refs.inquiriesDetail.show(row.id);
309
+      this.$refs.inquiriesDetail.show(row.id)
301 310
     },
302 311
     getHisPrescriptionList() {
303 312
       let params = {
304 313
         record_date: this.record_date,
305 314
         page: this.page,
306 315
         limit: this.limit,
307
-        keywords: this.keywords,
308
-      };
316
+        keywords: this.keywords
317
+      }
309 318
       getHisPrescriptionList(params).then((response) => {
310 319
         if (response.data.state == 0) {
311
-          this.$message.error(response.data.msg);
312
-          return false;
320
+          this.$message.error(response.data.msg)
321
+          return false
313 322
         } else {
314
-          this.tableData = response.data.data.order;
315
-          this.total = response.data.data.total;
323
+          this.tableData = response.data.data.order
324
+          this.total = response.data.data.total
316 325
           this.$nextTick(() => {
317
-            this.$refs.table.doLayout(); //解决表格错位
318
-          });
326
+            this.$refs.table.doLayout() //解决表格错位
327
+          })
319 328
         }
320
-      });
329
+      })
321 330
     },
322 331
     getInitData() {
323 332
       getInitData().then((response) => {
324 333
         if (response.data.state == 0) {
325
-          this.$message.error(response.data.msg);
326
-          return false;
334
+          this.$message.error(response.data.msg)
335
+          return false
327 336
         } else {
328
-          this.diagnoses = response.data.data.diagnose;
329
-          console.log("诊断列表", this.diagnoses);
337
+          this.diagnoses = response.data.data.diagnose
338
+          console.log('诊断列表', this.diagnoses)
330 339
         }
331
-      });
340
+      })
332 341
     },
333 342
     getDiagnosis(id) {
334
-      let ids = id.split(",");
335
-      var name = "";
343
+      let ids = id.split(',')
344
+      var name = ''
336 345
       for (let i = 0; i < ids.length; i++) {
337 346
         for (let b = 0; b < this.diagnoses.length; b++) {
338 347
           if (parseInt(ids[i]) == this.diagnoses[b].id) {
339 348
             if (name.length == 0) {
340
-              name = this.diagnoses[b].class_name;
349
+              name = this.diagnoses[b].class_name
341 350
             } else {
342
-              name = name + "," + this.diagnoses[b].class_name;
351
+              name = name + ',' + this.diagnoses[b].class_name
343 352
             }
344 353
           }
345 354
         }
346 355
       }
347
-      return name;
356
+      return name
348 357
     },
349 358
     handleSelectionChange(val) {
350
-      this.selecting_schs = val;
359
+      this.selecting_schs = val
351 360
     },
352 361
     batchPrint(type) {
353
-      this.printType = type;
362
+      this.printType = type
354 363
       if (this.selecting_schs.length === 0) {
355
-        this.$message.error("请至少选择一条需要打印的内容");
356
-        return false;
364
+        this.$message.error('请至少选择一条需要打印的内容')
365
+        return false
357 366
       } else {
358
-        var sch_ids = [];
367
+        var sch_ids = []
359 368
         for (let index = 0; index < this.selecting_schs.length; index++) {
360
-          sch_ids.push(this.selecting_schs[index].patient_id);
369
+          sch_ids.push(this.selecting_schs[index].patient_id)
361 370
         }
362 371
         let params = {
363 372
           record_date: this.record_date,
364
-          patient_ids: sch_ids.join(","),
365
-          type: type,
366
-        };
373
+          patient_ids: sch_ids.join(','),
374
+          type: type
375
+        }
367 376
         getBatchPrint(params).then((res) => {
368
-          let Arr = res.data.data.patients;
369
-          let new_patients = [];
377
+          let Arr = res.data.data.patients
378
+
379
+
380
+          let new_patients = []
370 381
           if (type != 3) {
371 382
             Arr.forEach((i) => {
372 383
               if (i.prescriptions.length != 0) {
373
-                new_patients.push(i);
384
+                new_patients.push(i)
374 385
               }
375
-            });
386
+            })
376 387
           } else {
377 388
             // 过滤检查单数据出来,筛选出有检查项目的单子,不显示没有检查项目的单子
378 389
             Arr.forEach((el) => {
379 390
               el.prescriptions.forEach((o) => {
380 391
                 o.project.forEach((i) => {
381
-                  if (i.team.project_team != "") {
382
-                    new_patients.push(el);
392
+                  if (i.team.project_team != '') {
393
+                    new_patients.push(el)
383 394
                   }
384
-                });
385
-              });
386
-            });
387
-            let projectPrint = [];
395
+                })
396
+              })
397
+            })
398
+            let projectPrint = []
388 399
             new_patients.forEach((el) => {
389 400
               el.prescriptions.map((item) => {
390 401
                 if (item.project.length > 0) {
391 402
                   item.project.map((it) => {
392
-                    projectPrint.push(it);
393
-                  });
403
+                    projectPrint.push(it)
404
+                  })
394 405
                 }
395
-              });
396
-            });
406
+              })
407
+            })
397 408
             // 数组去重
398
-            projectPrint = this.split_project(projectPrint);
409
+            projectPrint = this.split_project(projectPrint)
399 410
             // 配对
400
-            let data = [];
411
+            let data = []
401 412
             projectPrint.map((item) => {
402 413
               if (item.team.id == 0) {
403
-                data.push(item);
414
+                data.push(item)
404 415
               } else {
405
-                if (item.team.project_team != "") {
406
-                  new_patients.push(item);
416
+                if (item.team.project_team != '') {
417
+                  new_patients.push(item)
407 418
                 }
408 419
               }
409
-            });
420
+            })
410 421
             new_patients = this.split_project_1(new_patients)
411 422
           }
412
-          this.printData = new_patients;
413
-          console.log(this.printData,'this.printData')
414
-        });
423
+          this.printData = new_patients
424
+          console.log(this.printData, 'this.printData')
425
+        })
415 426
       }
416
-      this.innerVisible = true;
427
+      this.innerVisible = true
417 428
     },
418 429
     // 外层去重方
419 430
     split_project(Arr) {
420
-      let hash = {};
421
-      let new_Arr = [];
431
+      let hash = {}
432
+      let new_Arr = []
422 433
       new_Arr = Arr.reduce((preVal, curVal) => {
423
-        hash[curVal.id] ? "" : (hash[curVal.id] = true && preVal.push(curVal));
424
-        return preVal;
425
-      }, []);
434
+        hash[curVal.id] ? '' : (hash[curVal.id] = true && preVal.push(curVal))
435
+        return preVal
436
+      }, [])
426 437
       Arr = new_Arr.reduce((preVal, curVal) => {
427 438
         hash[curVal.team.project_team]
428
-          ? ""
429
-          : (hash[curVal.team.project_team] = true && preVal.push(curVal));
430
-        return preVal;
431
-      }, []);
432
-      return Arr;
439
+            ? ''
440
+            : (hash[curVal.team.project_team] = true && preVal.push(curVal))
441
+        return preVal
442
+      }, [])
443
+      return Arr
433 444
     },
434 445
 
435 446
     // 内层去重
436 447
     split_project_1(Arr) {
437
-      let hash = {};
438
-      let new_Arr = [];
448
+      let hash = {}
449
+      let new_Arr = []
439 450
       Arr = Arr.reduce((preVal, curVal) => {
440
-        hash[curVal.id] ? "" : (hash[curVal.id] = true && preVal.push(curVal));
441
-        return preVal;
442
-      }, []);
451
+        hash[curVal.id] ? '' : (hash[curVal.id] = true && preVal.push(curVal))
452
+        return preVal
453
+      }, [])
443 454
 
444 455
       Arr.forEach(el => {
445
-        if(el.name){
456
+        if (el.name) {
446 457
           new_Arr.push(el)
447 458
         }
448 459
       })
449 460
 
450
-      console.log(new_Arr, "Arr");
451
-      return new_Arr;
452
-    },
461
+      console.log(new_Arr, 'Arr')
462
+      return new_Arr
463
+    }
453 464
   },
454 465
   created() {
455
-    var nowDate = new Date();
456
-    var nowYear = nowDate.getFullYear();
457
-    var nowMonth = nowDate.getMonth() + 1;
458
-    var nowDay = nowDate.getDate();
466
+    var nowDate = new Date()
467
+    var nowYear = nowDate.getFullYear()
468
+    var nowMonth = nowDate.getMonth() + 1
469
+    var nowDay = nowDate.getDate()
459 470
     this.record_date =
460
-      nowYear +
461
-      "-" +
462
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
463
-      "-" +
464
-      (nowDay < 10 ? "0" + nowDay : nowDay);
471
+        nowYear +
472
+        '-' +
473
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
474
+        '-' +
475
+        (nowDay < 10 ? '0' + nowDay : nowDay)
465 476
 
466
-    this.org_id = this.$store.getters.xt_user.template_info.org_id;
477
+    this.org_id = this.$store.getters.xt_user.template_info.org_id
467 478
 
468
-    this.getHisPrescriptionList();
469
-    this.getInitData();
470
-  },
471
-};
479
+    this.getHisPrescriptionList()
480
+    this.getInitData()
481
+  }
482
+}
472 483
 </script>

+ 13 - 55
src/xt_pages/outpatientDoctorStation/print.vue View File

@@ -19,20 +19,9 @@
19 19
  -->
20 20
     <div class="dialysisPage" style="padding-top: 40px">
21 21
       <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243 && org_id != 4 && org_id !=0">
22
+
22 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>
23 24
 
24
-        <!--        <printSix-->
25
-<!--          v-if="org_id != 10088 && org_id != 10215"-->
26
-<!--          v-bind:childResponse="childResponse"-->
27
-<!--          :advicePrint="advicePrint"-->
28
-<!--          :ids="ids"-->
29
-<!--          :patient="patient"-->
30
-<!--          :hisPatient="hisPatient"-->
31
-<!--          :doctorPorject="doctorPorject"-->
32
-<!--          :patient_id="patient_id"-->
33
-<!--          :record_date="record_date"-->
34
-<!--          :prescription_id="prescription_id"-->
35
-<!--        ></printSix>-->
36 25
         <printFour
37 26
           v-if="org_id == 10088"
38 27
           v-bind:childResponse="childResponse"
@@ -56,6 +45,7 @@
56 45
           :patient_id="patient_id"
57 46
           :record_date="record_date"
58 47
           :prescription_id="prescription_id"
48
+          :his_patient_id ="his_patient_id"
59 49
         ></printFive>
60 50
 
61 51
         <!-- <printSix 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"></printSix> -->
@@ -75,7 +65,6 @@
75 65
       </div>
76 66
       <div v-else>
77 67
         <printThree
78
-          v-bind:childResponse="childResponse"
79 68
           :advicePrint="advicePrint"
80 69
           :ids="ids"
81 70
           :patient="patient"
@@ -91,10 +80,7 @@
91 80
 </template>
92 81
 
93 82
 <script>
94
-import { parseTime } from "@/utils";
95
-import { getDialysisRecord } from "@/api/dialysis";
96
-import { getDataConfig } from "@/utils/data";
97
-import { jsGetAge, uParseTime } from "@/utils/tools";
83
+import {  uParseTime } from "@/utils/tools";
98 84
 
99 85
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
100 86
 import print from "print-js";
@@ -106,7 +92,6 @@ import printSix from "./template/printSix";
106 92
 import {
107 93
   getAllDoctorList,
108 94
   getAllHisPatientList,
109
-  getPrescriptionPrint,
110 95
 } from "@/api/project/project";
111 96
 export default {
112 97
   name: "dialysisPrintOrder",
@@ -136,6 +121,7 @@ export default {
136 121
       search_input: "",
137 122
       loading: false,
138 123
       patient_id: "",
124
+      his_patient_id:"",
139 125
       prescription_id: "",
140 126
       ids: "",
141 127
       paramsObj: {},
@@ -225,49 +211,21 @@ export default {
225 211
       this.patient_id = row.patient_id;
226 212
       this.record_date = this.record_date;
227 213
       this.prescription_id = this.prescription_id;
228
-      console.log("row", row);
229
-      // var params = {
230
-      //   patient_id:row.patient_id,
231
-      //   record_date:this.record_date,
232
-      //   prescription_id:this.prescription_id,
233
-      // }
234
-      // getPrescriptionPrint(params).then(response=>{
235
-      //     if(response.data.state == 1){
236
-      //       var advicePrint =  response.data.data.advicePrint
237
-      //       console.log("adviceprint",advicePrint)
238
-      //       this.advicePrint = advicePrint
239
-      //       var patient =  response.data.data.patient
240
-      //       console.log("patient",patient)
241
-      //       this.patient = patient
242
-      //       //  var hisPatient =  response.data.data.hisPatient
243
-      //       // console.log("hispatient",hisPatient)
244
-      //       // this.hisPatient = hisPatient
245
-      //       var doctorPorject = response.data.data.doctorPorject
246
-      //       console.log("doctorporject",doctorPorject)
247
-      //       this.doctorPorject = doctorPorject
248
-      //     }
249
-      // })
214
+      this.his_patient_id = row.his_patient_id
215
+
250 216
     },
251 217
     searchAction() {},
252 218
   },
253 219
 
254 220
   created() {
255
-    this.org_id = this.$store.getters.xt_user.org_id;
256
-    console.log(this.org_id,'机构id')
257
-    this.getAllDoctorList();
258
-    var record_date = this.paramsObj.record;
259
-    this.record_date = record_date;
260
-    console.log("record_date", record_date);
261
-    var prescription_id = this.paramsObj.prescription_id;
262
-    this.prescription_id = prescription_id;
221
+    this.record_date =  this.paramsObj.record;
222
+    this.prescription_id =  this.paramsObj.prescription_id;
263 223
     this.patient_id = this.paramsObj.patient_id;
264 224
     this.ids = this.paramsObj.ids;
265
-    // var record_date = this.$route.query.record
266
-    // this.record_date = record_date
267
-    // console.log("record_date",record_date)
268
-    // var prescription_id = this.$route.query.prescription_id
269
-    // this.prescription_id = prescription_id
270
-    this.getAllHisPatientList(record_date);
225
+    this.org_id = this.$store.getters.xt_user.org_id;
226
+    this.his_patient_id = this.paramsObj.his_patient_id;
227
+    this.getAllDoctorList();
228
+    this.getAllHisPatientList(this.record_date);
271 229
   },
272 230
   watch: {
273 231
     paramsObj: {
@@ -275,9 +233,9 @@ export default {
275 233
       handler(val, oldVal) {
276 234
         this.paramsObj = val;
277 235
         this.patient_id = this.paramsObj.patient_id;
236
+        this.his_patient_id = this.paramsObj.his_patient_id;
278 237
         var record_date = this.paramsObj.record;
279 238
         this.record_date = record_date;
280
-        console.log("record_date", record_date);
281 239
         var prescription_id = this.paramsObj.prescription_id;
282 240
         this.prescription_id = prescription_id;
283 241
         this.ids = this.paramsObj.ids;

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

@@ -98,7 +98,7 @@
98 98
             </div>
99 99
             <div style="margin-bottom: 10px; display: flex">
100 100
               临床诊断:{{
101
-                item.info.diagnosis ? getDiagnosis(item.info.diagnosis) : ""
101
+                hisPatient.diagnosis ? getDiagnosis(hisPatient.diagnosis) : ""
102 102
               }}
103 103
             </div>
104 104
             <div style="margin-bottom: 10px; display: flex">
@@ -256,6 +256,7 @@ export default {
256 256
     patient_id: Number,
257 257
     record_date: String,
258 258
     prescription_id: Number,
259
+    his_patient_id:Number,
259 260
     ids: String,
260 261
   },
261 262
   data() {
@@ -356,6 +357,7 @@ export default {
356 357
         patient_id: this.patient_id,
357 358
         record_date: this.record_date,
358 359
         prescription_id: this.prescription_id,
360
+        his_patient_id: this.his_patient_id,
359 361
         ids: this.ids,
360 362
         p_type: 2,
361 363
       };