|
@@ -24,18 +24,18 @@
|
24
|
24
|
<el-input v-model="patientInfo.id_card_no" placeholder="" readonly></el-input>
|
25
|
25
|
</el-form-item>
|
26
|
26
|
<!--<el-form-item label="处方类型: " prop="name" label-position="right">-->
|
27
|
|
- <!--<el-select style="width:100%;" v-model="register_type" placeholder="">-->
|
28
|
|
- <!--<el-option-->
|
29
|
|
- <!--v-for="(item,index) in register"-->
|
30
|
|
- <!--:key="index"-->
|
31
|
|
- <!--:label="item.label"-->
|
32
|
|
- <!--:value="item.value">-->
|
33
|
|
- <!--</el-option>-->
|
34
|
|
- <!--</el-select>-->
|
|
27
|
+ <!--<el-select style="width:100%;" v-model="register_type" placeholder="">-->
|
|
28
|
+ <!--<el-option-->
|
|
29
|
+ <!--v-for="(item,index) in register"-->
|
|
30
|
+ <!--:key="index"-->
|
|
31
|
+ <!--:label="item.label"-->
|
|
32
|
+ <!--:value="item.value">-->
|
|
33
|
+ <!--</el-option>-->
|
|
34
|
+ <!--</el-select>-->
|
35
|
35
|
<!--</el-form-item>-->
|
36
|
36
|
<el-form-item label="疾病类型:" prop="name" label-position="right">
|
37
|
37
|
|
38
|
|
- <el-select filterable style="width:100%;" v-model="state1" placeholder="">
|
|
38
|
+ <el-select filterable style="width:100%;" v-model="state1" placeholder="">
|
39
|
39
|
<el-option
|
40
|
40
|
v-for="(item,index) in sick"
|
41
|
41
|
:key="index"
|
|
@@ -48,7 +48,7 @@
|
48
|
48
|
|
49
|
49
|
<el-form-item label="诊断:" prop="name" label-position="right" style="width:66.6%;">
|
50
|
50
|
|
51
|
|
- <el-select style="width:100%;" v-model="diagnose" placeholder="" multiple filterable>
|
|
51
|
+ <el-select style="width:100%;" v-model="diagnose" placeholder="" multiple filterable>
|
52
|
52
|
<el-option
|
53
|
53
|
v-for="(item,index) in diagnoses"
|
54
|
54
|
:key="index"
|
|
@@ -128,7 +128,8 @@
|
128
|
128
|
</el-date-picker>
|
129
|
129
|
|
130
|
130
|
|
131
|
|
- <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型" @change="changevalue" >
|
|
131
|
+ <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"
|
|
132
|
+ @change="changevalue">
|
132
|
133
|
<el-option
|
133
|
134
|
v-for="(item,index) in register"
|
134
|
135
|
:key="index"
|
|
@@ -280,8 +281,8 @@
|
280
|
281
|
</el-table-column>
|
281
|
282
|
<el-table-column label="规格" width="60">
|
282
|
283
|
<template slot-scope="scope">
|
283
|
|
- <!-- {{ scope.row.drug_spec }} -->
|
284
|
|
- <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}} * </span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
|
|
284
|
+ <!-- {{ scope.row.drug_spec }} -->
|
|
285
|
+ <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}} * </span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
|
285
|
286
|
</template>
|
286
|
287
|
</el-table-column>
|
287
|
288
|
<el-table-column label="库存" width="60">
|
|
@@ -519,25 +520,25 @@
|
519
|
520
|
{ value: 11, label: '普通门诊' },
|
520
|
521
|
// { value: 12, label: '门诊挂号' },
|
521
|
522
|
// { value: 13, label: '急诊' },
|
522
|
|
- { value: 14, label: '门诊特殊病' },
|
|
523
|
+ { value: 14, label: '门诊特殊病' }
|
523
|
524
|
// { value: 15, label: '门诊统筹' },
|
524
|
525
|
// { value: 16, label: '门诊慢性病' },
|
525
|
526
|
// { value: 21, label: '普通住院' }
|
526
|
527
|
|
527
|
528
|
],
|
528
|
|
- medical_care:[
|
529
|
|
- {value: 11, label: "普通门诊"},
|
530
|
|
- {value: 12, label: '家庭通道'},
|
531
|
|
- {value: 13, label: "门诊大病"},
|
532
|
|
- {value: 14, label: "重疾特药"},
|
533
|
|
- {value: 15, label: "门诊慢病"},
|
534
|
|
- {value: 16, label: "门诊特检"},
|
535
|
|
- {value: 17, label: "健康体检"},
|
536
|
|
- {value: 18, label: "预防接种"},
|
537
|
|
- {value: 19, label: "门诊输血"},
|
538
|
|
- {value: 91, label: "新冠肺炎门诊"},
|
539
|
|
- {value: 1111, label: "精一"},
|
540
|
|
- {value: 1112, label: "精二"},
|
|
529
|
+ medical_care: [
|
|
530
|
+ { value: 11, label: '普通门诊' },
|
|
531
|
+ { value: 12, label: '家庭通道' },
|
|
532
|
+ { value: 13, label: '门诊大病' },
|
|
533
|
+ { value: 14, label: '重疾特药' },
|
|
534
|
+ { value: 15, label: '门诊慢病' },
|
|
535
|
+ { value: 16, label: '门诊特检' },
|
|
536
|
+ { value: 17, label: '健康体检' },
|
|
537
|
+ { value: 18, label: '预防接种' },
|
|
538
|
+ { value: 19, label: '门诊输血' },
|
|
539
|
+ { value: 91, label: '新冠肺炎门诊' },
|
|
540
|
+ { value: 1111, label: '精一' },
|
|
541
|
+ { value: 1112, label: '精二' }
|
541
|
542
|
|
542
|
543
|
],
|
543
|
544
|
|
|
@@ -546,7 +547,7 @@
|
546
|
547
|
register_type: '',
|
547
|
548
|
value: '0',
|
548
|
549
|
search_project_keyword: '',
|
549
|
|
- search_project_team_keyword:"",
|
|
550
|
+ search_project_team_keyword: '',
|
550
|
551
|
form: {
|
551
|
552
|
name: ''
|
552
|
553
|
},
|
|
@@ -588,7 +589,7 @@
|
588
|
589
|
showTwo: false,
|
589
|
590
|
tableData: [],
|
590
|
591
|
tabPrjectTeam: [],
|
591
|
|
- allTabPrjectTeam:[],
|
|
592
|
+ allTabPrjectTeam: [],
|
592
|
593
|
teamList: [],
|
593
|
594
|
doctors: [],
|
594
|
595
|
departMent: [],
|
|
@@ -746,7 +747,6 @@
|
746
|
747
|
// obj['single_dose_unit'] = drug_month_prescriptions.advices[a].single_dose_unit
|
747
|
748
|
obj['single_dose_unit'] = drug_month_prescriptions.advices[a].drug.dose_unit
|
748
|
749
|
|
749
|
|
-
|
750
|
750
|
// obj['retail_price'] = obj['retail_price'] + drug_month_prescriptions.advices[a].drug.retail_price
|
751
|
751
|
obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
|
752
|
752
|
obj['drug'] = drug_month_prescriptions.advices[a].drug
|
|
@@ -1299,8 +1299,7 @@
|
1299
|
1299
|
':' + (min < 10 ? '0' + min : min)
|
1300
|
1300
|
this.prescriptions[i]['pre_time'] = nowTime
|
1301
|
1301
|
|
1302
|
|
- this.prescriptions[i]['med_type'] = 14
|
1303
|
|
-
|
|
1302
|
+ this.prescriptions[i]['med_type'] = 14
|
1304
|
1303
|
|
1305
|
1304
|
this.prescriptions[i].name = '处方' + (i + 1)
|
1306
|
1305
|
if (i == 0) {
|
|
@@ -1324,7 +1323,7 @@
|
1324
|
1323
|
this.$refs.call_prescription.close()
|
1325
|
1324
|
this.$emit('setData', this.prescriptions)
|
1326
|
1325
|
|
1327
|
|
- },changevalue(val){
|
|
1326
|
+ }, changevalue(val) {
|
1328
|
1327
|
|
1329
|
1328
|
this.$forceUpdate()
|
1330
|
1329
|
|
|
@@ -1742,7 +1741,6 @@
|
1742
|
1741
|
this.diagnoses = response.data.data.diagnose
|
1743
|
1742
|
this.additions = response.data.data.additions
|
1744
|
1743
|
|
1745
|
|
-
|
1746
|
1744
|
}
|
1747
|
1745
|
})
|
1748
|
1746
|
|
|
@@ -1847,12 +1845,11 @@
|
1847
|
1845
|
this.teamList = []
|
1848
|
1846
|
|
1849
|
1847
|
},
|
1850
|
|
- setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data,last_info) {
|
|
1848
|
+ setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
|
1851
|
1849
|
this.curMonthPrescriptions = {}
|
1852
|
1850
|
this.curPrescriptions = {}
|
1853
|
1851
|
// this.$refs.tabProjectTeam.clearSelection()
|
1854
|
1852
|
|
1855
|
|
-
|
1856
|
1853
|
for (let i = 0; i < doctors.length; i++) {
|
1857
|
1854
|
if (doctors[i].user_type == 1) {
|
1858
|
1855
|
doctors.splice(i, 1)
|
|
@@ -1865,12 +1862,9 @@
|
1865
|
1862
|
this.$emit('event1', this.prescription_id)
|
1866
|
1863
|
this.curStatus = 0
|
1867
|
1864
|
if (month_data && month_data.length > 0) {
|
1868
|
|
-
|
1869
|
1865
|
this.curMonthPrescriptions = month_data[0]
|
1870
|
|
-
|
1871
|
1866
|
} else {
|
1872
|
1867
|
this.curMonthPrescriptions = {}
|
1873
|
|
-
|
1874
|
1868
|
}
|
1875
|
1869
|
|
1876
|
1870
|
if (data && data.length > 0) {
|
|
@@ -1880,7 +1874,6 @@
|
1880
|
1874
|
this.curPrescriptions = {}
|
1881
|
1875
|
}
|
1882
|
1876
|
|
1883
|
|
-
|
1884
|
1877
|
if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
|
1885
|
1878
|
this.curStatus = 1
|
1886
|
1879
|
this.customTabIndex = 1
|
|
@@ -1897,7 +1890,6 @@
|
1897
|
1890
|
this.showTwo = true
|
1898
|
1891
|
}
|
1899
|
1892
|
|
1900
|
|
-
|
1901
|
1893
|
if (this.curPrescriptions.project.length == 0 && this.curPrescriptions.advices.length == 0) {
|
1902
|
1894
|
this.curStatus = 1
|
1903
|
1895
|
this.customTabIndex = 1
|
|
@@ -1906,9 +1898,6 @@
|
1906
|
1898
|
this.showTwo = false
|
1907
|
1899
|
}
|
1908
|
1900
|
|
1909
|
|
-
|
1910
|
|
-
|
1911
|
|
-
|
1912
|
1901
|
if (info.prescription_status == 0) {
|
1913
|
1902
|
this.order_status = ''
|
1914
|
1903
|
}
|
|
@@ -1924,113 +1913,288 @@
|
1924
|
1913
|
this.order_status = '已退费'
|
1925
|
1914
|
}
|
1926
|
1915
|
|
|
1916
|
+ if (info.id > 0) {
|
|
1917
|
+ this.doctorValue = info.doctor_id
|
|
1918
|
+ this.departmentValue = info.departments
|
|
1919
|
+ } else {
|
|
1920
|
+ if(admin_info.id > 0 && admin_info.user_type == 2){
|
|
1921
|
+ this.doctorValue = admin_info.admin_user_id
|
|
1922
|
+ this.departmentValue = this.department[0].id
|
1927
|
1923
|
|
|
1924
|
+ }else{
|
1928
|
1925
|
|
1929
|
|
- getInitData().then(response => {
|
1930
|
|
- if (response.data.state == 0) {
|
1931
|
|
- this.$message.error(response.data.msg)
|
1932
|
|
- return false
|
1933
|
|
- } else {
|
1934
|
|
- this.drugs = response.data.data.drugs
|
1935
|
|
- this.allDrugs = response.data.data.drugs
|
1936
|
|
- this.advices_template = response.data.data.advices_template
|
1937
|
|
- this.doctors = response.data.data.doctors
|
1938
|
|
- for (let i = 0; i < this.doctors.length; i++) {
|
1939
|
|
- if (this.doctors[i].user_type == 1) {
|
1940
|
|
- this.doctors.splice(i, 1)
|
1941
|
|
- }
|
1942
|
|
- }
|
1943
|
|
- this.department = response.data.data.department
|
1944
|
|
- this.sick = response.data.data.sick
|
1945
|
|
- this.diagnoses = response.data.data.diagnose
|
1946
|
|
- this.additions = response.data.data.additions
|
|
1926
|
+ this.doctorValue = this.doctors[0].admin_user_id
|
|
1927
|
+ this.departmentValue = this.department[0].id
|
1947
|
1928
|
|
|
1929
|
+ }
|
1948
|
1930
|
|
1949
|
1931
|
|
|
1932
|
+ }
|
1950
|
1933
|
|
|
1934
|
+ if (info.register_type == 0) {
|
|
1935
|
+ for (let i = 0; i < this.register.length; i++) {
|
|
1936
|
+ this.register_type = this.register[0].value
|
|
1937
|
+ }
|
|
1938
|
+ } else {
|
|
1939
|
+ this.register_type = info.register_type
|
|
1940
|
+ }
|
|
1941
|
+ this.diagnose = []
|
1951
|
1942
|
|
1952
|
|
- if (info.id > 0) {
|
1953
|
|
- this.doctorValue = info.doctor_id
|
1954
|
|
- this.departmentValue = info.departments
|
1955
|
|
- } else {
|
1956
|
|
- if(admin_info.id > 0 && admin_info.user_type == 2){
|
1957
|
|
- this.doctorValue = admin_info.admin_user_id
|
1958
|
|
- this.departmentValue = this.department[0].id
|
|
1943
|
+ if(info.id == 0){
|
|
1944
|
+ if(last_info.diagnosis.length == 0){
|
|
1945
|
+ this.diagnose = []
|
|
1946
|
+ }else{
|
|
1947
|
+ for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
|
|
1948
|
+ this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
|
1959
|
1949
|
|
1960
|
|
- }else{
|
|
1950
|
+ }
|
|
1951
|
+ }
|
1961
|
1952
|
|
1962
|
|
- this.doctorValue = this.doctors[0].admin_user_id
|
1963
|
|
- this.departmentValue = this.department[0].id
|
|
1953
|
+ if(last_info.sick_history == 0){
|
|
1954
|
+ this.state2 = ''
|
|
1955
|
+ }else{
|
|
1956
|
+ this.state2 = last_info.sick_history
|
|
1957
|
+ }
|
1964
|
1958
|
|
1965
|
|
- }
|
1966
|
1959
|
|
|
1960
|
+ }else{
|
|
1961
|
+ this.state2 = info.sick_history
|
|
1962
|
+ if (this.state2 == 0) {
|
|
1963
|
+ this.state2 = ''
|
|
1964
|
+ }
|
|
1965
|
+ if(info.diagnosis.length == 0){
|
|
1966
|
+ this.diagnose = []
|
|
1967
|
+ }else{
|
|
1968
|
+ for(let i = 0; i < info.diagnosis.split(",").length;i++){
|
|
1969
|
+ this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
|
1967
|
1970
|
|
1968
|
1971
|
}
|
1969
|
1972
|
|
1970
|
|
- if (info.register_type == 0) {
|
1971
|
|
- for (let i = 0; i < this.register.length; i++) {
|
1972
|
|
- this.register_type = this.register[0].value
|
1973
|
|
- }
|
1974
|
|
- } else {
|
1975
|
|
- this.register_type = info.register_type
|
1976
|
|
- }
|
1977
|
|
- this.diagnose = []
|
|
1973
|
+ }
|
1978
|
1974
|
|
1979
|
|
- if(info.id == 0){
|
1980
|
|
- if(last_info.diagnosis.length == 0){
|
1981
|
|
- this.diagnose = []
|
1982
|
|
- }else{
|
1983
|
|
- for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
|
1984
|
|
- this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
|
|
1975
|
+ }
|
1985
|
1976
|
|
1986
|
|
- }
|
1987
|
|
- }
|
1988
|
1977
|
|
1989
|
|
- if(last_info.sick_history == 0){
|
1990
|
|
- this.state2 = ''
|
1991
|
|
- }else{
|
1992
|
|
- this.state2 = last_info.sick_history
|
1993
|
|
- }
|
1994
|
1978
|
|
|
1979
|
+ this.state1 = info.sick_type
|
|
1980
|
+ if (this.state1 == 0 || this.state1 == "") {
|
|
1981
|
+ this.state1 = ''
|
|
1982
|
+ for (let i = 0; i < this.sick.length; i++) {
|
|
1983
|
+ this.state1 = this.sick[0].id
|
|
1984
|
+ }
|
|
1985
|
+ }
|
1995
|
1986
|
|
1996
|
|
- }else{
|
1997
|
|
- this.state2 = info.sick_history
|
1998
|
|
- if (this.state2 == 0) {
|
1999
|
|
- this.state2 = ''
|
2000
|
|
- }
|
2001
|
|
- if(info.diagnosis.length == 0){
|
2002
|
|
- this.diagnose = []
|
2003
|
|
- }else{
|
2004
|
|
- for(let i = 0; i < info.diagnosis.split(",").length;i++){
|
2005
|
|
- this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
|
|
1987
|
+ if(this.departmentValue == "" || this.departmentValue == 0){
|
|
1988
|
+ if(this.department.length > 0){
|
|
1989
|
+ this.departmentValue = this.department[0].id
|
2006
|
1990
|
|
2007
|
|
- }
|
|
1991
|
+ }
|
|
1992
|
+ }
|
2008
|
1993
|
|
2009
|
|
- }
|
2010
|
1994
|
|
2011
|
|
- }
|
|
1995
|
+ // getInitData().then(response => {
|
|
1996
|
+ // if (response.data.state == 0) {
|
|
1997
|
+ // this.$message.error(response.data.msg)
|
|
1998
|
+ // return false
|
|
1999
|
+ // } else {
|
|
2000
|
+ // this.onceTime = false
|
|
2001
|
+ // this.drugs = response.data.data.drugs
|
|
2002
|
+ // this.allDrugs = response.data.data.drugs
|
|
2003
|
+ // this.advices_template = response.data.data.advices_template
|
|
2004
|
+ // this.doctors = response.data.data.doctors
|
|
2005
|
+ // for (let i = 0; i < this.doctors.length; i++) {
|
|
2006
|
+ // if (this.doctors[i].user_type == 1) {
|
|
2007
|
+ // this.doctors.splice(i, 1)
|
|
2008
|
+ // }
|
|
2009
|
+ // }
|
|
2010
|
+ // this.department = response.data.data.department
|
|
2011
|
+ // this.sick = response.data.data.sick
|
|
2012
|
+ // this.diagnoses = response.data.data.diagnose
|
|
2013
|
+ // this.additions = response.data.data.additions
|
2012
|
2014
|
|
2013
|
2015
|
|
2014
|
2016
|
|
2015
|
|
- this.state1 = info.sick_type
|
2016
|
|
- if (this.state1 == 0 || this.state1 == "") {
|
2017
|
|
- this.state1 = ''
|
2018
|
|
- for (let i = 0; i < this.sick.length; i++) {
|
2019
|
|
- this.state1 = this.sick[0].id
|
2020
|
|
- }
|
|
2017
|
+
|
|
2018
|
+
|
|
2019
|
+ // if (info.id > 0) {
|
|
2020
|
+ // this.doctorValue = info.doctor_id
|
|
2021
|
+ // this.departmentValue = info.departments
|
|
2022
|
+ // } else {
|
|
2023
|
+ // if(admin_info.id > 0 && admin_info.user_type == 2){
|
|
2024
|
+ // this.doctorValue = admin_info.admin_user_id
|
|
2025
|
+ // this.departmentValue = this.department[0].id
|
|
2026
|
+
|
|
2027
|
+ // }else{
|
|
2028
|
+
|
|
2029
|
+ // this.doctorValue = this.doctors[0].admin_user_id
|
|
2030
|
+ // this.departmentValue = this.department[0].id
|
|
2031
|
+
|
|
2032
|
+ // }
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+ // }
|
|
2036
|
+
|
|
2037
|
+ // if (info.register_type == 0) {
|
|
2038
|
+ // for (let i = 0; i < this.register.length; i++) {
|
|
2039
|
+ // this.register_type = this.register[0].value
|
|
2040
|
+ // }
|
|
2041
|
+ // } else {
|
|
2042
|
+ // this.register_type = info.register_type
|
|
2043
|
+ // }
|
|
2044
|
+ // this.diagnose = []
|
|
2045
|
+
|
|
2046
|
+ // if(info.id == 0){
|
|
2047
|
+ // if(last_info.diagnosis.length == 0){
|
|
2048
|
+ // this.diagnose = []
|
|
2049
|
+ // }else{
|
|
2050
|
+ // for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
|
|
2051
|
+ // this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
|
|
2052
|
+
|
|
2053
|
+ // }
|
|
2054
|
+ // }
|
|
2055
|
+
|
|
2056
|
+ // if(last_info.sick_history == 0){
|
|
2057
|
+ // this.state2 = ''
|
|
2058
|
+ // }else{
|
|
2059
|
+ // this.state2 = last_info.sick_history
|
|
2060
|
+ // }
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+ // }else{
|
|
2064
|
+ // this.state2 = info.sick_history
|
|
2065
|
+ // if (this.state2 == 0) {
|
|
2066
|
+ // this.state2 = ''
|
|
2067
|
+ // }
|
|
2068
|
+ // if(info.diagnosis.length == 0){
|
|
2069
|
+ // this.diagnose = []
|
|
2070
|
+ // }else{
|
|
2071
|
+ // for(let i = 0; i < info.diagnosis.split(",").length;i++){
|
|
2072
|
+ // this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
|
|
2073
|
+
|
|
2074
|
+ // }
|
|
2075
|
+
|
|
2076
|
+ // }
|
|
2077
|
+
|
|
2078
|
+ // }
|
|
2079
|
+
|
|
2080
|
+
|
|
2081
|
+
|
|
2082
|
+ // this.state1 = info.sick_type
|
|
2083
|
+ // if (this.state1 == 0 || this.state1 == "") {
|
|
2084
|
+ // this.state1 = ''
|
|
2085
|
+ // for (let i = 0; i < this.sick.length; i++) {
|
|
2086
|
+ // this.state1 = this.sick[0].id
|
|
2087
|
+ // }
|
|
2088
|
+ // }
|
|
2089
|
+
|
|
2090
|
+ // if(this.departmentValue == "" || this.departmentValue == 0){
|
|
2091
|
+ // if(this.department.length > 0){
|
|
2092
|
+ // this.departmentValue = this.department[0].id
|
|
2093
|
+
|
|
2094
|
+ // }
|
|
2095
|
+ // }
|
|
2096
|
+
|
|
2097
|
+ // }
|
|
2098
|
+ // })
|
|
2099
|
+
|
|
2100
|
+ },
|
|
2101
|
+ setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
|
|
2102
|
+ this.curMonthPrescriptions = {}
|
|
2103
|
+ this.curPrescriptions = {}
|
|
2104
|
+ // this.$refs.tabProjectTeam.clearSelection()
|
|
2105
|
+
|
|
2106
|
+ for (let i = 0; i < doctors.length; i++) {
|
|
2107
|
+ if (doctors[i].user_type == 1) {
|
|
2108
|
+ doctors.splice(i, 1)
|
|
2109
|
+ }
|
|
2110
|
+ }
|
|
2111
|
+
|
|
2112
|
+ this.editableTabsValue = '处方1'
|
|
2113
|
+ this.curStatus = 0
|
|
2114
|
+ if (month_data && month_data.length > 0) {
|
|
2115
|
+ this.curMonthPrescriptions = month_data[0]
|
|
2116
|
+ } else {
|
|
2117
|
+ this.curMonthPrescriptions = {}
|
|
2118
|
+ }
|
|
2119
|
+
|
|
2120
|
+ if (info.prescription_status == 0) {
|
|
2121
|
+ this.order_status = ''
|
|
2122
|
+ }
|
|
2123
|
+
|
|
2124
|
+ if (info.id > 0) {
|
|
2125
|
+ this.doctorValue = info.doctor_id
|
|
2126
|
+ this.departmentValue = info.departments
|
|
2127
|
+ } else {
|
|
2128
|
+ if(admin_info.id > 0 && admin_info.user_type == 2){
|
|
2129
|
+ this.doctorValue = admin_info.admin_user_id
|
|
2130
|
+ this.departmentValue = this.department[0].id
|
|
2131
|
+
|
|
2132
|
+ }else{
|
|
2133
|
+
|
|
2134
|
+ this.doctorValue = this.doctors[0].admin_user_id
|
|
2135
|
+ this.departmentValue = this.department[0].id
|
|
2136
|
+
|
|
2137
|
+ }
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+ }
|
|
2141
|
+
|
|
2142
|
+ if (info.register_type == 0) {
|
|
2143
|
+ for (let i = 0; i < this.register.length; i++) {
|
|
2144
|
+ this.register_type = this.register[0].value
|
|
2145
|
+ }
|
|
2146
|
+ } else {
|
|
2147
|
+ this.register_type = info.register_type
|
|
2148
|
+ }
|
|
2149
|
+ this.diagnose = []
|
|
2150
|
+
|
|
2151
|
+ if(info.id == 0){
|
|
2152
|
+ if(last_info.diagnosis.length == 0){
|
|
2153
|
+ this.diagnose = []
|
|
2154
|
+ }else{
|
|
2155
|
+ for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
|
|
2156
|
+ this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
|
|
2157
|
+
|
2021
|
2158
|
}
|
|
2159
|
+ }
|
2022
|
2160
|
|
2023
|
|
- if(this.departmentValue == "" || this.departmentValue == 0){
|
2024
|
|
- if(this.department.length > 0){
|
2025
|
|
- this.departmentValue = this.department[0].id
|
|
2161
|
+ if(last_info.sick_history == 0){
|
|
2162
|
+ this.state2 = ''
|
|
2163
|
+ }else{
|
|
2164
|
+ this.state2 = last_info.sick_history
|
|
2165
|
+ }
|
2026
|
2166
|
|
2027
|
|
- }
|
|
2167
|
+
|
|
2168
|
+ }else{
|
|
2169
|
+ this.state2 = info.sick_history
|
|
2170
|
+ if (this.state2 == 0) {
|
|
2171
|
+ this.state2 = ''
|
|
2172
|
+ }
|
|
2173
|
+ if(info.diagnosis.length == 0){
|
|
2174
|
+ this.diagnose = []
|
|
2175
|
+ }else{
|
|
2176
|
+ for(let i = 0; i < info.diagnosis.split(",").length;i++){
|
|
2177
|
+ this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
|
2028
|
2178
|
}
|
|
2179
|
+ }
|
|
2180
|
+ }
|
|
2181
|
+ this.state1 = info.sick_type
|
|
2182
|
+ if (this.state1 == 0 || this.state1 == "") {
|
|
2183
|
+ this.state1 = ''
|
|
2184
|
+ for (let i = 0; i < this.sick.length; i++) {
|
|
2185
|
+ this.state1 = this.sick[0].id
|
|
2186
|
+ }
|
|
2187
|
+ }
|
|
2188
|
+
|
|
2189
|
+ if(this.departmentValue == "" || this.departmentValue == 0){
|
|
2190
|
+ if(this.department.length > 0){
|
|
2191
|
+ this.departmentValue = this.department[0].id
|
2029
|
2192
|
|
2030
|
2193
|
}
|
2031
|
|
- })
|
|
2194
|
+ }
|
2032
|
2195
|
|
2033
|
2196
|
},
|
|
2197
|
+
|
2034
|
2198
|
moreState(tab, event) {
|
2035
|
2199
|
if (tab == 'more') {
|
2036
|
2200
|
return false
|
|
@@ -2179,21 +2343,21 @@
|
2179
|
2343
|
'prescriptions': this.prescriptions
|
2180
|
2344
|
}
|
2181
|
2345
|
isLoading = true
|
2182
|
|
- console.log('this.prescriptionsthis.prescriptions',this.prescriptions)
|
|
2346
|
+ console.log('this.prescriptionsthis.prescriptions', this.prescriptions)
|
2183
|
2347
|
let num = 0
|
2184
|
2348
|
this.prescriptions.map(item => {
|
2185
|
|
- if(item.advices.length > 0){
|
|
2349
|
+ if (item.advices.length > 0) {
|
2186
|
2350
|
item.advices.map(it => {
|
2187
|
|
- if(it.drug.total <= 0){
|
|
2351
|
+ if (it.drug.total <= 0) {
|
2188
|
2352
|
num++
|
2189
|
|
- setTimeout(() =>{
|
|
2353
|
+ setTimeout(() => {
|
2190
|
2354
|
this.$message.error(it.drug.drug_name + '库存不足')
|
2191
|
|
- },100)
|
|
2355
|
+ }, 100)
|
2192
|
2356
|
}
|
2193
|
2357
|
})
|
2194
|
2358
|
}
|
2195
|
2359
|
})
|
2196
|
|
- if(num == 0){
|
|
2360
|
+ if (num == 0) {
|
2197
|
2361
|
createHisPrescription(data, params).then(response => {
|
2198
|
2362
|
if (response.data.state == 1) {
|
2199
|
2363
|
this.$emit('change', this.patientInfo.id)
|
|
@@ -2230,7 +2394,7 @@
|
2230
|
2394
|
if (index == 1) {
|
2231
|
2395
|
let params = {
|
2232
|
2396
|
patient_id: this.patientInfo.id,
|
2233
|
|
- diagnose: this.diagnose.join(","),
|
|
2397
|
+ diagnose: this.diagnose.join(','),
|
2234
|
2398
|
sick_type: this.state1,
|
2235
|
2399
|
sick_history: this.state2,
|
2236
|
2400
|
doctor: this.doctorValue,
|
|
@@ -2325,17 +2489,14 @@
|
2325
|
2489
|
advices: [],
|
2326
|
2490
|
project: [],
|
2327
|
2491
|
addition: [],
|
2328
|
|
- pre_time: this.prescriptions[0].pre_time,
|
2329
|
|
-
|
|
2492
|
+ pre_time: this.prescriptions[0].pre_time
|
2330
|
2493
|
|
2331
|
2494
|
}
|
2332
|
2495
|
|
2333
|
|
- obj.med_type = 14
|
2334
|
|
-
|
|
2496
|
+ obj.med_type = 14
|
2335
|
2497
|
|
2336
|
2498
|
this.prescriptions.push(obj)
|
2337
|
2499
|
|
2338
|
|
-
|
2339
|
2500
|
this.editableTabsValue = newTabName
|
2340
|
2501
|
this.curPrescriptions = this.prescriptions[this.prescriptions.length - 1]
|
2341
|
2502
|
this.curStatus = 0
|
|
@@ -2534,17 +2695,17 @@
|
2534
|
2695
|
this.$refs.additionalCharges.show()
|
2535
|
2696
|
},
|
2536
|
2697
|
selectDrugs(selection, row) {
|
2537
|
|
- console.log('selection',selection)
|
2538
|
|
- console.log('row',row)
|
2539
|
|
- if(row.total <= 0){
|
|
2698
|
+ console.log('selection', selection)
|
|
2699
|
+ console.log('row', row)
|
|
2700
|
+ if (row.total <= 0) {
|
2540
|
2701
|
if (selection) {
|
2541
|
2702
|
selection.forEach(row => {
|
2542
|
|
- if(row.total <= 0){
|
2543
|
|
- this.$refs.multipleTable.toggleRowSelection(row);
|
|
2703
|
+ if (row.total <= 0) {
|
|
2704
|
+ this.$refs.multipleTable.toggleRowSelection(row)
|
2544
|
2705
|
}
|
2545
|
|
- });
|
|
2706
|
+ })
|
2546
|
2707
|
} else {
|
2547
|
|
- this.$refs.multipleTable.clearSelection();
|
|
2708
|
+ this.$refs.multipleTable.clearSelection()
|
2548
|
2709
|
}
|
2549
|
2710
|
this.$message.error(row.drug_name + '库存不足')
|
2550
|
2711
|
return
|
|
@@ -2554,8 +2715,8 @@
|
2554
|
2715
|
|
2555
|
2716
|
comfirm() {
|
2556
|
2717
|
|
2557
|
|
- if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
|
2558
|
|
- if(this.$store.getters.xt_user.org_id == 10138) {
|
|
2718
|
+ if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
|
|
2719
|
+ if (this.$store.getters.xt_user.org_id == 10138) {
|
2559
|
2720
|
for (let i = 0; i < this.curDrugs.length; i++) {
|
2560
|
2721
|
if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
2561
|
2722
|
this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
|
@@ -2566,9 +2727,8 @@
|
2566
|
2727
|
}
|
2567
|
2728
|
}
|
2568
|
2729
|
|
2569
|
|
-
|
2570
|
|
- if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0){
|
2571
|
|
- if(this.$store.getters.xt_user.org_id == 10138) {
|
|
2730
|
+ if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
|
|
2731
|
+ if (this.$store.getters.xt_user.org_id == 10138) {
|
2572
|
2732
|
for (let i = 0; i < this.curDrugs.length; i++) {
|
2573
|
2733
|
if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
2574
|
2734
|
this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
|
@@ -2579,7 +2739,6 @@
|
2579
|
2739
|
}
|
2580
|
2740
|
}
|
2581
|
2741
|
|
2582
|
|
-
|
2583
|
2742
|
// if (this.curPrescriptions.order_status == 2) {
|
2584
|
2743
|
// this.$message.error('该处方已经结算,无法继续添加药品或者项目')
|
2585
|
2744
|
// this.teamList = []
|
|
@@ -2651,9 +2810,9 @@
|
2651
|
2810
|
var temp2 = this.deepClone(this.teamList)
|
2652
|
2811
|
|
2653
|
2812
|
var temp3 = this.deepClone(templateDrugs)
|
2654
|
|
- console.log("hhhhhhhhhhhhhh",temp)
|
2655
|
|
- console.log("hhhh23",temp2)
|
2656
|
|
- console.log("hhhh23",temp3)
|
|
2813
|
+ console.log('hhhhhhhhhhhhhh', temp)
|
|
2814
|
+ console.log('hhhh23', temp2)
|
|
2815
|
+ console.log('hhhh23', temp3)
|
2657
|
2816
|
if (temp3.length > 0) {
|
2658
|
2817
|
for (let b = 0; b < temp3.length; b++) {
|
2659
|
2818
|
let obj = {
|
|
@@ -2665,7 +2824,7 @@
|
2665
|
2824
|
execution_frequency: temp3[b].execution_frequency,
|
2666
|
2825
|
retail_price: temp3[b].drug.retail_price.toString(),
|
2667
|
2826
|
remark: '',
|
2668
|
|
- day: "1",
|
|
2827
|
+ day: '1',
|
2669
|
2828
|
prescribing_number: temp3[b].prescribing_number,
|
2670
|
2829
|
single_dose_unit: temp3[b].drug.dose_unit,
|
2671
|
2830
|
prescribing_number_unit: temp3[b].drug.prescribing_number_unit,
|
|
@@ -2683,7 +2842,7 @@
|
2683
|
2842
|
|
2684
|
2843
|
let index = 0
|
2685
|
2844
|
|
2686
|
|
- if(this.curPrescriptions.advices.length > 0){
|
|
2845
|
+ if (this.curPrescriptions.advices.length > 0) {
|
2687
|
2846
|
index = this.curPrescriptions.advices.length
|
2688
|
2847
|
}
|
2689
|
2848
|
|
|
@@ -2705,13 +2864,13 @@
|
2705
|
2864
|
prescribing_number_unit: temp[b].prescribing_number_unit,
|
2706
|
2865
|
medical_insurance_number: temp[b].medical_insurance_number,
|
2707
|
2866
|
drug: temp[b],
|
2708
|
|
- groupno:index+temp_index,
|
|
2867
|
+ groupno: index + temp_index
|
2709
|
2868
|
}
|
2710
|
2869
|
|
2711
|
2870
|
if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
|
2712
|
2871
|
obj.prescribing_number = 1
|
2713
|
2872
|
}
|
2714
|
|
- console.log('obj',obj)
|
|
2873
|
+ console.log('obj', obj)
|
2715
|
2874
|
this.prescriptions[i].advices.push(obj)
|
2716
|
2875
|
}
|
2717
|
2876
|
this.curStatus = 1
|
|
@@ -2740,7 +2899,7 @@
|
2740
|
2899
|
delivery_way: temp2[b].delivery_way,
|
2741
|
2900
|
execution_frequency: temp2[b].execution_frequency,
|
2742
|
2901
|
number_days: temp2[b].number_days.toString(),
|
2743
|
|
- total: temp2[b].cus_total,
|
|
2902
|
+ total: temp2[b].cus_total,
|
2744
|
2903
|
price: temp2[b].price,
|
2745
|
2904
|
remark: '',
|
2746
|
2905
|
medical_code: temp2[b].medical_code,
|
|
@@ -2753,7 +2912,7 @@
|
2753
|
2912
|
if (obj.type == 3) {
|
2754
|
2913
|
obj.single_dose = 1
|
2755
|
2914
|
}
|
2756
|
|
- console.log('项目obj',temp2)
|
|
2915
|
+ console.log('项目obj', temp2)
|
2757
|
2916
|
this.prescriptions[i].project.push(obj)
|
2758
|
2917
|
}
|
2759
|
2918
|
this.curStatus = 2
|
|
@@ -2774,18 +2933,21 @@
|
2774
|
2933
|
this.teamList = row
|
2775
|
2934
|
},
|
2776
|
2935
|
selectChange(selection, row) {
|
|
2936
|
+ console.log('row',row)
|
2777
|
2937
|
if(row.total <= 0){
|
2778
|
|
- if (selection) {
|
2779
|
|
- selection.forEach(row => {
|
2780
|
|
- if(row.total <= 0){
|
2781
|
|
- this.$refs.tables.toggleRowSelection(row);
|
2782
|
|
- }
|
2783
|
|
- });
|
2784
|
|
- } else {
|
2785
|
|
- this.$refs.tables.clearSelection();
|
|
2938
|
+ if(row.type == 3){
|
|
2939
|
+ if (selection) {
|
|
2940
|
+ selection.forEach(row => {
|
|
2941
|
+ if(row.total <= 0){
|
|
2942
|
+ this.$refs.tables.toggleRowSelection(row);
|
|
2943
|
+ }
|
|
2944
|
+ });
|
|
2945
|
+ } else {
|
|
2946
|
+ this.$refs.tables.clearSelection();
|
|
2947
|
+ }
|
|
2948
|
+ this.$message.error(row.project_name + '库存不足')
|
|
2949
|
+ return
|
2786
|
2950
|
}
|
2787
|
|
- this.$message.error(row.project_name + '库存不足')
|
2788
|
|
- return
|
2789
|
2951
|
}
|
2790
|
2952
|
this.teamList.push(row)
|
2791
|
2953
|
},
|
|
@@ -2805,10 +2967,10 @@
|
2805
|
2967
|
number_days: project[i].number_days,
|
2806
|
2968
|
price: project[i].price,
|
2807
|
2969
|
medical_code: project[i].medical_code,
|
2808
|
|
- cus_total:1,
|
|
2970
|
+ cus_total: 1,
|
2809
|
2971
|
unit: project[i].unit,
|
2810
|
2972
|
type: 2,
|
2811
|
|
- total:project[i].total
|
|
2973
|
+ total: project[i].total
|
2812
|
2974
|
}
|
2813
|
2975
|
|
2814
|
2976
|
this.tabProject.push(obj)
|
|
@@ -2825,12 +2987,12 @@
|
2825
|
2987
|
delivery_way: '',
|
2826
|
2988
|
execution_frequency: '',
|
2827
|
2989
|
number_days: 1,
|
2828
|
|
- cus_total:1,
|
|
2990
|
+ cus_total: 1,
|
2829
|
2991
|
price: good_info[i].packing_price,
|
2830
|
2992
|
medical_code: good_info[i].medical_insurance_number,
|
2831
|
2993
|
unit: this.getGoodUnit(good_info[i].good_unit),
|
2832
|
2994
|
type: 3,
|
2833
|
|
- total:good_info[i].total
|
|
2995
|
+ total: good_info[i].total
|
2834
|
2996
|
}
|
2835
|
2997
|
this.tabProject.push(obj)
|
2836
|
2998
|
}
|
|
@@ -2868,7 +3030,6 @@
|
2868
|
3030
|
this.tabPrjectTeam = team
|
2869
|
3031
|
this.allTabPrjectTeam = team
|
2870
|
3032
|
|
2871
|
|
-
|
2872
|
3033
|
this.projectList = team
|
2873
|
3034
|
}
|
2874
|
3035
|
})
|
|
@@ -2908,6 +3069,7 @@
|
2908
|
3069
|
if (response.data.state == 1) {
|
2909
|
3070
|
this.teamList = []
|
2910
|
3071
|
var project = response.data.data.project
|
|
3072
|
+ let num = 0
|
2911
|
3073
|
for (let i = 0; i < project.length; i++) {
|
2912
|
3074
|
if (project[i].type == 2 && project[i].status == 1) {
|
2913
|
3075
|
|
|
@@ -2919,7 +3081,7 @@
|
2919
|
3081
|
delivery_way: project[i].project.delivery_way,
|
2920
|
3082
|
execution_frequency: project[i].project.execution_frequency,
|
2921
|
3083
|
number_days: project[i].project.number_days,
|
2922
|
|
- cus_total:project[i].number,
|
|
3084
|
+ cus_total: project[i].number,
|
2923
|
3085
|
price: project[i].project.price,
|
2924
|
3086
|
remark: '',
|
2925
|
3087
|
medical_code: project[i].project.medical_code,
|
|
@@ -2932,6 +3094,14 @@
|
2932
|
3094
|
|
2933
|
3095
|
this.teamList.push(obj)
|
2934
|
3096
|
} else if (project[i].type == 3 && project[i].status == 1) {
|
|
3097
|
+ if(project[i].good_info.total <= 0){
|
|
3098
|
+ num++
|
|
3099
|
+ this.$refs.tabProjectTeam.toggleRowSelection(row);
|
|
3100
|
+ this.$message.error(project[i].good_info.good_name + '库存不足')
|
|
3101
|
+ }
|
|
3102
|
+ if(num > 0){
|
|
3103
|
+ this.$refs.tabProjectTeam.clearSelection();
|
|
3104
|
+ }
|
2935
|
3105
|
let obj = {
|
2936
|
3106
|
id: project[i].project_id,
|
2937
|
3107
|
project_name: project[i].good_info.good_name,
|
|
@@ -2971,11 +3141,16 @@
|
2971
|
3141
|
},
|
2972
|
3142
|
changeDayOrMonth(tab) {
|
2973
|
3143
|
if (this.dayorMonth == 'day') {
|
2974
|
|
-
|
|
3144
|
+ this.$emit('day')
|
2975
|
3145
|
} else if (this.dayorMonth == 'month') {
|
2976
|
|
-
|
|
3146
|
+ console.log('~~~~~~')
|
|
3147
|
+ let form = {
|
|
3148
|
+ id: this.patientInfo.id,
|
|
3149
|
+ his_patient_id: this.hisPatientInfo.id
|
|
3150
|
+ }
|
|
3151
|
+ console.log(form)
|
|
3152
|
+ this.$emit('month', form)
|
2977
|
3153
|
}
|
2978
|
|
-
|
2979
|
3154
|
},
|
2980
|
3155
|
getAllProjectList() {
|
2981
|
3156
|
getAllProjectList().then(response => {
|