Browse Source

9月9,大冶的结算汇总

yq1 6 months ago
parent
commit
25fd2b04cb
1 changed files with 15 additions and 2 deletions
  1. 15 2
      src/xt_pages/outpatientTool/components/gather.vue

+ 15 - 2
src/xt_pages/outpatientTool/components/gather.vue View File

429
           }
429
           }
430
         }
430
         }
431
       }
431
       }
432
-
432
+      console.log('this.tableData',this.tableData);
433
+      
433
       let sameRowArr = [], sIdx = 0
434
       let sameRowArr = [], sIdx = 0
434
       this.tableData.forEach((item, index) => {
435
       this.tableData.forEach((item, index) => {
435
         item.index = index
436
         item.index = index
445
         }
446
         }
446
       })
447
       })
447
       this.sameRowArr = sameRowArr
448
       this.sameRowArr = sameRowArr
449
+      console.log('this.sameRowArr',this.sameRowArr);
450
+      
448
     }, merge({ row, column, rowIndex, columnIndex }) {
451
     }, merge({ row, column, rowIndex, columnIndex }) {
449
       if (columnIndex === 0 || columnIndex === 3) {
452
       if (columnIndex === 0 || columnIndex === 3) {
450
         const _row = this.tempArr[rowIndex]
453
         const _row = this.tempArr[rowIndex]
462
           sums[index] = '合计'
465
           sums[index] = '合计'
463
           return
466
           return
464
         }
467
         }
465
-        console.log(data)
468
+        console.log('data',data)
469
+        for(let i=0;i<data.length;i++){
470
+          for(let j=i+1;j<data.length;j++){
471
+            if(data[i].patient_id == data[j].patient_id){
472
+              data.splice(j,1)
473
+              j--
474
+            }
475
+          }
476
+        }
477
+        console.log('data111',data);
478
+        
466
         const values = data.map(item => Number(item[column.property]))
479
         const values = data.map(item => Number(item[column.property]))
467
         if (column.property === 'sum') {
480
         if (column.property === 'sum') {
468
           sums[index] = values.reduce((prev, curr) => {
481
           sums[index] = values.reduce((prev, curr) => {