|
@@ -56,7 +56,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<!-- @change="getPharmacyID" -->
|
|
<!-- @change="getPharmacyID" -->
|
|
|
<!-- @change="changePharmacy(recipe_tabs[recipe_tabs_c].lastType)" -->
|
|
<!-- @change="changePharmacy(recipe_tabs[recipe_tabs_c].lastType)" -->
|
|
|
- <div class="t-con-radio flex-vertical-center-l">
|
|
|
|
|
|
|
+ <div class="t-con-radio flex-vertical-center-l" v-if="false">
|
|
|
<div class="t-radio-group">
|
|
<div class="t-radio-group">
|
|
|
<el-radio-group
|
|
<el-radio-group
|
|
|
v-model="recipe_tabs[recipe_tabs_c].radio"
|
|
v-model="recipe_tabs[recipe_tabs_c].radio"
|
|
@@ -73,6 +73,17 @@
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="t-con-radio flex-vertical-center-l" style="flex-wrap: wrap;align-items: center;">
|
|
|
|
|
+ <div class="t-radio-group2" :class="{multiple: group.options.length > 1}" v-for="group in pharmacyTypeGroup" :key="group.name">
|
|
|
|
|
+ <label v-if="group.options.length > 1">{{group.name}}</label>
|
|
|
|
|
+ <el-radio v-for="item in group.options" :key="item.ptype"
|
|
|
|
|
+ v-model="recipe_tabs[recipe_tabs_c].radio"
|
|
|
|
|
+ :disabled="recipe_tabs[recipe_tabs_c].disable"
|
|
|
|
|
+ :label="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>
|
|
|
|
|
|
|
|
<!-- <div class="add-presc1 flex-center" @click="clearRecipe()">清空处方</div> -->
|
|
<!-- <div class="add-presc1 flex-center" @click="clearRecipe()">清空处方</div> -->
|
|
|
</div>
|
|
</div>
|
|
@@ -347,7 +358,7 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="spec" label="规格" width="100"></el-table-column>
|
|
<el-table-column prop="spec" label="规格" width="100"></el-table-column>
|
|
|
- <el-table-column prop="dose" label="剂量" width="40">
|
|
|
|
|
|
|
+ <el-table-column prop="dose" label="剂量" width="60">
|
|
|
<template slot-scope="scope" v-if="scope.row.name">
|
|
<template slot-scope="scope" v-if="scope.row.name">
|
|
|
<div class="t_dose">
|
|
<div class="t_dose">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -583,7 +594,7 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<!-- fixed="left" -->
|
|
<!-- fixed="left" -->
|
|
|
<el-table-column prop="spec" label="规格" width="100"></el-table-column>
|
|
<el-table-column prop="spec" label="规格" width="100"></el-table-column>
|
|
|
- <el-table-column prop="dose" label="剂量" width="40">
|
|
|
|
|
|
|
+ <el-table-column prop="dose" label="剂量" width="60">
|
|
|
<template slot-scope="scope" v-if="scope.row.name">
|
|
<template slot-scope="scope" v-if="scope.row.name">
|
|
|
<div class="t_dose">
|
|
<div class="t_dose">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -624,7 +635,7 @@
|
|
|
<el-option
|
|
<el-option
|
|
|
:label="item.value"
|
|
:label="item.value"
|
|
|
:value="item.key"
|
|
:value="item.key"
|
|
|
- v-for="(item,index) in scope.row.usageList"
|
|
|
|
|
|
|
+ v-for="(item,index) in usageList"
|
|
|
:key="scope.row.id+'h'+index"
|
|
:key="scope.row.id+'h'+index"
|
|
|
></el-option>
|
|
></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -982,6 +993,7 @@ import { debounce } from "@/utils/format.js";
|
|
|
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
|
import popup from "@/components/Propup.vue";
|
|
import popup from "@/components/Propup.vue";
|
|
|
import accompanied from "./ui/accompanied.vue";
|
|
import accompanied from "./ui/accompanied.vue";
|
|
|
|
|
+import {CC_Basis2Dosage, CC_Dosage2Basis} from '@/utils/medicine';
|
|
|
|
|
|
|
|
let medicineBlurTimer;
|
|
let medicineBlurTimer;
|
|
|
export default {
|
|
export default {
|
|
@@ -1074,7 +1086,7 @@ export default {
|
|
|
timeList: [], // 服药时间后台数据
|
|
timeList: [], // 服药时间后台数据
|
|
|
caozuo: "",
|
|
caozuo: "",
|
|
|
zhutuo: "",
|
|
zhutuo: "",
|
|
|
- radio: 1,
|
|
|
|
|
|
|
+ radio: 1, // TODO 配送 :0 配送 注意:isPs isKD
|
|
|
isDaiJian: 2,
|
|
isDaiJian: 2,
|
|
|
provinceList: [],
|
|
provinceList: [],
|
|
|
cityList: [],
|
|
cityList: [],
|
|
@@ -1102,6 +1114,7 @@ export default {
|
|
|
isAutoCheck: "0", // 是否自动审核 0 手动 1自动 (自动的时候用his 的是否支付成功字段 判断显示)
|
|
isAutoCheck: "0", // 是否自动审核 0 手动 1自动 (自动的时候用his 的是否支付成功字段 判断显示)
|
|
|
pharmacyList: [], // 药房选择器 数据
|
|
pharmacyList: [], // 药房选择器 数据
|
|
|
pharmacyTypes: [],
|
|
pharmacyTypes: [],
|
|
|
|
|
+ pharmacyTypeGroup: [],
|
|
|
clickPid: "", // 点击的药品id
|
|
clickPid: "", // 点击的药品id
|
|
|
maxDose: null,
|
|
maxDose: null,
|
|
|
minDose: null,
|
|
minDose: null,
|
|
@@ -1327,17 +1340,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
doseBlur(scope) {
|
|
doseBlur(scope) {
|
|
|
let parent = this.$parent;
|
|
let parent = this.$parent;
|
|
|
|
|
+ const rationalMed10 = parent.rationalMed10.find(item => item.reqID === scope.row.medid ) || {}
|
|
|
if (!+scope.row.dose) scope.row.dose = '';
|
|
if (!+scope.row.dose) scope.row.dose = '';
|
|
|
if (typeof scope.row.dose === 'string') scope.row.dose = scope.row.dose.trim();
|
|
if (typeof scope.row.dose === 'string') scope.row.dose = scope.row.dose.trim();
|
|
|
if (scope.row.dose === "") {
|
|
if (scope.row.dose === "") {
|
|
|
this.$message.error("请输入剂量");
|
|
this.$message.error("请输入剂量");
|
|
|
-
|
|
|
|
|
- parent.rationalMed10.forEach(item => {
|
|
|
|
|
- if (item.reqID == scope.row.medid) {
|
|
|
|
|
- item.showDose = false;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
|
|
+ rationalMed10.showDose = false;
|
|
|
parent.countDose();
|
|
parent.countDose();
|
|
|
this.maxDose = null;
|
|
this.maxDose = null;
|
|
|
this.minDose = null;
|
|
this.minDose = null;
|
|
@@ -1351,6 +1359,7 @@ export default {
|
|
|
if (unit != "g" && unit != "克" && !Number.isInteger(dose)) {
|
|
if (unit != "g" && unit != "克" && !Number.isInteger(dose)) {
|
|
|
this.$message.error("剂量输入有误");
|
|
this.$message.error("剂量输入有误");
|
|
|
|
|
|
|
|
|
|
+ rationalMed10.showDose = false;
|
|
|
parent.countDose();
|
|
parent.countDose();
|
|
|
this.maxDose = null;
|
|
this.maxDose = null;
|
|
|
this.minDose = null;
|
|
this.minDose = null;
|
|
@@ -1366,26 +1375,14 @@ export default {
|
|
|
"red";
|
|
"red";
|
|
|
return;
|
|
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();
|
|
parent.countDose();
|
|
@@ -1819,7 +1816,7 @@ export default {
|
|
|
name: item.ypmc,
|
|
name: item.ypmc,
|
|
|
spec: item.gg, // 规格
|
|
spec: item.gg, // 规格
|
|
|
// dose: "", // 剂量
|
|
// dose: "", // 剂量
|
|
|
- dose: scope.row.color === "red" || oneself ? scope.row.dose : "",
|
|
|
|
|
|
|
+ dose: scope.row.color === "red" || oneself ? null : "",
|
|
|
unit: item.dw, // 单位
|
|
unit: item.dw, // 单位
|
|
|
usage:
|
|
usage:
|
|
|
oneself ? scope.row.usage : scope.row.color === "red"
|
|
oneself ? scope.row.usage : scope.row.color === "red"
|
|
@@ -1837,6 +1834,14 @@ export default {
|
|
|
showSearch: false,
|
|
showSearch: false,
|
|
|
showDoseSection: false // 展示剂量区间
|
|
showDoseSection: false // 展示剂量区间
|
|
|
};
|
|
};
|
|
|
|
|
+ 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);
|
|
Object.assign(totalData[scope.row.id - 1], obj);
|
|
|
|
|
|
|
|
// 调用 父级合理用药接口
|
|
// 调用 父级合理用药接口
|
|
@@ -2285,8 +2290,8 @@ export default {
|
|
|
matIds: ids
|
|
matIds: ids
|
|
|
});
|
|
});
|
|
|
if (res.code == 0 && res.message) {
|
|
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;
|
|
this.doseId = id;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -2314,8 +2319,8 @@ export default {
|
|
|
matIds: ids
|
|
matIds: ids
|
|
|
});
|
|
});
|
|
|
if (res.code == 0 && res.message) {
|
|
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;
|
|
this.doseId = id;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -2373,18 +2378,43 @@ export default {
|
|
|
});
|
|
});
|
|
|
if (res.ResultCode == 0) {
|
|
if (res.ResultCode == 0) {
|
|
|
let pharmacyTypes = [];
|
|
let pharmacyTypes = [];
|
|
|
|
|
+ let pharmacyTypeGroup = [];
|
|
|
res.Data.forEach(item => {
|
|
res.Data.forEach(item => {
|
|
|
item.dosageForms = item.dosageForms.split(",");
|
|
item.dosageForms = item.dosageForms.split(",");
|
|
|
item.dosageForms.forEach(item1 => {
|
|
item.dosageForms.forEach(item1 => {
|
|
|
pharmacyTypes.push({
|
|
pharmacyTypes.push({
|
|
|
type: item1,
|
|
type: item1,
|
|
|
ptype: item.pid + "@" + item1,
|
|
ptype: item.pid + "@" + item1,
|
|
|
- name: item.displayName //+ this.getRadioName(item1)
|
|
|
|
|
|
|
+ name: item.displayName + (item.dosageForms.length > 1 ? ` (${this.getRadioName(item1)})` : '')
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ if (item.dosageForms.length > 1) {
|
|
|
|
|
+ pharmacyTypeGroup.push({
|
|
|
|
|
+ name: item.displayName,
|
|
|
|
|
+ options: item.dosageForms.map(item1 => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ type: item1,
|
|
|
|
|
+ ptype: item.pid + "@" + item1,
|
|
|
|
|
+ name: this.getRadioName(item1),
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (item.dosageForms.length === 1) {
|
|
|
|
|
+ pharmacyTypeGroup.push({
|
|
|
|
|
+ name: item.displayName,
|
|
|
|
|
+ options: item.dosageForms.map(item1 => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ type: item1,
|
|
|
|
|
+ ptype: item.pid + "@" + item1,
|
|
|
|
|
+ name: item.displayName,
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
this.pharmacyList = res.Data;
|
|
this.pharmacyList = res.Data;
|
|
|
this.pharmacyTypes = pharmacyTypes;
|
|
this.pharmacyTypes = pharmacyTypes;
|
|
|
|
|
+ this.pharmacyTypeGroup = pharmacyTypeGroup;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 获取药房id
|
|
// 获取药房id
|
|
@@ -2404,7 +2434,7 @@ export default {
|
|
|
|
|
|
|
|
// 切换中药类型时 切换 药房 获取 药品里面有没有这条数据
|
|
// 切换中药类型时 切换 药房 获取 药品里面有没有这条数据
|
|
|
async changePharmacy(type, val) {
|
|
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) {
|
|
if (this.recipe_tabs[this.recipe_tabs_c].radio == val) {
|
|
|
this.$parent.openAddress();
|
|
this.$parent.openAddress();
|
|
|
return;
|
|
return;
|
|
@@ -2422,14 +2452,14 @@ export default {
|
|
|
|
|
|
|
|
this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(item => {
|
|
this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(item => {
|
|
|
if (item.name) {
|
|
if (item.name) {
|
|
|
|
|
+ item.oldDose = CC_Dosage2Basis(item);
|
|
|
let idDose =
|
|
let idDose =
|
|
|
item.medid +
|
|
item.medid +
|
|
|
"&" +
|
|
"&" +
|
|
|
- (item.dose || item.oldDose) +
|
|
|
|
|
|
|
+ item.oldDose +
|
|
|
"&" +
|
|
"&" +
|
|
|
(item.usage || "");
|
|
(item.usage || "");
|
|
|
// drugIds.push(item.medid)
|
|
// drugIds.push(item.medid)
|
|
|
- item.oldDose = item.dose;
|
|
|
|
|
drugIds.push(idDose);
|
|
drugIds.push(idDose);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -2486,10 +2516,11 @@ export default {
|
|
|
originname: item.cdmc, // 产地名称
|
|
originname: item.cdmc, // 产地名称
|
|
|
showSearch: false,
|
|
showSearch: false,
|
|
|
usageList: [],
|
|
usageList: [],
|
|
|
- oldDose: item1.oldDose
|
|
|
|
|
|
|
+ oldDose: item.placeholderdose || item1.oldDose
|
|
|
};
|
|
};
|
|
|
/* 修正 */ item1.usage = item1.useage = getUsage(item1.usage);
|
|
/* 修正 */ item1.usage = item1.useage = getUsage(item1.usage);
|
|
|
-
|
|
|
|
|
|
|
+ item1.ggnum = +item.ggnum || 1;
|
|
|
|
|
+ item1.xbzxs = +item.xbzxs || '34'.includes(item.zylx) ? item1.ggnum : 1;
|
|
|
item1.color = item.kc > 0 ? "#000" : 'red';
|
|
item1.color = item.kc > 0 ? "#000" : 'red';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2509,6 +2540,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
this._splitDataToView();
|
|
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]
|
|
// this.recipe_tabs[this.recipe_tabs_c].lastType = this.recipe_tabs[this.recipe_tabs_c]
|
|
|
// .radio // 存储这一次的 药房类型
|
|
// .radio // 存储这一次的 药房类型
|
|
@@ -2643,6 +2678,7 @@ export default {
|
|
|
|
|
|
|
|
// 根据表格获取数据类型
|
|
// 根据表格获取数据类型
|
|
|
async getSelectType(data, index) {
|
|
async getSelectType(data, index) {
|
|
|
|
|
+ if (data === '中药药品用法' && this.usageList.length) return;
|
|
|
let res = await getSelectType(data);
|
|
let res = await getSelectType(data);
|
|
|
|
|
|
|
|
if (data == "中药药品用法") {
|
|
if (data == "中药药品用法") {
|
|
@@ -2935,6 +2971,24 @@ export default {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .t-radio-group2 {
|
|
|
|
|
+ padding: 4px 8px;
|
|
|
|
|
+
|
|
|
|
|
+ &.multiple {
|
|
|
|
|
+ border: 2px dashed #5386f6;
|
|
|
|
|
+
|
|
|
|
|
+ > label:first-of-type {
|
|
|
|
|
+ margin-right: 8px;
|
|
|
|
|
+ color: rgba(0, 0, 0, 0.6);
|
|
|
|
|
+
|
|
|
|
|
+ &:after {
|
|
|
|
|
+ margin-left: 2px;
|
|
|
|
|
+ content: ":";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.add-presc1 {
|
|
.add-presc1 {
|
|
|
width: 84px;
|
|
width: 84px;
|
|
|
height: 34px;
|
|
height: 34px;
|