|
@@ -1358,10 +1358,7 @@
|
1358
|
1358
|
this.prescriptions[i].name = '处方' + (i + 1)
|
1359
|
1359
|
this.prescriptions[i]['pre_time'] = nowTime
|
1360
|
1360
|
|
1361
|
|
-
|
1362
|
|
-
|
1363
|
|
- this.prescriptions[i]['med_type'] = 14
|
1364
|
|
-
|
|
1361
|
+ this.prescriptions[i]['med_type'] = 14
|
1365
|
1362
|
|
1366
|
1363
|
if (i == 0) {
|
1367
|
1364
|
if (this.prescriptions[0].advices.length > 0 && this.prescriptions[0].project.length == 0) {
|
|
@@ -1525,7 +1522,7 @@
|
1525
|
1522
|
this.$refs.additionalCharges.hide()
|
1526
|
1523
|
|
1527
|
1524
|
}, searchProjectAction() {
|
1528
|
|
- console.log("~~~~")
|
|
1525
|
+ console.log('~~~~')
|
1529
|
1526
|
console.log(this.allProject)
|
1530
|
1527
|
|
1531
|
1528
|
if (this.search_project_keyword.length == 0) {
|
|
@@ -1542,7 +1539,7 @@
|
1542
|
1539
|
|
1543
|
1540
|
}
|
1544
|
1541
|
|
1545
|
|
- },searchProjectTeamAction(){
|
|
1542
|
+ }, searchProjectTeamAction() {
|
1546
|
1543
|
if (this.search_project_team_keyword.length == 0) {
|
1547
|
1544
|
this.tabPrjectTeam = this.allTabPrjectTeam
|
1548
|
1545
|
|
|
@@ -1579,7 +1576,7 @@
|
1579
|
1576
|
if (this.prescriptions[i].name == this.editableTabsValue) {
|
1580
|
1577
|
|
1581
|
1578
|
if (this.prescriptions[i].advices != null) {
|
1582
|
|
- for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
|
|
1579
|
+ for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
|
1583
|
1580
|
total = total + this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number
|
1584
|
1581
|
}
|
1585
|
1582
|
}
|
|
@@ -1913,129 +1910,117 @@
|
1913
|
1910
|
this.order_status = '已退费'
|
1914
|
1911
|
}
|
1915
|
1912
|
|
1916
|
|
-
|
1917
|
|
-
|
1918
|
|
-
|
1919
|
1913
|
this.state1 = info.sick_type
|
1920
|
|
- if (this.state1 == 0 || this.state1 == "") {
|
|
1914
|
+ if (this.state1 == 0 || this.state1 == '') {
|
1921
|
1915
|
this.state1 = ''
|
1922
|
1916
|
for (let i = 0; i < this.sick.length; i++) {
|
1923
|
1917
|
this.state1 = this.sick[0].id
|
1924
|
1918
|
}
|
1925
|
1919
|
}
|
1926
|
1920
|
|
1927
|
|
- if(this.departmentValue == "" || this.departmentValue == 0){
|
1928
|
|
- if(this.department.length > 0){
|
|
1921
|
+ if (this.departmentValue == '' || this.departmentValue == 0) {
|
|
1922
|
+ if (this.department.length > 0) {
|
1929
|
1923
|
this.departmentValue = this.department[0].id
|
1930
|
1924
|
|
1931
|
1925
|
}
|
1932
|
1926
|
}
|
1933
|
1927
|
|
1934
|
|
-
|
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
|
|
- }
|
|
1928
|
+ getInitData().then(response => {
|
|
1929
|
+ if (response.data.state == 0) {
|
|
1930
|
+ this.$message.error(response.data.msg)
|
|
1931
|
+ return false
|
|
1932
|
+ } else {
|
|
1933
|
+ this.onceTime = false
|
|
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)
|
1949
|
1941
|
}
|
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
|
1954
|
|
-
|
1955
|
|
-
|
1956
|
|
-
|
|
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
|
1957
|
1947
|
|
|
1948
|
+ if (info.id > 0) {
|
|
1949
|
+ this.doctorValue = info.doctor_id
|
|
1950
|
+ this.departmentValue = info.departments
|
|
1951
|
+ } else {
|
|
1952
|
+ if (admin_info.id > 0 && admin_info.user_type == 2) {
|
|
1953
|
+ this.doctorValue = admin_info.admin_user_id
|
|
1954
|
+ this.departmentValue = this.department[0].id
|
1958
|
1955
|
|
1959
|
|
- if (info.id > 0) {
|
1960
|
|
- this.doctorValue = info.doctor_id
|
1961
|
|
- this.departmentValue = info.departments
|
1962
|
1956
|
} 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
|
1966
|
|
-
|
1967
|
|
- }else{
|
1968
|
1957
|
|
1969
|
|
- this.doctorValue = this.doctors[0].admin_user_id
|
1970
|
|
- this.departmentValue = this.department[0].id
|
|
1958
|
+ this.doctorValue = this.doctors[0].admin_user_id
|
|
1959
|
+ this.departmentValue = this.department[0].id
|
1971
|
1960
|
|
1972
|
|
- }
|
|
1961
|
+ }
|
1973
|
1962
|
|
|
1963
|
+ }
|
1974
|
1964
|
|
|
1965
|
+ if (info.register_type == 0) {
|
|
1966
|
+ for (let i = 0; i < this.register.length; i++) {
|
|
1967
|
+ this.register_type = this.register[0].value
|
1975
|
1968
|
}
|
|
1969
|
+ } else {
|
|
1970
|
+ this.register_type = info.register_type
|
|
1971
|
+ }
|
|
1972
|
+ this.diagnose = []
|
1976
|
1973
|
|
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
|
|
- }
|
|
1974
|
+ if (info.id == 0) {
|
|
1975
|
+ if (last_info.diagnosis.length == 0) {
|
|
1976
|
+ this.diagnose = []
|
1981
|
1977
|
} else {
|
1982
|
|
- this.register_type = info.register_type
|
1983
|
|
- }
|
1984
|
|
- this.diagnose = []
|
|
1978
|
+ for (let i = 0; i < last_info.diagnosis.split(",").length; i++) {
|
|
1979
|
+ this.diagnose.push(parseInt(last_info.diagnosis.split(',')[i]))
|
1985
|
1980
|
|
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]))
|
1992
|
|
-
|
1993
|
|
- }
|
1994
|
|
- }
|
1995
|
|
-
|
1996
|
|
- if(last_info.sick_history == 0){
|
1997
|
|
- this.state2 = ''
|
1998
|
|
- }else{
|
1999
|
|
- this.state2 = last_info.sick_history
|
2000
|
1981
|
}
|
|
1982
|
+ }
|
2001
|
1983
|
|
|
1984
|
+ if (last_info.sick_history == 0) {
|
|
1985
|
+ this.state2 = ''
|
|
1986
|
+ } else {
|
|
1987
|
+ this.state2 = last_info.sick_history
|
|
1988
|
+ }
|
2002
|
1989
|
|
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]))
|
2013
|
|
-
|
2014
|
|
- }
|
|
1990
|
+ } else {
|
|
1991
|
+ this.state2 = info.sick_history
|
|
1992
|
+ if (this.state2 == 0) {
|
|
1993
|
+ this.state2 = ''
|
|
1994
|
+ }
|
|
1995
|
+ if (info.diagnosis.length == 0) {
|
|
1996
|
+ this.diagnose = []
|
|
1997
|
+ } else {
|
|
1998
|
+ for (let i = 0; i < info.diagnosis.split(",").length; i++) {
|
|
1999
|
+ this.diagnose.push(parseInt(info.diagnosis.split(',')[i]))
|
2015
|
2000
|
|
2016
|
2001
|
}
|
2017
|
2002
|
|
2018
|
2003
|
}
|
2019
|
2004
|
|
|
2005
|
+ }
|
2020
|
2006
|
|
2021
|
|
-
|
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
|
|
- }
|
|
2007
|
+ this.state1 = info.sick_type
|
|
2008
|
+ if (this.state1 == 0 || this.state1 == '') {
|
|
2009
|
+ this.state1 = ''
|
|
2010
|
+ for (let i = 0; i < this.sick.length; i++) {
|
|
2011
|
+ this.state1 = this.sick[0].id
|
2028
|
2012
|
}
|
|
2013
|
+ }
|
2029
|
2014
|
|
2030
|
|
- if(this.departmentValue == "" || this.departmentValue == 0){
|
2031
|
|
- if(this.department.length > 0){
|
2032
|
|
- this.departmentValue = this.department[0].id
|
|
2015
|
+ if (this.departmentValue == '' || this.departmentValue == 0) {
|
|
2016
|
+ if (this.department.length > 0) {
|
|
2017
|
+ this.departmentValue = this.department[0].id
|
2033
|
2018
|
|
2034
|
|
- }
|
2035
|
2019
|
}
|
2036
|
|
-
|
2037
|
2020
|
}
|
2038
|
|
- })
|
|
2021
|
+
|
|
2022
|
+ }
|
|
2023
|
+ })
|
2039
|
2024
|
|
2040
|
2025
|
},
|
2041
|
2026
|
setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
|
|
@@ -2065,18 +2050,17 @@
|
2065
|
2050
|
this.doctorValue = info.doctor_id
|
2066
|
2051
|
this.departmentValue = info.departments
|
2067
|
2052
|
} else {
|
2068
|
|
- if(admin_info.id > 0 && admin_info.user_type == 2){
|
|
2053
|
+ if (admin_info.id > 0 && admin_info.user_type == 2) {
|
2069
|
2054
|
this.doctorValue = admin_info.admin_user_id
|
2070
|
2055
|
this.departmentValue = this.department[0].id
|
2071
|
2056
|
|
2072
|
|
- }else{
|
|
2057
|
+ } else {
|
2073
|
2058
|
|
2074
|
2059
|
this.doctorValue = this.doctors[0].admin_user_id
|
2075
|
2060
|
this.departmentValue = this.department[0].id
|
2076
|
2061
|
|
2077
|
2062
|
}
|
2078
|
2063
|
|
2079
|
|
-
|
2080
|
2064
|
}
|
2081
|
2065
|
|
2082
|
2066
|
if (info.register_type == 0) {
|
|
@@ -2088,46 +2072,45 @@
|
2088
|
2072
|
}
|
2089
|
2073
|
this.diagnose = []
|
2090
|
2074
|
|
2091
|
|
- if(info.id == 0){
|
2092
|
|
- if(last_info.diagnosis.length == 0){
|
|
2075
|
+ if (info.id == 0) {
|
|
2076
|
+ if (last_info.diagnosis.length == 0) {
|
2093
|
2077
|
this.diagnose = []
|
2094
|
|
- }else{
|
2095
|
|
- for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
|
2096
|
|
- this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
|
|
2078
|
+ } else {
|
|
2079
|
+ for (let i = 0; i < last_info.diagnosis.split(",").length; i++) {
|
|
2080
|
+ this.diagnose.push(parseInt(last_info.diagnosis.split(',')[i]))
|
2097
|
2081
|
|
2098
|
2082
|
}
|
2099
|
2083
|
}
|
2100
|
2084
|
|
2101
|
|
- if(last_info.sick_history == 0){
|
|
2085
|
+ if (last_info.sick_history == 0) {
|
2102
|
2086
|
this.state2 = ''
|
2103
|
|
- }else{
|
|
2087
|
+ } else {
|
2104
|
2088
|
this.state2 = last_info.sick_history
|
2105
|
2089
|
}
|
2106
|
2090
|
|
2107
|
|
-
|
2108
|
|
- }else{
|
|
2091
|
+ } else {
|
2109
|
2092
|
this.state2 = info.sick_history
|
2110
|
2093
|
if (this.state2 == 0) {
|
2111
|
2094
|
this.state2 = ''
|
2112
|
2095
|
}
|
2113
|
|
- if(info.diagnosis.length == 0){
|
|
2096
|
+ if (info.diagnosis.length == 0) {
|
2114
|
2097
|
this.diagnose = []
|
2115
|
|
- }else{
|
2116
|
|
- for(let i = 0; i < info.diagnosis.split(",").length;i++){
|
2117
|
|
- this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
|
|
2098
|
+ } else {
|
|
2099
|
+ for (let i = 0; i < info.diagnosis.split(",").length; i++) {
|
|
2100
|
+ this.diagnose.push(parseInt(info.diagnosis.split(',')[i]))
|
2118
|
2101
|
}
|
2119
|
2102
|
}
|
2120
|
2103
|
}
|
2121
|
2104
|
this.state1 = info.sick_type
|
2122
|
|
- if (this.state1 == 0 || this.state1 == "") {
|
|
2105
|
+ if (this.state1 == 0 || this.state1 == '') {
|
2123
|
2106
|
this.state1 = ''
|
2124
|
2107
|
for (let i = 0; i < this.sick.length; i++) {
|
2125
|
2108
|
this.state1 = this.sick[0].id
|
2126
|
2109
|
}
|
2127
|
2110
|
}
|
2128
|
2111
|
|
2129
|
|
- if(this.departmentValue == "" || this.departmentValue == 0){
|
2130
|
|
- if(this.department.length > 0){
|
|
2112
|
+ if (this.departmentValue == '' || this.departmentValue == 0) {
|
|
2113
|
+ if (this.department.length > 0) {
|
2131
|
2114
|
this.departmentValue = this.department[0].id
|
2132
|
2115
|
|
2133
|
2116
|
}
|
|
@@ -2227,13 +2210,13 @@
|
2227
|
2210
|
}
|
2228
|
2211
|
}
|
2229
|
2212
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
2230
|
|
- if (this.prescriptions[i].med_type == 0 || this.prescriptions[i].med_type == '') {
|
2231
|
|
- this.$message.error('处方医疗类型不能为空')
|
2232
|
|
- return
|
2233
|
|
- }
|
|
2213
|
+ if (this.prescriptions[i].med_type == 0 || this.prescriptions[i].med_type == '') {
|
|
2214
|
+ this.$message.error('处方医疗类型不能为空')
|
|
2215
|
+ return
|
|
2216
|
+ }
|
2234
|
2217
|
}
|
2235
|
2218
|
if (index == 1) {
|
2236
|
|
- for(let i =0; i < this.prescriptions.length; i++){
|
|
2219
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
2237
|
2220
|
if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length == 0) {
|
2238
|
2221
|
this.$message.error('处方内容不能为空')
|
2239
|
2222
|
return
|
|
@@ -2243,7 +2226,7 @@
|
2243
|
2226
|
let params = {
|
2244
|
2227
|
p_type: 2,
|
2245
|
2228
|
patient_id: this.patientInfo.id,
|
2246
|
|
- diagnose: this.diagnose.join(","),
|
|
2229
|
+ diagnose: this.diagnose.join(','),
|
2247
|
2230
|
sick_type: this.state1,
|
2248
|
2231
|
sick_history: this.state2,
|
2249
|
2232
|
doctor: this.doctorValue,
|
|
@@ -2410,9 +2393,10 @@
|
2410
|
2393
|
|
2411
|
2394
|
this.tabIndex = this.prescriptions.length
|
2412
|
2395
|
|
|
2396
|
+ var str = this.prescriptions[this.prescriptions.length - 1].name
|
|
2397
|
+ this.tabIndex = parseInt(str.charAt(str.length - 1))
|
2413
|
2398
|
++this.tabIndex
|
2414
|
2399
|
let newTabName = '处方' + this.tabIndex
|
2415
|
|
-
|
2416
|
2400
|
var nowDate = new Date()
|
2417
|
2401
|
var nowYear = nowDate.getFullYear()
|
2418
|
2402
|
var nowMonth = nowDate.getMonth() + 1
|
|
@@ -2662,45 +2646,43 @@
|
2662
|
2646
|
comfirm() {
|
2663
|
2647
|
|
2664
|
2648
|
if (this.curDrugs.length > 0) {
|
2665
|
|
- for (let i = 0; i < this.curDrugs.length; i++) {
|
2666
|
|
- if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
2667
|
|
- this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
2668
|
|
- return
|
2669
|
|
- }
|
2670
|
|
-
|
|
2649
|
+ for (let i = 0; i < this.curDrugs.length; i++) {
|
|
2650
|
+ if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
|
2651
|
+ this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
|
2652
|
+ return
|
2671
|
2653
|
}
|
|
2654
|
+
|
|
2655
|
+ }
|
2672
|
2656
|
}
|
2673
|
2657
|
if (this.teamList.length > 0) {
|
2674
|
|
- for (let i = 0; i < this.teamList.length; i++) {
|
2675
|
|
- if (this.curPrescriptions.med_type == 14 && this.teamList[i].is_special_diseases != 1) {
|
2676
|
|
- this.$message.error('该处方属于特病类型处方,请开特病类型的项目')
|
2677
|
|
- // return
|
2678
|
|
- }
|
2679
|
|
-
|
|
2658
|
+ for (let i = 0; i < this.teamList.length; i++) {
|
|
2659
|
+ if (this.curPrescriptions.med_type == 14 && this.teamList[i].is_special_diseases != 1) {
|
|
2660
|
+ this.$message.error('该处方属于特病类型处方,请开特病类型的项目')
|
|
2661
|
+ // return
|
2680
|
2662
|
}
|
2681
|
2663
|
|
2682
|
|
- let arr = this.teamList
|
2683
|
|
- let newArr = []
|
2684
|
|
- arr.map(item => {
|
2685
|
|
- if(this.curPrescriptions.med_type != 14){
|
2686
|
|
- newArr.push(item)
|
2687
|
|
- }
|
2688
|
|
- if(this.curPrescriptions.med_type == 14 && item.is_special_diseases == 1){
|
2689
|
|
- newArr.push(item)
|
2690
|
|
- }
|
2691
|
|
- })
|
2692
|
|
- this.teamList = newArr
|
2693
|
|
- }
|
2694
|
|
-
|
|
2664
|
+ }
|
2695
|
2665
|
|
|
2666
|
+ let arr = this.teamList
|
|
2667
|
+ let newArr = []
|
|
2668
|
+ arr.map(item => {
|
|
2669
|
+ if (this.curPrescriptions.med_type != 14) {
|
|
2670
|
+ newArr.push(item)
|
|
2671
|
+ }
|
|
2672
|
+ if (this.curPrescriptions.med_type == 14 && item.is_special_diseases == 1) {
|
|
2673
|
+ newArr.push(item)
|
|
2674
|
+ }
|
|
2675
|
+ })
|
|
2676
|
+ this.teamList = newArr
|
|
2677
|
+ }
|
2696
|
2678
|
|
2697
|
2679
|
if (this.curDrugs.length == 0) {
|
2698
|
|
- for (let i = 0; i < this.curDrugs.length; i++) {
|
2699
|
|
- if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
2700
|
|
- this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
2701
|
|
- return
|
2702
|
|
- }
|
|
2680
|
+ for (let i = 0; i < this.curDrugs.length; i++) {
|
|
2681
|
+ if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
|
2682
|
+ this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
|
2683
|
+ return
|
2703
|
2684
|
}
|
|
2685
|
+ }
|
2704
|
2686
|
}
|
2705
|
2687
|
|
2706
|
2688
|
// if (this.curPrescriptions.order_status == 2) {
|
|
@@ -2731,8 +2713,8 @@
|
2731
|
2713
|
|
2732
|
2714
|
return
|
2733
|
2715
|
}
|
2734
|
|
- console.log('this.teamList',this.teamList)
|
2735
|
|
- console.log('this.curPrescriptions.project',this.curPrescriptions.project)
|
|
2716
|
+ console.log('this.teamList', this.teamList)
|
|
2717
|
+ console.log('this.curPrescriptions.project', this.curPrescriptions.project)
|
2736
|
2718
|
for (let i = 0; i < this.teamList.length; i++) {
|
2737
|
2719
|
for (let a = 0; a < this.curPrescriptions.project.length; a++) {
|
2738
|
2720
|
if (this.teamList[i].id == this.curPrescriptions.project[a].project_id && this.teamList[i].type == this.curPrescriptions.project[a].type) {
|
|
@@ -2830,7 +2812,7 @@
|
2830
|
2812
|
medical_insurance_number: temp[b].medical_insurance_number,
|
2831
|
2813
|
drug: temp[b],
|
2832
|
2814
|
groupno: index + temp_index,
|
2833
|
|
- hosp_appr_flag:"1",
|
|
2815
|
+ hosp_appr_flag: '1'
|
2834
|
2816
|
}
|
2835
|
2817
|
|
2836
|
2818
|
if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
|
|
@@ -2870,12 +2852,12 @@
|
2870
|
2852
|
remark: '',
|
2871
|
2853
|
medical_code: temp2[b].medical_code,
|
2872
|
2854
|
unit: temp2[b].unit,
|
2873
|
|
- type: temp2[b].type,
|
|
2855
|
+ type: temp2[b].type
|
2874
|
2856
|
}
|
2875
|
|
- if(temp2[b].team_id == undefined){
|
2876
|
|
- obj["team_id"] = 0
|
2877
|
|
- }else{
|
2878
|
|
- obj["team_id"] = temp2[b].team_id
|
|
2857
|
+ if (temp2[b].team_id == undefined) {
|
|
2858
|
+ obj['team_id'] = 0
|
|
2859
|
+ } else {
|
|
2860
|
+ obj['team_id'] = temp2[b].team_id
|
2879
|
2861
|
}
|
2880
|
2862
|
if (obj.total == 0 || obj.total == undefined) {
|
2881
|
2863
|
obj.total = 1
|
|
@@ -2904,17 +2886,17 @@
|
2904
|
2886
|
this.teamList = row
|
2905
|
2887
|
},
|
2906
|
2888
|
selectChange(selection, row) {
|
2907
|
|
- console.log('row',row)
|
2908
|
|
- if(row.total <= 0){
|
2909
|
|
- if(row.type == 3){
|
|
2889
|
+ console.log('row', row)
|
|
2890
|
+ if (row.total <= 0) {
|
|
2891
|
+ if (row.type == 3) {
|
2910
|
2892
|
if (selection) {
|
2911
|
2893
|
selection.forEach(row => {
|
2912
|
|
- if(row.total <= 0){
|
2913
|
|
- this.$refs.tables.toggleRowSelection(row);
|
|
2894
|
+ if (row.total <= 0) {
|
|
2895
|
+ this.$refs.tables.toggleRowSelection(row)
|
2914
|
2896
|
}
|
2915
|
|
- });
|
|
2897
|
+ })
|
2916
|
2898
|
} else {
|
2917
|
|
- this.$refs.tables.clearSelection();
|
|
2899
|
+ this.$refs.tables.clearSelection()
|
2918
|
2900
|
}
|
2919
|
2901
|
this.$message.error(row.project_name + '库存不足')
|
2920
|
2902
|
return
|
|
@@ -3037,11 +3019,11 @@
|
3037
|
3019
|
// var idstr = res.join(',')
|
3038
|
3020
|
|
3039
|
3021
|
let teamList = []
|
3040
|
|
- for(let i = 0;i < row.length; i++){
|
|
3022
|
+ for (let i = 0; i < row.length; i++) {
|
3041
|
3023
|
let team_id = row[i].id
|
3042
|
3024
|
console.log(team_id)
|
3043
|
3025
|
const params = {
|
3044
|
|
- project_id: row[i].item_id
|
|
3026
|
+ project_id: row[i].item_id
|
3045
|
3027
|
}
|
3046
|
3028
|
getPojectListById(params).then(response => {
|
3047
|
3029
|
if (response.data.state == 1) {
|
|
@@ -3064,7 +3046,7 @@
|
3064
|
3046
|
unit: project[i].project.unit,
|
3065
|
3047
|
type: project[i].type,
|
3066
|
3048
|
is_special_diseases: project[i].project.disease_directory,
|
3067
|
|
- team_id:team_id
|
|
3049
|
+ team_id: team_id
|
3068
|
3050
|
}
|
3069
|
3051
|
if (obj.cus_total == 0 || obj.cus_total == undefined) {
|
3070
|
3052
|
obj.cus_total = 1
|
|
@@ -3072,13 +3054,13 @@
|
3072
|
3054
|
|
3073
|
3055
|
teamList.push(obj)
|
3074
|
3056
|
} else if (project[i].type == 3 && project[i].status == 1) {
|
3075
|
|
- if(project[i].good_info.total <= 0){
|
|
3057
|
+ if (project[i].good_info.total <= 0) {
|
3076
|
3058
|
num++
|
3077
|
|
- this.$refs.tabProjectTeam.toggleRowSelection(row);
|
|
3059
|
+ this.$refs.tabProjectTeam.toggleRowSelection(row)
|
3078
|
3060
|
this.$message.error(project[i].good_info.good_name + '库存不足')
|
3079
|
3061
|
}
|
3080
|
|
- if(num > 0){
|
3081
|
|
- this.$refs.tabProjectTeam.clearSelection();
|
|
3062
|
+ if (num > 0) {
|
|
3063
|
+ this.$refs.tabProjectTeam.clearSelection()
|
3082
|
3064
|
}
|
3083
|
3065
|
let obj = {
|
3084
|
3066
|
id: project[i].project_id,
|
|
@@ -3095,7 +3077,7 @@
|
3095
|
3077
|
unit: project[i].good_info.unit,
|
3096
|
3078
|
type: project[i].type,
|
3097
|
3079
|
is_special_diseases: project[i].good_info.is_special_diseases,
|
3098
|
|
- team_id:team_id
|
|
3080
|
+ team_id: team_id
|
3099
|
3081
|
|
3100
|
3082
|
}
|
3101
|
3083
|
if (obj.cus_total == 0 || obj.cus_total == undefined) {
|
|
@@ -3111,10 +3093,6 @@
|
3111
|
3093
|
})
|
3112
|
3094
|
}
|
3113
|
3095
|
|
3114
|
|
-
|
3115
|
|
-
|
3116
|
|
-
|
3117
|
|
-
|
3118
|
3096
|
}, changeDoctor(val) {
|
3119
|
3097
|
for (let i = 0; i < this.doctors.length; i++) {
|
3120
|
3098
|
if (this.doctors[i].admin_user_id == this.doctorValue) {
|