|
|
@@ -286,13 +286,9 @@
|
|
|
<div class="flex-vertical-between center-header">
|
|
|
<div class="center-tab flex-vertical-center-l">
|
|
|
<template v-for="(item,index) in contentTabs">
|
|
|
- <div
|
|
|
- :class="container_i==index?'flex-center active':'flex-center'"
|
|
|
- @click.self="changeContainer(index)"
|
|
|
- v-if="!item.hide"
|
|
|
- :key="item.name+index"
|
|
|
- >
|
|
|
- <span @click="changeContainer(index)" :style="{color:item.color}">{{item.name}}</span>
|
|
|
+ <div v-if="!item.hide" :key="item.id" class="flex-center" :class="{active: container_i === index}"
|
|
|
+ @click="changeContainer(item, index)">
|
|
|
+ <span :style="{color:item.color}">{{ item.name }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
@@ -316,15 +312,15 @@
|
|
|
</div>
|
|
|
<!-- 右侧按钮 -->
|
|
|
<div class="flex-vertical-center-r flex-wrap">
|
|
|
- <el-button size="mini" @click="openUnifyPrescPrec" type="primary">萧然医派协定方</el-button>
|
|
|
- <el-button size="mini" :loading="tongueAndFaceLoading" :disabled="!tongueAndFaceAnalysis" @click="openTongueAndFaceAnalysis" type="primary">舌面诊影像</el-button>
|
|
|
+ <el-button v-if="showPrec" size="mini" @click="openUnifyPrescPrec" type="primary">萧然医派协定方</el-button>
|
|
|
+ <el-button size="mini" key="tongue" :loading="tongueAndFaceLoading" :disabled="!tongueAndFaceAnalysis" @click="openTongueAndFaceAnalysis" type="primary">舌面诊影像</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@click="handleReplenish"
|
|
|
>{{ innerWidth > 768 ? '补充中医电子病历' :'补充病历' }}</el-button>
|
|
|
- <el-button size="mini" @click="openDCase" v-if="isShrink">参考医案</el-button>
|
|
|
- <el-button size="mini" @click="openPrec" type="primary">协定方/方剂</el-button>
|
|
|
+ <el-button size="mini" @click="openDCase" v-if="showPrec && isShrink">参考医案</el-button>
|
|
|
+ <el-button v-if="showPrec" size="mini" @click="openPrec" type="primary">协定方/方剂</el-button>
|
|
|
<el-popover
|
|
|
placement="left"
|
|
|
title
|
|
|
@@ -370,7 +366,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-popover>
|
|
|
- <el-button size="mini" type="primary" v-if="isShrink&&rRecomendR.length==0">推荐的方剂</el-button>
|
|
|
+ <el-button size="mini" type="primary" v-if="showPrec && isShrink&&rRecomendR.length==0">推荐的方剂</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 代煎/配送 -->
|
|
|
@@ -394,6 +390,7 @@
|
|
|
ref="chineseM"
|
|
|
:totalAllMoney.sync="chineseM.allMoney"
|
|
|
@submit="submitRecipe1()"
|
|
|
+ @clear="clearContainer('0')"
|
|
|
:showSubmit="showSubmit"
|
|
|
:isShrink="isShrink"
|
|
|
:isDaiJian="Number(isDaiJian)"
|
|
|
@@ -407,6 +404,7 @@
|
|
|
ref="medicineC"
|
|
|
id="medicineC"
|
|
|
@submit="submitRecipe1()"
|
|
|
+ @clear="clearContainer('1')"
|
|
|
:totalAllMoney.sync="medicineC.allMoney"
|
|
|
:showSubmit="showSubmit"
|
|
|
:isPs="isPs"
|
|
|
@@ -417,6 +415,7 @@
|
|
|
ref="suitScience"
|
|
|
id="suitScience"
|
|
|
@submit="submitRecipe1()"
|
|
|
+ @clear="clearContainer('2')"
|
|
|
:totalAllMoney.sync="suitScience.allMoney"
|
|
|
:showSubmit="showSubmit"
|
|
|
></suitScience>
|
|
|
@@ -448,8 +447,8 @@
|
|
|
v-for="(item1,index1) in rRecomendR"
|
|
|
:key="'c'+index1"
|
|
|
>
|
|
|
- <div
|
|
|
- :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid || tjRecipeId==item1.acupreid ?'active':'',]"
|
|
|
+ <div class="med-name med-name-bg"
|
|
|
+ :class="{active: tjRecipeId && (tjRecipeId==item1.preid ||tjRecipeId==item1.pid || tjRecipeId==item1.acupreid)}"
|
|
|
v-if="item1.showType==0"
|
|
|
@click.stop="getPreDetal(item1.preid || item1,1)"
|
|
|
>
|
|
|
@@ -460,8 +459,8 @@
|
|
|
<!-- {{item1.prename?item1.prename+'('+item1.book?item1.book:'暂无'+')': item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}} -->
|
|
|
</div>
|
|
|
<!-- 经验方 -->
|
|
|
- <div
|
|
|
- :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid ?'active':'',]"
|
|
|
+ <div class="med-name med-name-bg"
|
|
|
+ :class="{active: tjRecipeId && (tjRecipeId==item1.preid ||tjRecipeId==item1.pid) }"
|
|
|
v-else
|
|
|
@click="getExperinceDetail(item1.pid)"
|
|
|
>
|
|
|
@@ -1310,19 +1309,26 @@ export default {
|
|
|
rRecomendR: [],
|
|
|
// 中间顶部tab
|
|
|
container_i: 0,
|
|
|
+ /* 下列顺便不能轻易变动 */
|
|
|
contentTabs: [
|
|
|
{
|
|
|
+ id: '0',
|
|
|
+ businesstype: '1',
|
|
|
name: "中药处方",
|
|
|
check: true,
|
|
|
- color: ""
|
|
|
+ hide: true,
|
|
|
+ color: '',
|
|
|
},
|
|
|
{
|
|
|
+ id: '1',
|
|
|
name: "中药制剂",
|
|
|
check: false,
|
|
|
hide: true,
|
|
|
color: ""
|
|
|
},
|
|
|
{
|
|
|
+ id: '2',
|
|
|
+ businesstype: '3',
|
|
|
name: "适宜技术处方",
|
|
|
check: false,
|
|
|
hide: true,
|
|
|
@@ -1362,6 +1368,12 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ try {
|
|
|
+ const tabs = this.getuserinfo.ableprescription.split(',');
|
|
|
+ for (const id of tabs) try { this.contentTabs.find(item => item.id === id).hide = false; } catch (e) {}
|
|
|
+ } catch (e) {
|
|
|
+
|
|
|
+ }
|
|
|
// console.log(this.getIsSee, 'issee');
|
|
|
this.showSubmit = String(this.getIsSee) == "true" ? true : false;
|
|
|
|
|
|
@@ -1409,12 +1421,13 @@ export default {
|
|
|
else if (query.doctorCase) await this.changeAndJoin();
|
|
|
// 中医诊疗 -> 智能辩证
|
|
|
else if (query.type === "tuidao") {
|
|
|
- await Promise.all([
|
|
|
- this.inferRecipe(4, "1"),
|
|
|
- // this.inferRecipe(4, "3"),
|
|
|
- this.inferRecipe(),
|
|
|
- ])
|
|
|
- this.isTuiDaoZy = true;
|
|
|
+ this.isTuiDaoSuit = false;
|
|
|
+ this.isTuiDaoZy = false;
|
|
|
+ await this.inferRecipe();
|
|
|
+ const current = this.contentTabs[this.container_i];
|
|
|
+ if (!current) return;
|
|
|
+ if (current.id === '0') this.isTuiDaoZy = true
|
|
|
+ else if (current.id === '2') this.isTuiDaoSuit = true
|
|
|
}
|
|
|
// 处方编辑 recipeType
|
|
|
else if (query.from !== 'his' && this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
|
|
|
@@ -1429,9 +1442,11 @@ export default {
|
|
|
else if (this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
|
|
|
}
|
|
|
},
|
|
|
- // 参考医案
|
|
|
+
|
|
|
// 中医诊断推导点击
|
|
|
tcmClick(isauto = true) {
|
|
|
+ this.isTuiDaoZy = false;
|
|
|
+ this.isTuiDaoSuit = false;
|
|
|
let params = this.$refs.TCM.getParams();
|
|
|
|
|
|
if (!params.namemedicine || !params.syndrometypes) {
|
|
|
@@ -1452,14 +1467,23 @@ export default {
|
|
|
this.rDoctorCase.loadMore = true;
|
|
|
this.getDoctorCaseL();
|
|
|
// --end
|
|
|
+ const current = this.contentTabs[this.container_i];
|
|
|
+ if (!current) return;
|
|
|
|
|
|
- if (isauto) {
|
|
|
- this.inferRecipe(2);
|
|
|
+ if (isauto && current.id !== '1') {
|
|
|
+ this.inferRecipe(2, current.businesstype);
|
|
|
}
|
|
|
|
|
|
setTimeout(() => {
|
|
|
- this.inferRecipe(4, "1");
|
|
|
- this.inferRecipe(4, "3");
|
|
|
+ for (const tab of this.contentTabs) {
|
|
|
+ if (tab.id === '1' || tab.hide) continue;
|
|
|
+ this.inferRecipe(4, tab.businesstype).then(() => {
|
|
|
+ if (tab.id === current.id ) {
|
|
|
+ if (current.id === '0') this.isTuiDaoZy = true
|
|
|
+ else if (current.id === '2') this.isTuiDaoSuit = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
if (this.getPatiensInfo.pid) {
|
|
|
this.getPatiensBasisM();
|
|
|
}
|
|
|
@@ -1480,6 +1504,7 @@ export default {
|
|
|
let child3 = children[2];
|
|
|
|
|
|
let obj = {
|
|
|
+ contentTabs: this.contentTabs,
|
|
|
container_i: this.container_i,
|
|
|
child1: {
|
|
|
recipe_tabs: child1.recipe_tabs,
|
|
|
@@ -1489,12 +1514,7 @@ export default {
|
|
|
tableData3: child2.tableData3,
|
|
|
bottom_form: child2.bottom_form
|
|
|
},
|
|
|
- child3: {
|
|
|
- tableData4: child3.tableData4,
|
|
|
- listLeft: child3.listLeft,
|
|
|
- listRight: child3.listRight,
|
|
|
- bottom_form: child3.bottom_form
|
|
|
- },
|
|
|
+ child3: Object.assign({...child3.$data}, {acupointList: []}),
|
|
|
rationalMed: {
|
|
|
// 保存右侧合理用药信息
|
|
|
rationalMed: this.rationalMed,
|
|
|
@@ -1535,6 +1555,8 @@ export default {
|
|
|
let child2 = children[1];
|
|
|
let child3 = children[2];
|
|
|
|
|
|
+ child1.recipe_tabs = storageData.child1.recipe_tabs;
|
|
|
+ child1.recipe_tabs_c = storageData.child1.recipe_tabs_c;
|
|
|
if (typeof child1.loaded === 'function') await child1.loaded(storageData.child1);
|
|
|
|
|
|
if (storageData.child1.recipe_tabs[0].totalTableD.length > 1) {
|
|
|
@@ -1542,7 +1564,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (storageData.child3.tableData4.length > 1) {
|
|
|
- this.isTuiDaoZy = true;
|
|
|
+ this.isTuiDaoSuit = true;
|
|
|
}
|
|
|
|
|
|
if (ignoreTable) {
|
|
|
@@ -1554,10 +1576,8 @@ export default {
|
|
|
storageData.child2.tableData3 = [];
|
|
|
storageData.child3.tableData4 = [];
|
|
|
}
|
|
|
-
|
|
|
+ this.contentTabs = storageData.contentTabs;
|
|
|
this.container_i = storageData.container_i;
|
|
|
- child1.recipe_tabs = storageData.child1.recipe_tabs;
|
|
|
- child1.recipe_tabs_c = storageData.child1.recipe_tabs_c;
|
|
|
// child1.getSelectType("剂型", 0);
|
|
|
// child1.getSelectType("处方用法");
|
|
|
// child1.getSelectType("中药服药时间");
|
|
|
@@ -1566,10 +1586,7 @@ export default {
|
|
|
child2.tableData3 = storageData.child2.tableData3;
|
|
|
child2.bottom_form = storageData.child2.bottom_form;
|
|
|
|
|
|
- child3.tableData4 = storageData.child3.tableData4;
|
|
|
- child3.listLeft = storageData.child3.listLeft;
|
|
|
- child3.listRight = storageData.child3.listRight;
|
|
|
- child3.bottom_form = storageData.child3.bottom_form;
|
|
|
+ for (const [key, value] of Object.entries(storageData.child3)) child3[key] = value;
|
|
|
|
|
|
this.rationalMed = storageData.rationalMed.rationalMed;
|
|
|
// 保存右侧合理用药信息
|
|
|
@@ -1654,16 +1671,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 处理中药处方提交数据
|
|
|
- dealRecipe1() {
|
|
|
- let children = this.$children.filter(item => {
|
|
|
- return (
|
|
|
- item.name == "中药处方" ||
|
|
|
- item.name == "中药制剂" ||
|
|
|
- item.name == "适宜技术处方"
|
|
|
- );
|
|
|
- });
|
|
|
- let data1 = children[0];
|
|
|
-
|
|
|
+ dealRecipe1(data1) {
|
|
|
let isAutoCheck = data1.isAutoCheck;
|
|
|
let hasDoseNum = true; // 是否有剂数
|
|
|
let hasData = true; // 是否有处方药品数据
|
|
|
@@ -1730,7 +1738,7 @@ export default {
|
|
|
if (!hasData) {
|
|
|
this.$message.error({
|
|
|
message: "请完善中药处方药品信息",
|
|
|
- showClose: false,
|
|
|
+ showClose: true,
|
|
|
type: "error"
|
|
|
});
|
|
|
return [];
|
|
|
@@ -1886,20 +1894,11 @@ export default {
|
|
|
console.groupEnd()
|
|
|
return zhongPrescriptionVo;
|
|
|
},
|
|
|
- // 处理中成药处方提交数据
|
|
|
- dealRecipe2() {
|
|
|
- let children = this.$children.filter(item => {
|
|
|
- return (
|
|
|
- item.name == "中药处方" ||
|
|
|
- item.name == "中药制剂" ||
|
|
|
- item.name == "适宜技术处方"
|
|
|
- );
|
|
|
- });
|
|
|
-
|
|
|
- let data1 = children[1];
|
|
|
+ // 处理中药制剂提交数据
|
|
|
+ dealRecipe2(data1) {
|
|
|
let isAutoCheck = data1.isAutoCheck;
|
|
|
- if (data1.tableData3.length == 1) {
|
|
|
- // this.$message.error("请完善中成药处方药品信息");
|
|
|
+ if (!data1.tableData3.filter(item => item.name).length) {
|
|
|
+ this.$message.error({ message: '请完善中药制剂药品信息', showClose: true });
|
|
|
return {};
|
|
|
}
|
|
|
let hasDrugMsg = [];
|
|
|
@@ -1989,18 +1988,10 @@ export default {
|
|
|
return obj;
|
|
|
},
|
|
|
// 处理适宜剂数处方提交数据
|
|
|
- dealRecipe3() {
|
|
|
- let children = this.$children.filter(item => {
|
|
|
- return (
|
|
|
- item.name == "中药处方" ||
|
|
|
- item.name == "中药制剂" ||
|
|
|
- item.name == "适宜技术处方"
|
|
|
- );
|
|
|
- });
|
|
|
- let data1 = children[2];
|
|
|
+ dealRecipe3(data1) {
|
|
|
let isAutoCheck = data1.isAutoCheck;
|
|
|
- if (data1.tableData4.length == 1) {
|
|
|
- // this.$message.error('请完善适宜技术处方药品信息')
|
|
|
+ if (!data1.tableData4.filter(item => item.name).length) {
|
|
|
+ this.$message.error({ message: '请完善适宜技术处方穴位信息', showClose: true });
|
|
|
return {};
|
|
|
}
|
|
|
let hasDrugMsg = [];
|
|
|
@@ -2012,7 +2003,7 @@ export default {
|
|
|
|
|
|
if (hasDrugMsg.length > 0) {
|
|
|
// this.$message.error(
|
|
|
- // "请完善适宜技术处方药品相关信息(序号:" + hasDrugMsg.join(",") + ")"
|
|
|
+ // "请完善适宜技术处方穴位相关信息(序号:" + hasDrugMsg.join(",") + ")"
|
|
|
// );
|
|
|
return false;
|
|
|
}
|
|
|
@@ -2315,7 +2306,7 @@ export default {
|
|
|
loading.close();
|
|
|
}, 1000);
|
|
|
},
|
|
|
- // 获取数据 赋值给 中成药处方
|
|
|
+ // 获取数据 赋值给 中药制剂
|
|
|
assignRecipe2(data, loading) {
|
|
|
setTimeout(() => {
|
|
|
let children = this.$children.filter(item => {
|
|
|
@@ -2604,118 +2595,84 @@ export default {
|
|
|
},
|
|
|
// 提交中药处方
|
|
|
async submitRecipe1() {
|
|
|
- let zhongPrescriptionVo = this.dealRecipe1();
|
|
|
- if (!zhongPrescriptionVo.length) return;
|
|
|
-
|
|
|
- if (!await this.$refs.TCM.saveDiagnosisData()) return;
|
|
|
+ const cancel = (id) => {
|
|
|
+ this.saving = false;
|
|
|
+ if (id) this.container_i = this.contentTabs.findIndex(tab => tab.id === id);
|
|
|
+ }
|
|
|
|
|
|
this.saving = true;
|
|
|
- try {
|
|
|
- const {options, force} = await this.getRationalSafeUse();
|
|
|
- if (options.length) {
|
|
|
- const child = this.$children.find(item => item.name === "中药处方");
|
|
|
- const results = await Promise.all(child.recipe_tabs.map((_, index) => this.getRationalMed2(index)));
|
|
|
- const tips = results.map((item, index) => {
|
|
|
- const value = options.map(i => item[i] ? `<div class="title">${item[i].title}</div><div class="content">${item[i].collection.join('')}</div>` : '').join('');
|
|
|
- return value ? `<div style="padding-top: ${index ? 12 : 0}px;border-bottom: 1px dashed #dcdcdc;"><h2 style="margin-bottom: 16px;">${item.title}</h2>${value}</div>` : '';
|
|
|
- }).join('');
|
|
|
- if (tips) {
|
|
|
- if (!force) {
|
|
|
- this.$message({
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- customClass: 'message-rational-safe-use-wrapper',
|
|
|
- message: tips,
|
|
|
- duration: 1000 * 3,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
- } else if (await this.$confirm(tips, '温馨提示:是否保存处方?', {
|
|
|
- confirmButtonText: '保存',
|
|
|
- cancelButtonText: '取消',
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- customClass: 'message-rational-safe-use-wrapper',
|
|
|
- }).then(() => /* 继续 */ false, () => /* 取消 */ true)) return;
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (e) {}
|
|
|
- this.saving = false;
|
|
|
+ if (!await this.$refs.TCM.saveDiagnosisData()) return cancel();
|
|
|
|
|
|
+ let zhongPrescriptionVo = [];
|
|
|
let chengPrescriptionVo = {};
|
|
|
- // setTimeout(() => {
|
|
|
- // chengPrescriptionVo = this.dealRecipe2();
|
|
|
- // }, 100);
|
|
|
let technologyPrescriptionVo = {};
|
|
|
- // setTimeout(() => {
|
|
|
- // technologyPrescriptionVo = this.dealRecipe3();
|
|
|
- // }, 200);
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- /*if (technologyPrescriptionVo === false) {
|
|
|
- technologyPrescriptionVo = {};
|
|
|
- this.container_i = 2;
|
|
|
- return;
|
|
|
- }
|
|
|
+ const selected = this.contentTabs[this.container_i];
|
|
|
+ const tabs = this.contentTabs.filter(tab => tab.check && tab.id !== selected.id)
|
|
|
+ tabs.unshift(selected);
|
|
|
|
|
|
- if (chengPrescriptionVo === false) {
|
|
|
- chengPrescriptionVo = {};
|
|
|
- this.container_i = 1;
|
|
|
- return;
|
|
|
- }*/
|
|
|
+ for (const tab of tabs) {
|
|
|
|
|
|
- if (zhongPrescriptionVo === false) {
|
|
|
- zhongPrescriptionVo = [];
|
|
|
- this.container_i = 0;
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
- if (Object.keys(zhongPrescriptionVo).length === 0) return;
|
|
|
+ const child = this.$children.find(child => child.name === tab.name);
|
|
|
+ if (!(child.saveable || selected.id === tab.id)) continue;
|
|
|
|
|
|
- /*if (
|
|
|
- zhongPrescriptionVo.length == 0 &&
|
|
|
- Object.keys(zhongPrescriptionVo).length == 0 &&
|
|
|
- Object.keys(technologyPrescriptionVo).length == 0
|
|
|
- )
|
|
|
- return;*/
|
|
|
+ switch (tab.id) {
|
|
|
+ case /*中药处方*/
|
|
|
+ '0': {
|
|
|
+ zhongPrescriptionVo = this.dealRecipe1(child);
|
|
|
+ if (!zhongPrescriptionVo || !zhongPrescriptionVo.length) return cancel(tab.id);
|
|
|
+ try {
|
|
|
+ const {options, force} = await this.getRationalSafeUse();
|
|
|
+ if (options.length) {
|
|
|
+ const results = await Promise.all(child.recipe_tabs.map((_, index) => this.getRationalMed2(index)));
|
|
|
+ const tips = results.map((item, index) => {
|
|
|
+ const value = options.map(i => item[i] ? `<div class="title">${item[i].title}</div><div class="content">${item[i].collection.join('')}</div>` : '').join('');
|
|
|
+ return value ? `<div style="padding-top: ${index ? 12 : 0}px;border-bottom: 1px dashed #dcdcdc;"><h2 style="margin-bottom: 16px;">${item.title}</h2>${value}</div>` : '';
|
|
|
+ }).join('');
|
|
|
+ if (tips) {
|
|
|
+ if (!force) {
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ customClass: 'message-rational-safe-use-wrapper',
|
|
|
+ message: tips,
|
|
|
+ duration: 1000 * 3,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ } else if (await this.$confirm(tips, '温馨提示:是否保存处方?', {
|
|
|
+ confirmButtonText: '保存',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ customClass: 'message-rational-safe-use-wrapper',
|
|
|
+ }).then(() => /* 继续 */ false, () => /* 取消 */ true)) return cancel(tab.id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (e) {}
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case /*中药制剂*/
|
|
|
+ '1': {
|
|
|
+ if (+child.paystate === 1) continue;
|
|
|
+ chengPrescriptionVo = this.dealRecipe2(child);
|
|
|
+ if (!chengPrescriptionVo || !Object.keys(chengPrescriptionVo).length) return cancel(tab.id);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case /*适宜技术*/
|
|
|
+ '2': {
|
|
|
+ if (+child.paystate === 1) continue;
|
|
|
+ technologyPrescriptionVo = this.dealRecipe3(child);
|
|
|
+ if (!technologyPrescriptionVo || !Object.keys(technologyPrescriptionVo).length) return cancel(tab.id);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- this._getRecipePriview(
|
|
|
+ await this._getRecipePriview(
|
|
|
zhongPrescriptionVo,
|
|
|
chengPrescriptionVo,
|
|
|
technologyPrescriptionVo
|
|
|
- );
|
|
|
- // if (this.isShowDj || this.isShowPs) {
|
|
|
- // this.showAddress = true;
|
|
|
- // } else {
|
|
|
- // this._getRecipePriview(
|
|
|
- // zhongPrescriptionVo,
|
|
|
- // chengPrescriptionVo,
|
|
|
- // technologyPrescriptionVo
|
|
|
- // );
|
|
|
- // }
|
|
|
-
|
|
|
- // if (zhongPrescriptionVo && zhongPrescriptionVo.length > 0) {
|
|
|
- // // 有中药处方 打开是否存为协定方界面
|
|
|
- // this.$confirm("是否存为协定方?", "温馨提示", {
|
|
|
- // confirmButtonText: "是",
|
|
|
- // cancelButtonText: "否",
|
|
|
- // type: "warning"
|
|
|
- // })
|
|
|
- // .then(() => {
|
|
|
- // this.zhongPrescriptionVo = zhongPrescriptionVo;
|
|
|
- // this.chengPrescriptionVo = chengPrescriptionVo;
|
|
|
- // this.technologyPrescriptionVo = technologyPrescriptionVo;
|
|
|
-
|
|
|
- // this.$refs.chineseM.saveToMine("reserve");
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // this._getRecipePriview(
|
|
|
- // zhongPrescriptionVo,
|
|
|
- // chengPrescriptionVo,
|
|
|
- // technologyPrescriptionVo
|
|
|
- // );
|
|
|
- // });
|
|
|
- // } else {
|
|
|
-
|
|
|
- // }
|
|
|
- }, 500);
|
|
|
+ );
|
|
|
+ return cancel();
|
|
|
},
|
|
|
|
|
|
// 修改推荐方剂轮播图下标
|
|
|
@@ -2768,13 +2725,24 @@ export default {
|
|
|
find(scope) {
|
|
|
this.getAcupointD(scope.row.acuid);
|
|
|
},
|
|
|
-
|
|
|
+ clearContainer(id) {
|
|
|
+ try { this.contentTabs.find(tab => tab.id === id).color = ''; } catch (e) {}
|
|
|
+ },
|
|
|
// 顶部tab 改变
|
|
|
- changeContainer(type) {
|
|
|
+ async changeContainer(item, type) {
|
|
|
this.container_i = type;
|
|
|
- if (type == 1) return;
|
|
|
+ item.check = true;
|
|
|
+ if (item.id === '1') return;
|
|
|
// if (this.contentTabs[type].color == 'red') {
|
|
|
- this.inferRecipe(3);
|
|
|
+ await this.inferRecipe(3, item.businesstype);
|
|
|
+
|
|
|
+ const child = this.$children.find(child => child.name === item.name);
|
|
|
+ if (!child) return
|
|
|
+ if (item.id === '0') {
|
|
|
+ try { this.tjRecipeId = child.recipe_tabs[child.recipe_tabs_c].id; } catch (e) { this.tjRecipeId = "" }
|
|
|
+ } else if (item.id === '2') {
|
|
|
+ try { this.tjRecipeId = child.recipeId; } catch (e) { this.tjRecipeId = "" }
|
|
|
+ }
|
|
|
// }
|
|
|
|
|
|
// if (type == 2) {
|
|
|
@@ -2819,6 +2787,7 @@ export default {
|
|
|
// 名家验案转方
|
|
|
turnRecipe(item) {
|
|
|
this.setDrugsInfo(item.verpreitemlist);
|
|
|
+ this.setRecipeId('');
|
|
|
this.changeAndJoin();
|
|
|
this.addRecipeFrom("5");
|
|
|
},
|
|
|
@@ -2850,6 +2819,7 @@ export default {
|
|
|
});
|
|
|
if (recipe.__RecipeFrom__ === '2') this.agreeAssignToTCM(recipe, void 0, true);
|
|
|
this.setDrugsInfo(medicines);
|
|
|
+ this.setRecipeId('');
|
|
|
this.changeAndJoin(1);
|
|
|
} else if (recipe.__RecipeFrom__ === '2') {
|
|
|
this.agreeInfo = recipe;
|
|
|
@@ -2989,24 +2959,24 @@ export default {
|
|
|
suitChnageOrJoin(type = "") {
|
|
|
// type = '' 专访 type == 1 和方
|
|
|
if (this.container_i == 1) return;
|
|
|
+
|
|
|
+ const child = this.$children.find(child => child.name === '适宜技术处方');
|
|
|
+ if (!child) return;
|
|
|
+
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: "正在处理数据,请稍后",
|
|
|
spinner: "el-icon-loading",
|
|
|
background: "rgba(0, 0, 0, 0.7)"
|
|
|
});
|
|
|
- let children = this.$children.filter(item => {
|
|
|
- return (
|
|
|
- item.name == "中药处方" ||
|
|
|
- item.name == "中药制剂" ||
|
|
|
- item.name == "适宜技术处方"
|
|
|
- );
|
|
|
- });
|
|
|
- let child = children[2];
|
|
|
|
|
|
let drugs = this.getDrugInfo;
|
|
|
+ const recipeId = +type !== 1 ? this.getRecipeId : "";
|
|
|
+ this.setRecipeId('');
|
|
|
+ this.tjRecipeId = recipeId
|
|
|
|
|
|
if (type == "") {
|
|
|
+ child.bottom_form.caozuo = '';
|
|
|
// 转方
|
|
|
child.tableData4 = [];
|
|
|
drugs.forEach((item, index) => {
|
|
|
@@ -3017,8 +2987,7 @@ export default {
|
|
|
acuid: item.acuid
|
|
|
};
|
|
|
// 锚点
|
|
|
- child.bottom_form.caozuo +=
|
|
|
- obj.acuname + ":" + item.acuoperation + " ";
|
|
|
+ if (item.acuoperation) child.bottom_form.caozuo += obj.acuname + ':' + item.acuoperation + ' ';
|
|
|
child.tableData4.push(obj);
|
|
|
});
|
|
|
child.tableData4.push({
|
|
|
@@ -3033,15 +3002,18 @@ export default {
|
|
|
});
|
|
|
} else if (type == 1) {
|
|
|
child.tableData4.pop();
|
|
|
- drugs.forEach((item, index) => {
|
|
|
+ for (const item of drugs) {
|
|
|
+ if (child.tableData4.find(({acuid}) => acuid === item.acuid)) continue;
|
|
|
let obj = {
|
|
|
- id: index + 1,
|
|
|
+ id: child.tableData4.length + 1,
|
|
|
name: item.acuname,
|
|
|
acuname: item.acuname,
|
|
|
- acuid: item.acuid
|
|
|
+ acuid: item.acuid,
|
|
|
};
|
|
|
+ // 锚点
|
|
|
+ if (item.acuoperation) child.bottom_form.caozuo += obj.acuname + ':' + item.acuoperation + ' ';
|
|
|
child.tableData4.push(obj);
|
|
|
- });
|
|
|
+ }
|
|
|
child.tableData4.push({
|
|
|
id: "",
|
|
|
name: "",
|
|
|
@@ -3053,7 +3025,7 @@ export default {
|
|
|
return (item.id = index + 1);
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ child.recipeId = recipeId
|
|
|
this.showDialog = false;
|
|
|
|
|
|
loading.close();
|
|
|
@@ -3064,6 +3036,7 @@ export default {
|
|
|
this.addRecipeFrom("4", 2);
|
|
|
if (type == 1 && type1 == 1) {
|
|
|
this.setDrugsInfo(item.items);
|
|
|
+ this.setRecipeId('');
|
|
|
this.suitChnageOrJoin();
|
|
|
return;
|
|
|
}
|
|
|
@@ -3080,6 +3053,7 @@ export default {
|
|
|
this.addRecipeFrom("4", 2);
|
|
|
if (type == 1 && type1 == 1) {
|
|
|
this.setDrugsInfo(item.items);
|
|
|
+ this.setRecipeId('');
|
|
|
this.suitChnageOrJoin(1);
|
|
|
return;
|
|
|
}
|
|
|
@@ -3100,6 +3074,7 @@ export default {
|
|
|
}
|
|
|
this.addRecipeFrom("4");
|
|
|
this.setDrugsInfo(this.preInfo.items);
|
|
|
+ this.setRecipeId('');
|
|
|
this.changeAndJoin(2);
|
|
|
},
|
|
|
// 方剂换方
|
|
|
@@ -3297,13 +3272,7 @@ export default {
|
|
|
this.contentTabs[1].check = res.Data.zhongchengyao.chengDetail !== null;
|
|
|
this.contentTabs[2].check = res.Data.technology.detail !== null;
|
|
|
|
|
|
- this.container_i = this.contentTabs[0].check
|
|
|
- ? 0
|
|
|
- : this.contentTabs[1].check
|
|
|
- ? 1
|
|
|
- : this.contentTabs[2].check
|
|
|
- ? 2
|
|
|
- : 0;
|
|
|
+ this.container_i = Math.max(this.contentTabs.findIndex(item => item.check), 0);
|
|
|
|
|
|
this.chineseM.allMoney = res.Data.zhonyaoPrice;
|
|
|
this.medicineC.allMoney = res.Data.zhonchengPrice;
|
|
|
@@ -3314,17 +3283,14 @@ export default {
|
|
|
res.Data.zhongyao.forEach((item, index) => {
|
|
|
this._recipeIsPay(item.preId, 2, index);
|
|
|
});
|
|
|
- this.container_i = 0;
|
|
|
}
|
|
|
if (this.contentTabs[1].check) {
|
|
|
this.assignRecipe2(res.Data.zhongchengyao, loading);
|
|
|
this._recipeIsPay(res.Data.zhongchengyao.preId, 2);
|
|
|
- this.container_i = 1;
|
|
|
}
|
|
|
if (this.contentTabs[2].check) {
|
|
|
this.assignRecipe3(res.Data.technology, loading);
|
|
|
this._recipeIsPay(res.Data.technology.preId, 2);
|
|
|
- this.container_i = 2;
|
|
|
}
|
|
|
if (this.getPatiensInfo.pid) {
|
|
|
this.getPatiensBasisM();
|
|
|
@@ -3817,7 +3783,7 @@ export default {
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
- if (type != 4) {
|
|
|
+ if (type != 4 && businesstype == null) {
|
|
|
businesstype =
|
|
|
this.container_i == 0 ? "1" : this.container_i == 2 ? "3" : "1";
|
|
|
}
|
|
|
@@ -3855,9 +3821,10 @@ export default {
|
|
|
let arr2 = res.data.expList.concat(res.data.schemes[0].pres);
|
|
|
|
|
|
if (type == 4) {
|
|
|
- this.contentTabs[businesstype - 1].color =
|
|
|
- arr2.length > 0 ? "red" : "";
|
|
|
+ try { this.contentTabs.find(tab => tab.businesstype === businesstype).color = arr2.length > 0 ? "red" : ""; } catch (e) {}
|
|
|
return;
|
|
|
+ } else if (+type === 1) {
|
|
|
+ for (const tab of this.contentTabs) { if (!tab.hide) tab.color = "" }
|
|
|
}
|
|
|
if (arr2.length > 0) {
|
|
|
this.tjRecipeId = arr2[0].preid || arr2[0].pid || arr2[0].acupreid;
|
|
|
@@ -3880,8 +3847,10 @@ export default {
|
|
|
this.rRecomendR = arr2;
|
|
|
|
|
|
if (this.$route.query.type != "tuidao" && type == 1) return;
|
|
|
- if (type == 3 && this.container_i == 0 && this.isTuiDaoZy) return;
|
|
|
- if (type == 3 && this.container_i == 2 && this.isTuiDaoSuit) return;
|
|
|
+ if (type === 3) {
|
|
|
+ try { if (this.contentTabs[this.container_i].id === '0' && this.isTuiDaoZy) return; } catch (e) {}
|
|
|
+ try { if (this.contentTabs[this.container_i].id === '2' && this.isTuiDaoSuit) return; } catch (e) {}
|
|
|
+ }
|
|
|
if (this.rRecomendR.length == 0) return;
|
|
|
|
|
|
let children = this.$children.filter(item => {
|
|
|
@@ -3933,6 +3902,7 @@ export default {
|
|
|
// && child2.tableData4.length == 1
|
|
|
if (arr2.length > 0) {
|
|
|
this.setDrugsInfo(arr2[0].items);
|
|
|
+ this.setRecipeId(arr2[0].acupreid);
|
|
|
}
|
|
|
|
|
|
this.addRecipeFrom("4", 2);
|
|
|
@@ -4014,6 +3984,9 @@ export default {
|
|
|
let child = children[0];
|
|
|
child.recipe_tabs[child.recipe_tabs_c].disable = false;
|
|
|
let drugs = this.getDrugInfo;
|
|
|
+ const recipeId = +type === 1 ? this.getRecipeId : "";
|
|
|
+ this.setRecipeId('');
|
|
|
+ this.tjRecipeId = recipeId;
|
|
|
|
|
|
// let type1 = 0
|
|
|
let type1 = child.recipe_tabs[child.recipe_tabs_c].radio.split("@")[1];
|
|
|
@@ -4278,6 +4251,7 @@ export default {
|
|
|
this.showPresc = false;
|
|
|
this.showUnifyPresc = false;
|
|
|
loading.close();
|
|
|
+ try { child.recipe_tabs[child.recipe_tabs_c].id = recipeId; } catch (e) {}
|
|
|
}
|
|
|
} else if (this.container_i == 2) {
|
|
|
// 适宜技术处方
|
|
|
@@ -4345,8 +4319,8 @@ export default {
|
|
|
// 适宜技术处方
|
|
|
this.preInfo = id;
|
|
|
this.setDrugsInfo(id.items);
|
|
|
+ this.setRecipeId(id.acupreid);
|
|
|
this.showDialog = true;
|
|
|
- this.tjRecipeId = id.acupreid;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -4356,11 +4330,11 @@ export default {
|
|
|
|
|
|
if (res.code === 0) {
|
|
|
this.preInfo = res.data;
|
|
|
- if (type == 1 || type == "") {
|
|
|
+ /*if (type == 1 || type == "") {
|
|
|
this.tjRecipeId = id;
|
|
|
- }
|
|
|
-
|
|
|
+ }*/
|
|
|
this.setDrugsInfo(res.data.items);
|
|
|
+ this.setRecipeId(id);
|
|
|
if (!type || type == 2) {
|
|
|
// console.log(res.data, 'RES.datas');
|
|
|
if (type == "") {
|
|
|
@@ -4445,10 +4419,15 @@ export default {
|
|
|
return this.$route.query && this.$route.query.recipeType === "edit" ? this.$route.query.recipeID : this.getPreNo;
|
|
|
},
|
|
|
...mapMutations({
|
|
|
+ setRecipeId: "drug/setRecipeId",
|
|
|
setDrugsInfo: "drug/setDrugsInfo"
|
|
|
})
|
|
|
},
|
|
|
computed: {
|
|
|
+ // 显示协定方按钮
|
|
|
+ showPrec() {
|
|
|
+ try { return this.contentTabs[this.container_i].id === '0' } catch (e) { return true }
|
|
|
+ },
|
|
|
// 三种药房合计金额
|
|
|
totalPrice() {
|
|
|
return (this.contentTabs[0].check
|
|
|
@@ -4460,7 +4439,7 @@ export default {
|
|
|
: 0
|
|
|
).toFixed(2);
|
|
|
},
|
|
|
- ...mapGetters(["getPatiensInfo", "getuserinfo", "getDrugInfo", "getIsSee", "getPreNo"])
|
|
|
+ ...mapGetters(["getPatiensInfo", "getuserinfo", "getDrugInfo", "getRecipeId", "getIsSee", "getPreNo"])
|
|
|
},
|
|
|
filters: {
|
|
|
ftsjj(value) {
|