|
|
@@ -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();
|
|
|
@@ -2306,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;
|
|
|
}
|
|
|
},
|
|
|
@@ -2335,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;
|
|
|
}
|
|
|
},
|