feat(prescription): 更新处方列表数据结构并优化药品管理界面功能
- 在处方列表中新增总价、剂量和剂量数量字段 - 修复药品审批页面跳转时仓库信息丢失问题 - 扩展药品列表列宽度并启用溢出提示功能 - 为采购单界面添加多种视图状态下的字段禁用逻辑 - 优化采购单仓库位置字段的初始化流程,防止数据丢失
This commit is contained in:
@@ -2144,7 +2144,10 @@ function handleDelete() {
|
|||||||
adviceType: item.adviceType,
|
adviceType: item.adviceType,
|
||||||
statusEnum: item.statusEnum,
|
statusEnum: item.statusEnum,
|
||||||
adviceName: item.adviceName,
|
adviceName: item.adviceName,
|
||||||
uniqueKey: item.uniqueKey
|
uniqueKey: item.uniqueKey,
|
||||||
|
totalPrice: item.totalPrice,
|
||||||
|
dose: item.dose,
|
||||||
|
doseQuantity: item.doseQuantity
|
||||||
})));
|
})));
|
||||||
|
|
||||||
for (let i = prescriptionList.value.length - 1; i >= 0; i--) {
|
for (let i = prescriptionList.value.length - 1; i >= 0; i--) {
|
||||||
|
|||||||
@@ -310,6 +310,11 @@ function handelApplys(row, view) {
|
|||||||
// 采购入库 1
|
// 采购入库 1
|
||||||
getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
|
getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
|
||||||
let currentData = response.data;
|
let currentData = response.data;
|
||||||
|
// 从明细数据中获取仓库ID并设置到row,确保跳转后仓库字段能正确显示
|
||||||
|
if (currentData && currentData.length > 0 && !row.purposeLocationId) {
|
||||||
|
row.purposeLocationId = currentData[0].purposeLocationId;
|
||||||
|
row.purposeLocationId_dictText = currentData[0].purposeLocationName;
|
||||||
|
}
|
||||||
store.setCurrentData({ editRow: row, item: currentData });
|
store.setCurrentData({ editRow: row, item: currentData });
|
||||||
router.replace({
|
router.replace({
|
||||||
path: '/medicationmanagement/medicationmanagement/purchaseDocument',
|
path: '/medicationmanagement/medicationmanagement/purchaseDocument',
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
label="项目名称"
|
label="项目名称"
|
||||||
align="center"
|
align="center"
|
||||||
prop="name"
|
prop="name"
|
||||||
width="180"
|
width="250"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="项目类型"
|
label="项目类型"
|
||||||
|
|||||||
@@ -118,6 +118,7 @@
|
|||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 150px"
|
style="width: 150px"
|
||||||
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
@change="handleMedicationTypeChange"
|
@change="handleMedicationTypeChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -134,6 +135,7 @@
|
|||||||
placeholder=""
|
placeholder=""
|
||||||
clearable
|
clearable
|
||||||
style="width: 150px"
|
style="width: 150px"
|
||||||
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
@visible-change="handlePurposeTypeEnumVisibleChange"
|
@visible-change="handlePurposeTypeEnumVisibleChange"
|
||||||
@change="handleChangeLocationType"
|
@change="handleChangeLocationType"
|
||||||
>
|
>
|
||||||
@@ -152,6 +154,7 @@
|
|||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
@visible-change="handleHeaderLocationVisibleChange"
|
@visible-change="handleHeaderLocationVisibleChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -200,7 +203,7 @@
|
|||||||
:model="form"
|
:model="form"
|
||||||
:rules="tableRules"
|
:rules="tableRules"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:disabled="viewStatus == 'apply'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
>
|
>
|
||||||
<!-- @cell-mouse-enter="handleMouseEnter" -->
|
<!-- @cell-mouse-enter="handleMouseEnter" -->
|
||||||
<!-- v-click-outside-row="handleClickOutside" @row-click="handleRowClick" 点击行以外的部分自动保存 -->
|
<!-- v-click-outside-row="handleClickOutside" @row-click="handleRowClick" 点击行以外的部分自动保存 -->
|
||||||
@@ -219,8 +222,9 @@
|
|||||||
align="center"
|
align="center"
|
||||||
key="name"
|
key="name"
|
||||||
prop="name"
|
prop="name"
|
||||||
width="200"
|
width="250"
|
||||||
fixed
|
fixed
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
@@ -228,7 +232,7 @@
|
|||||||
:rules="tableRules.name"
|
:rules="tableRules.name"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="viewStatus == 'view'"
|
v-if="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
v-model="scope.row.name"
|
v-model="scope.row.name"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
disabled
|
disabled
|
||||||
@@ -298,7 +302,7 @@
|
|||||||
>
|
>
|
||||||
<div class="select_wrapper_div">
|
<div class="select_wrapper_div">
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
v-model="scope.row.itemQuantity"
|
v-model="scope.row.itemQuantity"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
@blur="handleTotalPrice(scope.$index)"
|
@blur="handleTotalPrice(scope.$index)"
|
||||||
@@ -328,7 +332,7 @@
|
|||||||
placeholder=" "
|
placeholder=" "
|
||||||
:class="{ 'error-border': scope.row.error }"
|
:class="{ 'error-border': scope.row.error }"
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
@change="
|
@change="
|
||||||
(value) => handleUnitCodeChange(scope.row, scope.$index, value)
|
(value) => handleUnitCodeChange(scope.row, scope.$index, value)
|
||||||
"
|
"
|
||||||
@@ -378,7 +382,7 @@
|
|||||||
:rules="tableRules.traceNo"
|
:rules="tableRules.traceNo"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
v-model="scope.row.traceNo"
|
v-model="scope.row.traceNo"
|
||||||
@change="(value) => handleTraceNoInput(value, scope.row)"
|
@change="(value) => handleTraceNoInput(value, scope.row)"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
@@ -403,7 +407,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="scope.row.packagingLevels"
|
v-model="scope.row.packagingLevels"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -426,7 +430,7 @@
|
|||||||
placeholder=""
|
placeholder=""
|
||||||
@blur="handleTotalPrice(scope.$index)"
|
@blur="handleTotalPrice(scope.$index)"
|
||||||
:class="{ 'error-border': scope.row.error }"
|
:class="{ 'error-border': scope.row.error }"
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
>
|
>
|
||||||
<template #suffix>元</template>
|
<template #suffix>元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@@ -467,7 +471,7 @@
|
|||||||
v-model="scope.row.lotNumber"
|
v-model="scope.row.lotNumber"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -490,7 +494,7 @@
|
|||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
@change="changeValStart($event, scope.$index)"
|
@change="changeValStart($event, scope.$index)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -509,7 +513,7 @@
|
|||||||
:rules="tableRules.endTime"
|
:rules="tableRules.endTime"
|
||||||
>
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
v-model="scope.row.endTime"
|
v-model="scope.row.endTime"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
@@ -536,7 +540,7 @@
|
|||||||
v-model="scope.row.invoiceNo"
|
v-model="scope.row.invoiceNo"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
style="text-align: center !important"
|
style="text-align: center !important"
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -557,7 +561,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="scope.row.remake"
|
v-model="scope.row.remake"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
:disabled="viewStatus == 'view'"
|
:disabled="viewStatus == 'view' || viewStatus == 'apply'"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -1855,13 +1859,19 @@ function edit() {
|
|||||||
: editData.value.item[0].purposeTypeEnum.toString();
|
: editData.value.item[0].purposeTypeEnum.toString();
|
||||||
receiptHeaderForm.medicationType =
|
receiptHeaderForm.medicationType =
|
||||||
editData.value.item[0].itemTable == "med_medication_definition" ? "1" : "2";
|
editData.value.item[0].itemTable == "med_medication_definition" ? "1" : "2";
|
||||||
receiptHeaderForm.headerLocationId = editData.value.editRow?.purposeLocationId || null;
|
// 先保存仓库ID,因为handleChangeLocationType会清空headerLocationId
|
||||||
|
const savedLocationId =
|
||||||
|
editData.value.editRow?.purposeLocationId ||
|
||||||
|
(editData.value.item && editData.value.item.length > 0 ? editData.value.item[0].purposeLocationId : null) ||
|
||||||
|
null;
|
||||||
total.value = form.purchaseinventoryList.length;
|
total.value = form.purchaseinventoryList.length;
|
||||||
handleChangeLocationType(
|
handleChangeLocationType(
|
||||||
editData.value.editRow.purposeTypeEnum
|
editData.value.editRow.purposeTypeEnum
|
||||||
? editData.value.editRow.purposeTypeEnum.toString()
|
? editData.value.editRow.purposeTypeEnum.toString()
|
||||||
: editData.value.item[0].purposeTypeEnum.toString()
|
: editData.value.item[0].purposeTypeEnum.toString()
|
||||||
);
|
);
|
||||||
|
// 在handleChangeLocationType之后再设置仓库ID
|
||||||
|
receiptHeaderForm.headerLocationId = savedLocationId;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
form.purchaseinventoryList = editData.value.item.map((item) => {
|
form.purchaseinventoryList = editData.value.item.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user