Selaa lähdekoodia

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

csx 4 vuotta sitten
vanhempi
commit
008d846f4c

+ 27 - 0
src/api/project/project.js Näytä tiedosto

@@ -398,4 +398,31 @@ export function changePatient(id,params){
398 398
        method:"get",
399 399
        params:params
400 400
     })
401
+  }
402
+
403
+  export function getAllHisPatientList(params){
404
+    
405
+    return request({
406
+      url:"/api/hispatient/getallhispatient",
407
+      method:"get",
408
+      params:params
409
+    })
410
+  }
411
+
412
+  export function getPrescriptionPrint(params){
413
+    
414
+    return request({
415
+      url:"/api/hispatient/getprescriptionprint",
416
+      method:"get",
417
+      params:params
418
+    })
419
+  }
420
+
421
+  export function getChargePrint(params){
422
+     
423
+    return request({
424
+      url:"/api/hispatient/getchargeprint",
425
+      method:"get",
426
+      params:params
427
+    })
401 428
   }

+ 18 - 2
src/router/modules/outpatientDoctorStation.js Näytä tiedosto

@@ -38,6 +38,14 @@ export default {
38 38
         name: 'outpatientDoctorStationPrint',
39 39
         meta: { title: 'outpatientDoctorStationPrint', noCache: true }
40 40
     },
41
+    {
42
+      path: '/outpatientDoctorStation/printtwo',
43
+      component: () => import('@/xt_pages/outpatientDoctorStation/printtwo'),
44
+      hidden: true,
45
+      is_menu: false,
46
+      name: 'outpatientDoctorStationPrint',
47
+      meta: { title: 'outpatientDoctorStationPrint', noCache: true }
48
+    },
41 49
     {
42 50
         path: '/outpatientDoctorStation/recordPrint',
43 51
         component: () => import('@/xt_pages/outpatientDoctorStation/recordPrint'),
@@ -47,12 +55,20 @@ export default {
47 55
         meta: { title: 'outpatientDoctorStationRecordPrint', noCache: true }
48 56
     },
49 57
     {
50
-      path:'/outpatientDoctorStation/template/printOne',
51
-      component:() => import('@/xt_pages/outpatientDoctorStation/template/printOne'),
58
+      path:'/outpatientDoctorStation/print',
59
+      component:() => import('@/xt_pages/outpatientDoctorStation/print'),
52 60
       hidden:true,
53 61
       is_menu: false,
54 62
       name: 'outpatientDoctorStationRecordPrintOne',
55 63
       meta: { title: 'outpatientDoctorStationRecordPrintOne', noCache: true }
64
+    },
65
+    {
66
+      path:"/outpatientCharges/treatPrint",
67
+      component:()=>import('@/xt_pages/outpatientCharges/treatPrint'),
68
+      hidden:true,
69
+      is_menu:false,
70
+      name:'outpatientChargesTreatePrint',
71
+      meta:{title:'outpatientChargesTreatePrint',noCache:true}
56 72
     }
57 73
   ]
58 74
 }

+ 15 - 5
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Näytä tiedosto

@@ -257,7 +257,9 @@
257 257
         radio: 1,
258 258
         radioStatus: 1,
259 259
         search_input: '',
260
-        start_time: moment().locale('zh-cn').format('YYYY-MM-DD')
260
+        start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
261
+        patient_id:0,
262
+        prescription_id:0
261 263
       }
262 264
     },
263 265
     created() {
@@ -363,6 +365,7 @@
363 365
 
364 366
       },
365 367
       tabclickEvent(val) {
368
+        console.log("val",val.name)
366 369
         for (let i = 0; i < this.prescriptions.length; i++) {
367 370
           if (this.prescriptions[i].name == val.name) {
368 371
             this.curPrescriptions = {}
@@ -370,11 +373,11 @@
370 373
             this.curPrescriptions = temp
371 374
           }
372 375
         }
373
-        console.log(this.curPrescriptions)
374
-
376
+        console.log("9999",this.curPrescriptions)
377
+        this.prescription_id = this.curPrescriptions.id
375 378
         this.total = 0
376 379
         this.total = this.getTotalOne()
377
-        console.log(this.total)
380
+       
378 381
 
379 382
 
380 383
 
@@ -442,9 +445,15 @@
442 445
         }
443 446
       },
444 447
       open(index) {
448
+        console.log("index",index)
445 449
         if (index == 1) {
446
-        } else if (index == 2) {
447 450
 
451
+        } else if (index == 2) {
452
+           
453
+           this.$router.push("/outpatientDoctorStation/printtwo?record="+this.record_date)
454
+        
455
+        } else if(index == 3){
456
+            this.$router.push("/outpatientCharges/treatPrint?record_date="+this.record_date+"&patient_id="+this.patient_id+"&prescription_id="+this.prescription_id)
448 457
         } else if (index == 4) {
449 458
 
450 459
           let params = {
@@ -555,6 +564,7 @@
555 564
       handleCurrentChange(val) {
556 565
         console.log('val', val)
557 566
         this.getPatientInformation(val.patients.id)
567
+        this.patient_id = val.patients.id
558 568
       },
559 569
 
560 570
       //获取患者的基本信息

+ 46 - 7
src/xt_pages/outpatientCharges/treatTemplate/printOne.vue Näytä tiedosto

@@ -6,9 +6,9 @@
6 6
             <p class="infoP">名称:血液透析中心</p>
7 7
             <p class="infoP">医生工号:H8D50</p>
8 8
             <p class="infoP">门诊流水号:H8D50</p>
9
-            <p class="infoP">科别:全科</p>
9
+            <p class="infoP">科别:{{list.p_info.departments}}</p>
10 10
             <p class="infoP">处方单据号:H8D50</p>
11
-            <p class="infoP">姓名:张三</p>
11
+            <p class="infoP">姓名:{{list.patient.name}}</p>
12 12
             <p class="infoP">医疗账号:98798798</p>
13 13
             <p class="infoP">医疗类别:普通</p>
14 14
         </div>
@@ -58,19 +58,19 @@
58 58
                         <li style="width:20%;">123</li>
59 59
                     </ul> -->
60 60
                     <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
61
-                        <p v-for="item in 4" class="chargeP">血压透析器(进口)FFX60</p>
61
+                        <p v-for="(item,i) in prescription" :key="i" class="chargeP">血压透析器(进口)FFX60</p>
62 62
                     </div>
63 63
                     <div style="border-right:1px solid #000;width:15%;text-align:center;">
64
-                        <p v-for="item in 4" class="chargeP">次</p>
64
+                        <p v-for="(item,y) in prescription" :key="y" class="chargeP">次</p>
65 65
                     </div>
66 66
                     <div style="border-right:1px solid #000;width:15%;text-align:center;">
67
-                        <p v-for="item in 4" class="chargeP">1个</p>
67
+                        <p v-for="(item,z) in prescription" :key="z" class="chargeP">1个</p>
68 68
                     </div>
69 69
                     <div style="border-right:1px solid #000;width:15%;text-align:center;">
70
-                        <p v-for="item in 4" class="chargeP">123</p>
70
+                        <p v-for="(item,f) in prescription" :key="f" class="chargeP">123</p>
71 71
                     </div>
72 72
                     <div style="width:15%;text-align:center;">
73
-                        <p v-for="item in 4" class="chargeP">123</p>
73
+                        <p v-for="(item,d) in prescription" :key="d" class="chargeP">123</p>
74 74
                     </div>
75 75
                 </div>
76 76
             </div>
@@ -89,7 +89,46 @@
89 89
         </div>
90 90
     </div>
91 91
 </template>
92
+<script>
93
+ import { getChargePrint } from "@/api/project/project"
94
+export default {
95
+    data(){
96
+      return{
97
+          list:{},
98
+          prescription:[]
99
+      } 
100
+    },
101
+    methods:{
102
+       getChargePrint(record_date,patient_id,prescription_id){
103
+           var params = {
104
+              record_date:record_date,
105
+              patient_id:patient_id,
106
+              prescription_id:prescription_id
107
+           }
108
+           console.log("params",params)
109
+         getChargePrint(params).then(response=>{
110
+            if(response.data.state == 1){
111
+               var list = response.data.data.list
112
+               console.log("list9999999999",list)
113
+               this.list = list
114
+               var prescription = response.data.data.prescription
115
+               console.log("prescription",prescription)
116
+               this.prescription = prescription
117
+            }
118
+         })
119
+       }
120
+    },
121
+    created(){
122
+       var record_date =  this.$route.query.record_date
123
+       console.log("record_date",record_date)
124
+       var patient_id = this.$route.query.patient_id
125
+       console.log("patient_id",patient_id)
126
+       var prescription_id = this.$route.query.prescription_id
127
+       this.getChargePrint(record_date,patient_id,prescription_id)
92 128
 
129
+    }
130
+}
131
+</script>
93 132
 
94 133
 
95 134
 <style lang="scss" scoped>

+ 1 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Näytä tiedosto

@@ -316,7 +316,7 @@
316 316
         if (index == 1) {
317 317
           this.$refs.prescriptions.open(1)
318 318
         } else if (index == 2) {
319
-          this.$router.push("/outpatientDoctorStation/template/printOne?record="+this.record_date)
319
+          this.$router.push("/outpatientDoctorStation/print?record="+this.record_date)
320 320
         } else if (index == 3) {
321 321
           this.$refs.prescriptions.open(3)
322 322
         } else if (index == 4) {

+ 81 - 857
src/xt_pages/outpatientDoctorStation/print.vue Näytä tiedosto

@@ -17,25 +17,22 @@
17 17
         <el-container class="newContainer">
18 18
             <div style="width:270px;margin-right:20px;">
19 19
                 <div class="cell clearfix" style="margin-bottom:10px;">
20
-                    <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
20
+                    <el-input size="small"  v-model.trim="search_input" class="filter-item"/>
21 21
                     <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
22 22
                 </div>
23
-                <el-table ref="tab" @row-click="changePatient" highlight-current-row :data="tableData" height="480" border style="width: 100%">
24
-                    <el-table-column prop="date"  label="患者">
25
-                        <template slot-scope="scope">
26
-                            {{ scope.row.patient.name }}
27
-                        </template>
23
+                <el-table ref="tab"   @current-change="changePatient" highlight-current-row :data="patientTableData" 
24
+                 height="480" border style="width: 100%">
25
+                    <el-table-column prop="date"  label="患者">   
26
+                      <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template> 
28 27
                     </el-table-column>
29
-                    <el-table-column prop="name" label="透析号">
30
-                        <template slot-scope="scope">
31
-                            {{ scope.row.patient.dialysis_no }}
32
-                        </template>
28
+                    <el-table-column prop="name" label="就诊号">
29
+                        <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
33 30
                     </el-table-column>
34 31
                 </el-table>
35 32
             </div>
36 33
             
37 34
             <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
38
-              <printOne v-bind:childResponse="childResponse"></printOne>
35
+              <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient"></printOne>
39 36
             </div>
40 37
         </el-container>
41 38
     </div>
@@ -44,18 +41,16 @@
44 41
 
45 42
 <script>
46 43
 
47
-import {
48
-  getDialysisRecordInitData,
49
-  getDialysisSchedules
50
-} from "@/api/dialysis_record";
44
+
51 45
 import { parseTime } from "@/utils";
52 46
 import { getDialysisRecord } from "@/api/dialysis";
53 47
 import { getDataConfig } from "@/utils/data";
54 48
 import { jsGetAge, uParseTime } from "@/utils/tools";
55
-// import LabelBox from "./printItem/LabelBox";
49
+
56 50
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
57 51
 import print from "print-js";
58 52
 import printOne from "./template/printOne"
53
+import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
59 54
 export default {
60 55
   name: "dialysisPrintOrder",
61 56
   components: {
@@ -64,856 +59,85 @@ export default {
64 59
   },
65 60
   data() {
66 61
     return {
67
-      crumbs: [
68
-        { path: false, name: "透析管理" },
69
-        { path: false, name: "打印单" }
70
-      ],
71
-      childResponse: {},
72
-      operators: [],
73
-      adminUser: [],
74
-      check: {},
75
-      dialysisOrder: {
76
-        DeviceNumber: []
77
-      },
78
-      operatorMaps: {},
79
-      complications: [
80
-        "低血压",
81
-        "高血压",
82
-        "心律失常",
83
-        "头晕",
84
-        "头痛",
85
-        "呕吐",
86
-        "抽搐",
87
-        "出血",
88
-        "心衰",
89
-        "腹痛"
90
-      ],
91
-      jilurow: 0,
92
-      advice_jilurow: 0,
93
-      loading: false,
94
-      orgname: "",
95
-      patientInfo_gender_1: false,
96
-      patientInfo_gender_2: false,
97
-      patientInfo_source_2: false,
98
-      patientInfo_source_1: false,
99
-      modeOptions: {},
100
-      replacementWays: [],
101
-      perfusionApparatus: [],
102
-      anticoagulantsConfit: {},
103
-      bloodAccessParOpera: {},
104
-      dialysateFormulationOptions: {},
105
-
106
-      queryParams: {
107
-        xtdate: "",
108
-        xtno: ""
109
-      },
110
-      patientInfo: {
111
-        birth: "",
112
-        age: "",
113
-        DialysisSchedule: {
114
-          device_number: { number: "" },
115
-          device_zone: { name: "" }
116
-        },
117
-        gender: 0
118
-      },
119
-      predialysis: {
120
-        score: "",
121
-        internal_fistula: "",
122
-        internal_fistula_skin: "",
123
-        catheter: "",
124
-        blood_access_part_opera_name: ""
125
-      },
126
-      afterdialysis: {
127
-        complications_index: ""
128
-      },
129
-      prescription: {
130
-        dialysate_formulation_name: "",
131
-        device: {}
132
-      },
133
-      advices: [],
134
-      users: [],
135
-      monitors: [],
136
-      summary: {},
137
-      receiverTreatmentAccess: {},
138
-      org_template_info: {},
139
-
140
-      doctor_advices: [],
141
-      advice_groups: [],
142
-
143
-      AlPanel: {
144
-        id: 0,
145
-        name: "",
146
-        type: 1,
147
-        shouji: 2,
148
-        weichi: 2,
149
-        zongliang: 2,
150
-        gaimingcheng: -1,
151
-        gaijiliang: -1,
152
-        shouji_unit: "mg",
153
-        weichi_unit: "mg/h",
154
-        zongliang_unit: "mg",
155
-        gaimingcheng_unit: "",
156
-        gaijiliang_unit: ""
157
-      },
158
-
159
-
160
-      //
161
-      tableData: [],
162
-      selected_date: new Date(),
163
-      // search_input 和 search_keyword,使输入关键字时不会经常刷新  filtedSchedules
164
-      search_keyword: '', // 确定用于搜索的关键字
165
-      search_input: '', // 输入中的关键字
166
-      patient_state:[
167
-          {value: 0,label: '全部'},
168
-          {value: 1,label: '已签到'},
169
-          {value: 2,label: '未签到'},
170
-          {value: 3,label: '已上机'},
171
-          {value: 4,label: '已下机'},
172
-      ],
173
-      patientStateVal: 0,
174
-      treat_state:[
175
-          {value: 0,label: '全部'},
176
-          {value: 1,label: '待开处方'},
177
-          {value: 2,label: '待开小结'},
178
-      ],
179
-      treatStateVal: 0,
180
-      schedule_options:[
181
-          {value: 0,label: '全部'},
182
-          {value: 1,label: '上午'},
183
-          {value: 2,label: '下午'},
184
-          {value: 3,label: '晚上'},
185
-      ],
186
-      scheduleStateVal: 0,
187
-      zone_options:[
188
-          { id: 0, text: '全部' }
189
-      ],
190
-      zoneVal:0,
62
+       record_date:"",
63
+       patientTableData:[],
64
+       advicePrint:[],
65
+       hisPatient:{},
66
+       patient:{}
191 67
     };
192 68
   },
193
-  methods: {
194
-    getAdminUser(id) {
195
-      if (id == 0) {
196
-        return "";
197
-      }
198
-      if (id == undefined) {
199
-        return "";
200
-      }
201
-      for (let i = 0; i < this.adminUser.length; i++) {
202
-        if (this.adminUser[i].id == id) {
203
-          return this.adminUser[i].name;
204
-        }
205
-      }
206
-    },
207
-    getTime(value, temp) {
208
-      if (value == 0) {
209
-        return "";
210
-      }
211
-      if (value != undefined) {
212
-        return uParseTime(value, temp);
213
-      }
214
-      return "";
215
-    },
216
-    printThisPage() {
217
-      var ptime = Math.round(new Date().getTime() / 1000);
218
-      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
219
-
220
-      const style =
221
-        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain p{width: 50%;line-height: 1px;}.prescriptionBox{padding:0 10px;height:750px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}';
222
-      printJS({
223
-        printable: "prescription-print",
224
-        type: "html",
225
-        style: style,
226
-        scanStyles: false
227
-      });
228
-
229
-      // if (this.org_template_info.template_id == 1) {
230
-      //   printJS({
231
-      //     printable: "dialysis-print-box",
232
-      //     type: "html",
233
-      //     style: style,
234
-      //     scanStyles: false
235
-      //   });
236
-      // }
237
-    },
238
-    
239
-    getNumber() {
240
-      if (this.dialysisOrder != null) {
241
-        return (
242
-          this.patientInfo.DialysisSchedule.device_zone.name +
243
-          this.dialysisOrder.DeviceNumber.number
244
-        );
245
-      } else {
246
-        return (
247
-          this.patientInfo.DialysisSchedule.device_zone.name +
248
-          this.patientInfo.DialysisSchedule.device_number.number
249
-        );
250
-      }
251
-    },
252
-
253
-    getXuserName(id) {
254
-      if (id <= 0) {
255
-        return "";
256
-      }
257
-      var name = "";
258
-      if (this.users == null || typeof this.users.length === "undefined") {
259
-        return name;
260
-      }
261
-      var leng = this.users.length;
262
-      if (leng == 0) {
263
-        return name;
264
-      }
265
-      for (let index = 0; index < leng; index++) {
266
-        if (this.users[index].id == id) {
267
-          name = this.users[index].name;
268
-          break;
269
-        }
270
-      }
271
-      return name;
272
-    },
273
-    setAdminUserES(id) {
274
-      console.log(id);
275
-      if (id == 0) {
276
-        return "";
277
-      }
278
-      if (id in this.operatorMaps) {
279
-        return this.operatorMaps[id].url;
280
-      } else {
281
-        return "";
282
-      }
283
-    },
284
-    modeName(mode_id) {
285
-      return typeof this.modeOptions[mode_id] !== "undefined" &&
286
-        typeof this.modeOptions[mode_id].name !== "undefined"
287
-        ? this.modeOptions[mode_id].name
288
-        : "";
69
+  methods:{
70
+    getAllDoctorList(){
71
+      getAllDoctorList().then(response=>{
72
+        if(response.data.state == 1){
73
+               var doctor =  response.data.data.doctor
74
+               
75
+               this.doctorList = doctor
76
+             }
77
+         })   
78
+     },
79
+    getAllHisPatientList(){
80
+         const params = {
81
+           record_date:this.record_date
82
+         }
83
+      getAllHisPatientList(params).then(response=>{
84
+         if(response.data.state == 1){
85
+            this.patientTableData = response.data.data.list
86
+            this.patientTableDataTwo = response.data.data.list
87
+
88
+            console.log('222', this.patientTableData)
89
+            let cal_one = 0
90
+            let cal_two = 0
91
+            for (let i = 0; i < response.data.data.list.length; i++) {
92
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
93
+                cal_one = cal_one + 1
94
+              }
95
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
96
+                cal_two = cal_two + 1
97
+              }
98
+            }
99
+            this.$refs.tab.setCurrentRow(this.patientTableData[0])
100
+            console.log(this.patientTableData[0])
101
+            this.choosePatient(this.patientTableData[0])
102
+            this.cal_one = cal_one
103
+            this.cal_two = cal_two   
104
+         }
105
+      })
289 106
     },
290
-    getDialysisRecord() {
291
-      this.loading = true;
292
-
293
-      getDialysisRecord(this.queryParams).then(response => {
294
-        if (response.data.state == 1) {
295
-          this.childResponse = response;
296
-          this.org_template_info = response.data.data.org_template_info;
297
-          this.loading = false;
298
-          //   this.adminUser = response.data.data.users
299
-          //   this.users = response.data.data.users
300
-          //   this.patientInfo = response.data.data.patientInfo
301
-          //   this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
302
-          //   // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
303
-          //   if (response.data.data.patientInfo.first_dialysis_date != 0) {
304
-          //     this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}')
305
-          //   } else {
306
-          //     this.patientInfo.first_dialysis_date = ''
307
-          //   }
308
-          //   this.check = response.data.data.check
309
-          //   this.predialysis = response.data.data.PredialysisEvaluation
310
-          //   this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id)
311
-          //   this.afterdialysis = response.data.data.AssessmentAfterDislysis
312
-          //   this.operators = response.data.data.operators
313
-          //   this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder
314
-
315
-          //   if (this.operators.length > 0) {
316
-          //     var operatorsLen = this.operators.length
317
-          //     for (var index = 0; index < operatorsLen; index++) {
318
-          //       this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index])
319
-          //     }
320
-          //   }
321
-
322
-          //   this.afterdialysis.txqnx = -1
323
-          //   if (this.afterdialysis.cruor.indexOf('0度') > -1) {
324
-          //     this.afterdialysis.txqnx = 0
325
-          //   }
326
-          //   if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
327
-          //     this.afterdialysis.txqnx = 1
328
-          //   }
329
-          //   if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
330
-          //     this.afterdialysis.txqnx = 2
331
-          //   }
332
-          //   if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
333
-          //     this.afterdialysis.txqnx = 3
334
-          //   }
335
-
336
-          //   this.afterdialysis.complications = this.afterdialysis.complication.split(',')
337
-          //   this.afterdialysis.complications_other = []
338
-          //   this.afterdialysis.complications_index = []
339
-          //   var acllen = this.afterdialysis.complications.length
340
-          //   for (let index = 0; index < acllen; index++) {
341
-          //     if (this.complications.indexOf(this.afterdialysis.complications[index]) >= 0) {
342
-          //       this.afterdialysis.complications_index.push(this.afterdialysis.complications[index])
343
-          //     } else if (this.complications.indexOf(this.afterdialysis.complications[index]) < 0 && this.afterdialysis.complications_other.indexOf(this.afterdialysis.complications[index]) < 0) {
344
-          //       this.afterdialysis.complications_other.push(this.afterdialysis.complications[index])
345
-          //     }
346
-          //   }
347
-          //   this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',')
348
-
349
-          //   this.prescription = response.data.data.dialysisPrescription
350
-          //   this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
351
-
352
-          //   this.prescription.mode = this.modeName(this.prescription.mode_id)
353
-          //   var rwLen = this.replacementWays.length
354
-          //   this.prescription.replacement = ''
355
-          //   for (let index = 0; index < rwLen; index++) {
356
-          //     if (this.replacementWays[index].id == this.prescription.replacement_way) {
357
-          //       this.prescription.replacement = this.replacementWays[index].name
358
-          //       break
359
-          //     }
360
-          //   }
361
-
362
-          //   this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation)
363
-
364
-          //   var paLen = this.perfusionApparatus.length
365
-          //   this.prescription.perfusion_apparatus_name = ''
366
-          //   for (let index = 0; index < paLen; index++) {
367
-          //     if (this.perfusionApparatus[index].id == this.prescription.perfusion_apparatus) {
368
-          //       this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name
369
-          //       break
370
-          //     }
371
-          //   }
372
-
373
-          //   var acLen = this.anticoagulantsConfit.length
374
-          //   var thisALID = this.prescription.anticoagulant
375
-          //   this.prescription.anticoagulant_name = ''
376
-
377
-          //   if (typeof (this.anticoagulantsConfit[thisALID]) !== 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
378
-          //     this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name
379
-          //     this.AlPanel = this.anticoagulantsConfit[thisALID]
380
-          //   }
381
-
382
-          //   this.advices = response.data.data.advices
383
-          //   this.monitors = response.data.data.monitors
384
-          //   this.summary = response.data.data.summary
385
-          //   this.org_template_info = response.data.data.org_template_info
386
-          //   if (this.monitors.length < 8) {
387
-          //     var nl = 8 - this.monitors.length
388
-          //     for (let index = 0; index < nl; index++) {
389
-          //       this.monitors.push([])
390
-          //     }
391
-          //   }
392
-          //   this.jilurow = this.monitors.length + 1
393
-
394
-          //   this.advice_jilurow = this.advices.length + 1
395
-
396
-          //   var childMap = {}
397
-          //   for (const index in this.advices) {
398
-          //     if (this.advices[index].parent_id == 0) {
399
-          //       continue
400
-          //     }
401
-          //     if (!(this.advices[index].parent_id in childMap)) {
402
-          //       childMap[this.advices[index].parent_id] = []
403
-          //     }
404
-          //     childMap[this.advices[index].parent_id].push(this.advices[index])
405
-          //   }
406
-
407
-          //   var advices = []
408
-          //   for (const index in this.advices) {
409
-          //     if (this.advices[index].parent_id > 0) {
410
-          //       continue
411
-          //     }
412
-          //     var item = this.advices[index]
413
-          //     if (item.id in childMap) {
414
-          //       item.children = childMap[item.id]
415
-          //     } else {
416
-          //       item.children = []
417
-          //     }
418
-          //     advices.push(item)
419
-          //   }
420
-
421
-          //   var leftAdvice = []
422
-          //   var rightAdvice = []
423
-          //   var adlen = advices.length
424
-
425
-          //   var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
426
-          //   for (var i = 0; i < halfLen; i++) {
427
-          //     leftAdvice.push(advices[i])
428
-          //     rightAdvice.push(advices[i + halfLen])
429
-          //   }
430
-          //   if (halfLen < 5) {
431
-          //     var nl = 5 - leftAdvice.length
432
-          //     for (let index = 0; index < nl; index++) {
433
-          //       leftAdvice.push([])
434
-          //     }
435
-          //     var nl = 5 - rightAdvice.length
436
-          //     for (let index = 0; index < nl; index++) {
437
-          //       rightAdvice.push([])
438
-          //     }
439
-          //   }
440
-
441
-          //   this.advices = []
442
-          //   for (var i = 0; i < halfLen; i++) {
443
-          //     var item = []
444
-          //     item.push(leftAdvice[i])
445
-          //     item.push(rightAdvice[i])
446
-          //     this.advices.push(item)
447
-          //   }
448
-          //   this.loading = false
449
-
450
-          //   this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
451
-
452
-          //   for (let index = 0; index < this.doctor_advices.length; index++) {
453
-          //     this.doctor_advices[index]['isShow'] = 2
454
-          //   }
455 107
 
456
-          //   if (this.doctor_advices.length > 0) {
457
-          //     var group = this.newAdviceGroupObject()
458
-          //     var initGroupBlock = function(group, advice) {
459
-          //       group.group_no = advice.groupno
460
-          //     }
461
-          //     for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
462
-          //       var new_advice_index = 0
463
-
464
-          //       if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
465
-          //         new_advice_index = index + this.doctor_advices[index].children.length + 1
466
-
467
-          //         var doctor_advice = {
468
-          //           delivery_way: this.doctor_advices[index].delivery_way,
469
-          //           execution_frequency: this.doctor_advices[index].execution_frequency,
470
-          //           groupno: this.doctor_advices[index].groupno,
471
-          //           id: this.doctor_advices[index].id,
472
-          //           parent_id: this.doctor_advices[index].parent_id,
473
-          //           children: this.doctor_advices[index].children,
474
-          //           remark: this.doctor_advices[index].remark,
475
-          //           execution_staff: this.doctor_advices[index].execution_staff,
476
-          //           checker: this.doctor_advices[index].checker,
477
-          //           advice_doctor: this.doctor_advices[index].advice_doctor,
478
-
479
-          //         }
480
-          //         doctor_advice['isShow'] = 1
481
-          //         this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
482
-          //         // this.doctor_advices.push(doctor_advice)
483
-          //       }
484
-          //     }
485
-
486
-          //     for (let index = 0; index < this.doctor_advices.length; index++) {
487
-          //       const advice = this.doctor_advices[index]
488
-          //       if (advice.groupno == 0) {
489
-          //         // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
490
-          //         if (advice.parent_id > 0) {
491
-          //           if (this.advice_groups.length > 0) {
492
-          //             var parent_group = this.advice_groups[
493
-          //               this.advice_groups.length - 1
494
-          //             ]
495
-          //             if (parent_group.advices.length > 0) {
496
-          //               if (parent_group.advices[0].id == advice.parent_id) {
497
-          //                 parent_group.advices.push(advice)
498
-          //               }
499
-          //             }
500
-          //           }
501
-          //           continue
502
-          //         } else {
503
-          //           if (group.group_no > 0) {
504
-          //             this.advice_groups.push(group)
505
-          //             group = this.newAdviceGroupObject()
506
-          //           }
507
-
508
-          //           initGroupBlock(group, advice)
509
-          //           group.advices.push(advice)
510
-          //           this.advice_groups.push(group)
511
-          //           group = this.newAdviceGroupObject()
512
-          //           continue
513
-          //         }
514
-          //       }
515
-
516
-          //       if (group.group_no > 0 && group.group_no != advice.groupno) {
517
-          //         this.advice_groups.push(group)
518
-          //         group = this.newAdviceGroupObject()
519
-          //       }
520
-          //       if (group.group_no == 0) {
521
-          //         initGroupBlock(group, advice)
522
-          //       }
523
-          //       if (group.group_no == advice.groupno) {
524
-          //         group.advices.push(advice)
525
-          //       }
526
-          //     }
527
-          //     if (group.group_no > 0) {
528
-          //       // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
529
-          //       this.advice_groups.push(group)
530
-          //     }
531
-          //   }
532
-          //   console.log(this.advice_groups)
533
-        } else {
534
-          this.loading = false;
535
-          this.$message.error("请求数据失败");
536
-          return false;
537
-        }
538
-      });
539
-    },
540
-    bloodAccessParOperaName(id) {
541
-      if (id in this.bloodAccessParOpera) {
542
-        return this.bloodAccessParOpera[id].name;
543
-      }
544
-      return "";
545
-    },
546
-    dialysateFormulationName(id) {
547
-      if (id in this.dialysateFormulationOptions) {
548
-        return this.dialysateFormulationOptions[id].name;
549
-      }
550
-      return "";
551
-    },
552
-    getAge: function(val) {
553
-      if (
554
-        this.org_template_info.template_id == 2 ||
555
-        this.org_template_info.template_id == 0
556
-      ) {
557
-        if (val.age == 0) {
558
-          return jsGetAge(val.birth, "-");
559
-        } else {
560
-          return val.age;
108
+    changePatient(row){
109
+      console.log("row",row)
110
+        var params = {
111
+          patient_id:row.patient_id,
112
+          record_date:this.record_date,
561 113
         }
562
-      } else {
563
-        return jsGetAge(val.birth, "-");
564
-      }
565
-    },
566
-    newAdviceGroupObject: function() {
567
-      return Object.assign(
568
-        {},
569
-        {
570
-          group_no: 0,
571
-          // advice_doctor: 0,
572
-          // start_time: 0,
573
-          advices: []
574
-          // exec_staff: 0,
575
-          // exec_time: 0,
576
-          // checker: 0,
577
-        }
578
-      );
579
-    },
580
-    //日期
581
-        handleScheduleDateChange: function(index) {
582
-            this.treatStateVal = 0
583
-            this.patientStateVal = 0
584
-            this.zoneVal = 0
585
-            this.scheduleStateVal = 0
586
-            this.search_keyword = this.search_input = ''
587
-            // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
588
-            //   zone: this.zone_selected,
589
-            //   schedule_type: this.schedule_type_selected,
590
-            //   schedule_date: this.selected_date,
591
-            // })
592
-            this.selected_date = index
593
-            this.$store.dispatch('SetSelectedDate', { selected_date: index })
594
-            this.requestDialysisSchedules()
595
-        },
596
-        //初始化数据
597
-        getInitData: function() {
598
-            getDialysisRecordInitData().then(rs => {
599
-                var resp = rs.data
600
-                if (resp.state == 1) {
601
-                var zones = resp.data.zones
602
-                var schedules = resp.data.schedules
603
-                var zone_options = [{ id: 0, text: '全部' }]
604
-                for (let z_i = 0; z_i < zones.length; z_i++) {
605
-                    const zone = zones[z_i]
606
-                    zone_options.push({ id: zone.id, text: zone.name })
607
-                }
608
-                this.zone_options = zone_options
609
-                // this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
610
-                this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
611
-                this.requestDialysisSchedules()
612
-                // this.getData()
613
-                } else {
614
-                this.$message.error(resp.msg)
615
-                }
616
-            })
617
-        },
618
-        // 班次
619
-        handletimeType: function(index) {
620
-            this.scheduleStateVal = index
621
-            this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
622
-            this.search_keyword = this.search_input = ''
623
-            this.getData()
624
-        },
625
-        //分区
626
-        handleZoneChange: function(index) {
627
-            this.zoneVal = index
628
-            this.$store.dispatch('SetZoneSelected', { zone_selected: index })
629
-            this.search_keyword = this.search_input = ''
630
-            this.getData()
631
-        },
632
-        //患者状态
633
-        handleStateChange: function(index) {
634
-            this.patientStateVal = index
635
-            this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
636
-            this.search_keyword = this.search_input = ''
637
-            this.getData()
638
-        },
639
-        handleTreatChange: function(index) {
640
-            this.treatStateVal = index
641
-            this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
642
-            this.search_keyword = this.search_input = ''
643
-            this.getData()
644
-        },
645
-        processedDialysisSchedules: function(schedules, zone_options) {
646
-            var zoneMap = {}
647
-            var scheduleMap = {}
648
-            for (let z_i = 0; z_i < zone_options.length; z_i++) {
649
-                const zone = zone_options[z_i]
650
-                if (zone.id == 0) {
651
-                continue
652
-                }
653
-                scheduleMap[zone.id] = []
654
-            }
655
-            for (let index = 0; index < schedules.length; index++) {
656
-                const schedule = schedules[index]
657
-                scheduleMap[schedule.device_number.zone.id].push(schedule)
658
-            }
659
-            var zone_schedules = []
660
-            for (let index = 0; index < zone_options.length; index++) {
661
-                const zone = zone_options[index]
662
-                if (zone.id == 0) {
663
-                continue
664
-                }
665
-                var schedules = scheduleMap[zone.id]
666
-                zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
667
-            }
668
-            return zone_schedules
669
-        },
670
-        searchAction: function() {
671
-            this.search_keyword = this.search_input
672
-            this.scheduleStateVal = 0
673
-            this.zoneVal = 0
674
-            this.treatStateVal = 0
675
-            this.patientStateVal = 0
676
-            if(this.search_input != ''){
677
-                let arr = []
678
-                this.filtedSchedules.map(item => {
679
-                arr.push(...item.schedules)
680
-                })
681
-                this.tableData = arr
682
-                
683
-            }else{
684
-                this.getData()
685
-            }
686
-        },
687
-        requestDialysisSchedules: function() {
688
-            var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
689
-            getDialysisSchedules(ymd).then(rs => {
690
-                var resp = rs.data
691
-                if (resp.state == 1) {
692
-                var schedules = resp.data.schedules
693
-                this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
694
-                
695
-                let newArr = []
696
-                this.zone_schedules.map(item => {
697
-                    newArr.push(...item.schedules)
698
-                })
699
-                this.tableData = newArr
700
-                this.getData()
701
-                } else {
702
-                this.$message.error(resp.msg)
703
-                }
704
-            })
705
-        },
706
-        changePatient(schedual){
707
-              console.log(schedual)
708
-              var xtdate = parseTime(schedual.schedule_date, '{y}-{m}-{d}')
709
-              this.$router.push(
710
-                '/dialysis/print?xtdate=' + xtdate + '&xtno=' + schedual.patient.dialysis_no
711
-              )
712
-            //   this.patient_id = schedual.patient_id;
713
-            //   this.date = schedual.schedule_date;
714
-            //   // this.getScheduleDetail();
715
-            //   // this.getLongAdvice();
716
-            
717
-            //   var patient_id = schedual.patient_id;
718
-            //   var date = schedual.schedule_date;
719
-            //   this.$router.push({
720
-            //     path: "/dialysis/details",
721
-            //     query: {
722
-            //       patient_id: patient_id,
723
-            //       date: date,
724
-            //       patient_name: schedual.patient.name
725
-            //     }
726
-            //   });
727
-        },
728
-        getData(){
729
-            let patientArr = []
730
-            patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
731
-            console.log('patientArr',patientArr)
732
-            let arr1 = []
733
-            if(this.patientStateVal == 0){
734
-                arr1 = patientArr
735
-                console.log(arr1)
736
-            }else if(this.patientStateVal == 1){
737
-                let arr = []
738
-                arr = patientArr
739
-                for (let i = 0; i <arr.length; i++) {
740
-                    for (let j = 0; j < arr[i].schedules.length; j++) {
741
-                        if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || (arr[i].schedules[j].assessment_before_dislysis.weight_before == '' && arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' && arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == ''))) {
742
-                            // 删除元素后改变i的值
743
-                            arr[i].schedules.splice(j--, 1);
744
-                        }
745
-                    }
746
-                }
747
-                console.log("执行1",arr)
748
-                arr1 = arr
749
-            }else if(this.patientStateVal == 2){
750
-                let arr = []
751
-                arr = patientArr
752
-                for (let i = 0; i < arr.length; i++) {
753
-                    for (let j = 0; j < arr[i].schedules.length; j++) {
754
-                        if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
755
-                            // 删除元素后改变i的值
756
-                            console.log('几次')
757
-                            arr[i].schedules.splice(j--, 1);
758
-                        }
759
-                    }
760
-                }
761
-                console.log("执行2",arr)
762
-                arr1 = arr
763
-            }else if(this.patientStateVal == 3){
764
-                let arr = []
765
-                arr = patientArr
766
-                for (let i = 0; i <arr.length; i++) {
767
-                    for (let j = 0; j < arr[i].schedules.length; j++) {
768
-                        if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1))) {
769
-                            // 删除元素后改变i的值
770
-                            arr[i].schedules.splice(j--, 1);
771
-                        }
772
-                    }
773
-                }
774
-                console.log("执行1",arr)
775
-                arr1 = arr
776
-            }else if(this.patientStateVal == 4){
777
-                let arr = []
778
-                arr = patientArr
779
-                for (let i = 0; i < arr.length; i++) {
780
-                    for (let j = 0; j < arr[i].schedules.length; j++) {
781
-                        if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2))) {
782
-                            // 删除元素后改变i的值
783
-                            arr[i].schedules.splice(j--, 1);
784
-                        }
785
-                    }
786
-                }
787
-                console.log("执行2",arr)
788
-                arr1 = arr
789
-            }
790
-
791
-            let arr2 = []
792
-            if(this.treatStateVal == 0){
793
-                arr2 = JSON.parse(JSON.stringify(arr1))
794
-            }else if(this.treatStateVal == 1){
795
-                let arr = []
796
-                arr = JSON.parse(JSON.stringify(arr1))
797
-                for (let i = 0; i < arr.length; i++) {
798
-                    for (let j = 0; j < arr[i].schedules.length; j++) {
799
-                        if (arr[i].schedules.length > 0 && (arr[i].schedules[j].prescription != null || arr[i].schedules[j].prescription != null ? arr[i].schedules[j].prescription.creater != 0 : false)) {
800
-                            // 删除元素后改变i的值
801
-                            arr[i].schedules.splice(j--, 1);
802
-                        }
803
-                    }
804
-                }
805
-                arr2 = arr
806
-            }else if(this.treatStateVal == 2){
807
-                let arr = []
808
-                arr = JSON.parse(JSON.stringify(arr1))
809
-                for (let i = 0; i < arr.length; i++) {
810
-                    for (let j = 0; j < arr[i].schedules.length; j++) {
811
-                        if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
812
-                            // 删除元素后改变i的值
813
-                            arr[i].schedules.splice(j--, 1);
814
-                        }
815
-                    }
816
-                }
817
-                arr2 = arr
818
-            }
819
-            
820
-
821
-            let arr3 = []
822
-            if(this.scheduleStateVal == 0){
823
-                arr3 = JSON.parse(JSON.stringify(arr2))
824
-            }else{
825
-                let arr = []
826
-                arr = JSON.parse(JSON.stringify(arr2))
827
-                for (let i = 0; i < arr.length; i++) {
828
-                    for (let j = 0; j < arr[i].schedules.length; j++) {
829
-                        if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
830
-                            // 删除元素后改变i的值
831
-                            arr[i].schedules.splice(j--, 1);
832
-                        }
833
-                    }
834
-                }
835
-                arr3 = arr
836
-                console.log("上午",arr)
837
-            }
838
-            
839
-
840
-            let arr4 = []
841
-            if(this.zoneVal == 0){
842
-                arr4 = JSON.parse(JSON.stringify(arr3))
843
-            }else{
844
-                let arr = []
845
-                arr = JSON.parse(JSON.stringify(arr3))
846
-                for (let i = 0; i < arr.length; i++) {
847
-                    if (this.zoneVal != arr[i].zone_id) {
848
-                    // 删除元素后改变i的值
849
-                    arr.splice(i--, 1);
850
-                    }
851
-                }
852
-                arr4 = arr
853
-            }
854
-            let newArr = []
855
-            arr4.map(item => {
856
-            newArr.push(...item.schedules)
857
-            })
858
-            this.tableData = newArr
859
-            console.log('table',this.tableData)
860
-        },
861
-  },
862
-  watch: {
863
-    "patientInfo.gender": function() {
864
-      if (this.patientInfo.gender == 1) {
865
-        this.patientInfo_gender_1 = true;
866
-        this.patientInfo_gender_2 = false;
867
-      } else if (this.patientInfo.gender == 2) {
868
-        this.patientInfo_gender_2 = true;
869
-        this.patientInfo_gender_1 = false;
870
-      } else {
871
-        this.patientInfo_gender_2 = false;
872
-        this.patientInfo_gender_1 = false;
873
-      }
874
-    },
875
-    "patientInfo.source": function() {
876
-      if (this.patientInfo.source == 1) {
877
-        this.patientInfo_source_1 = true;
878
-        this.patientInfo_source_2 = false;
879
-      } else if (this.patientInfo.source == 2) {
880
-        this.patientInfo_source_2 = true;
881
-        this.patientInfo_source_1 = false;
882
-      } else {
883
-        this.patientInfo_source_2 = false;
884
-        this.patientInfo_source_1 = false;
885
-      }
114
+      getPrescriptionPrint(params).then(response=>{
115
+          if(response.data.state == 1){
116
+            var advicePrint =  response.data.data.advicePrint
117
+            console.log("adviceprint",advicePrint)
118
+            this.advicePrint = advicePrint
119
+            // var hisPatient =  response.data.data.hisPatient
120
+            // console.log("hispatient",hisPatient)
121
+            // this.hisPatient = hisPatient
122
+            var patient =  response.data.data.patient
123
+            console.log("patient",patient)
124
+            this.patient = patient
125
+            var doctorPorject = response.data.data.doctorPorject
126
+            console.log("doctorporject",doctorPorject)
127
+          }
128
+      })
886 129
     }
130
+    
887 131
   },
132
+
888 133
   created() {
134
+    this.getAllDoctorList()
135
+    var record_date = this.$route.query.record
136
+    this.record_date = record_date
137
+    console.log("record_date",record_date)
138
+    this.getAllHisPatientList(record_date)
889 139
   },
890
-  computed:{
891
-    filtedSchedules: function() {
892
-      var search_keyword = this.search_keyword
893
-      if (search_keyword.length > 0) {
894
-        var schedules = []
895
-        for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
896
-        const scheduleInfo = this.zone_schedules[o_i]
897
-        var originSchedules = scheduleInfo.schedules
898
-        if (originSchedules.length == 0) {
899
-            continue
900
-        }
901
-        var filtedSchedules = []
902
-        for (let s_i = 0; s_i < originSchedules.length; s_i++) {
903
-            const schedule = originSchedules[s_i]
904
-            if (schedule.patient.name.indexOf(search_keyword) != -1) {
905
-            filtedSchedules.push(schedule)
906
-            // break
907
-            }
908
-        }
909
-        if (filtedSchedules.length > 0) {
910
-            schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
911
-        }
912
-        }
913
-        return schedules
914
-      }
915
-    }
916
-  },
140
+
917 141
 };
918 142
 </script>
919 143
 

+ 321 - 0
src/xt_pages/outpatientDoctorStation/printtwo.vue Näytä tiedosto

@@ -0,0 +1,321 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+       <template>
6
+        <el-button
7
+          :loading="loading"
8
+          size="small"
9
+          icon="el-icon-printer"
10
+          @click="printThisPage"
11
+          type="primary"
12
+          >打印</el-button
13
+        >
14
+      </template>
15
+    </div>
16
+    <div class="app-container" style="min-height:0;">
17
+        <el-container class="newContainer">
18
+            <div style="width:270px;margin-right:20px;">
19
+                <div class="cell clearfix" style="margin-bottom:10px;">
20
+                    <el-input size="small"  v-model.trim="search_input" class="filter-item"/>
21
+                    <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
22
+                </div>
23
+                <el-table ref="tab"   @current-change="changePatient" highlight-current-row :data="patientTableData" 
24
+                 height="480" border style="width: 100%">
25
+                    <el-table-column prop="date"  label="患者">   
26
+                      <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template> 
27
+                    </el-table-column>
28
+                    <el-table-column prop="name" label="就诊号">
29
+                        <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
30
+                    </el-table-column>
31
+                </el-table>
32
+            </div>
33
+            
34
+            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
35
+              <printTwo v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient"></printTwo>
36
+            </div>
37
+        </el-container>
38
+    </div>
39
+  </div>
40
+</template>
41
+
42
+<script>
43
+
44
+
45
+import { parseTime } from "@/utils";
46
+import { getDialysisRecord } from "@/api/dialysis";
47
+import { getDataConfig } from "@/utils/data";
48
+import { jsGetAge, uParseTime } from "@/utils/tools";
49
+
50
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
51
+import print from "print-js";
52
+import printTwo from "./template/printTwo"
53
+import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
54
+export default {
55
+  name: "dialysisPrintOrder",
56
+  components: {
57
+    BreadCrumb,
58
+    printTwo
59
+  },
60
+  data() {
61
+    return {
62
+       record_date:"",
63
+       patientTableData:[],
64
+       advicePrint:[],
65
+       hisPatient:{},
66
+       patient:{}
67
+    };
68
+  },
69
+  methods:{
70
+    getAllDoctorList(){
71
+      getAllDoctorList().then(response=>{
72
+        if(response.data.state == 1){
73
+               var doctor =  response.data.data.doctor
74
+               
75
+               this.doctorList = doctor
76
+             }
77
+         })   
78
+     },
79
+    getAllHisPatientList(){
80
+         const params = {
81
+           record_date:this.record_date
82
+         }
83
+      getAllHisPatientList(params).then(response=>{
84
+         if(response.data.state == 1){
85
+            this.patientTableData = response.data.data.list
86
+            this.patientTableDataTwo = response.data.data.list
87
+
88
+            console.log('222', this.patientTableData)
89
+            let cal_one = 0
90
+            let cal_two = 0
91
+            for (let i = 0; i < response.data.data.list.length; i++) {
92
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
93
+                cal_one = cal_one + 1
94
+              }
95
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
96
+                cal_two = cal_two + 1
97
+              }
98
+            }
99
+            this.$refs.tab.setCurrentRow(this.patientTableData[0])
100
+            console.log(this.patientTableData[0])
101
+            this.choosePatient(this.patientTableData[0])
102
+            this.cal_one = cal_one
103
+            this.cal_two = cal_two   
104
+         }
105
+      })
106
+    },
107
+
108
+    changePatient(row){
109
+      console.log("row",row)
110
+        var params = {
111
+          patient_id:row.patient_id,
112
+          record_date:this.record_date,
113
+        }
114
+      getPrescriptionPrint(params).then(response=>{
115
+          if(response.data.state == 1){
116
+            var advicePrint =  response.data.data.advicePrint
117
+            console.log("adviceprint",advicePrint)
118
+            this.advicePrint = advicePrint
119
+            // var hisPatient =  response.data.data.hisPatient
120
+            // console.log("hispatient",hisPatient)
121
+            // this.hisPatient = hisPatient
122
+            var patient =  response.data.data.patient
123
+            console.log("patient",patient)
124
+            this.patient = patient
125
+            var doctorPorject = response.data.data.doctorPorject
126
+            console.log("doctorporject",doctorPorject)
127
+          }
128
+      })
129
+    }
130
+    
131
+  },
132
+
133
+  created() {
134
+    this.getAllDoctorList()
135
+    var record_date = this.$route.query.record
136
+    this.record_date = record_date
137
+    console.log("record_date",record_date)
138
+    this.getAllHisPatientList(record_date)
139
+  },
140
+
141
+};
142
+</script>
143
+
144
+<style>
145
+.dialysis-print-order {
146
+  width: 960px;
147
+  margin: 0 auto;
148
+}
149
+
150
+.dialysis-print-order .order-yy-name {
151
+  margin: auto;
152
+  text-align: center;
153
+  font-size: 20px;
154
+  letter-spacing: 5px;
155
+}
156
+
157
+.dialysis-print-order .order-title {
158
+  margin: auto;
159
+  font-weight: 600;
160
+  text-align: center;
161
+  font-size: 22px;
162
+  padding: 10px;
163
+}
164
+
165
+.dialysis-print-order .table-box {
166
+  width: 100%;
167
+  line-height: 23px;
168
+  font-size: 14px;
169
+}
170
+
171
+.dialysis-print-order .print-table {
172
+  width: 100%;
173
+  text-align: center;
174
+  border-collapse: collapse;
175
+  line-height: 40px;
176
+  font-size: 14px;
177
+  border-color: #000;
178
+}
179
+
180
+.dialysis-print-order .print-table-no {
181
+  width: 100%;
182
+  text-align: center;
183
+  border-collapse: collapse;
184
+  font-size: 14px;
185
+}
186
+
187
+.dialysis-print-order .under-line {
188
+  border-bottom: 1px solid #999;
189
+  width: 95%;
190
+  text-align: center;
191
+  margin-left: 2px;
192
+}
193
+
194
+.dialysis-print-order .title-box {
195
+  text-align: center;
196
+  font-size: 16px;
197
+}
198
+
199
+.dialysis-print-order .radio-lebel-box {
200
+  font-weight: 400;
201
+  cursor: pointer;
202
+}
203
+
204
+.dialysis-print-order .radio-no {
205
+  opacity: 0;
206
+  outline: none;
207
+  position: absolute;
208
+  margin: 0;
209
+  width: 0;
210
+  height: 0;
211
+  z-index: -1;
212
+}
213
+
214
+.dialysis-print-order .radio-inner {
215
+  white-space: nowrap;
216
+  cursor: pointer;
217
+  outline: none;
218
+  display: inline-block;
219
+  line-height: 1;
220
+  position: relative;
221
+  vertical-align: middle;
222
+}
223
+
224
+.dialysis-print-order .radio-fang {
225
+  display: inline-block;
226
+  position: relative;
227
+  border: 1px solid #000;
228
+  box-sizing: border-box;
229
+  width: 14px;
230
+  height: 14px;
231
+  background-color: #fff;
232
+  z-index: 1;
233
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
234
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
235
+}
236
+
237
+.dialysis-print-order .is-checked-radio::after {
238
+  content: "√";
239
+  font-size: 15px;
240
+}
241
+
242
+.dialysis-print-order .print-table-no tr td {
243
+  padding: 8px 5px;
244
+  line-height: 25px;
245
+}
246
+
247
+.dialysis-print-order .print-table tr td {
248
+  padding: 1px 1px;
249
+  /*line-height: 25px;*/
250
+}
251
+
252
+.es-img {
253
+  height: 30px;
254
+}
255
+
256
+.advice-name {
257
+  text-align: left;
258
+}
259
+
260
+.advice-children {
261
+  display: flex;
262
+}
263
+
264
+.title-box-pro {
265
+  border: 0 #fff;
266
+  line-height: 25px;
267
+  height: 25px;
268
+  text-align: left;
269
+  padding-left: 10px !important;
270
+}
271
+.title-box-pro-tr {
272
+  border: 0 #fff;
273
+}
274
+.text-align-left {
275
+  text-align: left !important;
276
+  padding-left: 10px !important;
277
+  font-size: 14px !important;
278
+  line-height: 25px;
279
+}
280
+.print-table-tr-new td {
281
+  line-height: 20px !important;
282
+}
283
+.border-top-solid {
284
+  border: solid 1px #000;
285
+}
286
+.print-template-two tr {
287
+  line-height: 30px;
288
+}
289
+
290
+.table-box1 {
291
+  border: 1px solid #000;
292
+  width: 100%;
293
+  line-height: 30px;
294
+  font-size: 14px;
295
+  border-collapse: collapse;
296
+}
297
+.table-box1 tr {
298
+  border-bottom: 1px solid #000;
299
+}
300
+</style>
301
+
302
+<style lang="scss">
303
+
304
+.newContainer{
305
+  .dialysisPage::-webkit-scrollbar {
306
+    height: 15px;
307
+  }
308
+  
309
+  .el-date-editor{
310
+    .el-input__inner{
311
+      padding-right:0px;
312
+    }
313
+  }
314
+  .el-table td, .el-table th{
315
+    text-align: center;
316
+  }
317
+}
318
+.newContainer::-webkit-scrollbar{
319
+  height: 15px !important;
320
+}
321
+</style>

+ 3 - 1
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue Näytä tiedosto

@@ -91,6 +91,7 @@
91 91
     </div>
92 92
 </template>
93 93
 <script>
94
+
94 95
 import { getDataConfig } from "@/utils/data";
95 96
 import { getAllDoctorList } from "@/api/project/project"
96 97
 export default {
@@ -135,7 +136,8 @@ export default {
135 136
           }
136 137
         }
137 138
         return name
138
-      }
139
+      },
140
+      
139 141
     },
140 142
     created(){
141 143
       this.educationOptions = getDataConfig("patient", "education_types");

+ 68 - 23
src/xt_pages/outpatientDoctorStation/template/printOne.vue Näytä tiedosto

@@ -2,43 +2,88 @@
2 2
     <div id='prescription-print' class="prescription-print">
3 3
         <div class="printTitle">血液透析中心处方笺</div>
4 4
         <div class="infoTitle">
5
-            <p>姓名:阿萨德</p>
6
-            <p>性别:男</p>
7
-            <p>年龄:12岁</p>
5
+            <p>姓名:{{patient.name}}</p>
6
+            <p>性别:
7
+               <span v-if="patient.gender == 1">男</span>
8
+               <span v-if="patient.gender == 2">女</span>
9
+            </p>
10
+            <p>年龄:{{patient.age}}岁</p>
8 11
         </div>
9 12
         <div class="infoMain">
10
-            <p style="margin-bottom: 10px;">门诊号:111111111111</p>
11
-            <p style="margin-bottom: 10px;">科室:全科</p>
12
-            <p style="margin-bottom: 10px;">医保卡号:111111111111</p>
13
-            <p style="margin-bottom: 10px;">电话:111111111111</p>
14
-            <p>地址:加上来看待就卢萨卡的及拉丝机的了</p>
15
-            <p>临床诊断:拉胯手机上的拉丝机的</p>
13
+            <p style="margin-bottom: 10px;">门诊号:</p>
14
+            <p style="margin-bottom: 10px;">科室:</p>
15
+            <p style="margin-bottom: 10px;">医保卡号:</p>
16
+            <p style="margin-bottom: 10px;">电话:{{patient.phone}}</p>
17
+            <p>地址:{{patient.home_address}}</p>
18
+            <p>临床诊断:{{patient.diagnose}}</p>
16 19
         </div>
17 20
         <div class="prescriptionBox">
18 21
             <p class="Rp">Rp:</p>
19
-            <div class="drugsBox">
20
-                <p class="drugsOne">重组人促红素(CHO细胞)注射液&nbsp;&nbsp;0.5毫升&nbsp;×&nbsp; 2支</p>
21
-                <p style="margin-left:100px;"><span>用法:0.5毫升</span>&nbsp;&nbsp;<span>一天一次</span>&nbsp;&nbsp;<span>静脉注射</span></p>
22
-            </div>
23
-            <div class="drugsBox">
24
-                <p class="drugsOne">重组人促红素(CHO细胞)注射液&nbsp;&nbsp;0.5毫升&nbsp;×&nbsp; 2支</p>
25
-                <p style="margin-left:100px;"><span>用法:0.5毫升</span>&nbsp;&nbsp;<span>一天一次</span>&nbsp;&nbsp;<span>静脉注射</span></p>
22
+            <div class="drugsBox" v-for="(item,index) in advicePrint" :key="index">
23
+                <p class="drugsOne">{{item.advice_name}}&nbsp;&nbsp;{{item.single_dose}}{{item.single_dose_unit}}&nbsp;×&nbsp; {{item.prescribing_number}}{{item.prescribing_number_unit}}</p>
24
+                <p style="margin-left:100px;"><span>用法:{{item.single_dose}}{{item.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{item.execution_frequency}}</span>&nbsp;&nbsp;<span>{{item.advice_desc}}</span></p>
26 25
             </div>
27 26
         </div>
28 27
         <div class="doctorBox">
29
-            <p>医师:高华</p>
30
-            <p>日期:2020-11-14 09:12:32</p>
28
+            <p>医师:{{getDoctor(advicePrint[0].advice_doctor)}}</p>
29
+            <p>日期:{{getTime(advicePrint[0].advice_date)}}</p>
31 30
         </div>
32 31
         <div class="actionBar">
33
-            <p>审核:</p>
34
-            <p>配对:</p>
35
-            <p>核对:</p>
36
-            <p>发药:</p>
37
-            <p>药费:</p>
32
+            <p>审核:{{getDoctor(advicePrint[0].advice_doctor)}}</p>
33
+            <p>配对:{{getDoctor(advicePrint[0].advice_doctor)}}</p>
34
+            <p>核对:{{getDoctor(advicePrint[0].checker)}}</p>
35
+            <p>发药:{{getDoctor(advicePrint[0].execution_staff)}}</p>
36
+            <p>药费:{{advicePrint[0].price}}</p>
38 37
         </div>
39 38
     </div>
40 39
 </template>
40
+<script>
41
+import { jsGetAge, uParseTime } from '@/utils/tools'
42
+  import {getAllDoctorList} from "@/api/project/project"
43
+export default {
44
+    props:{
45
+      patient:Object,
46
+      advicePrint:Array,
47
+      hisPatient:Object,
48
+    }, 
49
+    data(){
50
+      return{
51
+        doctorList:[]
52
+      }
53
+    },
54
+   methods:{
55
+     
56
+     getAllDoctorList(){
57
+      getAllDoctorList().then(response=>{
58
+        if(response.data.state == 1){
59
+               var doctor =  response.data.data.doctor
60
+               
61
+               this.doctorList = doctor
62
+             }
63
+         })   
64
+     },
41 65
 
66
+      getDoctor(id){
67
+        var name = ""
68
+        for(let i=0;i<this.doctorList.length;i++){
69
+          if(id == this.doctorList[i].admin_user_id){
70
+              name = this.doctorList[i].user_name
71
+          }
72
+        }
73
+        return name
74
+      },
75
+      getTime(value, temp) {
76
+        if (value != undefined) {
77
+            return uParseTime(value, temp)
78
+        }
79
+        return ''
80
+     },
81
+   },
82
+   created(){
83
+      this.getAllDoctorList()
84
+   }
85
+}
86
+</script>
42 87
 
43 88
 
44 89
 <style lang="scss" scoped>

+ 152 - 0
src/xt_pages/outpatientDoctorStation/template/printTwo.vue Näytä tiedosto

@@ -0,0 +1,152 @@
1
+<template>
2
+    <div id='prescription-print' class="prescription-print">
3
+        <div class="printTitle">血液透析中心处方笺</div>
4
+        <div class="infoTitle">
5
+            <p>姓名:{{patient.name}}</p>
6
+            <p>性别:
7
+               <span v-if="patient.gender == 1">男</span>
8
+               <span v-if="patient.gender == 2">女</span>
9
+            </p>
10
+            <p>年龄:{{patient.age}}岁</p>
11
+        </div>
12
+        <div class="infoMain">
13
+            <p style="margin-bottom: 10px;">门诊号:</p>
14
+            <p style="margin-bottom: 10px;">科室:</p>
15
+            <p style="margin-bottom: 10px;">医保卡号:</p>
16
+            <p style="margin-bottom: 10px;">电话:{{patient.phone}}</p>
17
+            <p>地址:{{patient.home_address}}</p>
18
+            <p>临床诊断:{{patient.diagnose}}</p>
19
+        </div>
20
+        <div class="prescriptionBox">
21
+            <p class="Rp">Rp:</p>
22
+            <div class="drugsBox" v-for="(item,index) in advicePrint" :key="index">
23
+                <p class="drugsOne">{{item.advice_name}}&nbsp;&nbsp;{{item.single_dose}}{{item.single_dose_unit}}&nbsp;×&nbsp; {{item.prescribing_number}}{{item.prescribing_number_unit}}</p>
24
+                <p style="margin-left:100px;"><span>用法:{{item.single_dose}}{{item.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{item.execution_frequency}}</span>&nbsp;&nbsp;<span>{{item.advice_desc}}</span></p>
25
+            </div>
26
+        </div>
27
+        <div class="doctorBox">
28
+            <p>医师:{{getDoctor(advicePrint[0].advice_doctor)}}</p>
29
+            <p>日期:{{getTime(advicePrint[0].advice_date)}}</p>
30
+        </div>
31
+        <div class="actionBar">
32
+            <p>审核:{{getDoctor(advicePrint[0].advice_doctor)}}</p>
33
+            <p>配对:{{getDoctor(advicePrint[0].advice_doctor)}}</p>
34
+            <p>核对:{{getDoctor(advicePrint[0].checker)}}</p>
35
+            <p>发药:{{getDoctor(advicePrint[0].execution_staff)}}</p>
36
+            <p>药费:{{advicePrint[0].price}}</p>
37
+        </div>
38
+    </div>
39
+</template>
40
+<script>
41
+import { jsGetAge, uParseTime } from '@/utils/tools'
42
+  import {getAllDoctorList} from "@/api/project/project"
43
+export default {
44
+    props:{
45
+      patient:Object,
46
+      advicePrint:Array,
47
+      hisPatient:Object,
48
+    }, 
49
+    data(){
50
+      return{
51
+        doctorList:[]
52
+      }
53
+    },
54
+   methods:{
55
+     
56
+     getAllDoctorList(){
57
+      getAllDoctorList().then(response=>{
58
+        if(response.data.state == 1){
59
+               var doctor =  response.data.data.doctor
60
+               
61
+               this.doctorList = doctor
62
+             }
63
+         })   
64
+     },
65
+
66
+      getDoctor(id){
67
+        var name = ""
68
+        for(let i=0;i<this.doctorList.length;i++){
69
+          if(id == this.doctorList[i].admin_user_id){
70
+              name = this.doctorList[i].user_name
71
+          }
72
+        }
73
+        return name
74
+      },
75
+      getTime(value, temp) {
76
+        if (value != undefined) {
77
+            return uParseTime(value, temp)
78
+        }
79
+        return ''
80
+     },
81
+   },
82
+   created(){
83
+      this.getAllDoctorList()
84
+   }
85
+}
86
+</script>
87
+
88
+
89
+<style lang="scss" scoped>
90
+.printTitle{
91
+    font-size: 22px;
92
+    text-align: center;
93
+    font-weight: bold;
94
+}
95
+.infoTitle{
96
+    display: flex;
97
+    border-bottom: 2px solid #000;
98
+    margin-top:10px;
99
+    line-height: 24px;
100
+    padding:0 10px;
101
+}
102
+.infoTitle p{
103
+    width: 200px;
104
+}
105
+.infoMain{
106
+    display: flex;
107
+    flex-wrap: wrap;
108
+    border-bottom: 2px solid #000;
109
+    padding:0 10px;
110
+}
111
+.infoMain p{
112
+    width: 50%;
113
+    line-height: 24px;
114
+}
115
+.prescriptionBox{
116
+    padding:0 10px;
117
+    height:600px;
118
+}
119
+.Rp{
120
+    font-size: 22px;
121
+    font-weight: bold;
122
+}
123
+.drugsBox{
124
+    padding-left: 40px;
125
+    margin-bottom: 10px;
126
+}
127
+.drugsBox p{
128
+    line-height: 30px;
129
+}
130
+.drugsOne{
131
+    line-height: 24px;
132
+}
133
+.drugsOne span{
134
+    margin-right: 20px;
135
+}
136
+.doctorBox{
137
+    display: flex;
138
+    justify-content: space-between;
139
+    padding:0 10px;
140
+    line-height: 24px;
141
+    border-bottom: 2px solid #000;
142
+}
143
+.actionBar{
144
+    display: flex;
145
+    justify-content: space-between; 
146
+    line-height: 24px;
147
+    padding:0 10px;
148
+}
149
+.actionBar p{
150
+    width:150px;
151
+}
152
+</style>