|
@@ -44,8 +44,9 @@
|
44
|
44
|
</div>
|
45
|
45
|
<div>
|
46
|
46
|
<el-button size="small" icon="el-icon-printer" @click="toSett" type="primary" v-if="his_config.is_open == 1">设置</el-button>
|
47
|
|
- <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">打印</el-button>
|
48
|
|
- <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
|
|
47
|
+ <el-button size="small" icon="el-icon-printer" @click="toPrint" type="primary">打印</el-button>
|
|
48
|
+ <el-button size="small" icon="el-icon-printer" @click="exportListOne" type="primary" v-if="his_config.is_open == 1">导出</el-button>
|
|
49
|
+ <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary" v-if="his_config.is_open != 1">导出</el-button>
|
49
|
50
|
<el-button size="small" type="primary" v-if="his_config.is_open != 1" @click="statistics">统计表</el-button>
|
50
|
51
|
<el-button size="small" type="primary" v-if="his_config.is_open == 1" @click="toStatistics">统计表</el-button>
|
51
|
52
|
</div>
|
|
@@ -216,6 +217,8 @@
|
216
|
217
|
:value="item.id">
|
217
|
218
|
</el-option>
|
218
|
219
|
</el-select>
|
|
220
|
+
|
|
221
|
+ <el-button size="small" icon="el-icon-printer" @click="toPrintOne" type="primary">打印</el-button>
|
219
|
222
|
</div>
|
220
|
223
|
<el-table
|
221
|
224
|
:data="tableList"
|
|
@@ -437,7 +440,7 @@
|
437
|
440
|
schedule_type:0,
|
438
|
441
|
partion_type:0,
|
439
|
442
|
goodTypeList:[],
|
440
|
|
- his_config:"",
|
|
443
|
+ his_config:{},
|
441
|
444
|
startDialogVisibleOne:false,
|
442
|
445
|
type_name:false,
|
443
|
446
|
checkedOne:false,
|
|
@@ -500,12 +503,73 @@
|
500
|
503
|
methods: {
|
501
|
504
|
|
502
|
505
|
exportList(){
|
|
506
|
+ import('@/vendor/Export2Excel').then(excel => {
|
|
507
|
+
|
|
508
|
+ var arr= []
|
|
509
|
+
|
|
510
|
+ arr.push('序号')
|
|
511
|
+ arr.push('透析机号')
|
|
512
|
+ arr.push('姓名')
|
|
513
|
+ arr.push('透析号')
|
|
514
|
+
|
|
515
|
+ console.log("list23322323232",this.rowList)
|
|
516
|
+ if(this.rowList!=null && this.rowList.length > 0){
|
|
517
|
+ for(let i=0;i<this.rowList.length;i++){
|
|
518
|
+ arr.push(this.rowList[i].filed_name_cn)
|
|
519
|
+ }
|
|
520
|
+ }
|
|
521
|
+
|
|
522
|
+ arr.push("备注")
|
|
523
|
+ console.log("arr",arr)
|
503
|
524
|
|
|
525
|
+ var arrTwo = []
|
|
526
|
+ for(let i=0;i<arr.length;i++){
|
|
527
|
+ arrTwo.push('name'+i)
|
|
528
|
+ }
|
|
529
|
+ console.log("arrTwo",arrTwo)
|
|
530
|
+ const tHeader = arr
|
|
531
|
+ const filterVal = arrTwo
|
|
532
|
+
|
|
533
|
+ if(this.list!=null && this.list.length > 0){
|
|
534
|
+ for(let i=0;i<this.list.length;i++){
|
|
535
|
+ this.list[i].name0 = i+1
|
|
536
|
+ this.list[i].name1= this.list[i].device_number.number
|
|
537
|
+ this.list[i].name2 = this.list[i].patient.name
|
|
538
|
+ this.list[i].name3 = this.list[i].patient.dialysis_no
|
|
539
|
+ if(this.rowList!=null && this.rowList.length > 0){
|
|
540
|
+ for(let j=0;j<this.rowList.length;j++){
|
|
541
|
+ this.list[i]['name'+(j+4)] = this.getName(this.list[i].rowList[j].filed_name_cn,this.list[i].dialysis_solution)
|
|
542
|
+ this.list[i]['name'+(this.rowList.length+4)] = this.list[i].dialysis_solution.remark
|
|
543
|
+ }
|
|
544
|
+ }
|
|
545
|
+
|
|
546
|
+ }
|
|
547
|
+ }
|
|
548
|
+ console.log("list32232232323wi",this.list)
|
|
549
|
+ const data = this.formatJson(filterVal, this.list)
|
|
550
|
+ excel.export_json_to_excel({
|
|
551
|
+ header: tHeader,
|
|
552
|
+ data,
|
|
553
|
+ filename: '透析耗材查询'
|
|
554
|
+ })
|
|
555
|
+ this.downloadLoading = false
|
|
556
|
+ })
|
|
557
|
+ },
|
|
558
|
+ formatJson(filterVal, jsonData) {
|
|
559
|
+ return jsonData.map(v => filterVal.map(j => v[j]));
|
|
560
|
+ },
|
|
561
|
+ createKeys(arr){
|
|
562
|
+ const obj = {};
|
|
563
|
+ arr.forEach((value,index)=>{
|
|
564
|
+ obj['name' + index] = value;
|
|
565
|
+ })
|
|
566
|
+ return obj;
|
504
|
567
|
},
|
505
|
568
|
open(){
|
506
|
569
|
this.getlist()
|
507
|
570
|
},
|
508
|
571
|
getlist(){
|
|
572
|
+ console.log("paramsy2332322323",this.query)
|
509
|
573
|
getPatientDialysisSolutionGroupList(this.query).then(response=>{
|
510
|
574
|
if(response.data.state == 1){
|
511
|
575
|
var list = response.data.data.list
|
|
@@ -619,7 +683,6 @@
|
619
|
683
|
})
|
620
|
684
|
},
|
621
|
685
|
statistics() {
|
622
|
|
-
|
623
|
686
|
var params = {
|
624
|
687
|
schedule_type:this.schedule_type,
|
625
|
688
|
partion_type:this.partion_type,
|
|
@@ -1650,6 +1713,12 @@
|
1650
|
1713
|
}
|
1651
|
1714
|
|
1652
|
1715
|
return str
|
|
1716
|
+ },
|
|
1717
|
+ toPrint(){
|
|
1718
|
+ this.$router.push({path:'/dialysis/consumable/dialysisgoodprint?limit='+this.query.limit+"&page="+this.query.page+"&partition_id="+this.query.partition_id+"&schedule_date="+this.query.schedule_date+"&schedule_type="+this.query.schedule_type+"&keywords="+this.query.keywords})
|
|
1719
|
+ },
|
|
1720
|
+ toPrintOne(){
|
|
1721
|
+ this.$router.push({path:"/dialysis/consumable/dialysisgoodcountprint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_type+"&selected_date="+this.query.schedule_date+"&is_open="+this.his_config.is_open})
|
1653
|
1722
|
}
|
1654
|
1723
|
}
|
1655
|
1724
|
}
|