XMLWAN 2 yıl önce
ebeveyn
işleme
71e2a864b3

+ 8 - 0
src/api/his/his_tools.js Dosyayı Görüntüle

@@ -30,3 +30,11 @@ export function GetDetailPatients(params) {
30 30
     params: params
31 31
   })
32 32
 }
33
+
34
+export function getHisOrderList(params) {
35
+  return request({
36
+    url: '/api/his/gethisorderlist',
37
+    method: 'Get',
38
+    params: params
39
+  })
40
+}

+ 6 - 0
src/router/modules/hisTool.js Dosyayı Görüntüle

@@ -108,5 +108,11 @@ export default {
108 108
       is_menu: false,
109 109
       meta: { title: 'gatherPrint', noCache: true }
110 110
     }
111
+    // {
112
+    //   path: '/hisTool/export',
113
+    //   component: () => import('@/xt_pages/outpatientTool/export'),
114
+    //   name: 'export',
115
+    //   meta: { title: 'export', noCache: true }
116
+    // }
111 117
   ]
112 118
 }

+ 631 - 0
src/xt_pages/outpatientTool/export.vue Dosyayı Görüntüle

@@ -0,0 +1,631 @@
1
+<template>
2
+  <div class="main-contain new-main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div
7
+      class="app-container"
8
+      style="display: flex; flex: 1; padding: 10px 20px 0px 20px"
9
+    >
10
+      <div class="mainLeft">
11
+        <div>
12
+          <div
13
+            style="
14
+              margin: 10px 0;
15
+              display: flex;
16
+              justify-content: space-between;
17
+            "
18
+          >
19
+            <el-input
20
+              size="small"
21
+              style="width: 130px"
22
+              v-model="keywords"
23
+              class="filter-item"
24
+              placeholder="请输入患者名称"
25
+            />
26
+            <el-button
27
+              size="small"
28
+              class="filter-item"
29
+              type="primary"
30
+              @click="searchAction"
31
+              >搜索
32
+            </el-button>
33
+          </div>
34
+
35
+          <el-table
36
+            :row-class-name="tableRowClassName"
37
+            @row-click="onRowClick"
38
+            :data="patientTableData"
39
+            :height="tableHeight"
40
+            border
41
+            style="width: 100%"
42
+            :row-style="{ color: '#303133' }"
43
+            :header-cell-style="{
44
+              backgroundColor: 'rgb(245, 247, 250)',
45
+              color: '#606266',
46
+            }"
47
+            highlight-current-row
48
+            ref="singleTable"
49
+            @current-change="handleCurrentChange"
50
+          >
51
+            <el-table-column align="center" prop="name" label="姓名" wdith="89">
52
+              <template slot-scope="scope">{{ scope.row.name }}</template>
53
+            </el-table-column>
54
+          </el-table>
55
+        </div>
56
+      </div>
57
+      <div class="mainRight">
58
+        <el-date-picker
59
+          v-model="chargeDate"
60
+          type="daterange"
61
+          value-format="yyyy-MM-dd"
62
+          range-separator="至"
63
+          start-placeholder="开始日期"
64
+          @change="changeDate"
65
+          end-placeholder="结束日期"
66
+        >
67
+        </el-date-picker>
68
+        <el-table
69
+        :data="tableList"
70
+         border
71
+        style="width: 100%">
72
+         <el-table-column prop="date" label="姓名"  width="100" align="center">
73
+           <template slot-scope="scope" >
74
+            {{ scope.row.name }}
75
+           </template>
76
+        </el-table-column>
77
+        <el-table-column  prop="date"  label="身份证"  width="200" align="center">
78
+           <template slot-scope="scope" >
79
+            {{ scope.row.id_card_no }}
80
+           </template> 
81
+        </el-table-column>
82
+        <el-table-column prop="name"  label="医保类型" width="100" align="center">
83
+          <template slot-scope="scope" >
84
+            <span v-if="scope.row.insutype == 0">居民</span>
85
+            <span v-if="scope.row.insutype == 310">职工</span>
86
+            <span v-if="scope.row.insutype == 390">居民</span>
87
+           </template>  
88
+        </el-table-column>
89
+        <el-table-column  prop="address" label="年"  width="50" align="center">
90
+          <template slot-scope="scope" >
91
+            {{getTime(scope.row.settle_accounts_date)}}
92
+         </template>  
93
+        </el-table-column>
94
+         <el-table-column prop="address" label="月"  width="50"  align="center">
95
+          <template slot-scope="scope">
96
+            {{getTimeOne(scope.row.settle_accounts_date)}}
97
+           </template>  
98
+        </el-table-column>
99
+         <el-table-column prop="address" label="收费项目"  width="100" align="center">
100
+           <template slot-scope="scope" >
101
+            <!-- {{getTime(scope.row.settle_accounts_date)}} -->
102
+            <span v-if="scope.row.med_chrgitm_type == '01'">床位费</span>
103
+            <span v-if="scope.row.med_chrgitm_type == '02'">诊察费</span>
104
+            <span v-if="scope.row.med_chrgitm_type == '03'">检查费</span>
105
+            <span v-if="scope.row.med_chrgitm_type == '04'">化验费</span>
106
+            <span v-if="scope.row.med_chrgitm_type == '05'">治疗费</span>
107
+            <span v-if="scope.row.med_chrgitm_type == '06'">手术费</span>
108
+            <span v-if="scope.row.med_chrgitm_type == '08'">材料费</span>
109
+            <span v-if="scope.row.med_chrgitm_type == '09'">西药费</span>
110
+            <span v-if="scope.row.med_chrgitm_type == '11'">中成费</span>
111
+            <span v-if="scope.row.med_chrgitm_type == '14'">其他费</span>
112
+           </template>  
113
+        </el-table-column>
114
+         <el-table-column prop="address" label="数量"  width="100" align="center">
115
+           <template slot-scope="scope" >
116
+            {{getCount(scope.row.child)}}
117
+           </template>  
118
+          </el-table-column>
119
+       
120
+         <el-table-column  prop="address"  label="金额"  width="130" align="center">
121
+         <template slot-scope="scope" >
122
+            {{getAllPrice(scope.row.child)}}
123
+           </template>  
124
+        </el-table-column>
125
+         </el-table>
126
+      </div>
127
+    </div>
128
+  </div>
129
+</template>
130
+
131
+<script>
132
+import { GetDetailPatients,getHisOrderList } from "@/api/his/his_tools";
133
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
134
+const moment = require("moment");
135
+import { uParseTime } from '@/utils/tools'
136
+export default {
137
+  components: {
138
+    BreadCrumb,
139
+  },
140
+  data() {
141
+    return {
142
+      currentRowIndex: 0,
143
+      patientTableData: [],
144
+      tableHeight: 400,
145
+      crumbs: [
146
+        { path: false, name: "His工具" },
147
+        { path: false, name: "明细汇总统计" },
148
+      ],
149
+      titleType: "明细",
150
+      patient_id: 0,
151
+      keywords: "",
152
+      tableList:[],
153
+     chargeDate: [
154
+        moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
155
+        moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
156
+      ],
157
+      start_time:"",
158
+      end_time:""
159
+    };
160
+  },
161
+
162
+  // beforeRouteEnter(to, from, next){
163
+  //     if(from.path == '/hisTool/detailPrint'){
164
+  //       next((vm) => {
165
+  //         vm.titleType = "明细"
166
+  //       })
167
+  //     }else if(from.path == '/hisTool/gatherPrint'){
168
+  //       vm.titleType = "汇总"
169
+  //       next((vm) => {
170
+  //         vm.titleType = "汇总"
171
+  //       })
172
+  //     }else{
173
+  //       next()
174
+  //     }
175
+  // },
176
+
177
+  //判断列表页是否刷新
178
+  beforeRouteLeave(to, from, next) {
179
+    console.log(to, "beforeRouteEnter");
180
+    if (to.path != "/hisTool/detailPrint"&&to.path != "/hisTool/gatherPrint") {
181
+      this.$store.getters.pagedata.list.table_id = 0
182
+      next()
183
+    } else {
184
+     next()
185
+    }
186
+  },
187
+
188
+  watch:{
189
+    'titleType':{
190
+      handler(val){
191
+        this.$store.commit('SET_PAGENAME',val)
192
+      }
193
+    }
194
+  },
195
+
196
+  methods: {
197
+    getPatientList() {
198
+      var params = {
199
+        keyword: this.keywords,
200
+      };
201
+      GetDetailPatients(params).then((response) => {
202
+        if (response.data.state == 0) {
203
+          this.$message.error(response.data.msg);
204
+          return false;
205
+        } else {
206
+          this.patientTableData = response.data.data.patient;
207
+          this.patient_id = this.patientTableData[0].id;
208
+          if (this.$store.getters.pagedata.list.table_id == 0) {
209
+            this.$refs.singleTable.setCurrentRow(this.patientTableData[0]);
210
+          } else {
211
+            this.$refs.singleTable.setCurrentRow(
212
+              this.patientTableData[
213
+                this.$store.getters.pagedata.list.table_id
214
+              ]
215
+            );
216
+          }
217
+        }
218
+      });
219
+    },
220
+
221
+    tableRowClassName({ row, rowIndex }) {
222
+      row.row_index = rowIndex;
223
+    },
224
+
225
+    onRowClick(row, event, column) {
226
+      this.currentRowIndex = row.row_index;
227
+      this.$store.commit("SET_PAGEDATA", {
228
+        table_id: this.currentRowIndex,
229
+      });
230
+      // console.log(this.$store.getters.pagedata.list.table_id, "列表行id");
231
+    },
232
+    searchAction() {
233
+      this.getPatientList();
234
+    },
235
+    handleCurrentChange(row) {
236
+      this.patient_id = row.id;
237
+      this.tableList = []
238
+      this.getHisOrderList(row.id)
239
+    },
240
+    getHisOrderList(id){
241
+       var params = {
242
+        patient_id:id,
243
+        start_time:this.start_time,
244
+        end_time:this.end_time,
245
+       } 
246
+     console.log("params223332233232",params)
247
+     getHisOrderList(params).then(response=>{
248
+       if(response.data.state == 1){
249
+        //  var list = response.data.data.list
250
+        //  console.log("list23232232323",list)
251
+         var groupList = response.data.data.groupList
252
+          
253
+         var arr = []
254
+         for(let i=0;i<groupList.length;i++){
255
+            //已经结算
256
+           if(groupList[i].order.order_status == 2){
257
+              arr.push(groupList[i])
258
+           }
259
+         }
260
+         console.log("已结算数据",arr)
261
+         if(arr.length > 0){
262
+         let objInfo = {};
263
+          if(arr.length > 0) {
264
+             arr.forEach((item, index) => {
265
+              let { med_chrgitm_type } = item;
266
+              if (!objInfo[med_chrgitm_type]) {
267
+                objInfo[med_chrgitm_type] = {
268
+                  med_chrgitm_type:item.med_chrgitm_type,
269
+                  child: [],
270
+                  count: item.cnt,
271
+                  pric:item.pric,
272
+                  order_id:item.order_id,
273
+                  name:item.patient.name,
274
+                  id_card_no:item.patient.id_card_no,
275
+                  insutype:item.order.insutype,
276
+                  settle_accounts_date:item.order.settle_accounts_date,
277
+                  det_item_fee_sumamt:item.det_item_fee_sumamt,
278
+                };
279
+              }
280
+            });
281
+
282
+            let newArr = Object.values(objInfo);
283
+            console.log("newAR23232323232323323",newArr.length)
284
+
285
+            if(newArr.length > 0){
286
+             console.log("尽力33232233232",newArr)
287
+              for(let i=0;i<newArr.length;i++){
288
+                for(let j=0;j<arr.length;j++){
289
+                   if(newArr[i].med_chrgitm_type == arr[j].med_chrgitm_type){
290
+                      newArr[i].child.push(arr[j])
291
+                   }
292
+                }
293
+              }
294
+            }
295
+            console.log("分类后的数据",newArr)
296
+            this.tableList = newArr
297
+          }
298
+          
299
+         }
300
+
301
+         //console.log("grouplist2323322",groupList)
302
+         
303
+       }
304
+     })
305
+    },
306
+    changeDate(){
307
+      this.start_time = this.chargeDate[0];
308
+      this.end_time = this.chargeDate[1];  
309
+      this.getHisOrderList(this.patient_id) 
310
+    },
311
+   getTime(val) {
312
+     if(val < 0){
313
+       return ""
314
+      }
315
+     if(val == ""){
316
+       return ""
317
+      }else {
318
+      return uParseTime(val, '{y}')
319
+      }
320
+    },
321
+   getTimeOne(val) {
322
+     if(val < 0){
323
+       return ""
324
+      }
325
+     if(val == ""){
326
+       return ""
327
+      }else {
328
+      return uParseTime(val, '{m}')
329
+      }
330
+    },
331
+    getCount(val){
332
+      console.log("valr233232323",val)
333
+      var count = 0
334
+      for(let i=0;i<val.length;i++){
335
+        count +=val[i].cnt
336
+      }
337
+      if(count >0){
338
+        return count
339
+      }else{
340
+        return ""
341
+      }
342
+    },
343
+    getAllPrice(val){
344
+      var total_price = 0
345
+      for(let i=0;i<val.length;i++){
346
+        total_price +=val[i].cnt * val[i].pric
347
+      }
348
+      if(total_price >0){
349
+        return total_price.toFixed(2)
350
+      }else{
351
+        return ""
352
+      }
353
+    }
354
+  },
355
+  created() {
356
+
357
+    let type = this.$store.getters.pagedata.pagestate
358
+    if(type == ""){
359
+      this.titleType = "明细"
360
+    }else{
361
+      this.titleType = type
362
+    }
363
+    const tableHeight = document.body.clientHeight - 290;
364
+    this.tableHeight = tableHeight;
365
+    this.start_time = moment(new Date()).add("year", 0).format("YYYY-MM-DD")
366
+    this.end_time = moment(new Date()).add("year", 0).format("YYYY-MM-DD")
367
+    this.getPatientList();
368
+    
369
+  },
370
+
371
+  mounted() {}
372
+};
373
+</script>
374
+
375
+<style lang="scss" scoped>
376
+.new-main-contain {
377
+  height: 100%;
378
+  display: flex;
379
+  flex-direction: column;
380
+}
381
+
382
+.app-container {
383
+  height: 100%;
384
+}
385
+
386
+.mainCell {
387
+  height: 36px;
388
+  display: flex;
389
+  align-items: center;
390
+}
391
+
392
+.mainLeft {
393
+  width: 200px;
394
+  height: 100%;
395
+  display: flex;
396
+  flex-direction: column;
397
+
398
+  .el-radio {
399
+    margin-right: 5px;
400
+  }
401
+}
402
+.mainRight {
403
+  margin-left: 10px;
404
+  flex: 1;
405
+  height: 100%;
406
+  display: flex;
407
+  flex-direction: column;
408
+  overflow-y: auto;
409
+
410
+  .cellSpan {
411
+    min-width: 80px;
412
+    display: inline-block;
413
+    margin-right: 10px;
414
+  }
415
+}
416
+.mainCenter {
417
+  display: flex;
418
+  flex: 1;
419
+}
420
+
421
+.centerLeft {
422
+  flex: 1;
423
+  display: flex;
424
+  flex-direction: column;
425
+  position: relative;
426
+
427
+  .el-form-item {
428
+    width: 32%;
429
+    margin-right: 1%;
430
+    float: left;
431
+  }
432
+
433
+  .el-form-item__label {
434
+    text-align: left;
435
+  }
436
+}
437
+.backColor {
438
+  background: #f6f8f9;
439
+  height: 5px;
440
+  margin-bottom: 5px;
441
+}
442
+
443
+.tabsBox {
444
+  position: relative;
445
+  height: 76%;
446
+  overflow-y: auto;
447
+  margin-bottom: 60px;
448
+
449
+  .el-tabs__item {
450
+    padding: 0 10px;
451
+  }
452
+}
453
+.preTabs {
454
+  height: 100%;
455
+  display: flex;
456
+  flex-direction: column;
457
+
458
+  .el-tabs__content {
459
+    flex: 1;
460
+    overflow-y: auto;
461
+  }
462
+}
463
+
464
+.costBox {
465
+  width: 100%;
466
+  height: 60px;
467
+  background: #fff;
468
+  position: absolute;
469
+  bottom: 0;
470
+  display: flex;
471
+  align-items: center;
472
+}
473
+
474
+.addTab {
475
+  position: absolute;
476
+  right: 0;
477
+  top: 14px;
478
+  z-index: 20;
479
+}
480
+
481
+.centerRight {
482
+  width: 300px;
483
+  margin-left: 10px;
484
+  display: flex;
485
+  flex-direction: column;
486
+  position: relative;
487
+}
488
+
489
+.rightTab {
490
+  height: 40px;
491
+  width: 100%;
492
+  border: 1px solid #d2d2d2;
493
+  box-sizing: border-box;
494
+
495
+  p {
496
+    width: 50%;
497
+    height: 40px;
498
+    line-height: 40px;
499
+    text-align: center;
500
+    background: #eee;
501
+    float: left;
502
+  }
503
+
504
+  > p:last-child {
505
+    border-left: 1px solid #d2d2d2;
506
+    float: right;
507
+  }
508
+
509
+  .activeP {
510
+    background: #409eff;
511
+    color: #fff;
512
+  }
513
+}
514
+.comfirmBox {
515
+  width: 100%;
516
+  height: 60px;
517
+  background: #fff;
518
+  position: absolute;
519
+  bottom: 0;
520
+  display: flex;
521
+  align-items: center;
522
+  justify-content: space-between;
523
+}
524
+
525
+.mainHeader {
526
+  width: 100%;
527
+  background: #fff;
528
+  position: fixed;
529
+  z-index: 100;
530
+  height: 36px;
531
+}
532
+
533
+.titleBox {
534
+  position: fixed;
535
+  z-index: 99;
536
+  background: #fff;
537
+}
538
+
539
+.fixedCell {
540
+  position: fixed;
541
+  z-index: 99;
542
+  right: 30px;
543
+  background: #fff;
544
+  width: 300px;
545
+  display: flex;
546
+  justify-content: space-between;
547
+}
548
+</style>
549
+
550
+<style lang="scss">
551
+.centerLeft {
552
+  .el-form-item__label {
553
+    text-align: left;
554
+  }
555
+}
556
+.tabsBox {
557
+  .el-tabs__item {
558
+    padding: 0 10px;
559
+  }
560
+
561
+  .el-tabs--bottom
562
+    .el-tabs--left
563
+    > .el-tabs__header
564
+    .el-tabs__item:nth-child(2),
565
+  .el-tabs--bottom
566
+    .el-tabs--right
567
+    > .el-tabs__header
568
+    .el-tabs__item:nth-child(2),
569
+  .el-tabs--bottom.el-tabs--border-card
570
+    > .el-tabs__header
571
+    .el-tabs__item:nth-child(2),
572
+  .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2),
573
+  .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2),
574
+  .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2),
575
+  .el-tabs--top.el-tabs--border-card
576
+    > .el-tabs__header
577
+    .el-tabs__item:nth-child(2),
578
+  .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
579
+    padding: 0 10px;
580
+  }
581
+
582
+  .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
583
+  .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
584
+  .el-tabs--bottom.el-tabs--border-card
585
+    > .el-tabs__header
586
+    .el-tabs__item:last-child,
587
+  .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child,
588
+  .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
589
+  .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
590
+  .el-tabs--top.el-tabs--border-card
591
+    > .el-tabs__header
592
+    .el-tabs__item:last-child,
593
+  .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
594
+    padding: 0 10px;
595
+  }
596
+
597
+  .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
598
+    padding: 0 10px;
599
+  }
600
+}
601
+.centerRight {
602
+  .el-tabs__nav-scroll {
603
+    display: flex;
604
+  }
605
+
606
+  .el-tabs__nav {
607
+    margin: 0 auto;
608
+  }
609
+
610
+  .el-table th .cell,
611
+  .el-table td .cell {
612
+    padding: 0 2px;
613
+  }
614
+}
615
+.preTabs {
616
+  .el-tabs__content {
617
+  }
618
+}
619
+.rightTabs {
620
+  height: 100%;
621
+
622
+  .el-tabs__content {
623
+  }
624
+}
625
+.centerDialog {
626
+  .el-dialog__body {
627
+    max-height: calc(100vh - 100px) !important;
628
+    padding: 0 20px;
629
+  }
630
+}
631
+</style>

+ 2 - 1
src/xt_pages/stock/stockInOrderDetailPrint.vue Dosyayı Görüntüle

@@ -48,7 +48,7 @@
48 48
                             <tbody>
49 49
                                 <tr v-for='(item,index) in it.child' :key="index">
50 50
                                     <td style="line-height:18px;"><span v-if="item.good_id != 0">{{getTypeNameOne(item.good_id)}}</span></td>
51
-                                    <td style="line-height:18px;">{{ item.license_number }}</td>
51
+                                    <td style="line-height:18px;">{{item.register_number}} <span v-if="item.license_number !=''">/</span> {{item.license_number}}</td>
52 52
                                     <td style="line-height:18px;"><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
53 53
                                     <td style="line-height:18px;">{{ getManufacturer(item.good_id) }}</td>
54 54
                                     <td style="line-height:18px;">{{ getDeatl(item.dealer) }}</td>
@@ -215,6 +215,7 @@ export default {
215 215
                 }
216 216
               }
217 217
              }
218
+             
218 219
              this.warehousingInfo = warehousing
219 220
           
220 221
             }