Browse Source

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

XMLWAN 3 years ago
parent
commit
3a90f69b73

+ 18 - 8
src/xt_pages/data/components/addDrugs.vue View File

@@ -38,7 +38,7 @@
38 38
                               <el-input v-model="form.dose" type="number" style="width:100px;margin-right:5px;" placeholder="剂量" :disabled="dosageShow"></el-input>
39 39
                             </el-form-item>
40 40
                             <el-form-item prop="dose_unit" class="noMargin">
41
-                              <el-select v-model="form.dose_unit" style="width:160px;" placeholder="剂量单位" @change="changeMaxUnit">
41
+                              <el-select v-model="form.dose_unit" style="width:160px;" placeholder="剂量单位" @change="changeDoseUnit">
42 42
                                 <el-option
43 43
                                   v-for="(item,index) in getDataConfig('hemodialysis','units')"
44 44
                                   :key="index"
@@ -63,7 +63,7 @@
63 63
                             </el-form-item>
64 64
                           <span style="margin-bottom:20px;font-size:20px;padding:0 10px;">/</span>
65 65
                           <el-form-item prop="max_unit" class="noMargin">
66
-                            <el-select v-model="form.max_unit" style="width:160px;" placeholder="包装单位">
66
+                            <el-select v-model="form.max_unit" style="width:160px;" placeholder="包装单位" @change="changeMaxUnit">
67 67
                               <el-option
68 68
                                 v-for="(item,index) in getDataConfig('hemodialysis','units')"
69 69
                                 :key="index"
@@ -856,10 +856,10 @@
856 856
            }
857 857
         })
858 858
       },
859
-      changeMaxUnit(val){
859
+      changeDoseUnit(val){
860 860
         if(val == this.form.min_unit){
861
-          this.form.dose = 1
862
-          this.form.min_number = this.form.dose
861
+          // this.form.dose = 1
862
+          this.form.min_number = 1
863 863
           this.dosageShow = true
864 864
         }
865 865
         if(val !=this.form.min_unit){
@@ -895,14 +895,18 @@
895 895
 
896 896
       },
897 897
       changeMinUnit(val){
898
-        if(val == this.form.max_unit){
899
-          this.form.dose = 1
900
-          this.form.min_number = this.form.dose
898
+        if(val == this.form.dose_unit){
899
+          // this.form.dose = 1
900
+          this.form.min_number = 1
901 901
           this.dosageShow = true
902 902
         }
903 903
         if(val != this.form.max_unit){
904 904
           this.dosageShow = false
905 905
         }
906
+        if(val == this.form.max_unit){
907
+          this.form.min_number = 1
908
+          this.dosageShow = true
909
+        }
906 910
 
907 911
         // if(this.form.dosage == "" || this.form.max_unit == ""){
908 912
         //    this.form.min_number = 1
@@ -936,6 +940,12 @@
936 940
           return prevArr
937 941
         }, [])
938 942
 
943
+      },
944
+      changeMaxUnit(val){
945
+        if(val == this.form.min_unit){
946
+          this.form.min_number = 1
947
+          this.dosageShow = true
948
+        }
939 949
       }
940 950
     }, watch: {
941 951
       visible(val) {

+ 59 - 59
src/xt_pages/dialysis/template/DialysisPrintOrderForty.vue View File

@@ -2185,65 +2185,65 @@ export default {
2185 2185
             for (let index = 0; index < this.doctor_advices.length; index++) {
2186 2186
               this.doctor_advices[index]['isShow'] = 2
2187 2187
             }
2188
-            if (this.doctor_advices.length === 0) {
2189
-              var obj = { advice_name: '', start_time: '' }
2190
-              var obj1 = { advice_name: '', start_time: '' }
2191
-              var obj2 = { advice_name: '', start_time: '' }
2192
-              var obj3 = { advice_name: '', start_time: '' }
2193
-              this.doctor_advices.push(obj)
2194
-              this.doctor_advices.push(obj1)
2195
-              this.doctor_advices.push(obj2)
2196
-              this.doctor_advices.push(obj3)
2197
-              this.doctor_advices.push(obj3)
2198
-              this.doctor_advices.push(obj3)
2199
-              this.doctor_advices.push(obj3)
2200
-            }
2201
-            if (this.doctor_advices.length === 1) {
2202
-              var obj = { advice_name: '', start_time: '' }
2203
-              var obj1 = { advice_name: '', start_time: '' }
2204
-              var obj2 = { advice_name: '', start_time: '' }
2205
-              this.doctor_advices.push(obj)
2206
-              this.doctor_advices.push(obj1)
2207
-              this.doctor_advices.push(obj2)
2208
-              this.doctor_advices.push(obj2)
2209
-              this.doctor_advices.push(obj2)
2210
-              this.doctor_advices.push(obj2)
2211
-            }
2212
-            if (this.doctor_advices.length === 2) {
2213
-              var obj = { advice_name: '', start_time: '' }
2214
-              var obj1 = { advice_name: '', start_time: '' }
2215
-              this.doctor_advices.push(obj)
2216
-              this.doctor_advices.push(obj1)
2217
-              this.doctor_advices.push(obj1)
2218
-              this.doctor_advices.push(obj1)
2219
-              this.doctor_advices.push(obj1)
2220
-            }
2221
-            if (this.doctor_advices.length === 3) {
2222
-              // eslint-disable-next-line no-redeclare
2223
-              var obj = { advice_name: '', start_time: '' }
2224
-              this.doctor_advices.push(obj)
2225
-              this.doctor_advices.push(obj)
2226
-              this.doctor_advices.push(obj)
2227
-              this.doctor_advices.push(obj)
2228
-            }
2229
-            if (this.doctor_advices.length === 4) {
2230
-              // eslint-disable-next-line no-redeclare
2231
-              var obj = { advice_name: '', start_time: '' }
2232
-              this.doctor_advices.push(obj)
2233
-              this.doctor_advices.push(obj)
2234
-              this.doctor_advices.push(obj)
2235
-            }
2236
-            if (this.doctor_advices.length === 5) {
2237
-              // eslint-disable-next-line no-redeclare
2238
-              var obj = { advice_name: '', start_time: '' }
2239
-              this.doctor_advices.push(obj)
2240
-              this.doctor_advices.push(obj)
2241
-            }
2242
-            if (this.doctor_advices.length === 6) {
2243
-              // eslint-disable-next-line no-redeclare
2244
-              var obj = { advice_name: '', start_time: '' }
2245
-              this.doctor_advices.push(obj)
2246
-            }
2188
+            // if (this.doctor_advices.length === 0) {
2189
+            //   var obj = { advice_name: '', start_time: '' }
2190
+            //   var obj1 = { advice_name: '', start_time: '' }
2191
+            //   var obj2 = { advice_name: '', start_time: '' }
2192
+            //   var obj3 = { advice_name: '', start_time: '' }
2193
+            //   this.doctor_advices.push(obj)
2194
+            //   this.doctor_advices.push(obj1)
2195
+            //   this.doctor_advices.push(obj2)
2196
+            //   this.doctor_advices.push(obj3)
2197
+            //   this.doctor_advices.push(obj3)
2198
+            //   this.doctor_advices.push(obj3)
2199
+            //   this.doctor_advices.push(obj3)
2200
+            // }
2201
+            // if (this.doctor_advices.length === 1) {
2202
+            //   var obj = { advice_name: '', start_time: '' }
2203
+            //   var obj1 = { advice_name: '', start_time: '' }
2204
+            //   var obj2 = { advice_name: '', start_time: '' }
2205
+            //   this.doctor_advices.push(obj)
2206
+            //   this.doctor_advices.push(obj1)
2207
+            //   this.doctor_advices.push(obj2)
2208
+            //   this.doctor_advices.push(obj2)
2209
+            //   this.doctor_advices.push(obj2)
2210
+            //   this.doctor_advices.push(obj2)
2211
+            // }
2212
+            // if (this.doctor_advices.length === 2) {
2213
+            //   var obj = { advice_name: '', start_time: '' }
2214
+            //   var obj1 = { advice_name: '', start_time: '' }
2215
+            //   this.doctor_advices.push(obj)
2216
+            //   this.doctor_advices.push(obj1)
2217
+            //   this.doctor_advices.push(obj1)
2218
+            //   this.doctor_advices.push(obj1)
2219
+            //   this.doctor_advices.push(obj1)
2220
+            // }
2221
+            // if (this.doctor_advices.length === 3) {
2222
+            //   // eslint-disable-next-line no-redeclare
2223
+            //   var obj = { advice_name: '', start_time: '' }
2224
+            //   this.doctor_advices.push(obj)
2225
+            //   this.doctor_advices.push(obj)
2226
+            //   this.doctor_advices.push(obj)
2227
+            //   this.doctor_advices.push(obj)
2228
+            // }
2229
+            // if (this.doctor_advices.length === 4) {
2230
+            //   // eslint-disable-next-line no-redeclare
2231
+            //   var obj = { advice_name: '', start_time: '' }
2232
+            //   this.doctor_advices.push(obj)
2233
+            //   this.doctor_advices.push(obj)
2234
+            //   this.doctor_advices.push(obj)
2235
+            // }
2236
+            // if (this.doctor_advices.length === 5) {
2237
+            //   // eslint-disable-next-line no-redeclare
2238
+            //   var obj = { advice_name: '', start_time: '' }
2239
+            //   this.doctor_advices.push(obj)
2240
+            //   this.doctor_advices.push(obj)
2241
+            // }
2242
+            // if (this.doctor_advices.length === 6) {
2243
+            //   // eslint-disable-next-line no-redeclare
2244
+            //   var obj = { advice_name: '', start_time: '' }
2245
+            //   this.doctor_advices.push(obj)
2246
+            // }
2247 2247
             this.adviceLength = this.doctor_advices.length + 1
2248 2248
 
2249 2249
             if (this.doctor_advices.length > 0) {