|
@@ -271,18 +271,18 @@
|
271
|
271
|
<template slot-scope="scope">{{ scope.row.drug_spec }}</template>
|
272
|
272
|
</el-table-column>
|
273
|
273
|
<el-table-column label="库存" width="60">
|
274
|
|
- <template slot-scope="scope">{{
|
275
|
|
- stockInCount(scope.row) -
|
276
|
|
- salesReturnCount(scope.row) -
|
277
|
|
- stockOutCount(scope.row) +
|
278
|
|
- cancelStockCount(scope.row)
|
279
|
|
- }}
|
|
274
|
+ <template slot-scope="scope">
|
|
275
|
+ {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}} / {{
|
|
276
|
+ scope.row.total * (scope.row.dose / scope.row.min_number)}}
|
|
277
|
+ {{(scope.row.total * (scope.row.dose /
|
|
278
|
+ scope.row.min_number))?scope.row.max_unit:''}}
|
280
|
279
|
</template>
|
281
|
280
|
</el-table-column>
|
282
|
281
|
<el-table-column label="单价" width="40">
|
283
|
282
|
<template slot-scope="scope">{{ scope.row.retail_price }}</template>
|
284
|
283
|
</el-table-column>
|
285
|
284
|
</el-table>
|
|
285
|
+ <div>{{3*(2/3)}}</div>
|
286
|
286
|
</div>
|
287
|
287
|
|
288
|
288
|
</el-tab-pane>
|
|
@@ -420,11 +420,10 @@
|
420
|
420
|
v-on:cancel="cancel"></next-or-last-prescription>
|
421
|
421
|
|
422
|
422
|
|
423
|
|
-
|
424
|
423
|
<!--<next-or-last-prescription ref='next_or_last_prescription' v-on:save="setValue" v-on:cancel="cancel"></next-or-last-prescription>-->
|
425
|
424
|
<call-prescription ref='call_prescription' v-on:call="call" v-on:call-cancel="callCancel"></call-prescription>
|
426
|
425
|
|
427
|
|
- <
|
|
426
|
+
|
428
|
427
|
</div>
|
429
|
428
|
</template>
|
430
|
429
|
|
|
@@ -432,6 +431,7 @@
|
432
|
431
|
<script>
|
433
|
432
|
import MonthPrescriptionTable from '../../outpatientCharges/components/monthPrescriptionTable'
|
434
|
433
|
import {
|
|
434
|
+ createdTemplate,
|
435
|
435
|
createHisPrescription,
|
436
|
436
|
delHisPrescription,
|
437
|
437
|
editHisPrescription,
|
|
@@ -440,8 +440,7 @@
|
440
|
440
|
getInitData,
|
441
|
441
|
getNextOrLastHisPrescription,
|
442
|
442
|
getPatientInfo,
|
443
|
|
- getSchedulePatientList,
|
444
|
|
- createdTemplate
|
|
443
|
+ getSchedulePatientList
|
445
|
444
|
} from '@/api/his/his'
|
446
|
445
|
import { getDictionaryDataConfig } from '@/utils/data'
|
447
|
446
|
import prescriptionTable from './prescriptionTable'
|
|
@@ -505,7 +504,7 @@
|
505
|
504
|
],
|
506
|
505
|
isLastOrNextVisible: false,
|
507
|
506
|
multipleTableHeight: '',
|
508
|
|
- register_type: 1,
|
|
507
|
+ register_type: '',
|
509
|
508
|
value: '0',
|
510
|
509
|
search_project_keyword: '',
|
511
|
510
|
form: {
|
|
@@ -573,7 +572,7 @@
|
573
|
572
|
sick: [],
|
574
|
573
|
diagnoses: [],
|
575
|
574
|
diagnose: 1,
|
576
|
|
- state1: 1,
|
|
575
|
+ state1: '',
|
577
|
576
|
curTotal: 0,
|
578
|
577
|
prescription_id: 0,
|
579
|
578
|
tempDrugs: [],
|
|
@@ -685,12 +684,6 @@
|
685
|
684
|
return cur
|
686
|
685
|
}, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
687
|
686
|
|
688
|
|
- console.log(drug_ids)
|
689
|
|
- console.log(project_ids)
|
690
|
|
- console.log(additions_ids)
|
691
|
|
-
|
692
|
|
- console.log(additions_ids)
|
693
|
|
-
|
694
|
687
|
let drugs = []
|
695
|
688
|
let projects = []
|
696
|
689
|
let additions = []
|
|
@@ -761,7 +754,6 @@
|
761
|
754
|
for (let i = 0; i < additions_ids.length; i++) {
|
762
|
755
|
let obj = {}
|
763
|
756
|
let count = 0
|
764
|
|
- console.log(addition_month_prescriptions.addition)
|
765
|
757
|
if (addition_month_prescriptions.addition) {
|
766
|
758
|
for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
|
767
|
759
|
if (additions_ids[i].price == addition_month_prescriptions.addition[a].price) {
|
|
@@ -777,14 +769,13 @@
|
777
|
769
|
}
|
778
|
770
|
}
|
779
|
771
|
|
780
|
|
-
|
781
|
772
|
let p1 = {
|
782
|
773
|
name: '处方' + 1,
|
783
|
774
|
advices: drugs,
|
784
|
775
|
project: [],
|
785
|
776
|
type: 1,
|
786
|
777
|
addition: additions
|
787
|
|
- };
|
|
778
|
+ }
|
788
|
779
|
let p2 = {
|
789
|
780
|
name: '处方' + 2,
|
790
|
781
|
type: 2,
|
|
@@ -792,12 +783,10 @@
|
792
|
783
|
advices: [],
|
793
|
784
|
addition: []
|
794
|
785
|
|
795
|
|
- };
|
796
|
|
- console.log(this.month_prescriptions);
|
797
|
|
- console.log(this.curMonthPrescriptions);
|
|
786
|
+ }
|
798
|
787
|
|
799
|
|
- this.month_prescriptions.push(p1);
|
800
|
|
- this.month_prescriptions.push(p2);
|
|
788
|
+ this.month_prescriptions.push(p1)
|
|
789
|
+ this.month_prescriptions.push(p2)
|
801
|
790
|
|
802
|
791
|
this.curMonthPrescriptions = this.month_prescriptions[0]
|
803
|
792
|
|
|
@@ -1034,7 +1023,7 @@
|
1034
|
1023
|
prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
|
1035
|
1024
|
medical_insurance_number: prescription.advices[b].med_list_codg,
|
1036
|
1025
|
id: prescription.advices[b].drug_id,
|
1037
|
|
- drug:prescription.advices[b].drug,
|
|
1026
|
+ drug: prescription.advices[b].drug
|
1038
|
1027
|
}
|
1039
|
1028
|
tempAdvice.push(obj)
|
1040
|
1029
|
}
|
|
@@ -1123,8 +1112,6 @@
|
1123
|
1112
|
}
|
1124
|
1113
|
getDayOrMonthHisPrescription(params).then(response => {
|
1125
|
1114
|
if (response.data.state == 1) {
|
1126
|
|
- console.log(val)
|
1127
|
|
- console.log(this.end_time)
|
1128
|
1115
|
this.month_prescriptions = []
|
1129
|
1116
|
if (val == this.start_time) {
|
1130
|
1117
|
var day_prescription = response.data.data.day_prescription
|
|
@@ -1153,7 +1140,7 @@
|
1153
|
1140
|
prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
|
1154
|
1141
|
medical_insurance_number: prescription.advices[b].med_list_codg,
|
1155
|
1142
|
id: prescription.advices[b].drug_id,
|
1156
|
|
- drug:prescription.advices[b].drug,
|
|
1143
|
+ drug: prescription.advices[b].drug
|
1157
|
1144
|
}
|
1158
|
1145
|
tempAdvice.push(obj)
|
1159
|
1146
|
}
|
|
@@ -1226,28 +1213,25 @@
|
1226
|
1213
|
}
|
1227
|
1214
|
})
|
1228
|
1215
|
|
1229
|
|
- },saveTemplate(val){
|
1230
|
|
- let params ={
|
1231
|
|
- name:val.name,
|
1232
|
|
- mode:val.mode,
|
1233
|
|
- patient_id:this.patientInfo.id
|
|
1216
|
+ }, saveTemplate(val) {
|
|
1217
|
+ let params = {
|
|
1218
|
+ name: val.name,
|
|
1219
|
+ mode: val.mode,
|
|
1220
|
+ patient_id: this.patientInfo.id
|
1234
|
1221
|
}
|
1235
|
1222
|
let data = {
|
1236
|
|
- "prescriptions":val.prescriptions,
|
|
1223
|
+ 'prescriptions': val.prescriptions
|
1237
|
1224
|
}
|
1238
|
|
-
|
1239
|
|
- createdTemplate(params,data).then(response => {
|
|
1225
|
+ createdTemplate(params, data).then(response => {
|
1240
|
1226
|
if (response.data.state == 1) {
|
1241
|
1227
|
this.$refs.saveTemplate.hide()
|
1242
|
1228
|
|
1243
|
|
- this.$message.success("保存成功")
|
|
1229
|
+ this.$message.success('保存成功')
|
1244
|
1230
|
} else {
|
1245
|
1231
|
this.$message.error(response.data.msg)
|
1246
|
1232
|
}
|
1247
|
1233
|
})
|
1248
|
1234
|
|
1249
|
|
-
|
1250
|
|
-
|
1251
|
1235
|
},
|
1252
|
1236
|
call(val) {
|
1253
|
1237
|
this.prescriptions = []
|
|
@@ -1704,15 +1688,12 @@
|
1704
|
1688
|
|
1705
|
1689
|
},
|
1706
|
1690
|
monthTabclickEvent(val) {
|
1707
|
|
- console.log(val)
|
1708
|
|
- console.log(this.month_prescriptions)
|
1709
|
1691
|
|
1710
|
1692
|
for (let i = 0; i < this.month_prescriptions.length; i++) {
|
1711
|
1693
|
if (this.month_prescriptions[i].name == val.name) {
|
1712
|
1694
|
if (this.dayorMonth == 'month') {
|
1713
|
1695
|
if (this.isShowDayPrescription) {
|
1714
|
1696
|
this.curDayPrescriptions = this.month_prescriptions[i]
|
1715
|
|
- console.log(this.curDayPrescriptions)
|
1716
|
1697
|
//用来区分处方属于项目还是药品
|
1717
|
1698
|
if (this.curDayPrescriptions.advices.length > 0 && this.curDayPrescriptions.project.length == 0) {
|
1718
|
1699
|
this.monthCustomTabIndex = 1
|
|
@@ -1807,23 +1788,21 @@
|
1807
|
1788
|
|
1808
|
1789
|
},
|
1809
|
1790
|
setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data) {
|
|
1791
|
+ this.curMonthPrescriptions = {}
|
|
1792
|
+ this.curPrescriptions = {}
|
1810
|
1793
|
|
|
1794
|
+ console.log(doctors)
|
1811
|
1795
|
for (let i = 0; i < doctors.length; i++) {
|
1812
|
1796
|
if (doctors[i].user_type == 1) {
|
1813
|
1797
|
doctors.splice(i, 1)
|
1814
|
1798
|
}
|
1815
|
1799
|
}
|
1816
|
1800
|
|
1817
|
|
- this.curMonthPrescriptions = {}
|
1818
|
|
- this.curPrescriptions = {}
|
1819
|
|
-
|
1820
|
1801
|
this.prescription_id = data[0].id
|
1821
|
1802
|
this.editableTabsValue = '处方1'
|
1822
|
1803
|
this.dayorMonth = 'day'
|
1823
|
1804
|
this.$emit('event1', this.prescription_id)
|
1824
|
1805
|
this.curStatus = 0
|
1825
|
|
- this.curPrescriptions = {}
|
1826
|
|
- this.curMonthPrescriptions = {}
|
1827
|
1806
|
if (month_data && month_data.length > 0) {
|
1828
|
1807
|
|
1829
|
1808
|
this.curMonthPrescriptions = month_data[0]
|
|
@@ -1925,6 +1904,7 @@
|
1925
|
1904
|
}
|
1926
|
1905
|
}
|
1927
|
1906
|
}
|
|
1907
|
+ console.log(info.register_type)
|
1928
|
1908
|
if (info.register_type == 0) {
|
1929
|
1909
|
for (let i = 0; i < this.register.length; i++) {
|
1930
|
1910
|
this.register_type = this.register[0].value
|
|
@@ -1937,8 +1917,24 @@
|
1937
|
1917
|
if (tab == 'more') {
|
1938
|
1918
|
return false
|
1939
|
1919
|
}
|
1940
|
|
- },open_three(){
|
1941
|
|
- this.$refs.saveTemplate.show(this.prescriptions)
|
|
1920
|
+ }, open_three() {
|
|
1921
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
1922
|
+ for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
|
|
1923
|
+ if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == '') {
|
|
1924
|
+ this.$message.error('药品处方总量不能为0')
|
|
1925
|
+ return
|
|
1926
|
+ }
|
|
1927
|
+ }
|
|
1928
|
+ }
|
|
1929
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
1930
|
+ for (let b = 0; b < this.prescriptions[i].project.length; b++) {
|
|
1931
|
+ if (this.prescriptions[i].project[b].total == 0 || this.prescriptions[i].project[b].total == '') {
|
|
1932
|
+ this.$message.error('项目处方总量不能为0')
|
|
1933
|
+ return
|
|
1934
|
+ }
|
|
1935
|
+ }
|
|
1936
|
+ }
|
|
1937
|
+ this.$refs.saveTemplate.show(this.prescriptions)
|
1942
|
1938
|
}, open_two() {
|
1943
|
1939
|
if (this.dayorMonth == 'day') {
|
1944
|
1940
|
if (this.patientInfo == null || this.patientInfo.id == 0) {
|
|
@@ -1968,34 +1964,48 @@
|
1968
|
1964
|
if (this.dayorMonth == 'day') {
|
1969
|
1965
|
|
1970
|
1966
|
if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
|
1971
|
|
- this.$message.error('请先开处方');
|
|
1967
|
+ this.$message.error('请先开处方')
|
1972
|
1968
|
return
|
1973
|
1969
|
}
|
1974
|
1970
|
}
|
1975
|
1971
|
|
1976
|
1972
|
if (this.dayorMonth == 'day') {
|
1977
|
1973
|
if (this.curPrescriptions.order_status == 2) {
|
1978
|
|
- this.$message.error('当前处方已经结算,无法保存');
|
|
1974
|
+ this.$message.error('当前处方已经结算,无法保存')
|
1979
|
1975
|
return
|
1980
|
1976
|
}
|
1981
|
1977
|
if (this.doctorValue.length <= 0) {
|
1982
|
|
- this.$message.error('医生不能为空');
|
|
1978
|
+ this.$message.error('医生不能为空')
|
1983
|
1979
|
return
|
1984
|
1980
|
}
|
1985
|
1981
|
|
1986
|
1982
|
if (this.departmentValue.length <= 0) {
|
1987
|
|
- this.$message.error('科室不能为空');
|
|
1983
|
+ this.$message.error('科室不能为空')
|
1988
|
1984
|
return
|
1989
|
1985
|
}
|
1990
|
|
-
|
1991
|
|
- if (this.state1 <= 0) {
|
1992
|
|
- this.$message.error('疾病类型不能为空');
|
|
1986
|
+ if (this.state1 <= 0) {
|
|
1987
|
+ this.$message.error('疾病类型不能为空')
|
1993
|
1988
|
return
|
1994
|
1989
|
}
|
1995
|
|
-
|
|
1990
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
1991
|
+ for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
|
|
1992
|
+ if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == '') {
|
|
1993
|
+ this.$message.error('药品处方总量不能为0')
|
|
1994
|
+ return
|
|
1995
|
+ }
|
|
1996
|
+ }
|
|
1997
|
+ }
|
|
1998
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
1999
|
+ for (let b = 0; b < this.prescriptions[i].project.length; b++) {
|
|
2000
|
+ if (this.prescriptions[i].project[b].total == 0 || this.prescriptions[i].project[b].total == '') {
|
|
2001
|
+ this.$message.error('项目处方总量不能为0')
|
|
2002
|
+ return
|
|
2003
|
+ }
|
|
2004
|
+ }
|
|
2005
|
+ }
|
1996
|
2006
|
if (index == 1) {
|
1997
|
2007
|
let params = {
|
1998
|
|
- p_type:2,
|
|
2008
|
+ p_type: 2,
|
1999
|
2009
|
patient_id: this.patientInfo.id,
|
2000
|
2010
|
diagnose: this.diagnose,
|
2001
|
2011
|
sick_type: this.state1,
|
|
@@ -2046,7 +2056,7 @@
|
2046
|
2056
|
if (response.data.state == 1) {
|
2047
|
2057
|
this.$emit('change', this.patientInfo.id)
|
2048
|
2058
|
this.$message.success('保存成功')
|
2049
|
|
- }else{
|
|
2059
|
+ } else {
|
2050
|
2060
|
this.$message.error(response.data.msg)
|
2051
|
2061
|
}
|
2052
|
2062
|
})
|
|
@@ -2106,7 +2116,6 @@
|
2106
|
2116
|
}
|
2107
|
2117
|
|
2108
|
2118
|
for (let b = 0; b < month_prescriptions[i].project.length; b++) {
|
2109
|
|
- console.log('~~~~~~~')
|
2110
|
2119
|
month_prescriptions[i].project[b].price = month_prescriptions[i].project[b].price.toString()
|
2111
|
2120
|
month_prescriptions[i].project[b].total = month_prescriptions[i].project[b].total.toString()
|
2112
|
2121
|
month_prescriptions[i].project[b].delivery_way = month_prescriptions[i].project[b].delivery_way.toString()
|
|
@@ -2378,7 +2387,6 @@
|
2378
|
2387
|
},
|
2379
|
2388
|
|
2380
|
2389
|
comfirm() {
|
2381
|
|
- console.log('222222222222', this.curPrescriptions)
|
2382
|
2390
|
|
2383
|
2391
|
// if (this.curPrescriptions.order_status == 2) {
|
2384
|
2392
|
// this.$message.error('该处方已经结算,无法继续添加药品或者项目')
|
|
@@ -2418,9 +2426,6 @@
|
2418
|
2426
|
}
|
2419
|
2427
|
}
|
2420
|
2428
|
|
2421
|
|
- console.log(this.curDrugs)
|
2422
|
|
- console.log(this.curPrescriptions.advices)
|
2423
|
|
-
|
2424
|
2429
|
for (let i = 0; i < this.curDrugs.length; i++) {
|
2425
|
2430
|
for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
|
2426
|
2431
|
if (this.curDrugs[i].id == this.curPrescriptions.advices[a].id) {
|
|
@@ -2497,8 +2502,8 @@
|
2497
|
2502
|
single_dose_unit: temp[b].min_unit,
|
2498
|
2503
|
prescribing_number_unit: temp[b].max_unit,
|
2499
|
2504
|
medical_insurance_number: temp[b].medical_insurance_number,
|
2500
|
|
- drug: temp[b],
|
2501
|
|
- };
|
|
2505
|
+ drug: temp[b]
|
|
2506
|
+ }
|
2502
|
2507
|
|
2503
|
2508
|
if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
|
2504
|
2509
|
obj.prescribing_number = 1
|
|
@@ -2520,7 +2525,6 @@
|
2520
|
2525
|
// }
|
2521
|
2526
|
|
2522
|
2527
|
if (temp2.length > 0) {
|
2523
|
|
- console.log('temp2222222222', temp2)
|
2524
|
2528
|
for (let b = 0; b < temp2.length; b++) {
|
2525
|
2529
|
let obj = {
|
2526
|
2530
|
id: 0,
|
|
@@ -2538,14 +2542,13 @@
|
2538
|
2542
|
unit: temp2[b].unit,
|
2539
|
2543
|
type: temp2[b].type
|
2540
|
2544
|
}
|
2541
|
|
- if (obj.total == 0) {
|
|
2545
|
+ if (obj.total == 0 || obj.total == undefined) {
|
2542
|
2546
|
obj.total = 1
|
2543
|
2547
|
}
|
2544
|
2548
|
if (obj.type == 3) {
|
2545
|
2549
|
obj.single_dose = 1
|
2546
|
2550
|
}
|
2547
|
2551
|
|
2548
|
|
- console.log(obj)
|
2549
|
2552
|
this.prescriptions[i].project.push(obj)
|
2550
|
2553
|
}
|
2551
|
2554
|
this.curStatus = 2
|
|
@@ -2639,14 +2642,12 @@
|
2639
|
2642
|
getAllProjectTeam().then(response => {
|
2640
|
2643
|
if (response.data.state == 1) {
|
2641
|
2644
|
var team = response.data.data.team
|
2642
|
|
- console.log('team2222', team)
|
2643
|
2645
|
this.tabPrjectTeam = team
|
2644
|
2646
|
this.projectList = team
|
2645
|
2647
|
}
|
2646
|
2648
|
})
|
2647
|
2649
|
},
|
2648
|
2650
|
selectTeam(row) {
|
2649
|
|
- console.log('row', row)
|
2650
|
2651
|
var arr = []
|
2651
|
2652
|
for (let i = 0; i < row.length; i++) {
|
2652
|
2653
|
arr.push(row[i].item_id)
|
|
@@ -2694,7 +2695,7 @@
|
2694
|
2695
|
unit: project[i].project.unit,
|
2695
|
2696
|
type: project[i].type
|
2696
|
2697
|
}
|
2697
|
|
- if (obj.total == 0) {
|
|
2698
|
+ if (obj.total == 0 || obj.total == undefined) {
|
2698
|
2699
|
obj.total = 1
|
2699
|
2700
|
}
|
2700
|
2701
|
|
|
@@ -2715,13 +2716,11 @@
|
2715
|
2716
|
unit: project[i].good_info.unit,
|
2716
|
2717
|
type: project[i].type
|
2717
|
2718
|
}
|
2718
|
|
- if (obj.total == 0) {
|
|
2719
|
+ if (obj.total == 0 || obj.total == undefined) {
|
2719
|
2720
|
obj.total = 1
|
2720
|
2721
|
}
|
2721
|
2722
|
this.teamList.push(obj)
|
2722
|
2723
|
|
2723
|
|
- console.log(this.teamList)
|
2724
|
|
-
|
2725
|
2724
|
}
|
2726
|
2725
|
}
|
2727
|
2726
|
|
|
@@ -2751,7 +2750,6 @@
|
2751
|
2750
|
getAllProjectList().then(response => {
|
2752
|
2751
|
if (response.data.state == 1) {
|
2753
|
2752
|
var hisprojectlist = response.data.data.hisprojectlist
|
2754
|
|
- console.log('hisprojectlist', hisprojectlist)
|
2755
|
2753
|
this.hisList = hisprojectlist
|
2756
|
2754
|
}
|
2757
|
2755
|
})
|