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
1c3a2f46e6

+ 1 - 1
src/xt_pages/data/components/editInspection.vue View File

45
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
45
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
46
                 </el-form-item>
46
                 </el-form-item>
47
                 <el-form-item label="组套明细" style="width:50%;">
47
                 <el-form-item label="组套明细" style="width:50%;">
48
-                    <el-select v-model="form.project_detail" placeholder="请选择">
48
+                    <el-select v-model="form.project_detail" filterable placeholder="请选择">
49
                         <el-option
49
                         <el-option
50
                                 v-for="item,index in projectList"
50
                                 v-for="item,index in projectList"
51
                                 :key="index"
51
                                 :key="index"

+ 2 - 4
src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue View File

58
       },
58
       },
59
       show() {
59
       show() {
60
         this.chargeTable = []
60
         this.chargeTable = []
61
-       
61
+
62
         this.visible = true
62
         this.visible = true
63
         for (let i = 0; i < this.additions.length; i++) {
63
         for (let i = 0; i < this.additions.length; i++) {
64
           let obj = {
64
           let obj = {
83
       }
83
       }
84
     },
84
     },
85
     watch: {
85
     watch: {
86
-      hisPatientInfo: function(val) {
87
-        console.log('患者ID', this)
88
-      }
86
+
89
     }
87
     }
90
   }
88
   }
91
 </script>
89
 </script>

+ 76 - 78
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

271
                                             <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
271
                                             <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
272
                                         </el-table-column>
272
                                         </el-table-column>
273
                                         <el-table-column label="库存" width="60">
273
                                         <el-table-column label="库存" width="60">
274
-                                            <template slot-scope="scope">{{
275
-                                                stockInCount(scope.row) -
276
-                                                salesReturnCount(scope.row) -
277
-                                                stockOutCount(scope.row) +
278
-                                                cancelStockCount(scope.row)
279
-                                                }}
274
+                                            <template slot-scope="scope">
275
+                                                {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}} / {{
276
+                                                scope.row.total * (scope.row.dose / scope.row.min_number)}}
277
+                                                {{(scope.row.total * (scope.row.dose /
278
+                                                scope.row.min_number))?scope.row.max_unit:''}}
280
                                             </template>
279
                                             </template>
281
                                         </el-table-column>
280
                                         </el-table-column>
282
                                         <el-table-column label="单价" width="40">
281
                                         <el-table-column label="单价" width="40">
283
                                             <template slot-scope="scope">{{ scope.row.retail_price }}</template>
282
                                             <template slot-scope="scope">{{ scope.row.retail_price }}</template>
284
                                         </el-table-column>
283
                                         </el-table-column>
285
                                     </el-table>
284
                                     </el-table>
285
+                                    <div>{{3*(2/3)}}</div>
286
                                 </div>
286
                                 </div>
287
 
287
 
288
                             </el-tab-pane>
288
                             </el-tab-pane>
420
                                    v-on:cancel="cancel"></next-or-last-prescription>
420
                                    v-on:cancel="cancel"></next-or-last-prescription>
421
 
421
 
422
 
422
 
423
-
424
         <!--<next-or-last-prescription ref='next_or_last_prescription' v-on:save="setValue" v-on:cancel="cancel"></next-or-last-prescription>-->
423
         <!--<next-or-last-prescription ref='next_or_last_prescription' v-on:save="setValue" v-on:cancel="cancel"></next-or-last-prescription>-->
425
         <call-prescription ref='call_prescription' v-on:call="call" v-on:call-cancel="callCancel"></call-prescription>
424
         <call-prescription ref='call_prescription' v-on:call="call" v-on:call-cancel="callCancel"></call-prescription>
426
 
425
 
427
-        <
426
+
428
     </div>
427
     </div>
429
 </template>
428
 </template>
430
 
429
 
432
 <script>
431
 <script>
433
   import MonthPrescriptionTable from '../../outpatientCharges/components/monthPrescriptionTable'
432
   import MonthPrescriptionTable from '../../outpatientCharges/components/monthPrescriptionTable'
434
   import {
433
   import {
434
+    createdTemplate,
435
     createHisPrescription,
435
     createHisPrescription,
436
     delHisPrescription,
436
     delHisPrescription,
437
     editHisPrescription,
437
     editHisPrescription,
440
     getInitData,
440
     getInitData,
441
     getNextOrLastHisPrescription,
441
     getNextOrLastHisPrescription,
442
     getPatientInfo,
442
     getPatientInfo,
443
-    getSchedulePatientList,
444
-    createdTemplate
443
+    getSchedulePatientList
445
   } from '@/api/his/his'
444
   } from '@/api/his/his'
446
   import { getDictionaryDataConfig } from '@/utils/data'
445
   import { getDictionaryDataConfig } from '@/utils/data'
447
   import prescriptionTable from './prescriptionTable'
446
   import prescriptionTable from './prescriptionTable'
505
         ],
504
         ],
506
         isLastOrNextVisible: false,
505
         isLastOrNextVisible: false,
507
         multipleTableHeight: '',
506
         multipleTableHeight: '',
508
-        register_type: 1,
507
+        register_type: '',
509
         value: '0',
508
         value: '0',
510
         search_project_keyword: '',
509
         search_project_keyword: '',
511
         form: {
510
         form: {
573
         sick: [],
572
         sick: [],
574
         diagnoses: [],
573
         diagnoses: [],
575
         diagnose: 1,
574
         diagnose: 1,
576
-        state1: 1,
575
+        state1: '',
577
         curTotal: 0,
576
         curTotal: 0,
578
         prescription_id: 0,
577
         prescription_id: 0,
579
         tempDrugs: [],
578
         tempDrugs: [],
685
           return cur
684
           return cur
686
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
685
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
687
 
686
 
688
-        console.log(drug_ids)
689
-        console.log(project_ids)
690
-        console.log(additions_ids)
691
-
692
-        console.log(additions_ids)
693
-
694
         let drugs = []
687
         let drugs = []
695
         let projects = []
688
         let projects = []
696
         let additions = []
689
         let additions = []
761
         for (let i = 0; i < additions_ids.length; i++) {
754
         for (let i = 0; i < additions_ids.length; i++) {
762
           let obj = {}
755
           let obj = {}
763
           let count = 0
756
           let count = 0
764
-          console.log(addition_month_prescriptions.addition)
765
           if (addition_month_prescriptions.addition) {
757
           if (addition_month_prescriptions.addition) {
766
             for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
758
             for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
767
               if (additions_ids[i].price == addition_month_prescriptions.addition[a].price) {
759
               if (additions_ids[i].price == addition_month_prescriptions.addition[a].price) {
777
           }
769
           }
778
         }
770
         }
779
 
771
 
780
-
781
         let p1 = {
772
         let p1 = {
782
           name: '处方' + 1,
773
           name: '处方' + 1,
783
           advices: drugs,
774
           advices: drugs,
784
           project: [],
775
           project: [],
785
           type: 1,
776
           type: 1,
786
           addition: additions
777
           addition: additions
787
-        };
778
+        }
788
         let p2 = {
779
         let p2 = {
789
           name: '处方' + 2,
780
           name: '处方' + 2,
790
           type: 2,
781
           type: 2,
792
           advices: [],
783
           advices: [],
793
           addition: []
784
           addition: []
794
 
785
 
795
-        };
796
-        console.log(this.month_prescriptions);
797
-        console.log(this.curMonthPrescriptions);
786
+        }
798
 
787
 
799
-        this.month_prescriptions.push(p1);
800
-        this.month_prescriptions.push(p2);
788
+        this.month_prescriptions.push(p1)
789
+        this.month_prescriptions.push(p2)
801
 
790
 
802
         this.curMonthPrescriptions = this.month_prescriptions[0]
791
         this.curMonthPrescriptions = this.month_prescriptions[0]
803
 
792
 
1034
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1023
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1035
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1024
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1036
                       id: prescription.advices[b].drug_id,
1025
                       id: prescription.advices[b].drug_id,
1037
-                      drug:prescription.advices[b].drug,
1026
+                      drug: prescription.advices[b].drug
1038
                     }
1027
                     }
1039
                     tempAdvice.push(obj)
1028
                     tempAdvice.push(obj)
1040
                   }
1029
                   }
1123
         }
1112
         }
1124
         getDayOrMonthHisPrescription(params).then(response => {
1113
         getDayOrMonthHisPrescription(params).then(response => {
1125
           if (response.data.state == 1) {
1114
           if (response.data.state == 1) {
1126
-            console.log(val)
1127
-            console.log(this.end_time)
1128
             this.month_prescriptions = []
1115
             this.month_prescriptions = []
1129
             if (val == this.start_time) {
1116
             if (val == this.start_time) {
1130
               var day_prescription = response.data.data.day_prescription
1117
               var day_prescription = response.data.data.day_prescription
1153
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1140
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1154
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1141
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1155
                       id: prescription.advices[b].drug_id,
1142
                       id: prescription.advices[b].drug_id,
1156
-                      drug:prescription.advices[b].drug,
1143
+                      drug: prescription.advices[b].drug
1157
                     }
1144
                     }
1158
                     tempAdvice.push(obj)
1145
                     tempAdvice.push(obj)
1159
                   }
1146
                   }
1226
           }
1213
           }
1227
         })
1214
         })
1228
 
1215
 
1229
-      },saveTemplate(val){
1230
-        let params ={
1231
-          name:val.name,
1232
-          mode:val.mode,
1233
-          patient_id:this.patientInfo.id
1216
+      }, saveTemplate(val) {
1217
+        let params = {
1218
+          name: val.name,
1219
+          mode: val.mode,
1220
+          patient_id: this.patientInfo.id
1234
         }
1221
         }
1235
         let data = {
1222
         let data = {
1236
-          "prescriptions":val.prescriptions,
1223
+          'prescriptions': val.prescriptions
1237
         }
1224
         }
1238
-
1239
-        createdTemplate(params,data).then(response => {
1225
+        createdTemplate(params, data).then(response => {
1240
           if (response.data.state == 1) {
1226
           if (response.data.state == 1) {
1241
             this.$refs.saveTemplate.hide()
1227
             this.$refs.saveTemplate.hide()
1242
 
1228
 
1243
-            this.$message.success("保存成功")
1229
+            this.$message.success('保存成功')
1244
           } else {
1230
           } else {
1245
             this.$message.error(response.data.msg)
1231
             this.$message.error(response.data.msg)
1246
           }
1232
           }
1247
         })
1233
         })
1248
 
1234
 
1249
-
1250
-
1251
       },
1235
       },
1252
       call(val) {
1236
       call(val) {
1253
         this.prescriptions = []
1237
         this.prescriptions = []
1704
 
1688
 
1705
       },
1689
       },
1706
       monthTabclickEvent(val) {
1690
       monthTabclickEvent(val) {
1707
-        console.log(val)
1708
-        console.log(this.month_prescriptions)
1709
 
1691
 
1710
         for (let i = 0; i < this.month_prescriptions.length; i++) {
1692
         for (let i = 0; i < this.month_prescriptions.length; i++) {
1711
           if (this.month_prescriptions[i].name == val.name) {
1693
           if (this.month_prescriptions[i].name == val.name) {
1712
             if (this.dayorMonth == 'month') {
1694
             if (this.dayorMonth == 'month') {
1713
               if (this.isShowDayPrescription) {
1695
               if (this.isShowDayPrescription) {
1714
                 this.curDayPrescriptions = this.month_prescriptions[i]
1696
                 this.curDayPrescriptions = this.month_prescriptions[i]
1715
-                console.log(this.curDayPrescriptions)
1716
                 //用来区分处方属于项目还是药品
1697
                 //用来区分处方属于项目还是药品
1717
                 if (this.curDayPrescriptions.advices.length > 0 && this.curDayPrescriptions.project.length == 0) {
1698
                 if (this.curDayPrescriptions.advices.length > 0 && this.curDayPrescriptions.project.length == 0) {
1718
                   this.monthCustomTabIndex = 1
1699
                   this.monthCustomTabIndex = 1
1807
 
1788
 
1808
       },
1789
       },
1809
       setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data) {
1790
       setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data) {
1791
+        this.curMonthPrescriptions = {}
1792
+        this.curPrescriptions = {}
1810
 
1793
 
1794
+        console.log(doctors)
1811
         for (let i = 0; i < doctors.length; i++) {
1795
         for (let i = 0; i < doctors.length; i++) {
1812
           if (doctors[i].user_type == 1) {
1796
           if (doctors[i].user_type == 1) {
1813
             doctors.splice(i, 1)
1797
             doctors.splice(i, 1)
1814
           }
1798
           }
1815
         }
1799
         }
1816
 
1800
 
1817
-        this.curMonthPrescriptions = {}
1818
-        this.curPrescriptions = {}
1819
-
1820
         this.prescription_id = data[0].id
1801
         this.prescription_id = data[0].id
1821
         this.editableTabsValue = '处方1'
1802
         this.editableTabsValue = '处方1'
1822
         this.dayorMonth = 'day'
1803
         this.dayorMonth = 'day'
1823
         this.$emit('event1', this.prescription_id)
1804
         this.$emit('event1', this.prescription_id)
1824
         this.curStatus = 0
1805
         this.curStatus = 0
1825
-        this.curPrescriptions = {}
1826
-        this.curMonthPrescriptions = {}
1827
         if (month_data && month_data.length > 0) {
1806
         if (month_data && month_data.length > 0) {
1828
 
1807
 
1829
           this.curMonthPrescriptions = month_data[0]
1808
           this.curMonthPrescriptions = month_data[0]
1925
             }
1904
             }
1926
           }
1905
           }
1927
         }
1906
         }
1907
+        console.log(info.register_type)
1928
         if (info.register_type == 0) {
1908
         if (info.register_type == 0) {
1929
           for (let i = 0; i < this.register.length; i++) {
1909
           for (let i = 0; i < this.register.length; i++) {
1930
             this.register_type = this.register[0].value
1910
             this.register_type = this.register[0].value
1937
         if (tab == 'more') {
1917
         if (tab == 'more') {
1938
           return false
1918
           return false
1939
         }
1919
         }
1940
-      },open_three(){
1941
-       this.$refs.saveTemplate.show(this.prescriptions)
1920
+      }, open_three() {
1921
+        for (let i = 0; i < this.prescriptions.length; i++) {
1922
+          for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
1923
+            if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == '') {
1924
+              this.$message.error('药品处方总量不能为0')
1925
+              return
1926
+            }
1927
+          }
1928
+        }
1929
+        for (let i = 0; i < this.prescriptions.length; i++) {
1930
+          for (let b = 0; b < this.prescriptions[i].project.length; b++) {
1931
+            if (this.prescriptions[i].project[b].total == 0 || this.prescriptions[i].project[b].total == '') {
1932
+              this.$message.error('项目处方总量不能为0')
1933
+              return
1934
+            }
1935
+          }
1936
+        }
1937
+        this.$refs.saveTemplate.show(this.prescriptions)
1942
       }, open_two() {
1938
       }, open_two() {
1943
         if (this.dayorMonth == 'day') {
1939
         if (this.dayorMonth == 'day') {
1944
           if (this.patientInfo == null || this.patientInfo.id == 0) {
1940
           if (this.patientInfo == null || this.patientInfo.id == 0) {
1968
         if (this.dayorMonth == 'day') {
1964
         if (this.dayorMonth == 'day') {
1969
 
1965
 
1970
           if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
1966
           if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
1971
-            this.$message.error('请先开处方');
1967
+            this.$message.error('请先开处方')
1972
             return
1968
             return
1973
           }
1969
           }
1974
         }
1970
         }
1975
 
1971
 
1976
         if (this.dayorMonth == 'day') {
1972
         if (this.dayorMonth == 'day') {
1977
           if (this.curPrescriptions.order_status == 2) {
1973
           if (this.curPrescriptions.order_status == 2) {
1978
-            this.$message.error('当前处方已经结算,无法保存');
1974
+            this.$message.error('当前处方已经结算,无法保存')
1979
             return
1975
             return
1980
           }
1976
           }
1981
           if (this.doctorValue.length <= 0) {
1977
           if (this.doctorValue.length <= 0) {
1982
-            this.$message.error('医生不能为空');
1978
+            this.$message.error('医生不能为空')
1983
             return
1979
             return
1984
           }
1980
           }
1985
 
1981
 
1986
           if (this.departmentValue.length <= 0) {
1982
           if (this.departmentValue.length <= 0) {
1987
-            this.$message.error('科室不能为空');
1983
+            this.$message.error('科室不能为空')
1988
             return
1984
             return
1989
           }
1985
           }
1990
-
1991
-          if (this.state1  <= 0) {
1992
-            this.$message.error('疾病类型不能为空');
1986
+          if (this.state1 <= 0) {
1987
+            this.$message.error('疾病类型不能为空')
1993
             return
1988
             return
1994
           }
1989
           }
1995
-
1990
+          for (let i = 0; i < this.prescriptions.length; i++) {
1991
+            for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
1992
+              if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == '') {
1993
+                this.$message.error('药品处方总量不能为0')
1994
+                return
1995
+              }
1996
+            }
1997
+          }
1998
+          for (let i = 0; i < this.prescriptions.length; i++) {
1999
+            for (let b = 0; b < this.prescriptions[i].project.length; b++) {
2000
+              if (this.prescriptions[i].project[b].total == 0 || this.prescriptions[i].project[b].total == '') {
2001
+                this.$message.error('项目处方总量不能为0')
2002
+                return
2003
+              }
2004
+            }
2005
+          }
1996
           if (index == 1) {
2006
           if (index == 1) {
1997
             let params = {
2007
             let params = {
1998
-              p_type:2,
2008
+              p_type: 2,
1999
               patient_id: this.patientInfo.id,
2009
               patient_id: this.patientInfo.id,
2000
               diagnose: this.diagnose,
2010
               diagnose: this.diagnose,
2001
               sick_type: this.state1,
2011
               sick_type: this.state1,
2046
               if (response.data.state == 1) {
2056
               if (response.data.state == 1) {
2047
                 this.$emit('change', this.patientInfo.id)
2057
                 this.$emit('change', this.patientInfo.id)
2048
                 this.$message.success('保存成功')
2058
                 this.$message.success('保存成功')
2049
-              }else{
2059
+              } else {
2050
                 this.$message.error(response.data.msg)
2060
                 this.$message.error(response.data.msg)
2051
               }
2061
               }
2052
             })
2062
             })
2106
                 }
2116
                 }
2107
 
2117
 
2108
                 for (let b = 0; b < month_prescriptions[i].project.length; b++) {
2118
                 for (let b = 0; b < month_prescriptions[i].project.length; b++) {
2109
-                  console.log('~~~~~~~')
2110
                   month_prescriptions[i].project[b].price = month_prescriptions[i].project[b].price.toString()
2119
                   month_prescriptions[i].project[b].price = month_prescriptions[i].project[b].price.toString()
2111
                   month_prescriptions[i].project[b].total = month_prescriptions[i].project[b].total.toString()
2120
                   month_prescriptions[i].project[b].total = month_prescriptions[i].project[b].total.toString()
2112
                   month_prescriptions[i].project[b].delivery_way = month_prescriptions[i].project[b].delivery_way.toString()
2121
                   month_prescriptions[i].project[b].delivery_way = month_prescriptions[i].project[b].delivery_way.toString()
2378
       },
2387
       },
2379
 
2388
 
2380
       comfirm() {
2389
       comfirm() {
2381
-        console.log('222222222222', this.curPrescriptions)
2382
 
2390
 
2383
         // if (this.curPrescriptions.order_status == 2) {
2391
         // if (this.curPrescriptions.order_status == 2) {
2384
         //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
2392
         //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
2418
           }
2426
           }
2419
         }
2427
         }
2420
 
2428
 
2421
-        console.log(this.curDrugs)
2422
-        console.log(this.curPrescriptions.advices)
2423
-
2424
         for (let i = 0; i < this.curDrugs.length; i++) {
2429
         for (let i = 0; i < this.curDrugs.length; i++) {
2425
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
2430
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
2426
             if (this.curDrugs[i].id == this.curPrescriptions.advices[a].id) {
2431
             if (this.curDrugs[i].id == this.curPrescriptions.advices[a].id) {
2497
                   single_dose_unit: temp[b].min_unit,
2502
                   single_dose_unit: temp[b].min_unit,
2498
                   prescribing_number_unit: temp[b].max_unit,
2503
                   prescribing_number_unit: temp[b].max_unit,
2499
                   medical_insurance_number: temp[b].medical_insurance_number,
2504
                   medical_insurance_number: temp[b].medical_insurance_number,
2500
-                  drug: temp[b],
2501
-                };
2505
+                  drug: temp[b]
2506
+                }
2502
 
2507
 
2503
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
2508
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
2504
                   obj.prescribing_number = 1
2509
                   obj.prescribing_number = 1
2520
             //  }
2525
             //  }
2521
 
2526
 
2522
             if (temp2.length > 0) {
2527
             if (temp2.length > 0) {
2523
-              console.log('temp2222222222', temp2)
2524
               for (let b = 0; b < temp2.length; b++) {
2528
               for (let b = 0; b < temp2.length; b++) {
2525
                 let obj = {
2529
                 let obj = {
2526
                   id: 0,
2530
                   id: 0,
2538
                   unit: temp2[b].unit,
2542
                   unit: temp2[b].unit,
2539
                   type: temp2[b].type
2543
                   type: temp2[b].type
2540
                 }
2544
                 }
2541
-                if (obj.total == 0) {
2545
+                if (obj.total == 0 || obj.total == undefined) {
2542
                   obj.total = 1
2546
                   obj.total = 1
2543
                 }
2547
                 }
2544
                 if (obj.type == 3) {
2548
                 if (obj.type == 3) {
2545
                   obj.single_dose = 1
2549
                   obj.single_dose = 1
2546
                 }
2550
                 }
2547
 
2551
 
2548
-                console.log(obj)
2549
                 this.prescriptions[i].project.push(obj)
2552
                 this.prescriptions[i].project.push(obj)
2550
               }
2553
               }
2551
               this.curStatus = 2
2554
               this.curStatus = 2
2639
         getAllProjectTeam().then(response => {
2642
         getAllProjectTeam().then(response => {
2640
           if (response.data.state == 1) {
2643
           if (response.data.state == 1) {
2641
             var team = response.data.data.team
2644
             var team = response.data.data.team
2642
-            console.log('team2222', team)
2643
             this.tabPrjectTeam = team
2645
             this.tabPrjectTeam = team
2644
             this.projectList = team
2646
             this.projectList = team
2645
           }
2647
           }
2646
         })
2648
         })
2647
       },
2649
       },
2648
       selectTeam(row) {
2650
       selectTeam(row) {
2649
-        console.log('row', row)
2650
         var arr = []
2651
         var arr = []
2651
         for (let i = 0; i < row.length; i++) {
2652
         for (let i = 0; i < row.length; i++) {
2652
           arr.push(row[i].item_id)
2653
           arr.push(row[i].item_id)
2694
                   unit: project[i].project.unit,
2695
                   unit: project[i].project.unit,
2695
                   type: project[i].type
2696
                   type: project[i].type
2696
                 }
2697
                 }
2697
-                if (obj.total == 0) {
2698
+                if (obj.total == 0 || obj.total == undefined) {
2698
                   obj.total = 1
2699
                   obj.total = 1
2699
                 }
2700
                 }
2700
 
2701
 
2715
                   unit: project[i].good_info.unit,
2716
                   unit: project[i].good_info.unit,
2716
                   type: project[i].type
2717
                   type: project[i].type
2717
                 }
2718
                 }
2718
-                if (obj.total == 0) {
2719
+                if (obj.total == 0 || obj.total == undefined) {
2719
                   obj.total = 1
2720
                   obj.total = 1
2720
                 }
2721
                 }
2721
                 this.teamList.push(obj)
2722
                 this.teamList.push(obj)
2722
 
2723
 
2723
-                console.log(this.teamList)
2724
-
2725
               }
2724
               }
2726
             }
2725
             }
2727
 
2726
 
2751
         getAllProjectList().then(response => {
2750
         getAllProjectList().then(response => {
2752
           if (response.data.state == 1) {
2751
           if (response.data.state == 1) {
2753
             var hisprojectlist = response.data.data.hisprojectlist
2752
             var hisprojectlist = response.data.data.hisprojectlist
2754
-            console.log('hisprojectlist', hisprojectlist)
2755
             this.hisList = hisprojectlist
2753
             this.hisList = hisprojectlist
2756
           }
2754
           }
2757
         })
2755
         })

+ 43 - 65
src/xt_pages/outpatientDoctorStation/components/saveTemplate.vue View File

6
             :before-close="_close"
6
             :before-close="_close"
7
     >
7
     >
8
         <div>
8
         <div>
9
-            <el-form :model="form" class="adviceForm" ref="form" label-width="100px"
10
-                     style="display: flex;flex-wrap: wrap;justify-content: space-between;">
9
+            <el-form :model="form" class="adviceForm" :rules="rules" ref="form" label-width="100px"
10
+                     >
11
 
11
 
12
-                <!--<el-form-item label="处方模板类别 : " style="width: 100%;margin-bottom:0;">-->
13
-                <!--<el-radio v-model="radio" label="1">临时</el-radio>-->
14
-                <!--<el-radio v-model="radio" label="2">长期</el-radio>-->
15
-                <!--</el-form-item>-->
16
-                <el-form-item label="处方模板名称:" style="width: 60%;margin-bottom:0;">
17
-                    <el-input v-model="form.name" placeholder=""></el-input>
12
+                <el-form-item label="模板名称:"  prop="name" style="width: 100%;margin-bottom:0;">
13
+                    <el-input v-model="form.name"  placeholder=""></el-input>
18
                 </el-form-item>
14
                 </el-form-item>
19
-                <el-form-item label="透析模式 : " style="width: 60%;">
15
+
16
+                <el-form-item label="透析模式 : " style="width: 100%;margin-top: 20px" prop="mode">
20
                     <el-select v-model="form.mode" style="width:100%;" placeholder="请选择">
17
                     <el-select v-model="form.mode" style="width:100%;" placeholder="请选择">
21
                         <el-option
18
                         <el-option
22
                                 v-for="item in modeOptions"
19
                                 v-for="item in modeOptions"
30
 
27
 
31
 
28
 
32
             <div v-for="(item,index) in allPrescription" :key="index">
29
             <div v-for="(item,index) in allPrescription" :key="index">
33
-                <el-checkbox-group v-model="item.check_group">
34
                     <div v-for="(subItem,index2) in item.prescriptions" :key="index2">
30
                     <div v-for="(subItem,index2) in item.prescriptions" :key="index2">
35
-                        <el-checkbox style="margin:10px 0;" :label="subItem.id">{{'处方' + (index2+ 1)}}</el-checkbox>
36
                         <el-table v-if="subItem.advices.length > 0" :data="subItem.advices" border style="width: 99%;"
31
                         <el-table v-if="subItem.advices.length > 0" :data="subItem.advices" border style="width: 99%;"
37
                                   :row-style="{ color: '#303133' }"
32
                                   :row-style="{ color: '#303133' }"
38
                                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
33
                                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
146
                             </el-table-column>
141
                             </el-table-column>
147
                         </el-table>
142
                         </el-table>
148
                     </div>
143
                     </div>
149
-                </el-checkbox-group>
150
             </div>
144
             </div>
151
 
145
 
152
 
146
 
153
         </div>
147
         </div>
154
         <div slot="footer" class="dialog-footer">
148
         <div slot="footer" class="dialog-footer">
155
             <el-button @click="hide">取 消</el-button>
149
             <el-button @click="hide">取 消</el-button>
156
-            <el-button type="primary" @click="submitAction()">保 存</el-button>
150
+            <el-button type="primary" @click="submitAction('form')">保 存</el-button>
157
         </div>
151
         </div>
158
     </el-dialog>
152
     </el-dialog>
159
 </template>
153
 </template>
164
   export default {
158
   export default {
165
     data() {
159
     data() {
166
       return {
160
       return {
161
+        rules: {
162
+          name: [{required: true, message: "模版名字不能为空", trigger: 'blur'}],
163
+          mode: [{required: true, message: "请选择透析模式", trigger: 'blur'}],
164
+        },
167
         visible: false,
165
         visible: false,
168
         modeOptions: {},
166
         modeOptions: {},
169
         allPrescription: [],
167
         allPrescription: [],
197
         this.form.name = ''
195
         this.form.name = ''
198
         this.form.intro = ''
196
         this.form.intro = ''
199
       }, submitAction() {
197
       }, submitAction() {
200
-
201
-        let checkGroup = []
202
-        let allPrescriptions = []
203
-        let targetPrescriptions = []
204
-        let prescriptions = []
205
-        for (let i = 0; i < this.allPrescription.length; i++) {
206
-          for (let a = 0; a < this.allPrescription[i].check_group.length; a++) {
207
-            checkGroup.push(this.allPrescription[i].check_group[a])
208
-          }
209
-          for (let a = 0; a < this.allPrescription[i].prescriptions.length; a++) {
210
-            allPrescriptions.push(this.allPrescription[i].prescriptions[a])
211
-          }
212
-        }
213
-        for (let i = 0; i < allPrescriptions.length; i++) {
214
-          for (let a = 0; a < checkGroup.length; a++) {
215
-            if (allPrescriptions[i].id == checkGroup[a]) {
216
-              targetPrescriptions.push(allPrescriptions[i])
198
+        this.$refs['form'].validate((valid) => {
199
+          if (valid) {
200
+            let checkGroup = []
201
+            let allPrescriptions = []
202
+            let targetPrescriptions = []
203
+            for (let i = 0; i < allPrescriptions.length; i++) {
204
+                  targetPrescriptions.push(allPrescriptions[i])
217
             }
205
             }
206
+            for(let i = 0; i < targetPrescriptions.length; i++){
207
+              if(targetPrescriptions[i].advices.length > 0 && targetPrescriptions[i].project.length == 0){
208
+                targetPrescriptions[i]["type"] = 1
209
+              } else if(targetPrescriptions[i].advices.length == 0 && targetPrescriptions[i].project.length > 0){
210
+                targetPrescriptions[i]["type"] = 2
211
+              }
212
+              for (let b = 0; b < targetPrescriptions[i].advices.length; b++) {
213
+                targetPrescriptions[i].advices[b].single_dose = targetPrescriptions[i].advices[b].single_dose.toString()
214
+                targetPrescriptions[i].advices[b].prescribing_number =targetPrescriptions[i].advices[b].prescribing_number.toString()
215
+                targetPrescriptions[i].advices[b].retail_price = targetPrescriptions[i].advices[b].retail_price.toString()
216
+                targetPrescriptions[i].advices[b].day = parseInt(targetPrescriptions[i].advices[b].day)
217
+              }
218
+              for (let b = 0; b < targetPrescriptions[i].project.length; b++) {
219
+                targetPrescriptions[i].project[b].price =targetPrescriptions[i].project[b].price.toString()
220
+                targetPrescriptions[i].project[b].total =targetPrescriptions[i].project[b].total.toString()
221
+                targetPrescriptions[i].project[b].delivery_way =targetPrescriptions[i].project[b].delivery_way.toString()
222
+              }
223
+            }
224
+            let params = {
225
+              name: this.form.name,
226
+              mode: this.form.mode,
227
+              prescriptions: targetPrescriptions,
228
+            }
229
+            this.$emit('save_template', params)
218
           }
230
           }
219
-        }
220
-
221
-
222
-        for(let i = 0; i < targetPrescriptions.length; i++){
223
-          if(targetPrescriptions[i].advices.length > 0 && targetPrescriptions[i].project.length == 0){
224
-            targetPrescriptions[i]["type"] = 1
225
-          } else if(targetPrescriptions[i].advices.length == 0 && targetPrescriptions[i].project.length > 0){
226
-            targetPrescriptions[i]["type"] = 2
227
-          }
228
-          for (let b = 0; b < targetPrescriptions[i].advices.length; b++) {
229
-            targetPrescriptions[i].advices[b].single_dose = targetPrescriptions[i].advices[b].single_dose.toString()
230
-            targetPrescriptions[i].advices[b].prescribing_number =targetPrescriptions[i].advices[b].prescribing_number.toString()
231
-            targetPrescriptions[i].advices[b].retail_price = targetPrescriptions[i].advices[b].retail_price.toString()
232
-            targetPrescriptions[i].advices[b].day = parseInt(targetPrescriptions[i].advices[b].day)
233
-          }
234
-          for (let b = 0; b < targetPrescriptions[i].project.length; b++) {
235
-            targetPrescriptions[i].project[b].price =targetPrescriptions[i].project[b].price.toString()
236
-            targetPrescriptions[i].project[b].total =targetPrescriptions[i].project[b].total.toString()
237
-            targetPrescriptions[i].project[b].delivery_way =targetPrescriptions[i].project[b].delivery_way.toString()
238
-          }
239
-        }
240
-
241
-        let params = {
242
-          name: this.form.name,
243
-          mode: this.form.mode,
244
-          prescriptions: targetPrescriptions,
245
-        }
246
-        this.$emit('save_template', params)
231
+        })
247
       },
232
       },
248
       show(prescriptions) {
233
       show(prescriptions) {
249
-        for (let i = 0; i < prescriptions.length; i++) {
250
-          if (prescriptions[i].id == 0) {
251
-            prescriptions[i].id = Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * Math.pow(10, 10 - 1))
252
-          }
253
-        }
254
-
255
         this.allPrescription = []
234
         this.allPrescription = []
256
         this.modeOptions = this.$store.getters.treatment_mode
235
         this.modeOptions = this.$store.getters.treatment_mode
257
         let obj = {
236
         let obj = {
258
-          check_group: [],
259
           prescriptions: prescriptions
237
           prescriptions: prescriptions
260
         }
238
         }
261
         this.allPrescription.push(obj)
239
         this.allPrescription.push(obj)

+ 98 - 51
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

341
                 }
341
                 }
342
               }
342
               }
343
             }
343
             }
344
-            console.log(this.un_cure_data)
345
-            console.log(this.cure_data)
346
             //排班
344
             //排班
347
             for (let i = 0; i < response.data.data.list_two.length; i++) {
345
             for (let i = 0; i < response.data.data.list_two.length; i++) {
348
               //未就诊
346
               //未就诊
584
           'record_date': this.record_date,
582
           'record_date': this.record_date,
585
           'type': this.radio,
583
           'type': this.radio,
586
           'sch_type':this.schedule_type,
584
           'sch_type':this.schedule_type,
587
-        };
588
-        this.patientTableData = [];
585
+        }
586
+        this.un_cure_data = []
587
+        this.cure_data = []
588
+        this.all_data = []
589
 
589
 
590
         getSchedulePatientList(params).then(response => {
590
         getSchedulePatientList(params).then(response => {
591
           if (response.data.state == 0) {
591
           if (response.data.state == 0) {
592
             this.$message.error(response.data.msg);
592
             this.$message.error(response.data.msg);
593
             return false
593
             return false
594
           } else {
594
           } else {
595
-            this.patientTableData = response.data.data.list;
596
-            this.patientTableDataTwo = response.data.data.list;
597
-            this.cal_one = response.data.data.total_one;
598
-            this.cal_two = response.data.data.total_two;
599
-            this.admin_info = response.data.data.info;
595
+            //挂号
596
+            for (let i = 0; i < response.data.data.list.length; i++) {
597
+              for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
598
+                //未就诊
599
+                if (response.data.data.list[i].his_patient[b].prescription.length == 0) {
600
+                  let obj = {
601
+                    name: response.data.data.list[i].his_patient[b].name,
602
+                    number: response.data.data.list[i].his_patient[b].number,
603
+                    id: response.data.data.list[i].id,
604
+                    his_patient_id: response.data.data.list[i].his_patient[b].id
605
+                  }
606
+                  this.un_cure_data.push(obj)
607
+                }
608
+                //已就诊
609
+                if (response.data.data.list[i].his_patient[b].prescription.length > 0) {
610
+                  let obj = {
611
+                    name: response.data.data.list[i].his_patient[b].name,
612
+                    number: response.data.data.list[i].his_patient[b].number,
613
+                    id: response.data.data.list[i].id,
614
+                    his_patient_id: response.data.data.list[i].his_patient[b].id
615
+                  }
616
+                  this.cure_data.push(obj)
617
+                }
618
+              }
619
+            }
600
 
620
 
601
-            if (this.patientTableData.length > 0) {
602
-              this.$refs.tab.setCurrentRow(this.patientTableData[0]);
603
-              this.oldCurrentRow = this.patientTableData[0];
621
+            //排班
622
+            for (let i = 0; i < response.data.data.list_two.length; i++) {
623
+              //未就诊
624
+              if (response.data.data.list_two[i].prescription.length == 0 && response.data.data.list_two[i].his_patient.id == 0) {
625
+                let obj = {
626
+                  name: response.data.data.list_two[i].name,
627
+                  number: response.data.data.list_two[i].his_patient.number,
628
+                  id: response.data.data.list_two[i].id,
629
+                  his_patient_id: response.data.data.list_two[i].his_patient.id
630
+                }
631
+                this.un_cure_data.push(obj)
632
+              }
604
 
633
 
605
-              this.getPatientInfo(this.patientTableData[0])
634
+              //已就诊
635
+              if (response.data.data.list_two[i].prescription.length > 0 && response.data.data.list_two[i].his_patient.id == 0) {
636
+                let obj = {
637
+                  name: response.data.data.list_two[i].name,
638
+                  number: response.data.data.list_two[i].his_patient.number,
639
+                  id: response.data.data.list_two[i].id,
640
+                  his_patient_id: response.data.data.list_two[i].his_patient.id
641
+                }
642
+                this.cure_data.push(obj)
643
+              }
606
             }
644
             }
607
 
645
 
608
-            this.prescriptionList = response.data.data.list.prescription
646
+            this.all_data = this.all_data.concat(this.cure_data)
647
+            this.all_data = this.all_data.concat(this.un_cure_data)
609
 
648
 
610
-            // this.patientid = this.patientTableData[0].patient_id
649
+            this.cure_data_two = this.cure_data
650
+            this.un_cure_data_two =this.un_cure_data
651
+            this.all_data_two = this.all_data
611
 
652
 
653
+            this.cal_one = this.un_cure_data.length
654
+            this.cal_two = this.cure_data.length
655
+            this.admin_info = response.data.data.info
656
+            if (this.un_cure_data.length > 0) {
657
+              if(this.radio == 0){
658
+                this.$refs.tab.setCurrentRow(this.all_data[0])
659
+                this.oldCurrentRow = this.all_data[0]
660
+                this.getPatientInfo(this.all_data[0])
661
+              }else if(this.radio == 1){
662
+
663
+                this.$refs.tab.setCurrentRow(this.un_cure_data[0])
664
+                this.oldCurrentRow = this.un_cure_data[0]
665
+                this.getPatientInfo(this.un_cure_data[0])
666
+
667
+              }else if(this.radio == 2){
668
+
669
+                this.$refs.tab.setCurrentRow(this.cure_data[0])
670
+                this.oldCurrentRow = this.cure_data[0]
671
+                this.getPatientInfo(this.cure_data[0])
672
+
673
+              }
674
+
675
+            }
612
           }
676
           }
613
         })
677
         })
614
       },
678
       },
761
         for (let i = 0; i < additions_ids.length; i++) {
825
         for (let i = 0; i < additions_ids.length; i++) {
762
           let obj = {}
826
           let obj = {}
763
           let count = 0
827
           let count = 0
764
-          console.log(addition_month_prescriptions.addition)
765
           if (addition_month_prescriptions.addition) {
828
           if (addition_month_prescriptions.addition) {
766
             for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
829
             for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
767
               if (project_ids[i].price == addition_month_prescriptions.addition[a].price) {
830
               if (project_ids[i].price == addition_month_prescriptions.addition[a].price) {
777
           }
840
           }
778
         }
841
         }
779
 
842
 
780
-        console.log(drugs)
781
-        console.log(projects)
782
-        console.log(additions)
783
 
843
 
784
         let p1 = {
844
         let p1 = {
785
           name: '处方' + 1,
845
           name: '处方' + 1,
1004
                 }
1064
                 }
1005
               }
1065
               }
1006
             }
1066
             }
1007
-            console.log(this.un_cure_data)
1008
-            console.log(this.cure_data)
1009
 
1067
 
1010
 
1068
 
1011
             //排班
1069
             //排班
1091
             this.patientInfo = response.data.data.xt_info
1149
             this.patientInfo = response.data.data.xt_info
1092
             this.hisPatientInfo = response.data.data.his_info
1150
             this.hisPatientInfo = response.data.data.his_info
1093
             this.case_history = response.data.data.case_history
1151
             this.case_history = response.data.data.case_history
1094
-            console.log('病历222222', this.case_history)
1095
             this.info = response.data.data.info
1152
             this.info = response.data.data.info
1096
             this.doctors = response.data.data.doctors
1153
             this.doctors = response.data.data.doctors
1097
             this.department = response.data.data.department
1154
             this.department = response.data.data.department
1451
       },
1508
       },
1452
 
1509
 
1453
       choosePatient(val) {
1510
       choosePatient(val) {
1454
-        console.log(111111,val);
1455
         if(this.titleType == '电子病历'){
1511
         if(this.titleType == '电子病历'){
1456
-          console.log('this.$refs.child.watchSign',this.$refs.child.watchSign);
1457
           if(this.$refs.child.watchSign > 2){
1512
           if(this.$refs.child.watchSign > 2){
1458
             this.$confirm('是否保存当前病例', '保存', {
1513
             this.$confirm('是否保存当前病例', '保存', {
1459
               confirmButtonText: '确 定',
1514
               confirmButtonText: '确 定',
1488
                   this.patientInfo = response.data.data.xt_info;
1543
                   this.patientInfo = response.data.data.xt_info;
1489
                   this.hisPatientInfo = response.data.data.his_info;
1544
                   this.hisPatientInfo = response.data.data.his_info;
1490
                   this.case_history = response.data.data.case_history;
1545
                   this.case_history = response.data.data.case_history;
1491
-                  console.log("数据是22222多少",this.case_history);
1492
                   this.info = response.data.data.info;
1546
                   this.info = response.data.data.info;
1493
                   this.doctors = response.data.data.doctors;
1547
                   this.doctors = response.data.data.doctors;
1494
                   this.department = response.data.data.department;
1548
                   this.department = response.data.data.department;
1868
                   this.patientInfo = response.data.data.xt_info;
1922
                   this.patientInfo = response.data.data.xt_info;
1869
                   this.hisPatientInfo = response.data.data.his_info;
1923
                   this.hisPatientInfo = response.data.data.his_info;
1870
                   this.case_history = response.data.data.case_history;
1924
                   this.case_history = response.data.data.case_history;
1871
-                  console.log("数据是22222多少",this.case_history);
1872
                   this.info = response.data.data.info;
1925
                   this.info = response.data.data.info;
1873
                   this.doctors = response.data.data.doctors;
1926
                   this.doctors = response.data.data.doctors;
1874
                   this.department = response.data.data.department;
1927
                   this.department = response.data.data.department;
2249
                   this.patientInfo = response.data.data.xt_info;
2302
                   this.patientInfo = response.data.data.xt_info;
2250
                   this.hisPatientInfo = response.data.data.his_info;
2303
                   this.hisPatientInfo = response.data.data.his_info;
2251
                   this.case_history = response.data.data.case_history;
2304
                   this.case_history = response.data.data.case_history;
2252
-                  console.log("数据是22222多少",this.case_history);
2253
                   this.info = response.data.data.info;
2305
                   this.info = response.data.data.info;
2254
                   this.doctors = response.data.data.doctors;
2306
                   this.doctors = response.data.data.doctors;
2255
                   this.department = response.data.data.department;
2307
                   this.department = response.data.data.department;
2603
               });
2655
               });
2604
             this.$refs.child.watchSign = 0
2656
             this.$refs.child.watchSign = 0
2605
           }
2657
           }
2606
-        }else{
2658
+        }
2659
+        else{
2607
         var nowDate = new Date();
2660
         var nowDate = new Date();
2608
         var nowYear = nowDate.getFullYear();
2661
         var nowYear = nowDate.getFullYear();
2609
         var nowMonth = nowDate.getMonth() + 1;
2662
         var nowMonth = nowDate.getMonth() + 1;
2638
         }
2691
         }
2639
 
2692
 
2640
         if (isShowDailog) {
2693
         if (isShowDailog) {
2641
-          this.patientTableData.map((item, index) => {
2642
-            if (item.patient_id == this.oldCurrentRow.patient_id) {
2643
-              this.$refs.tab.setCurrentRow(this.patientTableData[index])
2694
+          this.all_data.map((item, index) => {
2695
+            if (item.id == this.oldCurrentRow.id) {
2696
+              this.$refs.tab.setCurrentRow(this.all_data[index])
2644
               return
2697
               return
2645
             }
2698
             }
2646
           })
2699
           })
2651
           }).then(() => {
2704
           }).then(() => {
2652
             this.open(1)
2705
             this.open(1)
2653
           }).catch(() => {
2706
           }).catch(() => {
2654
-            this.patientTableData.map((item, index) => {
2655
-              if (item.patient_id == val.patient_id) {
2656
-                this.$refs.tab.setCurrentRow(this.patientTableData[index])
2707
+
2708
+            for(let i = 0; i < this.all_data.length; i++){
2709
+              if(this.all_data[i].id == val.id){
2710
+                this.$refs.tab.setCurrentRow(this.all_data[i])
2657
               }
2711
               }
2658
-            })
2712
+            }
2659
 
2713
 
2660
             this.patientid = val.id
2714
             this.patientid = val.id
2661
             let params = {
2715
             let params = {
2671
                 this.$message.error(response.data.msg)
2725
                 this.$message.error(response.data.msg)
2672
                 return false
2726
                 return false
2673
               } else {
2727
               } else {
2728
+                for(let i = 0;i < this.all_data.length; i++){
2729
+                  if(this.all_data[i].id == val.id){
2730
+                    this.oldCurrentRow =  this.all_data[i]
2731
+                  }
2732
+                }
2674
 
2733
 
2675
                 this.prescriptions = []
2734
                 this.prescriptions = []
2676
                 this.patientInfo = response.data.data.xt_info
2735
                 this.patientInfo = response.data.data.xt_info
2677
                 this.hisPatientInfo = response.data.data.his_info
2736
                 this.hisPatientInfo = response.data.data.his_info
2678
                 this.case_history = response.data.data.case_history
2737
                 this.case_history = response.data.data.case_history
2679
-                console.log('数据列表是多少', this.case_history)
2680
                 var month_prescriptions = response.data.data.month_prescriptions
2738
                 var month_prescriptions = response.data.data.month_prescriptions
2681
                 this.setMonthPrescription(month_prescriptions)
2739
                 this.setMonthPrescription(month_prescriptions)
2682
                 this.doctors = response.data.data.doctors
2740
                 this.doctors = response.data.data.doctors
2688
                   }
2746
                   }
2689
                 }
2747
                 }
2690
 
2748
 
2691
-                this.case_history = case_history
2749
+                this.case_history = response.data.data.case_history
2692
                 this.info = response.data.data.info
2750
                 this.info = response.data.data.info
2693
                 this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
2751
                 this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
2694
                 if (this.case_history.breathing <= 0) {
2752
                 if (this.case_history.breathing <= 0) {
3059
               this.patientInfo = response.data.data.xt_info
3117
               this.patientInfo = response.data.data.xt_info
3060
               this.hisPatientInfo = response.data.data.his_info
3118
               this.hisPatientInfo = response.data.data.his_info
3061
               this.case_history = response.data.data.case_history
3119
               this.case_history = response.data.data.case_history
3062
-              console.log('数据是22222多少', this.case_history)
3063
               this.info = response.data.data.info
3120
               this.info = response.data.data.info
3064
               this.doctors = response.data.data.doctors
3121
               this.doctors = response.data.data.doctors
3065
               this.department = response.data.data.department
3122
               this.department = response.data.data.department
3413
 
3470
 
3414
         }
3471
         }
3415
         }
3472
         }
3416
-
3417
-
3418
-
3419
-
3420
-
3421
       },
3473
       },
3422
       currentChange(currentRow, oldCurrentRow) {
3474
       currentChange(currentRow, oldCurrentRow) {
3423
         this.newPatientId = oldCurrentRow.id;
3475
         this.newPatientId = oldCurrentRow.id;
3424
-        console.log('老数据',oldCurrentRow.id);
3425
         this.patientid = oldCurrentRow.id;
3476
         this.patientid = oldCurrentRow.id;
3426
-
3427
         let isShowDailog = false
3477
         let isShowDailog = false
3428
         for (let i = 0; i < this.prescriptions.length; i++) {
3478
         for (let i = 0; i < this.prescriptions.length; i++) {
3429
           if ((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)) {
3479
           if ((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)) {
3434
           this.oldCurrentRow = currentRow
3484
           this.oldCurrentRow = currentRow
3435
           return
3485
           return
3436
         }
3486
         }
3437
-
3438
-
3439
       }, open_two() {
3487
       }, open_two() {
3440
         this.$refs.prescriptions.open_two()
3488
         this.$refs.prescriptions.open_two()
3441
       },open_three(){
3489
       },open_three(){
3442
         this.$refs.prescriptions.open_three()
3490
         this.$refs.prescriptions.open_three()
3443
-
3444
-
3445
       },
3491
       },
3446
       open(index) {
3492
       open(index) {
3447
 
3493
 
3504
           if (response.data.state == 1) {
3550
           if (response.data.state == 1) {
3505
             this.centerDialogVisible = true
3551
             this.centerDialogVisible = true
3506
             var list = response.data.data.list
3552
             var list = response.data.data.list
3507
-            console.log('list2222222', list)
3508
             for (let i = 0; i < list.length; i++) {
3553
             for (let i = 0; i < list.length; i++) {
3509
               list[i].prescription_number = list[i].prescription_number + i
3554
               list[i].prescription_number = list[i].prescription_number + i
3510
             }
3555
             }
3514
       },
3559
       },
3515
       handleSelectionChange(val) {
3560
       handleSelectionChange(val) {
3516
         this.selecting_schs = val
3561
         this.selecting_schs = val
3517
-        // console.log("99999",this.selecting_schs)
3518
       },
3562
       },
3519
       handleClick() {
3563
       handleClick() {
3564
+        if(this.titleType == "电子处方"){
3565
+          this.getPatientInfo()
3566
+        }
3520
 
3567
 
3521
       },
3568
       },
3522
       savePrint() {
3569
       savePrint() {

+ 22 - 5
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue View File

7
         </div>
7
         </div>
8
         <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
8
         <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
9
             <div class="mainLeft">
9
             <div class="mainLeft">
10
-                <!--<div class="mainCell" style="margin-bottom:10px;">-->
11
-                    <!--<el-input size="small" placeholder="请输入姓名" @input="searchAction"-->
12
-                              <!--@keyup.enter.native='searchAction'-->
13
-                              <!--v-model="search_input" class="filter-item"/>-->
10
+                <div class="mainCell" style="margin-bottom:10px;">
11
+                    <el-input size="small" placeholder="请输入姓名或者透析号"
12
+                              v-model="search_input" class="filter-item" @input="searchAction"
13
+                              @keyup.enter.native='searchAction'/>
14
                     <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
14
                     <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
15
                                <!--@click="searchAction">-->
15
                                <!--@click="searchAction">-->
16
                         <!--搜索-->
16
                         <!--搜索-->
17
                     <!--</el-button>-->
17
                     <!--</el-button>-->
18
-                <!--</div>-->
18
+                </div>
19
                 <div>
19
                 <div>
20
                     <el-table :data="data" :height="tableHeight" @row-click='choosePatient'
20
                     <el-table :data="data" :height="tableHeight" @row-click='choosePatient'
21
                                border style="width: 100%;"
21
                                border style="width: 100%;"
91
         fullHeight: document.documentElement.clientHeight,
91
         fullHeight: document.documentElement.clientHeight,
92
         isloading: false,
92
         isloading: false,
93
         data: [],
93
         data: [],
94
+        all_data:[],
94
         page: 1,
95
         page: 1,
95
         limit: 10,
96
         limit: 10,
96
         patient_id: 0,
97
         patient_id: 0,
98
       }
99
       }
99
     },
100
     },
100
     methods: {
101
     methods: {
102
+      searchAction() {
103
+        this.data = []
104
+        if (this.search_input.length == 0) {
105
+          this.data = this.all_data
106
+        } else {
107
+
108
+          for(let i = 0; i < this.all_data.length; i++){
109
+            if(this.all_data[i].name.indexOf(this.search_input)  != -1 || this.all_data[i].dialysis_no.indexOf(this.search_input)  != -1){
110
+              this.data.push(this.all_data[i])
111
+            }
112
+          }
113
+        }
114
+      },
115
+
101
       deleteTemplate(row) {
116
       deleteTemplate(row) {
102
         this.$confirm('处方模版删除后不可恢复,是否确认删除', '删除', {
117
         this.$confirm('处方模版删除后不可恢复,是否确认删除', '删除', {
103
           confirmButtonText: '确 定',
118
           confirmButtonText: '确 定',
172
         getPatientList().then(response => {
187
         getPatientList().then(response => {
173
           if (response.data.state == 1) {
188
           if (response.data.state == 1) {
174
             this.data = response.data.data.list
189
             this.data = response.data.data.list
190
+            this.all_data = response.data.data.list
191
+
175
             this.$refs.tab.setCurrentRow(this.data[0])
192
             this.$refs.tab.setCurrentRow(this.data[0])
176
             // this.patient_id = this.data[0].id
193
             // this.patient_id = this.data[0].id
177
             // this.GetPrescriptionTemplateList()
194
             // this.GetPrescriptionTemplateList()

+ 7 - 4
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

175
                                 </el-tab-pane>
175
                                 </el-tab-pane>
176
                             </el-tabs>
176
                             </el-tabs>
177
                         </div>
177
                         </div>
178
+                        </div>
178
                     </el-tabs>
179
                     </el-tabs>
179
-                    <template>
180
+
181
+
182
+                <template>
180
 
183
 
181
 
184
 
182
                         <div class="comfirmBox">
185
                         <div class="comfirmBox">
1351
                   unit: temp2[b].unit,
1354
                   unit: temp2[b].unit,
1352
                   type: temp2[b].type
1355
                   type: temp2[b].type
1353
                 }
1356
                 }
1354
-                if (obj.total == 0) {
1357
+                if (obj.total == 0 || obj.total == undefined) {
1355
                   obj.total = 1
1358
                   obj.total = 1
1356
                 }
1359
                 }
1357
                 if (obj.type == 3) {
1360
                 if (obj.type == 3) {
1619
                   unit: project[i].project.unit,
1622
                   unit: project[i].project.unit,
1620
                   type: project[i].type
1623
                   type: project[i].type
1621
                 }
1624
                 }
1622
-                if (obj.total == 0) {
1625
+                if (obj.total == 0 || obj.total == undefined) {
1623
                   obj.total = 1
1626
                   obj.total = 1
1624
                 }
1627
                 }
1625
 
1628
 
1640
                   unit: project[i].good_info.unit,
1643
                   unit: project[i].good_info.unit,
1641
                   type: project[i].type
1644
                   type: project[i].type
1642
                 }
1645
                 }
1643
-                if (obj.total == 0) {
1646
+                if (obj.total == 0 || obj.total == undefined) {
1644
                   obj.total = 1
1647
                   obj.total = 1
1645
                 }
1648
                 }
1646
                 this.teamList.push(obj)
1649
                 this.teamList.push(obj)