|
@@ -16,7 +16,8 @@
|
16
|
16
|
</el-form-item>
|
17
|
17
|
|
18
|
18
|
<el-form-item label="透析模式: " prop="mode_id" label-position="right">
|
19
|
|
- <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择">
|
|
19
|
+ <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
|
|
20
|
+ :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id == 0">
|
20
|
21
|
<el-option
|
21
|
22
|
v-for="item in modeOptions"
|
22
|
23
|
:key="item.id"
|
|
@@ -24,6 +25,15 @@
|
24
|
25
|
:value="item.id"
|
25
|
26
|
></el-option>
|
26
|
27
|
</el-select>
|
|
28
|
+ <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
|
|
29
|
+ :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id > 0">
|
|
30
|
+ <el-option
|
|
31
|
+ v-for="item in modeOptionsTwo"
|
|
32
|
+ :key="item.id"
|
|
33
|
+ :label="item.name"
|
|
34
|
+ :value="item.id"
|
|
35
|
+ ></el-option>
|
|
36
|
+ </el-select>
|
27
|
37
|
</el-form-item>
|
28
|
38
|
</el-form>
|
29
|
39
|
<div class="tabsBox">
|
|
@@ -239,6 +249,7 @@
|
239
|
249
|
import { uParseTime } from '@/utils/tools'
|
240
|
250
|
import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
|
241
|
251
|
import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
252
|
+
|
242
|
253
|
const moment = require('moment')
|
243
|
254
|
export default {
|
244
|
255
|
props: {
|
|
@@ -281,7 +292,7 @@
|
281
|
292
|
{ value: 11, label: '普通门诊' },
|
282
|
293
|
// { value: 12, label: '门诊挂号' },
|
283
|
294
|
// { value: 13, label: '急诊' },
|
284
|
|
- { value: 14, label: '门诊特殊病' },
|
|
295
|
+ { value: 14, label: '门诊特殊病' }
|
285
|
296
|
// { value: 15, label: '门诊统筹' },
|
286
|
297
|
// { value: 16, label: '门诊慢性病' },
|
287
|
298
|
// { value: 21, label: '普通住院' }
|
|
@@ -296,7 +307,9 @@
|
296
|
307
|
name: '',
|
297
|
308
|
mode_id: ''
|
298
|
309
|
},
|
299
|
|
- modeOptions: this.$store.getters.treatment_mode,
|
|
310
|
+ modeOptions:{},
|
|
311
|
+ modeOptionsTwo: {},
|
|
312
|
+
|
300
|
313
|
start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
|
301
|
314
|
end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
|
302
|
315
|
isLastOrNextVisible: false,
|
|
@@ -400,34 +413,28 @@
|
400
|
413
|
}
|
401
|
414
|
}
|
402
|
415
|
|
403
|
|
-
|
404
|
416
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
405
|
|
- for(let b = 0; b < this.prescriptions[i].advices.length; b++){
|
|
417
|
+ for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
|
406
|
418
|
if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].advices[b].drug.is_special_diseases != 1) {
|
407
|
|
- this.$message.error("处方" + (i+1).toString() +"属于特病类型处方,开非特病类型的药")
|
|
419
|
+ this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,开非特病类型的药')
|
408
|
420
|
return
|
409
|
421
|
}
|
410
|
422
|
|
411
|
423
|
}
|
412
|
424
|
|
413
|
|
- for(let c = 0; c < this.prescriptions[i].project.length; c++){
|
414
|
|
- if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 2 && this.prescriptions[i].project[c].project.disease_directory != 1) {
|
415
|
|
- this.$message.error("处方" + (i+1).toString() +"属于特病类型处方,请开特病类型的项目")
|
|
425
|
+ for (let c = 0; c < this.prescriptions[i].project.length; c++) {
|
|
426
|
+ if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 2 && this.prescriptions[i].project[c].project.disease_directory != 1) {
|
|
427
|
+ this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,请开特病类型的项目')
|
416
|
428
|
return
|
417
|
429
|
}
|
418
|
430
|
|
419
|
|
- if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 3 && this.prescriptions[i].project[c].good_info.is_special_diseases != 1) {
|
420
|
|
- this.$message.error("处方" + (i+1).toString() +"属于特病类型处方,请开特病类型的耗材")
|
421
|
|
- return
|
|
431
|
+ if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 3 && this.prescriptions[i].project[c].good_info.is_special_diseases != 1) {
|
|
432
|
+ this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,请开特病类型的耗材')
|
|
433
|
+ return
|
422
|
434
|
}
|
423
|
435
|
}
|
424
|
436
|
}
|
425
|
437
|
|
426
|
|
-
|
427
|
|
-
|
428
|
|
-
|
429
|
|
-
|
430
|
|
-
|
431
|
438
|
let params = {
|
432
|
439
|
name: this.tempForm.name,
|
433
|
440
|
mode_id: this.tempForm.mode_id,
|
|
@@ -454,6 +461,9 @@
|
454
|
461
|
this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
|
455
|
462
|
this.prescriptions[i].advices[b].groupno = parseInt(this.prescriptions[i].advices[b].groupno)
|
456
|
463
|
|
|
464
|
+ this.prescriptions[i].advices[b].day_count = parseInt(this.prescriptions[i].advices[b].day_count)
|
|
465
|
+ this.prescriptions[i].advices[b].frequency_type = parseInt(this.prescriptions[i].advices[b].frequency_type)
|
|
466
|
+ this.prescriptions[i].advices[b].week_day = this.prescriptions[i].advices[b].week_day.toString()
|
457
|
467
|
|
458
|
468
|
}
|
459
|
469
|
|
|
@@ -461,6 +471,11 @@
|
461
|
471
|
this.prescriptions[i].project[b].price = this.prescriptions[i].project[b].price.toString()
|
462
|
472
|
this.prescriptions[i].project[b].total = this.prescriptions[i].project[b].total.toString()
|
463
|
473
|
this.prescriptions[i].project[b].delivery_way = this.prescriptions[i].project[b].delivery_way.toString()
|
|
474
|
+
|
|
475
|
+ this.prescriptions[i].project[b].day_count = parseInt(this.prescriptions[i].project[b].day_count)
|
|
476
|
+ this.prescriptions[i].project[b].frequency_type = parseInt(this.prescriptions[i].project[b].frequency_type)
|
|
477
|
+ this.prescriptions[i].project[b].week_day = this.prescriptions[i].project[b].week_day.toString()
|
|
478
|
+
|
464
|
479
|
}
|
465
|
480
|
}
|
466
|
481
|
let data = {
|
|
@@ -469,6 +484,11 @@
|
469
|
484
|
createdTemplate(params, data).then(response => {
|
470
|
485
|
if (response.data.state == 1) {
|
471
|
486
|
this.$message.success('保存成功')
|
|
487
|
+ for (const mkey in this.modeOptions) {
|
|
488
|
+ if (mkey == this.tempForm.mode_id) {
|
|
489
|
+ delete this.modeOptions[mkey]
|
|
490
|
+ }
|
|
491
|
+ }
|
472
|
492
|
} else {
|
473
|
493
|
this.$message.error(response.data.msg)
|
474
|
494
|
}
|
|
@@ -933,6 +953,10 @@
|
933
|
953
|
this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
|
934
|
954
|
this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
|
935
|
955
|
|
|
956
|
+ this.prescriptions[i].advices[b].day_count = parseInt(this.prescriptions[i].advices[b].day_count)
|
|
957
|
+ this.prescriptions[i].advices[b].frequency_type = parseInt(this.prescriptions[i].advices[b].frequency_type)
|
|
958
|
+ this.prescriptions[i].advices[b].week_day = this.prescriptions[i].advices[b].week_day.toString()
|
|
959
|
+
|
936
|
960
|
}
|
937
|
961
|
|
938
|
962
|
for (let b = 0; b < this.prescriptions[i].project.length; b++) {
|
|
@@ -940,6 +964,10 @@
|
940
|
964
|
this.prescriptions[i].project[b].total = this.prescriptions[i].project[b].total.toString()
|
941
|
965
|
this.prescriptions[i].project[b].delivery_way = this.prescriptions[i].project[b].delivery_way.toString()
|
942
|
966
|
|
|
967
|
+ this.prescriptions[i].project[b].day_count = parseInt(this.prescriptions[i].project[b].day_count)
|
|
968
|
+ this.prescriptions[i].project[b].frequency_type = parseInt(this.prescriptions[i].project[b].frequency_type)
|
|
969
|
+ this.prescriptions[i].project[b].week_day = this.prescriptions[i].project[b].week_day.toString()
|
|
970
|
+
|
943
|
971
|
}
|
944
|
972
|
|
945
|
973
|
for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
|
|
@@ -1089,11 +1117,7 @@
|
1089
|
1117
|
|
1090
|
1118
|
}
|
1091
|
1119
|
|
1092
|
|
-
|
1093
|
|
-
|
1094
|
|
- obj.med_type = 14
|
1095
|
|
-
|
1096
|
|
-
|
|
1120
|
+ obj.med_type = 14
|
1097
|
1121
|
|
1098
|
1122
|
this.prescriptions.push(obj)
|
1099
|
1123
|
|
|
@@ -1307,30 +1331,30 @@
|
1307
|
1331
|
// this.$refs.multipleTable.clearSelection()
|
1308
|
1332
|
// return
|
1309
|
1333
|
// }
|
1310
|
|
- // if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
|
1311
|
|
- // if (this.$store.getters.xt_user.org_id == 10138) {
|
1312
|
|
- // for (let i = 0; i < this.curDrugs.length; i++) {
|
1313
|
|
- // if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
1314
|
|
- // this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
1315
|
|
- // return
|
1316
|
|
- // }
|
1317
|
|
-
|
1318
|
|
- // }
|
1319
|
|
- // }
|
1320
|
|
- // }
|
1321
|
|
-
|
1322
|
|
- // if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
|
1323
|
|
- // if (this.$store.getters.xt_user.org_id == 10138) {
|
1324
|
|
- // for (let i = 0; i < this.curDrugs.length; i++) {
|
1325
|
|
- // if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
1326
|
|
- // this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
1327
|
|
- // return
|
1328
|
|
- // }
|
1329
|
|
-
|
1330
|
|
- // }
|
1331
|
|
- // }
|
1332
|
|
- // }
|
1333
|
|
- if (this.curDrugs.length > 0) {
|
|
1334
|
+ // if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
|
|
1335
|
+ // if (this.$store.getters.xt_user.org_id == 10138) {
|
|
1336
|
+ // for (let i = 0; i < this.curDrugs.length; i++) {
|
|
1337
|
+ // if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
|
1338
|
+ // this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
|
1339
|
+ // return
|
|
1340
|
+ // }
|
|
1341
|
+
|
|
1342
|
+ // }
|
|
1343
|
+ // }
|
|
1344
|
+ // }
|
|
1345
|
+
|
|
1346
|
+ // if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
|
|
1347
|
+ // if (this.$store.getters.xt_user.org_id == 10138) {
|
|
1348
|
+ // for (let i = 0; i < this.curDrugs.length; i++) {
|
|
1349
|
+ // if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
|
1350
|
+ // this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
|
1351
|
+ // return
|
|
1352
|
+ // }
|
|
1353
|
+
|
|
1354
|
+ // }
|
|
1355
|
+ // }
|
|
1356
|
+ // }
|
|
1357
|
+ if (this.curDrugs.length > 0) {
|
1334
|
1358
|
for (let i = 0; i < this.curDrugs.length; i++) {
|
1335
|
1359
|
if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
1336
|
1360
|
this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
|
@@ -1353,18 +1377,16 @@
|
1353
|
1377
|
let arr = this.teamList
|
1354
|
1378
|
let newArr = []
|
1355
|
1379
|
arr.map(item => {
|
1356
|
|
- if(this.curPrescriptions.med_type != 14){
|
|
1380
|
+ if (this.curPrescriptions.med_type != 14) {
|
1357
|
1381
|
newArr.push(item)
|
1358
|
1382
|
}
|
1359
|
|
- if(this.curPrescriptions.med_type == 14 && item.is_special_diseases == 1){
|
|
1383
|
+ if (this.curPrescriptions.med_type == 14 && item.is_special_diseases == 1) {
|
1360
|
1384
|
newArr.push(item)
|
1361
|
1385
|
}
|
1362
|
1386
|
})
|
1363
|
1387
|
this.teamList = newArr
|
1364
|
1388
|
}
|
1365
|
1389
|
|
1366
|
|
-
|
1367
|
|
-
|
1368
|
1390
|
if (this.curDrugs.length == 0) {
|
1369
|
1391
|
for (let i = 0; i < this.curDrugs.length; i++) {
|
1370
|
1392
|
if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
|
@@ -1401,7 +1423,6 @@
|
1401
|
1423
|
}
|
1402
|
1424
|
}
|
1403
|
1425
|
|
1404
|
|
-
|
1405
|
1426
|
for (let i = 0; i < this.curDrugs.length; i++) {
|
1406
|
1427
|
for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
|
1407
|
1428
|
if (this.curDrugs[i].id == this.curPrescriptions.advices[a].id) {
|
|
@@ -1488,9 +1509,9 @@
|
1488
|
1509
|
medical_insurance_number: temp[b].medical_insurance_number,
|
1489
|
1510
|
drug: temp[b],
|
1490
|
1511
|
groupno: index + temp_index,
|
1491
|
|
- frequency_type:1,
|
1492
|
|
- day_count:0,
|
1493
|
|
- week_day:"",
|
|
1512
|
+ frequency_type: 1,
|
|
1513
|
+ day_count: 0,
|
|
1514
|
+ week_day: ''
|
1494
|
1515
|
}
|
1495
|
1516
|
|
1496
|
1517
|
if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
|
|
@@ -1501,7 +1522,6 @@
|
1501
|
1522
|
this.curStatus = 1
|
1502
|
1523
|
}
|
1503
|
1524
|
|
1504
|
|
-
|
1505
|
1525
|
if (temp2.length > 0) {
|
1506
|
1526
|
for (let b = 0; b < temp2.length; b++) {
|
1507
|
1527
|
let obj = {
|
|
@@ -1519,14 +1539,14 @@
|
1519
|
1539
|
medical_code: temp2[b].medical_code,
|
1520
|
1540
|
unit: temp2[b].unit,
|
1521
|
1541
|
type: temp2[b].type,
|
1522
|
|
- frequency_type:1,
|
1523
|
|
- day_count:0,
|
1524
|
|
- week_day:"",
|
|
1542
|
+ frequency_type: 1,
|
|
1543
|
+ day_count: 0,
|
|
1544
|
+ week_day: ''
|
1525
|
1545
|
}
|
1526
|
|
- if (temp2[b].type == 2){
|
|
1546
|
+ if (temp2[b].type == 2) {
|
1527
|
1547
|
obj['project'] = temp2[b].project
|
1528
|
1548
|
|
1529
|
|
- }else if(temp2[b].type == 3){
|
|
1549
|
+ } else if (temp2[b].type == 3) {
|
1530
|
1550
|
|
1531
|
1551
|
obj['good_info'] = temp2[b].good_info
|
1532
|
1552
|
|
|
@@ -1598,11 +1618,10 @@
|
1598
|
1618
|
medical_insurance_number: prescription.advices[b].med_list_codg,
|
1599
|
1619
|
id: prescription.advices[b].drug_id,
|
1600
|
1620
|
drug: prescription.advices[b].drug,
|
1601
|
|
- groupno:prescription.advices[b].groupno,
|
1602
|
|
- frequency_type:prescription.advices[b].frequency_type,
|
1603
|
|
- day_count:prescription.advices[b].day_count,
|
1604
|
|
- week_day:prescription.advices[b].week_day
|
1605
|
|
-
|
|
1621
|
+ groupno: prescription.advices[b].groupno,
|
|
1622
|
+ frequency_type: prescription.advices[b].frequency_type,
|
|
1623
|
+ day_count: prescription.advices[b].day_count,
|
|
1624
|
+ week_day: prescription.advices[b].week_day
|
1606
|
1625
|
|
1607
|
1626
|
}
|
1608
|
1627
|
tempAdvice.push(obj)
|
|
@@ -1625,9 +1644,9 @@
|
1625
|
1644
|
medical_code: prescription.project[b].project.medical_code,
|
1626
|
1645
|
unit: prescription.project[b].project.unit,
|
1627
|
1646
|
type: prescription.project[b].type,
|
1628
|
|
- frequency_type:prescription.project[b].frequency_type,
|
1629
|
|
- day_count:prescription.project[b].day_count,
|
1630
|
|
- week_day:prescription.project[b].week_day
|
|
1647
|
+ frequency_type: prescription.project[b].frequency_type,
|
|
1648
|
+ day_count: prescription.project[b].day_count,
|
|
1649
|
+ week_day: prescription.project[b].week_day
|
1631
|
1650
|
|
1632
|
1651
|
}
|
1633
|
1652
|
|
|
@@ -1637,9 +1656,6 @@
|
1637
|
1656
|
obj['project_name'] = prescription.project[b].project.project_name
|
1638
|
1657
|
obj['project'] = prescription.project[b].project
|
1639
|
1658
|
|
1640
|
|
-
|
1641
|
|
-
|
1642
|
|
-
|
1643
|
1659
|
} else if (prescription.project[b].type == 3) {
|
1644
|
1660
|
obj['statistical_classification'] = ''
|
1645
|
1661
|
obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
|
|
@@ -1687,10 +1703,7 @@
|
1687
|
1703
|
med_type: ''
|
1688
|
1704
|
}
|
1689
|
1705
|
|
1690
|
|
-
|
1691
|
|
- obj.med_type = 14
|
1692
|
|
-
|
1693
|
|
-
|
|
1706
|
+ obj.med_type = 14
|
1694
|
1707
|
|
1695
|
1708
|
this.prescriptions.push(obj)
|
1696
|
1709
|
this.curPrescriptions = this.prescriptions[0]
|
|
@@ -1720,7 +1733,7 @@
|
1720
|
1733
|
unit: project[i].unit,
|
1721
|
1734
|
type: 2,
|
1722
|
1735
|
is_special_diseases: project[i].disease_directory,
|
1723
|
|
- project: project[i],
|
|
1736
|
+ project: project[i]
|
1724
|
1737
|
}
|
1725
|
1738
|
|
1726
|
1739
|
this.tabProject.push(obj)
|
|
@@ -1742,7 +1755,7 @@
|
1742
|
1755
|
unit: this.getGoodUnit(good_info[i].good_unit),
|
1743
|
1756
|
type: 3,
|
1744
|
1757
|
is_special_diseases: good_info[i].is_special_diseases,
|
1745
|
|
- good_info: good_info[i],
|
|
1758
|
+ good_info: good_info[i]
|
1746
|
1759
|
}
|
1747
|
1760
|
this.tabProject.push(obj)
|
1748
|
1761
|
}
|
|
@@ -1836,7 +1849,7 @@
|
1836
|
1849
|
unit: project[i].project.unit,
|
1837
|
1850
|
type: project[i].type,
|
1838
|
1851
|
is_special_diseases: project[i].project.disease_directory,
|
1839
|
|
- project:project[i].project,
|
|
1852
|
+ project: project[i].project
|
1840
|
1853
|
}
|
1841
|
1854
|
if (obj.total == 0 || obj.total == undefined) {
|
1842
|
1855
|
obj.total = 1
|
|
@@ -1859,7 +1872,7 @@
|
1859
|
1872
|
unit: project[i].good_info.unit,
|
1860
|
1873
|
type: project[i].type,
|
1861
|
1874
|
is_special_diseases: project[i].good_info.is_special_diseases,
|
1862
|
|
- good_info:project[i].good_info,
|
|
1875
|
+ good_info: project[i].good_info
|
1863
|
1876
|
}
|
1864
|
1877
|
if (obj.total == 0 || obj.total == undefined) {
|
1865
|
1878
|
obj.total = 1
|
|
@@ -1905,6 +1918,25 @@
|
1905
|
1918
|
this.$refs.tabProjectTeam.clearSelection()
|
1906
|
1919
|
}
|
1907
|
1920
|
}, created() {
|
|
1921
|
+ for(let key in this.$store.getters.treatment_mode){
|
|
1922
|
+ this.modeOptions[key] = this.$store.getters.treatment_mode[key]
|
|
1923
|
+ this.modeOptionsTwo[key]= this.$store.getters.treatment_mode[key]
|
|
1924
|
+
|
|
1925
|
+ }
|
|
1926
|
+ var modes = this.$route.query.modes.split(',')
|
|
1927
|
+ console.log('~~~~~~~~~~')
|
|
1928
|
+
|
|
1929
|
+ console.log(modes)
|
|
1930
|
+
|
|
1931
|
+ for (const mkey in this.modeOptions) {
|
|
1932
|
+ console.log(mkey)
|
|
1933
|
+ for (let b = 0; b < modes.length; b++) {
|
|
1934
|
+ if (mkey == parseInt(modes[b])) {
|
|
1935
|
+ delete this.modeOptions[mkey]
|
|
1936
|
+ }
|
|
1937
|
+ }
|
|
1938
|
+ }
|
|
1939
|
+
|
1908
|
1940
|
this.getPrescriptionTemplateInfo()
|
1909
|
1941
|
this.getInitData()
|
1910
|
1942
|
//获取所有项目
|