Browse Source

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

csx 3 years ago
parent
commit
b6591464ad

+ 2 - 0
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

2188
                         confirmButtonText: '确 定',
2188
                         confirmButtonText: '确 定',
2189
                         type: 'warning'
2189
                         type: 'warning'
2190
                       }).then(() => {
2190
                       }).then(() => {
2191
+                        that.changeRadioAndPatient(1)
2191
                         that.newLoading = false
2192
                         that.newLoading = false
2192
                       }).catch(() => {
2193
                       }).catch(() => {
2194
+                        that.changeRadioAndPatient(1)
2193
                         that.newLoading = false
2195
                         that.newLoading = false
2194
                       })
2196
                       })
2195
                     } else {
2197
                     } else {

+ 98 - 109
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

487
 
487
 
488
   export default {
488
   export default {
489
     props: {
489
     props: {
490
+      drugs:Array,
491
+      allDrugs:Array,
492
+      advices_template:Array,
493
+      doctors: Array,
494
+      department:Array,
495
+      sick: Array,
496
+      diagnoses: Array,
497
+      additions: Array,
490
       patientInfo: Object,
498
       patientInfo: Object,
491
       hisPatientInfo: Object,
499
       hisPatientInfo: Object,
492
       prescriptions: Array,
500
       prescriptions: Array,
1700
       },
1708
       },
1701
 
1709
 
1702
       querySearch2(queryString, cb) {
1710
       querySearch2(queryString, cb) {
1703
-        var restaurants = this.other_sick
1711
+        var restaurants = this.sick
1704
         restaurants.map(item => {
1712
         restaurants.map(item => {
1705
           item.value = item.name
1713
           item.value = item.name
1706
         })
1714
         })
1725
         return getDictionaryDataConfig(module, filed_name)
1733
         return getDictionaryDataConfig(module, filed_name)
1726
 
1734
 
1727
       },
1735
       },
1728
-      getInitData() {
1729
-        getInitData().then(response => {
1730
-          if (response.data.state == 0) {
1731
-            this.$message.error(response.data.msg)
1732
-            return false
1733
-          } else {
1734
-            this.drugs = response.data.data.drugs
1735
-            this.allDrugs = response.data.data.drugs
1736
-            this.advices_template = response.data.data.advices_template
1737
-            this.doctors = response.data.data.doctors
1738
-            for (let i = 0; i < this.doctors.length; i++) {
1739
-              if (this.doctors[i].user_type == 1) {
1740
-                this.doctors.splice(i, 1)
1741
-              }
1742
-            }
1743
-            this.department = response.data.data.department
1744
-            this.sick = response.data.data.sick
1745
-            this.diagnoses = response.data.data.diagnose
1746
-            this.additions = response.data.data.additions
1747
-
1748
-          }
1749
-        })
1750
-
1751
-      },
1736
+      // getInitData() {
1737
+      //   getInitData().then(response => {
1738
+      //     if (response.data.state == 0) {
1739
+      //       this.$message.error(response.data.msg)
1740
+      //       return false
1741
+      //     } else {
1742
+      //       this.drugs = response.data.data.drugs
1743
+      //       this.allDrugs = response.data.data.drugs
1744
+      //       this.advices_template = response.data.data.advices_template
1745
+      //       this.doctors = response.data.data.doctors
1746
+      //       for (let i = 0; i < this.doctors.length; i++) {
1747
+      //         if (this.doctors[i].user_type == 1) {
1748
+      //           this.doctors.splice(i, 1)
1749
+      //         }
1750
+      //       }
1751
+      //       this.department = response.data.data.department
1752
+      //       this.sick = response.data.data.sick
1753
+      //       this.diagnoses = response.data.data.diagnose
1754
+      //       this.additions = response.data.data.additions
1755
+      //
1756
+      //     }
1757
+      //   })
1758
+      //
1759
+      // },
1752
       monthTabclickEvent(val) {
1760
       monthTabclickEvent(val) {
1753
 
1761
 
1754
         for (let i = 0; i < this.month_prescriptions.length; i++) {
1762
         for (let i = 0; i < this.month_prescriptions.length; i++) {
1849
         this.teamList = []
1857
         this.teamList = []
1850
 
1858
 
1851
       },
1859
       },
1852
-      setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
1860
+      setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info,sick,diagnoses) {
1861
+        this.sick = sick
1862
+        this.diagnoses = diagnoses
1863
+        this.department = department
1853
         this.curMonthPrescriptions = {}
1864
         this.curMonthPrescriptions = {}
1854
         this.curPrescriptions = {}
1865
         this.curPrescriptions = {}
1855
         // this.$refs.tabProjectTeam.clearSelection()
1866
         // this.$refs.tabProjectTeam.clearSelection()
1926
         }
1937
         }
1927
 
1938
 
1928
         if (this.departmentValue == '' || this.departmentValue == 0) {
1939
         if (this.departmentValue == '' || this.departmentValue == 0) {
1929
-          if (this.department.length > 0) {
1930
-            this.departmentValue = this.department[0].id
1940
+          if (department.length > 0) {
1941
+            this.departmentValue = department[0].id
1931
 
1942
 
1932
           }
1943
           }
1933
         }
1944
         }
1934
 
1945
 
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
1946
+        if (info.id > 0) {
1947
+          this.doctorValue = info.doctor_id
1948
+          this.departmentValue = info.departments
1949
+        } else {
1950
+          if (admin_info.id > 0 && admin_info.user_type == 2) {
1951
+            this.doctorValue = admin_info.admin_user_id
1952
+            this.departmentValue = department[0].id
1954
 
1953
 
1955
-            if (info.id > 0) {
1956
-              this.doctorValue = info.doctor_id
1957
-              this.departmentValue = info.departments
1958
-            } else {
1959
-              if (admin_info.id > 0 && admin_info.user_type == 2) {
1960
-                this.doctorValue = admin_info.admin_user_id
1961
-                this.departmentValue = this.department[0].id
1954
+          } else {
1955
+            this.doctorValue = doctors[0].admin_user_id
1956
+            this.departmentValue = department[0].id
1957
+          }
1958
+        }
1962
 
1959
 
1963
-              } else {
1960
+        // if (info.register_type == 0) {
1961
+        //   for (let i = 0; i < this.register.length; i++) {
1962
+        //     this.register_type = this.register[0].value
1963
+        //   }
1964
+        // } else {
1965
+        //   this.register_type = info.register_type
1966
+        // }
1964
 
1967
 
1965
-                this.doctorValue = this.doctors[0].admin_user_id
1966
-                this.departmentValue = this.department[0].id
1967
 
1968
 
1968
-              }
1969
 
1969
 
1970
-            }
1970
+        this.diagnose = []
1971
 
1971
 
1972
-            if (info.register_type == 0) {
1973
-              for (let i = 0; i < this.register.length; i++) {
1974
-                this.register_type = this.register[0].value
1975
-              }
1976
-            } else {
1977
-              this.register_type = info.register_type
1978
-            }
1972
+        if (info.id == 0) {
1973
+          if (last_info.diagnosis.length == 0) {
1979
             this.diagnose = []
1974
             this.diagnose = []
1975
+          } else {
1976
+            console.log(last_info.diagnosis)
1977
+            for (let i = 0; i < last_info.diagnosis.split(",").length; i++) {
1978
+              this.diagnose.push(parseInt(last_info.diagnosis.split(',')[i]))
1979
+            }
1980
+          }
1980
 
1981
 
1981
-            if (info.id == 0) {
1982
-              if (last_info.diagnosis.length == 0) {
1983
-                this.diagnose = []
1984
-              } else {
1985
-                for (let i = 0; i < last_info.diagnosis.split(",").length; i++) {
1986
-                  this.diagnose.push(parseInt(last_info.diagnosis.split(',')[i]))
1987
-
1988
-                }
1989
-              }
1990
-
1991
-              if (last_info.sick_history == 0) {
1992
-                this.state2 = ''
1993
-              } else {
1994
-                this.state2 = last_info.sick_history
1995
-              }
1996
-
1997
-            } else {
1998
-              this.state2 = info.sick_history
1999
-              if (this.state2 == 0) {
2000
-                this.state2 = ''
2001
-              }
2002
-              if (info.diagnosis.length == 0) {
2003
-                this.diagnose = []
2004
-              } else {
2005
-                for (let i = 0; i < info.diagnosis.split(",").length; i++) {
2006
-                  this.diagnose.push(parseInt(info.diagnosis.split(',')[i]))
2007
-
2008
-                }
1982
+          if (last_info.sick_history == 0) {
1983
+            this.state2 = ''
1984
+          } else {
1985
+            this.state2 = last_info.sick_history
1986
+          }
2009
 
1987
 
2010
-              }
1988
+        } else {
1989
+          this.state2 = info.sick_history
1990
+          if (this.state2 == 0) {
1991
+            this.state2 = ''
1992
+          }
1993
+          if (info.diagnosis.length == 0) {
1994
+            this.diagnose = []
1995
+          } else {
1996
+            for (let i = 0; i < info.diagnosis.split(",").length; i++) {
1997
+              this.diagnose.push(parseInt(info.diagnosis.split(',')[i]))
2011
 
1998
 
2012
             }
1999
             }
2013
 
2000
 
2014
-            this.state1 = info.sick_type
2015
-            if (this.state1 == 0 || this.state1 == '') {
2016
-              this.state1 = ''
2017
-              for (let i = 0; i < this.sick.length; i++) {
2018
-                this.state1 = this.sick[0].id
2019
-              }
2020
-            }
2001
+          }
2021
 
2002
 
2022
-            if (this.departmentValue == '' || this.departmentValue == 0) {
2023
-              if (this.department.length > 0) {
2024
-                this.departmentValue = this.department[0].id
2003
+        }
2025
 
2004
 
2026
-              }
2027
-            }
2005
+        this.state1 = info.sick_type
2006
+        if (this.state1 == 0 || this.state1 == '') {
2007
+          this.state1 = ''
2008
+          for (let i = 0; i < this.sick.length; i++) {
2009
+            this.state1 = this.sick[0].id
2010
+          }
2011
+        }
2012
+
2013
+        if (this.departmentValue == '' || this.departmentValue == 0) {
2014
+          if (department.length > 0) {
2015
+            this.departmentValue = department[0].id
2028
 
2016
 
2029
           }
2017
           }
2030
-        })
2018
+        }
2019
+
2031
 
2020
 
2032
       },
2021
       },
2033
       setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
2022
       setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
3162
       }
3151
       }
3163
     }, mounted() {
3152
     }, mounted() {
3164
       this.request_record_date = this.record_date
3153
       this.request_record_date = this.record_date
3165
-      this.getInitData()
3154
+      // this.getInitData()
3166
       //获取所有项目
3155
       //获取所有项目
3167
       this.getlist()
3156
       this.getlist()
3168
       //获取所以项目组套
3157
       //获取所以项目组套

+ 46 - 14
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

144
                 <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
144
                 <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
145
                 <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
145
                 <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
146
                 <desk-prescription v-on:setData="setData" :diagnoses="diagnoses" :loading="isloading"
146
                 <desk-prescription v-on:setData="setData" :diagnoses="diagnoses" :loading="isloading"
147
-                                   :other_sick="other_sick" :record_date="record_date"
147
+                                   :sick="sick" :record_date="record_date"
148
+                                   :drugs="drugs"
149
+                                   :allDrugs="allDrugs"
150
+                                   :advices_template="advices_template"
151
+                                   :additions="additions"
152
+                                   :doctors="doctors"
153
+                                   :department="department"
148
                                    v-on:change="changeOther"
154
                                    v-on:change="changeOther"
149
                                    v-on:month="changeMonth"
155
                                    v-on:month="changeMonth"
150
                                    v-on:day="changeDay"
156
                                    v-on:day="changeDay"
313
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
319
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
314
   import deskPrescription from './components/deskPrescription'
320
   import deskPrescription from './components/deskPrescription'
315
   import deskRecord from './components/deskRecord'
321
   import deskRecord from './components/deskRecord'
316
-  import { createCaseHistory, getMonthHisPateintInfo, getPatientInfo, getSchedulePatientList } from '@/api/his/his'
322
+  import { createCaseHistory, getMonthHisPateintInfo, getPatientInfo, getSchedulePatientList, getInitData } from '@/api/his/his'
317
   import { getDictionaryDataConfig } from '@/utils/data'
323
   import { getDictionaryDataConfig } from '@/utils/data'
318
   import medicalRecord from './components/medicalRecord'
324
   import medicalRecord from './components/medicalRecord'
319
   import saveRecordTemplate from './components/saveRecordTemplate'
325
   import saveRecordTemplate from './components/saveRecordTemplate'
342
     },
348
     },
343
     data() {
349
     data() {
344
       return {
350
       return {
351
+        drugs:[],
352
+        allDrugs:[],
353
+        advices_template:[],
354
+        sick:[],
355
+        diagnoses: [],
356
+        additions: [],
357
+        doctors: [],
358
+        department: [],
359
+
360
+
345
         tableHeight: '',
361
         tableHeight: '',
346
         saveloading: false,
362
         saveloading: false,
347
         fullHeight: document.documentElement.clientHeight,
363
         fullHeight: document.documentElement.clientHeight,
372
         hisPatientInfo: {},
388
         hisPatientInfo: {},
373
         case_history: {},
389
         case_history: {},
374
         patient_id: 0,
390
         patient_id: 0,
375
-        diagnoses: [],
376
         other_sick: [],
391
         other_sick: [],
377
         info: {},
392
         info: {},
378
         last_info: {},
393
         last_info: {},
379
         templatedetail: {},
394
         templatedetail: {},
380
         detalid: 0,
395
         detalid: 0,
381
         prescription_id: 0,
396
         prescription_id: 0,
382
-        doctors: [],
383
-        department: [],
384
         patientid: 0,
397
         patientid: 0,
385
         prescriptionList: [],
398
         prescriptionList: [],
386
         centerDialogVisible: false,
399
         centerDialogVisible: false,
400
         paramsObj3: {},
413
         paramsObj3: {},
401
         recordVisible: false,
414
         recordVisible: false,
402
         recordObj: {},
415
         recordObj: {},
403
-        additions: [],
404
         dialysisShow: true,
416
         dialysisShow: true,
405
 
417
 
406
         all_data: [],
418
         all_data: [],
1171
       //   this.month_prescriptions.push(p2)
1183
       //   this.month_prescriptions.push(p2)
1172
       //
1184
       //
1173
       // },
1185
       // },
1186
+      getInitData() {
1187
+        getInitData().then(response => {
1188
+          if (response.data.state == 0) {
1189
+            this.$message.error(response.data.msg)
1190
+            return false
1191
+          } else {
1192
+            this.drugs = response.data.data.drugs
1193
+            this.allDrugs = response.data.data.drugs
1194
+            this.advices_template = response.data.data.advices_template
1195
+
1196
+            this.department = response.data.data.department
1197
+            this.sick = response.data.data.sick
1198
+            this.diagnoses = response.data.data.diagnose
1199
+            this.additions = response.data.data.additions
1200
+
1201
+          }
1202
+        })
1203
+
1204
+      },
1174
       getList() {
1205
       getList() {
1175
         let params = {
1206
         let params = {
1176
           'record_date': this.record_date,
1207
           'record_date': this.record_date,
1630
               }
1661
               }
1631
             }
1662
             }
1632
             console.log('~~~~~00000222222')
1663
             console.log('~~~~~00000222222')
1633
-            this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
1664
+            this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.sick, this.diagnosis)
1634
           }
1665
           }
1635
         })
1666
         })
1636
 
1667
 
2137
                       //   }
2168
                       //   }
2138
                     }
2169
                     }
2139
                   }
2170
                   }
2140
-                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
2171
+                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.sick, this.diagnosis)
2141
                   this.$refs.child.watchSign = 0
2172
                   this.$refs.child.watchSign = 0
2142
                 }
2173
                 }
2143
               })
2174
               })
2599
                       // }
2630
                       // }
2600
                     }
2631
                     }
2601
                   }
2632
                   }
2602
-                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
2633
+                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.sick, this.diagnosis)
2603
                   this.$refs.child.watchSign = 0
2634
                   this.$refs.child.watchSign = 0
2604
                 }
2635
                 }
2605
               })
2636
               })
3063
                     // }
3094
                     // }
3064
                   }
3095
                   }
3065
                 }
3096
                 }
3066
-                this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
3097
+                this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.sick, this.diagnosis)
3067
                 this.$refs.child.watchSign = 0
3098
                 this.$refs.child.watchSign = 0
3068
               }
3099
               }
3069
             })
3100
             })
3603
                       // }
3634
                       // }
3604
                     }
3635
                     }
3605
                   }
3636
                   }
3606
-                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
3637
+                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.sick, this.diagnosis)
3607
                 }
3638
                 }
3608
               })
3639
               })
3609
 
3640
 
4039
 
4070
 
4040
                     }
4071
                     }
4041
                   }
4072
                   }
4042
-                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
4073
+                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.sick, this.diagnosis)
4043
                 }
4074
                 }
4044
               })
4075
               })
4045
             } else {
4076
             } else {
4484
       }
4515
       }
4485
     },
4516
     },
4486
     created() {
4517
     created() {
4518
+      this.getInitData()
4487
       var nowDate = new Date()
4519
       var nowDate = new Date()
4488
       var nowYear = nowDate.getFullYear()
4520
       var nowYear = nowDate.getFullYear()
4489
       var nowMonth = nowDate.getMonth() + 1
4521
       var nowMonth = nowDate.getMonth() + 1
4496
         (nowDay < 10 ? '0' + nowDay : nowDay)
4528
         (nowDay < 10 ? '0' + nowDay : nowDay)
4497
       this.getList()
4529
       this.getList()
4498
 
4530
 
4499
-      this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
4500
-      this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
4531
+      // this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
4532
+      // this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
4501
       let tableHeight = document.body.clientHeight - 263
4533
       let tableHeight = document.body.clientHeight - 263
4502
       this.tableHeight = tableHeight
4534
       this.tableHeight = tableHeight
4503
 
4535