Browse Source

518合并代码

XMLWAN 2 years ago
parent
commit
d6821fc3df

+ 8 - 0
src/api/his/his_tools.js View File

@@ -14,3 +14,11 @@ export function getHisSummaryDetailList(params) {
14 14
     params: params
15 15
   })
16 16
 }
17
+
18
+export function getGatherDetailList(params) {
19
+  return request({
20
+    url: '/api/his/getgatherdetailist',
21
+    method: 'get',
22
+    params: params
23
+  })
24
+}

+ 29 - 33
src/xt_pages/outpatientTool/components/detailStatistics.vue View File

@@ -45,14 +45,12 @@
45 45
     </div>
46 46
     <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
47 47
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
48
-              show-summary
49 48
               max-height="600"
50
-              :summary-method="getSummaries"
51 49
               v-loading="detail_loading"
52 50
               highlight-current-row>
53 51
       <el-table-column type="index" label="序号" width="60px" align="center">
54 52
         <template slot-scope="scope">
55
-          {{scope.$index + 1}}
53
+          {{scope.row.index}}
56 54
         </template>
57 55
       </el-table-column>
58 56
       <el-table-column align="center" prop="name" label="处方日期">
@@ -94,12 +92,17 @@
94 92
       <el-table-column align="center" prop="name" label="金额">
95 93
         <template slot-scope="scope">
96 94
           <div>
97
-            {{(scope.row.cnt * scope.row.pric).toFixed(2)}}
95
+            {{scope.row.total_price}}
98 96
           </div>
99 97
         </template>
100 98
       </el-table-column>
101
-
99
+     
102 100
     </el-table>
101
+     <div>总费用:{{getAllPice()}}</div>
102
+     <div>个人支付:</div>
103
+     <div>基金支付记账:</div>
104
+     <div>补充医疗支付记账:</div>
105
+    <div>救助支付金额:</div>
103 106
   </div>
104 107
 
105 108
   <!-- </div> -->
@@ -146,35 +149,8 @@ export default {
146 149
     }
147 150
   },
148 151
   methods: {
149
-    getSummaries(param) {
150
-      
151
-        const { columns, data } = param;
152
-        const sums = [];
153
-        columns.forEach((column, index) => {
154
-          console.log("column233232323232",column)
155
-          if (index === 0) {
156
-            sums[index] = '总价';
157
-            return;
158
-          }
159
-          const values = data.map(item => Number(item[column.property]));
160
-          if (!values.every(value => isNaN(value))) {
161
-            sums[index] = values.reduce((prev, curr) => {
162
-              const value = Number(curr);
163
-              if (!isNaN(value)) {
164
-                return prev + curr;
165
-              } else {
166
-                return prev;
167
-              }
168
-            }, 0);
169
-            sums[index] += ' 元';
170
-          } else {
171
-            sums[index] = 'N/A';
172
-          }
173
-        });
174
-        return sums;
175
-    },
176 152
     getTime(val) {
177
-      if(val < 0){
153
+      if(val <= 0){
178 154
         return ""
179 155
       }
180 156
       if(val == ""){
@@ -217,10 +193,30 @@ export default {
217 193
                }
218 194
             }
219 195
           }
196
+          var obj = {index:"合计",total_price:0,record_date:"0"}
197
+          for(let i=0;i<this.tableData.length;i++){
198
+            this.tableData[i].index = i+1
199
+            this.tableData[i].total_price = 0
200
+            this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
201
+            obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
202
+          }
203
+          obj.total_price = (obj.total_price).toFixed(2)
204
+          this.tableData.push(obj)
205
+          
220 206
           console.log("tabledata",this.tableData)
221 207
        }
222 208
      })
223 209
     },
210
+    getAllPice(){
211
+      console.log("hhhhh",this.tableData)
212
+      var total_price = 0
213
+      for(let i=0;i<this.tableData.length;i++){
214
+        if(this.tableData[i].index =="合计"){
215
+          total_price = this.tableData[i].total_price
216
+        }
217
+      }
218
+      return total_price
219
+    }
224 220
   },
225 221
   created() {
226 222
    // this.getHisSummaryDetailList()

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

@@ -51,26 +51,26 @@
51 51
               highlight-current-row>
52 52
       <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
53 53
       <el-table-column align="center" prop="name" label="处方日期">
54
-        <template slot-scope="scope">{{  }}</template>
54
+        <template slot-scope="scope"></template>
55 55
       </el-table-column>
56 56
       <el-table-column align="center" prop="name" label="费用分类">
57
-        <template slot-scope="scope">{{scope.row.code}}</template>
57
+        <template slot-scope="scope"></template>
58 58
       </el-table-column>
59 59
       <el-table-column align="center" prop="name" label="项目名称">
60
-        <template slot-scope="scope">{{scope.row.item_name}}</template>
60
+        <template slot-scope="scope"></template>
61 61
       </el-table-column>
62 62
       <el-table-column align="center" prop="name" label="规格型号">
63
-        <template slot-scope="scope">{{scope.row.item_spec}}</template>
63
+        <template slot-scope="scope"></template>
64 64
       </el-table-column>
65 65
       <el-table-column align="center" prop="name" label="数量">
66
-        <template slot-scope="scope">{{scope.row.count}}</template>
66
+        <template slot-scope="scope"></template>
67 67
       </el-table-column>
68 68
       <el-table-column align="center" prop="name" label="单价">
69
-        <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
69
+        <template slot-scope="scope"></template>
70 70
       </el-table-column>
71 71
       <el-table-column align="center" prop="name" label="金额">
72 72
         <template slot-scope="scope">
73
-          <div>{{(scope.row.price.toFixed(2)*scope.row.count).toFixed(2)}}</div>
73
+          <div></div>
74 74
         </template>
75 75
       </el-table-column>
76 76
       <el-table-column align="center" prop="name" label="医保类别">
@@ -79,14 +79,12 @@
79 79
 
80 80
     </el-table>
81 81
   </div>
82
-
83
-  <!-- </div> -->
84 82
 </template>
85 83
 
86 84
 
87 85
 <script>
88 86
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
89
-import {  } from '@/api/his/his'
87
+import { getGatherDetailList } from '@/api/his/his_tools'
90 88
 const moment = require('moment')
91 89
 export default {
92 90
   components: {
@@ -133,7 +131,7 @@ export default {
133 131
     changeItem() {
134 132
       this.getSummaryDetailList()
135 133
     },
136
-    getSummaryDetailList() {
134
+    getGatherDetailList() {
137 135
       let start_time = this.chargeDate[0]
138 136
       let end_time = this.chargeDate[1]
139 137
       let params = {
@@ -143,13 +141,20 @@ export default {
143 141
         type: this.item_type,
144 142
         keyword: this.keywords
145 143
       }
146
-
144
+     getGatherDetailList(params).then(response=>{
145
+       if(response.data.state == 1){
146
+         var detailList = response.data.data.detailList
147
+         console.log("detailist232323322332",detailList)
148
+         var list = response.data.data.list
149
+         console.log("list233223232323",list)
150
+       }
151
+     })
147 152
 
148 153
 
149 154
     },
150 155
   },
151 156
   created() {
152
-    this.getSummaryDetailList()
157
+    this.getGatherDetailList()
153 158
 
154 159
   }
155 160
 }

+ 19 - 3
src/xt_pages/stock/stockBatchNumber.vue View File

@@ -5,9 +5,9 @@
5 5
     </div>
6 6
     <div class="app-container ">
7 7
       <div class="cell clearfix">
8
-        耗材名称:{{this.$route.query.good_name}} &nbsp;
8
+        耗材名称:{{getGoodName(this.$route.query.id)}} &nbsp;
9 9
         库存:{{this.$route.query.overCount}}{{packing_unit}} &nbsp;
10
-        规格:{{this.$route.query.specification_name}} &nbsp;
10
+        规格:{{getSpecName(this.$route.query.id)}} &nbsp;
11 11
         厂家:{{this.$route.query.manufacturer}} 
12 12
       </div>
13 13
       <div class="cell clearfix">
@@ -189,6 +189,7 @@
189 189
         packing_unit:"",
190 190
         cancelCountList:[],
191 191
         houseList:[],
192
+        good:{}
192 193
       }
193 194
     },
194 195
     methods:{
@@ -259,6 +260,7 @@
259 260
            var manufacturerList = response.data.data.manufacturerList
260 261
            this.manufacturerList = manufacturerList
261 262
            this.houseList = response.data.data.houseList
263
+           this.good = response.data.data.good
262 264
          }
263 265
       })
264 266
      },
@@ -345,7 +347,21 @@
345 347
         }
346 348
         return storehouse_name
347 349
      },
348
-      
350
+     getGoodName(id){
351
+       
352
+       var good_name =  ""
353
+       if(id == this.good.id){
354
+         good_name = this.good.good_name
355
+       }
356
+       return good_name
357
+     },
358
+     getSpecName(id){
359
+       var specification_name = ""
360
+       if(id == this.good.id){
361
+         specification_name = this.good.specification_name
362
+       }
363
+       return specification_name
364
+     }
349 365
 
350 366
     }
351 367
   }

+ 17 - 2
src/xt_pages/stock/stockFlow.vue View File

@@ -5,10 +5,10 @@
5 5
     </div>
6 6
     <div class="app-container ">
7 7
       <div class="cell clearfix">
8
-       耗材名称:{{this.$route.query.good_name}} &nbsp;
8
+       耗材名称:{{getGoodName(this.$route.query.id)}} &nbsp;
9 9
        库存: {{this.$route.query.overCount}}{{packing_unit}} &nbsp;
10 10
        规格:{{this.$route.query.specification_name}} &nbsp;
11
-       厂家:{{this.$route.query.manufacturer}} 
11
+       厂家:{{getSpecName(this.$route.query.id)}}
12 12
       </div>
13 13
       <div class="cell clearfix">
14 14
         <span>日期查询:</span>
@@ -451,6 +451,21 @@
451 451
         }
452 452
         return storehouse_name
453 453
      },
454
+     getGoodName(id){
455
+       
456
+       var good_name =  ""
457
+       if(id == this.good.id){
458
+         good_name = this.good.good_name
459
+       }
460
+       return good_name
461
+     },
462
+     getSpecName(id){
463
+       var specification_name = ""
464
+       if(id == this.good.id){
465
+         specification_name = this.good.specification_name
466
+       }
467
+       return specification_name
468
+     }
454 469
     }
455 470
   }
456 471
 </script>

+ 3 - 2
src/xt_pages/stock/stockQuery.vue View File

@@ -575,7 +575,8 @@ export default {
575 575
       var overCount  = this.getOverplus(val.xt_warehouse_info)
576 576
       window.sessionStorage.setItem('start_time',this.start_time)
577 577
       window.sessionStorage.setItem('end_time',this.end_time)
578
-      this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name+"&specification_name="+specification_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
578
+      console.log("val3234243423324324234",val.id)
579
+      this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
579 580
     },
580 581
     toClickOne(val){
581 582
        var manufacturer_name = ""
@@ -589,7 +590,7 @@ export default {
589 590
       var overCount  = this.getOverplus(val.xt_warehouse_info)
590 591
       window.sessionStorage.setItem('start_time',this.start_time)
591 592
       window.sessionStorage.setItem('end_time',this.end_time)
592
-      this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name+"&specification_name="+specification_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
593
+      this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
593 594
     },
594 595
     getStockDrugCount(){
595 596
         var params ={