完善成品出库单分拣页面

This commit is contained in:
mtf committed 2026-07-18 16:38:38 +08:00
1 parent db202e16e1
commit d8febf4f05
5 files changed
+56 -19

No files matched your search

@@ -38,6 +38,7 @@
<a-space>
<span>托盘:{{ task.ContainerCode }};状态:{{ task.Status }}</span>
<a-select v-if="task.CanDispatch" v-model="task.SelectedOutPort"
popup-container="#shipment-allocate-@Model.Entity.ID"
placeholder="选择出库口" style="width: 150px">
<a-option v-for="port in outPorts" :key="port.Value" :value="port.Value">
{{ port.Label }}
@@ -68,7 +69,8 @@
</a-card>
<a-modal v-model:visible="inventoryVisible" title="选择库存并填写分配数量"
width="1000px" :ok-loading="saving" @@before-ok="saveAllocation">
width="1000px" :ok-loading="saving" :style="{ zIndex: inventoryModalZIndex }"
@@before-ok="saveAllocation">
<a-alert type="warning" style="margin-bottom: 12px">
本明细剩余可分配 {{ currentDetail.RemainingQty || 0 }}。同一库存可以分给多个明细,但累计不能超过库存数量。
</a-alert>
@@ -112,7 +114,8 @@
inventoryVisible: false,
inventories: [],
currentDetail: {},
saving: false
saving: false,
inventoryModalZIndex: 2000
};
},
mounted() {
@@ -120,7 +123,21 @@
},
methods: {
notifyError(message) {
const zIndex = this.getInventoryModalZIndex() + 2;
this.$notification.error({ content: message || '操作失败', duration: 5000, closable: true });
this.$nextTick(() => {
document.querySelectorAll('.arco-notification-list').forEach(element => {
element.style.zIndex = String(zIndex);
});
});
},
getInventoryModalZIndex() {
const root = document.getElementById(`shipment-allocate-${this.headerId}`);
const hostLayer = root ? root.closest('.layui-layer') : null;
const hostZIndex = hostLayer
? Number.parseInt(window.getComputedStyle(hostLayer).zIndex, 10)
: 0;
return hostZIndex > 0 ? hostZIndex + 2 : 2000;
},
loadData() {
axios.get('/shipment/ShipmentHeader/GetAllocationData', { params: { headerId: this.headerId } })
@@ -155,6 +172,7 @@
Selected: false,
AllocationQty: 0
}));
this.inventoryModalZIndex = this.getInventoryModalZIndex();
this.inventoryVisible = true;
})
.catch(error => this.notifyError(error.message));