|
|
@@ -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>
|
|
|
@@ -635,7 +635,7 @@
|
|
|
<el-option
|
|
|
:label="item.value"
|
|
|
:value="item.key"
|
|
|
- v-for="(item,index) in scope.row.usageList"
|
|
|
+ v-for="(item,index) in usageList"
|
|
|
:key="scope.row.id+'h'+index"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
@@ -993,7 +993,7 @@ import { debounce } from "@/utils/format.js";
|
|
|
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
|
import popup from "@/components/Propup.vue";
|
|
|
import accompanied from "./ui/accompanied.vue";
|
|
|
-import {CC_Dosage2Basis} from '@/utils/medicine';
|
|
|
+import {CC_Basis2Dosage, CC_Dosage2Basis} from '@/utils/medicine';
|
|
|
|
|
|
let medicineBlurTimer;
|
|
|
export default {
|
|
|
@@ -1086,7 +1086,7 @@ export default {
|
|
|
timeList: [], // 服药时间后台数据
|
|
|
caozuo: "",
|
|
|
zhutuo: "",
|
|
|
- radio: 1,
|
|
|
+ radio: 1, // TODO 配送 :0 配送 注意:isPs isKD
|
|
|
isDaiJian: 2,
|
|
|
provinceList: [],
|
|
|
cityList: [],
|
|
|
@@ -1340,17 +1340,12 @@ export default {
|
|
|
},
|
|
|
doseBlur(scope) {
|
|
|
let parent = this.$parent;
|
|
|
+ const rationalMed10 = parent.rationalMed10.find(item => item.reqID === scope.row.medid ) || {}
|
|
|
if (!+scope.row.dose) scope.row.dose = '';
|
|
|
if (typeof scope.row.dose === 'string') scope.row.dose = scope.row.dose.trim();
|
|
|
if (scope.row.dose === "") {
|
|
|
this.$message.error("请输入剂量");
|
|
|
-
|
|
|
- parent.rationalMed10.forEach(item => {
|
|
|
- if (item.reqID == scope.row.medid) {
|
|
|
- item.showDose = false;
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
+ rationalMed10.showDose = false;
|
|
|
parent.countDose();
|
|
|
this.maxDose = null;
|
|
|
this.minDose = null;
|
|
|
@@ -1364,6 +1359,7 @@ export default {
|
|
|
if (unit != "g" && unit != "克" && !Number.isInteger(dose)) {
|
|
|
this.$message.error("剂量输入有误");
|
|
|
|
|
|
+ rationalMed10.showDose = false;
|
|
|
parent.countDose();
|
|
|
this.maxDose = null;
|
|
|
this.minDose = null;
|
|
|
@@ -1379,26 +1375,14 @@ export default {
|
|
|
"red";
|
|
|
return;
|
|
|
}
|
|
|
- if (
|
|
|
- Number(scope.row.dose) > Number(this.maxDose) ||
|
|
|
- Number(scope.row.dose) < Number(this.minDose)
|
|
|
- ) {
|
|
|
- parent.rationalMed10.forEach(item => {
|
|
|
- if (item.reqID == scope.row.medid) {
|
|
|
- item.showDose = true;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
|
|
|
- if (
|
|
|
- Number(scope.row.dose) <= Number(this.maxDose) &&
|
|
|
- Number(scope.row.dose) >= Number(this.minDose)
|
|
|
- ) {
|
|
|
- parent.rationalMed10.forEach(item => {
|
|
|
- if (item.reqID == scope.row.medid) {
|
|
|
- item.showDose = false;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (this.maxDose && this.minDose) {
|
|
|
+ try {
|
|
|
+ const dose = CC_Dosage2Basis(scope.row);
|
|
|
+ rationalMed10.showDose = dose && (dose < this.minDose || dose > this.maxDose);
|
|
|
+ } catch (e) {}
|
|
|
+ } else {
|
|
|
+ rationalMed10.showDose = false;
|
|
|
}
|
|
|
|
|
|
parent.countDose();
|
|
|
@@ -1832,7 +1816,7 @@ export default {
|
|
|
name: item.ypmc,
|
|
|
spec: item.gg, // 规格
|
|
|
// dose: "", // 剂量
|
|
|
- dose: scope.row.color === "red" || oneself ? scope.row.dose : "",
|
|
|
+ dose: scope.row.color === "red" || oneself ? null : "",
|
|
|
unit: item.dw, // 单位
|
|
|
usage:
|
|
|
oneself ? scope.row.usage : scope.row.color === "red"
|
|
|
@@ -1852,6 +1836,12 @@ export default {
|
|
|
};
|
|
|
obj.ggnum = +item.ggnum || 1;
|
|
|
obj.xbzxs = +item.xbzxs || '34'.includes(item.zylx) ? obj.ggnum : 1;
|
|
|
+
|
|
|
+ if (obj.dose == null) {
|
|
|
+ obj.oldDose = CC_Dosage2Basis(scope.row)
|
|
|
+ obj.dose = CC_Basis2Dosage(obj)
|
|
|
+ }
|
|
|
+
|
|
|
Object.assign(totalData[scope.row.id - 1], obj);
|
|
|
|
|
|
// 调用 父级合理用药接口
|
|
|
@@ -2300,8 +2290,8 @@ export default {
|
|
|
matIds: ids
|
|
|
});
|
|
|
if (res.code == 0 && res.message) {
|
|
|
- this.maxDose = res.data.matmaxdosage;
|
|
|
- this.minDose = res.data.matmindosage;
|
|
|
+ this.maxDose = +res.data.matmaxdosage;
|
|
|
+ this.minDose = +res.data.matmindosage;
|
|
|
this.doseId = id;
|
|
|
}
|
|
|
},
|
|
|
@@ -2329,8 +2319,8 @@ export default {
|
|
|
matIds: ids
|
|
|
});
|
|
|
if (res.code == 0 && res.message) {
|
|
|
- this.maxDose = res.data.matmaxdosage;
|
|
|
- this.minDose = res.data.matmindosage;
|
|
|
+ this.maxDose = +res.data.matmaxdosage;
|
|
|
+ this.minDose = +res.data.matmindosage;
|
|
|
this.doseId = id;
|
|
|
}
|
|
|
},
|
|
|
@@ -2444,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;
|
|
|
@@ -2526,7 +2516,7 @@ export default {
|
|
|
originname: item.cdmc, // 产地名称
|
|
|
showSearch: false,
|
|
|
usageList: [],
|
|
|
- oldDose: item1.oldDose
|
|
|
+ oldDose: item.placeholderdose || item1.oldDose
|
|
|
};
|
|
|
/* 修正 */ item1.usage = item1.useage = getUsage(item1.usage);
|
|
|
item1.ggnum = +item.ggnum || 1;
|
|
|
@@ -2550,6 +2540,10 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
this._splitDataToView();
|
|
|
+ this.$parent.rationalMed = [];
|
|
|
+ this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(item => {
|
|
|
+ this.$parent.getRationalMed(item.medid)
|
|
|
+ });
|
|
|
|
|
|
// this.recipe_tabs[this.recipe_tabs_c].lastType = this.recipe_tabs[this.recipe_tabs_c]
|
|
|
// .radio // 存储这一次的 药房类型
|