版本更新
This commit is contained in:
@@ -108,7 +108,10 @@ function handleUseOrderGroup(row) {
|
||||
}
|
||||
|
||||
function getList() {
|
||||
getAdviceHistoryInfo({ patientId: props.patientInfo.patientId, encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
getAdviceHistoryInfo({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
}).then((res) => {
|
||||
orderList.value = res.data;
|
||||
});
|
||||
}
|
||||
@@ -116,4 +119,4 @@ function getList() {
|
||||
defineExpose({
|
||||
handleOpen,
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -350,6 +350,11 @@
|
||||
:label="item.label"
|
||||
@click="
|
||||
() => {
|
||||
if (item.type == unitMap['minUnit']) {
|
||||
scope.row.unitPrice = scope.row.minUnitPrice;
|
||||
} else {
|
||||
scope.row.unitPrice = scope.row.unitTempPrice;
|
||||
}
|
||||
scope.row.unitCode_dictText = item.label;
|
||||
}
|
||||
"
|
||||
@@ -728,6 +733,7 @@ import {
|
||||
updateGroupId,
|
||||
getContract,
|
||||
getAdviceBaseInfo,
|
||||
getActivityBindDevice,
|
||||
} from '../api';
|
||||
import adviceBaseList from '../advicebaselist';
|
||||
import { computed, getCurrentInstance, nextTick, watch } from 'vue';
|
||||
@@ -736,6 +742,7 @@ import OrderGroupDrawer from './orderGroupDrawer';
|
||||
import PrescriptionHistory from './prescriptionHistory';
|
||||
import Decimal from 'decimal.js';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const total = ref(0);
|
||||
@@ -986,6 +993,21 @@ function handleChange(value) {
|
||||
* 选择药品回调
|
||||
*/
|
||||
function selectAdviceBase(key, row) {
|
||||
if (row.adviceType == 3) {
|
||||
getActivityBindDevice({ activityId: row.adviceDefinitionId }).then((res) => {
|
||||
if (res.data.activityBindDeviceInfos?.length > 0) {
|
||||
ElMessageBox.confirm('该诊疗项目已绑定所需耗材,点击确定将自动添加到医嘱列表', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
}).then(() => {
|
||||
handleSaveGroup(res.data.activityBindDeviceInfos);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
getOrgList();
|
||||
unitCodeList.value = [];
|
||||
unitCodeList.value.push({ value: row.unitCode, label: row.unitCode_dictText, type: 'unit' });
|
||||
@@ -1064,6 +1086,7 @@ function selectAdviceBase(key, row) {
|
||||
prescriptionList.value[rowIndex.value].inventoryId = stock.inventoryId;
|
||||
prescriptionList.value[rowIndex.value].locationId = stock.locationId;
|
||||
prescriptionList.value[rowIndex.value].unitPrice = stock.price;
|
||||
prescriptionList.value[rowIndex.value].unitTempPrice = stock.price;
|
||||
prescriptionList.value[rowIndex.value].minUnitPrice = new Decimal(stock.price)
|
||||
.div(row.partPercent)
|
||||
.toFixed(2);
|
||||
@@ -1310,14 +1333,17 @@ function handleSaveSign(row, index) {
|
||||
row.minUnitQuantity = row.quantity;
|
||||
}
|
||||
row.conditionId = conditionId.value;
|
||||
// if (row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit') {
|
||||
// row.unitPrice = row.unitPrice;
|
||||
// } else {
|
||||
// row.unitCode_dictText = row.unitCodeList.find(
|
||||
// (item) => item.value == row.minUnitCode
|
||||
// ).label;
|
||||
// row.unitPrice = row.minUnitPrice;
|
||||
// }
|
||||
// 处理总量为小单位情况,需要把单价也保存成小单位的
|
||||
if (row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit') {
|
||||
if (row.adviceType != 3) {
|
||||
row.unitPrice = row.unitTempPrice;
|
||||
}
|
||||
} else {
|
||||
row.unitCode_dictText = row.unitCodeList.find(
|
||||
(item) => item.value == row.minUnitCode
|
||||
).label;
|
||||
row.unitPrice = row.minUnitPrice;
|
||||
}
|
||||
row.conditionDefinitionId = conditionDefinitionId.value;
|
||||
row.encounterDiagnosisId = encounterDiagnosisId.value;
|
||||
row.diagnosisName = diagnosisName.value;
|
||||
@@ -1429,7 +1455,7 @@ function setValue(row) {
|
||||
// 库存列表 + 价格列表拼成批次号的下拉框
|
||||
if (row.adviceType != 3) {
|
||||
if (row.inventoryList && row.inventoryList.length == 0) {
|
||||
expandOrder.value = [];
|
||||
// expandOrder.value = [];
|
||||
proxy.$modal.msgWarning('该项目无库存');
|
||||
return;
|
||||
}
|
||||
@@ -1457,6 +1483,9 @@ function setValue(row) {
|
||||
prescriptionList.value[rowIndex.value].locationId = stock.locationId;
|
||||
prescriptionList.value[rowIndex.value].unitPrice = stock.price;
|
||||
prescriptionList.value[rowIndex.value].positionName = stock.locationName;
|
||||
prescriptionList.value[rowIndex.value].minUnitPrice = new Decimal(stock.price)
|
||||
.div(row.partPercent)
|
||||
.toFixed(2);
|
||||
}
|
||||
} else {
|
||||
prescriptionList.value[rowIndex.value].orgId = JSON.parse(JSON.stringify(row)).positionId;
|
||||
@@ -1496,6 +1525,7 @@ function handleSaveGroup(orderGroupList) {
|
||||
prescriptionList.value[rowIndex.value] = {
|
||||
...prescriptionList.value[rowIndex.value],
|
||||
// ...orderGroupValue,
|
||||
uniqueKey: nextId.value++,
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
accountId: accountId.value,
|
||||
@@ -1802,10 +1832,14 @@ const groupMarkers = ref([]);
|
||||
// 计算总价
|
||||
function calculateTotalPrice(row, index) {
|
||||
nextTick(() => {
|
||||
if (row.unitCode == row.minUnitCode) {
|
||||
row.totalPrice = new Decimal(row.unitPrice).div(row.partPercent) * row.quantity;
|
||||
} else {
|
||||
if (row.adviceType == 3) {
|
||||
row.totalPrice = (row.unitPrice * row.quantity * 100) / 100;
|
||||
} else {
|
||||
if (row.unitCode == row.minUnitCode) {
|
||||
row.totalPrice = row.minUnitPrice * row.quantity;
|
||||
} else {
|
||||
row.totalPrice = (row.unitPrice * row.quantity * 100) / 100;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user