Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN 2 years ago
parent
commit
f652ef6924

+ 20 - 18
src/xt_pages/outpatientTool/components/detailStatistics.vue View File

48
     <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
48
     <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
49
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
49
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
50
               max-height="600"
50
               max-height="600"
51
+              show-summary
51
               v-loading="detail_loading"
52
               v-loading="detail_loading"
52
               highlight-current-row>
53
               highlight-current-row>
53
       <el-table-column type="index" label="序号" width="60px" align="center">
54
       <el-table-column type="index" label="序号" width="60px" align="center">
55
           {{scope.row.index}}
56
           {{scope.row.index}}
56
         </template>
57
         </template>
57
       </el-table-column>
58
       </el-table-column>
58
-      <el-table-column align="center" prop="name" label="处方日期">
59
+      <el-table-column align="center" label="处方日期">
59
         <template slot-scope="scope">{{getTime(scope.row.record_date)}}</template>
60
         <template slot-scope="scope">{{getTime(scope.row.record_date)}}</template>
60
       </el-table-column>
61
       </el-table-column>
61
-      <el-table-column align="center" prop="name" label="费用编码">
62
+      <el-table-column align="center" label="费用编码">
62
         <template slot-scope="scope">
63
         <template slot-scope="scope">
63
           {{scope.row.number}}
64
           {{scope.row.number}}
64
         </template>
65
         </template>
65
       </el-table-column>
66
       </el-table-column>
66
-      <el-table-column align="center" prop="name" label="项目名称">
67
+      <el-table-column align="center" label="项目名称">
67
         <template slot-scope="scope">
68
         <template slot-scope="scope">
68
           <span v-if="scope.row.advice_id > 0">{{scope.row.advice.advice_name}}</span>
69
           <span v-if="scope.row.advice_id > 0">{{scope.row.advice.advice_name}}</span>
69
           <span v-if="scope.row.project_id > 0">
70
           <span v-if="scope.row.project_id > 0">
72
           </span>
73
           </span>
73
         </template>
74
         </template>
74
       </el-table-column>
75
       </el-table-column>
75
-      <el-table-column align="center" prop="name" label="规格">
76
+      <el-table-column align="center" label="规格">
76
         <template slot-scope="scope">
77
         <template slot-scope="scope">
77
           <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
           <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
           <span v-if="scope.row.project_id > 0">
79
           <span v-if="scope.row.project_id > 0">
81
           </span>
82
           </span>
82
         </template>
83
         </template>
83
       </el-table-column>
84
       </el-table-column>
84
-      <el-table-column align="center" prop="name" label="数量">
85
+      <el-table-column align="center"  label="数量">
85
         <template slot-scope="scope">
86
         <template slot-scope="scope">
86
           {{scope.row.cnt}}
87
           {{scope.row.cnt}}
87
         </template>
88
         </template>
88
       </el-table-column>
89
       </el-table-column>
89
-      <el-table-column align="center" prop="name" label="单位">
90
+      <el-table-column align="center" label="单位">
90
         <template slot-scope="scope">
91
         <template slot-scope="scope">
91
           <span v-if="scope.row.advice_id > 0">{{scope.row.advice.prescribing_number_unit}}</span>
92
           <span v-if="scope.row.advice_id > 0">{{scope.row.advice.prescribing_number_unit}}</span>
92
           <span v-if="scope.row.project_id > 0">
93
           <span v-if="scope.row.project_id > 0">
95
           </span>
96
           </span>
96
         </template>
97
         </template>
97
       </el-table-column>
98
       </el-table-column>
98
-      <el-table-column align="center" prop="name" label="单价">
99
+      <el-table-column align="center" label="单价">
99
         <template slot-scope="scope">
100
         <template slot-scope="scope">
100
           {{scope.row.pric}}
101
           {{scope.row.pric}}
101
         </template>
102
         </template>
102
       </el-table-column>
103
       </el-table-column>
103
-      <el-table-column align="center" prop="name" label="金额">
104
+      <el-table-column align="center" label="金额" prop="total_price">
104
         <template slot-scope="scope">
105
         <template slot-scope="scope">
105
           <div>
106
           <div>
106
             {{scope.row.total_price}}
107
             {{scope.row.total_price}}
233
             obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
234
             obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
234
           }
235
           }
235
           obj.total_price = (obj.total_price).toFixed(2)
236
           obj.total_price = (obj.total_price).toFixed(2)
236
-          this.tableData.push(obj)
237
-          console.log("tabledata23233232233232",this.tableData)
237
+          // this.tableData.push(obj)cccc
238
+          // console.log("tabledata23233232233232",this.tableData)
238
           var new_arr = []
239
           var new_arr = []
239
        
240
        
240
           if(this.keywords!=""){
241
           if(this.keywords!=""){
261
             }
262
             }
262
             var objs = {index:"合计",total_price:0,record_date:"0"}
263
             var objs = {index:"合计",total_price:0,record_date:"0"}
263
             objs.total_price = this.getPrice(new_arr)
264
             objs.total_price = this.getPrice(new_arr)
264
-            new_arr.push(objs)
265
+            // new_arr.push(objs)
265
             
266
             
266
             this.tableData = new_arr
267
             this.tableData = new_arr
267
           }
268
           }
269
+
268
            if(this.id == 1){
270
            if(this.id == 1){
269
               var obj = {index:"合计",total_price:0,record_date:"0"}
271
               var obj = {index:"合计",total_price:0,record_date:"0"}
270
               var new_arr = []
272
               var new_arr = []
277
               }
279
               }
278
               this.tableData = []
280
               this.tableData = []
279
               obj.total_price = this.getPrice(new_arr)
281
               obj.total_price = this.getPrice(new_arr)
280
-              new_arr.push(obj)
282
+              // new_arr.push(obj)
281
               this.tableData = new_arr
283
               this.tableData = new_arr
282
            }
284
            }
283
           if(this.id == 2){
285
           if(this.id == 2){
295
             console.log("项目new_arr",new_arr)
297
             console.log("项目new_arr",new_arr)
296
             this.tableData = []
298
             this.tableData = []
297
             obj.total_price = this.getPrice(new_arr)
299
             obj.total_price = this.getPrice(new_arr)
298
-            console.log("ar3233223232",new_arr)
299
-            new_arr.push(obj)
300
+            // console.log("ar3233223232",new_arr)
301
+            // new_arr.push(obj)
300
             this.tableData = new_arr
302
             this.tableData = new_arr
301
             }
303
             }
302
 
304
 
314
             }
316
             }
315
             this.tableData = []
317
             this.tableData = []
316
             obj.total_price = this.getPrice(new_arr)
318
             obj.total_price = this.getPrice(new_arr)
317
-            new_arr.push(obj)
318
-            console.log("new_arr2332323232",new_arr)
319
+            // new_arr.push(obj)
320
+            // console.log("new_arr2332323232",new_arr)
319
             this.tableData = new_arr
321
             this.tableData = new_arr
320
           }          
322
           }          
321
        }
323
        }
322
      })
324
      })
323
     },
325
     },
324
     getAllPice(){
326
     getAllPice(){
325
-     console.log("表哥233323232323223",this.tableData)
327
+    //  console.log("表哥233323232323223",this.tableData)
326
       var total_price = 0
328
       var total_price = 0
327
       for(let i=0;i<this.tableData.length;i++){
329
       for(let i=0;i<this.tableData.length;i++){
328
         if(this.tableData[i].index =="合计"){
330
         if(this.tableData[i].index =="合计"){
332
       return total_price
334
       return total_price
333
     },
335
     },
334
     getActPay(){
336
     getActPay(){
335
-      console.log("list2332323232323232",this.list)
337
+      // console.log("list2332323232323232",this.list)
336
       var act_pay = 0
338
       var act_pay = 0
337
       for(let i=0;i<this.list.length;i++){
339
       for(let i=0;i<this.list.length;i++){
338
         for(let j=0;j<this.list[i].orders.length;j++){
340
         for(let j=0;j<this.list[i].orders.length;j++){

+ 13 - 12
src/xt_pages/outpatientTool/components/gatherStatistics.vue View File

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