소스 검색

合并带嘛

csx 2 년 전
부모
커밋
6e3e0c8ae7
2개의 변경된 파일283개의 추가작업 그리고 19개의 파일을 삭제
  1. 9 0
      src/api/his/his_export.js
  2. 274 19
      src/xt_pages/outpatientCharges/summary.vue

+ 9 - 0
src/api/his/his_export.js 파일 보기

@@ -0,0 +1,9 @@
1
+import request from '@/utils/request'
2
+
3
+export function handleData10106(params) {
4
+  return request({
5
+    url: '/handleData10106',
6
+    method: 'get',
7
+    params: params
8
+  })
9
+}

+ 274 - 19
src/xt_pages/outpatientCharges/summary.vue 파일 보기

@@ -108,16 +108,18 @@
108 108
           >报表下载
109 109
           </el-button
110 110
           >
111
+          <el-button v-if="$store.getters.xt_user.org_id == 10106" size="small" type="primary" @click="export_detail_ten">报表下载2</el-button>
112
+
111 113
           <!--          <el-button size="small" type="primary" @click="export_detail_two"-->
112 114
           <!--          >报表下载2-->
113 115
           <!--          </el-button-->
114 116
           <!--          >-->
115 117
 
116
-          <!--          <el-button size="small" type="primary" @click="export_detail_three">报表下载2</el-button>-->
118
+          <!--                    <el-button size="small" type="primary" @click="export_detail_three">报表下载2</el-button>-->
117 119
           <!--          <el-button size="small" type="primary" @click="export_detail_four">报表下载3</el-button>-->
118 120
           <!--          <el-button size="small" type="primary" @click="export_detail_five">报表下载3</el-button>-->
119
-<!--          <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
120
-<!--          <el-button size="small" type="primary" @click="export_detail_seven">报表下载4</el-button>-->
121
+          <!--          <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
122
+          <!--          <el-button size="small" type="primary" @click="export_detail_seven">报表下载4</el-button>-->
121 123
 
122 124
 
123 125
         </div>
@@ -353,6 +355,8 @@ import {jsGetAge, uParseTime} from "@/utils/tools";
353 355
 
354 356
 import {getHisDataFive, getHisDataSix, getHisDataThree, getHisDataTwo} from "../../api/his/his";
355 357
 
358
+import {handleData10106} from "../../api/his/his_export";
359
+
356 360
 export default {
357 361
   name: "OutpatientChargesSummary",
358 362
   components: {
@@ -1216,7 +1220,7 @@ export default {
1216 1220
           var tarList = []
1217 1221
           for (let i = 0; i < list.length; i++) {
1218 1222
             let obj = {
1219
-              "周期": "2021年第三季度",
1223
+              "周期": "2022年第三季度",
1220 1224
               "类别": "门诊",
1221 1225
               "医保目录编码": list[i].code,
1222 1226
               "医保目录名称": list[i].name,
@@ -1263,7 +1267,7 @@ export default {
1263 1267
     },
1264 1268
     export_detail_seven() {
1265 1269
       let params = {};
1266
-      getHisDataFive(params).then((response) => {
1270
+      handleData10106(params).then((response) => {
1267 1271
         if (response.data.state == 0) {
1268 1272
           this.$message.error(response.data.msg);
1269 1273
           return false;
@@ -1271,11 +1275,12 @@ export default {
1271 1275
           let list = [];
1272 1276
           for (let i = 0; i < response.data.data.order.length; i++) {
1273 1277
             let order = response.data.data.order[i];
1278
+            console.log(order)
1274 1279
             let obj = {
1275 1280
               md: order.mdtrt_id,
1276 1281
               name: order.patient.name,
1277 1282
               kaichu: this.getTimes(order.settle_start_time),
1278
-              xianzhong: order.insutype,
1283
+              xianzhong: "",
1279 1284
               yingshou: order.medfee_sumamt,
1280 1285
               yibaotongchou: order.hifp_pay,
1281 1286
               dabingjijin: order.hifmi_pay,
@@ -1288,27 +1293,278 @@ export default {
1288 1293
               xueyetouxilvguo: 480,
1289 1294
               lvhuana: 3,
1290 1295
               zhihuanguan: 40,
1296
+              good_name: "",
1291 1297
             }
1292
-          }
1293
-          for (let b = 0; b < order.info.length; b++) {
1294
-            if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
1295
-              if (order.info[b].project.type == 2) {
1296
-                if (order.info[b].project.project.id == 254 || order.info[b].project.project.id == 253 || order.info[b].project.project.id == 250 || order.info[b].project.project.id == 249) {
1297
-                  obj['good_name'] = this.GetGoodName(order.info[b].project.project.id)
1298
-                }
1299
-              } else if (order.info[b].project.type == 3) {
1300
-                if (order.info[b].project.project.id == 1478|| order.info[b].project.project.id == 1479 || order.info[b].project.project.id == 1482 || order.info[b].project.project.id == 1483) {
1301
-                  obj['good_name'] = this.GetGoodName(order.info[b].project.project.id)
1298
+            if (order.insutype == "390") {
1299
+
1300
+              obj.xianzhong = "城乡"
1301
+            } else {
1302
+
1303
+              obj.xianzhong = "职工"
1304
+
1305
+            }
1306
+
1307
+            for (let b = 0; b < order.info.length; b++) {
1308
+              if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
1309
+                console.log("11111")
1310
+
1311
+                if (order.info[b].project.type == 2) {
1312
+                  console.log("22222222")
1313
+
1314
+                  if (order.info[b].project.project.id == 254 || order.info[b].project.project.id == 253 || order.info[b].project.project.id == 250 || order.info[b].project.project.id == 249) {
1315
+                    obj.good_name = this.GetGoodName(order.info[b].project.project.id)
1316
+                  }
1317
+                } else if (order.info[b].project.type == 3) {
1318
+                  console.log("3333333")
1319
+
1320
+                  if (order.info[b].project.project.id == 1478 || order.info[b].project.project.id == 1479 || order.info[b].project.project.id == 1482 || order.info[b].project.project.id == 1483 || order.info[b].project.project.id == 2577 || order.info[b].project.project.id == 2578 || order.info[b].project.project.id == 2058 || order.info[b].project.project.id == 2059) {
1321
+                    obj.good_name = this.GetGoodName(order.info[b].project.good_info.id)
1322
+                    console.log(obj.good_name)
1323
+
1324
+                  }
1302 1325
                 }
1326
+              }
1327
+            }
1328
+            list.push(obj)
1329
+          }
1303 1330
 
1304
-                obj['good_name'] = this.GetGoodName(order.info[b].project.good_info.id)
1331
+          var tarList = []
1332
+          for (let i = 0; i < list.length; i++) {
1333
+            if (list[i].good_name.length > 0) {
1334
+              let obj = {
1335
+                "序号": i + 1,
1336
+                "就诊号": list[i].md,
1337
+                "患者姓名": list[i].name,
1338
+                "开处时间": list[i].kaichu,
1339
+                "项目(透析器)": list[i].good_name,
1340
+                "血液透析滤过": list[i].xueyetouxilvguo,
1341
+                "0.9%氯化钠注射液": list[i].lvhuana,
1342
+                "置换液管": list[i].zhihuanguan,
1343
+                "险种类型": list[i].xianzhong,
1344
+                "应收金额": list[i].yingshou,
1345
+                "医保统筹金额": list[i].yibaotongchou,
1346
+                "大病基金金额": list[i].dabingjijin,
1347
+                "医疗救助金额": list[i].yiliaojiuzhu,
1348
+                "公务员基金": list[i].gongwujijin,
1349
+                "个人支付基金": list[i].gerenzhifu,
1350
+                "总金额": list[i].zongjine,
1351
+                "收费时间": list[i].setl_time,
1352
+                "结算类型": list[i].jiesuanleixing,
1353
+                "收费状态": "已收费",
1305 1354
               }
1355
+              tarList.push(obj)
1306 1356
             }
1307 1357
           }
1358
+
1359
+          import("@/vendor/Export2Excel").then((excel) => {
1360
+            const tHeader = [
1361
+              "序号",
1362
+              "就诊号",
1363
+              "患者姓名",
1364
+              "开处时间",
1365
+              "项目(透析器)",
1366
+              "血液透析滤过",
1367
+              "0.9%氯化钠注射液",
1368
+              "置换液管",
1369
+              "险种类型",
1370
+              "应收金额",
1371
+              "医保统筹金额",
1372
+              "大病基金金额",
1373
+              "医疗救助金额",
1374
+              "公务员基金",
1375
+              "个人支付基金",
1376
+              "总金额",
1377
+              "收费时间",
1378
+              "结算类型",
1379
+              "收费状态",
1380
+            ];
1381
+            const filterVal = [
1382
+              "序号",
1383
+              "就诊号",
1384
+              "患者姓名",
1385
+              "开处时间",
1386
+              "项目(透析器)",
1387
+              "血液透析滤过",
1388
+              "0.9%氯化钠注射液",
1389
+              "置换液管",
1390
+              "险种类型",
1391
+              "应收金额",
1392
+              "医保统筹金额",
1393
+              "大病基金金额",
1394
+              "医疗救助金额",
1395
+              "公务员基金",
1396
+              "个人支付基金",
1397
+              "总金额",
1398
+              "收费时间",
1399
+              "结算类型",
1400
+              "收费状态",
1401
+            ];
1402
+            const data = this.formatJson(filterVal, tarList);
1403
+            excel.export_json_to_excel({
1404
+              header: tHeader,
1405
+              data,
1406
+              filename: "消费明细",
1407
+            });
1408
+          });
1409
+
1308 1410
         }
1309 1411
       });
1310 1412
 
1311
-    }, GetGoodName(id) {
1413
+    },
1414
+    getType(med_chrgitm_type) {
1415
+      switch (med_chrgitm_type) {
1416
+        case '01':
1417
+          return '床位费'
1418
+          break
1419
+        case '02':
1420
+          return '诊察费'
1421
+
1422
+          break
1423
+        case '03':
1424
+          return '检查费'
1425
+
1426
+          break
1427
+        case '04':
1428
+          return '化验费'
1429
+          break
1430
+        case '05':
1431
+          return '治疗费'
1432
+
1433
+          break
1434
+        case '06':
1435
+          return '手术费'
1436
+
1437
+          break
1438
+        case '07':
1439
+          return '护理费'
1440
+
1441
+          break
1442
+        case '08':
1443
+          return '材料费'
1444
+
1445
+          break
1446
+        case '09':
1447
+          return '西药费'
1448
+
1449
+          break
1450
+        case '10':
1451
+          return '中药饮片费'
1452
+
1453
+          break
1454
+        case '11':
1455
+          return '中成药费'
1456
+
1457
+          break
1458
+        case '12':
1459
+          return '一般诊疗费'
1460
+
1461
+          break
1462
+        case '13':
1463
+          return '挂号费'
1464
+          break
1465
+        case '14':
1466
+          return '其他费'
1467
+          break
1468
+        case '0':
1469
+          return '其他费'
1470
+          break
1471
+
1472
+      }
1473
+
1474
+    },
1475
+
1476
+    export_detail_ten() {
1477
+      let params = {
1478
+        start_time:this.start_time,
1479
+        end_time:this.end_time
1480
+      };
1481
+      handleData10106(params).then((response) => {
1482
+        if (response.data.state == 0) {
1483
+          this.$message.error(response.data.msg);
1484
+          return false;
1485
+        } else {
1486
+          let list = [];
1487
+          for (let i = 0; i < response.data.data.order.length; i++) {
1488
+            let order = response.data.data.order[i];
1489
+            let med_chrgitm_types = []
1490
+            for (let b = 0; b < order.info.length; b++) {
1491
+              med_chrgitm_types.push(order.info[b].med_chrgitm_type)
1492
+              const obj = {}
1493
+              med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
1494
+                obj[next] ? '' : obj[next] = true && cur.push(next)
1495
+                return cur
1496
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1497
+            }
1498
+
1499
+            for (let i = 0; i < med_chrgitm_types.length; i++) {
1500
+              let price = 0
1501
+              let obj = {
1502
+                name: order.patient.name,
1503
+                idNo: order.patient.id_card_no,
1504
+                med_chrgitm_name:this.getType(med_chrgitm_types[i]),
1505
+                price:"",
1506
+                remark:"",
1507
+              }
1508
+              if(i == 0){
1509
+                obj.remark = "就诊日期:" + this.getTimes(order.settle_accounts_date) + " 医保报销: "+order.fund_pay_sumamt + " 现金:"+order.psn_cash_pay
1510
+              }else{
1511
+                obj.remark = ""
1512
+              }
1513
+              for (let b = 0; b < order.info.length; b++) {
1514
+                if(med_chrgitm_types[i] ==  order.info[b].med_chrgitm_type){
1515
+
1516
+                  price = price + order.info[b].det_item_fee_sumamt
1517
+                }
1518
+              }
1519
+              obj.price = price
1520
+              list.push(obj)
1521
+            }
1522
+
1523
+          }
1524
+
1525
+          var tarList = []
1526
+          for (let i = 0; i < list.length; i++) {
1527
+            let obj = {
1528
+              "姓名": list[i].name,
1529
+              "身份证":  list[i].idNo,
1530
+              "收费项目": list[i].med_chrgitm_name,
1531
+              "金额": list[i].price,
1532
+              "备注": list[i].remark,
1533
+
1534
+            }
1535
+            tarList.push(obj)
1536
+          }
1537
+
1538
+          import("@/vendor/Export2Excel").then((excel) => {
1539
+            const tHeader = [
1540
+              "姓名",
1541
+              "身份证",
1542
+              "收费项目",
1543
+              "金额",
1544
+              "备注",
1545
+            ];
1546
+            const filterVal = [
1547
+              "姓名",
1548
+              "身份证",
1549
+              "收费项目",
1550
+              "金额",
1551
+              "备注",
1552
+            ];
1553
+            const data = this.formatJson(filterVal, tarList);
1554
+            excel.export_json_to_excel({
1555
+              header: tHeader,
1556
+              data,
1557
+              filename: "消费明细",
1558
+            });
1559
+          });
1560
+
1561
+
1562
+        }
1563
+      });
1564
+
1565
+    },
1566
+
1567
+    GetGoodName(id) {
1312 1568
       switch (id) {
1313 1569
         case 254:
1314 1570
           return "空心纤维透析器REXEED-18UC(旭化成)"
@@ -1347,7 +1603,6 @@ export default {
1347 1603
           return "中空纤维透析器CTA-2000"
1348 1604
           break
1349 1605
 
1350
-
1351 1606
           break
1352 1607
 
1353 1608
       }