陈少旭 7 months ago
parent
commit
e9e5ef0e78
1 changed files with 554 additions and 0 deletions
  1. 554 0
      src/xt_pages/fapiao/settleDetail.vue

+ 554 - 0
src/xt_pages/fapiao/settleDetail.vue View File

@@ -0,0 +1,554 @@
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">
7
+      <div
8
+        style="
9
+          display: flex;
10
+          justify-content: space-between;
11
+          margin-bottom: 10px;
12
+        ">
13
+        <div>
14
+          <el-button size="small" type="primary"
15
+                     @click="query">查询
16
+          </el-button>
17
+          <el-button size="small" type="primary"
18
+                     @click="auth">认证
19
+          </el-button>
20
+        </div>
21
+      </div>
22
+      <div style="margin-bottom: 10px;">
23
+        <el-date-picker
24
+          size="small"
25
+          v-model="start_time"
26
+          prefix-icon="el-icon-date"
27
+          @change="handleStartTimeChange"
28
+          :editable="false"
29
+          :clearable="false"
30
+          style="width: 196px; "
31
+          type="date"
32
+          placeholder="选择开始日期"
33
+          format="yyyy-MM-dd"
34
+          value-format="yyyy-MM-dd"
35
+          align="right"
36
+        ></el-date-picker>
37
+        <span style="text-align: center;">-</span>
38
+        <el-date-picker
39
+          size="small"
40
+          v-model="end_time"
41
+          prefix-icon="el-icon-date"
42
+          @change="handleEndTimeChange"
43
+          :editable="false"
44
+          :clearable="false"
45
+          style="width: 196px; "
46
+          type="date"
47
+          placeholder="选择结束日期"
48
+          format="yyyy-MM-dd"
49
+          value-format="yyyy-MM-dd"
50
+          align="right"
51
+        ></el-date-picker>
52
+      </div>
53
+
54
+      <el-table
55
+        :data="tableData"
56
+        border
57
+        style="width: 100%"
58
+        :row-style="{ color: '#303133' }"
59
+        @selection-change="handleSelectionChange"
60
+        :header-cell-style="{
61
+          backgroundColor: 'rgb(245, 247, 250)',
62
+          color: '#606266',
63
+        }"
64
+        highlight-current-row
65
+      >
66
+        <el-table-column align="center" type="selection" width="55"></el-table-column>
67
+        <el-table-column
68
+          prop="date"
69
+          label="序号"
70
+          width="60"
71
+          align="center"
72
+          type="index"
73
+        >
74
+        </el-table-column>
75
+
76
+        <el-table-column align="center" width="90" prop="name" label="患者名字">
77
+          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
78
+        </el-table-column>
79
+
80
+        <el-table-column align="center" width="90" prop="name" label="患者性别">
81
+          <template slot-scope="scope">{{ scope.row.patient.gender == 1 ? '男':'女' }}</template>
82
+        </el-table-column>
83
+
84
+
85
+        <el-table-column align="center" width="90" prop="name" label="处方类型">
86
+          <template slot-scope="scope">
87
+            <div>{{ getMedType(scope.row.med_type) }}</div>
88
+          </template>
89
+        </el-table-column>
90
+
91
+        <el-table-column align="center" width="90" prop="name" label="结算类型">
92
+          <template slot-scope="scope">
93
+            <div v-if="scope.row.his_patient.balance_accounts_type != 2">
94
+              医保
95
+            </div>
96
+            <div v-if="scope.row.his_patient.balance_accounts_type == 2">
97
+              自费
98
+            </div>
99
+          </template>
100
+        </el-table-column>
101
+
102
+        <el-table-column align="center" width="90" prop="name" label="就诊凭证类型">
103
+          <template slot-scope="scope">
104
+            <div v-if="scope.row.mdtrt_cert_type =='01'">
105
+              医保电子凭证
106
+            </div>
107
+            <div v-if="scope.row.mdtrt_cert_type =='02'">
108
+              居民身份证
109
+            </div>
110
+
111
+            <div v-if="scope.row.mdtrt_cert_type =='03'">
112
+              社会保障卡
113
+            </div>
114
+          </template>
115
+        </el-table-column>
116
+
117
+        <el-table-column
118
+          align="center"
119
+          width="100"
120
+          prop="name"
121
+          label="处方日期"
122
+        >
123
+          <template slot-scope="scope">
124
+            {{getTimes(scope.row.settle_accounts_date) }}
125
+          </template>
126
+        </el-table-column>
127
+
128
+        <el-table-column
129
+          align="center"
130
+          width="100"
131
+          prop="name"
132
+          label="收费时间"
133
+        >
134
+          <template slot-scope="scope">
135
+            {{
136
+              scope.row.setl_time
137
+                ? scope.row.setl_time
138
+                : getTimes(scope.row.settle_accounts_date)
139
+            }}
140
+          </template>
141
+        </el-table-column>
142
+
143
+        <el-table-column align="center" width="90" prop="name" label="收费员">
144
+          <template slot-scope="scope">
145
+            {{getName(scope.row.creator)}}
146
+          </template>
147
+        </el-table-column>
148
+
149
+        <el-table-column align="center" prop="name" label="操作">
150
+          <template slot-scope="scope">
151
+            <el-button size="mini" type="primary" @click="blue(scope.row)">
152
+              开票
153
+            </el-button>
154
+            <el-button size="mini" type="primary"
155
+                       @click="yulan(scope.row)">
156
+              预览
157
+            </el-button>
158
+
159
+            <el-button  size="mini" type="primary"
160
+                       @click="hongchong(scope.row)">
161
+              红冲
162
+            </el-button>
163
+          </template>
164
+        </el-table-column>
165
+      </el-table>
166
+      <el-pagination
167
+        @size-change="handleSizeChange"
168
+        @current-change="handleCurrentChange"
169
+        :page-sizes="[10, 50, 100]"
170
+        :page-size="10"
171
+        :current-page.sync="page"
172
+        background
173
+        style="margin-top: 20px; float: right"
174
+        layout="total, sizes, prev, pager, next, jumper"
175
+        :total="total"
176
+      >
177
+      </el-pagination>
178
+    </div>
179
+
180
+
181
+  </div>
182
+</template>
183
+
184
+
185
+<script>
186
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
187
+import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund } from '@/api/his/his'
188
+import { ModifyFapiaoCode } from '@/api/his/his_tools'
189
+
190
+
191
+// import NewStatementPrint from './newStatementPrint'
192
+import { adminMainView} from "@/api/role/admin";
193
+import { fetchAllAdminUsers } from '@/api/doctor'
194
+import axios from 'axios'
195
+import { jsGetAge, uParseTime } from '@/utils/tools'
196
+import {
197
+  getOrderFapiaoList
198
+} from '../../api/fapiao'
199
+
200
+import { getDialysisRecordInitData } from '@/api/dialysis_record'
201
+
202
+const moment = require('moment')
203
+export default {
204
+  name: 'OutpatientChargesSummary',
205
+  components: {
206
+    BreadCrumb,
207
+  },
208
+  data() {
209
+    return {
210
+      staff:"",
211
+      admins:[],
212
+      orderObj: {},
213
+      batchOrderObj: {},
214
+      fapiao_number:"",
215
+      med_options: [
216
+        { id: 0, text: '全部' },
217
+        { id: 11, text: '普通门诊' },
218
+        { id: 14, text: '门诊特殊病' }
219
+      ],
220
+      zone_options: [
221
+        { id: 0, text: '全部分区' }
222
+      ],
223
+      statementListVisible: false,
224
+      statementVisible: false,
225
+      batchStatementVisible: false,
226
+      statementVisible9504: false,
227
+      orderObj9504: {},
228
+      crumbs: [
229
+        { path: false, name: '门诊收费' },
230
+        { path: false, name: '项目消费明细汇总' }
231
+      ],
232
+      tableData: [],
233
+      tableData2:[],
234
+      selecting_schs: [],
235
+      dialogfapiaoVisible:false,
236
+      targeOrderId:0,
237
+      targeObj:{},
238
+      limit: 10,
239
+      page: 1,
240
+      keywords: '',
241
+      sch_type: '0',//班次
242
+      zoneVal: 0,//分区
243
+      medTypeVal: 0,
244
+      start_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
245
+      end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
246
+      pay_time:"",
247
+      total: '',
248
+      doctors: [],
249
+      sort_type: 1,
250
+      sort_types: [
251
+        { value: 1, label: '处方时间' },
252
+        { value: 2, label: '结算时间' }
253
+      ],
254
+      admin_user_id: '',
255
+      listVisible: false,
256
+      allListVisible: false,
257
+      adminUserOptions: [],
258
+      invoiceVisible: false,
259
+      paramsObj: {},
260
+      invoiceParams: {},
261
+      settlementVisible: false,
262
+      settlementObj: {},
263
+      accounts_click_vi:false,
264
+    }
265
+  },
266
+
267
+  created() {
268
+    this.getInitData()
269
+    this.fetchAllAdminUsers()
270
+    // this.getDoctorList()
271
+    this.getHisOrderList()
272
+    // this.getAllstaff()
273
+  },
274
+
275
+  methods: {
276
+    auth(){
277
+
278
+    },
279
+    query(){
280
+
281
+    },
282
+    blue(row){
283
+
284
+    }, yulan(row){
285
+
286
+    },hongchong(row){
287
+
288
+    },
289
+    getAllstaff(){
290
+      adminMainView()
291
+        .then(rs => {
292
+
293
+          var resp = rs.data;
294
+          if (resp.state === 1) {
295
+            var adminData = resp.data.admins
296
+            this.admins.push(...adminData);
297
+          } else {
298
+            this.$message.error(resp.msg);
299
+          }
300
+        })
301
+        .catch(err => {
302
+          this.$message.error(err);
303
+        });
304
+
305
+
306
+    },
307
+
308
+    handleSelectionChange(val) {
309
+      this.selecting_schs = val
310
+    },
311
+    handleSchType(val) {
312
+      this.sch_type = val
313
+      this.getHisOrderList()
314
+    }, handleMedChange() {
315
+      this.getHisOrderList()
316
+    },
317
+    handleZoneChange(val) {
318
+      this.zoneVal = val
319
+      this.getHisOrderList()
320
+
321
+    },
322
+    getInitData: function() {
323
+      getDialysisRecordInitData().then((rs) => {
324
+        var resp = rs.data
325
+        if (resp.state == 1) {
326
+          var zones = resp.data.zones
327
+          var zone_options = [{ id: 0, text: '全部' }]
328
+          for (let z_i = 0; z_i < zones.length; z_i++) {
329
+            const zone = zones[z_i]
330
+            zone_options.push({ id: zone.id, text: zone.name })
331
+          }
332
+          this.zone_options = zone_options
333
+
334
+        } else {
335
+          this.$message.error(resp.msg)
336
+        }
337
+      })
338
+    },
339
+
340
+
341
+
342
+    getMedType(med_type) {
343
+      var med_type = parseInt(med_type)
344
+      switch (med_type) {
345
+        case 11:
346
+          return '普通门诊'
347
+          break
348
+        case 12:
349
+          return '门诊挂号'
350
+          break
351
+        case 13:
352
+          return '急诊'
353
+          break
354
+        case 14:
355
+          return '门诊特殊病'
356
+          break
357
+        case 15:
358
+          return '门诊统筹'
359
+          break
360
+        case 16:
361
+          return '门诊慢性病'
362
+          break
363
+        case 21:
364
+          return '普通住院'
365
+          break
366
+        case 140104:
367
+          return '城乡门诊特殊病(140104)'
368
+          break
369
+        case 992102:
370
+          return '单病种(992102)'
371
+          break
372
+      }
373
+    },
374
+
375
+
376
+    fetchAllAdminUsers() {
377
+      fetchAllAdminUsers().then((response) => {
378
+        if (response.data.state == 1) {
379
+          this.adminUserOptions = response.data.data.users
380
+        }
381
+      })
382
+    },
383
+    getName(admin_user_id) {
384
+      for (let i = 0; i < this.adminUserOptions.length; i++) {
385
+        if (this.adminUserOptions[i].id == admin_user_id) {
386
+          return this.adminUserOptions[i].name
387
+        }
388
+      }
389
+    },
390
+
391
+
392
+
393
+    handleSizeChange(limit) {
394
+      this.limit = limit
395
+      this.getHisOrderList()
396
+    },
397
+    handleCurrentChange(page) {
398
+      this.page = page
399
+      this.getHisOrderList()
400
+    },
401
+    handleStartTimeChange() {
402
+      this.page = 1
403
+      this.keywords = ''
404
+      this.getHisOrderList()
405
+    },
406
+    handleEndTimeChange() {
407
+      this.page = 1
408
+      this.keywords = ''
409
+      this.getHisOrderList()
410
+    },
411
+
412
+    getTimes(time) {
413
+      return uParseTime(time, '{y}-{m}-{d}')
414
+    },
415
+
416
+    getTime(value, temp) {
417
+      if (value != undefined) {
418
+        return uParseTime(value, temp)
419
+      }
420
+      return ''
421
+    },
422
+    getHisOrderList() {
423
+      let params = {
424
+        page: this.page,
425
+        limit: this.limit,
426
+        keywords: this.keywords,
427
+        start_time: this.start_time,
428
+        end_time: this.end_time,
429
+        sort_type: this.sort_type,
430
+      }
431
+      getOrderFapiaoList(params).then((response) => {
432
+        if (response.data.state == 0) {
433
+          this.$message.error(response.data.msg)
434
+          return false
435
+        } else {
436
+          this.tableData = response.data.data.order
437
+          this.total = response.data.data.total
438
+        }
439
+      })
440
+    },
441
+    getDoctorList() {
442
+      getDoctorList().then((response) => {
443
+        if (response.data.state == 0) {
444
+          this.$message.error(response.data.msg)
445
+          return false
446
+        } else {
447
+          this.doctors = response.data.data.doctors
448
+        }
449
+      })
450
+    },
451
+    open(index) {
452
+      if (index == 1) {
453
+        this.listVisible = true
454
+      } else if (index == 2) {
455
+        this.allListVisible = true
456
+      }
457
+    }, unique(array) {
458
+      // res用来存储结果
459
+      var res = []
460
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
461
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
462
+          if (array[i].id === res[j].id && array[i].price === res[j].price) {
463
+            break
464
+          }
465
+        }
466
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
467
+        if (j === resLen) {
468
+          res.push(array[i])
469
+        }
470
+      }
471
+      return res
472
+    },camcleModifyFaPiaoCode(){
473
+      this.dialogfapiaoVisible = false
474
+      this.invoiceVisible = true
475
+      var obj = this.targeObj
476
+      let paramsObj = {
477
+        order_id: obj.id,
478
+        patient_id: obj.patient_id,
479
+        number: obj.mdtrt_id,
480
+        name: obj.patient.name,
481
+        age: obj.age,
482
+        gend: obj.patient.gender,
483
+        setl_time: obj.setl_time,
484
+        chargeName: this.getName(obj.creator)
485
+      }
486
+      this.dialogfapiaoVisible = false
487
+      this.invoiceParams = paramsObj
488
+      this.invoiceVisible = true
489
+    },modifyFaPiaoCode(){
490
+      let params = {
491
+        id:this.targeOrderId,
492
+        fapiao_number: this.fapiao_number
493
+      }
494
+      modifyFapiaoCodetwo(params).then((response) => {
495
+        if (response.data.state == 0) {
496
+          this.$message.error(response.data.msg)
497
+          return false
498
+        } else {
499
+          var obj = this.targeObj
500
+          let paramsObj = {
501
+            order_id: obj.id,
502
+            patient_id: obj.patient_id,
503
+            number: obj.mdtrt_id,
504
+            name: obj.patient.name,
505
+            age: obj.age,
506
+            gend: obj.patient.gender,
507
+            setl_time: obj.setl_time,
508
+            chargeName: this.getName(obj.creator)
509
+          }
510
+          this.dialogfapiaoVisible = false
511
+          this.invoiceParams = paramsObj
512
+          this.invoiceVisible = true
513
+          this.getHisOrderList()
514
+        }
515
+      })
516
+
517
+    },
518
+
519
+    invoicePrint(obj) {
520
+      if(this.$store.getters.xt_user.org_id == 10480 || this.$store.getters.xt_user.org_id == 0){
521
+        this.fapiao_number  = obj.fa_piao_number
522
+        this.dialogfapiaoVisible = true
523
+        this.targeOrderId = obj.id
524
+        this.targeObj = obj
525
+      }else{
526
+        let paramsObj = {
527
+          order_id: obj.id,
528
+          patient_id: obj.patient_id,
529
+          number: obj.mdtrt_id,
530
+          name: obj.patient.name,
531
+          age: obj.age,
532
+          gend: obj.patient.gender,
533
+          setl_time: obj.setl_time,
534
+          chargeName: this.getName(obj.creator)
535
+        }
536
+        this.dialogfapiaoVisible = false
537
+        this.invoiceParams = paramsObj
538
+        this.invoiceVisible = true
539
+
540
+
541
+      }
542
+
543
+
544
+    }
545
+  }
546
+}
547
+</script>
548
+<style lang="scss">
549
+.table{
550
+tr td{
551
+  padding:5px 0;
552
+}
553
+}
554
+</style>