浏览代码

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

see999 4 年前
父节点
当前提交
8c3c5c6d1a

+ 8 - 0
src/api/stock.js 查看文件

625
     params: params
625
     params: params
626
   })
626
   })
627
 }
627
 }
628
+
629
+export function getStockDrugCount(params) {
630
+  return request({
631
+    url: '/api/good/getstockdrugcount',
632
+    method: 'get',
633
+    params: params
634
+  })
635
+}

+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyFive.vue 查看文件

1367
           if (patientInfo.gender === 2) {
1367
           if (patientInfo.gender === 2) {
1368
             patientInfo.gender = "女";
1368
             patientInfo.gender = "女";
1369
           }
1369
           }
1370
-          console.log("patientInfo", patientInfo);
1370
+          // console.log("patientInfo", patientInfo);
1371
           this.patientInfo = patientInfo;
1371
           this.patientInfo = patientInfo;
1372
           this.patientInfo.birth = uParseTime(
1372
           this.patientInfo.birth = uParseTime(
1373
             this.patientInfo.birthday,
1373
             this.patientInfo.birthday,

+ 1 - 1
src/xt_pages/hospitalStation/components/deskRecord.vue 查看文件

77
     </el-form>
77
     </el-form>
78
     <div class="mainTitle">病历信息:</div>
78
     <div class="mainTitle">病历信息:</div>
79
     <el-form class="recordForm" :model="case_history" ref="form" label-width="80px">
79
     <el-form class="recordForm" :model="case_history" ref="form" label-width="80px">
80
-     <el-form-item label="疾病类型: " prop="name" style="width:49%;">
80
+     <el-form-item filterable label="疾病类型: " prop="name" style="width:49%;">
81
         <el-select v-model="case_history.sick" style="width:100%;" placeholder="请选择">
81
         <el-select v-model="case_history.sick" style="width:100%;" placeholder="请选择">
82
           <el-option
82
           <el-option
83
             v-for="(item,index) in sick"
83
             v-for="(item,index) in sick"

+ 1 - 1
src/xt_pages/hospitalStation/index.vue 查看文件

75
         <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
75
         <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
76
 
76
 
77
           <el-form-item label="疾病类型:" prop="sick_type" :validate-event="is_Name">
77
           <el-form-item label="疾病类型:" prop="sick_type" :validate-event="is_Name">
78
-            <el-select v-model="form.sick_type" placeholder="">
78
+            <el-select filterable v-model="form.sick_type" placeholder="">
79
               <el-option
79
               <el-option
80
                 v-for="(item,index) in sick"
80
                 v-for="(item,index) in sick"
81
                 :key="index"
81
                 :key="index"

+ 232 - 193
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

64
 
64
 
65
                         </el-button>
65
                         </el-button>
66
 
66
 
67
+                        <!--<el-button-->
68
+                                <!--size="small" @click="sz_open(8)" type="primary"-->
69
+                        <!--&gt;预结算-->
70
+                        <!--</el-button>-->
71
+
72
+                        <!--<el-button-->
73
+                                <!--v-if="this.order.order_status == 1"-->
74
+                                <!--size="small" @click="sz_open(7)" type="primary"-->
75
+                        <!--&gt;撤销明细-->
76
+                        <!--</el-button>-->
77
+
67
                         <el-button
78
                         <el-button
68
                                 v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1"
79
                                 v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1"
69
                                 size="small"
80
                                 size="small"
71
                                 type="primary">收费
82
                                 type="primary">收费
72
                         </el-button>
83
                         </el-button>
73
 
84
 
74
-                        <el-button size="small" @click="sz_open(11)" type="primary"
75
-                                   v-if="this.hisPatientInfo.id > 0 "
76
-                        >
77
-                            退号
78
-                        </el-button>
79
-
80
-
81
                         <el-button size="small" @click="sz_open(5)" type="primary"
85
                         <el-button size="small" @click="sz_open(5)" type="primary"
82
                                    v-if="this.order.order_status == 2"
86
                                    v-if="this.order.order_status == 2"
83
                         >
87
                         >
85
                         </el-button>
89
                         </el-button>
86
                         <el-button size="small" @click="sz_open(10)" type="primary">打印</el-button>
90
                         <el-button size="small" @click="sz_open(10)" type="primary">打印</el-button>
87
 
91
 
88
-                        <!--<el-button-->
89
-                        <!--size="small" @click="sz_open(7)" type="primary"-->
90
-                        <!--&gt;撤销明细-->
91
-                        <!--</el-button>-->
92
+                        <el-button size="small" @click="sz_open(11)" type="primary"
93
+                                   v-if="this.hisPatientInfo.id > 0 "
94
+                        >
95
+                            退号
96
+                        </el-button>
97
+
92
                     </div>
98
                     </div>
93
 
99
 
94
 
100
 
525
     },
531
     },
526
     methods: {
532
     methods: {
527
       query() {
533
       query() {
528
-        if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
529
-          var that = this;
534
+        if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
535
+          var that = this
530
           axios.get('http://127.0.0.1:9532/api/org/info', {
536
           axios.get('http://127.0.0.1:9532/api/org/info', {
531
             params: {}
537
             params: {}
532
           })
538
           })
533
             .then(function(response) {
539
             .then(function(response) {
534
               if (response.data.state == 0) {
540
               if (response.data.state == 0) {
535
-                that.$message.error(response.data.msg);
541
+                that.$message.error(response.data.msg)
536
                 return false
542
                 return false
537
               } else {
543
               } else {
538
 
544
 
564
           patient_id: this.patientInfo.id,
570
           patient_id: this.patientInfo.id,
565
           start_time: val,
571
           start_time: val,
566
           end_time: this.other_end_time,
572
           end_time: this.other_end_time,
567
-          p_type:2,
568
-          type: this.radio,
573
+          p_type: 2,
574
+          type: this.radio
569
 
575
 
570
-
571
-        };
576
+        }
572
         getDayOrMonthHisPrescription(params).then(response => {
577
         getDayOrMonthHisPrescription(params).then(response => {
573
           if (response.data.state == 1) {
578
           if (response.data.state == 1) {
574
             this.month_prescriptions = []
579
             this.month_prescriptions = []
585
           patient_id: this.patientInfo.id,
590
           patient_id: this.patientInfo.id,
586
           start_time: this.other_start_time,
591
           start_time: this.other_start_time,
587
           end_time: val,
592
           end_time: val,
588
-          p_type:2
593
+          p_type: 2
589
 
594
 
590
-        };
595
+        }
591
         getDayOrMonthHisPrescription(params).then(response => {
596
         getDayOrMonthHisPrescription(params).then(response => {
592
           if (response.data.state == 1) {
597
           if (response.data.state == 1) {
593
-            this.month_prescriptions = [];
594
-            this.setMonthPrescription(response.data.data.day_prescription);
598
+            this.month_prescriptions = []
599
+            this.setMonthPrescription(response.data.data.day_prescription)
595
             this.curMonthPrescriptions = this.month_prescriptions[0]
600
             this.curMonthPrescriptions = this.month_prescriptions[0]
596
 
601
 
597
           } else {
602
           } else {
618
 
623
 
619
         }
624
         }
620
 
625
 
621
-        if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 ||  this.$store.getters.xt_user.org_id == 10138) {
626
+        if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
622
           var that = this
627
           var that = this
623
           axios.get('http://127.0.0.1:9532/sz/api/settle/get', {
628
           axios.get('http://127.0.0.1:9532/sz/api/settle/get', {
624
             params: form
629
             params: form
639
                   }).catch(() => {
644
                   }).catch(() => {
640
                   })
645
                   })
641
 
646
 
642
-
643
                 } else {
647
                 } else {
644
-                  that.changeRadioAndPatient(2);
645
-                  that.radio = 2;
646
-                  that.$refs.charge.hide();
647
-                  that.state = '已收费';
648
-                  that.$message({ message: '收费成功', type: 'success' });
649
-                  that.loadingtwo = false;
650
-                  that.cal_one = this.cal_one - 1;
651
-                  that.cal_two = this.cal_two + 1;
648
+                  that.changeRadioAndPatient(2)
649
+                  that.radio = 2
650
+                  that.$refs.charge.hide()
651
+                  that.state = '已收费'
652
+                  that.$message({ message: '收费成功', type: 'success' })
653
+                  that.loadingtwo = false
654
+                  that.cal_one = this.cal_one - 1
655
+                  that.cal_two = this.cal_two + 1
652
                   that.patientTableData.splice(this.current_index, 1)
656
                   that.patientTableData.splice(this.current_index, 1)
653
                 }
657
                 }
654
               }
658
               }
657
 
661
 
658
             })
662
             })
659
 
663
 
660
-        } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990  ) {
661
-          var that = this;
664
+        } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
665
+          var that = this
662
           axios.get('http://127.0.0.1:9532/api/upload/get', {
666
           axios.get('http://127.0.0.1:9532/api/upload/get', {
663
             params: form,
667
             params: form,
664
             headers: {
668
             headers: {
681
                   }).catch(() => {
685
                   }).catch(() => {
682
                   })
686
                   })
683
 
687
 
684
-
685
                 } else {
688
                 } else {
686
-                  that.changeRadioAndPatient(2);
687
-                  that.radio = 2;
688
-                  that.$refs.charge.hide();
689
-                  that.loadingtwo = false;
690
-                  that.state = '已收费';
691
-                  that.$message({ message: '收费成功', type: 'success', duration: 5000 });
692
-                  that.loadingtwo = false;
693
-                  that.cal_one = this.cal_one - 1;
694
-                  that.cal_two = this.cal_two + 1;
689
+                  that.changeRadioAndPatient(2)
690
+                  that.radio = 2
691
+                  that.$refs.charge.hide()
692
+                  that.loadingtwo = false
693
+                  that.state = '已收费'
694
+                  that.$message({ message: '收费成功', type: 'success', duration: 5000 })
695
+                  that.loadingtwo = false
696
+                  that.cal_one = this.cal_one - 1
697
+                  that.cal_two = this.cal_two + 1
695
                   that.patientTableData.splice(this.current_index, 1)
698
                   that.patientTableData.splice(this.current_index, 1)
696
 
699
 
697
-
698
                 }
700
                 }
699
               }
701
               }
700
             })
702
             })
704
         } else {
706
         } else {
705
           upload(form).then(response => {
707
           upload(form).then(response => {
706
             if (response.data.state == 0) {
708
             if (response.data.state == 0) {
707
-              this.$message.error(response.data.msg);
708
-              this.loadingtwo = false;
709
-              this.$refs.charge.hide();
709
+              this.$message.error(response.data.msg)
710
+              this.loadingtwo = false
711
+              this.$refs.charge.hide()
710
               return false
712
               return false
711
             } else {
713
             } else {
712
-              this.$refs.charge.hide();
713
-              this.radio = 2;
714
-              this.changeRadioAndPatient(2);
715
-
716
-              this.loadingtwo = false;
717
-              this.state = '已收费';
718
-              this.$message({ message: '收费成功', type: 'success' });
719
-              this.$refs.charge.hide();
714
+              this.$refs.charge.hide()
715
+              this.radio = 2
716
+              this.changeRadioAndPatient(2)
717
+
718
+              this.loadingtwo = false
719
+              this.state = '已收费'
720
+              this.$message({ message: '收费成功', type: 'success' })
721
+              this.$refs.charge.hide()
720
               this.loadingtwo = false
722
               this.loadingtwo = false
721
             }
723
             }
722
           })
724
           })
727
         this.$refs.register9504.hide()
729
         this.$refs.register9504.hide()
728
 
730
 
729
       }, registerConfirm(forms) {
731
       }, registerConfirm(forms) {
730
-        forms['record_time'] = this.record_date;
731
-        forms['admin_user_id'] = this.$store.getters.xt_user.user.id;
732
-        forms['org_id'] = this.$store.getters.xt_user.org_id;
732
+        forms['record_time'] = this.record_date
733
+        forms['admin_user_id'] = this.$store.getters.xt_user.user.id
734
+        forms['org_id'] = this.$store.getters.xt_user.org_id
733
 
735
 
734
-        this.loadingone = true;
736
+        this.loadingone = true
735
 
737
 
736
         var that = this
738
         var that = this
737
-        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 ||  this.$store.getters.xt_user.org_id ==  10138) {
739
+        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
738
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
740
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
739
             params: forms,
741
             params: forms,
740
             headers: {
742
             headers: {
757
                   }).catch(() => {
759
                   }).catch(() => {
758
                   })
760
                   })
759
 
761
 
760
-
761
                 } else {
762
                 } else {
762
                   that.changeRadio(1)
763
                   that.changeRadio(1)
763
-                  that.$refs.register9504.hide();
764
-                  that.$message({ message: '挂号成功', type: 'success' });
764
+                  that.$refs.register9504.hide()
765
+                  that.$message({ message: '挂号成功', type: 'success' })
765
                   // let params = {
766
                   // let params = {
766
                   //   'record_date': that.record_date
767
                   //   'record_date': that.record_date
767
                   // }
768
                   // }
879
 
880
 
880
         var that = this
881
         var that = this
881
 
882
 
882
-        if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 ||this.$store.getters.xt_user.org_id == 10138) {
883
+        if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
883
 
884
 
884
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
885
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
885
             params: forms,
886
             params: forms,
1016
 
1017
 
1017
             })
1018
             })
1018
 
1019
 
1019
-        } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671  || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
1020
+        } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
1020
           var that = this
1021
           var that = this
1021
           axios.get('http://127.0.0.1:9532/api/register/get', {
1022
           axios.get('http://127.0.0.1:9532/api/register/get', {
1022
             params: forms,
1023
             params: forms,
1184
           'record_date': val,
1185
           'record_date': val,
1185
           'patient_id': this.patientInfo.id,
1186
           'patient_id': this.patientInfo.id,
1186
           'type': this.radio,
1187
           'type': this.radio,
1187
-          'p_type':2,
1188
-          'his_patient_id':this.hisPatientInfo.id
1189
-        };
1188
+          'p_type': 2,
1189
+          'his_patient_id': this.hisPatientInfo.id
1190
+        }
1190
         getChargeHisPatientInfo(params).then(response => {
1191
         getChargeHisPatientInfo(params).then(response => {
1191
           if (response.data.state == 0) {
1192
           if (response.data.state == 0) {
1192
             this.$message.error(response.data.msg)
1193
             this.$message.error(response.data.msg)
1247
                   remark: prescription.project[b].remark,
1248
                   remark: prescription.project[b].remark,
1248
                   // medical_code: prescription.project[b].project.medical_code,
1249
                   // medical_code: prescription.project[b].project.medical_code,
1249
                   unit: prescription.project[b].unit,
1250
                   unit: prescription.project[b].unit,
1250
-                  type:prescription.project[b].type,
1251
+                  type: prescription.project[b].type
1251
 
1252
 
1252
                 }
1253
                 }
1253
 
1254
 
1254
-                if(prescription.project[b].type == 2){
1255
-                  obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
1256
-                  obj['medical_code'] =  prescription.project[b].project.medical_code
1257
-                  obj['project_name'] =  prescription.project[b].project.project_name
1255
+                if (prescription.project[b].type == 2) {
1256
+                  obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1257
+                  obj['medical_code'] = prescription.project[b].project.medical_code
1258
+                  obj['project_name'] = prescription.project[b].project.project_name
1258
 
1259
 
1259
-                }else if(prescription.project[b].type == 3){
1260
-                  obj['statistical_classification'] = ""
1261
-                  obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
1262
-                  obj['project_name'] =  prescription.project[b].good_info.good_name
1260
+                } else if (prescription.project[b].type == 3) {
1261
+                  obj['statistical_classification'] = ''
1262
+                  obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1263
+                  obj['project_name'] = prescription.project[b].good_info.good_name
1263
                 }
1264
                 }
1264
 
1265
 
1265
-
1266
-
1267
                 tempProject.push(obj)
1266
                 tempProject.push(obj)
1268
               }
1267
               }
1269
               let index = i + 1
1268
               let index = i + 1
1274
                 project: tempProject,
1273
                 project: tempProject,
1275
                 type: prescription.type,
1274
                 type: prescription.type,
1276
                 order_status: prescription.order_status
1275
                 order_status: prescription.order_status
1277
-              };
1276
+              }
1278
               this.prescriptions.push(obj)
1277
               this.prescriptions.push(obj)
1279
             }
1278
             }
1280
             this.curPrescriptions = this.prescriptions[0]
1279
             this.curPrescriptions = this.prescriptions[0]
1818
           }
1817
           }
1819
 
1818
 
1820
         } else if (index == 5) {
1819
         } else if (index == 5) {
1821
-          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
1820
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
1822
 
1821
 
1823
             var that = this
1822
             var that = this
1824
             this.$confirm('是否退费', '退费', {
1823
             this.$confirm('是否退费', '退费', {
1855
                       })
1854
                       })
1856
 
1855
 
1857
                     } else {
1856
                     } else {
1858
-                      that.changeRadioAndPatient(1);
1859
-                      that.$message({ message: '退费成功', type: 'success', duration: 5000 });
1857
+                      that.changeRadioAndPatient(1)
1858
+                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
1860
                       that.loadingtwo = false
1859
                       that.loadingtwo = false
1861
                     }
1860
                     }
1862
 
1861
 
1890
                   this.loadingtwo = false
1889
                   this.loadingtwo = false
1891
                   return false
1890
                   return false
1892
                 } else {
1891
                 } else {
1893
-                  this.radio = 1;
1894
-                  this.changeRadioAndPatient(1);
1895
-                  this.$message({ message: '退费成功', type: 'success' });
1892
+                  this.radio = 1
1893
+                  this.changeRadioAndPatient(1)
1894
+                  this.$message({ message: '退费成功', type: 'success' })
1896
                   this.loadingtwo = false
1895
                   this.loadingtwo = false
1897
 
1896
 
1898
                 }
1897
                 }
1921
             clr_type: '11',
1920
             clr_type: '11',
1922
             org_id: this.$store.getters.xt_user.org_id
1921
             org_id: this.$store.getters.xt_user.org_id
1923
 
1922
 
1924
-          };
1923
+          }
1925
 
1924
 
1926
-          var that = this;
1925
+          var that = this
1927
 
1926
 
1928
           if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
1927
           if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
1929
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
1928
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
1931
             })
1930
             })
1932
               .then(function(response) {
1931
               .then(function(response) {
1933
                 if (response.data.state == 0) {
1932
                 if (response.data.state == 0) {
1934
-                  that.$message.error(response.data.msg);
1933
+                  that.$message.error(response.data.msg)
1935
                   // that.loadingtwo = false
1934
                   // that.loadingtwo = false
1936
                   return false
1935
                   return false
1937
                 } else {
1936
                 } else {
1948
           let params = {
1947
           let params = {
1949
             start_time: '2020-12-28',
1948
             start_time: '2020-12-28',
1950
             end_time: '2020-12-30'
1949
             end_time: '2020-12-30'
1951
-          };
1952
-          var that = this;
1950
+          }
1951
+          var that = this
1953
           axios.get('http://127.0.0.1:9532/api/checkdetailaccount/get', {
1952
           axios.get('http://127.0.0.1:9532/api/checkdetailaccount/get', {
1954
             params: params
1953
             params: params
1955
           })
1954
           })
1956
             .then(function(response) {
1955
             .then(function(response) {
1957
               if (response.data.state == 0) {
1956
               if (response.data.state == 0) {
1958
-                that.$message.error(response.data.msg);
1959
-                that.loadingtwo = false;
1957
+                that.$message.error(response.data.msg)
1958
+                that.loadingtwo = false
1960
                 return false
1959
                 return false
1961
               } else {
1960
               } else {
1962
 
1961
 
1967
             })
1966
             })
1968
 
1967
 
1969
         } else if (index == 9) {
1968
         } else if (index == 9) {
1970
-          this.statementVisible = true;
1969
+          this.statementVisible = true
1971
           let obj = {
1970
           let obj = {
1972
             order_id: this.order.id,
1971
             order_id: this.order.id,
1973
-            settle_type:this.order.settle_type,
1974
-            start_time:this.order.settle_start_time,
1975
-            end_time:this.order.settle_end_time,
1976
-          };
1972
+            settle_type: this.order.settle_type,
1973
+            start_time: this.order.settle_start_time,
1974
+            end_time: this.order.settle_end_time
1975
+          }
1977
           this.orderObj = obj
1976
           this.orderObj = obj
1978
           // this.$refs.print.getInfo(this.order.id)
1977
           // this.$refs.print.getInfo(this.order.id)
1979
 
1978
 
1980
         } else if (index == 10) {
1979
         } else if (index == 10) {
1981
-          var that = this;
1980
+          var that = this
1982
           this.$confirm('是否退号', '退号', {
1981
           this.$confirm('是否退号', '退号', {
1983
             confirmButtonText: '确 定',
1982
             confirmButtonText: '确 定',
1984
             cancelButtonText: '取 消',
1983
             cancelButtonText: '取 消',
1990
               'record_time': this.record_date,
1989
               'record_time': this.record_date,
1991
               'org_id': this.$store.getters.xt_user.org_id,
1990
               'org_id': this.$store.getters.xt_user.org_id,
1992
               'admin_user_id': this.$store.getters.xt_user.user.id
1991
               'admin_user_id': this.$store.getters.xt_user.user.id
1993
-            };
1992
+            }
1994
             axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
1993
             axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
1995
               params: params
1994
               params: params
1996
             })
1995
             })
2010
                     })
2009
                     })
2011
 
2010
 
2012
                   } else {
2011
                   } else {
2013
-                    that.radio = 1;
2014
-                    that.changeRadioAndPatient(1);
2012
+                    that.radio = 1
2013
+                    that.changeRadioAndPatient(1)
2015
                     that.$message({ message: '退号成功', type: 'success', duration: 5000 })
2014
                     that.$message({ message: '退号成功', type: 'success', duration: 5000 })
2016
                   }
2015
                   }
2017
 
2016
 
2028
             'patient_id': this.patientInfo.id,
2027
             'patient_id': this.patientInfo.id,
2029
             'record_time': this.record_date,
2028
             'record_time': this.record_date,
2030
             'org_id': this.$store.getters.xt_user.org_id
2029
             'org_id': this.$store.getters.xt_user.org_id
2031
-          };
2030
+          }
2032
           axios.get('http://127.0.0.1:9532/api/refunddetail/post', {
2031
           axios.get('http://127.0.0.1:9532/api/refunddetail/post', {
2033
             params: params
2032
             params: params
2034
           })
2033
           })
2050
           let params = {
2049
           let params = {
2051
             'name': '琥珀酸亚铁片',
2050
             'name': '琥珀酸亚铁片',
2052
             'codg': 'XB03AAH026A001010104942'
2051
             'codg': 'XB03AAH026A001010104942'
2053
-          };
2052
+          }
2054
           axios.get('http://127.0.0.1:9532/api/code/get', {
2053
           axios.get('http://127.0.0.1:9532/api/code/get', {
2055
             params: params
2054
             params: params
2056
           })
2055
           })
2077
           })
2076
           })
2078
             .then(function(response) {
2077
             .then(function(response) {
2079
               if (response.data.state == 0) {
2078
               if (response.data.state == 0) {
2080
-                that.$message.error(response.data.msg);
2081
-                that.loadingtwo = false;
2079
+                that.$message.error(response.data.msg)
2080
+                that.loadingtwo = false
2082
                 return false
2081
                 return false
2083
               } else {
2082
               } else {
2084
                 that.loadingtwo = false
2083
                 that.loadingtwo = false
2087
             .catch(function(error) {
2086
             .catch(function(error) {
2088
             })
2087
             })
2089
         } else if (index == 15) {
2088
         } else if (index == 15) {
2090
-          var that = this;
2091
-          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 10106 ||   this.$store.getters.xt_user.org_id == 9990) {
2089
+          var that = this
2090
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
2092
 
2091
 
2093
             if (this.diagnosis.length || this.diagnosis == 0) {
2092
             if (this.diagnosis.length || this.diagnosis == 0) {
2094
-              that.$message.error('诊断不能为空,请选择诊断内容');
2093
+              that.$message.error('诊断不能为空,请选择诊断内容')
2095
               return
2094
               return
2096
             }
2095
             }
2097
 
2096
 
2098
             if (this.sick_type.length || this.sick_type == 0) {
2097
             if (this.sick_type.length || this.sick_type == 0) {
2099
 
2098
 
2100
-              that.$message.error('疾病类型不能为空,请选择疾病类型');
2099
+              that.$message.error('疾病类型不能为空,请选择疾病类型')
2101
               return
2100
               return
2102
             }
2101
             }
2103
 
2102
 
2104
             if (this.reg_type.length || this.reg_type == 0) {
2103
             if (this.reg_type.length || this.reg_type == 0) {
2105
-              that.$message.error('处方类型不能为空,请选择处方类型');
2104
+              that.$message.error('处方类型不能为空,请选择处方类型')
2106
               return
2105
               return
2107
             }
2106
             }
2108
 
2107
 
2283
         console.log(id)
2282
         console.log(id)
2284
         this.radioStatus = id
2283
         this.radioStatus = id
2285
         this.getPatientList()
2284
         this.getPatientList()
2286
-      },      changeRadioAndPatient(id) {
2285
+      }, changeRadioAndPatient(id) {
2287
         // console.log(id)
2286
         // console.log(id)
2288
         // this.radioStatus = id
2287
         // this.radioStatus = id
2289
         // this.getPatientList()
2288
         // this.getPatientList()
2368
                 }
2367
                 }
2369
               }
2368
               }
2370
 
2369
 
2371
-            }
2372
-            else { //月结
2370
+            } else { //月结
2373
 
2371
 
2374
               for (let i = 0; i < this.hisPatientDatas.length; i++) {
2372
               for (let i = 0; i < this.hisPatientDatas.length; i++) {
2375
                 if (this.hisPatientDatas[i].order_status == 0 || this.hisPatientDatas[i].order_status == 1) {
2373
                 if (this.hisPatientDatas[i].order_status == 0 || this.hisPatientDatas[i].order_status == 1) {
2400
                 this.patientTableData = []
2398
                 this.patientTableData = []
2401
                 if (this.activeName == 'first') {
2399
                 if (this.activeName == 'first') {
2402
 
2400
 
2403
-                  console.log("~~~~~~")
2401
+                  console.log('~~~~~~')
2404
                   console.log(this.all_table_data)
2402
                   console.log(this.all_table_data)
2405
 
2403
 
2406
                   for (let i = 0; i < this.all_table_data.length; i++) {
2404
                   for (let i = 0; i < this.all_table_data.length; i++) {
2418
                   }
2416
                   }
2419
                 }
2417
                 }
2420
 
2418
 
2421
-
2422
-
2423
                 break
2419
                 break
2424
               case 2:
2420
               case 2:
2425
                 this.patientTableData = []
2421
                 this.patientTableData = []
2465
 
2461
 
2466
             }
2462
             }
2467
 
2463
 
2468
-            this.current_index = 0;
2469
-            for (let i = 0; i < this.patientTableData.length; i++){
2470
-              if(this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
2471
-                this.$refs.tab.setCurrentRow(this.patientTableData[i]);
2464
+            this.current_index = 0
2465
+            for (let i = 0; i < this.patientTableData.length; i++) {
2466
+              if (this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
2467
+                this.$refs.tab.setCurrentRow(this.patientTableData[i])
2472
                 this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id)
2468
                 this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id)
2473
               }
2469
               }
2474
             }
2470
             }
2475
           }
2471
           }
2476
         })
2472
         })
2477
 
2473
 
2478
-      },   changeRadio(id) {
2479
-        let temp_id = id;
2474
+      }, changeRadio(id) {
2475
+        let temp_id = id
2480
         this.radio = id
2476
         this.radio = id
2481
         let params = {
2477
         let params = {
2482
           'record_date': this.record_date
2478
           'record_date': this.record_date
2483
-        };
2479
+        }
2484
         getChargeHisPatientList(params).then(response => {
2480
         getChargeHisPatientList(params).then(response => {
2485
           if (response.data.state == 0) {
2481
           if (response.data.state == 0) {
2486
-            this.$message.error(response.data.msg);
2482
+            this.$message.error(response.data.msg)
2487
             return false
2483
             return false
2488
           } else {
2484
           } else {
2489
-            this.patientTableData = [];
2490
-            this.hisPatientDatas = [];
2491
-            this.all_table_data = [];
2492
-            let one_count = 0;
2493
-            let two_count = 0;
2494
-            let three_count = 0;
2485
+            this.patientTableData = []
2486
+            this.hisPatientDatas = []
2487
+            this.all_table_data = []
2488
+            let one_count = 0
2489
+            let two_count = 0
2490
+            let three_count = 0
2495
 
2491
 
2496
             for (let i = 0; i < response.data.data.list.length; i++) {
2492
             for (let i = 0; i < response.data.data.list.length; i++) {
2497
               if (response.data.data.list[i].his_patient.length == 0) { //没挂号
2493
               if (response.data.data.list[i].his_patient.length == 0) { //没挂号
2543
               }
2539
               }
2544
             }
2540
             }
2545
 
2541
 
2546
-
2547
-
2548
             if (this.activeName == 'first') { //日结
2542
             if (this.activeName == 'first') { //日结
2549
 
2543
 
2550
               for (let i = 0; i < this.all_table_data.length; i++) {
2544
               for (let i = 0; i < this.all_table_data.length; i++) {
2556
                 }
2550
                 }
2557
               }
2551
               }
2558
 
2552
 
2559
-            }
2560
-            else { //月结
2553
+            } else { //月结
2561
 
2554
 
2562
               for (let i = 0; i < this.hisPatientDatas.length; i++) {
2555
               for (let i = 0; i < this.hisPatientDatas.length; i++) {
2563
                 if (this.hisPatientDatas[i].order_status == 0 || this.hisPatientDatas[i].order_status == 1) {
2556
                 if (this.hisPatientDatas[i].order_status == 0 || this.hisPatientDatas[i].order_status == 1) {
2577
 
2570
 
2578
             }
2571
             }
2579
 
2572
 
2580
-            this.cal_one = one_count;
2581
-            this.cal_two = two_count;
2582
-            this.cal_three = three_count;
2573
+            this.cal_one = one_count
2574
+            this.cal_two = two_count
2575
+            this.cal_three = three_count
2583
             switch (temp_id) {
2576
             switch (temp_id) {
2584
 
2577
 
2585
               case 1:
2578
               case 1:
2646
 
2639
 
2647
             }
2640
             }
2648
 
2641
 
2649
-            this.current_index = 0;
2642
+            this.current_index = 0
2650
 
2643
 
2651
-            for (let i = 0; i < this.patientTableData.length; i++){
2652
-              if(this.patientInfo.id == this.patientTableData[i].id) {
2653
-                this.$refs.tab.setCurrentRow(this.patientTableData[i]);
2644
+            for (let i = 0; i < this.patientTableData.length; i++) {
2645
+              if (this.patientInfo.id == this.patientTableData[i].id) {
2646
+                this.$refs.tab.setCurrentRow(this.patientTableData[i])
2654
                 // this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id)
2647
                 // this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id)
2655
               }
2648
               }
2656
             }
2649
             }
2658
           }
2651
           }
2659
         })
2652
         })
2660
 
2653
 
2661
-      },formatDecimal(num, decimal) {
2654
+      }, formatDecimal(num, decimal) {
2662
         num = num.toString()
2655
         num = num.toString()
2663
         let index = num.indexOf('.')
2656
         let index = num.indexOf('.')
2664
         if (index !== -1) {
2657
         if (index !== -1) {
2754
 
2747
 
2755
             switch (this.radio) {
2748
             switch (this.radio) {
2756
               case 1:
2749
               case 1:
2757
-                this.patientTableData = [];
2750
+                this.patientTableData = []
2758
 
2751
 
2759
                 for (let i = 0; i < this.all_table_data.length; i++) {
2752
                 for (let i = 0; i < this.all_table_data.length; i++) {
2760
                   if (this.all_table_data[i].order_status == 0 || this.all_table_data[i].order_status == 1 || this.all_table_data[i].order_status == 3) {
2753
                   if (this.all_table_data[i].order_status == 0 || this.all_table_data[i].order_status == 1 || this.all_table_data[i].order_status == 3) {
2896
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
2889
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
2897
             if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
2890
             if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
2898
 
2891
 
2899
-              if(project_month_prescriptions.project[a].type == 2){
2900
-                obj['statistical_classification'] =  project_month_prescriptions.project[a].project.statistical_classification
2901
-                obj['medical_code'] =  project_month_prescriptions.project[a].project.medical_code
2902
-                obj['project_name'] =  project_month_prescriptions.project[a].project.project_name
2892
+              if (project_month_prescriptions.project[a].type == 2) {
2893
+                obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
2894
+                obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
2895
+                obj['project_name'] = project_month_prescriptions.project[a].project.project_name
2903
 
2896
 
2904
-
2905
-              }else if(project_month_prescriptions.project[a].type == 3){
2906
-                obj['statistical_classification'] = ""
2907
-                obj['medical_code'] =  project_month_prescriptions.project[a].good_info.medical_insurance_number
2908
-                obj['project_name'] =  project_month_prescriptions.project[a].good_info.good_name
2897
+              } else if (project_month_prescriptions.project[a].type == 3) {
2898
+                obj['statistical_classification'] = ''
2899
+                obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
2900
+                obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
2909
 
2901
 
2910
               }
2902
               }
2911
 
2903
 
3015
           'start_time': this.other_start_time,
3007
           'start_time': this.other_start_time,
3016
           'end_time': this.other_end_time,
3008
           'end_time': this.other_end_time,
3017
           'type': this.radio,
3009
           'type': this.radio,
3018
-          'p_type':2,
3010
+          'p_type': 2
3019
 
3011
 
3020
         }
3012
         }
3021
         this.loading = true
3013
         this.loading = true
3109
                   remark: prescription.project[b].remark,
3101
                   remark: prescription.project[b].remark,
3110
                   // medical_code: prescription.project[b].project.medical_code,
3102
                   // medical_code: prescription.project[b].project.medical_code,
3111
                   unit: prescription.project[b].unit,
3103
                   unit: prescription.project[b].unit,
3112
-                  type:prescription.project[b].type,
3104
+                  type: prescription.project[b].type
3113
                 }
3105
                 }
3114
 
3106
 
3107
+                if (prescription.project[b].type == 2) {
3108
+                  obj['statistical_classification'] = prescription.project[b].project.statistical_classification
3109
+                  obj['medical_code'] = prescription.project[b].project.medical_code
3110
+                  obj['project_name'] = prescription.project[b].project.project_name
3115
 
3111
 
3116
-                if(prescription.project[b].type == 2){
3117
-                  obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
3118
-                  obj['medical_code'] =  prescription.project[b].project.medical_code
3119
-                  obj['project_name'] =  prescription.project[b].project.project_name
3120
-
3121
-                }else if(prescription.project[b].type == 3){
3122
-                  obj['statistical_classification'] = ""
3123
-                  obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
3124
-                  obj['project_name'] =  prescription.project[b].good_info.good_name
3112
+                } else if (prescription.project[b].type == 3) {
3113
+                  obj['statistical_classification'] = ''
3114
+                  obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3115
+                  obj['project_name'] = prescription.project[b].good_info.good_name
3125
                 }
3116
                 }
3126
 
3117
 
3127
-
3128
-
3129
                 tempProject.push(obj)
3118
                 tempProject.push(obj)
3130
               }
3119
               }
3131
 
3120
 
3210
                     that.$message.error(response.data.data.msg)
3199
                     that.$message.error(response.data.data.msg)
3211
 
3200
 
3212
                   } else {
3201
                   } else {
3213
-                    that.changeRadioAndPatient(1);
3202
+                    that.changeRadioAndPatient(1)
3214
                     that.$message({ message: '预结算成功', type: 'success' })
3203
                     that.$message({ message: '预结算成功', type: 'success' })
3215
                   }
3204
                   }
3216
 
3205
 
3253
                       that.$message.error(response.data.data.msg)
3242
                       that.$message.error(response.data.data.msg)
3254
 
3243
 
3255
                     } else {
3244
                     } else {
3256
-                      that.changeRadioAndPatient(1);
3245
+                      that.changeRadioAndPatient(1)
3257
                       that.$message({ message: '退费成功', type: 'success' })
3246
                       that.$message({ message: '退费成功', type: 'success' })
3258
                     }
3247
                     }
3259
                   }
3248
                   }
3293
                 }
3282
                 }
3294
               })
3283
               })
3295
               .catch(function(error) {
3284
               .catch(function(error) {
3296
-              });
3297
-            break;
3285
+              })
3286
+            break
3298
           case 7:
3287
           case 7:
3299
-            var that = this;
3288
+            var that = this
3300
             axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
3289
             axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
3301
               params: {
3290
               params: {
3302
                 order_id: this.order.id,
3291
                 order_id: this.order.id,
3308
             })
3297
             })
3309
               .then(function(response) {
3298
               .then(function(response) {
3310
                 if (response.data.state == 0) {
3299
                 if (response.data.state == 0) {
3311
-                  that.$message.error(response.data.msg);
3300
+                  that.$message.error(response.data.msg)
3312
                   return false
3301
                   return false
3313
                 } else {
3302
                 } else {
3314
                   if (response.data.data.failed_code == -10) {
3303
                   if (response.data.data.failed_code == -10) {
3321
                     }).catch(() => {
3310
                     }).catch(() => {
3322
                     })
3311
                     })
3323
 
3312
 
3324
-
3325
                   } else {
3313
                   } else {
3326
 
3314
 
3327
                     that.$message({ message: '明细撤销成功', type: 'success' })
3315
                     that.$message({ message: '明细撤销成功', type: 'success' })
3330
                 }
3318
                 }
3331
               })
3319
               })
3332
               .catch(function(error) {
3320
               .catch(function(error) {
3333
-              });
3321
+              })
3322
+
3323
+            break
3324
+          case 8:
3325
+            var that = this
3326
+            let form = {}
3327
+            form['id'] = this.patientInfo.id
3328
+            form['his_patient_id'] = this.hisPatientInfo.id
3329
+            form['record_time'] = this.record_date
3330
+            form['admin_user_id'] = this.$store.getters.xt_user.user.id
3331
+            form['org_id'] = this.$store.getters.xt_user.org_id
3332
+            if (this.activeName == 'first') {
3333
+              form['settle_accounts_type'] = 1
3334
+            } else {
3335
+              form['start_time'] = this.other_start_time
3336
+              form['end_time'] = this.other_end_time
3337
+              form['settle_accounts_type'] = 2
3338
+            }
3339
+            this.$confirm('是否进行预结算', '预结算', {
3340
+              confirmButtonText: '确 定',
3341
+              cancelButtonText: '取 消',
3342
+              type: 'warning'
3343
+            }).then(() => {
3344
+              axios.get('http://127.0.0.1:9532/sz/api/presettle/get', {
3345
+                params:form,
3346
+                headers: {
3347
+                  'Permission': 5
3348
+                }
3349
+              })
3350
+                .then(function(response) {
3351
+                  if (response.data.state == 0) {
3352
+                    that.$message.error(response.data.msg)
3353
+                    return false
3354
+                  } else {
3355
+                    if (response.data.data.failed_code == -10) {
3356
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
3357
+                        confirmButtonText: '确 定',
3358
+                        type: 'warning'
3359
+                      }).then(() => {
3334
 
3360
 
3335
-            break;
3361
+                      }).catch(() => {
3362
+                      })
3363
+                    } else {
3364
+                      that.changeRadioAndPatient(1)
3365
+                      that.$message({ message: '预结算成功', type: 'success', duration: 5000 })
3366
+                    }
3367
+                  }
3368
+                })
3369
+                .catch(function(error) {
3370
+
3371
+                })
3372
+            }).catch(() => {
3373
+
3374
+            })
3375
+            break
3336
           case 10:
3376
           case 10:
3337
-            this.newStatementVisible = true;
3377
+            this.newStatementVisible = true
3338
             let obj = {
3378
             let obj = {
3339
               record_time: this.record_date,
3379
               record_time: this.record_date,
3340
               patient_id: this.patient_id,
3380
               patient_id: this.patient_id,
3342
               order_id: this.order.id,
3382
               order_id: this.order.id,
3343
               admin_user_id: this.$store.getters.xt_user.user.id
3383
               admin_user_id: this.$store.getters.xt_user.user.id
3344
 
3384
 
3345
-            };
3346
-            this.newOrderObj = obj;
3385
+            }
3386
+            this.newOrderObj = obj
3347
             // this.$refs.print.getInfo(this.order.id)
3387
             // this.$refs.print.getInfo(this.order.id)
3348
-            break;
3388
+            break
3349
           case 11:
3389
           case 11:
3350
-            var that = this;
3390
+            var that = this
3351
             this.$confirm('是否退号', '退号', {
3391
             this.$confirm('是否退号', '退号', {
3352
               confirmButtonText: '确 定',
3392
               confirmButtonText: '确 定',
3353
               cancelButtonText: '取 消',
3393
               cancelButtonText: '取 消',
3359
                   record_time: this.record_date,
3399
                   record_time: this.record_date,
3360
                   admin_user_id: this.$store.getters.xt_user.user.id,
3400
                   admin_user_id: this.$store.getters.xt_user.user.id,
3361
                   patient_id: this.patientInfo.id,
3401
                   patient_id: this.patientInfo.id,
3362
-                  his_patient_id: this.hisPatientInfo.id,
3402
+                  his_patient_id: this.hisPatientInfo.id
3363
                 }
3403
                 }
3364
               })
3404
               })
3365
                 .then(function(response) {
3405
                 .then(function(response) {
3366
                   if (response.data.state == 0) {
3406
                   if (response.data.state == 0) {
3367
-                    that.$message.error(response.data.msg);
3407
+                    that.$message.error(response.data.msg)
3368
                     return false
3408
                     return false
3369
                   } else {
3409
                   } else {
3370
                     if (response.data.data.failed_code == -10) {
3410
                     if (response.data.data.failed_code == -10) {
3376
                       }).catch(() => {
3416
                       }).catch(() => {
3377
                       })
3417
                       })
3378
 
3418
 
3379
-
3380
                     } else {
3419
                     } else {
3381
-                      that.changeRadioAndPatient(1);
3420
+                      that.changeRadioAndPatient(1)
3382
                       that.$message({ message: '退号成功', type: 'success' })
3421
                       that.$message({ message: '退号成功', type: 'success' })
3383
                     }
3422
                     }
3384
                   }
3423
                   }
3386
                 .catch(function(error) {
3425
                 .catch(function(error) {
3387
                 })
3426
                 })
3388
             }).catch(() => {
3427
             }).catch(() => {
3389
-            });
3428
+            })
3390
             break
3429
             break
3391
 
3430
 
3392
         }
3431
         }
3394
       }
3433
       }
3395
     },
3434
     },
3396
     mounted() {
3435
     mounted() {
3397
-      const that = this;
3436
+      const that = this
3398
       window.onresize = () => {
3437
       window.onresize = () => {
3399
         return (() => {
3438
         return (() => {
3400
-          window.fullHeight = document.documentElement.clientHeight;
3439
+          window.fullHeight = document.documentElement.clientHeight
3401
           that.fullHeight = window.fullHeight
3440
           that.fullHeight = window.fullHeight
3402
         })()
3441
         })()
3403
       }
3442
       }
3405
     watch: {
3444
     watch: {
3406
       fullHeight(val) {
3445
       fullHeight(val) {
3407
         if (!this.timer) {
3446
         if (!this.timer) {
3408
-          this.fullHeight = val;
3409
-          let tableHeight = val - 243;
3410
-          this.tableHeight = tableHeight;
3411
-          this.timer = true;
3412
-          let that = this;
3447
+          this.fullHeight = val
3448
+          let tableHeight = val - 243
3449
+          this.tableHeight = tableHeight
3450
+          this.timer = true
3451
+          let that = this
3413
           setTimeout(function() {
3452
           setTimeout(function() {
3414
             that.timer = false
3453
             that.timer = false
3415
           }, 400)
3454
           }, 400)

+ 26 - 3
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

35
                     </el-form-item>
35
                     </el-form-item>
36
                     <el-form-item label="疾病类型:" prop="name" label-position="right">
36
                     <el-form-item label="疾病类型:" prop="name" label-position="right">
37
 
37
 
38
-                        <el-select style="width:100%;" v-model="state1" placeholder="">
38
+                        <el-select  filterable style="width:100%;" v-model="state1" placeholder="">
39
                             <el-option
39
                             <el-option
40
                                     v-for="(item,index) in sick"
40
                                     v-for="(item,index) in sick"
41
                                     :key="index"
41
                                     :key="index"
373
                                 </div>
373
                                 </div>
374
                             </el-tab-pane>
374
                             </el-tab-pane>
375
                             <el-tab-pane label="项目组套" name="2">
375
                             <el-tab-pane label="项目组套" name="2">
376
+                                <el-input style="width:50%;" @input="searchProjectTeamAction"
377
+                                          @keyup.enter.native='searchProjectTeamAction'
378
+                                          v-model.trim="search_project_team_keyword"
379
+                                          placeholder="请输入项目组套名称"></el-input>
376
                                 <div style="width: 100%;flex:1;overflow-y: auto;">
380
                                 <div style="width: 100%;flex:1;overflow-y: auto;">
377
                                     <el-table :data="tabPrjectTeam" border ref="tabProjectTeam"
381
                                     <el-table :data="tabPrjectTeam" border ref="tabProjectTeam"
378
                                               :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
382
                                               :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
509
         register_type: '',
513
         register_type: '',
510
         value: '0',
514
         value: '0',
511
         search_project_keyword: '',
515
         search_project_keyword: '',
516
+        search_project_team_keyword:"",
512
         form: {
517
         form: {
513
           name: ''
518
           name: ''
514
         },
519
         },
550
         showTwo: false,
555
         showTwo: false,
551
         tableData: [],
556
         tableData: [],
552
         tabPrjectTeam: [],
557
         tabPrjectTeam: [],
558
+        allTabPrjectTeam:[],
553
         teamList: [],
559
         teamList: [],
554
         doctors: [],
560
         doctors: [],
555
         departMent: [],
561
         departMent: [],
1489
 
1495
 
1490
         }
1496
         }
1491
 
1497
 
1498
+      },searchProjectTeamAction(){
1499
+        if (this.search_project_team_keyword.length == 0) {
1500
+          this.tabPrjectTeam = this.allTabPrjectTeam
1501
+
1502
+        } else {
1503
+          let arr = []
1504
+          for (let i = 0; i < this.allTabPrjectTeam.length; i++) {
1505
+            if (this.allTabPrjectTeam[i].project_team.indexOf(this.search_project_team_keyword) != -1) {
1506
+              arr = arr.concat(this.allTabPrjectTeam[i])
1507
+            }
1508
+          }
1509
+          this.tabPrjectTeam = arr
1510
+        }
1511
+
1492
       },
1512
       },
1493
       searchAction() {
1513
       searchAction() {
1494
         if (this.search_keyword.length == 0) {
1514
         if (this.search_keyword.length == 0) {
2659
           if (response.data.state == 1) {
2679
           if (response.data.state == 1) {
2660
             var team = response.data.data.team
2680
             var team = response.data.data.team
2661
             this.tabPrjectTeam = team
2681
             this.tabPrjectTeam = team
2682
+            this.allTabPrjectTeam = team
2683
+
2684
+
2662
             this.projectList = team
2685
             this.projectList = team
2663
           }
2686
           }
2664
         })
2687
         })
2694
             this.teamList = []
2717
             this.teamList = []
2695
             var project = response.data.data.project
2718
             var project = response.data.data.project
2696
             for (let i = 0; i < project.length; i++) {
2719
             for (let i = 0; i < project.length; i++) {
2697
-              if (project[i].type == 2) {
2720
+              if (project[i].type == 2 && project[i].status == 1) {
2698
 
2721
 
2699
                 let obj = {
2722
                 let obj = {
2700
                   id: project[i].project_id,
2723
                   id: project[i].project_id,
2716
                 }
2739
                 }
2717
 
2740
 
2718
                 this.teamList.push(obj)
2741
                 this.teamList.push(obj)
2719
-              } else if (project[i].type == 3) {
2742
+              } else if (project[i].type == 3 && project[i].status == 1) {
2720
                 let obj = {
2743
                 let obj = {
2721
                   id: project[i].project_id,
2744
                   id: project[i].project_id,
2722
                   project_name: project[i].good_info.good_name,
2745
                   project_name: project[i].good_info.good_name,

+ 7 - 7
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue 查看文件

78
     <div class="mainTitle">病历信息:</div>
78
     <div class="mainTitle">病历信息:</div>
79
     <el-form class="recordForm" :model="case_history" ref="form" label-width="80px">
79
     <el-form class="recordForm" :model="case_history" ref="form" label-width="80px">
80
      <el-form-item label="疾病类型: " prop="name" style="width:49%;">
80
      <el-form-item label="疾病类型: " prop="name" style="width:49%;">
81
-        <el-select v-model="case_history.sick" style="width:100%;" placeholder="请选择">
81
+        <el-select  filterable v-model="case_history.sick" style="width:100%;" placeholder="请选择">
82
           <el-option
82
           <el-option
83
             v-for="(item,index) in sick"
83
             v-for="(item,index) in sick"
84
             :key="index"
84
             :key="index"
393
 
393
 
394
 
394
 
395
       getTemplateDetail(id){
395
       getTemplateDetail(id){
396
-         
396
+
397
           getTemplateDetail(id).then(response=>{
397
           getTemplateDetail(id).then(response=>{
398
               if(response.data.state == 1){
398
               if(response.data.state == 1){
399
                 var templatedetail =  response.data.data.templateDetail
399
                 var templatedetail =  response.data.data.templateDetail
409
                 this.case_history.remark = templatedetail.remark
409
                 this.case_history.remark = templatedetail.remark
410
                 this.case_history.sick = templatedetail.sick
410
                 this.case_history.sick = templatedetail.sick
411
                 this.case_history.diagnose = templatedetail.diagnose
411
                 this.case_history.diagnose = templatedetail.diagnose
412
-                
412
+
413
               }
413
               }
414
           })
414
           })
415
         },
415
         },
428
              this.tabledataSix = response.data.data.listSix
428
              this.tabledataSix = response.data.data.listSix
429
              this.tabledataSeven =  response.data.data.listSeven
429
              this.tabledataSeven =  response.data.data.listSeven
430
            }
430
            }
431
-        })   
431
+        })
432
        },
432
        },
433
 
433
 
434
        changeMainTemplate(values){
434
        changeMainTemplate(values){
531
           } else {
531
           } else {
532
             this.sick = response.data.data.sick
532
             this.sick = response.data.data.sick
533
             this.diagnoses = response.data.data.diagnose
533
             this.diagnoses = response.data.data.diagnose
534
-          
534
+
535
           }
535
           }
536
         })
536
         })
537
 
537
 
547
        }else if(this.patientInfo.gender = 2){
547
        }else if(this.patientInfo.gender = 2){
548
           this.patientInfo.gender = '女'
548
           this.patientInfo.gender = '女'
549
         }
549
         }
550
-    
550
+
551
     },
551
     },
552
     watch:{
552
     watch:{
553
       detalid:function(val){
553
       detalid:function(val){
579
             this.case_history.diagnose = ""
579
             this.case_history.diagnose = ""
580
           }
580
           }
581
           this.form.id = this.case_history.id
581
           this.form.id = this.case_history.id
582
-         
582
+
583
           this.watchSign++
583
           this.watchSign++
584
         },
584
         },
585
         deep:true
585
         deep:true

+ 1 - 1
src/xt_pages/outpatientRecord/outpatientRecord.vue 查看文件

104
 
104
 
105
                 <el-table-column align="center" prop="name" label="疾病类型">
105
                 <el-table-column align="center" prop="name" label="疾病类型">
106
                     <template slot-scope="scope">
106
                     <template slot-scope="scope">
107
-                        <el-select style="width:100%;" v-model="scope.row.record.sick_type" placeholder="请选择">
107
+                        <el-select  filterable style="width:100%;" v-model="scope.row.record.sick_type" placeholder="请选择">
108
                             <el-option
108
                             <el-option
109
                                     v-for="(item,index) in sick"
109
                                     v-for="(item,index) in sick"
110
                                     :key="index"
110
                                     :key="index"

+ 18 - 7
src/xt_pages/stock/stockInOrder.vue 查看文件

71
           @change="changeAllSelected"
71
           @change="changeAllSelected"
72
           >全选</el-checkbox
72
           >全选</el-checkbox
73
         >
73
         >
74
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
75
-          >删除</el-button
76
-        >
74
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
75
+
76
+        <el-button size="small" type="primary" @click="toPrint">打印</el-button>
77
       </div>
77
       </div>
78
 
78
 
79
       <el-table
79
       <el-table
188
     </div>
188
     </div>
189
 
189
 
190
 
190
 
191
-   <div v-show="tableShow" style="margin-bottom:10px">
191
+   <div v-show="tableShow" style="margin-top:80px">
192
       <el-table
192
       <el-table
193
         :data="tableList"
193
         :data="tableList"
194
         :class="signAndWeighBoxPatients"
194
         :class="signAndWeighBoxPatients"
204
           color: '#606266'
204
           color: '#606266'
205
         }"
205
         }"
206
       >
206
       >
207
-       <el-table-column align="center" type="selection" width="55">
208
-       </el-table-column>
207
+       <!-- <el-table-column align="center" type="selection" width="55">
208
+       </el-table-column> -->
209
 
209
 
210
        <el-table-column label="耗材名称" align="center">
210
        <el-table-column label="耗材名称" align="center">
211
           <template slot-scope="scope">
211
           <template slot-scope="scope">
790
       drug_id:1,
790
       drug_id:1,
791
       tableShow:false,
791
       tableShow:false,
792
       tableList:[],
792
       tableList:[],
793
-      isVisibility:false
793
+      isVisibility:false,
794
+      order_id:0,
794
     };
795
     };
795
     
796
     
796
   
797
   
1119
       }
1120
       }
1120
     },
1121
     },
1121
     select(selection) {
1122
     select(selection) {
1123
+      this.order_id = selection[0].id
1124
+      console.log("selection",selection)
1122
       this.selectedTableData = selection;
1125
       this.selectedTableData = selection;
1126
+
1123
     },
1127
     },
1124
     batchDelete() {
1128
     batchDelete() {
1125
       if (this.selectedTableData.length <= 0) {
1129
       if (this.selectedTableData.length <= 0) {
1465
 
1469
 
1466
       this.propForm.goodType = [];
1470
       this.propForm.goodType = [];
1467
     },
1471
     },
1472
+    toPrint(){
1473
+      if(this.order_id == 0){
1474
+        this.$message.error("请勾选入库单")
1475
+      }else{
1476
+        this.$router.push("/stock/in/detail/print?id="+this.order_id)
1477
+      }
1478
+    }
1468
   }
1479
   }
1469
 };
1480
 };
1470
 </script>
1481
 </script>

+ 1 - 1
src/xt_pages/stock/stockInOrderAdd.vue 查看文件

76
                   >
76
                   >
77
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
77
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
78
                   <template slot-scope="{ item }">
78
                   <template slot-scope="{ item }">
79
-                    <div class="name">{{ item.good_name }}</div>
79
+                    <div class="name">{{ item.good_name +"  " +item.specification_name }}</div>
80
                   </template>
80
                   </template>
81
                  </el-autocomplete>
81
                  </el-autocomplete>
82
             </template>
82
             </template>

+ 5 - 5
src/xt_pages/stock/stockInOrderEdit.vue 查看文件

50
         </el-date-picker>
50
         </el-date-picker>
51
       </div>
51
       </div>
52
 
52
 
53
-      <div class="cell clearfix">
53
+      <!-- <div class="cell clearfix">
54
         <label class="title"><span class="name">经销商</span> : </label>
54
         <label class="title"><span class="name">经销商</span> : </label>
55
         <el-select
55
         <el-select
56
           size="small"
56
           size="small"
67
           >
67
           >
68
           </el-option>
68
           </el-option>
69
         </el-select>
69
         </el-select>
70
-      </div>
70
+      </div> -->
71
 
71
 
72
-      <div class="cell clearfix">
72
+      <!-- <div class="cell clearfix">
73
         <label class="title"><span class="name">厂商</span> : </label>
73
         <label class="title"><span class="name">厂商</span> : </label>
74
 
74
 
75
         <el-select
75
         <el-select
87
           >
87
           >
88
           </el-option>
88
           </el-option>
89
         </el-select>
89
         </el-select>
90
-      </div>
90
+      </div> -->
91
 
91
 
92
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
92
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
93
         <el-table
93
         <el-table
117
                   >
117
                   >
118
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
118
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
119
                   <template slot-scope="{ item }">
119
                   <template slot-scope="{ item }">
120
-                    <div class="name">{{ item.good_name }}</div>
120
+                    <div class="name">{{ item.good_name +" " + item.specification_name}}</div>
121
                   </template>
121
                   </template>
122
                  </el-autocomplete>
122
                  </el-autocomplete>
123
             </template>
123
             </template>

+ 89 - 11
src/xt_pages/stock/stockOutOrder.vue 查看文件

275
             {{ scope.row.remark }}
275
             {{ scope.row.remark }}
276
           </template>
276
           </template>
277
         </el-table-column>
277
         </el-table-column>
278
-       
278
+        <el-table-column label="操作" align="center">
279
+          <template slot-scope="scope">
280
+            <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetail(scope.row.id)">使用明细</span>
281
+          </template>
282
+        </el-table-column>
279
       </el-table>  
283
       </el-table>  
280
     
284
     
281
   </div>
285
   </div>
379
 
383
 
380
             <el-table-column label="" align="center"  >
384
             <el-table-column label="" align="center"  >
381
               <template slot-scope="scope" v-if="scope.row.is_sys == 1">
385
               <template slot-scope="scope" v-if="scope.row.is_sys == 1">
382
-              <div style="color: #589ff8" @click="jump(scope.row.id)">使用明细</div>
386
+              <div style="color: #589ff8" @click="GetOrderDetailThree(scope.row.id)">使用明细</div>
383
               </template>
387
               </template>
384
             </el-table-column>
388
             </el-table-column>
385
              
389
              
398
   <!-- 使用明细查询 -->
402
   <!-- 使用明细查询 -->
399
    <el-dialog
403
    <el-dialog
400
     title="出库单详情"
404
     title="出库单详情"
401
-    :visible.sync="editdialogVisible"
405
+    :visible.sync="editdialogVisibleTwo"
402
     width="80%">
406
     width="80%">
403
     <span>
407
     <span>
404
       <div class="filter-container">
408
       <div class="filter-container">
405
         <span style="font-size: 18px;color: #606266">商品使用明细</span>
409
         <span style="font-size: 18px;color: #606266">商品使用明细</span>
406
       </div>
410
       </div>
407
      
411
      
408
-      <div class="cell clearfix">
412
+      <!-- <div class="cell clearfix">
409
         <span style="width: 300px;color: #606266">商品类型: {{type_name}} </span>
413
         <span style="width: 300px;color: #606266">商品类型: {{type_name}} </span>
410
         <span style="width: 300px;color: #606266">规格名称: {{specification_name}}</span>
414
         <span style="width: 300px;color: #606266">规格名称: {{specification_name}}</span>
411
-      </div>
415
+      </div> -->
412
 
416
 
413
        <el-row :gutter="12" style="margin-top: 10px">
417
        <el-row :gutter="12" style="margin-top: 10px">
414
         <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 80%"
418
         <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 80%"
597
       </span>
601
       </span>
598
   </el-dialog>
602
   </el-dialog>
599
    
603
    
604
+  
605
+    <el-dialog
606
+      title="出库明细"
607
+      :visible.sync="editdialogVisibleTwo"
608
+      width="60%">
609
+      <span>
610
+         <div class="app-container">
611
+
612
+      <div class="filter-container">
613
+        <span style="font-size: 18px;color: #606266">商品使用明细</span>
614
+      </div>
615
+
616
+       <!-- <div class="cell clearfix">
617
+        <span style="width: 300px;color: #606266">商品类型: {{userList[0].type.type_name}} </span>
618
+        <span style="width: 300px;color: #606266">规格名称: {{userList[0].info.specification_name}}</span>
619
+      </div> -->
620
+
621
+      <el-row :gutter="12" style="margin-top: 10px">
622
+      <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 50%"
623
+              border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
624
+          <el-table-column min-width="35" align="center">
625
+            <template slot="header" slot-scope="scope">
626
+              <span>序号</span>
627
+            </template>
628
+            <template slot-scope="scope">
629
+              <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
630
+              <span v-if="scope.row.is_total == 1">{{'合计'}}</span>
631
+            </template>
632
+          </el-table-column>
633
+
634
+          <el-table-column min-width="35" align="center">
635
+            <template slot="header" slot-scope="scope">
636
+              <span>使用人</span>
637
+            </template>
638
+            <template slot-scope="scope">
639
+              <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
640
+              <span v-if="scope.row.is_total == 1"></span>
641
+            </template>
642
+          </el-table-column>
643
+          <el-table-column min-width="35" align="center">
644
+            <template slot="header" slot-scope="scope">
645
+              <span>使用数量</span>
646
+            </template>
647
+            <template slot-scope="scope">
648
+              <span v-if="scope.row.is_total == 0">{{scope.row.count}}</span>
649
+              <span  v-if="scope.row.is_total == 1">{{scope.row.total}} </span>
650
+
651
+            </template>
652
+          </el-table-column>
653
+          <el-table-column min-width="35" align="center">
654
+            <template slot="header" slot-scope="scope">
655
+              <span>使用时间</span>
656
+            </template>
657
+            <template slot-scope="scope">
658
+              <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
659
+
660
+            </template>
661
+          </el-table-column>
662
+
663
+        </el-table>
664
+      </el-row>
665
+    </div>
666
+      </span>
667
+      <span slot="footer" class="dialog-footer">
668
+        <el-button @click="editdialogVisibleTwo = false">取 消</el-button>
669
+        <el-button type="primary" @click="editdialogVisibleTwo = false">确 定</el-button>
670
+      </span>
671
+    </el-dialog>
600
 
672
 
601
    <stock-in-dialog
673
    <stock-in-dialog
602
         ref="dialog"
674
         ref="dialog"
738
       good_type_id:"",
810
       good_type_id:"",
739
       tableShow:false,
811
       tableShow:false,
740
       tableList:[],
812
       tableList:[],
813
+      dialogVisibleTwo:false,
814
+      userList:[],
815
+      editdialogVisibleTwo:false
741
     };
816
     };
742
   },
817
   },
743
   methods: {
818
   methods: {
1030
             this.tableShow = true
1105
             this.tableShow = true
1031
             for (let i = 0; i < response.data.data.list.length; i++) {
1106
             for (let i = 0; i < response.data.data.list.length; i++) {
1032
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
1107
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
1033
-
1108
+              console.log("表格00000000",this.tableList)
1034
               this.tableList.push(response.data.data.list[i])
1109
               this.tableList.push(response.data.data.list[i])
1035
             }
1110
             }
1036
             this.warehousingOutInfo.info = response.data.data.info
1111
             this.warehousingOutInfo.info = response.data.data.info
1105
               is_total: 1,
1180
               is_total: 1,
1106
               total: total,
1181
               total: total,
1107
             })
1182
             })
1108
-            this.type_name = this.userList[0].type.type_name
1109
-            this.specification_name = this.userList[0].info.specification_name
1183
+            // this.type_name = this.userList[0].type.type_name
1184
+            // this.specification_name = this.userList[0].info.specification_name
1110
             console.log("详情数据区",this.userList)
1185
             console.log("详情数据区",this.userList)
1111
-            this.editdialogVisible = true
1186
+            this.editdialogVisibleTwo = true
1112
           }
1187
           }
1113
         })
1188
         })
1114
       },
1189
       },
1202
             }
1277
             }
1203
             this.warehouseOut = response.data.data.info
1278
             this.warehouseOut = response.data.data.info
1204
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
1279
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
1205
-            this.form.manufacturer = this.warehouseOut.manufacturer
1206
-            this.form.dealer = this.warehouseOut.dealer
1280
+            // this.form.manufacturer = this.warehouseOut.manufacturer
1281
+            // this.form.dealer = this.warehouseOut.dealer
1207
             this.editDialogVisible = true
1282
             this.editDialogVisible = true
1208
           }
1283
           }
1209
 
1284
 
1427
           }
1502
           }
1428
         })
1503
         })
1429
       }, 
1504
       }, 
1505
+     
1506
+     
1507
+
1430
   }
1508
   }
1431
 };
1509
 };
1432
 </script>
1510
 </script>

+ 83 - 19
src/xt_pages/stock/stockQuery.vue 查看文件

62
           <el-button size="small" type="primary" @click="toPrint">打印</el-button>
62
           <el-button size="small" type="primary" @click="toPrint">打印</el-button>
63
         </div>
63
         </div>
64
       </div>
64
       </div>
65
-      
65
+
66
 
66
 
67
       <!-- <el-table
67
       <!-- <el-table
68
         :row-style="{ color: '#303133' }"
68
         :row-style="{ color: '#303133' }"
190
            {{getManufacture(scope.row.manufacturer)}}
190
            {{getManufacture(scope.row.manufacturer)}}
191
           </template>
191
           </template>
192
         </el-table-column>
192
         </el-table-column>
193
+       <el-table-column label="入库数量" align="center">
194
+         <template slot-scope="scope">
195
+          <span>{{getInCount(scope.row.good_id)}}</span>
196
+         </template>
197
+       </el-table-column>
198
+       <el-table-column label="出库数量" align="center">
199
+         <template slot-scope="scope">
200
+           <span>{{getOutCount(scope.row.good_id)+getAutoCount(scope.row.good_id)}}</span>
201
+
202
+         </template>
203
+       </el-table-column>
204
+      
193
        <el-table-column label="剩余库存量" align="center">
205
        <el-table-column label="剩余库存量" align="center">
194
          <template slot-scope="scope">
206
          <template slot-scope="scope">
195
-          <span v-if="scope.row.stock_count!=0">{{scope.row.stock_count}}</span>
207
+           {{getInCount(scope.row.good_id)- getOutCount(scope.row.good_id) - getAutoCount(scope.row.good_id)}}
196
          </template>
208
          </template>
197
        </el-table-column>
209
        </el-table-column>
198
        <el-table-column label="操作" align="center" width="260px">
210
        <el-table-column label="操作" align="center" width="260px">
235
   GetAllGoodInfo,
247
   GetAllGoodInfo,
236
   GetAllGoodType,
248
   GetAllGoodType,
237
   getAllStockQueryList,
249
   getAllStockQueryList,
238
-  getAllStockList
250
+  getAllStockList,
251
+  getStockDrugCount
239
 } from "@/api/stock";
252
 } from "@/api/stock";
240
 
253
 
241
 export default {
254
 export default {
245
     this.GetAllGoodInfo();
258
     this.GetAllGoodInfo();
246
     this.GetAllGoodType();
259
     this.GetAllGoodType();
247
     this.getlist()
260
     this.getlist()
261
+    this.getStockDrugCount()
248
   },
262
   },
249
   components: {
263
   components: {
250
     BreadCrumb
264
     BreadCrumb
274
       type_name:0,
288
       type_name:0,
275
       types:[],
289
       types:[],
276
       tableList:[],
290
       tableList:[],
277
-      manufacturerList:[]
291
+      manufacturerList:[],
292
+      countList:[],
293
+      outCountList:[],
294
+      autoCountList:[],
278
     };
295
     };
279
   },
296
   },
280
   methods: {
297
   methods: {
288
         end_time:this.end_time,
305
         end_time:this.end_time,
289
         type_name:this.type_name,
306
         type_name:this.type_name,
290
       };
307
       };
291
-     
308
+
292
       this.WarehouseInfo.loading = true;
309
       this.WarehouseInfo.loading = true;
293
       this.WarehouseInfo.warehouseInfoDate = [];
310
       this.WarehouseInfo.warehouseInfoDate = [];
294
       getAllStockQueryList(Params).then(response => {
311
       getAllStockQueryList(Params).then(response => {
304
           }
321
           }
305
         }
322
         }
306
         console.log("数据源头",this.WarehouseInfo.warehouseInfoDate)
323
         console.log("数据源头",this.WarehouseInfo.warehouseInfoDate)
307
-         
324
+
308
          for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
325
          for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
309
             this.WarehouseInfo.warehouseInfoDate[i].type_name = this.WarehouseInfo.warehouseInfoDate[i].type.type_name
326
             this.WarehouseInfo.warehouseInfoDate[i].type_name = this.WarehouseInfo.warehouseInfoDate[i].type.type_name
310
 
327
 
332
 
349
 
333
 
350
 
334
          }
351
          }
335
-        
352
+
336
         console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
353
         console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
337
       });
354
       });
338
     },
355
     },
352
             this.goodType.push(response.data.data.goodType[i]);
369
             this.goodType.push(response.data.data.goodType[i]);
353
             this.types.push(response.data.data.goodType[i])
370
             this.types.push(response.data.data.goodType[i])
354
           }
371
           }
355
-          
372
+
356
           console.log("商品类型",this.types)
373
           console.log("商品类型",this.types)
357
         }
374
         }
358
       });
375
       });
374
     },
391
     },
375
     handleSizeChange(val) {
392
     handleSizeChange(val) {
376
       this.limit = val;
393
       this.limit = val;
377
-     
394
+
378
       this.getlist()
395
       this.getlist()
379
     },
396
     },
380
     handleCurrentChange(val) {
397
     handleCurrentChange(val) {
386
     },
403
     },
387
     startTimeChange: function(val) {
404
     startTimeChange: function(val) {
388
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
405
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
389
-      
406
+
390
       if (time > 0) {
407
       if (time > 0) {
391
         this.$message.error("开始时间不能大于结束时间");
408
         this.$message.error("开始时间不能大于结束时间");
392
         this.start_time = "";
409
         this.start_time = "";
404
         this.end_time = val
421
         this.end_time = val
405
          this.getlist()
422
          this.getlist()
406
       }
423
       }
407
-     
424
+
408
     },
425
     },
409
     stockInCount: function(row) {
426
     stockInCount: function(row) {
410
       let total = 0;
427
       let total = 0;
421
       return total;
438
       return total;
422
     },
439
     },
423
     stockOutCount: function(row) {
440
     stockOutCount: function(row) {
424
-      
441
+
425
       let total = 0;
442
       let total = 0;
426
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
443
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
427
         total = total + row.query_warehouseout_info[i].count;
444
         total = total + row.query_warehouseout_info[i].count;
444
     },
461
     },
445
 
462
 
446
     exportList(){
463
     exportList(){
447
-      
464
+
448
          import('@/vendor/Export2Excel').then(excel => {
465
          import('@/vendor/Export2Excel').then(excel => {
449
          const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','进货价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
466
          const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','进货价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
450
-         const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','price','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus'] 
467
+         const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','price','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus']
451
          const data = this.formatJson(filterVal, this.WarehouseInfo.warehouseInfoDate)
468
          const data = this.formatJson(filterVal, this.WarehouseInfo.warehouseInfoDate)
452
          console.log("data",data)
469
          console.log("data",data)
453
-         
470
+
454
          excel.export_json_to_excel({
471
          excel.export_json_to_excel({
455
            header: tHeader,
472
            header: tHeader,
456
            data,
473
            data,
467
       },
484
       },
468
       toPrint(){
485
       toPrint(){
469
         this.$router.push("/stock/stockprint?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keywords+"&type_name="+this.type_name+"&page="+this.page+"&limit="+this.limit)
486
         this.$router.push("/stock/stockprint?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keywords+"&type_name="+this.type_name+"&page="+this.page+"&limit="+this.limit)
470
-        
487
+
471
       },
488
       },
472
 
489
 
473
       getUnit(id){
490
       getUnit(id){
474
-        
491
+
475
         var name = ""
492
         var name = ""
476
         for(let i=0;i<this.$store.getters.good_unit.length;i++){
493
         for(let i=0;i<this.$store.getters.good_unit.length;i++){
477
            if(id == this.$store.getters.good_unit[i].id){
494
            if(id == this.$store.getters.good_unit[i].id){
478
               name = this.$store.getters.good_unit[i].name
495
               name = this.$store.getters.good_unit[i].name
479
-           } 
496
+           }
480
         }
497
         }
481
         return name
498
         return name
482
       },
499
       },
531
     },
548
     },
532
     toClickOne(val){
549
     toClickOne(val){
533
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
550
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
534
-    }
551
+    },
552
+    getStockDrugCount(){
553
+        var params ={
554
+          keywords: this.keywords,
555
+          start_time:this.start_time,
556
+          end_time:this.end_time,
557
+        }
558
+      getStockDrugCount(params).then(response=>{
559
+         if(response.data.state == 1){
560
+           var count = response.data.data.count
561
+           console.log("入库统计",count)
562
+           this.countList = count
563
+           var outlist = response.data.data.outList
564
+           console.log("出库数量",outlist)
565
+           this.outCountList = outlist
566
+           var autoCount = response.data.data.autoCount
567
+           console.log("autoCount",autoCount)
568
+           this.autoCountList = autoCount
569
+         }
570
+      })
571
+    },
572
+    getInCount(id){
573
+      var count= ""
574
+     for(let i=0;i<this.countList.length;i++){
575
+      if(id == this.countList[i].good_id){
576
+          count = this.countList[i].count
577
+      }
578
+     }
579
+     return count
580
+    },
581
+    getOutCount(id){
582
+      var count = ""
583
+      for(let i=0;i<this.outCountList.length;i++){
584
+         if(id == this.outCountList[i].good_id){
585
+           count = this.outCountList[i].count
586
+         }
587
+      }
588
+      return count
589
+    },
590
+   getAutoCount(id){
591
+     var count= ""
592
+     for(let i=0;i<this.autoCountList.length;i++){
593
+       if(id == this.autoCountList[i].good_id){
594
+         count = this.outCountList[i].count
595
+       }
596
+     }
597
+     return count
598
+   }
535
   }
599
   }
536
 };
600
 };
537
 </script>
601
 </script>