Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN 3 years ago
parent
commit
25244fdaa9

+ 5 - 0
src/xt_pages/outpatientCharges/statementPrint.vue View File

294
 
294
 
295
     },
295
     },
296
     getInfo(order_id,obj) {
296
     getInfo(order_id,obj) {
297
+
297
       if (obj.balance_accounts_type == 2){
298
       if (obj.balance_accounts_type == 2){
298
         let params = {
299
         let params = {
299
           his_patient_id: obj.his_patient_id,
300
           his_patient_id: obj.his_patient_id,
541
   },
542
   },
542
 
543
 
543
   created() {
544
   created() {
545
+    console.log(this.paramsObj)
544
     this.getInfo(this.paramsObj.order_id,this.paramsObj);
546
     this.getInfo(this.paramsObj.order_id,this.paramsObj);
545
     this.org_id = this.$store.getters.xt_user.org_id;
547
     this.org_id = this.$store.getters.xt_user.org_id;
546
     console.log("this.org_id",this.org_id)
548
     console.log("this.org_id",this.org_id)
548
   watch:{
550
   watch:{
549
     paramsObj:{//深度监听,可监听到对象、数组的变化
551
     paramsObj:{//深度监听,可监听到对象、数组的变化
550
       handler(val, oldVal){
552
       handler(val, oldVal){
553
+
551
         this.paramsObj = val;
554
         this.paramsObj = val;
555
+        console.log(this.paramsObj)
556
+
552
         this.getInfo(this.paramsObj.order_id,this.paramsObj)
557
         this.getInfo(this.paramsObj.order_id,this.paramsObj)
553
 
558
 
554
       },
559
       },

+ 2 - 1
src/xt_pages/outpatientCharges/summary.vue View File

429
           order_id: row.id,
429
           order_id: row.id,
430
           settle_type: row.settle_type,
430
           settle_type: row.settle_type,
431
           start_time: row.settle_start_time,
431
           start_time: row.settle_start_time,
432
-          end_time: row.settle_end_time
432
+          end_time: row.settle_end_time,
433
+          balance_accounts_type:row.his_patient.balance_accounts_type
433
         }
434
         }
434
         this.orderObj = obj
435
         this.orderObj = obj
435
 
436
 

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/callPrescription.vue View File

256
           }
256
           }
257
           for (let b = 0; b < prescription.project.length; b++) {
257
           for (let b = 0; b < prescription.project.length; b++) {
258
             if(prescription.project[b].type == 2){
258
             if(prescription.project[b].type == 2){
259
-              if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
259
+              if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
260
                 prescription.project.splice(b--,1)
260
                 prescription.project.splice(b--,1)
261
               }
261
               }
262
             }else if(prescription.project[b].type == 3){
262
             }else if(prescription.project[b].type == 3){

+ 153 - 175
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

1358
           this.prescriptions[i].name = '处方' + (i + 1)
1358
           this.prescriptions[i].name = '处方' + (i + 1)
1359
           this.prescriptions[i]['pre_time'] = nowTime
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
           if (i == 0) {
1363
           if (i == 0) {
1367
             if (this.prescriptions[0].advices.length > 0 && this.prescriptions[0].project.length == 0) {
1364
             if (this.prescriptions[0].advices.length > 0 && this.prescriptions[0].project.length == 0) {
1525
         this.$refs.additionalCharges.hide()
1522
         this.$refs.additionalCharges.hide()
1526
 
1523
 
1527
       }, searchProjectAction() {
1524
       }, searchProjectAction() {
1528
-        console.log("~~~~")
1525
+        console.log('~~~~')
1529
         console.log(this.allProject)
1526
         console.log(this.allProject)
1530
 
1527
 
1531
         if (this.search_project_keyword.length == 0) {
1528
         if (this.search_project_keyword.length == 0) {
1542
 
1539
 
1543
         }
1540
         }
1544
 
1541
 
1545
-      },searchProjectTeamAction(){
1542
+      }, searchProjectTeamAction() {
1546
         if (this.search_project_team_keyword.length == 0) {
1543
         if (this.search_project_team_keyword.length == 0) {
1547
           this.tabPrjectTeam = this.allTabPrjectTeam
1544
           this.tabPrjectTeam = this.allTabPrjectTeam
1548
 
1545
 
1579
           if (this.prescriptions[i].name == this.editableTabsValue) {
1576
           if (this.prescriptions[i].name == this.editableTabsValue) {
1580
 
1577
 
1581
             if (this.prescriptions[i].advices != null) {
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
                 total = total + this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number
1580
                 total = total + this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number
1584
               }
1581
               }
1585
             }
1582
             }
1913
           this.order_status = '已退费'
1910
           this.order_status = '已退费'
1914
         }
1911
         }
1915
 
1912
 
1916
-
1917
-
1918
-
1919
         this.state1 = info.sick_type
1913
         this.state1 = info.sick_type
1920
-        if (this.state1 == 0 || this.state1 == "") {
1914
+        if (this.state1 == 0 || this.state1 == '') {
1921
           this.state1 = ''
1915
           this.state1 = ''
1922
           for (let i = 0; i < this.sick.length; i++) {
1916
           for (let i = 0; i < this.sick.length; i++) {
1923
             this.state1 = this.sick[0].id
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
             this.departmentValue = this.department[0].id
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
               } else {
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
               } else {
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
       setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
2026
       setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
2065
           this.doctorValue = info.doctor_id
2050
           this.doctorValue = info.doctor_id
2066
           this.departmentValue = info.departments
2051
           this.departmentValue = info.departments
2067
         } else {
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
             this.doctorValue = admin_info.admin_user_id
2054
             this.doctorValue = admin_info.admin_user_id
2070
             this.departmentValue = this.department[0].id
2055
             this.departmentValue = this.department[0].id
2071
 
2056
 
2072
-          }else{
2057
+          } else {
2073
 
2058
 
2074
             this.doctorValue = this.doctors[0].admin_user_id
2059
             this.doctorValue = this.doctors[0].admin_user_id
2075
             this.departmentValue = this.department[0].id
2060
             this.departmentValue = this.department[0].id
2076
 
2061
 
2077
           }
2062
           }
2078
 
2063
 
2079
-
2080
         }
2064
         }
2081
 
2065
 
2082
         if (info.register_type == 0) {
2066
         if (info.register_type == 0) {
2088
         }
2072
         }
2089
         this.diagnose = []
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
             this.diagnose = []
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
             this.state2 = ''
2086
             this.state2 = ''
2103
-          }else{
2087
+          } else {
2104
             this.state2 = last_info.sick_history
2088
             this.state2 = last_info.sick_history
2105
           }
2089
           }
2106
 
2090
 
2107
-
2108
-        }else{
2091
+        } else {
2109
           this.state2 = info.sick_history
2092
           this.state2 = info.sick_history
2110
           if (this.state2 == 0) {
2093
           if (this.state2 == 0) {
2111
             this.state2 = ''
2094
             this.state2 = ''
2112
           }
2095
           }
2113
-          if(info.diagnosis.length == 0){
2096
+          if (info.diagnosis.length == 0) {
2114
             this.diagnose = []
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
         this.state1 = info.sick_type
2104
         this.state1 = info.sick_type
2122
-        if (this.state1 == 0 || this.state1 == "") {
2105
+        if (this.state1 == 0 || this.state1 == '') {
2123
           this.state1 = ''
2106
           this.state1 = ''
2124
           for (let i = 0; i < this.sick.length; i++) {
2107
           for (let i = 0; i < this.sick.length; i++) {
2125
             this.state1 = this.sick[0].id
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
             this.departmentValue = this.department[0].id
2114
             this.departmentValue = this.department[0].id
2132
 
2115
 
2133
           }
2116
           }
2227
             }
2210
             }
2228
           }
2211
           }
2229
           for (let i = 0; i < this.prescriptions.length; i++) {
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
           if (index == 1) {
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
               if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length == 0) {
2220
               if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length == 0) {
2238
                 this.$message.error('处方内容不能为空')
2221
                 this.$message.error('处方内容不能为空')
2239
                 return
2222
                 return
2243
             let params = {
2226
             let params = {
2244
               p_type: 2,
2227
               p_type: 2,
2245
               patient_id: this.patientInfo.id,
2228
               patient_id: this.patientInfo.id,
2246
-              diagnose: this.diagnose.join(","),
2229
+              diagnose: this.diagnose.join(','),
2247
               sick_type: this.state1,
2230
               sick_type: this.state1,
2248
               sick_history: this.state2,
2231
               sick_history: this.state2,
2249
               doctor: this.doctorValue,
2232
               doctor: this.doctorValue,
2410
 
2393
 
2411
         this.tabIndex = this.prescriptions.length
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
         ++this.tabIndex
2398
         ++this.tabIndex
2414
         let newTabName = '处方' + this.tabIndex
2399
         let newTabName = '处方' + this.tabIndex
2415
-
2416
         var nowDate = new Date()
2400
         var nowDate = new Date()
2417
         var nowYear = nowDate.getFullYear()
2401
         var nowYear = nowDate.getFullYear()
2418
         var nowMonth = nowDate.getMonth() + 1
2402
         var nowMonth = nowDate.getMonth() + 1
2662
       comfirm() {
2646
       comfirm() {
2663
 
2647
 
2664
         if (this.curDrugs.length > 0) {
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
         if (this.teamList.length > 0) {
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
         if (this.curDrugs.length == 0) {
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
         // if (this.curPrescriptions.order_status == 2) {
2688
         // if (this.curPrescriptions.order_status == 2) {
2731
 
2713
 
2732
           return
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
         for (let i = 0; i < this.teamList.length; i++) {
2718
         for (let i = 0; i < this.teamList.length; i++) {
2737
           for (let a = 0; a < this.curPrescriptions.project.length; a++) {
2719
           for (let a = 0; a < this.curPrescriptions.project.length; a++) {
2738
             if (this.teamList[i].id == this.curPrescriptions.project[a].project_id && this.teamList[i].type == this.curPrescriptions.project[a].type) {
2720
             if (this.teamList[i].id == this.curPrescriptions.project[a].project_id && this.teamList[i].type == this.curPrescriptions.project[a].type) {
2830
                   medical_insurance_number: temp[b].medical_insurance_number,
2812
                   medical_insurance_number: temp[b].medical_insurance_number,
2831
                   drug: temp[b],
2813
                   drug: temp[b],
2832
                   groupno: index + temp_index,
2814
                   groupno: index + temp_index,
2833
-                  hosp_appr_flag:"1",
2815
+                  hosp_appr_flag: '1'
2834
                 }
2816
                 }
2835
 
2817
 
2836
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
2818
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
2870
                   remark: '',
2852
                   remark: '',
2871
                   medical_code: temp2[b].medical_code,
2853
                   medical_code: temp2[b].medical_code,
2872
                   unit: temp2[b].unit,
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
                 if (obj.total == 0 || obj.total == undefined) {
2862
                 if (obj.total == 0 || obj.total == undefined) {
2881
                   obj.total = 1
2863
                   obj.total = 1
2904
         this.teamList = row
2886
         this.teamList = row
2905
       },
2887
       },
2906
       selectChange(selection, row) {
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
             if (selection) {
2892
             if (selection) {
2911
               selection.forEach(row => {
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
             } else {
2898
             } else {
2917
-              this.$refs.tables.clearSelection();
2899
+              this.$refs.tables.clearSelection()
2918
             }
2900
             }
2919
             this.$message.error(row.project_name + '库存不足')
2901
             this.$message.error(row.project_name + '库存不足')
2920
             return
2902
             return
3037
         // var idstr = res.join(',')
3019
         // var idstr = res.join(',')
3038
 
3020
 
3039
         let teamList = []
3021
         let teamList = []
3040
-        for(let i = 0;i < row.length; i++){
3022
+        for (let i = 0; i < row.length; i++) {
3041
           let team_id = row[i].id
3023
           let team_id = row[i].id
3042
           console.log(team_id)
3024
           console.log(team_id)
3043
           const params = {
3025
           const params = {
3044
-            project_id:  row[i].item_id
3026
+            project_id: row[i].item_id
3045
           }
3027
           }
3046
           getPojectListById(params).then(response => {
3028
           getPojectListById(params).then(response => {
3047
             if (response.data.state == 1) {
3029
             if (response.data.state == 1) {
3064
                     unit: project[i].project.unit,
3046
                     unit: project[i].project.unit,
3065
                     type: project[i].type,
3047
                     type: project[i].type,
3066
                     is_special_diseases: project[i].project.disease_directory,
3048
                     is_special_diseases: project[i].project.disease_directory,
3067
-                    team_id:team_id
3049
+                    team_id: team_id
3068
                   }
3050
                   }
3069
                   if (obj.cus_total == 0 || obj.cus_total == undefined) {
3051
                   if (obj.cus_total == 0 || obj.cus_total == undefined) {
3070
                     obj.cus_total = 1
3052
                     obj.cus_total = 1
3072
 
3054
 
3073
                   teamList.push(obj)
3055
                   teamList.push(obj)
3074
                 } else if (project[i].type == 3 && project[i].status == 1) {
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
                     num++
3058
                     num++
3077
-                    this.$refs.tabProjectTeam.toggleRowSelection(row);
3059
+                    this.$refs.tabProjectTeam.toggleRowSelection(row)
3078
                     this.$message.error(project[i].good_info.good_name + '库存不足')
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
                   let obj = {
3065
                   let obj = {
3084
                     id: project[i].project_id,
3066
                     id: project[i].project_id,
3095
                     unit: project[i].good_info.unit,
3077
                     unit: project[i].good_info.unit,
3096
                     type: project[i].type,
3078
                     type: project[i].type,
3097
                     is_special_diseases: project[i].good_info.is_special_diseases,
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
                   if (obj.cus_total == 0 || obj.cus_total == undefined) {
3083
                   if (obj.cus_total == 0 || obj.cus_total == undefined) {
3111
           })
3093
           })
3112
         }
3094
         }
3113
 
3095
 
3114
-
3115
-
3116
-
3117
-
3118
       }, changeDoctor(val) {
3096
       }, changeDoctor(val) {
3119
         for (let i = 0; i < this.doctors.length; i++) {
3097
         for (let i = 0; i < this.doctors.length; i++) {
3120
           if (this.doctors[i].admin_user_id == this.doctorValue) {
3098
           if (this.doctors[i].admin_user_id == this.doctorValue) {

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/nextOrLastPrescription.vue View File

307
           }
307
           }
308
           for (let b = 0; b < prescription.project.length; b++) {
308
           for (let b = 0; b < prescription.project.length; b++) {
309
             if(prescription.project[b].type == 2){
309
             if(prescription.project[b].type == 2){
310
-              if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
310
+              if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
311
                 prescription.project.splice(b--,1)
311
                 prescription.project.splice(b--,1)
312
               }
312
               }
313
             }else if(prescription.project[b].type == 3){
313
             }else if(prescription.project[b].type == 3){

+ 6 - 6
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

1446
                   }
1446
                   }
1447
                   for (let b = 0; b < prescription.project.length; b++) {
1447
                   for (let b = 0; b < prescription.project.length; b++) {
1448
                     if(prescription.project[b].type == 2){
1448
                     if(prescription.project[b].type == 2){
1449
-                      if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
1449
+                      if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
1450
                         prescription.project.splice(b--,1)
1450
                         prescription.project.splice(b--,1)
1451
                       }
1451
                       }
1452
                     }else if(prescription.project[b].type == 3){
1452
                     }else if(prescription.project[b].type == 3){
1830
                         }
1830
                         }
1831
                         for (let b = 0; b < prescription.project.length; b++) {
1831
                         for (let b = 0; b < prescription.project.length; b++) {
1832
                           if(prescription.project[b].type == 2){
1832
                           if(prescription.project[b].type == 2){
1833
-                            if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
1833
+                            if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
1834
                               prescription.project.splice(b--,1)
1834
                               prescription.project.splice(b--,1)
1835
                             }
1835
                             }
1836
                           }else if(prescription.project[b].type == 3){
1836
                           }else if(prescription.project[b].type == 3){
2301
                         }
2301
                         }
2302
                         for (let b = 0; b < prescription.project.length; b++) {
2302
                         for (let b = 0; b < prescription.project.length; b++) {
2303
                           if(prescription.project[b].type == 2){
2303
                           if(prescription.project[b].type == 2){
2304
-                            if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
2304
+                            if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
2305
                               prescription.project.splice(b--,1)
2305
                               prescription.project.splice(b--,1)
2306
                             }
2306
                             }
2307
                           }else if(prescription.project[b].type == 3){
2307
                           }else if(prescription.project[b].type == 3){
2760
                       }
2760
                       }
2761
                       for (let b = 0; b < prescription.project.length; b++) {
2761
                       for (let b = 0; b < prescription.project.length; b++) {
2762
                         if(prescription.project[b].type == 2){
2762
                         if(prescription.project[b].type == 2){
2763
-                          if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
2763
+                          if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
2764
                             prescription.project.splice(b--,1)
2764
                             prescription.project.splice(b--,1)
2765
                           }
2765
                           }
2766
                         }else if(prescription.project[b].type == 3){
2766
                         }else if(prescription.project[b].type == 3){
3286
                         }
3286
                         }
3287
                         for (let b = 0; b < prescription.project.length; b++) {
3287
                         for (let b = 0; b < prescription.project.length; b++) {
3288
                           if(prescription.project[b].type == 2){
3288
                           if(prescription.project[b].type == 2){
3289
-                            if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
3289
+                            if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
3290
                               prescription.project.splice(b--,1)
3290
                               prescription.project.splice(b--,1)
3291
                             }
3291
                             }
3292
                           }else if(prescription.project[b].type == 3){
3292
                           }else if(prescription.project[b].type == 3){
3833
                         }
3833
                         }
3834
                         for (let b = 0; b < prescription.project.length; b++) {
3834
                         for (let b = 0; b < prescription.project.length; b++) {
3835
                           if(prescription.project[b].type == 2){
3835
                           if(prescription.project[b].type == 2){
3836
-                            if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
3836
+                            if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
3837
                               prescription.project.splice(b--,1)
3837
                               prescription.project.splice(b--,1)
3838
                             }
3838
                             }
3839
                           }else if(prescription.project[b].type == 3){
3839
                           }else if(prescription.project[b].type == 3){

+ 28 - 1
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

239
   import { uParseTime } from '@/utils/tools'
239
   import { uParseTime } from '@/utils/tools'
240
   import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
240
   import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
241
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
241
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
242
-
243
   const moment = require('moment')
242
   const moment = require('moment')
244
   export default {
243
   export default {
245
     props: {
244
     props: {
402
           }
401
           }
403
         }
402
         }
404
 
403
 
404
+
405
+        for (let i = 0; i < this.prescriptions.length; i++) {
406
+          for(let b = 0; b < this.prescriptions[i].advices.length; b++){
407
+            if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].advices[b].drug.is_special_diseases != 1) {
408
+              this.$message.error("处方" + (i+1).toString() +"属于特病类型处方,开非特病类型的药")
409
+              return
410
+            }
411
+
412
+          }
413
+
414
+          for(let c = 0; c < this.prescriptions[i].project.length; c++){
415
+            if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 2  && this.prescriptions[i].project[c].project.disease_directory != 1) {
416
+              this.$message.error("处方" + (i+1).toString() +"属于特病类型处方,请开特病类型的项目")
417
+              return
418
+            }
419
+
420
+            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) {
421
+              this.$message.error("处方" + (i+1).toString() +"属于特病类型处方,请开特病类型的耗材")
422
+              return 
423
+            }
424
+          }
425
+        }
426
+
427
+
428
+
429
+
430
+
431
+
405
         let params = {
432
         let params = {
406
           name: this.tempForm.name,
433
           name: this.tempForm.name,
407
           mode_id: this.tempForm.mode_id,
434
           mode_id: this.tempForm.mode_id,