浏览代码

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

XMLWAN 3 年前
父节点
当前提交
f311f0d88d

+ 63 - 0
src/api/his/his.js 查看文件

@@ -564,3 +564,66 @@ export function getAllOrders(params) {
564 564
 
565 565
 
566 566
 
567
+
568
+
569
+
570
+export function Inhopitalcheck(params) {
571
+  return request({
572
+    url: "/api/hospital/inhopitalcheck/get",
573
+    method: "get",
574
+    params:params,
575
+  });
576
+}
577
+
578
+
579
+
580
+export function Outhopitalcheck(params) {
581
+  return request({
582
+    url: "/api/hospital/outhopitalcheck/get",
583
+    method: "get",
584
+    params:params,
585
+  });
586
+}
587
+
588
+
589
+
590
+
591
+export function Settle(params) {
592
+  return request({
593
+    url: "/api/hospital/settle/get",
594
+    method: "get",
595
+    params:params,
596
+  });
597
+}
598
+
599
+
600
+
601
+
602
+
603
+export function Inthopitaluncheck(params) {
604
+  return request({
605
+    url: "/api/hospital/inthopitaluncheck/get",
606
+    method: "get",
607
+    params:params,
608
+  });
609
+}
610
+
611
+
612
+export function Outhopitaluncheck(params) {
613
+  return request({
614
+    url: "/api/hospital/outhopitaluncheck/get",
615
+    method: "get",
616
+    params:params,
617
+  });
618
+}
619
+
620
+
621
+
622
+export function  HopitalunRefund(params) {
623
+  return request({
624
+    url: "/api/hospital/refund",
625
+    method: "get",
626
+    params:params,
627
+  });
628
+}
629
+

+ 2 - 2
src/views/layout/Layout.vue 查看文件

@@ -4,9 +4,9 @@
4 4
 
5 5
     <div class="mainBox">
6 6
       <div class="navLeft">
7
-        <div v-if="menzhenShow" :class="index == 0 ? 'navOne navActive' : 'navOne'" @click="clickActive(0,'门诊管理')">
7
+        <div v-if="menzhenShow" :class="index == 0 ? 'navOne navActive' : 'navOne'" @click="clickActive(0,'HIS管理')">
8 8
           <i class="iconfont icon--yishengmenzhen navIcon"></i>
9
-          <p>门诊管理</p>
9
+          <p>HIS管理</p>
10 10
         </div>
11 11
         <div v-if="bingliShow" :class="index == 1 ? 'navOne navActive' : 'navOne'" @click="clickActive(1,'电子病历')">
12 12
           <i class="iconfont icon-s_bingli navIcon"></i>

+ 1 - 1
src/views/layout/components/Sidebar/index.vue 查看文件

@@ -68,7 +68,7 @@ export default {
68 68
   watch:{
69 69
     navTitle:{
70 70
       handler(newVal,oldVal){
71
-        if(newVal == '门诊管理'){
71
+        if(newVal == 'HIS管理'){
72 72
           let nameArr = ['hospitalStation','outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord',];
73 73
           // console.log('permission_routers',this.permission_routers)
74 74
           let routerArr = [];

+ 348 - 0
src/xt_pages/hospitalStation/checkPrint.vue 查看文件

@@ -0,0 +1,348 @@
1
+<template>
2
+  <div>
3
+       <!-- <template>
4
+        <el-button
5
+          style="float:right;"
6
+          :loading="loading"
7
+          size="small"
8
+          icon="el-icon-printer"
9
+          @click="printThisPage"
10
+          type="primary"
11
+          >打印</el-button
12
+        >
13
+      </template> -->
14
+            
15
+      <div class='dialysisPage' style="padding-top:40px;">
16
+        <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
17
+      </div>
18
+  </div>
19
+</template>
20
+
21
+<script>
22
+import { jsGetAge, uParseTime } from "@/utils/tools";
23
+
24
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
25
+import print from "print-js";
26
+import printOne from "./checkTemplate/printOne"
27
+import { getAllDoctorList,getAllHisPatientList } from "@/api/project/project"
28
+export default {
29
+  name: "dialysisPrintOrder",
30
+  components: {
31
+    BreadCrumb,
32
+    printOne,
33
+  },
34
+  props:{
35
+    paramsObj:Object
36
+  },
37
+  data() {
38
+    return {
39
+      crumbs: [
40
+        { path: false, name: '门诊医生站' },
41
+        { path: false, name: '打印' }
42
+      ],
43
+      record_date:"",
44
+      patientTableData:[],
45
+      advicePrint:[],
46
+      hisPatient:{},
47
+      patient:{},
48
+      search_input:"",
49
+      loading:false,
50
+      patient_id:0,
51
+      prescription_id:0,
52
+      ids:''
53
+    };
54
+  },
55
+  methods:{
56
+    printThisPage() {
57
+        var ptime = Math.round(new Date().getTime() / 1000);
58
+        this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
59
+        setTimeout(() => {
60
+            const style =
61
+            '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.prescription-print{font-size: 14px;}.printTitle{font-size: 18px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:5px;padding:0 10px;}.infoTitle div{width: 300px;margin-bottom:5px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;}.prescriptionBox{padding:0 10px;min-height:380px;}.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; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; padding:0 10px;margin:5px 0;} .actionBar div{width:150px;}}';
62
+            printJS({
63
+                printable: "prescription-print3",
64
+                type: "html",
65
+                style: style,
66
+                scanStyles: false
67
+            });
68
+        },500)
69
+        
70
+    },
71
+    getAllDoctorList(){
72
+      getAllDoctorList().then(response=>{
73
+        if(response.data.state == 1){
74
+               var doctor =  response.data.data.doctor
75
+               
76
+               this.doctorList = doctor
77
+             }
78
+         })   
79
+     },
80
+    getAllHisPatientList(){
81
+         const params = {
82
+           record_date:this.record_date
83
+         }
84
+      getAllHisPatientList(params).then(response=>{
85
+         if(response.data.state == 1){
86
+            this.patientTableData = response.data.data.list
87
+            this.patientTableDataTwo = response.data.data.list
88
+
89
+            console.log('222', this.patientTableData)
90
+            let cal_one = 0
91
+            let cal_two = 0
92
+            for (let i = 0; i < response.data.data.list.length; i++) {
93
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
94
+                cal_one = cal_one + 1
95
+              }
96
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
97
+                cal_two = cal_two + 1
98
+              }
99
+            }
100
+            // this.$refs.tab.setCurrentRow(this.patientTableData[0])
101
+            // console.log(this.patientTableData[0])
102
+            // this.choosePatient(this.patientTableData[0])
103
+            this.cal_one = cal_one
104
+            this.cal_two = cal_two   
105
+         }
106
+      })
107
+    },
108
+
109
+    changePatient(row){
110
+      console.log("row",row)
111
+      this.patient_id = row.patient_id
112
+      this.record_date = this.record_date
113
+      this.prescription_id = this.prescription_id
114
+      //   var params = {
115
+      //     patient_id:row.patient_id,
116
+      //     record_date:this.record_date,
117
+      //     prescription_id:this.prescription_id,
118
+      //   }
119
+      // getPrescriptionPrint(params).then(response=>{
120
+      //     if(response.data.state == 1){
121
+      //       var advicePrint =  response.data.data.advicePrint
122
+      //       console.log("adviceprint",advicePrint)
123
+      //       this.advicePrint = advicePrint
124
+      //       // var hisPatient =  response.data.data.hisPatient
125
+      //       // console.log("hispatient",hisPatient)
126
+      //       // this.hisPatient = hisPatient
127
+      //       var patient =  response.data.data.patient
128
+      //       console.log("patient",patient)
129
+      //       this.patient = patient
130
+      //       var doctorPorject = response.data.data.doctorPorject
131
+      //       console.log("doctorporject",doctorPorject)
132
+      //     }
133
+      // })
134
+    },
135
+    searchAction(){
136
+
137
+    }
138
+    
139
+  },
140
+
141
+  created() {
142
+    this.org_id = this.$store.getters.xt_user.org_id
143
+    this.getAllDoctorList()
144
+    var record_date = this.paramsObj.record
145
+    this.record_date = record_date
146
+    console.log("record_date",record_date)
147
+    this.prescription_id = this.paramsObj.prescription_id
148
+    this.patient_id = this.paramsObj.patient_id
149
+    this.ids = this.paramsObj.ids
150
+    this.getAllHisPatientList(record_date)
151
+  },
152
+  watch:{
153
+    paramsObj:{//深度监听,可监听到对象、数组的变化
154
+      handler(val, oldVal){
155
+        this.paramsObj = val
156
+        this.patient_id = this.paramsObj.patient_id
157
+        var record_date = this.paramsObj.record
158
+        this.record_date = record_date
159
+        var prescription_id = this.paramsObj.prescription_id
160
+        this.prescription_id = prescription_id
161
+        this.ids = this.paramsObj.ids
162
+        
163
+      },
164
+      deep:true
165
+    }
166
+  }
167
+
168
+};
169
+</script>
170
+
171
+<style>
172
+.dialysis-print-order {
173
+  width: 960px;
174
+  margin: 0 auto;
175
+}
176
+
177
+.dialysis-print-order .order-yy-name {
178
+  margin: auto;
179
+  text-align: center;
180
+  font-size: 20px;
181
+  letter-spacing: 5px;
182
+}
183
+
184
+.dialysis-print-order .order-title {
185
+  margin: auto;
186
+  font-weight: 600;
187
+  text-align: center;
188
+  font-size: 22px;
189
+  padding: 10px;
190
+}
191
+
192
+.dialysis-print-order .table-box {
193
+  width: 100%;
194
+  line-height: 23px;
195
+  font-size: 14px;
196
+}
197
+
198
+.dialysis-print-order .print-table {
199
+  width: 100%;
200
+  text-align: center;
201
+  border-collapse: collapse;
202
+  line-height: 40px;
203
+  font-size: 14px;
204
+  border-color: #000;
205
+}
206
+
207
+.dialysis-print-order .print-table-no {
208
+  width: 100%;
209
+  text-align: center;
210
+  border-collapse: collapse;
211
+  font-size: 14px;
212
+}
213
+
214
+.dialysis-print-order .under-line {
215
+  border-bottom: 1px solid #999;
216
+  width: 95%;
217
+  text-align: center;
218
+  margin-left: 2px;
219
+}
220
+
221
+.dialysis-print-order .title-box {
222
+  text-align: center;
223
+  font-size: 16px;
224
+}
225
+
226
+.dialysis-print-order .radio-lebel-box {
227
+  font-weight: 400;
228
+  cursor: pointer;
229
+}
230
+
231
+.dialysis-print-order .radio-no {
232
+  opacity: 0;
233
+  outline: none;
234
+  position: absolute;
235
+  margin: 0;
236
+  width: 0;
237
+  height: 0;
238
+  z-index: -1;
239
+}
240
+
241
+.dialysis-print-order .radio-inner {
242
+  white-space: nowrap;
243
+  cursor: pointer;
244
+  outline: none;
245
+  display: inline-block;
246
+  line-height: 1;
247
+  position: relative;
248
+  vertical-align: middle;
249
+}
250
+
251
+.dialysis-print-order .radio-fang {
252
+  display: inline-block;
253
+  position: relative;
254
+  border: 1px solid #000;
255
+  box-sizing: border-box;
256
+  width: 14px;
257
+  height: 14px;
258
+  background-color: #fff;
259
+  z-index: 1;
260
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
261
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
262
+}
263
+
264
+.dialysis-print-order .is-checked-radio::after {
265
+  content: "√";
266
+  font-size: 15px;
267
+}
268
+
269
+.dialysis-print-order .print-table-no tr td {
270
+  padding: 8px 5px;
271
+  line-height: 25px;
272
+}
273
+
274
+.dialysis-print-order .print-table tr td {
275
+  padding: 1px 1px;
276
+  /*line-height: 25px;*/
277
+}
278
+
279
+.es-img {
280
+  height: 30px;
281
+}
282
+
283
+.advice-name {
284
+  text-align: left;
285
+}
286
+
287
+.advice-children {
288
+  display: flex;
289
+}
290
+
291
+.title-box-pro {
292
+  border: 0 #fff;
293
+  line-height: 25px;
294
+  height: 25px;
295
+  text-align: left;
296
+  padding-left: 10px !important;
297
+}
298
+.title-box-pro-tr {
299
+  border: 0 #fff;
300
+}
301
+.text-align-left {
302
+  text-align: left !important;
303
+  padding-left: 10px !important;
304
+  font-size: 14px !important;
305
+  line-height: 25px;
306
+}
307
+.print-table-tr-new td {
308
+  line-height: 20px !important;
309
+}
310
+.border-top-solid {
311
+  border: solid 1px #000;
312
+}
313
+.print-template-two tr {
314
+  line-height: 30px;
315
+}
316
+
317
+.table-box1 {
318
+  border: 1px solid #000;
319
+  width: 100%;
320
+  line-height: 30px;
321
+  font-size: 14px;
322
+  border-collapse: collapse;
323
+}
324
+.table-box1 tr {
325
+  border-bottom: 1px solid #000;
326
+}
327
+</style>
328
+
329
+<style lang="scss">
330
+
331
+.newContainer{
332
+  .dialysisPage::-webkit-scrollbar {
333
+    height: 15px;
334
+  }
335
+  
336
+  .el-date-editor{
337
+    .el-input__inner{
338
+      padding-right:0px;
339
+    }
340
+  }
341
+  .el-table td, .el-table th{
342
+    text-align: center;
343
+  }
344
+}
345
+.newContainer::-webkit-scrollbar{
346
+  height: 15px !important;
347
+}
348
+</style>

+ 501 - 0
src/xt_pages/hospitalStation/checkTemplate/printOne.vue 查看文件

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

+ 26 - 7
src/xt_pages/hospitalStation/components/callPrescription.vue 查看文件

@@ -224,6 +224,12 @@
224 224
         let allPrescriptions = [];
225 225
         let targetPrescriptions = [];
226 226
         let prescriptions = [];
227
+
228
+
229
+
230
+
231
+
232
+
227 233
         for (let i = 0; i < this.allPrescription.length; i++) {
228 234
           for (let a = 0; a < this.allPrescription[i].check_group.length; a++) {
229 235
             checkGroup.push(this.allPrescription[i].check_group[a])
@@ -240,6 +246,7 @@
240 246
           }
241 247
         }
242 248
 
249
+
243 250
         if (targetPrescriptions.length > 0) {
244 251
           for (let i = 0; i < targetPrescriptions.length; i++) {
245 252
             var prescription = targetPrescriptions[i];
@@ -247,13 +254,14 @@
247 254
             let tempProject = [];
248 255
             let tempAddition = [];
249 256
             for (let b = 0; b < prescription.doctor_advice.length; b++) {
257
+              let index = b + 1
250 258
               let obj = {
251 259
                 advice_id: 0,
252 260
                 drug_name: prescription.doctor_advice[b].advice_name,
253 261
                 single_dose: prescription.doctor_advice[b].single_dose,
254 262
                 delivery_way: prescription.doctor_advice[b].delivery_way,
255 263
                 execution_frequency: prescription.doctor_advice[b].execution_frequency,
256
-                retail_price: prescription.doctor_advice[b].price.toString(),
264
+                // retail_price: prescription.doctor_advice[b].price.toString(),
257 265
                 remark: prescription.doctor_advice[b].remark,
258 266
                 day:prescription.doctor_advice[b].day,
259 267
                 prescribing_number:prescription.doctor_advice[b].prescribing_number.toString(),
@@ -262,7 +270,17 @@
262 270
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
263 271
                 id:prescription.doctor_advice[b].drug_id,
264 272
                 drug:prescription.doctor_advice[b].drug,
273
+                groupno: index,
274
+                hosp_appr_flag:"1",
265 275
               };
276
+              if (obj.prescribing_number_unit == prescription.doctor_advice[b].drug.min_unit){
277
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
278
+              } else if(obj.prescribing_number_unit == prescription.doctor_advice[b].drug.max_unit){
279
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.retail_price
280
+              } else {
281
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
282
+              }
283
+
266 284
               tempAdvice.push(obj)
267 285
 
268 286
             }
@@ -280,26 +298,25 @@
280 298
                 execution_frequency: prescription.project[b].execution_frequency,
281 299
                 number_days: prescription.project[b].day,
282 300
                 total:prescription.project[b].count,
283
-                price:prescription.project[b].price,
284 301
                 remark:prescription.project[b].remark,
285 302
                 unit: prescription.project[b].unit,
286 303
                 type: prescription.project[b].type,
287
-
288
-
289 304
                 // medical_code:prescription.project[b].project.medical_code,
290 305
               };
291
-              console.log(prescription.project[b].type)
292 306
               if(prescription.project[b].type == 2){
293
-
294 307
                 obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
295 308
                 obj['medical_code'] =  prescription.project[b].project.medical_code
296 309
                 obj['project_name'] =  prescription.project[b].project.project_name
310
+                obj['price'] = prescription.project[b].project.price
311
+                obj['project']=prescription.project[b].project
297 312
 
298 313
               }else if(prescription.project[b].type == 3){
299
-
300 314
                 obj['statistical_classification'] = ""
301 315
                 obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
302 316
                 obj['project_name'] =  prescription.project[b].good_info.good_name
317
+                obj['price'] = prescription.project[b].good_info.packing_price
318
+                obj['good_info']=prescription.project[b].good_info
319
+
303 320
               }
304 321
 
305 322
               tempProject.push(obj)
@@ -311,6 +328,8 @@
311 328
               addition:tempAddition,
312 329
               type:prescription.type,
313 330
               order_status:0,
331
+              med_type: parseInt(prescription.med_type)
332
+
314 333
             };
315 334
             prescriptions.push(obj)
316 335
           }

文件差异内容过多而无法显示
+ 1263 - 795
src/xt_pages/hospitalStation/components/deskPrescription.vue


+ 995 - 0
src/xt_pages/hospitalStation/components/dialysisIndex.vue 查看文件

@@ -0,0 +1,995 @@
1
+<template>
2
+  <div class="main-contain">
3
+
4
+    <div
5
+      class="loadingBox"
6
+      v-loading="loading"
7
+      element-loading-text="拼命加载中"
8
+      element-loading-spinner="el-icon-loading"
9
+      element-loading-background="rgba(0, 0, 0, 0.8)"
10
+      v-if="dialysisShow"
11
+    >
12
+      <div style="padding-top: 56px;width:100%;" >
13
+
14
+        <nav-igation
15
+          ref="nav"
16
+          title="弹窗导航"
17
+          @advice="adviceFunc"
18
+          :patient="patient"
19
+          :schedual="schedual"
20
+          :prescription="prescription"
21
+          :solution="solution"
22
+          :receiver_treatment_access="receiver_treatment_access"
23
+          :predialysis_evaluation="predialysis_evaluation"
24
+          :doctor_advices="doctor_advices"
25
+          :double_check="double_check"
26
+          :assessment_after_dislysis="assessment_after_dislysis"
27
+          :treatment_summary="treatment_summary"
28
+          :monitor_records="monitor_records"
29
+          :dialysis_order="dialysis_order"
30
+          :admin_users="admin_users"
31
+          :devices="devices"
32
+          :device_numbers="device_numbers"
33
+          :admin_user_map="admin_user_map"
34
+          :device_map="device_map"
35
+          :device_number_map="device_number_map"
36
+          :niprocart_info="niprocart_info"
37
+          :jms_info="jms_info"
38
+          :fistula_needle_set_info="fistula_needle_set_info"
39
+          :fistula_needle_set_16_info="fistula_needle_set_16_info"
40
+          :hemoperfusion_info="hemoperfusion_info"
41
+          :dialyser_sterilised_info="dialyser_sterilised_info"
42
+          :filtryzer_info="filtryzer_info"
43
+          :dialyzers_info="dialyzers_info"
44
+          :injector_info="injector_info"
45
+          :bloodlines_info="bloodlines_info"
46
+          :tubingHemodialysis_info="tubingHemodialysis_info"
47
+          :safe_package_info="safe_package_info"
48
+          :aliquid_info="aliquid_info"
49
+          :config="config"
50
+          :longAdvices="longAdvices"
51
+          :waitUploadAdvices="waitUploadAdvices"
52
+          :is_open="is_open"
53
+          :last_predialysis_evaluation="lastPredialysisEvaluation"
54
+          :last_monitor_record="lastMonitorRecord"
55
+          :last_assessment_after_dislysis="lastAssessmentAfterDislysis"
56
+          :last_dialysis_prescribe="lastDialysisPrescribe"
57
+          :last_dryWeight_dislysis="lastDryWeightDislysis"
58
+          :special_premission="headNurses"
59
+          @assessmentAfterDislysis="assessmentAfterDislysisFunc"
60
+          :system_prescribe="system_prescribe"
61
+          :his_is_open="his_is_open"
62
+          :lastAssessment="lastAssessment"
63
+          :stockType="stockType"
64
+          :mode_id="mode_id"
65
+        >
66
+        </nav-igation>
67
+
68
+
69
+
70
+        <basic-infor
71
+          :patient="patient"
72
+          :device_number="schedual.id == 0 ? '' : schedual.device_number.number"
73
+          :steps="steps"
74
+          title="基本信息"
75
+        ></basic-infor>
76
+
77
+        <dialysis-prescription
78
+          :prescription="prescription"
79
+          :solution="solution"
80
+          :device_map="device_map"
81
+          :preparestock="preparestock"
82
+          title="透析处方"
83
+        ></dialysis-prescription>
84
+
85
+
86
+
87
+      <!-- <past-data class="往期数据"></past-data> -->
88
+        <div style="height: 20px;background-color: #f6f8f9"></div>
89
+        <accepts-assessment
90
+          :record="receiver_treatment_access"
91
+          title="接诊评估"
92
+        ></accepts-assessment>
93
+
94
+        <assessment-before
95
+          :record="predialysis_evaluation"
96
+          ref="assessment_before"
97
+          title="透前评估"
98
+        ></assessment-before>
99
+
100
+        <stat-order
101
+          ref="stat_order"
102
+          :advices="doctor_advices"
103
+          :doctor_map="admin_user_map"
104
+          title="临时医嘱"
105
+        ></stat-order>
106
+
107
+        <double-check
108
+          ref="double_check"
109
+          :record="double_check"
110
+          :admin_map="admin_user_map"
111
+          title="双人核对 "
112
+        ></double-check>
113
+
114
+        <dialysis-computer
115
+          ref="dialysis_computer"
116
+          :record="dialysis_order"
117
+          :admin_map="admin_user_map"
118
+          :device_number_map="device_number_map"
119
+          title="透析上机 "
120
+        ></dialysis-computer>
121
+
122
+        <dialysis-monitoring
123
+          ref="monitoring"
124
+          :monitores="monitor_records"
125
+          title="透析监测"
126
+        ></dialysis-monitoring>
127
+
128
+
129
+        <dialysis-off
130
+          ref="dialysis_off"
131
+          :record="dialysis_order"
132
+          :admin_map="admin_user_map"
133
+          title="透析下机 "
134
+        ></dialysis-off>
135
+
136
+        <assessment-after
137
+          ref="assessment_after"
138
+          :record="assessment_after_dislysis"
139
+          title="透后评估"
140
+        ></assessment-after>
141
+
142
+        <treatment-of
143
+          ref="treatment_of"
144
+          :record="treatment_summary"
145
+          title="治疗小结"
146
+        ></treatment-of>
147
+      </div>
148
+      
149
+    </div>
150
+    <div style="padding-top: 56px;width:100%;text-align:center;font-size:22px;color:red;" v-else>该患者未排班,请先去排班</div>
151
+  </div>
152
+</template>
153
+
154
+<script>
155
+const moment = require('moment')
156
+import axios from 'axios'
157
+import NavIgation from '@/xt_pages/dialysis/details/NavIgation'
158
+import BasicInfor from '@/xt_pages/dialysis/details/BasicInfor'
159
+import DialysisPrescription from '@/xt_pages/dialysis/details/DialysisPrescription'
160
+import PastData from '@/xt_pages/dialysis/details/pastData'
161
+import AcceptsAssessment from '@/xt_pages/dialysis/details/acceptsAssessment'
162
+import AssessmentBefore from '@/xt_pages/dialysis/details/assessmentBefore'
163
+import StatOrder from '@/xt_pages/dialysis/details/statOrder'
164
+import DialysisComputer from '@/xt_pages/dialysis/details/dialysisComputer'
165
+import DoubleCheck from '@/xt_pages/dialysis/details/doubleCheck'
166
+import DialysisMonitoring from '@/xt_pages/dialysis/details/dialysisMonitoring'
167
+import DialysisOff from '@/xt_pages/dialysis/details/dialysisOff'
168
+import AssessmentAfter from '@/xt_pages/dialysis/details/assessmentAfter'
169
+import TreatmentOf from '@/xt_pages/dialysis/details/treatmentOf'
170
+import OperationStaff from '@/xt_pages/dialysis/details/operationStaff'
171
+import {
172
+  getDialysisScheduleDetail,
173
+  getLongAdvice,
174
+  getDialysisRecordInitData,
175
+  getDialysisSchedules
176
+} from '@/api/dialysis_record'
177
+import { parseTime } from '@/utils'
178
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
179
+
180
+export default {
181
+  name: 'index',
182
+  components: {
183
+    NavIgation,
184
+    BasicInfor,
185
+    DialysisPrescription,
186
+    PastData,
187
+    AcceptsAssessment,
188
+    AssessmentBefore,
189
+    StatOrder,
190
+    DialysisComputer,
191
+    DoubleCheck,
192
+    DialysisMonitoring,
193
+    DialysisOff,
194
+    AssessmentAfter,
195
+    TreatmentOf,
196
+    OperationStaff,
197
+    BreadCrumb
198
+  },
199
+  props:{
200
+    record_date:String,
201
+    patientid:Number,
202
+    dialysisShow:Boolean
203
+  },
204
+  data() {
205
+    return {
206
+      crumbs: [
207
+        { path: false, name: '透析管理' },
208
+        { path: false, name: '透析记录' },
209
+        { path: false, name: '透析单' }
210
+      ],
211
+      dialogFormVisible: false,
212
+      orders: false,
213
+      loading: false,
214
+      patient_id: 0,
215
+      date: 0,
216
+
217
+      longAdvices: [],
218
+      waitUploadAdvices: [],
219
+      is_open: 0,
220
+      targetAdvices: [],
221
+
222
+      patient: { id: 0 }, // 患者信息
223
+      schedual: { id: 0 }, // 患者排班信息
224
+      prescription: { id: 0 }, // 透析处方
225
+      solution: { id: 0 }, // 透析方案
226
+      system_prescribe: { id: 0 },
227
+      receiver_treatment_access: { id: 0 }, // 接诊评估
228
+      predialysis_evaluation: { id: 0 }, // 透前评估
229
+      doctor_advices: [], // 临时医嘱
230
+      double_check: { id: 0 }, // 双人核对
231
+      assessment_after_dislysis: { id: 0 }, // 透后评估
232
+      treatment_summary: { id: 0 }, // 治疗小结
233
+      monitor_records: [], // 透析监测
234
+      dialysis_order: { id: 0 }, // 透析记录
235
+      admin_users: [], // 系统用户列表
236
+      devices: [], // 设备
237
+      device_numbers: [], // 床位号
238
+
239
+      admin_user_map: {}, // {user_id: admin_user object}
240
+      device_map: {}, // {device_id: device}
241
+      device_number_map: {}, // {device_number_id: device_number}
242
+
243
+      niprocart_info: [],
244
+      jms_info: [],
245
+      fistula_needle_set_info: [],
246
+      fistula_needle_set_16_info: [],
247
+      hemoperfusion_info: [],
248
+      dialyser_sterilised_info: [],
249
+      filtryzer_info: [],
250
+      dialyzers_info: [],
251
+      injector_info: [],
252
+      bloodlines_info: [],
253
+      tubingHemodialysis_info: [],
254
+      safe_package_info: [],
255
+      aliquid_info: [],
256
+      config: {},
257
+
258
+      his_is_open:0,
259
+
260
+      lastPredialysisEvaluation: { id: 0 },
261
+      lastMonitorRecord: { id: 0 },
262
+      lastAssessmentAfterDislysis: { id: 0 },
263
+      lastDryWeightDislysis: { id: 0 },
264
+      lastAssessment:{id:0},
265
+      headNurses: [],
266
+      lastDialysisPrescribe: { id: 0 },
267
+      //
268
+      activeName: 'first',
269
+      selected_date: new Date(),
270
+      // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
271
+      search_keyword: '', // 确定用于搜索的关键字
272
+      search_input: '', // 输入中的关键字
273
+      patient_state: [
274
+        { value: 0, label: '全部患者' },
275
+        { value: 1, label: '已签到' },
276
+        { value: 2, label: '未签到' },
277
+        { value: 3, label: '已上机' },
278
+        { value: 4, label: '已下机' }
279
+      ],
280
+      patientStateVal: 0,
281
+      treat_state: [
282
+        { value: 0, label: '全部治疗' },
283
+        { value: 1, label: '待开处方' },
284
+        { value: 2, label: '待开小结' },
285
+        { value: 3, label: '待医嘱核对' },
286
+      ],
287
+      treatStateVal: 0,
288
+      schedule_options: [
289
+        { value: 0, label: '全部班' },
290
+        { value: 1, label: '上午' },
291
+        { value: 2, label: '下午' },
292
+        { value: 3, label: '晚上' }
293
+      ],
294
+      scheduleStateVal: 0,
295
+      zone_options: [
296
+        { id: 0, text: '全部分区' }
297
+      ],
298
+      zoneVal: 0,
299
+      tableData: [],
300
+      tableData1: [],
301
+      arr: [],
302
+      newName: '',
303
+      newTime: '',
304
+      scheudle_mode:"",
305
+
306
+
307
+      showView:false,
308
+      curPatient:{},
309
+
310
+      queueConfig:{},
311
+      stockType:[],
312
+      preparestock:[],
313
+      dialysisShow:false,
314
+      mode_id:1
315
+    }
316
+  },
317
+  created() {
318
+    var patient_id = this.patientid
319
+    var date = this.record_date
320
+    this.patient_id = patient_id
321
+    this.date = date
322
+    var ymd = parseTime(new Date(), '{y}-{m}-{d}')
323
+    getDialysisSchedules(ymd).then(rs => {
324
+      var resp = rs.data
325
+      if (resp.state == 1) {
326
+        var schedules = resp.data.schedules
327
+        let arr = []
328
+        schedules.map(item => {
329
+          if(item.patient_id == this.patient_id){
330
+            arr.push(item.patient_id)
331
+            console.log('item',item)
332
+            this.mode_id = item.mode_id
333
+          }
334
+        })
335
+        if(arr.length > 0){
336
+          this.dialysisShow = true
337
+        }else{
338
+          this.dialysisShow = false
339
+        }
340
+        console.log('this.dialysisShowthis.dialysisShowthis.dialysisShow',this.dialysisShow)
341
+      } else {
342
+        this.$message.error(resp.msg)
343
+      }
344
+    })
345
+
346
+    
347
+
348
+  },
349
+  mounted() {
350
+    if(this.dialysisShow == true){
351
+      
352
+      this.getScheduleDetail()
353
+      this.getLongAdvice()
354
+    }
355
+    
356
+  },
357
+  watch:{
358
+        patientid:{
359
+            handler(newVal){
360
+              var ymd = parseTime(new Date(), '{y}-{m}-{d}')
361
+              getDialysisSchedules(ymd).then(rs => {
362
+                var resp = rs.data
363
+                if (resp.state == 1) {
364
+                  var schedules = resp.data.schedules
365
+                  let arr = []
366
+                  schedules.map(item => {
367
+                    if(item.patient_id == this.patient_id){
368
+                      arr.push(item.patient_id)
369
+                      this.mode_id = item.mode_id
370
+                    }
371
+                  })
372
+                  if(arr.length > 0){
373
+                    this.dialysisShow = true
374
+                  }else{
375
+                    this.dialysisShow = false
376
+                  }
377
+                  console.log('this.dialysisShowthis.dialysisShowthis.dialysisShow',this.dialysisShow)
378
+                } else {
379
+                  this.$message.error(resp.msg)
380
+                }
381
+              })
382
+              console.log('执行执行执行执行执行执行',this.dialysisShow)
383
+              if(this.dialysisShow == true){
384
+                console.log('执行')
385
+                this.patient_id = newVal
386
+                this.getScheduleDetail()
387
+                this.getLongAdvice()
388
+              }
389
+            },
390
+            deep:true
391
+        },
392
+  },
393
+  computed: {
394
+    websocket() {
395
+      return this.$store.state.user.websocket;
396
+    },
397
+    steps: function() {
398
+      var steps = [
399
+        { title: '透析处方', finish: false },
400
+        { title: '接诊评估', finish: false },
401
+        { title: '透前评估', finish: false },
402
+        { title: '临时医嘱', finish: false },
403
+        { title: '双人核对', finish: false },
404
+        { title: '透析上机', finish: false },
405
+        { title: '透析监测', finish: false },
406
+        { title: '透析下机', finish: false },
407
+        { title: '透后评估', finish: false },
408
+        { title: '治疗小结', finish: false }
409
+      ]
410
+
411
+      steps[0].finish = this.prescription.id && this.prescription.creater > 0
412
+      steps[1].finish = this.receiver_treatment_access.id > 0
413
+      steps[2].finish =
414
+        this.predialysis_evaluation.id > 0 &&
415
+        this.predialysis_evaluation.creater > 0
416
+      steps[3].finish = this.doctor_advices.length > 0
417
+      steps[5].finish = this.dialysis_order.id > 0
418
+      steps[7].finish =
419
+        this.dialysis_order.id > 0 && this.dialysis_order.stage == 2
420
+
421
+      steps[4].finish =
422
+        this.double_check.id > 0 &&
423
+        this.double_check.creater > 0 &&
424
+        this.double_check.modifier > 0
425
+      steps[6].finish = this.monitor_records.length > 0
426
+      steps[8].finish =
427
+        this.assessment_after_dislysis.id > 0 &&
428
+        this.assessment_after_dislysis.creater > 0
429
+      steps[9].finish = this.treatment_summary.id > 0
430
+
431
+      return steps
432
+    },
433
+    filtedSchedules: function() {
434
+      var search_keyword = this.search_keyword
435
+      if (search_keyword.length > 0) {
436
+        var schedules = []
437
+        for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
438
+          const scheduleInfo = this.zone_schedules[o_i]
439
+          var originSchedules = scheduleInfo.schedules
440
+          if (originSchedules.length == 0) {
441
+            continue
442
+          }
443
+          var filtedSchedules = []
444
+          for (let s_i = 0; s_i < originSchedules.length; s_i++) {
445
+            const schedule = originSchedules[s_i]
446
+            if (schedule.patient.name.indexOf(search_keyword) != -1) {
447
+              filtedSchedules.push(schedule)
448
+              // break
449
+            }
450
+          }
451
+          if (filtedSchedules.length > 0) {
452
+            schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
453
+          }
454
+        }
455
+        return schedules
456
+      }
457
+
458
+      // var zone_selected = this.zoneVal
459
+      // var timetype_selected = this.scheduleStateVal
460
+      // if ((zone_selected == 0 && timetype_selected == 0) || this.zone_options.length <= 1) {
461
+      //   var schedules = []
462
+      //   for (let index = 0; index < this.zone_schedules.length; index++) {
463
+      //     const scheduleInfo = this.zone_schedules[index]
464
+      //     if (scheduleInfo.schedules.length != 0) {
465
+      //       schedules.push(scheduleInfo)
466
+      //     }
467
+      //   }
468
+      //   return schedules
469
+      // }
470
+
471
+      // var schedules = []
472
+      // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
473
+      //   const scheduleInfo = this.zone_schedules[o_i]
474
+      //   if (zone_selected == scheduleInfo.zone_id && timetype_selected == 0) {
475
+      //     if (scheduleInfo.schedules.length == 0) {
476
+      //       return []
477
+      //     } else {
478
+      //       return [scheduleInfo]
479
+      //     }
480
+      //   }
481
+      //   var originSchedules = scheduleInfo.schedules
482
+      //   if (originSchedules.length == 0) {
483
+      //     continue
484
+      //   }
485
+      //   var filtedSchedules = []
486
+      //   for (let s_i = 0; s_i < originSchedules.length; s_i++) {
487
+      //     const schedule = originSchedules[s_i]
488
+      //     if (zone_selected != 0) {
489
+      //       if (zone_selected == schedule.device_number.zone.id) {
490
+      //         if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
491
+      //           filtedSchedules.push(schedule)
492
+      //         }
493
+      //       }
494
+      //     } else {
495
+      //       if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
496
+      //         filtedSchedules.push(schedule)
497
+      //       }
498
+      //     }
499
+      //   }
500
+      //   if (filtedSchedules.length > 0) {
501
+      //     schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
502
+      //   }
503
+      // }
504
+
505
+      // return schedules
506
+    }
507
+  },
508
+  methods: {
509
+    adviceFunc() {
510
+      this.getScheduleDetail()
511
+    },
512
+    getLongAdvice() {
513
+      const params = {
514
+        patient_id: this.patient_id
515
+      }
516
+      getLongAdvice(params).then(rs => {
517
+        var resp = rs.data
518
+        if (resp.state == 1) {
519
+          var status = parseInt(resp.data.status)
520
+
521
+          switch (status) {
522
+            case 2:
523
+              var totalAdvice = resp.data.advices
524
+              var longAdvicesTwo = resp.data.advices_two
525
+              var waitUploadAdvices = []
526
+              for (let i = 0; i < totalAdvice.length; i++) {
527
+                totalAdvice[i]['isCheck'] = 1
528
+              }
529
+
530
+              for (let i = 0; i < totalAdvice.length; i++) {
531
+                for (let a = 0; a < longAdvicesTwo.length; a++) {
532
+                  if (
533
+                    totalAdvice[i].template_id ==
534
+                      longAdvicesTwo[a].template_id &&
535
+                    totalAdvice[i].frequency_type ==
536
+                      longAdvicesTwo[a].frequency_type
537
+                  ) {
538
+                    totalAdvice[i]['isCheck'] = 0
539
+                  }
540
+                }
541
+              }
542
+
543
+              for (let i = 0; i < totalAdvice.length; i++) {
544
+                if (totalAdvice[i].isCheck == 1) {
545
+                  waitUploadAdvices.push(totalAdvice[i])
546
+                }
547
+              }
548
+
549
+              this.is_open = resp.data.is_open_remind
550
+              if(this.his_is_open == 1){
551
+                this.is_open = 0
552
+              }
553
+              this.longAdvices = totalAdvice
554
+              this.waitUploadAdvices = waitUploadAdvices
555
+              break
556
+          }
557
+        } else {
558
+          this.$message.error(resp.msg)
559
+        }
560
+      })
561
+    },
562
+    assessmentAfterDislysisFunc: function(val) {
563
+      for (var index in val) {
564
+        this.$set(this.assessment_after_dislysis, index, val[index])
565
+      }
566
+    },
567
+    didDelMonitor(record_id) {
568
+      var mrl = this.monitor_records.length
569
+      for (let index = 0; index < mrl; index++) {
570
+        if (this.monitor_records[index].id == record_id) {
571
+          this.monitor_records.splice(index, 1)
572
+          break
573
+        }
574
+      }
575
+    },
576
+    getScheduleDetail: function() {
577
+      
578
+      this.loading = true
579
+    //   var dateStr = parseTime(this.date, '{y}-{m}-{d}')
580
+      // if(this.$route.query.showView == true){
581
+      //   this.loading = false
582
+      //   return
583
+      // }
584
+        console.log('this.patient_id',this.patient_id)
585
+        console.log('this.date',this.date)
586
+      this.doctor_advices = []
587
+      getDialysisScheduleDetail(this.patient_id, this.date).then(rs => {
588
+
589
+        var resp = rs.data
590
+        if (resp.state == 1) {
591
+          var patient = resp.data.patient // 患者信息
592
+          var schedual = resp.data.schedual // 患者排班信息
593
+         
594
+          var prescription = resp.data.prescription // 透析处方
595
+          if (prescription != null) {
596
+            if (prescription.body_fluid == -2) {
597
+              prescription.body_fluid = 0
598
+            }
599
+          }
600
+
601
+          var solution = resp.data.solution // 透析方案
602
+         
603
+          var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
604
+
605
+          var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
606
+           console.log("透器评估",predialysis_evaluation)
607
+          if (predialysis_evaluation != null) {
608
+            if (predialysis_evaluation.blood_access_part_id == -2) {
609
+              predialysis_evaluation.blood_access_part_id = 0
610
+            }
611
+          }
612
+          var doctor_advices = resp.data.doctor_advices // 临时医嘱
613
+
614
+          var double_check = resp.data.double_check // 双人核对
615
+          var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
616
+
617
+          var treatment_summary = resp.data.treatment_summary // 治疗小结
618
+          var monitor_records = resp.data.monitor_records // 透析监测
619
+          var dialysis_order = resp.data.dialysis_order // 透析记录
620
+
621
+          var niprocart_info = resp.data.niprocart_info
622
+          var jms_info = resp.data.jms_info
623
+          var fistula_needle_set_info = resp.data.fistula_needle_set_info
624
+          var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
625
+          var hemoperfusion_info = resp.data.hemoperfusion_info
626
+          var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
627
+          var filtryzer_info = resp.data.filtryzer_info
628
+          var dialyzers_info = resp.data.dialyzers_info
629
+          var injector_info = resp.data.injector_info
630
+          var bloodlines_info = resp.data.bloodlines_info
631
+          var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
632
+          var safe_package_info = resp.data.safe_package_info
633
+          var aliquid_info = resp.data.aliquid_info
634
+
635
+          var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
636
+
637
+          if (lastPredialysisEvaluation != null) {
638
+            if (lastPredialysisEvaluation.blood_access_part_id == -2) {
639
+              lastPredialysisEvaluation.blood_access_part_id = 0
640
+            }
641
+          }
642
+          var lastMonitorRecord = resp.data.lastMonitorRecord
643
+          var lastAssessmentAfterDislysis = resp.data.lastAssessmentAfterDislysis
644
+          var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
645
+          var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
646
+
647
+          var system_prescribe = resp.data.system_prescribe
648
+
649
+          var lastAssessment =  resp.data.lastAssessment
650
+          console.log("最后一次血管通路",lastAssessment)
651
+          this.$refs.nav.setLastRecord(
652
+            lastPredialysisEvaluation,
653
+            lastMonitorRecord,
654
+            lastAssessmentAfterDislysis,
655
+            lastDialysisPrescribe,
656
+            lastDryWeightDislysis,
657
+            schedual,
658
+            system_prescribe,
659
+            lastAssessment,
660
+          )
661
+
662
+          var headNurses = resp.data.headNurse
663
+
664
+          var config = resp.data.config
665
+          this.lastPredialysisEvaluation = lastPredialysisEvaluation
666
+          this.lastMonitorRecord = lastMonitorRecord
667
+          this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
668
+          this.lastDialysisPrescribe = lastDialysisPrescribe
669
+          this.lastDryWeightDislysis = lastDryWeightDislysis
670
+          this.lastAssessment = lastAssessment
671
+          this.headNurses = headNurses
672
+          this.system_prescribe = system_prescribe
673
+
674
+
675
+
676
+          this.niprocart_info = []
677
+          this.jms_info = []
678
+          this.fistula_needle_set_info = []
679
+          this.fistula_needle_set_16_info = []
680
+          this.hemoperfusion_info = []
681
+          this.dialyser_sterilised_info = []
682
+
683
+          this.filtryzer_info = []
684
+          this.dialyzers_info = []
685
+          this.injector_info = []
686
+
687
+          this.bloodlines_info = []
688
+          this.tubingHemodialysis_info = []
689
+          this.safe_package_info = []
690
+          this.aliquid_info = []
691
+
692
+
693
+
694
+
695
+
696
+          this.niprocart_info = niprocart_info
697
+          this.jms_info = jms_info
698
+          this.fistula_needle_set_info = fistula_needle_set_info
699
+          this.fistula_needle_set_16_info = fistula_needle_set_16_info
700
+          this.hemoperfusion_info = hemoperfusion_info
701
+          this.dialyser_sterilised_info = dialyser_sterilised_info
702
+          this.filtryzer_info = filtryzer_info
703
+          this.dialyzers_info = dialyzers_info
704
+          this.injector_info = injector_info
705
+          this.bloodlines_info = bloodlines_info
706
+          this.tubingHemodialysis_info = tubingHemodialysis_info
707
+          this.safe_package_info = safe_package_info
708
+          this.aliquid_info = aliquid_info
709
+          this.config = config
710
+
711
+          this.patient = patient
712
+          this.schedual = schedual == null ? { id: 0 } : schedual
713
+          this.prescription = prescription == null ? { id: 0 } : prescription
714
+          this.solution = solution == null ? { id: 0 } : solution
715
+          this.receiver_treatment_access =
716
+            receiver_treatment_access == null
717
+              ? { id: 0 }
718
+              : receiver_treatment_access
719
+          this.predialysis_evaluation =
720
+            predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation
721
+          this.doctor_advices = doctor_advices == null ? [] : doctor_advices
722
+          this.double_check = double_check == null ? { id: 0 } : double_check
723
+          this.assessment_after_dislysis =
724
+            assessment_after_dislysis == null
725
+              ? { id: 0 }
726
+              : assessment_after_dislysis
727
+          this.treatment_summary =
728
+            treatment_summary == null ? { id: 0 } : treatment_summary
729
+          this.monitor_records = monitor_records == null ? [] : monitor_records
730
+          this.dialysis_order =
731
+            dialysis_order == null ? { id: 0 } : dialysis_order
732
+
733
+
734
+
735
+          this.admin_users = resp.data.doctors
736
+          this.devices = resp.data.devices
737
+          this.device_numbers = resp.data.device_numbers
738
+
739
+          var his_doctor_advices = resp.data.his_advices
740
+
741
+          this.his_is_open = resp.data.is_open_config.is_open
742
+          console.log(this.his_is_open)
743
+
744
+
745
+
746
+          var stockType =  resp.data.stockType
747
+          this.stockType = stockType
748
+          console.log("stockTYPW",stockType)
749
+
750
+          var prepare = resp.data.prepare
751
+          this.preparestock = prepare
752
+          console.log("prepare222222",prepare)
753
+
754
+          for (let i = 0; i <  this.doctor_advices.length; i++){
755
+            this.doctor_advices[i]['origin'] = 1
756
+          }
757
+
758
+          if (his_doctor_advices != null) {
759
+            for (let i = 0; i < his_doctor_advices.length; i++) {
760
+              his_doctor_advices[i]['origin'] = 2
761
+              his_doctor_advices[i]['way'] = 1
762
+              this.doctor_advices.push(his_doctor_advices[i])
763
+            }
764
+          }
765
+
766
+          const obj = {}
767
+          this.doctor_advices = this.doctor_advices.reduce((cur, next) => {
768
+            obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
769
+            return cur
770
+          }, []) // 设置cur默认类型为数组,并且初始值为空的数组
771
+
772
+          console.log(this.doctor_advices)
773
+
774
+
775
+          var device_map = {}
776
+          for (let index = 0; index < this.devices.length; index++) {
777
+            const device = this.devices[index]
778
+            device_map[device.id] = device
779
+          }
780
+          this.device_map = device_map
781
+
782
+          var admin_map = {}
783
+          for (let index = 0; index < this.admin_users.length; index++) {
784
+            const admin = this.admin_users[index]
785
+            admin_map[admin.id] = admin
786
+          }
787
+          this.admin_user_map = admin_map
788
+
789
+          var device_number_map = {}
790
+          for (let index = 0; index < this.device_numbers.length; index++) {
791
+            const device_number = this.device_numbers[index]
792
+            device_number_map[device_number.id] = device_number
793
+          }
794
+          this.device_number_map = device_number_map
795
+        } else {
796
+         // this.$message.error(resp.msg)
797
+          console.log("报错提示")
798
+          this.$message.error("该患者今日未排班,无法使用此模块,请先排班!")
799
+        }
800
+
801
+        if (this.lastDialysisPrescribe != null) {
802
+          delete this.lastDialysisPrescribe.target_ultrafiltration
803
+        }
804
+        if (this.solution != null) {
805
+          delete this.solution.target_ultrafiltration
806
+        }
807
+        if(this.predialysis_evaluation.id > 0){
808
+          this.newTime = parseTime(this.predialysis_evaluation.created_time, '{h}:{i}')
809
+        }
810
+
811
+        this.loading = false
812
+      })
813
+    },
814
+    printOrder() {
815
+      var xtdate = parseTime(this.date, '{y}-{m}-{d}')
816
+      this.$router.push(
817
+        '/dialysis/print?xtdate=' + xtdate + '&xtno=' + this.patient.dialysis_no
818
+      )
819
+    },
820
+    processedDialysisSchedules: function(schedules, zone_options) {
821
+      var zoneMap = {}
822
+      var scheduleMap = {}
823
+      for (let z_i = 0; z_i < zone_options.length; z_i++) {
824
+        const zone = zone_options[z_i]
825
+        if (zone.id == 0) {
826
+          continue
827
+        }
828
+        scheduleMap[zone.id] = []
829
+      }
830
+      for (let index = 0; index < schedules.length; index++) {
831
+        const schedule = schedules[index]
832
+        scheduleMap[schedule.device_number.zone.id].push(schedule)
833
+      }
834
+      var zone_schedules = []
835
+      for (let index = 0; index < zone_options.length; index++) {
836
+        const zone = zone_options[index]
837
+        if (zone.id == 0) {
838
+          continue
839
+        }
840
+        var schedules = scheduleMap[zone.id]
841
+        zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
842
+      }
843
+      return zone_schedules
844
+    },
845
+    getTime(date){
846
+      date = new Date(date * 1000)
847
+      var Y = date.getFullYear() + '-';
848
+      var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
849
+      var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate());
850
+      var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours());
851
+      var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes());
852
+      var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
853
+
854
+      let strDate = h  + ':' + m;
855
+      return strDate;
856
+    },
857
+    getDates(time){
858
+      return moment(time * 1000).format('HH:mm:ss')
859
+    }
860
+  }
861
+}
862
+</script>
863
+
864
+<style style="stylesheet/scss" lang="scss" scoped>
865
+.details-bg {
866
+  background: #fff;
867
+  margin: 0 15px;
868
+}
869
+.printForm {
870
+  .title {
871
+    font-size: 30px;
872
+    font-weight: 500;
873
+    text-align: center;
874
+    line-height: 60px;
875
+  }
876
+  .info {
877
+    ul {
878
+      display: -webkit-box;
879
+      display: -moz-box;
880
+      display: -ms-flexbox;
881
+      display: -webkit-flex;
882
+      display: flex;
883
+      align-items: center;
884
+      -moz-box-sizing: border-box;
885
+      -webkit-box-sizing: border-box;
886
+      -o-box-sizing: border-box;
887
+      -ms-box-sizing: border-box;
888
+      box-sizing: border-box;
889
+      -webkit-justify-content: space-around;
890
+      -moz-justify-content: space-around;
891
+      -ms-justify-content: space-around;
892
+      -o-justify-content: space-around;
893
+      justify-content: space-around;
894
+      li {
895
+        display: flex;
896
+        box-sizing: border-box;
897
+        justify-content: space-around;
898
+        .name {
899
+        }
900
+        .InputBox {
901
+          padding: 0;
902
+          border: none;
903
+          border-bottom: 1px #e5e5e5 solid;
904
+          width: 60px;
905
+          outline: none;
906
+        }
907
+      }
908
+    }
909
+  }
910
+  .printTable {
911
+    tr {
912
+      padding: 2px;
913
+      th {
914
+        padding: 6px 4px;
915
+      }
916
+      td {
917
+        padding: 6px 4px;
918
+      }
919
+    }
920
+  }
921
+}
922
+.loadingBox{
923
+  display: flex;
924
+  .patientBox{
925
+    background: #fff;
926
+  }
927
+  .tip1{
928
+    background: #4fc7cb;
929
+    border-radius: 5px;
930
+    text-align: center;
931
+    font-size: 12px;
932
+    display: inline-block;
933
+    width: 60px;
934
+    color: #fff;
935
+  }
936
+  .tip2{
937
+    background: #ee8556;
938
+    border-radius: 5px;
939
+    text-align: center;
940
+    font-size: 12px;
941
+    display: inline-block;
942
+    width: 60px;
943
+    color: #fff;
944
+  }
945
+  .tip3{
946
+    background: #409eff;
947
+    border-radius: 5px;
948
+    text-align: center;
949
+    font-size: 12px;
950
+    display: inline-block;
951
+    width: 60px;
952
+    color: #fff;
953
+  }
954
+  .tip4{
955
+    background: #a8b3ba;
956
+    border-radius: 5px;
957
+    text-align: center;
958
+    font-size: 12px;
959
+    display: inline-block;
960
+    width: 60px;
961
+    color: #fff;
962
+  }
963
+  .tip5{
964
+    background: #7bce91;
965
+    border-radius: 5px;
966
+    text-align: center;
967
+    font-size: 12px;
968
+    display: inline-block;
969
+    width: 60px;
970
+    color: #fff;
971
+  }
972
+}
973
+</style>
974
+
975
+<style lang="scss">
976
+.loadingBox{
977
+  .el-loading-spinner{
978
+    top:10%;
979
+  }
980
+  .el-button--small, .el-button--small.is-round{
981
+    padding:9px 10px;
982
+  }
983
+  .el-date-editor{
984
+    .el-input__inner{
985
+      padding-right:0px;
986
+    }
987
+  }
988
+  .el-table td, .el-table th{
989
+    text-align: center;
990
+  }
991
+  .el-table .cell{
992
+    padding: 0;
993
+  }
994
+}
995
+</style>

+ 23 - 5
src/xt_pages/hospitalStation/components/nextOrLastPrescription.vue 查看文件

@@ -297,6 +297,9 @@
297 297
           }
298 298
         }
299 299
 
300
+
301
+
302
+
300 303
         if (targetPrescriptions.length > 0) {
301 304
           for (let i = 0; i < targetPrescriptions.length; i++) {
302 305
             var prescription = targetPrescriptions[i];
@@ -304,13 +307,14 @@
304 307
             let tempProject = [];
305 308
             let tempAddition = [];
306 309
             for (let b = 0; b < prescription.doctor_advice.length; b++) {
310
+              let index = b + 1
307 311
               let obj = {
308 312
                 advice_id: 0,
309 313
                 drug_name: prescription.doctor_advice[b].advice_name,
310 314
                 single_dose: prescription.doctor_advice[b].single_dose,
311 315
                 delivery_way: prescription.doctor_advice[b].delivery_way,
312 316
                 execution_frequency: prescription.doctor_advice[b].execution_frequency,
313
-                retail_price: prescription.doctor_advice[b].price.toString(),
317
+                // retail_price: prescription.doctor_advice[b].price.toString(),
314 318
                 remark: prescription.doctor_advice[b].remark,
315 319
                 day:prescription.doctor_advice[b].day,
316 320
                 prescribing_number:prescription.doctor_advice[b].prescribing_number.toString(),
@@ -319,7 +323,17 @@
319 323
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
320 324
                 id:prescription.doctor_advice[b].drug_id,
321 325
                 drug:prescription.doctor_advice[b].drug,
326
+                groupno:index,
327
+                hosp_appr_flag:"1"
322 328
               };
329
+
330
+              if (obj.prescribing_number_unit == prescription.doctor_advice[b].drug.min_unit){
331
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
332
+              } else if(obj.prescribing_number_unit == prescription.doctor_advice[b].drug.max_unit){
333
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.retail_price
334
+              } else {
335
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
336
+              }
323 337
               tempAdvice.push(obj)
324 338
 
325 339
             }
@@ -336,23 +350,27 @@
336 350
                 execution_frequency: prescription.project[b].execution_frequency,
337 351
                 number_days: prescription.project[b].day,
338 352
                 total:prescription.project[b].count.toString(),
339
-                price:prescription.project[b].price,
353
+                // price:prescription.project[b].price,
340 354
                 remark:prescription.project[b].remark,
341 355
                 unit: prescription.project[b].unit,
342
-                type: prescription.project[b].type,
356
+                type: prescription.project[b].type
343 357
 
344 358
                 // medical_code:prescription.project[b].project.medical_code,
345 359
               };
346
-
347 360
               if(prescription.project[b].type == 2){
348 361
                 obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
349 362
                 obj['medical_code'] =  prescription.project[b].project.medical_code
350 363
                 obj['project_name'] =  prescription.project[b].project.project_name
364
+                obj['price'] = prescription.project[b].project.price
365
+                obj['project']=prescription.project[b].project
351 366
 
352 367
               }else if(prescription.project[b].type == 3){
353 368
                 obj['statistical_classification'] = ""
354 369
                 obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
355 370
                 obj['project_name'] =  prescription.project[b].good_info.good_name
371
+                obj['price'] = prescription.project[b].good_info.packing_price
372
+                obj['good_info']=prescription.project[b].good_info
373
+
356 374
               }
357 375
 
358 376
               tempProject.push(obj)
@@ -363,13 +381,13 @@
363 381
               project: tempProject,
364 382
               addition:tempAddition,
365 383
               order_status:0,
384
+              med_type: parseInt(prescription.med_type)
366 385
               // type: type,
367 386
             };
368 387
             prescriptions.push(obj)
369 388
           }
370 389
         }
371 390
 
372
-        console.log(this.srcPrescriptions);
373 391
 
374 392
         if(this.srcPrescriptions.length == 1){
375 393
           if(this.srcPrescriptions[0].advices.length == 0 && this.srcPrescriptions[0].project.length == 0){

文件差异内容过多而无法显示
+ 3489 - 1292
src/xt_pages/hospitalStation/doctorDesk.vue


+ 389 - 344
src/xt_pages/hospitalStation/index.vue 查看文件

@@ -1,157 +1,169 @@
1 1
 <template>
2
-  <div class="main-contain">
3
-    <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        </div>
6
+
7
+        <div class="app-container">
8
+            <div class="nameTitle">患者基本信息:</div>
9
+            <div class="formMain">
10
+                <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
11
+
12
+
13
+                    <el-form-item label="患者姓名:" prop="name" :validate-event="is_Name">
14
+                        <el-autocomplete
15
+                                class="checkSearch"
16
+                                popper-class="my-autocomplete"
17
+                                v-model="form.name"
18
+                                :fetch-suggestions="querySearchAsync"
19
+                                :trigger-on-focus="false"
20
+                                placeholder="请输入病人名字"
21
+                                @select="handleSelect"
22
+                                style="width:160px;"
23
+                        >
24
+                            <i class="el-icon-search el-input__icon" slot="suffix"></i>
25
+                            <template slot-scope="{ item }">
26
+                                <div class="name">{{ item.name }}</div>
27
+                            </template>
28
+                        </el-autocomplete>
29
+                    </el-form-item>
30
+
31
+
32
+                    <el-form-item label="手机号码:" prop="phone">
33
+                        <el-input v-model="form.phone"></el-input>
34
+                    </el-form-item>
35
+
36
+
37
+                    <el-form-item label="证件类型:" prop="certificates" :validate-event="is_Name">
38
+                        <el-select v-model="form.certificates" placeholder="请选择">
39
+                            <el-option
40
+                                    v-for="item in certificates"
41
+                                    :key="item.value"
42
+                                    :label="item.label"
43
+                                    :value="item.value">
44
+                            </el-option>
45
+                        </el-select>
46
+                    </el-form-item>
47
+
48
+                    <el-form-item label="证件号码:" prop="id_card_no" :validate-event="is_Name">
49
+                        <el-input v-model="form.id_card_no"></el-input>
50
+                    </el-form-item>
51
+
52
+
53
+                    <el-form-item label="读卡类型:" prop="id_card_type" :validate-event="is_Name">
54
+                        <el-select v-model="form.id_card_type" placeholder="请选择">
55
+                            <el-option
56
+                                    v-for="item in IDCardTypes"
57
+                                    :key="item.value"
58
+                                    :label="item.label"
59
+                                    :value="item.value">
60
+                            </el-option>
61
+                        </el-select>
62
+                    </el-form-item>
63
+
64
+
65
+                    <el-form-item label="结算类型:">
66
+                        <el-select v-model="form.settlement_value" placeholder="请选择" style="width:100%;">
67
+                            <el-option
68
+                                    v-for="item in settlement"
69
+                                    :key="item.value"
70
+                                    :label="item.label"
71
+                                    :value="item.value">
72
+                            </el-option>
73
+                        </el-select>
74
+                    </el-form-item>
75
+
76
+                    <!--<el-form-item class="specialFormItem" label="医保卡号:">-->
77
+                    <!--<div style="display:flex;">-->
78
+                    <!--<el-input v-model="form.medicalInsuranceCard"></el-input>-->
79
+                    <!--<el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>-->
80
+                    <!--</div>-->
81
+                    <!--</el-form-item>-->
82
+
83
+                </el-form>
84
+            </div>
85
+            <div class="nameTitle">患者住院信息:</div>
86
+            <div class="formMain">
87
+                <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
88
+
89
+                    <el-form-item label="疾病类型:" prop="sick_type" :validate-event="is_Name">
90
+                        <el-select filterable v-model="form.sick_type" placeholder="">
91
+                            <el-option
92
+                                    v-for="(item,index) in sick"
93
+                                    :key="index"
94
+                                    :label="item.class_name"
95
+                                    :value="item.id">
96
+                            </el-option>
97
+                        </el-select>
98
+                    </el-form-item>
99
+
100
+                    <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
101
+                        <el-select v-model="form.diagnosis" placeholder="">
102
+                            <el-option
103
+                                    v-for="(item,index) in diagnoses"
104
+                                    :key="index"
105
+                                    :label="item.class_name"
106
+                                    :value="item.id">
107
+                            </el-option>
108
+                        </el-select>
109
+                    </el-form-item>
110
+
111
+                    <el-form-item label="医疗类别:" prop="med_type" :validate-event="is_Name">
112
+                        <el-select v-model="form.med_type" placeholder=""
113
+                        >
114
+                            <el-option
115
+                                    v-for="(item,index) in registers"
116
+                                    :key="index"
117
+                                    :label="item.label"
118
+                                    :value="item.value">
119
+                            </el-option>
120
+                        </el-select>
121
+                    </el-form-item>
122
+
123
+
124
+                    <!--<el-form-item label="主治医生:" prop="doctor" :validate-event="is_Name">-->
125
+                        <!--<el-select v-model="form.doctor" placeholder="请选择" @change="changeDoctor">-->
126
+                            <!--<el-option-->
127
+                                    <!--v-for="item in doctorList"-->
128
+                                    <!--:key="item.admin_user_id"-->
129
+                                    <!--:label="item.user_name"-->
130
+                                    <!--:value="item.admin_user_id">-->
131
+                            <!--</el-option>-->
132
+                        <!--</el-select>-->
133
+                    <!--</el-form-item>-->
134
+                    <el-form-item label="入院科室:" prop="department" :validate-event="is_Name">
135
+                        <el-select v-model="form.department" placeholder="请选择">
136
+                            <el-option
137
+                                    v-for="item in departmentList"
138
+                                    :key="item.id"
139
+                                    :label="item.name"
140
+                                    :value="item.id">
141
+                            </el-option>
142
+                        </el-select>
143
+                    </el-form-item>
144
+
145
+
146
+                    <el-form-item label="入院时间:" prop="start_time" :validate-event="is_Name">
147
+                        <el-date-picker v-model="form.start_time" type="datetime" format="yyyy-MM-dd HH:mm:ss"
148
+                                        value-format="yyyy-MM-dd HH:mm:ss"
149
+                                        placeholder="请选择入院时间">
150
+                        </el-date-picker>
151
+
152
+                    </el-form-item>
153
+
154
+                </el-form>
155
+                <el-button style="float:right" @click="saveHisPatient('form')" v-loading="loadingone" type="primary">登记
156
+                </el-button>
157
+            </div>
158
+
159
+        </div>
5 160
     </div>
6
-
7
-    <div class="app-container">
8
-      <div class="nameTitle">患者基本信息:</div>
9
-      <div class="formMain">
10
-        <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
11
-
12
-
13
-          <el-form-item label="患者姓名:" prop="name" :validate-event="is_Name">
14
-            <el-autocomplete
15
-              class="checkSearch"
16
-              popper-class="my-autocomplete"
17
-              v-model="form.name"
18
-              :fetch-suggestions="querySearchAsync"
19
-              :trigger-on-focus="false"
20
-              placeholder="请输入病人名字"
21
-              @select="handleSelect"
22
-              style="width:160px;"
23
-            >
24
-              <i class="el-icon-search el-input__icon" slot="suffix"></i>
25
-              <template slot-scope="{ item }">
26
-                <div class="name">{{ item.name }}</div>
27
-              </template>
28
-            </el-autocomplete>
29
-          </el-form-item>
30
-
31
-
32
-          <el-form-item label="手机号码:" prop="phone">
33
-            <el-input v-model="form.phone"></el-input>
34
-          </el-form-item>
35
-
36
-
37
-          <el-form-item label="证件类型:" prop="certificates" :validate-event="is_Name">
38
-            <el-select v-model="form.certificates" placeholder="请选择">
39
-              <el-option
40
-                v-for="item in certificates"
41
-                :key="item.value"
42
-                :label="item.label"
43
-                :value="item.value">
44
-              </el-option>
45
-            </el-select>
46
-          </el-form-item>
47
-
48
-          <el-form-item label="证件号码:" prop="id_card_no" :validate-event="is_Name">
49
-            <el-input v-model="form.id_card_no"></el-input>
50
-          </el-form-item>
51
-
52
-
53
-          <el-form-item label="读卡类型:" prop="id_card_type" :validate-event="is_Name">
54
-            <el-select v-model="form.id_card_type" placeholder="请选择">
55
-              <el-option
56
-                v-for="item in IDCardTypes"
57
-                :key="item.value"
58
-                :label="item.label"
59
-                :value="item.value">
60
-              </el-option>
61
-            </el-select>
62
-          </el-form-item>
63
-
64
-          <!--<el-form-item class="specialFormItem" label="医保卡号:">-->
65
-          <!--<div style="display:flex;">-->
66
-          <!--<el-input v-model="form.medicalInsuranceCard"></el-input>-->
67
-          <!--<el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>-->
68
-          <!--</div>-->
69
-          <!--</el-form-item>-->
70
-
71
-        </el-form>
72
-      </div>
73
-      <div class="nameTitle">患者住院信息:</div>
74
-      <div class="formMain">
75
-        <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
76
-
77
-          <el-form-item label="疾病类型:" prop="sick_type" :validate-event="is_Name">
78
-            <el-select filterable v-model="form.sick_type" placeholder="">
79
-              <el-option
80
-                v-for="(item,index) in sick"
81
-                :key="index"
82
-                :label="item.class_name"
83
-                :value="item.id">
84
-              </el-option>
85
-            </el-select>
86
-          </el-form-item>
87
-
88
-          <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
89
-            <el-select v-model="form.diagnosis" placeholder="">
90
-              <el-option
91
-                v-for="(item,index) in diagnoses"
92
-                :key="index"
93
-                :label="item.class_name"
94
-                :value="item.id">
95
-              </el-option>
96
-            </el-select>
97
-          </el-form-item>
98
-
99
-          <el-form-item label="医疗类别:" prop="med_type" :validate-event="is_Name">
100
-            <el-select v-model="form.med_type" placeholder=""
101
-            >
102
-              <el-option
103
-                v-for="(item,index) in registers"
104
-                :key="index"
105
-                :label="item.label"
106
-                :value="item.value">
107
-              </el-option>
108
-            </el-select>
109
-          </el-form-item>
110
-
111
-
112
-          <el-form-item label="主治医生:" prop="doctor" :validate-event="is_Name">
113
-            <el-select v-model="form.doctor" placeholder="请选择" @change="changeDoctor">
114
-              <el-option
115
-                v-for="item in doctorList"
116
-                :key="item.admin_user_id"
117
-                :label="item.user_name"
118
-                :value="item.admin_user_id">
119
-              </el-option>
120
-            </el-select>
121
-          </el-form-item>
122
-          <el-form-item label="入院科室:" prop="department" :validate-event="is_Name">
123
-            <el-select v-model="form.department" placeholder="请选择">
124
-              <el-option
125
-                v-for="item in departmentList"
126
-                :key="item.id"
127
-                :label="item.name"
128
-                :value="item.id">
129
-              </el-option>
130
-            </el-select>
131
-          </el-form-item>
132
-
133
-
134
-          <el-form-item label="入院时间:" prop="start_time" :validate-event="is_Name">
135
-            <el-date-picker v-model="form.start_time" type="datetime" format="yyyy-MM-dd HH:mm:ss"
136
-                            value-format="yyyy-MM-dd HH:mm:ss"
137
-                            placeholder="请选择入院时间">
138
-            </el-date-picker>
139
-
140
-          </el-form-item>
141
-
142
-        </el-form>
143
-        <el-button style="float:right" @click="saveHisPatient('form')" v-loading="loadingone" type="primary">登记
144
-        </el-button>
145
-      </div>
146
-
147
-    </div>
148
-  </div>
149 161
 </template>
150 162
 
151 163
 <script>
152
-  import {PostSearch} from '@/api/patient'
164
+  import { PostSearch } from '@/api/patient'
153 165
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
154
-  import {basename} from 'path'
166
+  import { basename } from 'path'
155 167
   import {
156 168
     getAllDoctorList,
157 169
     getPatientDetail,
@@ -159,26 +171,35 @@
159 171
     getUnRegisterHisPatientList,
160 172
     saveHisPatient
161 173
   } from '@/api/project/project'
162
-  import {getDictionaryDataConfig} from '@/utils/data'
163
-  import {jsGetAge, uParseTime} from '@/utils/tools'
164
-  import {getInitData} from '@/api/his/his'
174
+  import { getDictionaryDataConfig } from '@/utils/data'
175
+  import { jsGetAge, uParseTime } from '@/utils/tools'
176
+  import { getInitData,Inhopitalcheck} from '@/api/his/his'
165 177
   import axios from 'axios'
166 178
 
167
-  const moment = require('moment');
179
+  const moment = require('moment')
168 180
   export default {
169 181
     components: {
170 182
       BreadCrumb
171 183
     },
172 184
     data() {
173 185
       return {
174
-        record_date:"",
186
+        settlement: [
187
+          { value: 1, label: '医保' },
188
+          { value: 2, label: '自费' },
189
+          { value: 3, label: '公费' },
190
+          { value: 4, label: '农保' },
191
+          { value: 5, label: '会员' },
192
+          { value: 6, label: '职工' },
193
+          { value: 7, label: '合同' }
194
+        ],
195
+        record_date: '',
175 196
         loadingone: false,
176 197
         read_loading: false,
177 198
         registers: [
178
-          {value: 11, label: '普通门诊'},
199
+          { value: 11, label: '普通门诊' },
179 200
           // {value: 12, label: '门诊挂号'},
180 201
           // {value: 13, label: '急诊'},
181
-          {value: 14, label: '门诊特殊病'},
202
+          { value: 14, label: '门诊特殊病' }
182 203
           // {value: 15, label: '门诊统筹'},
183 204
           // {value: 16, label: '门诊慢性病'},
184 205
           // {value: 21, label: '普通住院'}
@@ -187,8 +208,8 @@
187 208
         sick: [],
188 209
         diagnoses: [],
189 210
         crumbs: [
190
-          {path: false, name: '住院工作站'},
191
-          {path: false, name: '住院登记'}
211
+          { path: false, name: '住院工作站' },
212
+          { path: false, name: '住院登记' }
192 213
         ],
193 214
         form: {
194 215
           start_time: '',
@@ -204,10 +225,10 @@
204 225
           phone: '',
205 226
           id_card_type: 2,
206 227
           med_type: '',
228
+          settlement_value: 1
207 229
 
208 230
         },
209 231
 
210
-
211 232
         certificates: [{
212 233
           value: 1,
213 234
           label: '内地身份证'
@@ -239,16 +260,16 @@
239 260
           label: '电子凭证'
240 261
         }],
241 262
         rules: {
242
-          name: [{required: true, message: '患者姓名不能为空', trigger: 'blur'}],
243
-          id_card_no: [{required: true, message: '证件号码不能为空', trigger: 'blur'}],
244
-          doctor: [{required: true, message: '请选择医生', trigger: 'blur'}],
245
-          department: [{required: true, message: '请填写科室', trigger: 'blur'}],
246
-          certificates: [{required: true, message: '证件类型不能为空', trigger: 'change'}],
247
-          id_card_type: [{required: true, message: '读卡类型不能为空', trigger: 'change'}],
248
-          med_type: [{required: true, message: '医疗类别不能为空', trigger: 'change'}],
249
-          sick_type: [{required: true, message: '大病类别不能为空', trigger: 'change'}],
250
-          diagnosis: [{required: true, message: '诊断不能为空', trigger: 'change'}],
251
-          start_time: [{required: true, message: '入院时间不能为空', trigger: 'change'}]
263
+          name: [{ required: true, message: '患者姓名不能为空', trigger: 'blur' }],
264
+          id_card_no: [{ required: true, message: '证件号码不能为空', trigger: 'blur' }],
265
+          doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
266
+          department: [{ required: true, message: '请填写科室', trigger: 'blur' }],
267
+          certificates: [{ required: true, message: '证件类型不能为空', trigger: 'change' }],
268
+          id_card_type: [{ required: true, message: '读卡类型不能为空', trigger: 'change' }],
269
+          med_type: [{ required: true, message: '医疗类别不能为空', trigger: 'change' }],
270
+          sick_type: [{ required: true, message: '大病类别不能为空', trigger: 'change' }],
271
+          diagnosis: [{ required: true, message: '诊断不能为空', trigger: 'change' }],
272
+          start_time: [{ required: true, message: '入院时间不能为空', trigger: 'change' }]
252 273
 
253 274
         },
254 275
         doctorList: [],
@@ -264,16 +285,16 @@
264 285
     methods: {
265 286
 
266 287
       handleSelect(val) {
267
-        this.form.id = val.id;
268
-        this.form.name = val.name;
269
-        this.form.sex = val.gender;
270
-        this.form.age = val.age;
271
-        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}');
272
-        this.form.phone = val.phone;
273
-        this.form.id_card_no = val.id_card_no;
274
-
275
-        var thisLen = this.form.id_card_no.length;
276
-        var birth = '';
288
+        this.form.id = val.id
289
+        this.form.name = val.name
290
+        this.form.sex = val.gender
291
+        this.form.age = val.age
292
+        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
293
+        this.form.phone = val.phone
294
+        this.form.id_card_no = val.id_card_no
295
+
296
+        var thisLen = this.form.id_card_no.length
297
+        var birth = ''
277 298
         if (thisLen == 15) {
278 299
           birth = '19' + this.form.id_card_no.substr(6, 6)
279 300
         } else {
@@ -284,18 +305,18 @@
284 305
           '-' +
285 306
           birth.substr(4, 2) +
286 307
           '-' +
287
-          birth.substr(6, 2);
308
+          birth.substr(6, 2)
288 309
         this.form.age = jsGetAge(births, '-')
289 310
       },
290 311
       querySearchAsync(keyword, cb) {
291
-        let key = '';
312
+        let key = ''
292 313
         if (keyword != undefined) {
293 314
           key = keyword
294 315
         }
295
-        let searchArray = [];
316
+        let searchArray = []
296 317
         PostSearch(key).then(response => {
297 318
           if (response.data.state == 1) {
298
-            searchArray = response.data.data.patient;
319
+            searchArray = response.data.data.patient
299 320
             cb(searchArray)
300 321
           } else {
301 322
             cb([])
@@ -303,7 +324,6 @@
303 324
         })
304 325
       },
305 326
 
306
-
307 327
       // reading(medicalInsuranceCard) {
308 328
       //   var that = this
309 329
       //   if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
@@ -349,39 +369,39 @@
349 369
       //
350 370
       // },
351 371
       getBirthday(date) {
352
-        console.log(date);
353
-        let curTime = moment(new Date(date)).format('YYYY-MM-DD');
354
-        console.log('curTime22222', curTime);
372
+        console.log(date)
373
+        let curTime = moment(new Date(date)).format('YYYY-MM-DD')
374
+        console.log('curTime22222', curTime)
355 375
 
356
-        console.log(this.jsGetAge(curTime));
376
+        console.log(this.jsGetAge(curTime))
357 377
 
358 378
         this.form.age = this.jsGetAge(curTime)
359 379
       },
360 380
       jsGetAge(strBirthday) { //传入形式yyyy-MM-dd
361 381
         //strBirthday = util.formatTime(strBirthday);转换成yyyy-MM-dd形式
362
-        var returnAge;
363
-        var strBirthdayArr = strBirthday.split('-');
364
-        var birthYear = strBirthdayArr[0];
365
-        var birthMonth = strBirthdayArr[1];
366
-        var birthDay = strBirthdayArr[2];
367
-        var d = new Date();
368
-        var nowYear = d.getFullYear();
369
-        var nowMonth = d.getMonth() + 1;
370
-        var nowDay = d.getDate();
382
+        var returnAge
383
+        var strBirthdayArr = strBirthday.split('-')
384
+        var birthYear = strBirthdayArr[0]
385
+        var birthMonth = strBirthdayArr[1]
386
+        var birthDay = strBirthdayArr[2]
387
+        var d = new Date()
388
+        var nowYear = d.getFullYear()
389
+        var nowMonth = d.getMonth() + 1
390
+        var nowDay = d.getDate()
371 391
         if (nowYear == birthYear) {
372 392
           returnAge = 0 //同年 则为0岁
373 393
         } else {
374
-          var ageDiff = nowYear - birthYear; //年之差
394
+          var ageDiff = nowYear - birthYear //年之差
375 395
           if (ageDiff > 0) {
376 396
             if (nowMonth == birthMonth) {
377
-              var dayDiff = nowDay - birthDay; //日之差
397
+              var dayDiff = nowDay - birthDay //日之差
378 398
               if (dayDiff < 0) {
379 399
                 returnAge = ageDiff - 1
380 400
               } else {
381 401
                 returnAge = ageDiff
382 402
               }
383 403
             } else {
384
-              var monthDiff = nowMonth - birthMonth; //月之差
404
+              var monthDiff = nowMonth - birthMonth //月之差
385 405
               if (monthDiff < 0) {
386 406
                 returnAge = ageDiff - 1
387 407
               } else {
@@ -395,96 +415,94 @@
395 415
         return returnAge //返回周岁年龄
396 416
       },
397 417
       getForm() {
398
-        this.form.total = this.total;
418
+        this.form.total = this.total
399 419
         if (localStorage.getItem('temp')) {
400
-          let a = JSON.parse(localStorage.getItem('temp'));
420
+          let a = JSON.parse(localStorage.getItem('temp'))
401 421
           // let arr = []
402
-          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000;
403
-          this.form.org_id = this.$store.getters.xt_user.org_id;
404
-          a.push(this.form);
405
-          console.log(111, a);
406
-          localStorage.setItem('temp', JSON.stringify(a));
422
+          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000
423
+          this.form.org_id = this.$store.getters.xt_user.org_id
424
+          a.push(this.form)
425
+          console.log(111, a)
426
+          localStorage.setItem('temp', JSON.stringify(a))
407 427
           Object.keys(this.form).forEach((key) => {
408 428
             this.form[key] = ''
409
-          });
410
-          this.$message({message: '添加成功', type: 'success'})
429
+          })
430
+          this.$message({ message: '添加成功', type: 'success' })
411 431
         } else {
412
-          let arr = [];
413
-          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000;
414
-          this.form.org_id = this.$store.getters.xt_user.org_id;
415
-          arr.push(this.form);
416
-          localStorage.setItem('temp', JSON.stringify(arr));
432
+          let arr = []
433
+          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000
434
+          this.form.org_id = this.$store.getters.xt_user.org_id
435
+          arr.push(this.form)
436
+          localStorage.setItem('temp', JSON.stringify(arr))
417 437
           Object.keys(this.form).forEach((key) => {
418 438
             this.form[key] = ''
419
-          });
420
-          this.$message({message: '添加成功', type: 'success'})
439
+          })
440
+          this.$message({ message: '添加成功', type: 'success' })
421 441
         }
422 442
       },
423 443
 
424 444
       getAllDoctorList() {
425 445
         getAllDoctorList().then(response => {
426 446
           if (response.data.state == 1) {
427
-            var doctor = response.data.data.doctor;
428
-            this.doctorList = doctor;
429
-            var department = response.data.data.department;
447
+            var doctor = response.data.data.doctor
448
+            this.doctorList = doctor
449
+            var department = response.data.data.department
430 450
             this.departmentList = department
431 451
           }
432 452
         })
433 453
       },
434 454
       saveHisPatient(formName) {
435 455
         if (this.form.name == '') {
436
-          this.$message.error('患者姓名不能为空');
437
-          this.is_Name = true;
438
-          return
439
-        }
440
-
441
-
442
-        if (this.form.doctor == '') {
443
-          this.$message.error('医生不能为空');
444
-          this.is_Name = true;
456
+          this.$message.error('患者姓名不能为空')
457
+          this.is_Name = true
445 458
           return
446 459
         }
460
+        //
461
+        // if (this.form.doctor == '') {
462
+        //   this.$message.error('医生不能为空')
463
+        //   this.is_Name = true
464
+        //   return
465
+        // }
447 466
 
448 467
         if (this.form.department == '') {
449
-          this.$message.error('科室不能为空');
450
-          this.is_Name = true;
468
+          this.$message.error('科室不能为空')
469
+          this.is_Name = true
451 470
           return
452 471
         }
453 472
 
454 473
         if (this.form.id_card_type == '') {
455
-          this.$message.error('读卡类型不能为空');
456
-          this.is_Name = true;
474
+          this.$message.error('读卡类型不能为空')
475
+          this.is_Name = true
457 476
           return
458 477
         }
459 478
 
460 479
         if (this.form.id_card_no == '') {
461
-          this.$message.error('证件号码不能为空');
462
-          this.is_Name = true;
480
+          this.$message.error('证件号码不能为空')
481
+          this.is_Name = true
463 482
           return
464 483
         }
465 484
 
466 485
         if (this.form.med_type == '') {
467
-          this.$message.error('医疗类别不能为空');
468
-          this.is_Name = true;
486
+          this.$message.error('医疗类别不能为空')
487
+          this.is_Name = true
469 488
           return
470 489
         }
471 490
 
472 491
         if (this.form.diagnosis == '') {
473
-          this.$message.error('诊断不能为空');
474
-          this.is_Name = true;
492
+          this.$message.error('诊断不能为空')
493
+          this.is_Name = true
475 494
           return
476 495
         }
477 496
 
478 497
         if (this.form.sick_type == '') {
479
-          this.$message.error('大病类别不能为空');
480
-          this.is_Name = true;
498
+          this.$message.error('大病类别不能为空')
499
+          this.is_Name = true
481 500
           return
482 501
         }
483 502
 
484
-
485 503
         if (this.form.start_time == '') {
486
-          this.$message.error('入院时间不能为空');
487
-          this.is_Name = true;
504
+          this.$message.error('入院时间不能为空')
505
+          this.is_Name = true
488 506
           return
489 507
         }
490 508
 
@@ -499,16 +517,16 @@
499 517
             if (this.form.id_card_no == '') {
500 518
               this.show = true
501 519
             }
502
-            var nowDate = new Date();
503
-            var nowYear = nowDate.getFullYear();
504
-            var nowMonth = nowDate.getMonth() + 1;
505
-            var nowDay = nowDate.getDate();
520
+            var nowDate = new Date()
521
+            var nowYear = nowDate.getFullYear()
522
+            var nowMonth = nowDate.getMonth() + 1
523
+            var nowDay = nowDate.getDate()
506 524
             this.record_date =
507 525
               nowYear +
508 526
               '-' +
509 527
               (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
510 528
               '-' +
511
-              (nowDay < 10 ? '0' + nowDay : nowDay);
529
+              (nowDay < 10 ? '0' + nowDay : nowDay)
512 530
 
513 531
             var params = {
514 532
               id: this.form.id,
@@ -523,52 +541,79 @@
523 541
               diagnosis: this.form.diagnosis,
524 542
               sick_type: this.form.sick_type,
525 543
               start_time: this.form.start_time,
526
-            };
527
-            params['record_time'] = this.record_date;
528
-            params['admin_user_id'] = this.$store.getters.xt_user.user.id;
529
-            this.loadingone = true;
544
+              balance_accounts_type: this.form.settlement_value
545
+            }
546
+            params['record_time'] = this.record_date
547
+            params['admin_user_id'] = this.$store.getters.xt_user.user.id
548
+            this.loadingone = true
530 549
 
531
-            var that = this;
550
+            var that = this
532 551
 
533
-            axios.get('http://127.0.0.1:9532/zh/api/inhopitalcheck/get', {
534
-              params: params,
535
-              headers: {
536
-                'Permission': 5
537
-              }
538
-            })
539
-              .then(function (response) {
552
+            if (this.form.settlement_value == 2) {
553
+              Inhopitalcheck(params).then(response => {
540 554
                 if (response.data.state == 0) {
541
-                  that.$message.error(response.data.msg);
542
-                  that.loadingone = false;
555
+                  this.$message.error(response.data.msg);
556
+                  this.loadingone = false;
557
+                  // this.$refs.register.hide()
543 558
                   return false
544 559
                 } else {
545
-                  that.loadingone = false;
546
-                  if (response.data.data.failed_code == -10) {
547
-                    // that.$message.error(response.data.data.msg)
548
-                    that.$confirm(response.data.data.msg, '医保错误信息', {
549
-                      confirmButtonText: '确 定',
550
-                      type: 'warning'
551
-                    }).then(() => {
552
-
553
-                    }).catch(() => {
554
-                    })
555
-                  } else {
556
-                    that.$message({message: '登记成功', type: 'success'});
557
-                    that.form.name = '';
558
-                    that.form.certificates = '';
559
-                    that.form.id_card_no = '';
560
-                    that.form.doctor = '';
561
-                    that.form.department = '';
562
-                    that.form.phone = '';
563
-                    that.form.med_type = 14;
564
-                    that.form.sick_type = that.sick[0].id;
565
-                    that.form.diagnosis = that.diagnoses[0].id
566
-                  }
560
+                  that.$message({ message: '登记成功', type: 'success' })
561
+                  that.form.name = ''
562
+                  that.form.certificates = ''
563
+                  that.form.id_card_no = ''
564
+                  that.form.doctor = ''
565
+                  that.form.department = ''
566
+                  that.form.phone = ''
567
+                  that.form.med_type = 14
568
+                  that.form.sick_type = that.sick[0].id
569
+                  that.form.diagnosis = that.diagnoses[0].id
567 570
                 }
568 571
               })
569
-              .catch(function (error) {
570 572
 
573
+
574
+            } else {
575
+              axios.get('http://127.0.0.1:9532/zh/api/inhopitalcheck/get', {
576
+                params: params,
577
+                headers: {
578
+                  'Permission': 5
579
+                }
571 580
               })
581
+                .then(function(response) {
582
+                  if (response.data.state == 0) {
583
+                    that.$message.error(response.data.msg)
584
+                    that.loadingone = false
585
+                    return false
586
+                  } else {
587
+                    that.loadingone = false
588
+                    if (response.data.data.failed_code == -10) {
589
+                      // that.$message.error(response.data.data.msg)
590
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
591
+                        confirmButtonText: '确 定',
592
+                        type: 'warning'
593
+                      }).then(() => {
594
+
595
+                      }).catch(() => {
596
+                      })
597
+                    } else {
598
+                      that.$message({ message: '登记成功', type: 'success' })
599
+                      that.form.name = ''
600
+                      that.form.certificates = ''
601
+                      that.form.id_card_no = ''
602
+                      that.form.doctor = ''
603
+                      that.form.department = ''
604
+                      that.form.phone = ''
605
+                      that.form.med_type = 14
606
+                      that.form.sick_type = that.sick[0].id
607
+                      that.form.diagnosis = that.diagnoses[0].id
608
+                    }
609
+                  }
610
+                })
611
+                .catch(function(error) {
612
+
613
+                })
614
+
615
+            }
616
+
572 617
           }
573 618
         })
574 619
       },
@@ -589,35 +634,35 @@
589 634
         }
590 635
       },
591 636
       changeName(id) {
592
-        this.form.sex = '';
593
-        this.form.age = '';
594
-        this.form.birthday = '';
595
-        this.form.phone = '';
596
-        this.form.id_card_no = '';
637
+        this.form.sex = ''
638
+        this.form.age = ''
639
+        this.form.birthday = ''
640
+        this.form.phone = ''
641
+        this.form.id_card_no = ''
597 642
         getPatientDetail(id).then(response => {
598 643
           if (response.data.state == 1) {
599
-            var patient = response.data.data.patient;
600
-            console.log('patient', patient);
601
-            this.form.sex = patient.gender;
602
-            this.form.age = patient.age;
603
-            this.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
604
-            this.form.phone = patient.phone;
644
+            var patient = response.data.data.patient
645
+            console.log('patient', patient)
646
+            this.form.sex = patient.gender
647
+            this.form.age = patient.age
648
+            this.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
649
+            this.form.phone = patient.phone
605 650
             this.form.id_card_no = patient.id_card_no
606 651
           }
607 652
         })
608 653
       }, getInitData() {
609 654
         getInitData().then(response => {
610 655
           if (response.data.state == 0) {
611
-            this.$message.error(response.data.msg);
656
+            this.$message.error(response.data.msg)
612 657
             return false
613 658
           } else {
614
-            this.doctors = response.data.data.doctors;
615
-            this.department = response.data.data.department;
616
-            this.sick = response.data.data.sick;
617
-            this.diagnoses = response.data.data.diagnose;
659
+            this.doctors = response.data.data.doctors
660
+            this.department = response.data.data.department
661
+            this.sick = response.data.data.sick
662
+            this.diagnoses = response.data.data.diagnose
618 663
 
619
-            this.form.p_type = 14;
620
-            this.form.sick_type = this.sick[0].id;
664
+            this.form.p_type = 14
665
+            this.form.sick_type = this.sick[0].id
621 666
             this.form.diagnosis = this.diagnoses[0].id
622 667
 
623 668
           }
@@ -628,15 +673,15 @@
628 673
     },
629 674
     created() {
630 675
 
631
-      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 ||  this.$store.getters.xt_user.org_id == 10138) {
632
-        this.form.certificates = 2;
676
+      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
677
+        this.form.certificates = 2
633 678
         this.form.id_card_type = 1
634 679
       } else {
635
-        this.form.certificates = 1;
680
+        this.form.certificates = 1
636 681
         this.form.id_card_type = 2
637 682
       }
638 683
 
639
-      this.getInitData();
684
+      this.getInitData()
640 685
       //获取当前机构有人员信息
641 686
       this.getAllDoctorList()
642 687
     }
@@ -644,51 +689,51 @@
644 689
 </script>
645 690
 
646 691
 <style lang="scss" scoped>
647
-  .nameTitle {
648
-    font-weight: bold;
649
-    font-size: 16px;
650
-  }
692
+    .nameTitle {
693
+        font-weight: bold;
694
+        font-size: 16px;
695
+    }
651 696
 
652
-  .formMain {
653
-    /*/ / padding: 10 px 90 px;*/
654
-    width: 80%;
655
-    margin: 0 auto;
656
-  }
697
+    .formMain {
698
+        /*/ / padding: 10 px 90 px;*/
699
+        width: 80%;
700
+        margin: 0 auto;
701
+    }
657 702
 
658
-  .basicForm {
703
+    .basicForm {
659 704
 
660
-    display: flex;
661
-    flex-wrap: wrap;
662
-    justify-content: space-between;
705
+        display: flex;
706
+        flex-wrap: wrap;
707
+        justify-content: space-between;
663 708
 
664
-  .el-form-item {
665
-    width: 33%;
666
-  }
709
+    .el-form-item {
710
+        width: 33%;
711
+    }
667 712
 
668
-  .specialFormItem {
669
-    width: 66.5%;
713
+    .specialFormItem {
714
+        width: 66.5%;
670 715
 
671
-  .el-input {
672
-    min-width: 150px;
673
-  }
716
+    .el-input {
717
+        min-width: 150px;
718
+    }
674 719
 
675
-  }
676
-  .el-select {
677
-    width: 100%;
678
-  }
720
+    }
721
+    .el-select {
722
+        width: 100%;
723
+    }
679 724
 
680
-  .el-input {
681
-    width: 100%;
682
-  }
725
+    .el-input {
726
+        width: 100%;
727
+    }
683 728
 
684
-  }
685
-  .el-form-item__error {
686
-    color: #F56C6C;
687
-    font-size: 12px;
688
-    line-height: 1;
689
-    padding-top: 4px;
690
-    position: absolute;
691
-    top: 100%;
692
-    left: 0;
693
-  }
729
+    }
730
+    .el-form-item__error {
731
+        color: #F56C6C;
732
+        font-size: 12px;
733
+        line-height: 1;
734
+        padding-top: 4px;
735
+        position: absolute;
736
+        top: 100%;
737
+        left: 0;
738
+    }
694 739
 </style>

文件差异内容过多而无法显示
+ 1006 - 1178
src/xt_pages/hospitalStation/outpatientChargesManagement.vue


+ 1 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

@@ -163,7 +163,7 @@
163 163
                 <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
164 164
                              :hisPatientInfo="hisPatientInfo" v-if="titleType == '电子病历'" :detalid="detalid"
165 165
                              ref="child"></desk-record>
166
-
166
+c
167 167
                 <medicalRecord ref='medicalRecord' @func="getMsgFormSon"></medicalRecord>
168 168
                 <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
169 169
                 <!--<dialysis-index v-if="titleType == '透析记录'" :record_date="record_date" :patientid='patientid'></dialysis-index>-->