Kaynağa Gözat

开方时 代煎 & 配送 取值问题

cc12458 1 yıl önce
ebeveyn
işleme
f959d3ceb4

+ 3 - 3
src/components/ChineseMedicine.vue

@@ -80,7 +80,7 @@
                       v-model="recipe_tabs[recipe_tabs_c].radio"
                       :disabled="recipe_tabs[recipe_tabs_c].disable"
                       :label="item.ptype"
-                      @click.native.prevent="changePharmacy(recipe_tabs[recipe_tabs_c].lastType,item.ptype)"
+                      @click.native.prevent="recipe_tabs[recipe_tabs_c].disable || changePharmacy(recipe_tabs[recipe_tabs_c].lastType,item.ptype)"
             >{{item.name}}</el-radio>
           </div>
         </div>
@@ -1086,7 +1086,7 @@ export default {
             timeList: [], // 服药时间后台数据
             caozuo: "",
             zhutuo: "",
-            radio: 1,
+            radio: 1, // TODO 配送 :0 配送 注意:isPs isKD
             isDaiJian: 2,
             provinceList: [],
             cityList: [],
@@ -2434,7 +2434,7 @@ export default {
 
     // 切换中药类型时 切换 药房 获取 药品里面有没有这条数据
     async changePharmacy(type, val) {
-      // TODO 此处 if 不会调用 触发在 [this.$emit("updateDp", res.Data)](src/components/ChineseMedicine.vue:2831)
+      // else 触发在 this.$emit("updateDp", res.Data)
       if (this.recipe_tabs[this.recipe_tabs_c].radio == val) {
         this.$parent.openAddress();
         return;

+ 7 - 0
src/utils/minix/prescribing.js

@@ -153,6 +153,7 @@ export default {
             this.openAddress()
 
         },
+        setUpdateDp(){/* 将模态框的值同步到处方数据 bottom_form */},
         openAddress() {
             clearTimeout(hack_openAddress_true);
             if (!this.isShowPs) this.isPs = 1;
@@ -175,11 +176,16 @@ export default {
                     const isPs = child.recipe_tabs[child.recipe_tabs_c].bottom_form.radio
                     if (isPs != null) this.isPs = isPs;
                     if (isDaiJian != null) this.isDaiJian = isDaiJian;
+                    this.setUpdateDp = (/* 模态框选择的值 */ model) => {
+                        child.recipe_tabs[child.recipe_tabs_c].bottom_form.isDaiJian = model.isDaiJian
+                        child.recipe_tabs[child.recipe_tabs_c].bottom_form.radio = model.iskD
+                    }
                 }, 200)
             } else {
                 this.showAddress = false;
             }
         },
+
         // 提交地址信息
         submitAddress(cancel) {
             this.showAddress = false;
@@ -187,6 +193,7 @@ export default {
             const model = this.$refs.medAdress.form;
             this.psChange(model.iskD)
             this.djChange(model.isDaiJian)
+            this.setUpdateDp(model)
         },
         // 获取合理安全用药提醒配置
         async getRationalSafeUse() {