1. 特色方功能迭代
This commit is contained in:
@@ -96,8 +96,8 @@
|
||||
<u-button size="mini" type="primary" plain @click="openSalespersonTransfer">查看传方</u-button>
|
||||
</view>
|
||||
|
||||
<!-- 诊断输入区域 -->
|
||||
<view class="top white p-32 flex-col m-t-16 radius-12 mx-32">
|
||||
<!-- 诊断输入区域(传方模式不展示) -->
|
||||
<view v-if="!isSalespersonTransferMode" class="top white p-32 flex-col m-t-16 radius-12 mx-32">
|
||||
<view class="top_title flex-row flex-ali-center">
|
||||
<image :src="require('@/static/image/js.png')" class="size-32"></image>
|
||||
<d-text text="临床诊断" className="fs-32 m-l-16 font-bold" color="#333"></d-text>
|
||||
@@ -232,7 +232,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="white p-32 radius-12 m-t-24 flex-col" v-if="currentDrugs.length > 0">
|
||||
<view class="white p-32 radius-12 m-t-24 flex-col" v-if="currentDrugs.length > 0 && !isSalespersonTransferMode">
|
||||
<view class="flex-jus-sp flex-row flex-ali-center">
|
||||
<d-text text="医嘱补充" color="#333" className="font-bold"></d-text>
|
||||
<d-text @click="handleOpenDoctorOrderModal" text="选择常用医嘱" color="#6ACDBB"></d-text>
|
||||
@@ -369,7 +369,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="white p-32 radius-12 m-t-24 flex-col" v-if="currentDrugs.length > 0">
|
||||
<view class="white p-32 radius-12 m-t-24 flex-col" v-if="currentDrugs.length > 0 && !isSalespersonTransferMode">
|
||||
<view class="flex-jus-sp flex-row flex-ali-center">
|
||||
<d-text text="医嘱补充" color="#333" className="font-bold"></d-text>
|
||||
<d-text @click="handleOpenDoctorOrderModal" text="选择常用医嘱" color="#6ACDBB"></d-text>
|
||||
@@ -381,8 +381,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 医嘱输入区域(中药和简单产品共用) -->
|
||||
<view class="flex-col white p-32 radius-12 mx-32 m-t-24" v-if="activeCategory === 1 && currentDrugs.length > 0">
|
||||
<!-- 医嘱输入区域(传方模式不展示) -->
|
||||
<view class="flex-col white p-32 radius-12 mx-32 m-t-24" v-if="activeCategory === 1 && currentDrugs.length > 0 && !isSalespersonTransferMode">
|
||||
<view class="flex-jus-sp flex-row flex-ali-center">
|
||||
<d-text text="医嘱补充" color="#333" className="font-bold"></d-text>
|
||||
<d-text @click="handleOpenDoctorOrderModal" text="选择常用医嘱" color="#6ACDBB" />
|
||||
@@ -469,8 +469,8 @@
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<view class="ac p-b-40 p-x-32 flex-row flex-jus-center">
|
||||
<!-- 提示信息(传方模式不展示) -->
|
||||
<view v-if="!isSalespersonTransferMode" class="ac p-b-40 p-x-32 flex-row flex-jus-center">
|
||||
<u-icon name="shield-check" color="#B0B6C2" size="28" class="m-r-8"></u-icon>
|
||||
<text class="fs-24 color-sub">请确认患者已在实体医院就诊,并有明确诊断</text>
|
||||
</view>
|
||||
@@ -1016,6 +1016,12 @@ export default {
|
||||
if (this.isSalespersonTransferMode) {
|
||||
this.registerId = SALESPERSON_TRANSFER_STORAGE_KEY;
|
||||
this._presetActiveCategory = 1;
|
||||
// 传方模式默认自制剂 + 剂包
|
||||
this.chineseConfig = {
|
||||
...this.chineseConfig,
|
||||
ruleType: 1,
|
||||
packageMethodId: 2,
|
||||
};
|
||||
} else {
|
||||
this.registerId = options.register_id || '';
|
||||
}
|
||||
@@ -1082,6 +1088,9 @@ export default {
|
||||
if (this.activeCategory === 1 && this.chineseConfig.ruleType === 2) {
|
||||
await this.hydrateChineseProcessRuleListsFromConfig();
|
||||
}
|
||||
if (this.isSalespersonTransferMode) {
|
||||
this.ensureSalespersonTransferPackageMethodDefault();
|
||||
}
|
||||
if (!this.isSalespersonTransferMode) {
|
||||
await this.maybeApplyReusePrescription();
|
||||
if (this.activeCategory === 1) await this.checkAndShowTransferTip();
|
||||
@@ -1121,6 +1130,19 @@ export default {
|
||||
console.error('加载基础配置数据失败:', error);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 传方模式:草稿未保存包法时默认剂包(id=2)
|
||||
*/
|
||||
ensureSalespersonTransferPackageMethodDefault() {
|
||||
if (!this.isSalespersonTransferMode || this.activeCategory !== 1) return;
|
||||
if (!this.chineseConfig.packageMethodId) {
|
||||
this.chineseConfig = {
|
||||
...this.chineseConfig,
|
||||
ruleType: 1,
|
||||
packageMethodId: 2,
|
||||
};
|
||||
}
|
||||
},
|
||||
restoreFromLocalStorage() {
|
||||
if (this._presetActiveCategory !== null && this._presetActiveCategory !== undefined && !Number.isNaN(this._presetActiveCategory)) {
|
||||
this.activeCategory = this._presetActiveCategory;
|
||||
@@ -2113,7 +2135,8 @@ export default {
|
||||
requireOnlineTcm: this.activeCategory === 1 && this.isOnlineRevisit,
|
||||
onlineTcmDiseasesId: this.onlineTcmDiseasesId,
|
||||
onlineTcmMethodId: this.onlineTcmMethodId,
|
||||
onlineTcmSyndromeId: this.onlineTcmSyndromeId
|
||||
onlineTcmSyndromeId: this.onlineTcmSyndromeId,
|
||||
skipDiagnosisAndAdvice: this.isSalespersonTransferMode,
|
||||
});
|
||||
},
|
||||
async checkChineseMedicineConflict() {
|
||||
@@ -2376,7 +2399,6 @@ export default {
|
||||
} catch (error) { console.error('保存常用方失败:', error); this.$toast('保存常用方失败,请重试'); }
|
||||
},
|
||||
buildSalespersonTransferPayload(patientData) {
|
||||
const clinicalDiagnose = this.diagnosisText || this.diagnoses.map((item) => item.name).join(',');
|
||||
const drugs = this.currentDrugs.map((drug) => ({
|
||||
drug_id: drug.id || drug.drug_id || drug.index_id,
|
||||
drug_name: drug.drug_name || drug.name,
|
||||
@@ -2388,8 +2410,10 @@ export default {
|
||||
patient_mobile: patientData.patient_mobile,
|
||||
patient_address: patientData.patient_address,
|
||||
prescription_images: patientData.prescription_images || [],
|
||||
clinical_diagnose: clinicalDiagnose,
|
||||
doctor_order: this.medicalAdvice || '',
|
||||
remark: patientData.remark || '',
|
||||
transfer_mode: 1,
|
||||
clinical_diagnose: '',
|
||||
doctor_order: '',
|
||||
dosage: this.chineseConfig.dosage || 7,
|
||||
day_dosage: this.chineseConfig.dayDosage || 2,
|
||||
drugs,
|
||||
|
||||
Reference in New Issue
Block a user