|
@@ -1913,66 +1913,6 @@
|
1913
|
1913
|
this.order_status = '已退费'
|
1914
|
1914
|
}
|
1915
|
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
|
1923
|
|
-
|
1924
|
|
- }else{
|
1925
|
|
-
|
1926
|
|
- this.doctorValue = this.doctors[0].admin_user_id
|
1927
|
|
- this.departmentValue = this.department[0].id
|
1928
|
|
-
|
1929
|
|
- }
|
1930
|
|
-
|
1931
|
|
-
|
1932
|
|
- }
|
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 = []
|
1942
|
|
-
|
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]))
|
1949
|
|
-
|
1950
|
|
- }
|
1951
|
|
- }
|
1952
|
|
-
|
1953
|
|
- if(last_info.sick_history == 0){
|
1954
|
|
- this.state2 = ''
|
1955
|
|
- }else{
|
1956
|
|
- this.state2 = last_info.sick_history
|
1957
|
|
- }
|
1958
|
|
-
|
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]))
|
1970
|
|
-
|
1971
|
|
- }
|
1972
|
|
-
|
1973
|
|
- }
|
1974
|
|
-
|
1975
|
|
- }
|
1976
|
1916
|
|
1977
|
1917
|
|
1978
|
1918
|
|
|
@@ -1992,110 +1932,110 @@
|
1992
|
1932
|
}
|
1993
|
1933
|
|
1994
|
1934
|
|
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
|
|
1935
|
+ getInitData().then(response => {
|
|
1936
|
+ if (response.data.state == 0) {
|
|
1937
|
+ this.$message.error(response.data.msg)
|
|
1938
|
+ return false
|
|
1939
|
+ } else {
|
|
1940
|
+ this.onceTime = false
|
|
1941
|
+ this.drugs = response.data.data.drugs
|
|
1942
|
+ this.allDrugs = response.data.data.drugs
|
|
1943
|
+ this.advices_template = response.data.data.advices_template
|
|
1944
|
+ this.doctors = response.data.data.doctors
|
|
1945
|
+ for (let i = 0; i < this.doctors.length; i++) {
|
|
1946
|
+ if (this.doctors[i].user_type == 1) {
|
|
1947
|
+ this.doctors.splice(i, 1)
|
|
1948
|
+ }
|
|
1949
|
+ }
|
|
1950
|
+ this.department = response.data.data.department
|
|
1951
|
+ this.sick = response.data.data.sick
|
|
1952
|
+ this.diagnoses = response.data.data.diagnose
|
|
1953
|
+ this.additions = response.data.data.additions
|
2014
|
1954
|
|
2015
|
1955
|
|
2016
|
1956
|
|
2017
|
1957
|
|
2018
|
1958
|
|
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
|
|
1959
|
+ if (info.id > 0) {
|
|
1960
|
+ this.doctorValue = info.doctor_id
|
|
1961
|
+ this.departmentValue = info.departments
|
|
1962
|
+ } else {
|
|
1963
|
+ if(admin_info.id > 0 && admin_info.user_type == 2){
|
|
1964
|
+ this.doctorValue = admin_info.admin_user_id
|
|
1965
|
+ this.departmentValue = this.department[0].id
|
2026
|
1966
|
|
2027
|
|
- // }else{
|
|
1967
|
+ }else{
|
2028
|
1968
|
|
2029
|
|
- // this.doctorValue = this.doctors[0].admin_user_id
|
2030
|
|
- // this.departmentValue = this.department[0].id
|
|
1969
|
+ this.doctorValue = this.doctors[0].admin_user_id
|
|
1970
|
+ this.departmentValue = this.department[0].id
|
2031
|
1971
|
|
2032
|
|
- // }
|
|
1972
|
+ }
|
2033
|
1973
|
|
2034
|
1974
|
|
2035
|
|
- // }
|
|
1975
|
+ }
|
2036
|
1976
|
|
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 = []
|
|
1977
|
+ if (info.register_type == 0) {
|
|
1978
|
+ for (let i = 0; i < this.register.length; i++) {
|
|
1979
|
+ this.register_type = this.register[0].value
|
|
1980
|
+ }
|
|
1981
|
+ } else {
|
|
1982
|
+ this.register_type = info.register_type
|
|
1983
|
+ }
|
|
1984
|
+ this.diagnose = []
|
2045
|
1985
|
|
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]))
|
|
1986
|
+ if(info.id == 0){
|
|
1987
|
+ if(last_info.diagnosis.length == 0){
|
|
1988
|
+ this.diagnose = []
|
|
1989
|
+ }else{
|
|
1990
|
+ for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
|
|
1991
|
+ this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
|
2052
|
1992
|
|
2053
|
|
- // }
|
2054
|
|
- // }
|
|
1993
|
+ }
|
|
1994
|
+ }
|
2055
|
1995
|
|
2056
|
|
- // if(last_info.sick_history == 0){
|
2057
|
|
- // this.state2 = ''
|
2058
|
|
- // }else{
|
2059
|
|
- // this.state2 = last_info.sick_history
|
2060
|
|
- // }
|
|
1996
|
+ if(last_info.sick_history == 0){
|
|
1997
|
+ this.state2 = ''
|
|
1998
|
+ }else{
|
|
1999
|
+ this.state2 = last_info.sick_history
|
|
2000
|
+ }
|
2061
|
2001
|
|
2062
|
2002
|
|
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]))
|
|
2003
|
+ }else{
|
|
2004
|
+ this.state2 = info.sick_history
|
|
2005
|
+ if (this.state2 == 0) {
|
|
2006
|
+ this.state2 = ''
|
|
2007
|
+ }
|
|
2008
|
+ if(info.diagnosis.length == 0){
|
|
2009
|
+ this.diagnose = []
|
|
2010
|
+ }else{
|
|
2011
|
+ for(let i = 0; i < info.diagnosis.split(",").length;i++){
|
|
2012
|
+ this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
|
2073
|
2013
|
|
2074
|
|
- // }
|
|
2014
|
+ }
|
2075
|
2015
|
|
2076
|
|
- // }
|
|
2016
|
+ }
|
2077
|
2017
|
|
2078
|
|
- // }
|
|
2018
|
+ }
|
2079
|
2019
|
|
2080
|
2020
|
|
2081
|
2021
|
|
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
|
|
- // }
|
|
2022
|
+ this.state1 = info.sick_type
|
|
2023
|
+ if (this.state1 == 0 || this.state1 == "") {
|
|
2024
|
+ this.state1 = ''
|
|
2025
|
+ for (let i = 0; i < this.sick.length; i++) {
|
|
2026
|
+ this.state1 = this.sick[0].id
|
|
2027
|
+ }
|
|
2028
|
+ }
|
2089
|
2029
|
|
2090
|
|
- // if(this.departmentValue == "" || this.departmentValue == 0){
|
2091
|
|
- // if(this.department.length > 0){
|
2092
|
|
- // this.departmentValue = this.department[0].id
|
|
2030
|
+ if(this.departmentValue == "" || this.departmentValue == 0){
|
|
2031
|
+ if(this.department.length > 0){
|
|
2032
|
+ this.departmentValue = this.department[0].id
|
2093
|
2033
|
|
2094
|
|
- // }
|
2095
|
|
- // }
|
|
2034
|
+ }
|
|
2035
|
+ }
|
2096
|
2036
|
|
2097
|
|
- // }
|
2098
|
|
- // })
|
|
2037
|
+ }
|
|
2038
|
+ })
|
2099
|
2039
|
|
2100
|
2040
|
},
|
2101
|
2041
|
setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
|
|
@@ -2767,10 +2707,11 @@
|
2767
|
2707
|
|
2768
|
2708
|
return
|
2769
|
2709
|
}
|
2770
|
|
-
|
|
2710
|
+ console.log('this.teamList',this.teamList)
|
|
2711
|
+ console.log('this.curPrescriptions.project',this.curPrescriptions.project)
|
2771
|
2712
|
for (let i = 0; i < this.teamList.length; i++) {
|
2772
|
2713
|
for (let a = 0; a < this.curPrescriptions.project.length; a++) {
|
2773
|
|
- if (this.teamList[i].id == this.curPrescriptions.project[a].project_id) {
|
|
2714
|
+ if (this.teamList[i].id == this.curPrescriptions.project[a].project_id && this.teamList[i].type == this.curPrescriptions.project[a].type) {
|
2774
|
2715
|
this.$message.error('当前处方存在相同的药品,无法添加相同的项目')
|
2775
|
2716
|
return
|
2776
|
2717
|
}
|