Explorar el Código

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

See999 hace 4 años
padre
commit
74b7e85eba

+ 54 - 7
src/xt_pages/data/prescription.vue Ver fichero

@@ -226,9 +226,9 @@
226 226
 
227 227
                 <el-col :span="8">
228 228
                   <el-form-item label="透析器/灌流器:">
229
+
229 230
                     <el-input
230
-                      v-model="addPlan.dialyzer_perfusion_apparatus"
231
-                    ></el-input>
231
+                      v-model="addPlan.dialyzer_perfusion_apparatus" @focus="showInnerDialog('5')"></el-input>
232 232
                   </el-form-item>
233 233
                 </el-col>
234 234
 
@@ -420,6 +420,12 @@
420 420
         </el-col>
421 421
       </el-row>
422 422
     </div>
423
+    <multi-select-box
424
+      :propsForm="InnerDialogProps"
425
+      v-on:dialog-comfirm="innerDialogComfirm"
426
+      v-on:dialog-cancle="innerDialogCancle"
427
+    >
428
+    </multi-select-box>
423 429
   </div>
424 430
 </template>
425 431
 
@@ -431,19 +437,31 @@ import {
431 437
   postSystemPrescription,
432 438
   updateSystemPrescription
433 439
 } from "@/api/config";
440
+import { getDataConfig } from '@/utils/data'
441
+import MultiSelectBox from '../dialysis/details/dialog/MultiSelectBox/index'
442
+
434 443
 
435 444
 export default {
436 445
   name: "prescription",
437
-  components: {},
446
+  components: { MultiSelectBox },
438 447
 
439 448
   data() {
440 449
     return {
450
+      InnerDialogProps: {
451
+        values: [],
452
+        visibility: false,
453
+        isShowTextArea: true,
454
+        customContent: '',
455
+        titles: '',
456
+        type: '' // 不同弹框类型,用来匹配数据
457
+      },
441 458
       dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
442 459
       modeOptions: null,
443 460
       current_select: 0,
444 461
       mode_name: "HD",
445 462
       pageLoading: false,
446 463
       itemLoading: false,
464
+      dialyzerPerfusionApparatus:[],
447 465
       treatment_mode: [
448 466
         // 治疗模式
449 467
         {
@@ -807,6 +825,30 @@ export default {
807 825
   },
808 826
   computed: {},
809 827
   methods: {
828
+    showInnerDialog: function(val) {
829
+      this.InnerDialogProps.visibility = true
830
+      switch (val) {
831
+        case '5': // 透析器/灌流器
832
+          this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
833
+          this.InnerDialogProps.titles = '透析器/灌流器'
834
+          this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
835
+          this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
836
+          this.InnerDialogProps.isShowTextArea = false
837
+          break
838
+      }
839
+    },
840
+    innerDialogComfirm: function(val) {
841
+      this.InnerDialogProps.visibility = false
842
+      switch (val.type) {
843
+        case 'dialyzer_perfusion_apparatus':
844
+          this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
845
+          break
846
+
847
+      }
848
+    },
849
+    innerDialogCancle: function() {
850
+      this.InnerDialogProps.visibility = false
851
+    },
810 852
     openEdit() {},
811 853
     tableRows({ row, rowIndex }) {
812 854
       // 把每一行的索引放进row
@@ -882,7 +924,7 @@ export default {
882 924
       );
883 925
 
884 926
       getSystemPrescription(params).then(response => {
885
-        
927
+
886 928
         if (response.data.state == 0) {
887 929
           this.$message.error(response.data.msg);
888 930
           return false;
@@ -892,7 +934,7 @@ export default {
892 934
               prescription.anticoagulant = "低分子肝素"
893 935
            }
894 936
           if (prescription.id > 0) {
895
-            
937
+
896 938
             for (const key in prescription) {
897 939
               this.addPlan[key] = prescription[key];
898 940
             }
@@ -928,7 +970,7 @@ export default {
928 970
         } else {
929 971
           this.system_prescription = response.data.data.prescriptions;
930 972
           console.log("为什么",this.system_prescription)
931
-          
973
+
932 974
           for (let i = 0; i < this.system_prescription.length; i++) {
933 975
             if (this.system_prescription[i].mode == 1) {
934 976
               this.isEdit = true;
@@ -946,7 +988,7 @@ export default {
946 988
     },
947 989
     changeThisAnticoagulant() {
948 990
       var thismode = parseInt(this.addPlan.anticoagulant);
949
-     
991
+
950 992
       if (isNaN(thismode) || thismode <= 0) {
951 993
         return false;
952 994
       }
@@ -1019,8 +1061,13 @@ export default {
1019 1061
     this.displace_liqui_part_option = this.$store.getters.displace_liqui;
1020 1062
     this.blood_access_option = this.$store.getters.blood_access;
1021 1063
     this.addPlan.mode = 1;
1064
+    this.dialyzerPerfusionApparatus = getDataConfig(
1065
+      'hemodialysis',
1066
+      'dialyzer_perfusion_apparatus'
1067
+    )
1022 1068
     this.getAllSystemPrescription();
1023 1069
     this.getSystemPrescription(this.addPlan.mode);
1070
+
1024 1071
   },
1025 1072
   watch: {
1026 1073
     "addPlan.dialysis_duration": function() {

+ 5 - 2
src/xt_pages/dialysis/details/NavIgation.vue Ver fichero

@@ -541,7 +541,8 @@ export default {
541 541
 
542 542
       this.$refs.assessmentBefore.setLastRecord(
543 543
         lastPredialysisEvaluation,
544
-        lastDryWeightDislysis
544
+        lastDryWeightDislysis,
545
+
545 546
       );
546 547
       this.$refs.prescription.setLastRecord(
547 548
         schedual,
@@ -589,7 +590,9 @@ export default {
589 590
       this.$refs.accepts.show(this.receiver_treatment_access);
590 591
     },
591 592
     showAssessmentBefore: function() {
592
-      this.$refs.assessmentBefore.show(this.predialysis_evaluation);
593
+      console.log(this.last_predialysis_evaluation)
594
+
595
+      this.$refs.assessmentBefore.show(this.predialysis_evaluation,this.last_dryWeight_dislysis,this.last_predialysis_evaluation);
593 596
     },
594 597
     showDoubleCheck: function() {
595 598
       this.$refs.doubleCheck.show();

+ 28 - 67
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue Ver fichero

@@ -645,9 +645,11 @@
645 645
         }
646 646
         return false
647 647
       },
648
-      show(assessment) {
648
+      show(assessment, lastDryWeightDislysis,last_predialysis_evaluation) {
649
+        console.log(last_predialysis_evaluation)
650
+
651
+        this.lastPredialysisEvaluation = last_predialysis_evaluation
649 652
         this.assessment = assessment
650
-        console.log('透前', assessment)
651 653
         this.getPermission()
652 654
         this.isVisibility = true
653 655
         for (let i = 0; i < this.admin_users.length; i++) {
@@ -659,43 +661,39 @@
659 661
           this.weight_adjust.doctor = this.$store.getters.xt_user.user.id
660 662
         }
661 663
 
664
+
665
+
666
+
667
+
662 668
         if (this.predialysis_evaluation.id == 0) {
663
-          if (this.lastDryWeightDislysis != null) {
664
-            this.weight_adjust.weight = this.lastDryWeightDislysis.dry_weight
665
-            this.assessmentBeforeDislysis.dry_weight = this.lastDryWeightDislysis.dry_weight
669
+
670
+
671
+          if (lastDryWeightDislysis != null) {
672
+            this.weight_adjust.weight = lastDryWeightDislysis.dry_weight
673
+            this.$set(
674
+              this.assessmentBeforeDislysis,
675
+              'dry_weight',
676
+              lastDryWeightDislysis.dry_weight.toString()
677
+            )
678
+
666 679
           } else {
667 680
             if (this.lastPredialysisEvaluation != null) {
668 681
               this.weight_adjust.weight = this.lastPredialysisEvaluation.dry_weight
669 682
               this.assessmentBeforeDislysis.dry_weight = this.lastPredialysisEvaluation.dry_weight
670 683
             }
671 684
           }
685
+
672 686
           if (this.lastPredialysisEvaluation != null) {
673
-            this.$set(
674
-              this.assessmentBeforeDislysis,
675
-              'additional_weight',
676
-              this.lastPredialysisEvaluation['additional_weight'].toString()
677
-            )
687
+            for (var key in this.lastPredialysisEvaluation){
688
+              if (key != 'systolic_blood_pressure' && key != 'diastolic_blood_pressure' && key != 'pulse_frequency' && key != 'temperature' && key != 'breathing_rate' && key != 'dry_weight' && key != 'weight_before'){
689
+                this.$set(
690
+                  this.assessmentBeforeDislysis,
691
+                  key,
692
+                  this.lastPredialysisEvaluation[key]
693
+                )
678 694
 
679
-            this.$set(
680
-              this.assessmentBeforeDislysis,
681
-              'internal_fistula',
682
-              this.lastPredialysisEvaluation['internal_fistula']
683
-            )
684
-            this.$set(
685
-              this.assessmentBeforeDislysis,
686
-              'internal_fistula_skin',
687
-              this.lastPredialysisEvaluation['internal_fistula_skin']
688
-            )
689
-            this.$set(
690
-              this.assessmentBeforeDislysis,
691
-              'blood_access_part_id',
692
-              this.lastPredialysisEvaluation['blood_access_part_id']
693
-            )
694
-            this.$set(
695
-              this.assessmentBeforeDislysis,
696
-              'blood_access_part_opera_id',
697
-              this.lastPredialysisEvaluation['blood_access_part_opera_id']
698
-            )
695
+              }
696
+            }
699 697
           }
700 698
 
701 699
         } else {
@@ -703,12 +701,6 @@
703 701
           this.weight_adjust.weight = this.predialysis_evaluation['dry_weight']
704 702
         }
705 703
 
706
-
707
-
708
-
709
-
710
-
711
-
712 704
       },
713 705
       hide() {
714 706
         this.isVisibility = false
@@ -1021,15 +1013,12 @@
1021 1013
 
1022 1014
       },
1023 1015
       'predialysis_evaluation.id': function() {
1024
-        console.log(this.last_predialysis)
1025 1016
 
1026 1017
         if (this.predialysis_evaluation.id > 0) {
1027 1018
           for (var index in this.assessmentBeforeDislysis) {
1028 1019
             this.assessmentBeforeDislysis[index] = this.predialysis_evaluation[index]
1029 1020
           }
1030 1021
 
1031
-          // this.assessmentBeforeDislysis['catheter_bend'] = this.predialysis_evaluation['catheter_bend'].toString()
1032
-          // this.assessmentBeforeDislysis['is_hemorrhage'] = this.predialysis_evaluation['is_hemorrhage'].toString()
1033 1022
           if (this.predialysis_evaluation['catheter_bend'] == 0) {
1034 1023
             this.assessmentBeforeDislysis['catheter_bend'] = ''
1035 1024
           } else {
@@ -1047,34 +1036,6 @@
1047 1036
             this.assessmentBeforeDislysis['is_infect'] = this.predialysis_evaluation['is_infect'] + ''
1048 1037
           }
1049 1038
 
1050
-          //
1051
-          //
1052
-          // if (this.predialysis_evaluation['puncture_way'] == 0) {
1053
-          //   this.assessmentBeforeDislysis['puncture_way'] = ''
1054
-          // } else {
1055
-          //   this.assessmentBeforeDislysis['puncture_way'] = this.predialysis_evaluation['puncture_way'] + ''
1056
-          // }
1057
-          //
1058
-          //
1059
-          // if (this.predialysis_evaluation['venous_catheterization'] == 0) {
1060
-          //   this.assessmentBeforeDislysis['venous_catheterization'] = ''
1061
-          // } else {
1062
-          //   this.assessmentBeforeDislysis['venous_catheterization'] = this.predialysis_evaluation['venous_catheterization'] + ''
1063
-          // }
1064
-          //
1065
-          //
1066
-          // if (this.predialysis_evaluation['venous_catheterization_part'] == 0) {
1067
-          //   this.assessmentBeforeDislysis['venous_catheterization_part'] = ''
1068
-          // } else {
1069
-          //   this.assessmentBeforeDislysis['venous_catheterization_part'] = this.predialysis_evaluation['venous_catheterization_part'] + ''
1070
-          // }
1071
-          //
1072
-          //
1073
-          // if (this.predialysis_evaluation['emergency_treatment'] == 0) {
1074
-          //   this.assessmentBeforeDislysis['emergency_treatment'] = ''
1075
-          // } else {
1076
-          //   this.assessmentBeforeDislysis['emergency_treatment'] = this.predialysis_evaluation['emergency_treatment'] + ''
1077
-          // }
1078 1039
 
1079 1040
           if (this.predialysis_evaluation['blood_access_part_id'] == 0) {
1080 1041
             this.assessmentBeforeDislysis['blood_access_part_id'] = ''

+ 17 - 13
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Ver fichero

@@ -128,7 +128,7 @@
128 128
               {{ scope.row.transmembrane_pressure ? scope.row.transmembrane_pressure : "" }}
129 129
             </template>
130 130
           </el-table-column>
131
-          
131
+
132 132
           <el-table-column prop="transmembrane_pressure" align="center"  label="跨膜压(mmHg)" width="120" v-if="isShow('跨膜压') && (monitors[0] && monitors[0]['transmembrane_pressure_type'] != 2)" >
133 133
             <template slot-scope="scope">
134 134
               {{ scope.row.transmembrane_pressure ? scope.row.transmembrane_pressure : "" }}
@@ -148,7 +148,7 @@
148 148
                   template_id == 12 ||
149 149
                   template_id == 13 ||
150 150
                   template_id == 17 ||
151
-                  template_id == 18 || 
151
+                  template_id == 18 ||
152 152
                   template_id == 19 ||
153 153
                   template_id == 20)
154 154
             "
@@ -330,7 +330,7 @@
330 330
               {{ scope.row.ultrafiltration_rate ? scope.row.ultrafiltration_rate : ""  }}
331 331
             </template>
332 332
           </el-table-column>
333
-          
333
+
334 334
           <el-table-column
335 335
             prop="heparin"
336 336
             align="center"
@@ -890,14 +890,16 @@ export default {
890 890
       getTodayMonitor(params).then(rs => {
891 891
         var resp = rs.data.data
892 892
         this.form.operate_time = resp.monitor.operate_time ? (resp.monitor.operate_time + 3600) * 1000 : Date.parse(new Date())
893
+        this.form.temperature = '' // this.last_monitor_record.pulse_frequency;
894
+
893 895
         this.form.pulse_frequency = '' // this.last_monitor_record.pulse_frequency;
894
-        this.form.breathing_rated = resp.monitor.breathing_rate ? resp.monitor.breathing_rate : ''
896
+        this.form.breathing_rated =  ''
895 897
         this.form.systolic_bp = '' // this.last_monitor_record.systolic_blood_pressure;
896 898
         this.form.diastolic_bp = '' // this.last_monitor_record.diastolic_blood_pressure;
897 899
         this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume : ''
898 900
         this.form.venous_pressure = '' // this.last_monitor_record.venous_pressure;
899 901
         this.form.venous_pressure_type = resp.monitor.venous_pressure_type ? resp.monitor.venous_pressure_type : 1
900
-        this.form.arterial_pressure = '' // this.last_monitor_record.arterial_pressure;
902
+        this.form.arterial_pressure = resp.monitor.arterial_pressure ? resp.monitor.arterial_pressure : '' // this.last_monitor_record.arterial_pressure;
901 903
         this.form.arterial_pressure_type = resp.monitor.arterial_pressure_type ? resp.monitor.arterial_pressure_type : 1
902 904
         this.form.transmembrane_pressure = '' // this.last_monitor_record.transmembrane_pressure;
903 905
         this.form.transmembrane_pressure_type = resp.monitor.transmembrane_pressure_type ? resp.monitor.transmembrane_pressure_type : 1
@@ -905,18 +907,20 @@ export default {
905 907
         this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume ? resp.monitor.ultrafiltration_volume : ''
906 908
         this.form.sodium_concentration = resp.monitor.sodium_concentration ? resp.monitor.sodium_concentration : ''
907 909
         this.form.dialysate_temperature = resp.monitor.dialysate_temperature ? resp.monitor.dialysate_temperature : ''
908
-        this.form.temperature = resp.monitor.temperature ? resp.monitor.temperature : ''
910
+        this.form.temperature = ''
909 911
         this.form.replacement_rate = resp.monitor.replacement_rate ? resp.monitor.replacement_rate : ''
910 912
         this.form.heparin = resp.monitor.heparin ? resp.monitor.heparin : ''
911 913
         this.form.dialysate_flow = resp.monitor.dialysate_flow ? resp.monitor.dialysate_flow : ''
912
-        this.form.displacement_quantity = '' // this.last_monitor_record.displacement_quantity;
913
-        this.form.conductivity = ''
914
-        this.form.displacement_flow_quantity = ''
915
-        this.form.ktv = '' // this.last_monitor_record.ktv;
916
-        this.form.symptom = '' // this.last_monitor_record.symptom;
917
-        this.form.dispose = '' // this.last_monitor_record.dispose;
918
-        this.form.result = '' // this.last_monitor_record.result;
914
+        this.form.displacement_quantity =  resp.monitor.displacement_quantity ? resp.monitor.displacement_quantity : '' // this.last_monitor_record.displacement_quantity;
915
+        this.form.conductivity =   ''
916
+        this.form.displacement_flow_quantity = resp.monitor.displacement_flow_quantity ? resp.monitor.displacement_flow_quantity : ''
917
+        this.form.ktv =  resp.monitor.ktv ? resp.monitor.ktv : '' // this.last_monitor_record.ktv;
918
+        this.form.symptom =  resp.monitor.symptom ? resp.monitor.symptom : '' // this.last_monitor_record.symptom;
919
+        this.form.dispose =  resp.monitor.dispose ? resp.monitor.dispose : '' // this.last_monitor_record.dispose;
920
+        this.form.result =  resp.monitor.result ? resp.monitor.result : '' // this.last_monitor_record.result;
919 921
         this.form.blood_oxygen_saturation = resp.monitor.blood_oxygen_saturation ? resp.monitor.blood_oxygen_saturation : ''
922
+
923
+
920 924
       })
921 925
     },
922 926
 

+ 392 - 379
src/xt_pages/stock/config/goodInfo.vue Ver fichero

@@ -16,7 +16,8 @@
16 16
         icon="el-icon-circle-plus-outline"
17 17
         type="primary"
18 18
         @click="showInfoDialog"
19
-        >新增</el-button
19
+      >新增
20
+      </el-button
20 21
       >
21 22
     </div>
22 23
 
@@ -34,7 +35,8 @@
34 35
         type="primary"
35 36
         icon="el-icon-search"
36 37
         @click="search"
37
-        >搜索</el-button
38
+      >搜索
39
+      </el-button
38 40
       >
39 41
     </div>
40 42
 
@@ -134,428 +136,439 @@
134 136
 </template>
135 137
 
136 138
 <script>
137
-import GoodInfoDailog from "../Dialog/goodInfoDailog";
138
-import {
139
-  createGoodInfo,
140
-  deleteGoodInfo,
141
-  GetAllDeals,
142
-  GetAllGoodType,
143
-  GetAllManufacturer,
144
-  GetGoodInfo,
145
-  GetGoodInfoByGoodId,
146
-  getGoodInfoList,
147
-  modifyGoodInfo
148
-} from "@/api/stock";
139
+  import GoodInfoDailog from '../Dialog/goodInfoDailog'
140
+  import {
141
+    createGoodInfo,
142
+    deleteGoodInfo,
143
+    GetAllDeals,
144
+    GetAllGoodType,
145
+    GetAllManufacturer,
146
+    GetGoodInfo,
147
+    GetGoodInfoByGoodId,
148
+    getGoodInfoList,
149
+    modifyGoodInfo
150
+  } from '@/api/stock'
149 151
 
150
-export default {
151
-  components: {
152
-    GoodInfoDailog
153
-  },
154
-  name: "goodInfo",
155
-  data() {
156
-    return {
157
-      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
158
-      total: 0,
159
-      pageTotal: 0,
160
-      pageSelect: 0,
161
-      page: 1,
162
-      limit: 10,
163
-      keywords: "",
164
-      goodInfo: {
165
-        loading: false,
166
-        goodInfoData: [],
167
-        good_code: "",
168
-        editGoodId: "",
169
-        editGoodIndex: "",
170
-        goodInfoDialog: {
171
-          goodInfoTitle: "新增商品信息",
172
-          isCreated: 1, //1.创建 2.编辑 3.查看详情
173
-          formValue: {
174
-            good_id: "",
175
-            specification_name: "",
176
-            buy_price: "",
177
-            sell_price: "",
178
-            remark: "",
179
-            manufacturer: "",
180
-            good_type_id: "",
181
-            dealer: "",
182
-            expiry_date_warn_day_count: "",
183
-            stock_warn_count: "",
184
-            is_reuse: "2",
185
-            dealers: [],
186
-            manufacturers: [],
187
-            goodType: [],
188
-            goodUnit: []
189
-          },
152
+  export default {
153
+    components: {
154
+      GoodInfoDailog
155
+    },
156
+    name: 'goodInfo',
157
+    data() {
158
+      return {
159
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
160
+        total: 0,
161
+        pageTotal: 0,
162
+        pageSelect: 0,
163
+        page: 1,
164
+        limit: 10,
165
+        keywords: '',
166
+        goodInfo: {
167
+          loading: false,
168
+          goodInfoData: [],
169
+          good_code: '',
170
+          editGoodId: '',
171
+          editGoodIndex: '',
172
+          goodInfoDialog: {
173
+            goodInfoTitle: '新增商品信息',
174
+            isCreated: 1, //1.创建 2.编辑 3.查看详情
175
+            formValue: {
176
+              good_id: '',
177
+              specification_name: '',
178
+              buy_price: '',
179
+              sell_price: '',
180
+              remark: '',
181
+              manufacturer: '',
182
+              good_type_id: '',
183
+              dealer: '',
184
+              expiry_date_warn_day_count: '',
185
+              stock_warn_count: '',
186
+              is_reuse: '2',
187
+              dealers: [],
188
+              manufacturers: [],
189
+              goodType: [],
190
+              goodUnit: []
191
+            },
190 192
 
191
-          isVisibility: false
193
+            isVisibility: false
194
+          }
192 195
         }
193 196
       }
194
-    };
195
-  },
196
-  methods: {
197
-    search: function() {
198
-      this.getList();
199 197
     },
200
-    handleGoodInfoEdit: function(index, row) {
201
-      this.getAllDealer();
202
-      this.getAllManufacturer();
203
-      this.getAllGoodType();
204
-      this.goodInfo.editGoodId = row.id;
205
-      this.goodInfo.editGoodIndex = index;
206
-
207
-      let params = {
208
-        id: row.id
209
-      };
210
-      GetGoodInfo(params).then(response => {
211
-        if (response.data.state == 0) {
212
-          this.$message.error(response.data.msg);
213
-          return false;
214
-        } else {
215
-          console.log(response.data.data.goodInfo);
216
-
217
-          if (response.data.data.goodInfo.good_unit <= 0) {
218
-            this.goodInfo.goodInfoDialog.formValue.good_unit = "";
219
-          } else {
220
-            this.goodInfo.goodInfoDialog.formValue.good_unit =
221
-              response.data.data.goodInfo.good_unit;
222
-          }
198
+    methods: {
199
+      search: function() {
200
+        this.getList()
201
+      },
202
+      handleGoodInfoEdit: function(index, row) {
203
+        this.getAllDealer()
204
+        this.getAllManufacturer()
205
+        this.getAllGoodType()
206
+        this.goodInfo.editGoodId = row.id
207
+        this.goodInfo.editGoodIndex = index
223 208
 
224
-          if (response.data.data.goodInfo.manufacturer <= 0) {
225
-            this.goodInfo.goodInfoDialog.formValue.manufacturer = "";
209
+        let params = {
210
+          id: row.id
211
+        }
212
+        GetGoodInfo(params).then(response => {
213
+          if (response.data.state == 0) {
214
+            this.$message.error(response.data.msg)
215
+            return false
226 216
           } else {
227
-            this.goodInfo.goodInfoDialog.formValue.manufacturer =
228
-              response.data.data.goodInfo.manufacturer;
229
-          }
217
+            console.log(response.data.data.goodInfo)
230 218
 
231
-          if (response.data.data.goodInfo.dealer <= 0) {
232
-            this.goodInfo.goodInfoDialog.formValue.dealer = "";
233
-          } else {
234
-            this.goodInfo.goodInfoDialog.formValue.dealer =
235
-              response.data.data.goodInfo.dealer;
236
-          }
219
+            if (response.data.data.goodInfo.good_unit <= 0) {
220
+              this.goodInfo.goodInfoDialog.formValue.good_unit = ''
221
+            } else {
222
+              this.goodInfo.goodInfoDialog.formValue.good_unit =
223
+                response.data.data.goodInfo.good_unit
224
+            }
237 225
 
238
-          this.goodInfo.goodInfoDialog.formValue.specification_name =
239
-            response.data.data.goodInfo.specification_name;
240
-          this.goodInfo.goodInfoDialog.formValue.buy_price =
241
-            response.data.data.goodInfo.buy_price;
242
-          this.goodInfo.goodInfoDialog.formValue.sell_price =
243
-            response.data.data.goodInfo.sell_price;
244
-          this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count =
245
-            response.data.data.goodInfo.expiry_date_warn_day_count;
246
-          this.goodInfo.goodInfoDialog.formValue.stock_warn_count =
247
-            response.data.data.goodInfo.stock_warn_count;
248
-          this.goodInfo.goodInfoDialog.formValue.is_reuse = response.data.data.goodInfo.is_reuse.toString();
249
-          this.goodInfo.goodInfoDialog.formValue.remark =
250
-            response.data.data.goodInfo.remark;
251
-          this.goodInfo.goodInfoDialog.isCreated = 2;
252
-          this.goodInfo.good_code = response.data.data.goodInfo.good_code;
253
-          this.goodInfo.goodInfoDialog.formValue.good_id =
254
-            response.data.data.goodInfo.good_type_id;
255
-          this.$refs.dialog.show();
256
-        }
257
-      });
258
-    },
259
-    handleGoodInfoDelete: function(index, row) {
260
-      this.$confirm("确认删除这条商品信息?", "删除商品信息", {
261
-        confirmButtonText: "确定",
262
-        cancelButtonText: "取消",
263
-        type: "warning"
264
-      })
265
-        .then(() => {
266
-          let params = {
267
-            id: row.id
268
-          };
226
+            if (response.data.data.goodInfo.manufacturer <= 0) {
227
+              this.goodInfo.goodInfoDialog.formValue.manufacturer = ''
228
+            } else {
229
+              this.goodInfo.goodInfoDialog.formValue.manufacturer =
230
+                response.data.data.goodInfo.manufacturer
231
+            }
269 232
 
270
-          deleteGoodInfo(params).then(response => {
271
-            if (response.data.state == 0) {
272
-              this.$message.error(response.data.msg);
273
-              return false;
233
+            if (response.data.data.goodInfo.dealer <= 0) {
234
+              this.goodInfo.goodInfoDialog.formValue.dealer = ''
274 235
             } else {
275
-              this.goodInfo.goodInfoData.splice(index, 1);
276
-              this.$message.success("删除成功");
236
+              this.goodInfo.goodInfoDialog.formValue.dealer =
237
+                response.data.data.goodInfo.dealer
277 238
             }
278
-          });
239
+
240
+            this.goodInfo.goodInfoDialog.formValue.specification_name =
241
+              response.data.data.goodInfo.specification_name
242
+            this.goodInfo.goodInfoDialog.formValue.buy_price =
243
+              response.data.data.goodInfo.buy_price
244
+            this.goodInfo.goodInfoDialog.formValue.sell_price =
245
+              response.data.data.goodInfo.sell_price
246
+            this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count =
247
+              response.data.data.goodInfo.expiry_date_warn_day_count
248
+            this.goodInfo.goodInfoDialog.formValue.stock_warn_count =
249
+              response.data.data.goodInfo.stock_warn_count
250
+            this.goodInfo.goodInfoDialog.formValue.is_reuse = response.data.data.goodInfo.is_reuse.toString()
251
+            this.goodInfo.goodInfoDialog.formValue.remark =
252
+              response.data.data.goodInfo.remark
253
+            this.goodInfo.goodInfoDialog.isCreated = 2
254
+            this.goodInfo.good_code = response.data.data.goodInfo.good_code
255
+            this.goodInfo.goodInfoDialog.formValue.good_id =
256
+              response.data.data.goodInfo.good_type_id
257
+            this.$refs.dialog.show()
258
+          }
279 259
         })
280
-        .catch(() => {});
281
-    },
282
-    showGoodInfoDetails: function(index, row) {
283
-      let params = {
284
-        id: row.id
285
-      };
286
-      GetGoodInfo(params).then(response => {
287
-        if (response.data.state == 0) {
288
-          this.$message.error(response.data.msg);
289
-          return false;
290
-        } else {
291
-          this.goodInfo.goodInfoDialog.formValue.specification_name =
292
-            response.data.data.goodInfo.specification_name;
293
-          this.goodInfo.goodInfoDialog.formValue.good_unit =
294
-            response.data.data.goodInfo.good_unit;
295
-          this.goodInfo.goodInfoDialog.formValue.buy_price =
296
-            response.data.data.goodInfo.buy_price;
297
-          this.goodInfo.goodInfoDialog.formValue.sell_price =
298
-            response.data.data.goodInfo.sell_price;
299
-          this.goodInfo.goodInfoDialog.formValue.manufacturer =
300
-            response.data.data.goodInfo.manufacturer;
301
-          this.goodInfo.goodInfoDialog.formValue.dealer =
302
-            response.data.data.goodInfo.dealer;
303
-          this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count =
304
-            response.data.data.goodInfo.expiry_date_warn_day_count;
305
-          this.goodInfo.goodInfoDialog.formValue.stock_warn_count =
306
-            response.data.data.goodInfo.stock_warn_count;
307
-          this.goodInfo.goodInfoDialog.formValue.is_reuse = response.data.data.goodInfo.is_reuse.toString();
260
+      },
261
+      handleGoodInfoDelete: function(index, row) {
262
+        this.$confirm('确认删除这条商品信息?', '删除商品信息', {
263
+          confirmButtonText: '确定',
264
+          cancelButtonText: '取消',
265
+          type: 'warning'
266
+        })
267
+          .then(() => {
268
+            let params = {
269
+              id: row.id
270
+            }
308 271
 
309
-          this.goodInfo.goodInfoDialog.formValue.remark =
310
-            response.data.data.goodInfo.remark;
311
-          this.goodInfo.goodInfoDialog.isCreated = 3;
312
-          this.goodInfo.goodInfoDialog.isVisibility = true;
272
+            deleteGoodInfo(params).then(response => {
273
+              if (response.data.state == 0) {
274
+                this.$message.error(response.data.msg)
275
+                return false
276
+              } else {
277
+                this.goodInfo.goodInfoData.splice(index, 1)
278
+                this.$message.success('删除成功')
279
+              }
280
+            })
281
+          })
282
+          .catch(() => {
283
+          })
284
+      },
285
+      showGoodInfoDetails: function(index, row) {
286
+        let params = {
287
+          id: row.id
313 288
         }
314
-      });
315
-    },
316
-    getList() {
317
-      this.goodInfo.loading = true;
318
-      let params = {
319
-        page: this.page,
320
-        limit: this.limit,
321
-        keyword: this.keywords
322
-      };
323
-      getGoodInfoList(params).then(response => {
324
-        if (response.data.state == 0) {
325
-          this.goodInfo.loading = false;
326
-          this.$message.error(response.data.msg);
327
-          return false;
328
-        } else {
329
-          this.goodInfo.loading = false;
330
-          this.total = response.data.data.total;
331
-          this.goodInfo.goodInfoData = [];
332
-          for (let i = 0; i < response.data.data.list.length; i++) {
333
-            this.goodInfo.goodInfoData.push(response.data.data.list[i]);
289
+        GetGoodInfo(params).then(response => {
290
+          if (response.data.state == 0) {
291
+            this.$message.error(response.data.msg)
292
+            return false
293
+          } else {
294
+            this.goodInfo.goodInfoDialog.formValue.specification_name =
295
+              response.data.data.goodInfo.specification_name
296
+            this.goodInfo.goodInfoDialog.formValue.good_unit =
297
+              response.data.data.goodInfo.good_unit
298
+            this.goodInfo.goodInfoDialog.formValue.buy_price =
299
+              response.data.data.goodInfo.buy_price
300
+            this.goodInfo.goodInfoDialog.formValue.sell_price =
301
+              response.data.data.goodInfo.sell_price
302
+            this.goodInfo.goodInfoDialog.formValue.manufacturer =
303
+              response.data.data.goodInfo.manufacturer
304
+            this.goodInfo.goodInfoDialog.formValue.dealer =
305
+              response.data.data.goodInfo.dealer
306
+            this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count =
307
+              response.data.data.goodInfo.expiry_date_warn_day_count
308
+            this.goodInfo.goodInfoDialog.formValue.stock_warn_count =
309
+              response.data.data.goodInfo.stock_warn_count
310
+            this.goodInfo.goodInfoDialog.formValue.is_reuse = response.data.data.goodInfo.is_reuse.toString()
311
+
312
+            this.goodInfo.goodInfoDialog.formValue.remark =
313
+              response.data.data.goodInfo.remark
314
+            this.goodInfo.goodInfoDialog.isCreated = 3
315
+            this.goodInfo.goodInfoDialog.isVisibility = true
334 316
           }
317
+        })
318
+      },
319
+      getList() {
320
+        this.goodInfo.loading = true
321
+        let params = {
322
+          page: this.page,
323
+          limit: this.limit,
324
+          keyword: this.keywords
335 325
         }
336
-      });
337
-    },
338
-    tableRowClassName({ row, rowIndex }) {
339
-      //把每一行的索引放进row
340
-      row.index = rowIndex;
341
-    },
342
-    onRowClick(row, event, column) {
343
-      this.goodInfo.goodInfoData = [];
344
-      this.goodType.tableCurrentIndex = row.index;
345
-      this.goodInfo.goodInfoDialog.formValue.good_id = row.id;
346
-      let params = {
347
-        id: row.id
348
-      };
349
-      this.goodInfo.loading = true;
350
-      GetGoodInfoByGoodId(params).then(response => {
351
-        if (response.data.state == 0) {
352
-          this.goodInfo.loading = false;
353
-          this.$message.error(response.data.msg);
354
-          return false;
355
-        } else {
356
-          this.goodInfo.loading = false;
357
-          for (let i = 0; i < response.data.data.list.length; i++) {
358
-            this.goodInfo.goodInfoData.push(response.data.data.list[i]);
326
+        getGoodInfoList(params).then(response => {
327
+          if (response.data.state == 0) {
328
+            this.goodInfo.loading = false
329
+            this.$message.error(response.data.msg)
330
+            return false
331
+          } else {
332
+            this.goodInfo.loading = false
333
+            this.total = response.data.data.total
334
+            this.goodInfo.goodInfoData = []
335
+            for (let i = 0; i < response.data.data.list.length; i++) {
336
+              this.goodInfo.goodInfoData.push(response.data.data.list[i])
337
+            }
359 338
           }
339
+        })
340
+      },
341
+      tableRowClassName({ row, rowIndex }) {
342
+        //把每一行的索引放进row
343
+        row.index = rowIndex
344
+      },
345
+      onRowClick(row, event, column) {
346
+        this.goodInfo.goodInfoData = []
347
+        this.goodType.tableCurrentIndex = row.index
348
+        this.goodInfo.goodInfoDialog.formValue.good_id = row.id
349
+        let params = {
350
+          id: row.id
360 351
         }
361
-      });
362
-    },
363
-    goodInfoDialogComfirm: function(val) {
364
-      if (val.isCreated == 2) {
365
-        //修改
366
-        val["id"] = this.goodInfo.editGoodId;
367
-        val["good_code"] = this.goodInfo.good_code;
368
-
369
-        modifyGoodInfo(val).then(response => {
352
+        this.goodInfo.loading = true
353
+        GetGoodInfoByGoodId(params).then(response => {
370 354
           if (response.data.state == 0) {
371
-            this.$message.error(response.data.msg);
372
-            return false;
355
+            this.goodInfo.loading = false
356
+            this.$message.error(response.data.msg)
357
+            return false
373 358
           } else {
374
-            this.$refs.dialog.hide();
359
+            this.goodInfo.loading = false
360
+            for (let i = 0; i < response.data.data.list.length; i++) {
361
+              this.goodInfo.goodInfoData.push(response.data.data.list[i])
362
+            }
363
+          }
364
+        })
365
+      },
366
+      goodInfoDialogComfirm: function(val) {
367
+        if (val.isCreated == 2) {
368
+          //修改
369
+          val['id'] = this.goodInfo.editGoodId
370
+          val['good_code'] = this.goodInfo.good_code
375 371
 
376
-            this.goodInfo.goodInfoData[
377
-              this.goodInfo.editGoodIndex
378
-            ].specification_name =
379
-              response.data.data.goodInfo.specification_name;
380
-            this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].good_unit =
381
-              response.data.data.goodInfo.good_unit;
382
-            this.goodInfo.goodInfoData[
383
-              this.goodInfo.editGoodIndex
384
-            ].buy_price = response.data.data.goodInfo.buy_price.toString();
385
-            this.goodInfo.goodInfoData[
386
-              this.goodInfo.editGoodIndex
387
-            ].sell_price = response.data.data.goodInfo.sell_price.toString();
388
-            this.goodInfo.goodInfoData[
389
-              this.goodInfo.editGoodIndex
390
-            ].expiry_date_warn_day_count = response.data.data.goodInfo.expiry_date_warn_day_count.toString();
391
-            this.goodInfo.goodInfoData[
392
-              this.goodInfo.editGoodIndex
393
-            ].stock_warn_count = response.data.data.goodInfo.stock_warn_count.toString();
372
+          modifyGoodInfo(val).then(response => {
373
+            if (response.data.state == 0) {
374
+              this.$message.error(response.data.msg)
375
+              return false
376
+            } else {
377
+              this.$refs.dialog.hide()
394 378
 
395
-            this.$message.success("修改成功");
396
-          }
397
-        });
398
-      } else if (val.isCreated == 1) {
399
-        //新增
400
-        createGoodInfo(val).then(response => {
401
-          if (response.data.state == 0) {
402
-            this.$message.error(response.data.msg);
403
-            return false;
404
-          } else {
405
-            this.$refs.dialog.hide();
379
+              this.goodInfo.goodInfoData[
380
+                this.goodInfo.editGoodIndex
381
+                ].specification_name =
382
+                response.data.data.goodInfo.specification_name
383
+              this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].good_unit =
384
+                response.data.data.goodInfo.good_unit
385
+              this.goodInfo.goodInfoData[
386
+                this.goodInfo.editGoodIndex
387
+                ].buy_price = response.data.data.goodInfo.buy_price.toString()
388
+              this.goodInfo.goodInfoData[
389
+                this.goodInfo.editGoodIndex
390
+                ].sell_price = response.data.data.goodInfo.sell_price.toString()
391
+              this.goodInfo.goodInfoData[
392
+                this.goodInfo.editGoodIndex
393
+                ].expiry_date_warn_day_count = response.data.data.goodInfo.expiry_date_warn_day_count.toString()
394
+              this.goodInfo.goodInfoData[
395
+                this.goodInfo.editGoodIndex
396
+                ].stock_warn_count = response.data.data.goodInfo.stock_warn_count.toString()
406 397
 
407
-            this.goodInfo.goodInfoData.unshift(response.data.data.goodInfo);
398
+              this.$message.success('修改成功')
399
+            }
400
+          })
401
+        } else if (val.isCreated == 1) {
402
+          //新增
403
+          createGoodInfo(val).then(response => {
404
+            if (response.data.state == 0) {
405
+              this.$message.error(response.data.msg)
406
+              return false
407
+            } else {
408
+              this.$refs.dialog.hide()
408 409
 
409
-            this.$message.success("新增成功");
410
-          }
411
-        });
412
-      }
413
-    },
414
-    goodInfoDialogCancle: function() {
415
-      this.$refs.dialog.hide();
416
-    },
417
-    showInfoDialog: function() {
418
-      this.$refs.dialog.show();
419
-      this.getAllDealer();
420
-      this.getAllManufacturer();
421
-      this.goodInfo.goodInfoDialog.formValue.goodType = [];
422
-      GetAllGoodType().then(response => {
423
-        if (response.data.state == 0) {
424
-          this.$message.error(response.data.msg);
425
-          return false;
426
-        } else {
427
-          for (let i = 0; i < response.data.data.goodType.length; i++) {
428
-            this.goodInfo.goodInfoDialog.formValue.goodType.push(
429
-              response.data.data.goodType[i]
430
-            );
431
-          }
432
-          if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
433
-            this.$message.error("请先新增商品类型");
434
-            return;
410
+              this.goodInfo.goodInfoData.unshift(response.data.data.goodInfo)
411
+
412
+              this.$message.success('新增成功')
413
+            }
414
+          })
415
+        }
416
+      },
417
+      goodInfoDialogCancle: function() {
418
+        this.$refs.dialog.hide()
419
+      },
420
+      showInfoDialog: function() {
421
+        this.$refs.dialog.show()
422
+        this.getAllDealer()
423
+        this.getAllManufacturer()
424
+        this.goodInfo.goodInfoDialog.formValue.goodType = []
425
+        GetAllGoodType().then(response => {
426
+          if (response.data.state == 0) {
427
+            this.$message.error(response.data.msg)
428
+            return false
435 429
           } else {
436
-            this.goodInfo.goodInfoDialog.isVisibility = true;
437
-            this.goodInfo.goodInfoDialog.isCreated = 1;
430
+            for (let i = 0; i < response.data.data.goodType.length; i++) {
431
+              if (response.data.data.goodType[i].type == 1) {
432
+                response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
433
+              }
434
+              this.goodInfo.goodInfoDialog.formValue.goodType.push(
435
+                response.data.data.goodType[i]
436
+              )
437
+            }
438
+            if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
439
+              this.$message.error('请先新增商品类型')
440
+              return
441
+            } else {
442
+              this.goodInfo.goodInfoDialog.isVisibility = true
443
+              this.goodInfo.goodInfoDialog.isCreated = 1
444
+            }
438 445
           }
439
-        }
440
-      });
441
-      this.goodInfo.goodInfoDialog.formValue.good_id = "";
442
-      this.goodInfo.goodInfoDialog.formValue.specification_name = "";
443
-      this.goodInfo.goodInfoDialog.formValue.buy_price = "";
444
-      this.goodInfo.goodInfoDialog.formValue.sell_price = "";
445
-      this.goodInfo.goodInfoDialog.formValue.remark = "";
446
-      this.goodInfo.goodInfoDialog.formValue.manufacturer = "";
447
-      this.goodInfo.goodInfoDialog.formValue.good_type_id = "";
448
-      this.goodInfo.goodInfoDialog.formValue.dealer = "";
449
-      this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count = "";
450
-      this.goodInfo.goodInfoDialog.formValue.stock_warn_count = "";
451
-      this.goodInfo.goodInfoDialog.formValue.is_reuse = "2";
452
-    },
453
-    getAllDealer: function() {
454
-      this.goodInfo.goodInfoDialog.formValue.dealers = [];
455
-      GetAllDeals().then(response => {
456
-        if (response.data.state == 0) {
457
-          this.$message.error(response.data.msg);
458
-          return false;
459
-        } else {
460
-          for (let i = 0; i < response.data.data.dealer.length; i++) {
461
-            this.goodInfo.goodInfoDialog.formValue.dealers.push(
462
-              response.data.data.dealer[i]
463
-            );
446
+        })
447
+        this.goodInfo.goodInfoDialog.formValue.good_id = ''
448
+        this.goodInfo.goodInfoDialog.formValue.specification_name = ''
449
+        this.goodInfo.goodInfoDialog.formValue.buy_price = ''
450
+        this.goodInfo.goodInfoDialog.formValue.sell_price = ''
451
+        this.goodInfo.goodInfoDialog.formValue.remark = ''
452
+        this.goodInfo.goodInfoDialog.formValue.manufacturer = ''
453
+        this.goodInfo.goodInfoDialog.formValue.good_type_id = ''
454
+        this.goodInfo.goodInfoDialog.formValue.dealer = ''
455
+        this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count = ''
456
+        this.goodInfo.goodInfoDialog.formValue.stock_warn_count = ''
457
+        this.goodInfo.goodInfoDialog.formValue.is_reuse = '2'
458
+      },
459
+      getAllDealer: function() {
460
+        this.goodInfo.goodInfoDialog.formValue.dealers = []
461
+        GetAllDeals().then(response => {
462
+          if (response.data.state == 0) {
463
+            this.$message.error(response.data.msg)
464
+            return false
465
+          } else {
466
+            for (let i = 0; i < response.data.data.dealer.length; i++) {
467
+              this.goodInfo.goodInfoDialog.formValue.dealers.push(
468
+                response.data.data.dealer[i]
469
+              )
470
+            }
464 471
           }
465
-        }
466
-      });
467
-    },
468
-    getAllManufacturer: function() {
469
-      this.goodInfo.goodInfoDialog.formValue.manufacturers = [];
470
-      GetAllManufacturer().then(response => {
471
-        if (response.data.state == 0) {
472
-          this.$message.error(response.data.msg);
473
-          return false;
474
-        } else {
475
-          for (let i = 0; i < response.data.data.manufacturer.length; i++) {
476
-            this.goodInfo.goodInfoDialog.formValue.manufacturers.push(
477
-              response.data.data.manufacturer[i]
478
-            );
472
+        })
473
+      },
474
+      getAllManufacturer: function() {
475
+        this.goodInfo.goodInfoDialog.formValue.manufacturers = []
476
+        GetAllManufacturer().then(response => {
477
+          if (response.data.state == 0) {
478
+            this.$message.error(response.data.msg)
479
+            return false
480
+          } else {
481
+            for (let i = 0; i < response.data.data.manufacturer.length; i++) {
482
+              this.goodInfo.goodInfoDialog.formValue.manufacturers.push(
483
+                response.data.data.manufacturer[i]
484
+              )
485
+            }
479 486
           }
480
-        }
481
-      });
482
-    },
483
-    getAllGoodType: function() {
484
-      this.goodInfo.goodInfoDialog.formValue.goodType = [];
485
-      GetAllGoodType().then(response => {
486
-        if (response.data.state == 0) {
487
-          this.$message.error(response.data.msg);
488
-          return false;
489
-        } else {
490
-          for (let i = 0; i < response.data.data.goodType.length; i++) {
491
-            this.goodInfo.goodInfoDialog.formValue.goodType.push(
492
-              response.data.data.goodType[i]
493
-            );
487
+        })
488
+      },
489
+      getAllGoodType: function() {
490
+        this.goodInfo.goodInfoDialog.formValue.goodType = []
491
+        GetAllGoodType().then(response => {
492
+          if (response.data.state == 0) {
493
+            this.$message.error(response.data.msg)
494
+            return false
495
+          } else {
496
+            for (let i = 0; i < response.data.data.goodType.length; i++) {
497
+              if (response.data.data.goodType[i].type == 1) {
498
+                response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
499
+              }
500
+              this.goodInfo.goodInfoDialog.formValue.goodType.push(
501
+                response.data.data.goodType[i]
502
+              )
503
+              console.log(this.goodInfo.goodInfoDialog.formValue.goodType)
504
+            }
494 505
           }
495
-        }
496
-      });
497
-    },
498
-    handleSizeChange(val) {
499
-      this.limit = val;
500
-      this.getList();
506
+        })
507
+      },
508
+      handleSizeChange(val) {
509
+        this.limit = val
510
+        this.getList()
511
+      },
512
+      handleCurrentChange(val) {
513
+        this.page = val
514
+        this.getList()
515
+      }
501 516
     },
502
-    handleCurrentChange(val) {
503
-      this.page = val;
504
-      this.getList();
517
+    created() {
518
+      this.getList()
519
+      // this.getAllDealer()
520
+      // this.getAllManufacturer()
521
+      // this.getAllGoodType()
522
+      this.goodInfo.goodInfoDialog.formValue.goodUnit = this.$store.getters.good_unit
505 523
     }
506
-  },
507
-  created() {
508
-    this.getList();
509
-    // this.getAllDealer()
510
-    // this.getAllManufacturer()
511
-    // this.getAllGoodType()
512
-    this.goodInfo.goodInfoDialog.formValue.goodUnit = this.$store.getters.good_unit;
513 524
   }
514
-};
515 525
 </script>
516 526
 
517 527
 <style rel="stylesheet/css" lang="scss" scoped>
518
-.information {
519
-  border: 1px #dcdfe6 solid;
520
-  padding: 30px 20px 30px 20px;
528
+  .information {
529
+    border: 1px #dcdfe6 solid;
530
+    padding: 30px 20px 30px 20px;
521 531
 
522 532
   .border {
523 533
     border-bottom: 1px #dcdfe6 solid;
524 534
     margin: 0px 0 20px 0;
525 535
   }
526
-}
527 536
 
528
-.title {
529
-  height: 44px;
530
-  line-height: 44px;
531
-  padding: 0 0 0 10px;
532
-  margin: 0 0 10px 0;
533
-}
537
+  }
538
+
539
+  .title {
540
+    height: 44px;
541
+    line-height: 44px;
542
+    padding: 0 0 0 10px;
543
+    margin: 0 0 10px 0;
544
+  }
534 545
 
535
-.edit_separater {
536
-  border-top: 1px solid rgb(233, 233, 233);
537
-  margin-top: 15px;
538
-  margin-bottom: 15px;
539
-}
546
+  .edit_separater {
547
+    border-top: 1px solid rgb(233, 233, 233);
548
+    margin-top: 15px;
549
+    margin-bottom: 15px;
550
+  }
540 551
 </style>
541 552
 
542 553
 <style>
543
-.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
544
-  font-size: 12px;
545
-}
554
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
555
+    font-size: 12px;
556
+  }
557
+
558
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
559
+    background: #6fb5fa;
560
+  }
546 561
 
547
-.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
548
-  background: #6fb5fa;
549
-}
550
-.el-table td,
551
-.el-table th.is-leaf,
552
-.el-table--border,
553
-.el-table--group {
554
-  border-color: #d0d3da;
555
-}
556
-.el-table--border::after,
557
-.el-table--group::after,
558
-.el-table::before {
559
-  background-color: #d0d3da;
560
-}
562
+  .el-table td,
563
+  .el-table th.is-leaf,
564
+  .el-table--border,
565
+  .el-table--group {
566
+    border-color: #d0d3da;
567
+  }
568
+
569
+  .el-table--border::after,
570
+  .el-table--group::after,
571
+  .el-table::before {
572
+    background-color: #d0d3da;
573
+  }
561 574
 </style>

+ 49 - 2
src/xt_pages/user/dialysisSolution.vue Ver fichero

@@ -381,8 +381,7 @@
381 381
           <el-col :span="8" v-if="isShows('透析器/灌流器')">
382 382
             <el-form-item label="透析器/灌流器:">
383 383
               <el-input
384
-                v-model="addPlan.dialyzer_perfusion_apparatus"
385
-              ></el-input>
384
+              v-model="addPlan.dialyzer_perfusion_apparatus" @focus="showInnerDialog('5')"></el-input>
386 385
             </el-form-item>
387 386
           </el-col>
388 387
 
@@ -572,6 +571,14 @@
572 571
         >
573 572
       </span>
574 573
     </el-dialog>
574
+
575
+    <multi-select-box
576
+      :propsForm="InnerDialogProps"
577
+      v-on:dialog-comfirm="innerDialogComfirm"
578
+      v-on:dialog-cancle="innerDialogCancle">
579
+    </multi-select-box>
580
+
581
+
575 582
   </div>
576 583
 </template>
577 584
 
@@ -595,6 +602,7 @@ import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
595 602
 import store from '@/store'
596 603
 
597 604
 import { GetDeviceInfo } from '@/api/dialysis'
605
+import MultiSelectBox from '../dialysis/details/dialog/MultiSelectBox/index'
598 606
 
599 607
 const periodWeek = [
600 608
   { value: '每周', label: '每周' },
@@ -639,6 +647,14 @@ export default {
639 647
       callback()
640 648
     }
641 649
     return {
650
+      InnerDialogProps: {
651
+        values: [],
652
+        visibility: false,
653
+        isShowTextArea: true,
654
+        customContent: '',
655
+        titles: '',
656
+        type: '' // 不同弹框类型,用来匹配数据
657
+      },
642 658
       deviceList: [],
643 659
       dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
644 660
       isEdit: false,
@@ -800,6 +816,7 @@ export default {
800 816
       blood_filters: null,
801 817
       perfusion_apparatus: null,
802 818
       hemodialysis_machines: null,
819
+      dialyzerPerfusionApparatus: [],
803 820
       solution_detail: {
804 821
         id: 0,
805 822
         affirm_state: 0,
@@ -857,10 +874,35 @@ export default {
857 874
     }
858 875
   },
859 876
   components: {
877
+    MultiSelectBox,
860 878
     tableTitle,
861 879
     PatientSidebar
862 880
   },
863 881
   methods: {
882
+    showInnerDialog: function(val) {
883
+      this.InnerDialogProps.visibility = true
884
+      switch (val) {
885
+        case '5': // 透析器/灌流器
886
+          this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
887
+          this.InnerDialogProps.titles = '透析器/灌流器'
888
+          this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
889
+          this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
890
+          this.InnerDialogProps.isShowTextArea = false
891
+          break
892
+      }
893
+    },
894
+    innerDialogComfirm: function(val) {
895
+      this.InnerDialogProps.visibility = false
896
+      switch (val.type) {
897
+        case 'dialyzer_perfusion_apparatus':
898
+          this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
899
+          break
900
+
901
+      }
902
+    },
903
+    innerDialogCancle: function() {
904
+      this.InnerDialogProps.visibility = false
905
+    },
864 906
     changeBodyFluid: function() {},
865 907
     GetDeviceData: function() {
866 908
       const params = {}
@@ -1656,6 +1698,11 @@ export default {
1656 1698
     this.blood_access_option = this.$store.getters.blood_access
1657 1699
     this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
1658 1700
 
1701
+    this.dialyzerPerfusionApparatus = getDataConfig(
1702
+      'hemodialysis',
1703
+      'dialyzer_perfusion_apparatus'
1704
+    )
1705
+
1659 1706
     this.queryParams.id = this.patientID
1660 1707
     // this.fetchAllDoctorAndNurse();
1661 1708
     this.fetchAllAdminUsers()

+ 129 - 14
src/xt_pages/workforce/schedule_print.vue Ver fichero

@@ -58,14 +58,12 @@
58 58
                 <td :width="td_4_width" valign="top">
59 59
                   <div class="proj" v-if="Object.keys(main_collection.hdf).length > 0">
60 60
                     <div class="proj_title">血滤:</div>
61
-                    <div class="proj_item">
62
-                      {{ patient_names(main_collection.hdf) }}
61
+                    <div class="proj_item" v-html="patient_other_names(main_collection.hdf)">
63 62
                     </div>
64 63
                   </div>
65 64
                   <div class="proj" v-if="Object.keys(main_collection.hd_hp).length > 0">
66 65
                     <div class="proj_title">灌流:</div>
67
-                    <div class="proj_item">
68
-                      {{ patient_names(main_collection.hd_hp) }}
66
+                    <div class="proj_item" v-html="patient_other_names(main_collection.hd_hp)">>
69 67
                     </div>
70 68
                   </div>
71 69
                 </td>
@@ -111,7 +109,19 @@
111 109
               evening: { /* zone_name: [ schedule, ... ] */ }
112 110
             },
113 111
             hdf: [ /* schedule, ... */],
114
-            hd_hp: [ /* schedule, ... */]
112
+            hd_hp: [ /* schedule, ... */],
113
+
114
+            new_hdf:{
115
+              am: { /* zone_name: [ schedule, ... ] */ },
116
+              pm: { /* zone_name: [ schedule, ... ] */ },
117
+              evening: { /* zone_name: [ schedule, ... ] */ }
118
+            },
119
+            new_hd_hp:{
120
+              am: { /* zone_name: [ schedule, ... ] */ },
121
+              pm: { /* zone_name: [ schedule, ... ] */ },
122
+              evening: { /* zone_name: [ schedule, ... ] */ }
123
+            }
124
+
115 125
           },
116 126
           {
117 127
             day: 2,
@@ -122,7 +132,17 @@
122 132
               evening: { /* zone_name: [ schedule, ... ] */ }
123 133
             },
124 134
             hdf: [ /* schedule, ... */],
125
-            hd_hp: [ /* schedule, ... */]
135
+            hd_hp: [ /* schedule, ... */],
136
+            new_hdf:{
137
+              am: { /* zone_name: [ schedule, ... ] */ },
138
+              pm: { /* zone_name: [ schedule, ... ] */ },
139
+              evening: { /* zone_name: [ schedule, ... ] */ }
140
+            },
141
+            new_hd_hp:{
142
+              am: { /* zone_name: [ schedule, ... ] */ },
143
+              pm: { /* zone_name: [ schedule, ... ] */ },
144
+              evening: { /* zone_name: [ schedule, ... ] */ }
145
+            }
126 146
           },
127 147
           {
128 148
             day: 3,
@@ -133,7 +153,17 @@
133 153
               evening: { /* zone_name: [ schedule, ... ] */ }
134 154
             },
135 155
             hdf: [ /* schedule, ... */],
136
-            hd_hp: [ /* schedule, ... */]
156
+            hd_hp: [ /* schedule, ... */],
157
+            new_hdf:{
158
+              am: { /* zone_name: [ schedule, ... ] */ },
159
+              pm: { /* zone_name: [ schedule, ... ] */ },
160
+              evening: { /* zone_name: [ schedule, ... ] */ }
161
+            },
162
+            new_hd_hp:{
163
+              am: { /* zone_name: [ schedule, ... ] */ },
164
+              pm: { /* zone_name: [ schedule, ... ] */ },
165
+              evening: { /* zone_name: [ schedule, ... ] */ }
166
+            }
137 167
           },
138 168
           {
139 169
             day: 4,
@@ -144,7 +174,17 @@
144 174
               evening: { /* zone_name: [ schedule, ... ] */ }
145 175
             },
146 176
             hdf: [ /* schedule, ... */],
147
-            hd_hp: [ /* schedule, ... */]
177
+            hd_hp: [ /* schedule, ... */],
178
+            new_hdf:{
179
+              am: { /* zone_name: [ schedule, ... ] */ },
180
+              pm: { /* zone_name: [ schedule, ... ] */ },
181
+              evening: { /* zone_name: [ schedule, ... ] */ }
182
+            },
183
+            new_hd_hp:{
184
+              am: { /* zone_name: [ schedule, ... ] */ },
185
+              pm: { /* zone_name: [ schedule, ... ] */ },
186
+              evening: { /* zone_name: [ schedule, ... ] */ }
187
+            }
148 188
           },
149 189
           {
150 190
             day: 5,
@@ -155,7 +195,17 @@
155 195
               evening: { /* zone_name: [ schedule, ... ] */ }
156 196
             },
157 197
             hdf: [ /* schedule, ... */],
158
-            hd_hp: [ /* schedule, ... */]
198
+            hd_hp: [ /* schedule, ... */],
199
+            new_hdf:{
200
+              am: { /* zone_name: [ schedule, ... ] */ },
201
+              pm: { /* zone_name: [ schedule, ... ] */ },
202
+              evening: { /* zone_name: [ schedule, ... ] */ }
203
+            },
204
+            new_hd_hp:{
205
+              am: { /* zone_name: [ schedule, ... ] */ },
206
+              pm: { /* zone_name: [ schedule, ... ] */ },
207
+              evening: { /* zone_name: [ schedule, ... ] */ }
208
+            }
159 209
           },
160 210
           {
161 211
             day: 6,
@@ -166,7 +216,17 @@
166 216
               evening: { /* zone_name: [ schedule, ... ] */ }
167 217
             },
168 218
             hdf: [ /* schedule, ... */],
169
-            hd_hp: [ /* schedule, ... */]
219
+            hd_hp: [ /* schedule, ... */],
220
+            new_hdf:{
221
+              am: { /* zone_name: [ schedule, ... ] */ },
222
+              pm: { /* zone_name: [ schedule, ... ] */ },
223
+              evening: { /* zone_name: [ schedule, ... ] */ }
224
+            },
225
+            new_hd_hp:{
226
+              am: { /* zone_name: [ schedule, ... ] */ },
227
+              pm: { /* zone_name: [ schedule, ... ] */ },
228
+              evening: { /* zone_name: [ schedule, ... ] */ }
229
+            }
170 230
           },
171 231
           {
172 232
             day: 7,
@@ -177,7 +237,17 @@
177 237
               evening: { /* zone_name: [ schedule, ... ] */ }
178 238
             },
179 239
             hdf: [ /* schedule, ... */],
180
-            hd_hp: [ /* schedule, ... */]
240
+            hd_hp: [ /* schedule, ... */],
241
+            new_hdf:{
242
+              am: { /* zone_name: [ schedule, ... ] */ },
243
+              pm: { /* zone_name: [ schedule, ... ] */ },
244
+              evening: { /* zone_name: [ schedule, ... ] */ }
245
+            },
246
+            new_hd_hp:{
247
+              am: { /* zone_name: [ schedule, ... ] */ },
248
+              pm: { /* zone_name: [ schedule, ... ] */ },
249
+              evening: { /* zone_name: [ schedule, ... ] */ }
250
+            }
181 251
           }
182 252
         ]
183 253
       }
@@ -204,11 +274,9 @@
204 274
           }
205 275
 
206 276
           var schedules = resp.data.schedules
207
-          console.log(schedules)
208 277
 
209 278
           for (let index = 0; index < schedules.length; index++) {
210 279
             const schedule = schedules[index]
211
-            console.log(schedule)
212 280
             if (schedule.patient == null || schedule.zone == null) {
213 281
               continue
214 282
             }
@@ -219,6 +287,8 @@
219 287
             var main_collection = this.schedules[weekday - 1]
220 288
 
221 289
             var time_type_schedules
290
+            var other_time_type_schedules
291
+
222 292
             if (time_type == 1) {
223 293
               time_type_schedules = main_collection.all.am
224 294
             } else if (time_type == 2) {
@@ -235,12 +305,14 @@
235 305
 
236 306
             if (schedule.mode.id == 2) { // HDF
237 307
               main_collection.hdf.push(schedule)
308
+
309
+
238 310
             } else if (schedule.mode.id == 3) { // HD+HF
239 311
               main_collection.hd_hp.push(schedule)
240 312
             }
313
+
241 314
           }
242 315
 
243
-          console.log(this.schedules)
244 316
 
245 317
         } else {
246 318
           this.$message.error(resp.msg)
@@ -266,6 +338,49 @@
266 338
 
267 339
         return names.join('、')
268 340
       },
341
+      patient_other_names: function(schedules) {
342
+        let am = []
343
+        let pm = []
344
+        let evening = []
345
+
346
+        var names = []
347
+        for (let index = 0; index < schedules.length; index++) {
348
+          const schedule = schedules[index]
349
+          console.log(schedule)
350
+
351
+          names.push(schedule.patient.name)
352
+
353
+          if(schedule.schedule_type == 1){
354
+            am.push(schedule.patient.name)
355
+
356
+          }else if(schedule.schedule_type == 2){
357
+            pm.push(schedule.patient.name)
358
+
359
+
360
+          }else if(schedule.schedule_type == 3){
361
+            evening.push(schedule.patient.name)
362
+          }
363
+        }
364
+        const obj = {}
365
+        names = names.reduce((cur, next) => {
366
+          obj[next] ? '' : obj[next] = true && cur.push(next)
367
+          return cur
368
+        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
369
+        var str= ""
370
+
371
+        if(am.length > 0){
372
+          str = "上午:"+ am.join("、") +"<br/>"
373
+        }
374
+
375
+        if(pm.length > 0){
376
+          str = str + "下午:"+ pm.join("、")+"<br/>"
377
+        }
378
+
379
+        if(evening.length > 0){
380
+          str = str + "晚上:"+ evening.join("、")
381
+        }
382
+        return str
383
+      },
269 384
       printAction: function() {
270 385
         const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
271 386