|
@@ -61,17 +61,37 @@
|
|
|
<el-input size="mini" v-model="form.provenance" placeholder="请输入" :disabled="type=='find'"></el-input>
|
|
<el-input size="mini" v-model="form.provenance" placeholder="请输入" :disabled="type=='find'"></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="item flex-vertical-center-l" v-if="showPurposeType">
|
|
|
|
|
- <span></span>
|
|
|
|
|
- <div class="name"></div>
|
|
|
|
|
- <div class="input">
|
|
|
|
|
- <el-checkbox size="mini" :value="form.purposeType === '1'" @change="form.purposeType = $event ? '1' : '0'">统建处方</el-checkbox>
|
|
|
|
|
|
|
+ <template v-if="showPurposeType">
|
|
|
|
|
+ <div class="item flex-vertical-center-l">
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ <div class="name"></div>
|
|
|
|
|
+ <div class="input">
|
|
|
|
|
+ <el-checkbox size="mini" :value="isPurposeType" :disabled="!!medicineLength"
|
|
|
|
|
+ @change="form.purposeType = $event ? '1' : '0';isPurposeType && getHospitalCategory();"
|
|
|
|
|
+ >统建处方</el-checkbox>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ <template v-if="isPurposeType">
|
|
|
|
|
+ <div class="item flex-vertical-center-l">
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ <div class="name">医派:</div>
|
|
|
|
|
+ <div class="input">
|
|
|
|
|
+ <el-input v-model="form.sectCategory" placeholder="请输入"></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="item flex-vertical-center-l">
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ <div class="name">科室:</div>
|
|
|
|
|
+ <div class="input">
|
|
|
|
|
+ <el-input v-model="form.sectDept" placeholder="请输入"></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="bottom">
|
|
<div class="bottom">
|
|
|
- <MedicineAccord></MedicineAccord>
|
|
|
|
|
|
|
+ <MedicineAccord :isPurposeType="isPurposeType" @length="medicineLength = $event"></MedicineAccord>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="topForm flex-vertical-center-l">
|
|
<div class="topForm flex-vertical-center-l">
|
|
|
<div class="item flex-vertical-center-l">
|
|
<div class="item flex-vertical-center-l">
|
|
@@ -198,7 +218,7 @@ import {
|
|
|
customerQuery
|
|
customerQuery
|
|
|
} from "@/api/diagnosis.js";
|
|
} from "@/api/diagnosis.js";
|
|
|
import MedicineAccord from "../../components/MedicineAccord.vue";
|
|
import MedicineAccord from "../../components/MedicineAccord.vue";
|
|
|
-import { getSelectType } from "@/api/city.js";
|
|
|
|
|
|
|
+import {getHospitalCategory, getHospitalDepartment, getSelectType} from "@/api/city.js";
|
|
|
export default {
|
|
export default {
|
|
|
props: {
|
|
props: {
|
|
|
showBtn: {
|
|
showBtn: {
|
|
@@ -211,12 +231,20 @@ export default {
|
|
|
TCMDiagnosis
|
|
TCMDiagnosis
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
+ isPurposeType() {
|
|
|
|
|
+ return this.form.purposeType === '1';
|
|
|
|
|
+ },
|
|
|
showPurposeType() {
|
|
showPurposeType() {
|
|
|
return this.showBtn
|
|
return this.showBtn
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ hospitalCategory: [],
|
|
|
|
|
+ hospitalDepartment: [],
|
|
|
|
|
+
|
|
|
|
|
+ medicineLength: 0,
|
|
|
|
|
+
|
|
|
shareSelect: [], // 共享至选择器
|
|
shareSelect: [], // 共享至选择器
|
|
|
doseTypeList: [], // 剂型选择器
|
|
doseTypeList: [], // 剂型选择器
|
|
|
recipeUseList: [], // 处方用法
|
|
recipeUseList: [], // 处方用法
|
|
@@ -242,6 +270,8 @@ export default {
|
|
|
efficacy: "", // 功效
|
|
efficacy: "", // 功效
|
|
|
provenance: "", // 处方出处
|
|
provenance: "", // 处方出处
|
|
|
purposeType: "0", // 用途类型 1 八病九方
|
|
purposeType: "0", // 用途类型 1 八病九方
|
|
|
|
|
+ sectCategory: '', // 医派
|
|
|
|
|
+ sectDept: '', // 科室
|
|
|
|
|
|
|
|
times: "", // 频次
|
|
times: "", // 频次
|
|
|
recipeUse: "", // 处方用法
|
|
recipeUse: "", // 处方用法
|
|
@@ -299,10 +329,20 @@ export default {
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
if (this.$route.query.pid) {
|
|
if (this.$route.query.pid) {
|
|
|
- this.getAccordDetail();
|
|
|
|
|
|
|
+ this.getAccordDetail().then(() => {
|
|
|
|
|
+ if (this.isPurposeType) this.getHospitalCategory()
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ async getHospitalCategory() {
|
|
|
|
|
+ this.hospitalCategory = await getHospitalCategory();
|
|
|
|
|
+ await this.getHospitalDepartment();
|
|
|
|
|
+ },
|
|
|
|
|
+ async getHospitalDepartment() {
|
|
|
|
|
+ this.hospitalDepartment = await getHospitalDepartment({hospital: this.form.sectCategory || ''});
|
|
|
|
|
+ if (!this.hospitalDepartment.find(item => item.id === this.form.sectDept)) this.form.sectDept = '';
|
|
|
|
|
+ },
|
|
|
// 保存按钮点击
|
|
// 保存按钮点击
|
|
|
save() {
|
|
save() {
|
|
|
if (this.form.name == "") {
|
|
if (this.form.name == "") {
|
|
@@ -415,6 +455,7 @@ export default {
|
|
|
dose: Number(item1.dose),
|
|
dose: Number(item1.dose),
|
|
|
drugname: item1.name,
|
|
drugname: item1.name,
|
|
|
drugid: item1.medid,
|
|
drugid: item1.medid,
|
|
|
|
|
+ matid: item1.matid, // 知识库id
|
|
|
origin: item1.originname,
|
|
origin: item1.originname,
|
|
|
seqn: item1.id,
|
|
seqn: item1.id,
|
|
|
specification: item1.spec,
|
|
specification: item1.spec,
|
|
@@ -451,6 +492,7 @@ export default {
|
|
|
inventory: item1.instock || item1.inventory, // 库存
|
|
inventory: item1.instock || item1.inventory, // 库存
|
|
|
key: "",
|
|
key: "",
|
|
|
search_i: index1,
|
|
search_i: index1,
|
|
|
|
|
+ matid: item1.matid, // 药品id
|
|
|
medid: item1.drugid || item1.medid, // 药品id
|
|
medid: item1.drugid || item1.medid, // 药品id
|
|
|
originname: item1.origin || item1.originname // 产地名称
|
|
originname: item1.origin || item1.originname // 产地名称
|
|
|
};
|
|
};
|
|
@@ -630,6 +672,8 @@ export default {
|
|
|
effect: this.form.efficacy,
|
|
effect: this.form.efficacy,
|
|
|
provenance: this.showPurposeType ? this.form.provenance : '0',
|
|
provenance: this.showPurposeType ? this.form.provenance : '0',
|
|
|
purposeType: this.form.purposeType,
|
|
purposeType: this.form.purposeType,
|
|
|
|
|
+ sectCategory: this.form.sectCategory,
|
|
|
|
|
+ sectDept: this.form.sectDept,
|
|
|
frequency: this.form.times,
|
|
frequency: this.form.times,
|
|
|
name: this.form.name,
|
|
name: this.form.name,
|
|
|
pinyincode: this.form.pinyin,
|
|
pinyincode: this.form.pinyin,
|
|
@@ -653,6 +697,11 @@ export default {
|
|
|
symptomname: tcmdParams.syndrometypes,
|
|
symptomname: tcmdParams.syndrometypes,
|
|
|
treatment: tcmdParams.treatment
|
|
treatment: tcmdParams.treatment
|
|
|
};
|
|
};
|
|
|
|
|
+ if (this.isPurposeType) {
|
|
|
|
|
+ params.prescriptionDetailVos = params.prescriptionDetailVos.map(item => (item.drugid = null, item));
|
|
|
|
|
+ params.pharmacyid = null;
|
|
|
|
|
+ params.drugtype = null;
|
|
|
|
|
+ }
|
|
|
const loading = this.$loading({
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
lock: true,
|
|
|
text: "正在提交",
|
|
text: "正在提交",
|
|
@@ -701,6 +750,8 @@ export default {
|
|
|
efficacy: res.Data.effect, // 功效
|
|
efficacy: res.Data.effect, // 功效
|
|
|
provenance: res.Data.provenance, // 处方出处
|
|
provenance: res.Data.provenance, // 处方出处
|
|
|
purposeType: res.Data.purposeType, // 用途类型 1 八病九方
|
|
purposeType: res.Data.purposeType, // 用途类型 1 八病九方
|
|
|
|
|
+ sectCategory: res.Data.sectCategory,
|
|
|
|
|
+ sectDept: res.Data.sectDept,
|
|
|
// wubi: res.Data.wubicode, // 五笔
|
|
// wubi: res.Data.wubicode, // 五笔
|
|
|
// pinyin: res.Data.pinyincode, // 拼音
|
|
// pinyin: res.Data.pinyincode, // 拼音
|
|
|
times: res.Data.frequency, // 频次
|
|
times: res.Data.frequency, // 频次
|