Просмотр исходного кода

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 лет назад
Родитель
Сommit
8252ac5ebc
2 измененных файлов: 518 добавлений и 3 удалений
  1. 3 3
      config/index.js
  2. 515 0
      src/xt_pages/outpatientCharges/11.vue

+ 3 - 3
config/index.js Просмотреть файл

@@ -29,8 +29,8 @@ module.exports = {
29 29
 
30 30
     //  host: 'xt.test.sgjyun.com',
31 31
     //  host: 'xt.kuyicloud.com',
32
-    host: 'xt.test.sgjyun.com',
33
-    // host: 'localhost',
32
+    // host: 'xt.test.sgjyun.com',
33
+    host: 'localhost',
34 34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35 35
     autoOpenBrowser: true,
36 36
     errorOverlay: true,
@@ -104,5 +104,5 @@ module.exports = {
104 104
     // Set to `true` or `false` to always turn it on or off
105 105
     bundleAnalyzerReport: process.env.npm_config_report
106 106
   },
107
-  
107
+
108 108
 }

+ 515 - 0
src/xt_pages/outpatientCharges/11.vue Просмотреть файл

@@ -0,0 +1,515 @@
1
+<template>
2
+  <div class="main-contain outpatientChargesManagement">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
7
+      <div class="mainLeft">
8
+        <!--<div class="mainCell" style="justify-content: space-between;">-->
9
+        <!--<p>未就诊:<span>1</span>人</p>-->
10
+        <!--<p>已就诊:<span>0</span>人</p>-->
11
+        <!--</div>-->
12
+        <!--<div class="mainCell">-->
13
+        <!--<el-radio-group v-model="radio" @change="changeRadio">-->
14
+        <!--<el-radio :label=1>未就诊</el-radio>-->
15
+        <!--<el-radio :label=2>已就诊</el-radio>-->
16
+        <!--<el-radio :label=3>全部</el-radio>-->
17
+        <!--</el-radio-group>-->
18
+        <!--</div>-->
19
+        <div class="mainCell" style="margin-bottom:10px;">
20
+          <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
21
+          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
22
+            搜索
23
+          </el-button>
24
+        </div>
25
+        <div style="flex:1;overflow-y:auto;">
26
+          <el-table :data="patientTableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
27
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
28
+                    highlight-current-row ref="tab"
29
+                    @current-change="handleCurrentChange">
30
+            <el-table-column align="center" prop="name" label="患者姓名">
31
+              <template slot-scope="scope">{{ scope.row.patients.name }}</template>
32
+            </el-table-column>
33
+            <el-table-column align="center" prop="name" label="就诊号" width="90">
34
+              <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
35
+            </el-table-column>
36
+          </el-table>
37
+        </div>
38
+      </div>
39
+      <div class="mainRight">
40
+        <div class="mainCell" style="margin-bottom:10px;flex-direction: row-reverse;">
41
+          <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
42
+          <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
43
+          <el-button size="small" @click="open(3)" type="primary">打印</el-button>
44
+          <el-button v-loading="loadingone" v-if="hisPatientInfo == null || hisPatientInfo.id == 0 " size="small" @click="open(6)"
45
+                     type="primary">挂号
46
+          </el-button>
47
+          <el-button v-loading="loadingtwo" v-if="hisPatientInfo != null && hisPatientInfo.id > 0 " size="small" @click="open(4)"
48
+                     type="primary">收费
49
+          </el-button>
50
+          <el-button size="small" @click="open(5)" type="primary">退费</el-button>
51
+        </div>
52
+        <div class="mainCenter">
53
+          <div class="centerLeft">
54
+            <div class="tabsBox">
55
+              <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
56
+              <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
57
+                <el-tab-pane
58
+                  v-for="(item, index) in prescriptions"
59
+                  :key="index"
60
+                  :label="item.name"
61
+                  :name="item.name"
62
+                >
63
+                </el-tab-pane>
64
+                <div class="RP">Rp</div>
65
+                <prescription-table ref="prescription_tables" :prescription="curPrescriptions"></prescription-table>
66
+              </el-tabs>
67
+
68
+            </div>
69
+            <div class="costBox">
70
+              <span>当前处方总费用:<span style="color:red;">{{ getTotal() }}元</span></span>
71
+              <span>{{ state }}</span>
72
+            </div>
73
+          </div>
74
+          <div class="centerRight">
75
+            <p class="centerRightTitle">人员信息</p>
76
+            <div style="display:flex;justify-content: space-between;line-height:30px;">
77
+              <span style="font-size:14px;">人员编码:</span>
78
+              <span style="font-size:14px;">日期:{{record_date}}</span>
79
+            </div>
80
+            <ul class="basicUl">
81
+              <li style="width:50%;">姓名:{{patientInfo.name}}</li>
82
+              <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
83
+              <li style="width:50%;">年龄:{{patientInfo.age }}</li>
84
+              <li style="width:50%;">身高:{{patientInfo.height}}</li>
85
+              <li style="width:50%;">体重:{{patientInfo.weight}}</li>
86
+              <li style="width:50%;">电话:{{patientInfo.phone}}</li>
87
+              <li style="width:100%;">地址:{{patientInfo.home_address}}</li>
88
+            </ul>
89
+            <p class="centerRightTitle">诊断信息</p>
90
+            <div style="display:flex;justify-content: space-between;line-height:30px;">
91
+              <span style="font-size:14px;">门诊编号:676273816287361</span>
92
+            </div>
93
+            <ul class="basicUl">
94
+              <li style="width:50%;">医生:{{ }}</li>
95
+              <li style="width:50%;">科室:{{ }}</li>
96
+              <li style="width:100%;">费用:{{ }}元</li>
97
+              <li style="width:100%;">判断结果:</li>
98
+              <li style="width:100%;">是否有传染病:</li>
99
+              <li style="width:100%;">血压:</li>
100
+            </ul>
101
+          </div>
102
+        </div>
103
+      </div>
104
+    </div>
105
+    <!--<additionalCharges ref='additionalCharges'></additionalCharges>-->
106
+  </div>
107
+</template>
108
+
109
+
110
+<script>
111
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
112
+  import noCharge from './components/noCharge'
113
+  import charged from './components/charged'
114
+  import medicalInsuranceRefund from './components/medicalInsuranceRefund'
115
+  import prescriptionTable from './components/prescriptionTable'
116
+  import additionalCharges from './components/additionalCharges'
117
+  import { getPatientInformation, getPatientList } from '@/api/project/project'
118
+  import { getPatientInfo, getSchedulePatientList, register,upload } from '@/api/his/his'
119
+
120
+  const moment = require('moment')
121
+  export default {
122
+    components: {
123
+      BreadCrumb,
124
+      noCharge,
125
+      charged,
126
+      medicalInsuranceRefund,
127
+      prescriptionTable,
128
+      additionalCharges
129
+    },
130
+    data() {
131
+      return {
132
+        crumbs: [
133
+          { path: false, name: '门诊收费' },
134
+          { path: false, name: '门诊收费管理' }
135
+        ],
136
+        curPrescriptions: {},
137
+        prescriptions: [],
138
+        record_date: '',
139
+        tableData: [],
140
+        editableTabsValue: '1',
141
+        loadingone:false,
142
+        editableTabs: [{
143
+          title: '处方1',
144
+          name: '1'
145
+        }],
146
+        tabIndex: 1,
147
+        hisPatientInfo: {},
148
+        loadingtwo:false,
149
+        patientTableData: [{
150
+          name: '杨美英',
151
+          mdtrt_id: '1709946'
152
+        }],
153
+        patientInfo: { id: 0 },
154
+        doctor: {},
155
+        total: 0,
156
+        state: '未收费',
157
+        radio: 1,
158
+        radioStatus: 1,
159
+        search_input: '',
160
+        start_time: moment().locale('zh-cn').format('YYYY-MM-DD')
161
+      }
162
+    },
163
+    created() {
164
+      var nowDate = new Date()
165
+      var nowYear = nowDate.getFullYear()
166
+      var nowMonth = nowDate.getMonth() + 1
167
+      var nowDay = nowDate.getDate()
168
+      this.record_date =
169
+        nowYear +
170
+        '-' +
171
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
172
+        '-' +
173
+        (nowDay < 10 ? '0' + nowDay : nowDay)
174
+
175
+      //获取患者信息
176
+      this.getPatientList()
177
+    },
178
+    methods: {
179
+      tabclickEvent(val) {
180
+        for (let i = 0; i < this.prescriptions.length; i++) {
181
+          if (this.prescriptions[i].name == val.name) {
182
+            this.curPrescriptions = {}
183
+            var temp = this.deepClone(this.prescriptions[i])
184
+            this.curPrescriptions = temp
185
+            console.log(this.curPrescriptions)
186
+          }
187
+        }
188
+      }, deepClone(source) {
189
+        if (!source && typeof source !== 'object') {
190
+          throw new Error('error arguments', 'shallowClone')
191
+        }
192
+        const targetObj = source.constructor === Array ? [] : {}
193
+        Object.keys(source).forEach((keys) => {
194
+          if (source[keys] && typeof source[keys] === 'object') {
195
+            targetObj[keys] = this.deepClone(source[keys])
196
+          } else {
197
+            targetObj[keys] = source[keys]
198
+          }
199
+        })
200
+        return targetObj
201
+      },
202
+      getTotal() {
203
+        var total = 0
204
+        console.log(this.prescriptions)
205
+        for (let i = 0; i < this.prescriptions.length; i++) {
206
+          if (this.prescriptions[i].advices != null) {
207
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
208
+              total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
209
+            }
210
+          }
211
+          if (this.prescriptions[i].project != null) {
212
+            for (let b = 0; b < this.prescriptions[i].project.length; b++) {
213
+              total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].count
214
+            }
215
+          }
216
+        }
217
+        return total
218
+      },
219
+      moreState(tab, event) {
220
+        if (tab == 'more') {
221
+          return false
222
+        }
223
+      },
224
+      open(index) {
225
+        if (index == 1) {
226
+        } else if (index == 2) {
227
+
228
+        } else if (index == 4) {
229
+
230
+          let params = {
231
+            'id': this.patientInfo.id,
232
+            'record_time': this.record_date
233
+          }
234
+          this.loadingtwo = true
235
+          upload(params).then(response => {
236
+            if (response.data.state == 0) {
237
+              this.$message.error(response.data.msg)
238
+              this.loadingtwo = false
239
+
240
+              return false
241
+
242
+            } else {
243
+              this.loadingtwo = false
244
+
245
+            }
246
+          })
247
+
248
+          this.state = '已收费'
249
+          this.$message({ message: '收费成功', type: 'success' })
250
+        } else if (index == 5) {
251
+          this.$message({ message: '退费成功', type: 'success' })
252
+        } else if (index == 6) {
253
+
254
+          if (this.patientInfo.id == 0) {
255
+            this.$message.error('请先选择要挂号的病人')
256
+            return
257
+          }
258
+          let params = {
259
+            'id': this.patientInfo.id,
260
+            'record_time': this.record_date
261
+          }
262
+          this.loadingone = true
263
+          register(params).then(response => {
264
+            if (response.data.state == 0) {
265
+              this.$message.error(response.data.msg)
266
+              this.loadingone = false
267
+
268
+              return false
269
+
270
+            } else {
271
+              this.loadingone = false
272
+              var his_info = response.data.data.his_info
273
+              this.hisPatientInfo = his_info
274
+            }
275
+          })
276
+        }
277
+      },
278
+      addTab(targetName) {
279
+        let newTabName = ++this.tabIndex + ''
280
+        this.editableTabs.push({
281
+          title: '处方' + this.tabIndex,
282
+          name: newTabName
283
+        })
284
+        this.editableTabsValue = newTabName
285
+      },
286
+      removeTab(targetName) {
287
+        let tabs = this.editableTabs
288
+        let activeName = this.editableTabsValue
289
+        if (activeName === targetName) {
290
+          tabs.forEach((tab, index) => {
291
+            if (tab.name === targetName) {
292
+              let nextTab = tabs[index + 1] || tabs[index - 1]
293
+              if (nextTab) {
294
+                activeName = nextTab.name
295
+              }
296
+            }
297
+          })
298
+        }
299
+
300
+        this.editableTabsValue = activeName
301
+        this.editableTabs = tabs.filter(tab => tab.name !== targetName)
302
+      },
303
+      addCharges() {
304
+        this.$refs.additionalCharges.show()
305
+      },
306
+      choosePatient() {
307
+
308
+      },
309
+      changeRadio(id) {
310
+        console.log(id)
311
+        this.radioStatus = id
312
+        this.getPatientList()
313
+      },
314
+
315
+      //患者列表
316
+      getPatientList() {
317
+        let params = {
318
+          'record_date': this.record_date
319
+        }
320
+        getSchedulePatientList(params).then(response => {
321
+          if (response.data.state == 0) {
322
+            this.$message.error(response.data.msg)
323
+            return false
324
+          } else {
325
+            this.patientTableData = []
326
+            // let cal_one = 0
327
+            // let cal_two = 0
328
+            for (let i = 0; i < response.data.data.list.length; i++) {
329
+              // if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
330
+              //   // cal_one = cal_one + 1
331
+              // }
332
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
333
+                // cal_two = cal_two + 1
334
+                this.patientTableData.push(response.data.data.list[i])
335
+              }
336
+            }
337
+
338
+            // this.cal_one = cal_one
339
+            // this.cal_two = cal_two
340
+          }
341
+        })
342
+      },
343
+
344
+      unique(arr) {
345
+        const res = new Map()
346
+        return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
347
+      },
348
+      handleCurrentChange(val) {
349
+        this.getPatientInformation(val.patients.id)
350
+      }, //获取患者的基本信息
351
+      getPatientInformation(id) {
352
+        let params = {
353
+          'record_date': this.record_date,
354
+          'patient_id': id
355
+        }
356
+        getPatientInfo(params).then(response => {
357
+          if (response.data.state == 0) {
358
+            this.$message.error(response.data.msg)
359
+            return false
360
+          } else {
361
+            this.patientInfo = response.data.data.xt_info
362
+            this.hisPatientInfo = response.data.data.his_info
363
+            this.prescriptions = []
364
+            for (let i = 0; i < response.data.data.prescription.length; i++) {
365
+              var prescription = response.data.data.prescription[i]
366
+              let index = i + 1
367
+              let obj = {
368
+                name: '处方' + index,
369
+                advices: prescription.advices,
370
+                project: prescription.project,
371
+                type: response.data.data.prescription[i].type
372
+              }
373
+              this.prescriptions.push(obj)
374
+              this.curPrescriptions = this.prescriptions[0]
375
+
376
+            }
377
+            // this.$refs.prescriptions.setData(this.prescriptions)
378
+          }
379
+        })
380
+      }
381
+    }
382
+  }
383
+</script>
384
+
385
+<style lang="scss" scoped>
386
+  .app-container {
387
+    height: 100%;
388
+  }
389
+
390
+  .outpatientChargesManagement {
391
+    height: 100%;
392
+    display: flex;
393
+    flex-direction: column;
394
+
395
+  .mainLeft {
396
+    width: 200px;
397
+    height: 100%;
398
+    display: flex;
399
+    flex-direction: column;
400
+
401
+  .el-radio {
402
+    margin-right: 5px;
403
+  }
404
+
405
+  }
406
+  .mainCell {
407
+    height: 36px;
408
+    display: flex;
409
+    align-items: center;
410
+  }
411
+
412
+  .mainRight {
413
+    margin-left: 20px;
414
+    flex: 1;
415
+    height: 100%;
416
+    display: flex;
417
+    flex-direction: column;
418
+    overflow-y: auto;
419
+
420
+  .cellSpan {
421
+    min-width: 80px;
422
+    display: inline-block;
423
+    margin-right: 10px;
424
+  }
425
+
426
+  }
427
+  .tabsBox {
428
+    position: relative;
429
+    height: 90%;
430
+    overflow-y: auto;
431
+    margin-bottom: 60px;
432
+
433
+  .el-tabs__item {
434
+    padding: 0 10px;
435
+  }
436
+
437
+  }
438
+  .addTab {
439
+    position: absolute;
440
+    right: 0;
441
+    top: 6px;
442
+    z-index: 20;
443
+  }
444
+
445
+  .mainCenter {
446
+    display: flex;
447
+    flex: 1;
448
+  }
449
+
450
+  .costBox {
451
+    width: 100%;
452
+    height: 60px;
453
+    background: #fff;
454
+    position: absolute;
455
+    bottom: 0;
456
+    display: flex;
457
+    align-items: center;
458
+    justify-content: space-between;
459
+  }
460
+
461
+  .centerLeft {
462
+    flex: 1;
463
+    display: flex;
464
+    flex-direction: column;
465
+    position: relative;
466
+  }
467
+
468
+  .centerRight {
469
+    width: 300px;
470
+    margin-left: 5px;
471
+    display: flex;
472
+    flex-direction: column;
473
+  }
474
+
475
+  .RP {
476
+    color: #409EFF;
477
+    font-size: 20px;
478
+    margin-bottom: 5px;
479
+  }
480
+
481
+  .centerRightTitle {
482
+    color: #409EFF;
483
+    padding-top: 10px;;
484
+  }
485
+
486
+  .basicUl {
487
+    border-top: 1px solid #e5e5e5;
488
+    border-left: 1px solid #e5e5e5;
489
+    display: flex;
490
+    flex-wrap: wrap;
491
+
492
+  li {
493
+    border-bottom: 1px solid #e5e5e5;
494
+    border-right: 1px solid #e5e5e5;
495
+    width: 100%;
496
+    height: 38px;
497
+    line-height: 38px;
498
+    text-indent: 5px;
499
+    font-size: 14px;
500
+  }
501
+
502
+  }
503
+  }
504
+</style>
505
+
506
+<style lang="scss">
507
+  #tab-more {
508
+
509
+  .el-icon-close {
510
+    display: none;
511
+  }
512
+
513
+  }
514
+</style>
515
+