修复103 门诊医生站-》药品医嘱开立内容重复/【确认】无响应
This commit is contained in:
@@ -355,161 +355,6 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
|
||||||
<!-- 剂量单位 -->
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.unitCode"
|
|
||||||
style="width: 70px; margin-right: 20px"
|
|
||||||
placeholder=" "
|
|
||||||
>
|
|
||||||
<template
|
|
||||||
v-for="item in scope.row.unitCodeList"
|
|
||||||
:key="item.value"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-if="item.type == unitMap['minUnit']"
|
|
||||||
:value="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-select>
|
|
||||||
<span>=</span>
|
|
||||||
<!-- 单次剂量 -->
|
|
||||||
<el-form-item prop="dose" class="required-field" data-prop="dose">
|
|
||||||
<el-input-number
|
|
||||||
v-model="scope.row.dose"
|
|
||||||
controls-position="right"
|
|
||||||
:controls="false"
|
|
||||||
style="width: 70px; margin: 0 20px"
|
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (!inputRefs[scope.$index])
|
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].dose = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@input="convertDoseValues(scope.row, scope.$index)"
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
handleEnter(
|
|
||||||
'dose',
|
|
||||||
scope.row,
|
|
||||||
scope.$index,
|
|
||||||
prescription.id
|
|
||||||
)
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- 全部单位 -->
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.doseUnitCode"
|
|
||||||
style="width: 70px"
|
|
||||||
placeholder=" "
|
|
||||||
@change="convertValues(scope.row, scope.$index)"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in scope.row.unitCodeList"
|
|
||||||
:value="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:key="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<el-form-item
|
|
||||||
label="给药途径:"
|
|
||||||
prop="methodCode"
|
|
||||||
class="required-field"
|
|
||||||
data-prop="methodCode"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.methodCode"
|
|
||||||
placeholder="给药途径"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (!inputRefs[scope.$index])
|
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].methodCode = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
() => {
|
|
||||||
inputRefs[scope.$index]?.methodCode?.blur();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@visible-change="
|
|
||||||
(value) => {
|
|
||||||
if (!value) {
|
|
||||||
handleEnter('methodCode', scope.row, scope.$index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in method_code"
|
|
||||||
@click="() => (scope.row.methodCode_dictText = dict.label)"
|
|
||||||
@keyup="handleEnter('methodCode', scope.row, scope.$index)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
label="用药频次:"
|
|
||||||
prop="rateCode"
|
|
||||||
class="required-field"
|
|
||||||
data-prop="rateCode"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.rateCode"
|
|
||||||
placeholder="频次"
|
|
||||||
style="width: 120px"
|
|
||||||
filterable
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
() => {
|
|
||||||
inputRefs[scope.$index]?.rateCode?.blur();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@change="calculateTotalAmount(scope.row, scope.$index)"
|
|
||||||
@visible-change="
|
|
||||||
(value) => {
|
|
||||||
if (!value) {
|
|
||||||
handleEnter('rateCode', scope.row, scope.$index);
|
|
||||||
}
|
|
||||||
// inputRefs.rateCode.blur();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (!inputRefs[scope.$index])
|
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].rateCode = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in rate_code"
|
|
||||||
@click="() => (scope.row.rateCode_dictText = dict.label)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</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>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -524,93 +369,22 @@
|
|||||||
>
|
>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="用药天数:"
|
label="备注:"
|
||||||
prop="dispensePerDuration"
|
prop="remarks"
|
||||||
class="required-field"
|
style="margin: 0; margin-right: 20px"
|
||||||
data-prop="dispensePerDuration"
|
|
||||||
>
|
>
|
||||||
<el-input-number
|
<el-input
|
||||||
v-model="scope.row.dispensePerDuration"
|
v-model="scope.row.remarks"
|
||||||
style="width: 80px"
|
placeholder="请输入备注"
|
||||||
:min="1"
|
maxlength="100"
|
||||||
controls-position="right"
|
show-word-limit
|
||||||
:controls="false"
|
style="width: 500px"
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (!inputRefs[scope.$index])
|
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].dispensePerDuration = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
handleEnter('dispensePerDuration', scope.row, scope.$index)
|
|
||||||
"
|
|
||||||
@input="calculateTotalAmount(scope.row, scope.$index)"
|
|
||||||
>
|
|
||||||
<template #suffix>天</template>
|
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item
|
|
||||||
label="总量:"
|
|
||||||
prop="quantity"
|
|
||||||
class="required-field"
|
|
||||||
data-prop="quantity"
|
|
||||||
>
|
|
||||||
<el-input-number
|
|
||||||
v-model="scope.row.quantity"
|
|
||||||
style="width: 70px"
|
|
||||||
controls-position="right"
|
|
||||||
:controls="false"
|
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (!inputRefs[scope.$index])
|
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].quantity = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
handleEnter(
|
|
||||||
'quantity',
|
|
||||||
scope.row,
|
|
||||||
scope.$index,
|
|
||||||
prescription.id
|
|
||||||
)
|
|
||||||
"
|
|
||||||
@input="calculateTotalPrice(scope.row, scope.$index)"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-select
|
|
||||||
v-model="scope.row.unitCode"
|
|
||||||
style="width: 70px; margin-right: 20px"
|
|
||||||
placeholder=" "
|
|
||||||
@change="calculateTotalAmount(scope.row, scope.$index)"
|
|
||||||
>
|
|
||||||
<template
|
|
||||||
v-for="item in scope.row.unitCodeList"
|
|
||||||
:key="item.value"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-if="checkUnit(item, scope.row)"
|
|
||||||
:value="item.value"
|
|
||||||
: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;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
</div>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleSaveSign(scope.row, scope.$index, prescription.id)"
|
@click="handleSaveSign(scope.row, scope.$index)"
|
||||||
>
|
>
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -693,7 +467,7 @@
|
|||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index, prescription.id)">
|
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index)">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -1152,6 +926,12 @@ const adviceTypeList = ref([
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// 根据类型值获取显示标签,避免非编辑态出现空标签
|
||||||
|
const mapAdviceTypeLabel = (type) => {
|
||||||
|
const found = adviceTypeList.value.find((item) => item.value === type);
|
||||||
|
return found ? found.label : '';
|
||||||
|
};
|
||||||
|
|
||||||
// 西药处方管理相关变量
|
// 西药处方管理相关变量
|
||||||
const westernPrescriptions = ref([]); // 西药处方列表
|
const westernPrescriptions = ref([]); // 西药处方列表
|
||||||
const currentPrescriptionId = ref(null); // 当前活跃的处方ID
|
const currentPrescriptionId = ref(null); // 当前活跃的处方ID
|
||||||
@@ -2321,6 +2101,8 @@ function handleSaveSign(row, index, prescriptionId) {
|
|||||||
row.patientId = props.patientInfo.patientId;
|
row.patientId = props.patientInfo.patientId;
|
||||||
row.encounterId = props.patientInfo.encounterId;
|
row.encounterId = props.patientInfo.encounterId;
|
||||||
row.accountId = accountId.value;
|
row.accountId = accountId.value;
|
||||||
|
// 确保非编辑态显示正确的医嘱类型标签
|
||||||
|
row.adviceType_dictText = mapAdviceTypeLabel(row.adviceType);
|
||||||
if (row.adviceType == 1 || row.adviceType == 2) {
|
if (row.adviceType == 1 || row.adviceType == 2) {
|
||||||
row.minUnitQuantity =
|
row.minUnitQuantity =
|
||||||
row.minUnitCode == row.unitCode ? row.quantity : row.quantity * row.partPercent;
|
row.minUnitCode == row.unitCode ? row.quantity : row.quantity * row.partPercent;
|
||||||
|
|||||||
Reference in New Issue
Block a user