浏览代码

哦那估计分析

huangyw 2 年前
父节点
当前提交
4ab6772654

+ 20 - 18
src/xt_pages/outpatientTool/components/detailStatistics.vue 查看文件

@@ -48,6 +48,7 @@
48 48
     <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
49 49
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
50 50
               max-height="600"
51
+              show-summary
51 52
               v-loading="detail_loading"
52 53
               highlight-current-row>
53 54
       <el-table-column type="index" label="序号" width="60px" align="center">
@@ -55,15 +56,15 @@
55 56
           {{scope.row.index}}
56 57
         </template>
57 58
       </el-table-column>
58
-      <el-table-column align="center" prop="name" label="处方日期">
59
+      <el-table-column align="center" label="处方日期">
59 60
         <template slot-scope="scope">{{getTime(scope.row.record_date)}}</template>
60 61
       </el-table-column>
61
-      <el-table-column align="center" prop="name" label="费用编码">
62
+      <el-table-column align="center" label="费用编码">
62 63
         <template slot-scope="scope">
63 64
           {{scope.row.number}}
64 65
         </template>
65 66
       </el-table-column>
66
-      <el-table-column align="center" prop="name" label="项目名称">
67
+      <el-table-column align="center" label="项目名称">
67 68
         <template slot-scope="scope">
68 69
           <span v-if="scope.row.advice_id > 0">{{scope.row.advice.advice_name}}</span>
69 70
           <span v-if="scope.row.project_id > 0">
@@ -72,7 +73,7 @@
72 73
           </span>
73 74
         </template>
74 75
       </el-table-column>
75
-      <el-table-column align="center" prop="name" label="规格">
76
+      <el-table-column align="center" label="规格">
76 77
         <template slot-scope="scope">
77 78
           <span v-if="scope.row.advice_id > 0">{{scope.row.advice.drug.dose}}{{scope.row.advice.drug.dose_unit}}*{{scope.row.advice.drug.min_number}}{{scope.row.advice.drug.min_unit}}/{{scope.row.advice.drug.max_unit}}</span>
78 79
           <span v-if="scope.row.project_id > 0">
@@ -81,12 +82,12 @@
81 82
           </span>
82 83
         </template>
83 84
       </el-table-column>
84
-      <el-table-column align="center" prop="name" label="数量">
85
+      <el-table-column align="center"  label="数量">
85 86
         <template slot-scope="scope">
86 87
           {{scope.row.cnt}}
87 88
         </template>
88 89
       </el-table-column>
89
-      <el-table-column align="center" prop="name" label="单位">
90
+      <el-table-column align="center" label="单位">
90 91
         <template slot-scope="scope">
91 92
           <span v-if="scope.row.advice_id > 0">{{scope.row.advice.prescribing_number_unit}}</span>
92 93
           <span v-if="scope.row.project_id > 0">
@@ -95,12 +96,12 @@
95 96
           </span>
96 97
         </template>
97 98
       </el-table-column>
98
-      <el-table-column align="center" prop="name" label="单价">
99
+      <el-table-column align="center" label="单价">
99 100
         <template slot-scope="scope">
100 101
           {{scope.row.pric}}
101 102
         </template>
102 103
       </el-table-column>
103
-      <el-table-column align="center" prop="name" label="金额">
104
+      <el-table-column align="center" label="金额" prop="total_price">
104 105
         <template slot-scope="scope">
105 106
           <div>
106 107
             {{scope.row.total_price}}
@@ -222,8 +223,8 @@ export default {
222 223
             obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
223 224
           }
224 225
           obj.total_price = (obj.total_price).toFixed(2)
225
-          this.tableData.push(obj)
226
-          console.log("tabledata23233232233232",this.tableData)
226
+          // this.tableData.push(obj)cccc
227
+          // console.log("tabledata23233232233232",this.tableData)
227 228
           var new_arr = []
228 229
        
229 230
           if(this.keywords!=""){
@@ -250,10 +251,11 @@ export default {
250 251
             }
251 252
             var objs = {index:"合计",total_price:0,record_date:"0"}
252 253
             objs.total_price = this.getPrice(new_arr)
253
-            new_arr.push(objs)
254
+            // new_arr.push(objs)
254 255
             
255 256
             this.tableData = new_arr
256 257
           }
258
+
257 259
            if(this.id == 1){
258 260
               var obj = {index:"合计",total_price:0,record_date:"0"}
259 261
               var new_arr = []
@@ -266,7 +268,7 @@ export default {
266 268
               }
267 269
               this.tableData = []
268 270
               obj.total_price = this.getPrice(new_arr)
269
-              new_arr.push(obj)
271
+              // new_arr.push(obj)
270 272
               this.tableData = new_arr
271 273
            }
272 274
           if(this.id == 2){
@@ -284,8 +286,8 @@ export default {
284 286
             console.log("项目new_arr",new_arr)
285 287
             this.tableData = []
286 288
             obj.total_price = this.getPrice(new_arr)
287
-            console.log("ar3233223232",new_arr)
288
-            new_arr.push(obj)
289
+            // console.log("ar3233223232",new_arr)
290
+            // new_arr.push(obj)
289 291
             this.tableData = new_arr
290 292
             }
291 293
 
@@ -303,15 +305,15 @@ export default {
303 305
             }
304 306
             this.tableData = []
305 307
             obj.total_price = this.getPrice(new_arr)
306
-            new_arr.push(obj)
307
-            console.log("new_arr2332323232",new_arr)
308
+            // new_arr.push(obj)
309
+            // console.log("new_arr2332323232",new_arr)
308 310
             this.tableData = new_arr
309 311
           }          
310 312
        }
311 313
      })
312 314
     },
313 315
     getAllPice(){
314
-     console.log("表哥233323232323223",this.tableData)
316
+    //  console.log("表哥233323232323223",this.tableData)
315 317
       var total_price = 0
316 318
       for(let i=0;i<this.tableData.length;i++){
317 319
         if(this.tableData[i].index =="合计"){
@@ -321,7 +323,7 @@ export default {
321 323
       return total_price
322 324
     },
323 325
     getActPay(){
324
-      console.log("list2332323232323232",this.list)
326
+      // console.log("list2332323232323232",this.list)
325 327
       var act_pay = 0
326 328
       for(let i=0;i<this.list.length;i++){
327 329
         for(let j=0;j<this.list[i].orders.length;j++){

+ 13 - 12
src/xt_pages/outpatientTool/components/gatherStatistics.vue 查看文件

@@ -49,17 +49,18 @@
49 49
     <el-table :data="tableList" border :row-style="{ color: '#303133' }" ref="table"
50 50
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
51 51
               max-height="600"
52
+              show-summary
52 53
               v-loading="detail_loading"
53 54
               highlight-current-row>
54 55
       <el-table-column type="index" label="序号" width="60px" align="center">
55 56
            <template slot-scope="scope">{{scope.row.index}}</template>
56 57
       </el-table-column>
57
-      <el-table-column align="center" prop="name" label="处方日期">
58
+      <el-table-column align="center" label="处方日期">
58 59
         <template slot-scope="scope">
59 60
           <span v-if="scope.row.record_date > 0">{{getTimes(scope.row.record_date)}} </span> 
60 61
         </template>
61 62
       </el-table-column>
62
-      <el-table-column align="center" prop="name" label="费用分类">
63
+      <el-table-column align="center" label="费用分类">
63 64
         <template slot-scope="scope">
64 65
            <span v-if="scope.row.type == 1">
65 66
               {{getAdviceMedChrgintmType(scope.row.name)}}
@@ -72,34 +73,34 @@
72 73
            </span>
73 74
         </template>
74 75
       </el-table-column>
75
-      <el-table-column align="center" prop="name" label="项目名称">
76
+      <el-table-column align="center" label="项目名称">
76 77
         <template slot-scope="scope">
77 78
           <span>{{scope.row.name}}</span>
78 79
         </template>
79 80
       </el-table-column>
80
-      <el-table-column align="center" prop="name" label="规格型号">
81
+      <el-table-column align="center" label="规格型号">
81 82
         <template slot-scope="scope">
82 83
           {{ scope.row.spec }}
83 84
         </template>
84 85
       </el-table-column>
85
-      <el-table-column align="center" prop="name" label="数量">
86
+      <el-table-column align="center" label="数量">
86 87
         <template slot-scope="scope">
87 88
           {{ scope.row.count }}
88 89
           {{ scope.row.unit }}
89 90
         </template>
90 91
       </el-table-column>
91
-      <el-table-column align="center" prop="name" label="单价">
92
+      <el-table-column align="center" label="单价">
92 93
         <template slot-scope="scope">
93 94
           {{scope.row.price}}
94 95
         </template>
95 96
       </el-table-column>
96
-      <el-table-column align="center" prop="name" label="金额">
97
+      <el-table-column align="center" label="金额" prop="total_all">
97 98
         <template slot-scope="scope">
98 99
           <span v-if="scope.row.is_total == 1">{{ scope.row.total }}</span>  
99 100
           <span v-if="scope.row.is_total == 2">{{ (scope.row.price * scope.row.count).toFixed(2) }}</span>  
100 101
         </template>
101 102
       </el-table-column>
102
-      <el-table-column align="center" prop="name" label="医保类别">
103
+      <el-table-column align="center" label="医保类别">
103 104
         <template slot-scope="scope">
104 105
          <span v-if="balanceAccountsType == 2">{{getChrgitmLv(scope.row.chrgitm_lv)}}</span>
105 106
 
@@ -217,7 +218,7 @@ export default {
217 218
         }
218 219
         var obj ={index:"合计",is_total:1,total:0}
219 220
         obj.total = this.getPrice(new_arr)
220
-        new_arr.push(obj)
221
+        // new_arr.push(obj)
221 222
         this.tableList = []
222 223
         this.tableList = new_arr
223 224
       }else{
@@ -863,10 +864,10 @@ export default {
863 864
       objOne.total = this.getTotalPrice(this.tableList)
864 865
       for(let i=0;i<this.tableList.length;i++){
865 866
         this.tableList[i].index = i + 1
867
+        this.tableList[i].total_all = (this.tableList[i].count * this.tableList[i].price).toFixed(2)
868
+        // console.log(this.tableList[i].count,'opop')
866 869
       }
867
-      this.tableList.push(objOne)
868
-
869
-      console.log("hh2323323232322323233223",this.tableList)
870
+      // this.tableList.push(objOne)
870 871
     },
871 872
 
872 873
     getTotalPrice(val){