门诊医生站-》开立医嘱:增加备注字段
This commit is contained in:
@@ -279,6 +279,15 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="备注:" prop="remarks" style="margin: 0; margin-right: 20px">
|
||||||
|
<el-input
|
||||||
|
v-model="scope.row.remarks"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
maxlength="100"
|
||||||
|
show-word-limit
|
||||||
|
style="width: 200px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -571,6 +580,15 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="备注:" prop="remarks" style="margin: 0; margin-right: 20px">
|
||||||
|
<el-input
|
||||||
|
v-model="scope.row.remarks"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
maxlength="100"
|
||||||
|
show-word-limit
|
||||||
|
style="width: 200px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -697,6 +715,15 @@
|
|||||||
placeholder="请选择执行科室"
|
placeholder="请选择执行科室"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="备注:" prop="remarks" style="margin: 0; margin-right: 20px">
|
||||||
|
<el-input
|
||||||
|
v-model="scope.row.remarks"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
maxlength="100"
|
||||||
|
show-word-limit
|
||||||
|
style="width: 200px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<span class="total-amount">
|
<span class="total-amount">
|
||||||
总金额:{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
|
总金额:{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
|
||||||
</span>
|
</span>
|
||||||
@@ -874,6 +901,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remarks" width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="!scope.row.isEdit">
|
||||||
|
{{ scope.row.remarks || '-' }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="诊断" align="center" prop="diagnosisName" width="150">
|
<el-table-column label="诊断" align="center" prop="diagnosisName" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="!scope.row.isEdit">
|
<span v-if="!scope.row.isEdit">
|
||||||
@@ -1171,11 +1205,19 @@ function getListInfo(addNewRow) {
|
|||||||
: (item.skinTestFlag !== undefined && item.skinTestFlag !== null
|
: (item.skinTestFlag !== undefined && item.skinTestFlag !== null
|
||||||
? (typeof item.skinTestFlag === 'number' ? item.skinTestFlag : (item.skinTestFlag ? 1 : 0))
|
? (typeof item.skinTestFlag === 'number' ? item.skinTestFlag : (item.skinTestFlag ? 1 : 0))
|
||||||
: 0);
|
: 0);
|
||||||
|
// 从后端获取数据时,将后端的耗材类型(2)转换为前端显示的耗材类型(4)
|
||||||
|
// 后端接口中:1=药品, 2=耗材, 3=诊疗
|
||||||
|
// 前端显示中:1=西药, 2=中成药, 3=诊疗, 4=耗材
|
||||||
|
let displayAdviceType = parsedContent.adviceType !== undefined ? Number(parsedContent.adviceType) : (item.adviceType !== undefined ? Number(item.adviceType) : undefined);
|
||||||
|
if (displayAdviceType === 2 && (parsedContent.deviceId || parsedContent.deviceName || item.deviceId || item.deviceName)) {
|
||||||
|
// 如果是耗材(adviceType=2 且有deviceId或deviceName),转换为前端显示的4
|
||||||
|
displayAdviceType = 4;
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
...parsedContent,
|
...parsedContent,
|
||||||
...item,
|
...item,
|
||||||
// 确保adviceType是数字类型,以便正确显示文本
|
// 确保adviceType是数字类型,以便正确显示文本
|
||||||
adviceType: parsedContent.adviceType !== undefined ? Number(parsedContent.adviceType) : (item.adviceType !== undefined ? Number(item.adviceType) : undefined),
|
adviceType: displayAdviceType,
|
||||||
doseQuantity: parsedContent?.doseQuantity,
|
doseQuantity: parsedContent?.doseQuantity,
|
||||||
doseUnitCode_dictText: parsedContent?.doseUnitCode_dictText,
|
doseUnitCode_dictText: parsedContent?.doseUnitCode_dictText,
|
||||||
skinTestFlag: skinTestFlag, // 确保皮试字段是数字类型
|
skinTestFlag: skinTestFlag, // 确保皮试字段是数字类型
|
||||||
@@ -1390,8 +1432,22 @@ function selectAdviceBase(key, row) {
|
|||||||
// 如果医嘱类型是"全部"(5)或未选择,根据药品的categoryCode自动判断
|
// 如果医嘱类型是"全部"(5)或未选择,根据药品的categoryCode自动判断
|
||||||
// drord_doctor_type: 1=西药, 2=中成药, 3=诊疗, 4=耗材, 5=全部
|
// drord_doctor_type: 1=西药, 2=中成药, 3=诊疗, 4=耗材, 5=全部
|
||||||
let finalAdviceType = currentAdviceType;
|
let finalAdviceType = currentAdviceType;
|
||||||
if ((currentAdviceType === undefined || currentAdviceType === null || currentAdviceType === '' || Number(currentAdviceType) === 5) && Number(row.adviceType) === 1) {
|
|
||||||
// 药品类型,需要根据categoryCode判断是西药还是中成药
|
// 判断是否是耗材(从耗材目录接口返回的数据,adviceType=2表示耗材)
|
||||||
|
const isConsumablesFromDevice = row.adviceType == 2 && (row.deviceId || row.deviceName);
|
||||||
|
|
||||||
|
// 优先判断:如果用户已选择耗材类型(4),直接使用
|
||||||
|
if (currentAdviceType !== undefined && currentAdviceType !== null && currentAdviceType !== '' && Number(currentAdviceType) === 4) {
|
||||||
|
// 用户已选择耗材类型,直接使用
|
||||||
|
finalAdviceType = 4;
|
||||||
|
} else if (isConsumablesFromDevice) {
|
||||||
|
// 如果是耗材(从耗材目录接口来的数据),设置为4(前端显示的耗材类型)
|
||||||
|
finalAdviceType = 4;
|
||||||
|
} else if (currentAdviceType !== undefined && currentAdviceType !== null && currentAdviceType !== '' && Number(currentAdviceType) !== 5) {
|
||||||
|
// 用户已选择其他医嘱类型(且不是"全部"),保留用户的选择,确保是数字类型
|
||||||
|
finalAdviceType = Number(currentAdviceType);
|
||||||
|
} else if (Number(row.adviceType) === 1) {
|
||||||
|
// 药品类型(adviceType=1),需要根据categoryCode判断是西药还是中成药
|
||||||
// categoryCode = '1' 表示中成药,categoryCode = '2' 表示西药
|
// categoryCode = '1' 表示中成药,categoryCode = '2' 表示西药
|
||||||
if (row.categoryCode == '1') {
|
if (row.categoryCode == '1') {
|
||||||
finalAdviceType = 2; // 中成药
|
finalAdviceType = 2; // 中成药
|
||||||
@@ -1401,9 +1457,21 @@ function selectAdviceBase(key, row) {
|
|||||||
// 如果没有categoryCode,使用项目默认的类型
|
// 如果没有categoryCode,使用项目默认的类型
|
||||||
finalAdviceType = Number(row.adviceType);
|
finalAdviceType = Number(row.adviceType);
|
||||||
}
|
}
|
||||||
} else if (currentAdviceType !== undefined && currentAdviceType !== null && currentAdviceType !== '' && Number(currentAdviceType) !== 5) {
|
} else if (Number(row.adviceType) === 2) {
|
||||||
// 用户已选择医嘱类型(且不是"全部"),保留用户的选择,确保是数字类型
|
// 如果 row.adviceType == 2,可能是中成药(药品)或耗材
|
||||||
finalAdviceType = Number(currentAdviceType);
|
// 优先判断是否是耗材:有 deviceId 或 deviceName
|
||||||
|
if (row.deviceId || row.deviceName) {
|
||||||
|
finalAdviceType = 4; // 耗材
|
||||||
|
} else {
|
||||||
|
// 没有 deviceId 或 deviceName,可能是中成药(药品)
|
||||||
|
// 根据 categoryCode 判断
|
||||||
|
if (row.categoryCode == '1') {
|
||||||
|
finalAdviceType = 2; // 中成药
|
||||||
|
} else {
|
||||||
|
// 默认认为是中成药
|
||||||
|
finalAdviceType = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 使用项目默认的类型,确保是数字类型
|
// 使用项目默认的类型,确保是数字类型
|
||||||
finalAdviceType = Number(row.adviceType);
|
finalAdviceType = Number(row.adviceType);
|
||||||
@@ -1449,7 +1517,11 @@ function selectAdviceBase(key, row) {
|
|||||||
).chargeItemDefinitionId;
|
).chargeItemDefinitionId;
|
||||||
|
|
||||||
// 库存列表 + 价格列表拼成批次号的下拉框
|
// 库存列表 + 价格列表拼成批次号的下拉框
|
||||||
if (row.adviceType != 3) {
|
// 判断是否是耗材(从耗材目录接口返回的数据)
|
||||||
|
const isConsumables = (row.adviceType == 2 && (row.deviceId || row.deviceName)) || finalAdviceType == 4;
|
||||||
|
|
||||||
|
if (row.adviceType != 3 && !isConsumables) {
|
||||||
|
// 药品类型(西药、中成药)需要检查库存
|
||||||
if (row.inventoryList && row.inventoryList.length == 0) {
|
if (row.inventoryList && row.inventoryList.length == 0) {
|
||||||
expandOrder.value = [];
|
expandOrder.value = [];
|
||||||
proxy.$modal.msgWarning('该项目无库存');
|
proxy.$modal.msgWarning('该项目无库存');
|
||||||
@@ -1485,12 +1557,23 @@ function selectAdviceBase(key, row) {
|
|||||||
.toFixed(2);
|
.toFixed(2);
|
||||||
prescriptionList.value[rowIndex.value].positionName = stock.locationName;
|
prescriptionList.value[rowIndex.value].positionName = stock.locationName;
|
||||||
}
|
}
|
||||||
|
} else if (isConsumables) {
|
||||||
|
// 耗材类型:设置价格和位置信息
|
||||||
|
const price = row.price || row.retailPrice || (row.priceList && row.priceList.length > 0 ? row.priceList[0].price : 0);
|
||||||
|
prescriptionList.value[rowIndex.value].unitPrice = price;
|
||||||
|
prescriptionList.value[rowIndex.value].unitTempPrice = price;
|
||||||
|
prescriptionList.value[rowIndex.value].minUnitPrice = price;
|
||||||
|
prescriptionList.value[rowIndex.value].positionId = row.locationId;
|
||||||
|
prescriptionList.value[rowIndex.value].positionName = row.locationId_dictText || row.positionName || '';
|
||||||
|
// 耗材可能没有库存列表,设置为空数组
|
||||||
|
prescriptionList.value[rowIndex.value].stockList = [];
|
||||||
|
prescriptionList.value[rowIndex.value].inventoryList = [];
|
||||||
} else {
|
} else {
|
||||||
// 执行科室默认逻辑:优先使用诊疗项目维护的所属科室,如果没有则使用开单科室
|
// 诊疗类型:执行科室默认逻辑:优先使用诊疗项目维护的所属科室,如果没有则使用开单科室
|
||||||
const defaultOrgId = row.positionId || props.patientInfo.orgId;
|
const defaultOrgId = row.positionId || props.patientInfo.orgId;
|
||||||
prescriptionList.value[rowIndex.value].orgId = defaultOrgId;
|
prescriptionList.value[rowIndex.value].orgId = defaultOrgId;
|
||||||
prescriptionList.value[rowIndex.value].unitPrice = row.priceList[0].price;
|
prescriptionList.value[rowIndex.value].unitPrice = row.priceList && row.priceList.length > 0 ? row.priceList[0].price : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否是皮试药品,如果是则弹出确认提示
|
// 检查是否是皮试药品,如果是则弹出确认提示
|
||||||
// 只对药品类型(西药和中成药)进行皮试提示
|
// 只对药品类型(西药和中成药)进行皮试提示
|
||||||
@@ -1538,13 +1621,21 @@ function selectAdviceBase(key, row) {
|
|||||||
function expandOrderAndFocus(key, row) {
|
function expandOrderAndFocus(key, row) {
|
||||||
expandOrder.value = [key];
|
expandOrder.value = [key];
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
// 判断是否是耗材(adviceType == 4 或从耗材目录来的数据)
|
||||||
|
const isConsumables = row.adviceType == 4 || (row.adviceType == 2 && (row.deviceId || row.deviceName));
|
||||||
|
|
||||||
if (row.adviceType == 1 || row.adviceType == 2) {
|
if (row.adviceType == 1 || row.adviceType == 2) {
|
||||||
|
// 药品类型(西药、中成药)
|
||||||
if (row.injectFlag == 1) {
|
if (row.injectFlag == 1) {
|
||||||
inputRefs.value['executeNum']?.focus();
|
inputRefs.value['executeNum']?.focus();
|
||||||
} else {
|
} else {
|
||||||
inputRefs.value['doseQuantity']?.focus();
|
inputRefs.value['doseQuantity']?.focus();
|
||||||
}
|
}
|
||||||
|
} else if (isConsumables) {
|
||||||
|
// 耗材类型:类似诊疗,聚焦执行次数输入框
|
||||||
|
inputRefs.value['quantity']?.focus();
|
||||||
} else {
|
} else {
|
||||||
|
// 诊疗类型
|
||||||
inputRefs.value['quantity']?.focus();
|
inputRefs.value['quantity']?.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1668,9 +1759,14 @@ function handleSave() {
|
|||||||
// 此处签发处方和单行保存处方传参相同,后台已经将传参存为JSON字符串,此处直接转换为JSON即可
|
// 此处签发处方和单行保存处方传参相同,后台已经将传参存为JSON字符串,此处直接转换为JSON即可
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
let list = saveList.map((item) => {
|
let list = saveList.map((item) => {
|
||||||
|
const parsedContent = JSON.parse(item.contentJson);
|
||||||
|
// 保存时,将前端的耗材类型(4)转换为后端需要的类型(2)
|
||||||
|
// 后端接口中:1=药品, 2=耗材, 3=诊疗
|
||||||
|
// 前端显示中:1=西药, 2=中成药, 3=诊疗, 4=耗材
|
||||||
|
const saveAdviceType = parsedContent.adviceType == 4 ? 2 : parsedContent.adviceType;
|
||||||
return {
|
return {
|
||||||
...JSON.parse(item.contentJson),
|
...parsedContent,
|
||||||
adviceType: item.adviceType,
|
adviceType: saveAdviceType,
|
||||||
requestId: item.requestId,
|
requestId: item.requestId,
|
||||||
dbOpType: '1',
|
dbOpType: '1',
|
||||||
groupId: item.groupId,
|
groupId: item.groupId,
|
||||||
@@ -1800,6 +1896,11 @@ function handleSaveSign(row, index) {
|
|||||||
if (row.injectFlag == 1) {
|
if (row.injectFlag == 1) {
|
||||||
row.sortNumber = row.sortNumber ? row.sortNumber : prescriptionList.value.length;
|
row.sortNumber = row.sortNumber ? row.sortNumber : prescriptionList.value.length;
|
||||||
}
|
}
|
||||||
|
// 保存时,将前端的耗材类型(4)转换为后端需要的类型(2)
|
||||||
|
// 后端接口中:1=药品, 2=耗材, 3=诊疗
|
||||||
|
// 前端显示中:1=西药, 2=中成药, 3=诊疗, 4=耗材
|
||||||
|
const saveAdviceType = row.adviceType == 4 ? 2 : row.adviceType;
|
||||||
|
row.adviceType = saveAdviceType;
|
||||||
// row.dose = row.doseQuantity;
|
// row.dose = row.doseQuantity;
|
||||||
// row.doseUnitCode = unitCodeList.value.find((item) => item.type == 'dose').value;
|
// row.doseUnitCode = unitCodeList.value.find((item) => item.type == 'dose').value;
|
||||||
// row.doseUnitCode = JSON.parse(JSON.stringify(row.minUnitCode)); // 页面显示与赋值不符,此处先简单处理,后续修改
|
// row.doseUnitCode = JSON.parse(JSON.stringify(row.minUnitCode)); // 页面显示与赋值不符,此处先简单处理,后续修改
|
||||||
|
|||||||
Reference in New Issue
Block a user