|
|
@@ -722,7 +722,6 @@ export default {
|
|
|
const p = this.prescriptions[this.activeIndex];
|
|
|
return p?.pricingUnit || "";
|
|
|
},
|
|
|
- // 当前处方的单次数量模式:"0"=默认1,"1"=详情累计/计数系数
|
|
|
currentSingleNumber() {
|
|
|
const p = this.prescriptions[this.activeIndex];
|
|
|
return p?.singleNumber || "0";
|
|
|
@@ -732,7 +731,6 @@ export default {
|
|
|
const p = this.prescriptions[this.activeIndex];
|
|
|
return Number(p?.countCoefficient) || 1;
|
|
|
},
|
|
|
- // 当前处方的详情累计项名称列表,如 ["穴位", "耳穴"]
|
|
|
currentDetailCumulativeTypes() {
|
|
|
const p = this.prescriptions[this.activeIndex];
|
|
|
const val = p?.detailCumulative || "";
|
|
|
@@ -777,7 +775,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // ========== Tab 切换 ==========
|
|
|
saveCurrentTabData() {
|
|
|
if (!this.prescriptions.length) return;
|
|
|
this.$set(this.prescriptionDataMap, this.activeIndex, {
|
|
|
@@ -947,7 +944,6 @@ export default {
|
|
|
this.classifyOptions.find((c) => c.value === this.addForm.category)
|
|
|
?.label || "";
|
|
|
|
|
|
- // 解析详情默认值 → 详情类型名称
|
|
|
const detailDefault = detailData.detailDefault || "";
|
|
|
const detailTypeValues = detailDefault
|
|
|
? String(detailDefault).split(",")
|
|
|
@@ -994,7 +990,6 @@ export default {
|
|
|
stitutionsName: detailData.institutionName || "",
|
|
|
});
|
|
|
|
|
|
- // 新 tab 的默认数据,根据详情设置
|
|
|
this.prescriptionDataMap[newIndex] = createPrescriptionData({
|
|
|
detailRequired,
|
|
|
detailTypes,
|
|
|
@@ -1002,7 +997,6 @@ export default {
|
|
|
unitPrice: price,
|
|
|
});
|
|
|
|
|
|
- // 切到新 tab
|
|
|
this.activeIndex = newIndex;
|
|
|
this.loadTabData(newIndex);
|
|
|
|
|
|
@@ -1047,7 +1041,6 @@ export default {
|
|
|
},
|
|
|
clearAll() {
|
|
|
if (!this.prescriptions.length) {
|
|
|
- // 没有处方 tab 时,仅重置表格和统计
|
|
|
this.detailTables = {
|
|
|
穴位: [createEmptyRow(1)],
|
|
|
经络: [],
|
|
|
@@ -1471,7 +1464,6 @@ export default {
|
|
|
};
|
|
|
});
|
|
|
},
|
|
|
- // 编辑时 回填组件数据
|
|
|
loadFromServerData(treatmentList) {
|
|
|
if (!Array.isArray(treatmentList) || !treatmentList.length) return;
|
|
|
|
|
|
@@ -1590,7 +1582,6 @@ export default {
|
|
|
this.activeIndex = 0;
|
|
|
this.loadTabData(0);
|
|
|
|
|
|
- // 疗程金额
|
|
|
let total = 0;
|
|
|
Object.values(this.prescriptionDataMap).forEach((d) => {
|
|
|
total += parseFloat(d.coursePrice) || 0;
|