|
@@ -731,6 +731,14 @@ export default {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false,
|
|
default: false,
|
|
|
},
|
|
},
|
|
|
|
|
+ reportAddRecipe: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ useIsUpdateLock: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false,
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -795,7 +803,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
isLocked() {
|
|
isLocked() {
|
|
|
- return this.innerIsEditable === "0";
|
|
|
|
|
|
|
+ return this.useIsUpdateLock && this.innerIsEditable === "0";
|
|
|
},
|
|
},
|
|
|
activeDetailTypes() {
|
|
activeDetailTypes() {
|
|
|
const validTypes = ["穴位", "经络", "耳穴", "部位", "其他详情"];
|
|
const validTypes = ["穴位", "经络", "耳穴", "部位", "其他详情"];
|
|
@@ -936,7 +944,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this._isLoadingTab = false;
|
|
this._isLoadingTab = false;
|
|
|
- // 加载完毕后,如果是自动计算模式,触发一次初始计算
|
|
|
|
|
if (this.currentSingleNumber !== "0") {
|
|
if (this.currentSingleNumber !== "0") {
|
|
|
this.updatePrice();
|
|
this.updatePrice();
|
|
|
}
|
|
}
|
|
@@ -1069,12 +1076,10 @@ export default {
|
|
|
|
|
|
|
|
// 价格
|
|
// 价格
|
|
|
const price = detailData.price || 0;
|
|
const price = detailData.price || 0;
|
|
|
- // 保存旧 tab 数据
|
|
|
|
|
if (this.prescriptions.length > 0) {
|
|
if (this.prescriptions.length > 0) {
|
|
|
this.saveCurrentTabData();
|
|
this.saveCurrentTabData();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 从 itemOptions 中获取选中项的 classify
|
|
|
|
|
const selectedItem = this.itemOptions.find(
|
|
const selectedItem = this.itemOptions.find(
|
|
|
(i) => i.id === this.addForm.itemId,
|
|
(i) => i.id === this.addForm.itemId,
|
|
|
);
|
|
);
|
|
@@ -1111,6 +1116,7 @@ export default {
|
|
|
this.showAddDialog = false;
|
|
this.showAddDialog = false;
|
|
|
this.addLoading = false;
|
|
this.addLoading = false;
|
|
|
this.$emit("prescriptions-change", this.prescriptions);
|
|
this.$emit("prescriptions-change", this.prescriptions);
|
|
|
|
|
+ if (this.reportAddRecipe) this.$emit('add-recipe');
|
|
|
},
|
|
},
|
|
|
removePrescription(index) {
|
|
removePrescription(index) {
|
|
|
this.$confirm("确认删除该处方?", "提示", {
|
|
this.$confirm("确认删除该处方?", "提示", {
|
|
@@ -1347,7 +1353,6 @@ export default {
|
|
|
this.addDetailRow(scope, detailType);
|
|
this.addDetailRow(scope, detailType);
|
|
|
},
|
|
},
|
|
|
onDetailInput(scope, detailType) {
|
|
onDetailInput(scope, detailType) {
|
|
|
- // 其他详情输入文字后自动新增一行
|
|
|
|
|
if (scope.row.name) {
|
|
if (scope.row.name) {
|
|
|
this.addDetailRow(scope, detailType);
|
|
this.addDetailRow(scope, detailType);
|
|
|
}
|
|
}
|
|
@@ -1370,13 +1375,11 @@ export default {
|
|
|
this.searchByType("", detailType);
|
|
this.searchByType("", detailType);
|
|
|
},
|
|
},
|
|
|
isDeleteDisabled(row, detailType) {
|
|
isDeleteDisabled(row, detailType) {
|
|
|
- // 当 isLocked 为 true 时(isUpdate === "0"),限制删除操作
|
|
|
|
|
if (this.isLocked) {
|
|
if (this.isLocked) {
|
|
|
- // 穴位:主穴不可删除,配穴可以删除
|
|
|
|
|
if (detailType === '穴位') {
|
|
if (detailType === '穴位') {
|
|
|
return row.mainType === '1'; // 主穴不可删除
|
|
return row.mainType === '1'; // 主穴不可删除
|
|
|
}
|
|
}
|
|
|
- // 耳穴、经络、部位、其他详情:全部不可删除
|
|
|
|
|
|
|
+
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
return false;
|
|
return false;
|
|
@@ -1495,7 +1498,6 @@ export default {
|
|
|
this.$message.warning("请输入单次数量");
|
|
this.$message.warning("请输入单次数量");
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- // 当 requiredTreatFields 为 true 时,验证治疗次数和频次必填
|
|
|
|
|
if (this.requiredTreatFields) {
|
|
if (this.requiredTreatFields) {
|
|
|
if (!this.treatCount || this.treatCount <= 0) {
|
|
if (!this.treatCount || this.treatCount <= 0) {
|
|
|
this.$message.warning("请输入治疗次数");
|
|
this.$message.warning("请输入治疗次数");
|
|
@@ -1596,7 +1598,7 @@ export default {
|
|
|
command: d.command || "",
|
|
command: d.command || "",
|
|
|
pointMatchGuide: d.pointMatchGuide || "",
|
|
pointMatchGuide: d.pointMatchGuide || "",
|
|
|
seqn: index + 1,
|
|
seqn: index + 1,
|
|
|
- ownerType: "1",
|
|
|
|
|
|
|
+ ownerType: this.ownerType || "1",
|
|
|
detailPoint,
|
|
detailPoint,
|
|
|
detailMeridian,
|
|
detailMeridian,
|
|
|
detailEarPoint,
|
|
detailEarPoint,
|
|
@@ -1648,7 +1650,6 @@ export default {
|
|
|
item.detailOther || [],
|
|
item.detailOther || [],
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
- // 按 type 分组到 detailTables
|
|
|
|
|
const detailTables = {
|
|
const detailTables = {
|
|
|
穴位: [],
|
|
穴位: [],
|
|
|
经络: [],
|
|
经络: [],
|
|
@@ -1703,7 +1704,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 构造 tab 数据
|
|
|
|
|
const singleNumber = item.basisStitutionsnondrug?.singleNumber || "0";
|
|
const singleNumber = item.basisStitutionsnondrug?.singleNumber || "0";
|
|
|
this.prescriptionDataMap[index] = {
|
|
this.prescriptionDataMap[index] = {
|
|
|
detailTables,
|
|
detailTables,
|
|
@@ -1777,7 +1777,6 @@ export default {
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
|
|
|
|
|
- // tab + 按钮同一行
|
|
|
|
|
.prescription-header {
|
|
.prescription-header {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -1832,7 +1831,6 @@ export default {
|
|
|
margin-left: auto;
|
|
margin-left: auto;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 底部金额 - 固定在最底部
|
|
|
|
|
.table-b-bottom {
|
|
.table-b-bottom {
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
|
padding: 10px;
|
|
padding: 10px;
|
|
@@ -1859,7 +1857,6 @@ export default {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
min-height: 0;
|
|
min-height: 0;
|
|
|
|
|
|
|
|
- // 工具栏
|
|
|
|
|
.table-toolbar {
|
|
.table-toolbar {
|
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
|
padding: 0 5px;
|
|
padding: 0 5px;
|
|
@@ -2005,7 +2002,6 @@ export default {
|
|
|
height: 33px !important;
|
|
height: 33px !important;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 详情弹窗样式(scoped 内)
|
|
|
|
|
.drug-body {
|
|
.drug-body {
|
|
|
padding: 10px;
|
|
padding: 10px;
|
|
|
|
|
|