Browse Source

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 1 month ago
parent
commit
ccb4a30c06

+ 46 - 2
src/xt_pages/Pharmacy/drugCode.vue View File

@@ -8,7 +8,7 @@
8 8
           v-model="start_time"
9 9
           prefix-icon="el-icon-date"
10 10
           :editable="false"
11
-          style="width: 196px;"
11
+          style="width: 150px;"
12 12
           type="date"
13 13
           placeholder="选择日期时间"
14 14
           align="right"
@@ -23,7 +23,7 @@
23 23
           v-model="end_time"
24 24
           prefix-icon="el-icon-date"
25 25
           :editable="false"
26
-          style="width: 196px;margin-right:10px;"
26
+          style="width: 150px;margin-right:10px;"
27 27
           type="date"
28 28
           placeholder="选择日期时间"
29 29
           align="right"
@@ -33,6 +33,15 @@
33 33
       </div>
34 34
 
35 35
 
36
+      <div style="width:150px;">
37
+        <el-input  style="width: 150px"
38
+                   v-model="keywords" @input="searchAction"
39
+                   @keyup.enter.native="searchAction"
40
+                   class="filter-item" placeholder="请输入患者姓名"
41
+        />
42
+      </div>
43
+
44
+
36 45
       <div>
37 46
         <div>上传状态:
38 47
           <el-select size="small" v-model="is_sale" placeholder="请选择" style="width:100px;" @change="changeStock">
@@ -57,8 +66,24 @@
57 66
             </el-option>
58 67
           </el-select>
59 68
         </div>
69
+
70
+
71
+          <div>是否有溯源码:
72
+            <el-select size="small" v-model="is_code" placeholder="请选择" style="width:100px;" @change="changeCode">
73
+              <el-option
74
+                v-for="item,index in code_items"
75
+                :key="index"
76
+                :label="item.name"
77
+                :value="item.id">
78
+              </el-option>
79
+            </el-select>
80
+          </div>
60 81
       </div>
61 82
 
83
+
84
+
85
+
86
+
62 87
       <div>
63 88
         <el-button type="primary" @click="batchUpload()">批量上传</el-button>
64 89
         <el-button type="primary" @click="query()">查询</el-button>
@@ -199,18 +224,26 @@ export default {
199 224
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
200 225
       end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
201 226
       is_settle:"0",
227
+      is_code:"0",
202 228
       tableData: [],
203 229
       change_type: "3",
204 230
       selection: [],
205 231
       page: 1,
206 232
       limit: 10,
207 233
       value: 0,
234
+      keywords:"",
208 235
       is_sale: "0",
209 236
       items: [
210 237
         {id: "0", name: '全部'},
211 238
         {id: "1", name: '已上传'},
212 239
         {id: "2", name: '未上传'},
213 240
       ],
241
+      code_items:[
242
+        {id: "0", name: '全部'},
243
+        {id: "2", name: '有溯源码'},
244
+        {id: "1", name: '无溯源码'},
245
+
246
+      ],
214 247
       settle_items: [
215 248
         {id: "0", name: '全部'},
216 249
         {id: "2", name: '已结算'},
@@ -232,6 +265,11 @@ export default {
232 265
     }
233 266
   },
234 267
   methods: {
268
+    searchAction() {
269
+      this.page = 1
270
+
271
+      this.getlist()
272
+    },
235 273
     toUpload(row) {
236 274
       if (row.drug_code.length == 0) {
237 275
         this.$message.error("追溯码不能为空");
@@ -595,6 +633,8 @@ export default {
595 633
         limit: this.limit,
596 634
         is_sale: this.is_sale,
597 635
         is_settle:this.is_settle,
636
+        is_code:this.is_code,
637
+        keywords:this.keywords,
598 638
 
599 639
       }
600 640
       getHisDrugCodeQueryList(params).then(response => {
@@ -610,6 +650,10 @@ export default {
610 650
           this.is_open = response.data.data.codeConfig.is_open
611 651
         }
612 652
       })
653
+    },changeCode(val){
654
+      this.is_code = val
655
+      this.getlist()
656
+
613 657
     },changeSettle(val){
614 658
 
615 659
       this.is_settle = val

+ 11 - 4
src/xt_pages/drugSourceCode/drugCodeQuery.vue View File

@@ -84,6 +84,8 @@
84 84
           </template>
85 85
         </el-table-column>
86 86
 
87
+
88
+
87 89
         <el-table-column align="center" prop="name" label="发药状态">
88 90
           <template slot-scope="scope">
89 91
             <div v-if="scope.row.is_medicine == 1">已发药</div>
@@ -91,12 +93,19 @@
91 93
           </template>
92 94
         </el-table-column>
93 95
 
96
+
97
+        <el-table-column align="center" prop="name" label="结算状态">
98
+          <template slot-scope="scope">
99
+            <div v-if="scope.row.pre.order_status == 2">已结算</div>
100
+            <div v-if="scope.row.pre.order_status != 2">未结算</div>
101
+          </template>
102
+        </el-table-column>
103
+
94 104
         <el-table-column align="center" prop="name" label="操作" width="200">
95 105
           <template slot-scope="scope">
96 106
             <div>
97 107
              <el-button v-if="scope.row.is_upload == 1" type="primary" @click="revokeDrugCode(scope.row)">撤销</el-button>
98 108
             <el-button type="primary" v-if="scope.row.is_upload == 0" @click="toUpload(scope.row)">上传</el-button>
99
-<!--            <el-button v-if="faShow == true" type="primary" @click="toFaYao(scope.row)">发药</el-button>-->
100 109
             </div>
101 110
           </template>
102 111
         </el-table-column>
@@ -115,8 +124,6 @@
115 124
 
116 125
 
117 126
 
118
-
119
-
120 127
       <el-dialog
121 128
         title="药品追溯码"
122 129
         :visible.sync="dialogVisibleOne"
@@ -453,7 +460,7 @@
453 460
           } else {
454 461
 
455 462
             //有打开则调用接口
456
-            axios.get('http://127.0.0.1:9532/api/delete_xs_bg_three',{params:params}).then(function(response) {
463
+            axios.get('http://127.0.0.1:9532/api/changedrug/five',{params:params}).then(function(response) {
457 464
               if (response.data.state == 0) {
458 465
                 that.$message.error(response.data.data.msg);
459 466
                 return false

+ 384 - 7
src/xt_pages/outpatientCharges/statementPrint.vue View File

@@ -65,7 +65,7 @@
65 65
       <!-- 广水原生堂 -->
66 66
       <printfourteen :info="info" v-if="(org_id == 10088 ) && this.paramsObj.balance_accounts_type == 1"></printfourteen>
67 67
       <!-- 盱眙恒硕 -->
68
-      <printfivetheen :info="info" v-if="org_id == 10633"></printfivetheen>
68
+      <printfivetheen :info="info" v-if="org_id == 10633 || org_id == 0"></printfivetheen>
69 69
       <!-- 顺有好 -->
70 70
       <printSixtheen :info="info" v-if="org_id == 10697"></printSixtheen>
71 71
       <!-- 杏康 -->
@@ -76,13 +76,9 @@
76 76
             org_id != 10610 && org_id !=10537 && org_id !=10697 &&
77 77
             org_id != 10278 && org_id != 10387 && org_id != 10191 &&
78 78
             org_id != 10210 &&org_id != 10485 &&org_id != 10480 &&
79
-            org_id != 10510 &&org_id != 10088 && org_id != 10721 &&org_id != 10633 &&org_id != 10731 && org_id != 10726 && this.paramsObj.balance_accounts_type == 1">
79
+            org_id != 10510 &&org_id != 10088 && org_id != 10721 &&org_id != 0 &&org_id != 10633 &&org_id != 10731 && org_id != 10726 && this.paramsObj.balance_accounts_type == 1">
80 80
       </printOne>
81
-      <privateChargePrint :info="info" v-if="org_id != 9990 &&
82
-            org_id != 10138 && org_id != 9504 &&  org_id != 10028 && org_id !=10697 &&
83
-            org_id != 10278 && org_id != 10610 && org_id !=10537 && org_id != 10387 &&
84
-            org_id != 10191 &&org_id != 10210 &&org_id != 10485  &&org_id != 10480 &&
85
-            org_id != 10510 &&org_id != 10633 && org_id != 10721 && org_id != 10726  && this.paramsObj.balance_accounts_type == 2">
81
+      <privateChargePrint :info="info" v-if="this.paramsObj.balance_accounts_type == 2">
86 82
       </privateChargePrint>
87 83
     </div>
88 84
   </div>
@@ -2203,6 +2199,387 @@ export default {
2203 2199
 
2204 2200
 
2205 2201
 
2202
+          } else if(this.org_id == 10633 || this.org_id == 0){
2203
+            let params = {
2204
+              order_id: obj.order_id,
2205
+              admin_user_id: this.$store.getters.xt_user.user.id
2206
+            }
2207
+            getPrivateExpensesOrder(params).then((response) => {
2208
+              if (response.data.state == 0) {
2209
+                // this.$message.error(response.data.msg)
2210
+
2211
+                return false
2212
+              } else {
2213
+                var that = this
2214
+                that.info = response.data.data.info
2215
+                that.p_admin = response.data.data.printor_admin
2216
+                that.charge_admin = response.data.data.charge_admin
2217
+                that.info['new_order'] = response.data.data.info
2218
+                that.info['p_admin'] = that.p_admin
2219
+                that.info['charge_admin'] = that.charge_admin
2220
+                that.info['order_number'] = response.data.data.order_number
2221
+                that.info['patient'] = response.data.data.patient
2222
+                that.info['date'] = response.data.data.date
2223
+                that.info['number'] = response.data.data.number
2224
+                that.info['order_infos'] = response.data.data.order_infos
2225
+                that.info['diagnosis'] = response.data.data.diagnosis
2226
+                that.info['fixmedins_name'] = response.data.data.org_name
2227
+                that.info['fixmedins_code'] = response.data.data.org_code
2228
+                // that.info["doctor_code"] = response.data.data.doctor_code;
2229
+                // that.info["department"] = response.data.data.department;
2230
+                // that.info["health_card_no"] = response.data.data.health_card_no;
2231
+
2232
+                that.info['bed_cost_total'] = response.data.data.bedCostTotal
2233
+                that.info['bed_cost_self_total'] =
2234
+                  response.data.data.bedCostSelfTotal
2235
+                that.info['bed_cost_part_self_total'] =
2236
+                  response.data.data.bedCostPartSelfTotal
2237
+
2238
+                that.info['operation_cost_total'] =
2239
+                  response.data.data.operationCostTotal
2240
+                that.info['operation_cost_self_total'] =
2241
+                  response.data.data.operationCostSelfTotal
2242
+                that.info['operation_cost_part_self_total'] =
2243
+                  response.data.data.operationCostPartSelfTotal
2244
+
2245
+                that.info['other_cost_total'] = response.data.data.otherCostTotal
2246
+                that.info['other_cost_self_total'] =
2247
+                  response.data.data.otherCostSelfTotal
2248
+                that.info['other_cost_part_self_total'] =
2249
+                  response.data.data.otherCostPartSelfTotal
2250
+
2251
+                that.info['material_cost_total'] =
2252
+                  response.data.data.materialCostTotal
2253
+                that.info['material_cost_self_total'] =
2254
+                  response.data.data.materialCostSelfTotal
2255
+                that.info['material_cost_part_self_total'] =
2256
+                  response.data.data.materialCostPartSelfTotal
2257
+
2258
+                that.info['western_medicine_cost_total'] =
2259
+                  response.data.data.westernMedicineCostTotal
2260
+                that.info['western_medicine_cost_self_total'] =
2261
+                  response.data.data.westernMedicineCostSelfTotal
2262
+                that.info['western_medicine_cost_part_self_total'] =
2263
+                  response.data.data.westernMedicineCostPartSelfTotal
2264
+
2265
+                that.info['chinese_traditional_medicine_cost_total'] =
2266
+                  response.data.data.chineseTraditionalMedicineCostTotal
2267
+                that.info['chinese_traditional_medicine_cost_self_total'] =
2268
+                  response.data.data.chineseTraditionalMedicineCostSelfTotal
2269
+                that.info['chinese_traditional_medicine_cost_part_self_total'] =
2270
+                  response.data.data.chineseTraditionalMedicineCostPartSelfTotal
2271
+
2272
+                that.info['check_cost_total'] = response.data.data.checkCostTotal
2273
+                that.info['check_cost_self_total'] =
2274
+                  response.data.data.checkCostSelfTotal
2275
+                that.info['check_cost_part_self_total'] =
2276
+                  response.data.data.checkCostPartSelfTotal
2277
+
2278
+                that.info['laboratory_cost_total'] =
2279
+                  response.data.data.laboratoryCostTotal
2280
+                that.info['laboratory_cost_self_total'] =
2281
+                  response.data.data.laboratoryCostSelfTotal
2282
+                that.info['laboratory_cost_part_self_total'] =
2283
+                  response.data.data.laboratoryCostPartSelfTotal
2284
+
2285
+                that.info['treat_cost_total'] = response.data.data.treatCostTotal
2286
+                that.info['treat_cost_self_total'] =
2287
+                  response.data.data.treatCostSelfTotal
2288
+                that.info['treat_cost_part_self_total'] =
2289
+                  response.data.data.treatCostPartSelfTotal
2290
+
2291
+
2292
+                that.info['bedInscpTotal'] =
2293
+                  response.data.data.bedInscpTotal
2294
+                that.info['bedSelfTotal'] =
2295
+                  response.data.data.bedSelfTotal
2296
+
2297
+                that.info['operationInscpTotal'] =
2298
+                  response.data.data.operationInscpTotal
2299
+                that.info['operationSelfTotal'] =
2300
+                  response.data.data.operationSelfTotal
2301
+
2302
+                that.info['checkInscpTotal'] =
2303
+                  response.data.data.checkInscpTotal
2304
+                that.info['checkSelfTotal'] =
2305
+                  response.data.data.checkSelfTotal
2306
+
2307
+                that.info['treatInscpTotal'] =
2308
+                  response.data.data.treatInscpTotal
2309
+                that.info['treatSelfTotal'] =
2310
+                  response.data.data.treatSelfTotal
2311
+
2312
+                that.info['laboratoryInscpTotal'] =
2313
+                  response.data.data.laboratoryInscpTotal
2314
+                that.info['laboratorySelfTotal'] =
2315
+                  response.data.data.laboratorySelfTotal
2316
+
2317
+                that.info['westernMedicineInscpTotal'] =
2318
+                  response.data.data.westernMedicineInscpTotal
2319
+                that.info['westernMedicineSelfTotal'] =
2320
+                  response.data.data.westernMedicineSelfTotal
2321
+
2322
+                that.info['materialInscpTotal'] =
2323
+                  response.data.data.materialInscpTotal
2324
+                that.info['materialSelfTotal'] =
2325
+                  response.data.data.materialSelfTotal
2326
+
2327
+                that.info['chineseTraditionalInscpTotal'] =
2328
+                  response.data.data.chineseTraditionalInscpTotal
2329
+                that.info['chineseTraditionalSelfTotal'] =
2330
+                  response.data.data.chineseTraditionalSelfTotal
2331
+
2332
+
2333
+
2334
+                that.info['date'] = response.data.data.date
2335
+                that.info['number'] = response.data.data.number
2336
+                that.info['order_infos'] = response.data.data.order_infos
2337
+                that.info['diagnosis'] = response.data.data.diagnosis
2338
+                that.info['his'] = response.data.data.his
2339
+                that.info['dia_config'] = response.data.data.dia_config
2340
+
2341
+                const jsonArr = JSON.parse(response.data.data.his.idetinfo);
2342
+                that.info['psn_idet_type'] = jsonArr[0].psn_idet_type
2343
+
2344
+
2345
+                const jsons = JSON.parse(response.data.data.his.iinfo);
2346
+                that.info['emp_name'] = jsons[0].emp_name
2347
+
2348
+
2349
+
2350
+
2351
+
2352
+                for (let i = 0; i < response.data.data.order_infos.length; i++) {
2353
+                  if (response.data.data.order_infos[i].advice_id > 0 && response.data.data.order_infos[i].project_id == 0) {
2354
+                    response.data.data.order_infos[i].med_chrgitm_type = '09'
2355
+                  }
2356
+                  if (response.data.data.order_infos[i].advice_id == 0 && response.data.data.order_infos[i].project_id > 0) {
2357
+                    if (response.data.data.order_infos[i].project.type == 2) { //项目
2358
+                      if (response.data.data.order_infos[i].project.project.cost_classify == 2) {
2359
+                        response.data.data.order_infos[i].med_chrgitm_type = '05'
2360
+                      } else if (response.data.data.order_infos[i].project.project.cost_classify == 3) {
2361
+                        response.data.data.order_infos[i].med_chrgitm_type = '04'
2362
+                      } else {
2363
+                        response.data.data.order_infos[i].med_chrgitm_type = '14'
2364
+                      }
2365
+                    } else if (response.data.data.order_infos[i].project.type == 3) { //耗材
2366
+                      response.data.data.order_infos[i].med_chrgitm_type = '08'
2367
+                    }
2368
+                  }
2369
+                }
2370
+                console.log(response.data.data.order_infos)
2371
+                console.log(that.info)
2372
+
2373
+                let list = []
2374
+                for (let i = 0; i < response.data.data.order_infos.length; i++) {
2375
+                  let order = response.data.data.order_infos[i]
2376
+                  let obj = {
2377
+                    name: '',
2378
+                    spec: '',
2379
+                    cnt: '',
2380
+                    det_item_fee_sumamt: '',
2381
+                    price:'',
2382
+                  }
2383
+
2384
+                  if (order.advice_id > 0 && order.project_id == 0) {
2385
+                    obj.name = order.advice.advice_name
2386
+                    let spec = order.advice.drug.dose + order.advice.drug.dose_unit + '*' + order.advice.drug.min_number + order.advice.drug.min_unit + '/' + order.advice.drug.max_unit
2387
+                    obj.spec = spec
2388
+                    obj.cnt = order.cnt
2389
+                    obj.det_item_fee_sumamt = order.det_item_fee_sumamt
2390
+                    obj.price = order.pric
2391
+                    list.push(obj)
2392
+
2393
+                  } else if (order.advice_id == 0 && order.project_id > 0) {
2394
+                    if (order.project.type == 2) {
2395
+                      obj.name = order.project.project.project_name
2396
+                      obj.spec = ''
2397
+                      obj.cnt = order.cnt
2398
+                      obj.det_item_fee_sumamt = order.det_item_fee_sumamt
2399
+                      obj.price = order.pric
2400
+                    } else {
2401
+                      obj.name = order.project.good_info.good_name
2402
+                      obj.spec = order.project.good_info.specification_name
2403
+                      obj.cnt = order.cnt
2404
+                      obj.det_item_fee_sumamt = order.det_item_fee_sumamt
2405
+                      obj.price = order.pric
2406
+                    }
2407
+                    list.push(obj)
2408
+                  }
2409
+
2410
+                }
2411
+                that.info['Z_list'] = list
2412
+                console.log(" that.info")
2413
+                console.log(that.info.Z_list)
2414
+                console.log(" that.info")
2415
+
2416
+
2417
+                //获取所有项目类型进行去重
2418
+                let med_chrgitm_types = []
2419
+                for (let i = 0; i < response.data.data.order_infos.length; i++) {
2420
+                  med_chrgitm_types.push(response.data.data.order_infos[i].med_chrgitm_type)
2421
+                }
2422
+                const obj10 = {}
2423
+                med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
2424
+                  obj10[next] ? '' : obj10[next] = true && cur.push(next)
2425
+                  return cur
2426
+                }, []) // 设置cur默认类型为数组,并且初始值为空的数组
2427
+                let tempOrderInfo = []
2428
+                for (let i = 0; i < med_chrgitm_types.length; i++) {
2429
+
2430
+                  let obj9 = {
2431
+                    details: [],
2432
+                    med_chrgitm_name: that.getType(med_chrgitm_types[i]),
2433
+                    total:0,
2434
+                  }
2435
+
2436
+                  // if(med_chrgitm_types[i] == '09'){
2437
+                  //   obj.sort = 99
2438
+                  // } else if(med_chrgitm_types[i] == '05'){
2439
+                  //   obj.sort = 98
2440
+                  // } else if(med_chrgitm_types[i] == '08'){
2441
+                  //   obj.sort = 97
2442
+                  // }else if(med_chrgitm_types[i] == '03'){
2443
+                  //   obj.sort = 96
2444
+                  // }
2445
+
2446
+                  let tempDetails = []
2447
+                  for (let b = 0; b < response.data.data.order_infos.length; b++) {
2448
+                    if (med_chrgitm_types[i] == response.data.data.order_infos[b].med_chrgitm_type) {
2449
+                      tempDetails.push(response.data.data.order_infos[b])
2450
+                    }
2451
+                  }
2452
+                  console.log(med_chrgitm_types[i])
2453
+                  console.log(tempDetails)
2454
+                  obj9.total = that.getTotal(tempDetails)
2455
+                  obj9.details = that.set10265NewData(tempDetails)
2456
+                  list.push(obj9)
2457
+                }
2458
+                that.info['new_list'] = list
2459
+                // list.sort((a,b) => a.sort < b.sort ? 1 : a.sort > b.sort ? -1 : 0)
2460
+
2461
+                let obj = {
2462
+                  type: 1,
2463
+                  details: [],
2464
+                  total: 0
2465
+                }
2466
+                let obj2 = {
2467
+                  type: 2,
2468
+                  details: [],
2469
+                  total: 0
2470
+                }
2471
+                let obj3 = {
2472
+                  type: 3,
2473
+                  details: [],
2474
+                  total: 0
2475
+                }
2476
+
2477
+                let obj4 = {
2478
+                  type: 4,
2479
+                  details: [],
2480
+                  total: 0
2481
+                }
2482
+                let num = 0
2483
+                that.info.order_infos.map((item) => {
2484
+                  if (item.advice_id > 0) {
2485
+                    obj.details.push(item)
2486
+                    obj.total += item.pric * item.advice.prescribing_number
2487
+                    num++
2488
+                  } else {
2489
+                    if (item.project.type == 2) {
2490
+                      obj2.details.push(item)
2491
+                      obj2.total += item.pric * item.project.count
2492
+                      num++
2493
+                    } else {
2494
+                      obj3.details.push(item)
2495
+                      obj3.total += item.pric * item.project.count
2496
+                      num++
2497
+                    }
2498
+                  }
2499
+                })
2500
+
2501
+                // this.info.order_infos.map(item => {
2502
+                //   obj4.total = item.Total
2503
+                //   obj4.details.push(item)
2504
+                //   num++
2505
+                //
2506
+                // })
2507
+                var funds = []
2508
+                for(let i = 0; i <  response.data.data.funds.length; i++){
2509
+                  var objs = {}
2510
+                  objs["number"] = i + 1
2511
+                  objs["fund_pay"] = response.data.data.funds[i].fund_payamt
2512
+                  objs["limit_pay"] = response.data.data.funds[i].inscp_scp_amt
2513
+                  objs["insp_pay"] = response.data.data.funds[i].inscp_scp_amt
2514
+                  for(let b = 0; b < that.fundsArray.length; b++){
2515
+                    if(response.data.data.funds[i].fund_pay_type ==  that.fundsArray[b].code){
2516
+                      objs["name"] =that.fundsArray[b].name
2517
+                    }
2518
+                  }
2519
+                  funds.push(objs)
2520
+                }
2521
+                that.info['funds'] = funds
2522
+                console.log(that.info)
2523
+
2524
+                that.info.new_detail_list = []
2525
+                that.info.new_detail_list.push(obj)
2526
+                that.info.new_detail_list.push(obj2)
2527
+                that.info.new_detail_list.push(obj3)
2528
+                // that.info.new_detail_list.push(obj4)
2529
+
2530
+                that.num = num
2531
+
2532
+                if (that.paramsObj.settle_type != 1) {
2533
+                  that.info.begndate = that.getTimes(that.paramsObj.start_time)
2534
+                  that.info.enddate = that.getTimes(that.paramsObj.end_time)
2535
+                }
2536
+
2537
+                that.info.order_infos.map((item) => {
2538
+
2539
+                })
2540
+
2541
+
2542
+                that.info["jia_drug"] = 0
2543
+                that.info["yi_drug"] = 0
2544
+                that.info["zifei_drug"] = 0
2545
+
2546
+
2547
+                that.info["jia_yiliao"] = 0
2548
+                that.info["yi_yiliao"] = 0
2549
+                that.info["zifei_yiliao"] = 0
2550
+
2551
+                for(let a = 0; a < response.data.data.order_infos.length; a++){
2552
+                  if(response.data.data.order_infos[a].chrgitm_lv == "01" && response.data.data.order_infos[a].med_chrgitm_type == "09"){
2553
+                    that.info["jia_drug"] = that.info["jia_drug"] + response.data.data.order_infos[a].det_item_fee_sumamt
2554
+                  }
2555
+                  if(response.data.data.order_infos[a].chrgitm_lv == "02" && response.data.data.order_infos[a].med_chrgitm_type == "09"){
2556
+                    that.info["yi_drug"] = that.info["yi_drug"] + response.data.data.order_infos[a].det_item_fee_sumamt
2557
+                  }
2558
+                  if(response.data.data.order_infos[a].chrgitm_lv != "01" && response.data.data.order_infos[a].chrgitm_lv != "02" && response.data.data.order_infos[a].med_chrgitm_type == "09"){
2559
+                    that.info["zifei_drug"] = that.info["zifei_drug"] + response.data.data.order_infos[a].det_item_fee_sumamt
2560
+                  }
2561
+                }
2562
+
2563
+                for(let a = 0; a < response.data.data.order_infos.length; a++){
2564
+                  if(response.data.data.order_infos[a].chrgitm_lv == "01" && response.data.data.order_infos[a].med_chrgitm_type != "09"){
2565
+                    that.info["jia_yiliao"] = that.info["jia_yiliao"] + response.data.data.order_infos[a].det_item_fee_sumamt
2566
+                  }
2567
+                  if(response.data.data.order_infos[a].chrgitm_lv == "02" && response.data.data.order_infos[a].med_chrgitm_type != "09"){
2568
+                    that.info["yi_yiliao"] = that.info["yi_yiliao"] + response.data.data.order_infos[a].det_item_fee_sumamt
2569
+                  }
2570
+                  if(response.data.data.order_infos[a].chrgitm_lv != "01" && response.data.data.order_infos[a].chrgitm_lv != "02" && response.data.data.order_infos[a].med_chrgitm_type != "09"){
2571
+                    that.info["zifei_yiliao"] = that.info["zifei_yiliao"] + response.data.data.order_infos[a].det_item_fee_sumamt
2572
+                  }
2573
+                }
2574
+
2575
+              }
2576
+            })
2577
+
2578
+
2579
+
2580
+
2581
+
2582
+
2206 2583
           }else {
2207 2584
             var that = this
2208 2585
             axios

+ 33 - 33
src/xt_pages/outpatientCharges/statementTemplate/printfivetheen.vue View File

@@ -3,7 +3,7 @@
3 3
     <div class="statementTitle">淮安市国家医保结算单</div>
4 4
     <div style="display: flex;">
5 5
       <div style="margin: 10px 0;flex: 1;">定点医疗机构:{{info.fixmedins_name}}</div>
6
-      <div style="margin: 10px 0;flex: 1;">统筹区号:</div>
6
+      <div style="margin: 10px 0;flex: 1;">统筹区号:320830</div>
7 7
       <div style="margin: 10px 0;flex: 1;">NO:</div>
8 8
     </div>
9 9
     <table class="statementTable" border="1" style="text-align: center;width: 100%;">
@@ -13,9 +13,9 @@
13 13
         <td width="5%">性别:</td>
14 14
         <td width="6%">{{ info.gend == '1' ? '男':'女' }}</td>
15 15
         <td width="14%">医保就诊号:</td>
16
-        <td width="13%">{{ }}</td>
16
+        <td width="13%">{{info.mdtrt_id}}</td>
17 17
         <td width="12%">住院次数:</td>
18
-        <td width="15%">{{ }}</td>
18
+        <td width="15%"></td>
19 19
       </tr>
20 20
       <tr>
21 21
         <td width="12">人员类别:</td>
@@ -54,7 +54,7 @@
54 54
           <span v-else></span>
55 55
         </td>
56 56
         <td width="8">状态:</td>
57
-        <td width="8">{{ }}</td>
57
+        <td width="8">出院</td>
58 58
         <td width="14">住院号:</td>
59 59
         <td width="12">{{info.number}}</td>
60 60
         <td width="12">结算日期:</td>
@@ -64,33 +64,33 @@
64 64
         <td >身份证号</td>
65 65
         <td colspan="3">{{info.certno}}</td>
66 66
         <td width="8">医保编号</td>
67
-        <td colspan="3">{{  }}</td>
67
+        <td colspan="3">{{info.psn_no}}</td>
68 68
       </tr>
69 69
       <tr>
70 70
         <td >单位名称</td>
71 71
         <td colspan="4">{{info.patient.home_address}}</td>
72 72
         <td width="8">人员身份类别</td>
73
-        <td colspan="2">{{  }}</td>
73
+        <td colspan="2"></td>
74 74
       </tr>
75 75
       <tr>
76
-        <td >院日期</td>
77
-        <td colspan="3">{{ }}</td>
76
+        <td >院日期</td>
77
+        <td colspan="3">{{info.setl_time.split(' ')[0]}}</td>
78 78
         <td width="8">出院诊断</td>
79
-        <td colspan="3">{{  }}</td>
79
+        <td colspan="3">慢性肾脏病5期(N18.500)</td>
80 80
       </tr>
81 81
       <tr>
82 82
         <td>医疗费总额</td>
83 83
         <td colspan="3">{{info.medfee_sumamt}}</td>
84 84
         <td>全自费金额</td>
85
-        <td></td>
85
+        <td>{{info.fulamt_ownpay_amt}}</td>
86 86
         <td>超限价自费费用</td>
87
-        <td></td>
87
+        <td>{{info.overlmt_self_pay}}</td>
88 88
       </tr>
89 89
       <tr>
90 90
         <td>先行自付金额</td>
91 91
         <td colspan="3">{{info.preselfpay_amt}}</td>
92 92
         <td>符合政策范围金额</td>
93
-        <td>{{info.insp_pay}}</td>
93
+        <td>{{info.inscp_scp_amt}}</td>
94 94
         <td>实际支付起付线</td>
95 95
         <td>{{info.act_pay_dedc}}</td>
96 96
       </tr>
@@ -100,7 +100,7 @@
100 100
         <td>公务员医疗补助资金支出</td>
101 101
         <td>{{info.cvlserv_pay}}</td>
102 102
         <td>扶贫保险支出</td>
103
-        <td></td>
103
+        <td>0</td>
104 104
       </tr>
105 105
       <tr>
106 106
         <td>企业补充医疗保险基金支出</td>
@@ -110,35 +110,35 @@
110 110
           {{info.hifmi_pay}}
111 111
         </td>
112 112
         <td>职工大额医疗费用补助基金支出</td>
113
-        <td></td>
113
+        <td>{{info.hifob_pay}}</td>
114 114
       </tr>
115 115
       <tr>
116 116
         <td>医疗救助基金支出</td>
117 117
         <td colspan="3">{{info.maf_pay}}</td>
118 118
         <td>医院负担金额</td>
119
-        <td></td>
119
+        <td>{{info.hosp_part_amt}}</td>
120 120
         <td>基金支付总额</td>
121 121
         <td>{{info.fund_pay_sumamt}}</td>
122 122
       </tr>
123 123
       <tr>
124 124
         <td>甲类药品</td>
125
-        <td colspan="3"></td>
125
+        <td colspan="3">{{info.jia_drug.toFixed(2)}}</td>
126 126
         <td>乙类药品</td>
127
-        <td></td>
127
+        <td>{{info.yi_drug.toFixed(2)}}</td>
128 128
         <td>自费药品</td>
129
-        <td></td>
129
+        <td>{{info.zifei_drug.toFixed(2)}}</td>
130 130
       </tr>
131 131
       <tr>
132 132
         <td>甲类医疗</td>
133
-        <td colspan="3"></td>
133
+        <td colspan="3">{{info.jia_yiliao.toFixed(2)}}</td>
134 134
         <td>乙类医疗</td>
135
-        <td></td>
135
+        <td>{{info.yi_yiliao.toFixed(2)}}</td>
136 136
         <td>自费医疗</td>
137
-        <td></td>
137
+        <td>{{info.zifei_yiliao.toFixed(2)}}</td>
138 138
       </tr>
139 139
       <tr>
140 140
         <td>个人负担总金额</td>
141
-        <td colspan="3"></td>
141
+        <td colspan="3">{{info.psn_part_amt}}</td>
142 142
         <td>个人账户支出</td>
143 143
         <td>{{info.acct_pay}}</td>
144 144
         <td>个人现金支出</td>
@@ -148,27 +148,27 @@
148 148
       </tr>
149 149
       <tr>
150 150
         <td>补偿合计</td>
151
-        <td colspan="5">{{ numberToChinese(100) }}</td>
152
-        <td colspan="2"></td>
151
+        <td colspan="5">{{ numberToChinese(info.fund_pay_sumamt) }}</td>
152
+        <td colspan="2">{{info.fund_pay_sumamt}}</td>
153 153
       </tr>
154 154
       <tr>
155 155
         <td>自理合计</td>
156
-        <td colspan="5"></td>
157
-        <td colspan="2"></td>
156
+        <td colspan="5">{{numberToChinese(info.psn_cash_pay)}}</td>
157
+        <td colspan="2">{{info.psn_cash_pay}}</td>
158 158
       </tr>
159 159
     </table>
160 160
     <table border="1" style="text-align: center;width: 100%;border-collapse: collapse;border-top: none;padding: 5px 0;">
161 161
       <tr>
162 162
         <td width="10%">政策范围内住院费用</td>
163
-        <td width="10%">{{ }}</td>
163
+        <td width="10%">{{info.medfee_sumamt}}</td>
164 164
         <td width="10%">政策范围内个人自付费用</td>
165
-        <td width="10%">{{  }}</td>
165
+        <td width="10%">{{info.psn_cash_pay}}</td>
166 166
         <td width="10%">政策范围内个人自付费用占比</td>
167
-        <td width="10%">{{ }}</td>
167
+        <td width="10%">{{((info.psn_cash_pay/info.medfee_sumamt) * 100).toFixed(2) + "%" }}</td>
168 168
         <td width="10%">10%缺口资金</td>
169
-        <td width="10%">{{ }}</td>
169
+        <td width="10%"></td>
170 170
         <td width="10%">实付金额</td>
171
-        <td width="10%">{{ }}</td>
171
+        <td width="10%">{{info.psn_cash_pay}}</td>
172 172
       </tr>
173 173
     </table>
174 174
     <!-- <div style="margin: 10px 0;">医疗机构名称:
@@ -188,7 +188,7 @@
188 188
         <span v-if="info.insutype == '510'">生育保险</span>
189 189
       </div>
190 190
     </div>
191
-  
191
+
192 192
     <table class="statementTable" border="1" style="text-align: left;">
193 193
       <tr>
194 194
         <td>患者姓名:{{info.patient.name}}</td>
@@ -293,7 +293,7 @@
293 293
       <div style="flex: 1;">结算人:{{  }} </div>
294 294
       <div style="flex: 1;">打印日期:{{getNowTime()}}</div>
295 295
       <div style="flex: 1;">参保人签字:</div>
296
-    </div> 
296
+    </div>
297 297
   </div>
298 298
 </template>
299 299
 <script>

+ 3 - 1
src/xt_pages/outpatientCharges/statementTemplate/privateChargePrint.vue View File

@@ -9,7 +9,9 @@
9 9
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10694">江西省社会医疗保险医疗费用结算单</div>
10 10
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10489">湖北省社会医疗保险医疗费用结算单</div>
11 11
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10731">医疗费用结算单</div>
12
-    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10635 || this.$store.getters.xt_user.org_id == 0">江西省社会医疗保险医疗费用结算单</div>
12
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10635 ">江西省社会医疗保险医疗费用结算单</div>
13
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10387 || this.$store.getters.xt_user.org_id == 0">湖南省社会医疗保险医疗费用结算单</div>
14
+
13 15
 
14 16
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10489 && this.$store.getters.xt_user.org_id != 10515 &&
15 17
                   this.$store.getters.xt_user.org_id != 10375 && this.$store.getters.xt_user.org_id != 10188 &&

+ 45 - 2
src/xt_pages/outpatientCharges/summary.vue View File

@@ -63,6 +63,11 @@
63 63
             size="small" type="primary" @click="batch_print_settlte">批量打印结算单
64 64
           </el-button>
65 65
           <el-button size="small" type="primary" @click="list_click">批量打印费用清单</el-button>
66
+
67
+          <el-button
68
+            v-if="$store.getters.xt_user.org_id == 10644"
69
+            size="small" type="primary" @click="batch_print_settle_10644">批量打印结算单
70
+          </el-button>
66 71
           <el-button size="small" type="primary" @click="export_detail"
67 72
           >报表下载
68 73
           </el-button>
@@ -72,7 +77,7 @@
72 77
           <el-button v-if="$store.getters.xt_user.org_id == 10318" size="small"
73 78
                      type="primary" @click="export_detail_ten_two">报表下载3
74 79
           </el-button>
75
-          
80
+
76 81
         </div>
77 82
       </div>
78 83
 
@@ -501,6 +506,22 @@
501 506
       ></settlement-print>
502 507
     </el-dialog>
503 508
 
509
+    <el-dialog
510
+      class="centerDialog"
511
+      width="1200px"
512
+      title="打印"
513
+      :visible.sync="batchStatementVisible_two"
514
+    >
515
+<!--      <hospital-batch-statement-print-->
516
+<!--        ref="hospital_batch_print" :paramsObj="batchParams"-->
517
+<!--      >-->
518
+<!--      </hospital-batch-statement-print>-->
519
+      <hospital-batch-statement-print
520
+        ref="hospital_batch_print" :paramsObj="batchParams"
521
+      >
522
+      </hospital-batch-statement-print>
523
+    </el-dialog>
524
+
504 525
     <el-dialog
505 526
       class="centerDialog"
506 527
       width="1200px"
@@ -667,11 +688,13 @@ import StatementListPrint from './statementListPrint'
667 688
 import { getDialysisRecordInitData } from '@/api/dialysis_record'
668 689
 import BatchStatementPrint from './batchStatementPrint'
669 690
 import { exportMdtrtCertType } from '../../api/his/his_tools'
691
+import HospitalBatchStatementPrint from "../hospitalStation/hospitalBatchStatementPrint.vue";
670 692
 
671 693
 const moment = require('moment')
672 694
 export default {
673 695
   name: 'OutpatientChargesSummary',
674 696
   components: {
697
+    HospitalBatchStatementPrint,
675 698
     BatchStatementPrint,
676 699
     StatementListPrint,
677 700
     NewStatementPrintTwo,
@@ -684,6 +707,7 @@ export default {
684 707
   },
685 708
   data() {
686 709
     return {
710
+      batchParams:{},
687 711
       staff:"",
688 712
       admins:[],
689 713
       orderObj: {},
@@ -700,6 +724,7 @@ export default {
700 724
       statementListVisible: false,
701 725
       statementVisible: false,
702 726
       batchStatementVisible: false,
727
+      batchStatementVisible_two:false,
703 728
       statementVisible9504: false,
704 729
       orderObj9504: {},
705 730
       crumbs: [
@@ -3328,6 +3353,23 @@ export default {
3328 3353
         }
3329 3354
       }
3330 3355
       return res
3356
+    },batch_print_settle_10644(){
3357
+      if (this.selecting_schs.length === 0) {
3358
+        this.$message.error('请至少选择一条需要打印的内容')
3359
+        return false
3360
+      } else {
3361
+        var sch_ids = []
3362
+        for (let index = 0; index < this.selecting_schs.length; index++) {
3363
+          sch_ids.push(this.selecting_schs[index].id)
3364
+        }
3365
+        this.batchStatementVisible_two = true;
3366
+        let params = {
3367
+          order_ids: sch_ids.join(","),
3368
+          admin_user_id: this.$store.getters.xt_user.user.id,
3369
+        };
3370
+        this.batchParams = params
3371
+
3372
+      }
3331 3373
     },
3332 3374
     batch_print_settlte() {
3333 3375
       if (this.selecting_schs.length === 0) {
@@ -3468,6 +3510,7 @@ export default {
3468 3510
             // console.log(order.setl_detail)
3469 3511
             // if (order.setl_detail && order.setl_detail.length > 0) {
3470 3512
             //   var jsonObj = JSON.parse(order.setl_detail)
3513
+            //   var jsonObj = JSON.parse(order.setl_detail)
3471 3514
             //   if (jsonObj != null) {
3472 3515
             //     for (let i = 0; i < jsonObj.length; i++) {
3473 3516
             //       if (order.insutype == '310') {
@@ -4215,7 +4258,7 @@ export default {
4215 4258
       this.$router.push({path:'/listTemplate/batch_listPrint',query:{list_id:list_id}})
4216 4259
       // list_batch(list_id).then(res =>{
4217 4260
       //   console.log('res',res);
4218
-        
4261
+
4219 4262
       // })
4220 4263
     }
4221 4264
   },

+ 502 - 0
src/xt_pages/outpatientTool/components/personSettle.vue View File

@@ -0,0 +1,502 @@
1
+<template>
2
+  <div>
3
+    <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
4
+      <div>
5
+
6
+        <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
7
+                  @keyup.enter.native='searchAction'
8
+                  placeholder="请输入患者姓名"
9
+
10
+                  class="filter-item"/>
11
+        <el-select size="small" v-model="item_type" placeholder="请选择"
12
+                   style="width:150px;margin-left:10px;" @change="changeItem">
13
+          <el-option
14
+            label="全部"
15
+            value="0">
16
+          </el-option>
17
+          <el-option
18
+            v-for="item,index in items"
19
+            :key="index"
20
+            :label="item.name"
21
+            :value="item.id">
22
+          </el-option>
23
+        </el-select>
24
+        <el-date-picker
25
+          v-model="chargeDate"
26
+          type="daterange"
27
+          value-format="yyyy-MM-dd"
28
+          range-separator="至"
29
+          start-placeholder="开始日期"
30
+          @change="changeDate"
31
+          end-placeholder="结束日期">
32
+        </el-date-picker>
33
+        <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
34
+        <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
35
+      </div>
36
+      <div>
37
+        <!-- <el-popover
38
+          placement="bottom"
39
+          width="210"
40
+          trigger="click">
41
+          <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
42
+          <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
43
+          <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
44
+
45
+        </el-popover> -->
46
+        <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
47
+      </div>
48
+    </div>
49
+    <el-table ref="tables" :data="tableData" border :row-style="{ color: '#303133' }"
50
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
51
+              v-loading="settle_loading"
52
+              max-height="600"
53
+              highlight-current-row>
54
+
55
+      <el-table-column align="center" prop="name" label="患者名字" fixed>
56
+        <template slot-scope="scope">{{ scope.row.name }}</template>
57
+      </el-table-column>
58
+      <el-table-column align="center" prop="id_card_no" label="身份证">
59
+        <template slot-scope="scope">
60
+          {{scope.row.id_card_no}}
61
+        </template>
62
+      </el-table-column>
63
+
64
+
65
+      <el-table-column align="center" prop="dis"   label="透析次数">
66
+        <template slot-scope="scope">
67
+          {{scope.row.dis.length}}
68
+
69
+        </template>
70
+      </el-table-column>
71
+
72
+      <el-table-column align="center" prop="s_count"  label="结算次数">
73
+        <template slot-scope="scope">
74
+          {{scope.row.orders.length}}
75
+        </template>
76
+      </el-table-column>
77
+
78
+      <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
79
+        <template slot-scope="scope">{{GetMedfeeSumam(scope.row)}}</template>
80
+      </el-table-column>
81
+      <el-table-column align="center" prop="fund_pay_sumamt" label="基金支付金额">
82
+        <template slot-scope="scope">{{GetFundPaySumamt(scope.row)}}</template>
83
+      </el-table-column>
84
+      <el-table-column align="center" prop="acct_pay" label="个人账户支付金额">
85
+        <template slot-scope="scope">{{GetAcctPay(scope.row)}}</template>
86
+      </el-table-column>
87
+      <el-table-column align="center" prop="psn_cash_pay" label="个人支付金额">
88
+        <template slot-scope="scope">{{GetPsnCashPay(scope.row)}}</template>
89
+      </el-table-column>
90
+      <el-table-column align="center" prop="hifp_pay" label="基金统筹金额">
91
+        <template slot-scope="scope">{{GetHifpPay(scope.row)}}</template>
92
+      </el-table-column>
93
+
94
+      <el-table-column align="center" prop="hifob_pay" label="大额基金支付">
95
+        <template slot-scope="scope">{{GetHiFobPay(scope.row)}}</template>
96
+      </el-table-column>
97
+      <el-table-column align="center" prop="preselfpay_amt" label="先行自付金额">
98
+        <template slot-scope="scope">{{GetPreselfpaAmt(scope.row)}}</template>
99
+      </el-table-column>
100
+      <el-table-column align="center" prop="overlmt_self_pay" label="超限价金额">
101
+        <template slot-scope="scope">{{GetOverlmtSelfPay(scope.row)}}</template>
102
+      </el-table-column>
103
+      <el-table-column align="center" prop="fulamt_ownpay_amt" label="全自费金额">
104
+        <template slot-scope="scope">{{GetFulamtOwnpayAmt(scope.row)}}</template>
105
+      </el-table-column>
106
+      <el-table-column align="center" prop="inscp_scp_amt" label="符合政策范围金额">
107
+        <template slot-scope="scope">{{GetInscpScpAmt(scope.row)}}</template>
108
+      </el-table-column>
109
+
110
+      <el-table-column align="center" prop="maf_pay" label="医疗救助基金">
111
+        <template slot-scope="scope">{{GetMafPay(scope.row)}}</template>
112
+      </el-table-column>
113
+      <el-table-column align="center" prop="hifes_pay" label="企业补充医疗保险基金支出">
114
+        <template slot-scope="scope">{{GetHifesPay(scope.row)}}</template>
115
+      </el-table-column>
116
+      <el-table-column align="center" prop="hifmi_pay" label="居民大病保险资金支出">
117
+        <template slot-scope="scope">{{GetHifmiPay(scope.row)}}</template>
118
+      </el-table-column>
119
+      <el-table-column align="center" prop="oth_pay" label="其他支付">
120
+        <template slot-scope="scope">{{GetOthPay(scope.row)}}</template>
121
+      </el-table-column>
122
+      <el-table-column align="center" prop="cvlserv_pay" label="公务员医疗补助资金支出">
123
+        <template slot-scope="scope">{{GetCvlservPay(scope.row)}}</template>
124
+      </el-table-column>
125
+
126
+
127
+    </el-table>
128
+
129
+  </div>
130
+</template>
131
+
132
+
133
+<script>
134
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
135
+import { GetSummarySettle,changeOrderDesc } from '@/api/his/his'
136
+import { uParseTime } from '@/utils/tools'
137
+// import NewStatementPrint from './newStatementPrint'
138
+const moment = require('moment')
139
+export default {
140
+  components: {
141
+    BreadCrumb
142
+
143
+  },
144
+  data() {
145
+    return {
146
+      settle_loading:false,
147
+      crumbs: [],
148
+      tempArr: [],
149
+      sameRowArr: [],
150
+      modeOptions:this.$store.getters.treatment_mode,
151
+      tableData: [],
152
+      config:{},
153
+      sick:{},
154
+      chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
155
+      item_type: '0',
156
+      items: [
157
+        { id: 2, name: '自费' },
158
+        { id: 5, name: '城乡居民基本医疗保险' },
159
+        { id: 6, name: '职工基本医疗保险' }
160
+      ]
161
+
162
+    }
163
+  },
164
+  methods: {
165
+    GetMedfeeSumam(row){
166
+      let medfee = 0
167
+      for(let i = 0; i < row.orders.length; i++){
168
+        medfee = medfee + row.orders[i].medfee_sumamt
169
+      }
170
+      return medfee.toFixed(2)
171
+
172
+    }, GetFundPaySumamt(row){
173
+      let medfee = 0
174
+      for(let i = 0; i < row.orders.length; i++){
175
+        medfee = medfee + row.orders[i].fund_pay_sumamt
176
+      }
177
+      return medfee.toFixed(2)
178
+
179
+    },GetAcctPay(row){
180
+      let medfee = 0
181
+      for(let i = 0; i < row.orders.length; i++){
182
+        medfee = medfee + row.orders[i].acct_pay
183
+      }
184
+      return medfee.toFixed(2)
185
+
186
+    },GetPsnCashPay(row){
187
+      let medfee = 0
188
+      for(let i = 0; i < row.orders.length; i++){
189
+        medfee = medfee + row.orders[i].psn_cash_pay
190
+      }
191
+      return medfee.toFixed(2)
192
+
193
+    },GetHifpPay(row){
194
+      let medfee = 0
195
+      for(let i = 0; i < row.orders.length; i++){
196
+        medfee = medfee + row.orders[i].hifp_pay
197
+      }
198
+      return medfee.toFixed(2)
199
+
200
+    },GetHiFobPay(row){
201
+      let medfee = 0
202
+      for(let i = 0; i < row.orders.length; i++){
203
+        medfee = medfee + row.orders[i].hifob_pay
204
+      }
205
+      return medfee.toFixed(2)
206
+
207
+    },GetPreselfpaAmt(row){
208
+      let medfee = 0
209
+      for(let i = 0; i < row.orders.length; i++){
210
+        medfee = medfee + row.orders[i].preselfpay_amt
211
+      }
212
+      return medfee.toFixed(2)
213
+
214
+    },GetOverlmtSelfPay(row){
215
+      let medfee = 0
216
+      for(let i = 0; i < row.orders.length; i++){
217
+        medfee = medfee + row.orders[i].overlmt_self_pay
218
+      }
219
+      return medfee.toFixed(2)
220
+    },GetFulamtOwnpayAmt(row){
221
+      let medfee = 0
222
+      for(let i = 0; i < row.orders.length; i++){
223
+        medfee = medfee + row.orders[i].fulamt_ownpay_amt
224
+      }
225
+      return medfee.toFixed(2)
226
+
227
+    },GetMafPay(row){
228
+      let medfee = 0
229
+      for(let i = 0; i < row.orders.length; i++){
230
+        medfee = medfee + row.orders[i].maf_pay
231
+      }
232
+      return medfee.toFixed(2)
233
+
234
+    },GetHifesPay(row){
235
+      let medfee = 0
236
+      for(let i = 0; i < row.orders.length; i++){
237
+        medfee = medfee + row.orders[i].hifes_pay
238
+      }
239
+      return medfee.toFixed(2)
240
+
241
+    },GetHifmiPay(row){
242
+
243
+      let medfee = 0
244
+      for(let i = 0; i < row.orders.length; i++){
245
+        medfee = medfee + row.orders[i].hifmi_pay
246
+      }
247
+      return medfee.toFixed(2)
248
+    },GetInscpScpAmt(row){
249
+
250
+      let medfee = 0
251
+      for(let i = 0; i < row.orders.length; i++){
252
+        medfee = medfee + row.orders[i].inscp_scp_amt
253
+      }
254
+      return medfee.toFixed(2)
255
+
256
+    },GetOthPay(row){
257
+      let medfee = 0
258
+      for(let i = 0; i < row.orders.length; i++){
259
+        medfee = medfee + row.orders[i].oth_pay
260
+      }
261
+      return medfee.toFixed(2)
262
+
263
+    },GetCvlservPay(row){
264
+      let medfee = 0
265
+      for(let i = 0; i < row.orders.length; i++){
266
+        medfee = medfee + row.orders[i].cvlserv_pay
267
+      }
268
+      return medfee.toFixed(2)
269
+    },
270
+    change(id,desc,type){
271
+      let params = {
272
+        id: id,
273
+        desc: desc,
274
+        change_type: type
275
+      }
276
+      changeOrderDesc(params).then(response => {
277
+        if (response.data.state == 0) {
278
+          this.$message.error(response.data.msg)
279
+        } else {
280
+          this.$message.success(response.data.data.msg)
281
+        }
282
+      })
283
+    },
284
+    getTimes(time) {
285
+      return uParseTime(time, '{y}-{m}-{d}')
286
+    },
287
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
288
+      if (columnIndex === 0) {
289
+        if (rowIndex % 2 === 0) {
290
+          return {
291
+            rowspan: 2,
292
+            colspan: 1
293
+          }
294
+        } else {
295
+          return {
296
+            rowspan: 0,
297
+            colspan: 0
298
+          }
299
+        }
300
+      }
301
+    },
302
+    unique(arr) {
303
+      const res = new Map()
304
+      return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
305
+    },getSickName(sick_id){
306
+      let name = ""
307
+      for(let i = 0;i < this.sick.length;i++){
308
+        if(sick_id == this.sick[i].id){
309
+          name = this.sick[i].class_name + "(" + this.sick[i].content_code +")"
310
+        }
311
+      }
312
+      return name
313
+    },getTypeName(row){
314
+      let name = ""
315
+      if(row.insutype == '390'){
316
+        // let a =  config.mdtrtarea_admvs.slice(0, 4); //就医地前4位编码
317
+        let a =  this.config.mdtrtarea_admvs.slice(0, 3); //就医地前3位编码
318
+
319
+
320
+        // let aa=  row.his.insuplc_admdvs.slice(0, 4); //参保地前4位编码
321
+        let b=  row.his.insuplc_admdvs.slice(0, 3); //参保地前3位编码
322
+        if(a == b){
323
+          name = "本地城乡"
324
+        }else{
325
+          name = "异地城乡"
326
+        }
327
+
328
+      }else if(row.insutype == '310'){
329
+        // let c =  config.mdtrtarea_admvs.slice(0, 4); //就医地前4位编码
330
+        let a = this.config.mdtrtarea_admvs.slice(0, 3); //就医地前3位编码
331
+
332
+
333
+        // let d=  row.his.insuplc_admdvs.slice(0, 4); //参保地前4位编码
334
+        let b=  row.his.insuplc_admdvs.slice(0, 3); //参保地前3位编码
335
+        if(a == b){
336
+
337
+          name = "本地职工"
338
+        }else{
339
+          name = "异地职工"
340
+        }
341
+
342
+      }else{
343
+        name = "其他"
344
+
345
+      }
346
+      return name
347
+    },getName(id){
348
+      var name = ""
349
+      var options =  this.$store.getters.insuplc_admdvs
350
+      for(let i = 0; i < options.length; i++){
351
+        if(id == options[i].value){
352
+          name = options[i].label
353
+        }
354
+      }
355
+      return name
356
+    },
357
+    changeDate() {
358
+      this.getSummarySettleList()
359
+    },
360
+    changeItem() {
361
+      this.getSummarySettleList()
362
+
363
+    },
364
+    searchAction() {
365
+      this.item_type = '0'
366
+      this.getSummarySettleList()
367
+
368
+    },
369
+    getSummarySettleList() {
370
+      let start_time = this.chargeDate[0]
371
+      let end_time = this.chargeDate[1]
372
+      let params = {
373
+        start_time: start_time,
374
+        end_time: end_time,
375
+        type: this.item_type,
376
+        keyword: this.keywords,
377
+        s_type:2,
378
+      }
379
+      this.settle_loading = true
380
+      GetSummarySettle(params).then(response => {
381
+        if (response.data.state == 0) {
382
+          this.settle_loading = false
383
+
384
+          this.$message.error(response.data.msg)
385
+          return false
386
+        } else {
387
+          this.settle_loading = false
388
+          this.tableData = []
389
+          this.config = response.data.data.config
390
+          this.sick = response.data.data.sick
391
+          let data = response.data.data.patients
392
+          this.tableData = data
393
+          console.log( this.tableData)
394
+
395
+        }
396
+      })
397
+    }, uniqueProjectAndAdvice(array) {
398
+      // res用来存储结果
399
+      var res = []
400
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
401
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
402
+          if (array[i].item_id === res[j].item_id && array[i].price === res[j].price) {
403
+            break
404
+          }
405
+        }
406
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
407
+        if (j === resLen) {
408
+          res.push(array[i])
409
+        }
410
+      }
411
+      return res
412
+    }, sort(arr) {
413
+      for (var i = 0; i < arr.length - 1; i++) {
414
+        for (var j = 0; j < arr.length - i - 1; j++) {
415
+          if (arr[j].patient_id > arr[j + 1].patient_id) {// 相邻元素两两对比
416
+            var hand = arr[j]
417
+            arr[j] = arr[j + 1]
418
+            arr[j + 1] = hand
419
+
420
+          }
421
+        }
422
+      }
423
+      return arr
424
+    }, handleSpanTempArr() {
425
+      this.tempArr = []
426
+
427
+      for (let i = 0; i < this.tableData.length; i++) {
428
+        if (i === 0) {
429
+          this.tempArr.push(1)
430
+          this.pos = 0
431
+        } else {
432
+          // 判断当前元素与上一个元素是否相同
433
+          if (this.tableData[i].patient_id === this.tableData[i - 1].patient_id) {
434
+            this.tempArr[this.pos] += 1
435
+            this.tempArr.push(0)
436
+          } else {
437
+            this.tempArr.push(1)
438
+            this.pos = i
439
+          }
440
+        }
441
+      }
442
+
443
+      let sameRowArr = [], sIdx = 0
444
+      this.tableData.forEach((item, index) => {
445
+        item.index = index
446
+        if (index === 0) {
447
+          sameRowArr.push([index])
448
+        } else {
449
+          if (item.patient_id === this.tableData[index - 1].patient_id) {
450
+            sameRowArr[sIdx].push(index)
451
+          } else {
452
+            sIdx = sIdx + 1
453
+            sameRowArr.push([index])
454
+          }
455
+        }
456
+      })
457
+      this.sameRowArr = sameRowArr
458
+    }, merge({ row, column, rowIndex, columnIndex }) {
459
+      if (columnIndex === 0) {
460
+        const _row = this.tempArr[rowIndex]
461
+        const _col = _row > 0 ? 1 : 0
462
+        return {
463
+          rowspan: _row,
464
+          colspan: _col
465
+        }
466
+      }
467
+    },
468
+  export_detail() {
469
+
470
+      let list = []
471
+      for (let i = 0; i < this.tableData.length; i++) {
472
+        let order = this.tableData[i]
473
+        let name = order.name
474
+
475
+        let obj = {
476
+          '患者姓名': name,
477
+        }
478
+        list.push(obj)
479
+      }
480
+      import('@/vendor/Export2Excel').then(excel => {
481
+        const tHeader = [ '患者姓名']
482
+        const filterVal = [ '患者姓名']
483
+        const data = this.formatJson(filterVal, list)
484
+        excel.export_json_to_excel1({
485
+          header: tHeader,
486
+          data,
487
+          filename: '汇总',
488
+          ref:this.$refs['tables'].$el
489
+        })
490
+      })
491
+
492
+    }, formatJson(filterVal, jsonData) {
493
+      return jsonData.map(v => filterVal.map(j => v[j]))
494
+    }
495
+  },
496
+  created() {
497
+    this.getSummarySettleList()
498
+
499
+
500
+  }
501
+}
502
+</script>

+ 11 - 7
src/xt_pages/outpatientTool/components/print9919.vue View File

@@ -2,7 +2,7 @@
2 2
   <div id="statement-print" class="statement-print">
3 3
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org.id != 10480 && this.$store.getters.xt_user.org.id != 10387">广东省社会医疗保险医疗费用结算单</div>
4 4
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org.id == 10387">湖南省社会医疗保险医疗费用结算单</div>
5
-    <div class="statementTitle" v-else>安徽省社会医疗保险医疗费用结算单</div>
5
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org.id == 10480">安徽省社会医疗保险医疗费用结算单</div>
6 6
     <table class="statementTable" border="1" style="border-collapse: collapse;">
7 7
       <tr>
8 8
         <td width="80">机构名称</td>
@@ -121,14 +121,18 @@
121 121
         <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
122 122
         <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
123 123
 
124
-        <td v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217">入院第一诊断</td>
124
+        <td v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 && this.$store.getters.xt_user.org_id != 10387">入院第一诊断</td>
125 125
         <td v-else>病种名称</td>
126
-        <td v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217" colspan="3">{{info.dise_name}}</td>
127
-        <td v-else colspan="3">{{'慢性肾功能衰竭'}}</td>
128
-        <td v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217">出院第一诊断</td>
126
+        <td v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 && this.$store.getters.xt_user.org_id != 10387" colspan="3">{{info.dise_name}}</td>
127
+        <td v-else-if="this.$store.getters.xt_user.org_id == 10188 || this.$store.getters.xt_user.org_id == 10217" colspan="3">{{'慢性肾功能衰竭'}}</td>
128
+        <td v-else-if="this.$store.getters.xt_user.org_id == 10387" colspan="3">{{'慢性肾功能衰竭'}}</td>
129
+
130
+        <td v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 && this.$store.getters.xt_user.org_id != 10387">出院第一诊断</td>
129 131
         <td v-else>病种编码</td>
130
-        <td v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217" colspan="6">{{info.dise_name}}</td>
131
-        <td v-else colspan="6">{{'M07800'}}</td>
132
+        <td v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 && this.$store.getters.xt_user.org_id != 10387" colspan="6">{{info.dise_name}}</td>
133
+        <td v-else-if="this.$store.getters.xt_user.org_id == 10188 || this.$store.getters.xt_user.org_id == 10217" colspan="6">{{'M07800'}}</td>
134
+        <td v-else-if="this.$store.getters.xt_user.org_id == 10387" colspan="6">{{'M07801'}}</td>
135
+
132 136
       </tr>
133 137
       <tr>
134 138
         <td>业务类别</td>

+ 320 - 288
src/xt_pages/outpatientTool/components/settle.vue View File

@@ -46,16 +46,16 @@
46 46
                 <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
47 47
 
48 48
               </el-popover> -->
49
-              <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
49
+              <el-button size="small" type="primary" @click="dialogVisible = true">报表下载</el-button>
50 50
           </div>
51 51
       </div>
52 52
       <el-table :data="tableData" border :row-style="{ color: '#303133' }"
53 53
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
54
-                show-summary
54
+
55 55
                 v-loading="settle_loading"
56 56
                 max-height="600"
57 57
                 :span-method="merge"
58
-                :summary-method="getTotal"
58
+
59 59
                 highlight-current-row>
60 60
 
61 61
           <el-table-column align="center" prop="name" label="患者名字" fixed>
@@ -121,7 +121,16 @@
121 121
                   <div v-if="scope.row.med_type == '992102'">单病种(992102)</div>
122 122
               </template>
123 123
           </el-table-column>
124
-          <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
124
+
125
+
126
+<!--        <el-table-column align="center" prop="item_name" label="透析模式">-->
127
+<!--          <template slot-scope="scope">-->
128
+<!--            <div v-if="scope.row.sch.id == 0">未排版</div>-->
129
+<!--            <div v-if="scope.row.sch.id > 0">{{modeOptions[scope.row.sch.mode_id].name}}</div>-->
130
+<!--          </template>-->
131
+<!--        </el-table-column>-->
132
+
133
+        <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
125 134
               <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
126 135
           </el-table-column>
127 136
           <el-table-column align="center" prop="fund_pay_sumamt" label="基金支付金额">
@@ -257,193 +266,36 @@
257 266
 
258 267
       </el-table>
259 268
 
260
-    <el-table ref="report-table" :data="tableData" v-show="false" border :row-style="{ color: '#303133' }"
261
-              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
262
-              show-summary
263
-              v-loading="settle_loading"
264
-              max-height="600"
265
-              :span-method="merge"
266
-              :summary-method="getTotal"
267
-              highlight-current-row>
268
-
269
-      <el-table-column align="center" prop="name" label="患者名字">
270
-        <template slot-scope="scope">{{ scope.row.other_name }}</template>
271
-      </el-table-column>
272
-      <el-table-column align="center" prop="item_name" label="身份证">
273
-        <template slot-scope="scope">
274
-          {{scope.row.id_card_no}}
275
-        </template>
276
-      </el-table-column>
277
-      <el-table-column align="center" prop="item_name" label="就诊号">
278
-        <template slot-scope="scope">
279
-          {{scope.row.mdtrt_id}}
280
-        </template>
281
-      </el-table-column>
282
-      <el-table-column align="center" prop="item_name" label="治疗日期">
283
-        <template slot-scope="scope">
284
-          {{getTimes(scope.row.settle_accounts_date)}}
285
-        </template>
286
-      </el-table-column>
287
-
288
-      <el-table-column align="center" prop="item_name" label="结算日期">
289
-        <template slot-scope="scope">
290
-          {{scope.row.setl_time?scope.row.setl_time.split(" ")[0]:getTimes(scope.row.settle_accounts_date)}}
291
-        </template>
292
-      </el-table-column>
293
-      <el-table-column align="center" prop="item_name" label="病种名称">
294
-        <template slot-scope="scope">
295
-          {{getSickName(scope.row.his.sick_type)}}
296
-        </template>
297
-      </el-table-column>
298
-
299
-      <el-table-column align="center" prop="item_name" label="参保地">
300
-        <template slot-scope="scope">
301
-          {{getName(scope.row.his.insuplc_admdvs) + '(' + scope.row.his.insuplc_admdvs +')'}}
302
-        </template>
303
-      </el-table-column>
304
-
305
-      <el-table-column align="center" prop="item_name" label="结算类型">
306
-        <template slot-scope="scope">
307
-          <div v-if="scope.row.is_medicine_insurance == 0">自费</div>
308
-          <div v-if="scope.row.is_medicine_insurance == 1 ">{{getTypeName(scope.row)}}</div>
309
-
310
-        </template>
311
-      </el-table-column>
312
-      <el-table-column align="center" prop="item_name" label="处方类型">
313
-        <template slot-scope="scope">
314
-          <div v-if="scope.row.med_type == '14'">门诊特殊病</div>
315
-          <div v-if="scope.row.med_type == '11'">普通门诊</div>
316
-          <div v-if="scope.row.med_type == '1112'">普通门诊</div>
317
-          <div v-if="scope.row.med_type == '140104'">门诊特殊病(140104)</div>
318
-          <div v-if="scope.row.med_type == '140201'">门诊特病(140201)</div>
319
-          <div v-if="scope.row.med_type == '992102'">单病种(992102)</div>
320
-        </template>
321
-      </el-table-column>
322
-      <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
323
-        <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
324
-      </el-table-column>
325
-      <el-table-column align="center" prop="fund_pay_sumamt" label="基金支付金额">
326
-        <template slot-scope="scope">{{scope.row.fund_pay_sumamt.toFixed(2)}}</template>
327
-      </el-table-column>
328
-      <el-table-column align="center" prop="acct_pay" label="个人账户支付金额">
329
-        <template slot-scope="scope">{{scope.row.acct_pay.toFixed(2)}}</template>
330
-      </el-table-column>
331
-      <el-table-column align="center" prop="psn_cash_pay" label="个人支付金额">
332
-        <template slot-scope="scope">{{scope.row.psn_cash_pay.toFixed(2)}}</template>
333
-      </el-table-column>
334
-      <el-table-column align="center" prop="hifp_pay" label="基金统筹金额">
335
-        <template slot-scope="scope">{{scope.row.hifp_pay.toFixed(2)}}</template>
336
-      </el-table-column>
337
-
338
-      <el-table-column align="center" prop="hifob_pay" label="大额基金支付">
339
-        <template slot-scope="scope">{{scope.row.hifob_pay.toFixed(2)}}</template>
340
-      </el-table-column>
341
-      <el-table-column align="center" prop="preselfpay_amt" label="先行自付金额">
342
-        <template slot-scope="scope">{{scope.row.preselfpay_amt.toFixed(2)}}</template>
343
-      </el-table-column>
344
-
345
-      <el-table-column align="center" prop="overlmt_self_pay" label="超限价金额">
346
-        <template slot-scope="scope">{{scope.row.overlmt_self_pay.toFixed(2)}}</template>
347
-      </el-table-column>
348
-
349
-      <el-table-column align="center" prop="fulamt_ownpay_amt" label="全自费金额">
350
-        <template slot-scope="scope">{{scope.row.fulamt_ownpay_amt.toFixed(2)}}</template>
351
-      </el-table-column>
352
-
353
-      <el-table-column align="center" prop="inscp_scp_amt" label="符合政策范围金额">
354
-        <template slot-scope="scope">{{scope.row.inscp_scp_amt.toFixed(2)}}</template>
355
-      </el-table-column>
356
-
357
-      <el-table-column align="center" prop="maf_pay" label="医疗救助基金">
358
-        <template slot-scope="scope">{{scope.row.maf_pay.toFixed(2)}}</template>
359
-      </el-table-column>
360
-
361
-      <el-table-column align="center" prop="hifes_pay" label="企业补充医疗保险基金支出">
362
-        <template slot-scope="scope">{{scope.row.hifes_pay.toFixed(2)}}</template>
363
-      </el-table-column>
364
-
365
-
366
-      <el-table-column align="center" prop="hifmi_pay" label="居民大病保险资金支出">
367
-        <template slot-scope="scope">{{scope.row.hifmi_pay.toFixed(2)}}</template>
368
-      </el-table-column>
369
-
370
-      <el-table-column align="center" prop="oth_pay" label="其他支付">
371
-        <template slot-scope="scope">{{scope.row.oth_pay.toFixed(2)}}</template>
372
-      </el-table-column>
373
-
374
-      <el-table-column align="center" prop="cvlserv_pay" label="公务员医疗补助资金支出">
375
-        <template slot-scope="scope">{{scope.row.cvlserv_pay.toFixed(2)}}</template>
376
-      </el-table-column>
377
-
378
-
379
-
380
-      <el-table-column align="center" prop="wechat_pay" label="发票号码">
381
-        <template slot-scope="scope">{{scope.row.fa_piao_number}}</template>
382
-      </el-table-column>
383
-
384
-      <el-table-column align="center" prop="wechat_pay" label="发票编号">
385
-        <template slot-scope="scope">{{scope.row.fa_piao_code}}</template>
386
-      </el-table-column>
387
-
388
-
389
-      <el-table-column align="center" prop="wechat_pay" label="微信支付">
390
-        <template slot-scope="scope">{{scope.row.wechat_pay}}</template>
391
-
392
-<!--        <template slot-scope="scope" style="width: 100px">-->
393
-<!--          <el-input v-model="scope.row.wechat_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
394
-<!--        </template>-->
395
-      </el-table-column>
396
-
397
-      <el-table-column align="center" prop="ali_pay" label="支付宝支付">
398
-                  <template slot-scope="scope">{{scope.row.ali_pay}}</template>
399
-<!--        <template slot-scope="scope" style="width: 100px">-->
400
-<!--          <el-input  v-model="scope.row.ali_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
401
-<!--        </template>-->
402
-      </el-table-column>
403
-
404
-      <el-table-column align="center" prop="band_card_pay" label="银行卡支付">
405
-                  <template slot-scope="scope">{{scope.row.band_card_pay}}</template>
406
-<!--        <template slot-scope="scope" style="width: 100px">-->
407
-<!--          <el-input v-model="scope.row.band_card_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
408
-<!--        </template>-->
409
-      </el-table-column>
410
-
411
-      <el-table-column align="center" prop="jifen_pay" label="积分支付">
412
-                  <template slot-scope="scope">{{scope.row.jifen_pay}}</template>
413
-<!--        <template slot-scope="scope" style="width: 100px">-->
414
-<!--          <el-input v-model="scope.row.jifen_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
415
-<!--        </template>-->
416
-      </el-table-column>
417
-
418
-      <el-table-column align="center" prop="cash_pay" label="现金支付">
419
-                  <template slot-scope="scope">{{scope.row.cash_pay}}</template>
420
-<!--        <template slot-scope="scope" style="width: 100px">-->
421
-<!--          <el-input v-model="scope.row.cash_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
422
-<!--        </template>-->
423
-      </el-table-column>
424
-
425
-
426
-      <el-table-column align="center" prop="card_desc" label="储值卡说明">
427
-        <template slot-scope="scope">{{scope.row.card_desc}}</template>
428
-        <!--        <template slot-scope="scope" style="width: 100px">-->
429
-        <!--          <el-input v-model="scope.row.oth_desc"></el-input>-->
430
-        <!--        </template>-->
431
-      </el-table-column>
432
-
433
-      <el-table-column align="center" prop="item_name" label="其他说明">
434
-                  <template slot-scope="scope">{{scope.row.oth_desc}}</template>
435
-<!--        <template slot-scope="scope" style="width: 100px">-->
436
-<!--          <el-input v-model="scope.row.oth_desc"></el-input>-->
437
-<!--        </template>-->
438
-      </el-table-column>
439
-
440
-      <el-table-column align="center" prop="total" label="费用总额">
441
-        <template slot-scope="scope">
442
-          <div>{{scope.row.total.toFixed(2)}}</div>
443
-        </template>
444
-      </el-table-column>
445 269
 
446
-    </el-table>
270
+    <el-dialog
271
+      title="提示"
272
+      :visible.sync="dialogVisible"
273
+      width="30%"
274
+    >
275
+      <span>选择下载时间段</span>
276
+
277
+      <el-date-picker
278
+        v-model="chargeDate"
279
+        type="daterange"
280
+        value-format="yyyy-MM-dd"
281
+        range-separator="至"
282
+        start-placeholder="开始日期"
283
+        end-placeholder="结束日期">
284
+      </el-date-picker>
285
+
286
+      <span slot="footer" class="dialog-footer">
287
+                <el-button @click="dialogVisible = false">取 消</el-button>
288
+                <el-button type="primary" @click="export_detail">确 定</el-button>
289
+             </span>
290
+    </el-dialog>
291
+
292
+    <el-pagination
293
+      @size-change="handleSizeChangeOne"
294
+      @current-change="handleCurrentChangeOne"
295
+      background
296
+      style="margin-top:20px;float: right"
297
+      :total="total"
298
+    ></el-pagination>
447 299
 
448 300
   </div>
449 301
 </template>
@@ -462,20 +314,25 @@ import { uParseTime } from '@/utils/tools'
462 314
     },
463 315
     data() {
464 316
       return {
317
+        total:0,
318
+        limit:10,
319
+        page:1,
465 320
         settle_loading:false,
466 321
         crumbs: [],
467 322
         tempArr: [],
468 323
         sameRowArr: [],
324
+        dialogVisible:false,
325
+        modeOptions:this.$store.getters.treatment_mode,
469 326
         tableData: [],
327
+        tableData_three: [],
470 328
         config:{},
471 329
         sick:{},
330
+        chargeDate_two:[moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
472 331
         chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
473 332
         item_type: '0',
474 333
         items: [
475 334
           { id: 1, name: '医保' },
476 335
           { id: 2, name: '自费' },
477
-          { id: 3, name: '门诊特殊病' },
478
-          { id: 4, name: '普通门诊' },
479 336
           { id: 5, name: '城乡居民基本医疗保险' },
480 337
           { id: 6, name: '职工基本医疗保险' }
481 338
 
@@ -485,6 +342,18 @@ import { uParseTime } from '@/utils/tools'
485 342
       }
486 343
     },
487 344
     methods: {
345
+      handleSizeChangeOne(val) {
346
+        this.limit = val
347
+        this.GetRemindPatientList();
348
+      },
349
+      handleCurrentChangeOne(val) {
350
+        this.page = val;
351
+        this.GetRemindPatientList();
352
+      },
353
+      getMode(id){
354
+
355
+
356
+      },
488 357
       change(id,desc,type){
489 358
         let params = {
490 359
           id: id,
@@ -591,7 +460,10 @@ import { uParseTime } from '@/utils/tools'
591 460
           start_time: start_time,
592 461
           end_time: end_time,
593 462
           type: this.item_type,
594
-          keyword: this.keywords
463
+          keyword: this.keywords,
464
+          limit:this.limit,
465
+          page:this.page,
466
+          s_type: 1,
595 467
         }
596 468
         this.settle_loading = true
597 469
         GetSummarySettle(params).then(response => {
@@ -603,9 +475,9 @@ import { uParseTime } from '@/utils/tools'
603 475
           } else {
604 476
             this.settle_loading = false
605 477
             this.tableData = []
478
+            this.total = response.data.data.total
606 479
             this.config = response.data.data.config
607 480
             this.sick = response.data.data.sick
608
-
609 481
             let data = response.data.data.patients
610 482
 
611 483
             for (let i = 0; i < data.length; i++) {
@@ -747,103 +619,263 @@ import { uParseTime } from '@/utils/tools'
747 619
         return sums
748 620
       },
749 621
       export_detail() {
622
+        // this.getSummarySettleList()
623
+        let start_time = this.chargeDate[0]
624
+        let end_time = this.chargeDate[1]
625
+        let params = {
626
+          start_time: start_time,
627
+          end_time: end_time,
628
+          type: this.item_type,
629
+          keyword: this.keywords,
630
+          s_type:2,
631
+        }
632
+
633
+        GetSummarySettle(params).then(response => {
634
+          if (response.data.state == 0) {
635
+
636
+
637
+            this.$message.error(response.data.msg)
638
+            return false
639
+          } else {
640
+            this.settle_loading = false
641
+            this.tableData_three = []
642
+            this.config = response.data.data.config
643
+            this.sick = response.data.data.sick
750 644
 
751
-        let list = []
752
-        // for (let i = 0; i < this.tableData.length; i++) {
753
-        //   let order = this.tableData[i]
754
-        //   let name = order.other_name
755
-        //   let id_card_no = order.id_card_no
756
-        //
757
-        //   let time = ''
758
-        //   let balance_accounts = ""
759
-        //   let med_type = ""
760
-        //   let medfee_sumamt = ""
761
-        //   let fund_pay_sumamt = ""
762
-        //   let acct_pay = ""
763
-        //   let psn_cash_pay = ""
764
-        //   let hifes_pay = ""
765
-        //   let hifmi_pay = ""
766
-        //   let hifp_pay = ""
767
-        //   let hifob_pay = ""
768
-        //   let maf_pay = ""
769
-        //   let time2 = ""
770
-        //   time2 = this.getTimes(order.settle_accounts_date)
771
-        //
772
-        //   let total = ""
773
-        //
774
-        //   if(order.setl_time.length == 0){
775
-        //
776
-        //     time = this.getTimes(order.settle_accounts_date)
777
-        //
778
-        //   }else {
779
-        //
780
-        //     time = order.setl_time.split(" ")[0]
781
-        //
782
-        //   }
783
-        //
784
-        //   if (order.is_medicine_insurance == 0) {
785
-        //     balance_accounts = '自费'
786
-        //   }
787
-        //
788
-        //   if (order.is_medicine_insurance == 1) {
789
-        //     balance_accounts = '医保'
790
-        //   }
791
-        //
792
-        //   if (order.med_type == '14') {
793
-        //     med_type = '门诊特殊病'
794
-        //   }
795
-        //
796
-        //   if (order.med_type == '11') {
797
-        //     med_type = '普通门诊'
798
-        //   }
799
-        //
800
-        //   medfee_sumamt = order.medfee_sumamt
801
-        //   fund_pay_sumamt = order.fund_pay_sumamt
802
-        //
803
-        //   acct_pay = order.acct_pay
804
-        //
805
-        //   psn_cash_pay = order.psn_cash_pay
806
-        //   hifes_pay = order.hifes_pay
807
-        //   hifmi_pay = order.hifmi_pay
808
-        //   hifp_pay = order.hifp_pay
809
-        //   hifob_pay = order.hifob_pay
810
-        //   maf_pay = order.maf_pay
811
-        //   total = order.total
812
-        //
813
-        //
814
-        //   let obj = {
815
-        //     '患者姓名': name,
816
-        //     '身份证': id_card_no,
817
-        //     '治疗日期': time2,
818
-        //     '结算日期': time,
819
-        //     '结算类型': balance_accounts,
820
-        //     '处方类型': med_type,
821
-        //     '医疗费总额': medfee_sumamt,
822
-        //     '基金支付金额': fund_pay_sumamt,
823
-        //     '基金统筹金额': hifp_pay,
824
-        //     '大额基金支付':hifob_pay,
825
-        //     '医疗救助基金':maf_pay,
826
-        //     '个人账户支付金额': acct_pay,
827
-        //     '个人支付基金': psn_cash_pay,
828
-        //     '企业补充医疗保险基金支出': hifes_pay,
829
-        //     '居民大病保险资金支出': hifmi_pay,
830
-        //     '费用总额':total,
831
-        //
832
-        //   }
833
-        //   list.push(obj)
834
-        // }
835
-        import('@/vendor/Export2Excel').then(excel => {
836
-          const tHeader = [ '患者姓名','身份证', '治疗日期','结算日期', '结算类型', '处方类型', '医疗费总额', '基金支付金额', '个人账户支付金额', '个人支付基金','企业补充医疗保险基金支出','居民大病保险资金支出', '费用总额']
837
-          const filterVal = [ '患者姓名','身份证', '治疗日期','结算日期', '结算类型', '处方类型', '医疗费总额', '基金支付金额', '个人账户支付金额', '个人支付基金','企业补充医疗保险基金支出','居民大病保险资金支出',  '费用总额']
838
-          const data = this.formatJson(filterVal, list)
839
-          excel.export_json_to_excel1({
840
-            header: tHeader,
841
-            data,
842
-            filename: '结算明细',
843
-            ref:this.$refs['report-table'].$el
844
-          })
645
+            let data = response.data.data.patients
646
+
647
+            for (let i = 0; i < data.length; i++) {
648
+              let total = 0
649
+              for (let b = 0; b < data[i].orders.length; b++) {
650
+                let order = data[i].orders[b]
651
+                order['other_name'] = data[i].name
652
+                order['id'] = order.id
653
+                order['id_card_no'] = data[i].id_card_no
654
+                order['mdtrt_id'] =order.mdtrt_id
655
+                total = parseFloat((parseFloat(total.toString()) + parseFloat(data[i].orders[b].medfee_sumamt.toString())).toFixed(2).toString())
656
+              }
657
+              data[i]['total'] = total
658
+            }
659
+
660
+            for (let i = 0; i < data.length; i++) {
661
+              for (let b = 0; b < data[i].orders.length; b++) {
662
+                let order = data[i].orders[b]
663
+
664
+                if(b == 0){
665
+                  order['total'] = data[i].total
666
+
667
+                }else{
668
+                  order['total'] = 0
669
+
670
+                }
671
+                this.tableData_three.push(order)
672
+              }
673
+            }
674
+
675
+            let list = []
676
+            for (let i = 0; i < this.tableData_three.length; i++) {
677
+              let order = this.tableData_three[i]
678
+              let name = order.other_name
679
+              let id_card_no = order.id_card_no
680
+              let m_id = order.mdtrt_id
681
+              let setl_date = order.setl_time.split(" ")[0]
682
+              let setl_time = order.setl_time
683
+              let sick_name =this.getSickName(order.his.sick_type)
684
+              let cbd = this.getName(order.his.insuplc_admdvs) + "(" + order.his.insuplc_admdvs + ")"
685
+              let settle_type = ""
686
+              if(order.is_medicine_insurance == 0){
687
+                settle_type = "自费"
688
+              }else{
689
+                settle_type = this.getTypeName(order)
690
+              }
691
+
692
+              let med_name = ""
693
+              switch (order.med_type){
694
+                case "14":
695
+                  med_name = "门诊特殊病"
696
+                  break
697
+                case "11":
698
+                  med_name = "普通门诊"
699
+
700
+                  break
701
+                case "1112":
702
+                  med_name = "普通门诊"
703
+
704
+                  break
705
+                case "140104":
706
+                  med_name = "城乡门诊特殊病(140104)"
707
+
708
+                  break
709
+                case "140201":
710
+                  med_name = "门诊特病(140201)"
711
+
712
+                  break
713
+                case "992102":
714
+                  med_name = "单病种(992102)"
715
+                  break
716
+              }
717
+
718
+              let mode_name = ""
719
+              if(order.sch.id == 0){
720
+                mode_name = "未排班"
721
+              }else{
722
+                mode_name = this.modeOptions[order.sch.mode_id].name
723
+              }
724
+
725
+
726
+
727
+              let balance_accounts = ""
728
+              let med_type = ""
729
+              let medfee_sumamt = ""
730
+              let fund_pay_sumamt = ""
731
+              let acct_pay = ""
732
+              let psn_cash_pay = ""
733
+              let hifes_pay = ""
734
+              let hifmi_pay = ""
735
+              let hifp_pay = ""
736
+              let hifob_pay = ""
737
+              let maf_pay = ""
738
+              let time2 = ""
739
+              time2 = this.getTimes(order.settle_accounts_date)
740
+
741
+
742
+              medfee_sumamt = order.medfee_sumamt
743
+              fund_pay_sumamt = order.fund_pay_sumamt
744
+              acct_pay = order.acct_pay
745
+              psn_cash_pay = order.psn_cash_pay
746
+
747
+              console.log( order.psn_cash_pay)
748
+
749
+              console.log(psn_cash_pay)
750
+
751
+              hifp_pay = order.hifp_pay
752
+              hifob_pay = order.hifob_pay
753
+
754
+              let preselfpay_amt;
755
+              preselfpay_amt = order.preselfpay_amt
756
+
757
+
758
+              let overlmt_self_pay;
759
+              overlmt_self_pay = order.overlmt_self_pay
760
+
761
+              let fulamt_ownpay_amt;
762
+              fulamt_ownpay_amt = order.fulamt_ownpay_amt
763
+
764
+
765
+              let inscp_scp_amt;
766
+              inscp_scp_amt = order.inscp_scp_amt
767
+
768
+
769
+
770
+              maf_pay = order.maf_pay
771
+
772
+
773
+              hifes_pay = order.hifes_pay
774
+              hifmi_pay = order.hifmi_pay
775
+
776
+
777
+              let oth_pay;
778
+              oth_pay = order.oth_pay
779
+
780
+
781
+              let cvlserv_pay;
782
+              cvlserv_pay = order.cvlserv_pay
783
+
784
+
785
+
786
+              let fa_piao_code;
787
+              fa_piao_code = order.fa_piao_code
788
+
789
+
790
+              let fa_piao_number;
791
+              fa_piao_number = order.fa_piao_number
792
+
793
+              let ali_pay;
794
+              ali_pay = order.ali_pay
795
+
796
+
797
+              let band_card_pay;
798
+              band_card_pay = order.band_card_pay
799
+
800
+
801
+              let jifen_pay;
802
+              jifen_pay = order.jifen_pay
803
+
804
+              let wechat_pay;
805
+              wechat_pay = order.wechat_pay
806
+
807
+
808
+              let cash_pay;
809
+              cash_pay = order.cash_pay
810
+
811
+
812
+              let card_desc;
813
+              card_desc = order.card_desc
814
+
815
+
816
+              let oth_desc;
817
+              oth_desc = order.oth_desc
818
+
819
+
820
+              let obj = {
821
+                '患者姓名': name,
822
+                '身份证': id_card_no,
823
+                "就诊号": m_id,
824
+                '治疗日期': time2,
825
+                "结算日期": setl_date,
826
+                '结算时间': setl_time,
827
+                "病种名称":sick_name,
828
+                "参保地":cbd,
829
+                '结算类型': settle_type,
830
+                '处方类型':  med_name,
831
+                // "透析模式": mode_name,
832
+                '医疗费总额': medfee_sumamt,
833
+                '基金支付金额': fund_pay_sumamt,
834
+                '个人账户支付金额': acct_pay,
835
+                '个人支付金额': psn_cash_pay,
836
+                '基金统筹金额': hifp_pay,
837
+                '大额基金支付':hifob_pay,
838
+                '先行自付金额': preselfpay_amt,
839
+                '超限价金额': overlmt_self_pay,
840
+                '全自费金额': fulamt_ownpay_amt,
841
+                '符合政策范围金额': inscp_scp_amt,
842
+                '医疗救助基金':maf_pay,
843
+                '企业补充医疗保险基金支出': hifes_pay,
844
+                '居民大病保险资金支出': hifmi_pay,
845
+                '其他支付': oth_pay,
846
+                '公务员医疗补助资金支出': cvlserv_pay,
847
+                '发票号码': fa_piao_number,
848
+                '发票编号': fa_piao_code,
849
+                '微信支付': wechat_pay,
850
+                '支付宝支付': ali_pay,
851
+                '银行卡支付': band_card_pay,
852
+                '积分支付': jifen_pay,
853
+                '现金支付': cash_pay,
854
+                '储值卡说明': card_desc,
855
+                '其他说明': oth_desc,
856
+              }
857
+              list.push(obj)
858
+            }
859
+
860
+            if(list.length > 0){
861
+              import('@/vendor/Export2Excel').then(excel => {
862
+                const tHeader = ['患者姓名', '身份证', "就诊号", '治疗日期', '结算日期', "结算时间", "病种名称", "参保地", '结算类型', '处方类型', '医疗费总额', '基金支付金额', '个人账户支付金额', '个人支付金额', "基金统筹金额", "大额基金支付", "先行自付金额", "超限价金额", "全自费金额", "符合政策范围金额", "医疗救助基金", '企业补充医疗保险基金支出', '居民大病保险资金支出', "其他支付", "公务员医疗补助资金支出", "发票号码", "发票编号", "微信支付", "支付宝支付", "银行卡支付", "积分支付", "现金支付", "储值卡说明", '其他说明']
863
+                const filterVal = ['患者姓名', '身份证', "就诊号", '治疗日期', '结算日期', "结算时间", "病种名称", "参保地", '结算类型', '处方类型', '医疗费总额', '基金支付金额', '个人账户支付金额', '个人支付金额', "基金统筹金额", "大额基金支付", "先行自付金额", "超限价金额", "全自费金额", "符合政策范围金额", "医疗救助基金", '企业补充医疗保险基金支出', '居民大病保险资金支出', "其他支付", "公务员医疗补助资金支出", "发票号码", "发票编号", "微信支付", "支付宝支付", "银行卡支付", "积分支付", "现金支付", "储值卡说明", '其他说明']
864
+
865
+                const data = this.formatJson(filterVal, list)
866
+                excel.export_json_to_excel({
867
+                  header: tHeader,
868
+                  data,
869
+                  filename: '结算明细'
870
+                })
871
+              })
872
+            }
873
+
874
+          }
845 875
         })
846 876
 
877
+
878
+
847 879
       }, formatJson(filterVal, jsonData) {
848 880
         return jsonData.map(v => filterVal.map(j => v[j]))
849 881
       }

+ 5 - 0
src/xt_pages/outpatientTool/summary.vue View File

@@ -10,12 +10,15 @@
10 10
                     <el-tab-pane label="明细" name="明细"></el-tab-pane>
11 11
                     <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
12 12
                     <el-tab-pane label="结算" name="结算"></el-tab-pane>
13
+                  <el-tab-pane label="个人汇总结算" name="个人汇总结算"></el-tab-pane>
14
+
13 15
                   <el-tab-pane label="全部汇总" name="全部汇总"></el-tab-pane>
14 16
 
15 17
                 </el-tabs>
16 18
                 <detail v-if="titleType == '明细'"></detail>
17 19
                 <gather v-if="titleType == '汇总'"></gather>
18 20
                 <settle v-if="titleType == '结算'"></settle>
21
+              <person-settle v-if="titleType == '个人汇总结算'"></person-settle>
19 22
 <!--              <allgather v-if="titleType == '全部汇总'"></allgather>-->
20 23
               <allgather v-if="titleType == '全部汇总'"></allgather>
21 24
 
@@ -34,12 +37,14 @@
34 37
   import Gather from './components/gather'
35 38
   import Detail from './components/detail'
36 39
   import Allgather from './components/allgather.vue'
40
+  import PersonSettle from "./components/personSettle.vue";
37 41
 
38 42
 
39 43
   const moment = require('moment')
40 44
 
41 45
   export default {
42 46
     components: {
47
+      PersonSettle,
43 48
       Allgather,
44 49
       Gather,
45 50
       Settle,

+ 2 - 2
src/xt_pages/stock/drugs/inventoryPrint.vue View File

@@ -37,10 +37,10 @@
37 37
                         <td align="center">{{item.max_unit}}</td>
38 38
                         <td align="center">
39 39
                           <span v-if="item.stock_max_number>0">
40
-                            {{ item.stock_max_number }}{{ item.max_unit }}
40
+                            {{ item.stock_max_number }}{{ item.max_unit_one }}
41 41
                           </span>
42 42
                            <span v-if="item.stock_min_number>0">
43
-                            {{ item.stock_min_number }}{{ item.min_unit }}
43
+                            {{ item.stock_min_number }}{{ item.min_unit_one }}
44 44
                            </span>
45 45
                         </td>
46 46
                         <td align="center">