fix(wms): 移库选择商品时,必须两个仓库都选择完
parent
7ff8cb78e1
commit
7bae330828
|
|
@ -57,13 +57,13 @@
|
||||||
<div class="mb-12px flex items-center justify-between">
|
<div class="mb-12px flex items-center justify-between">
|
||||||
<span class="text-14px font-bold">移库明细</span>
|
<span class="text-14px font-bold">移库明细</span>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
content="请先选择来源仓库"
|
content="请先选择来源仓库和目标仓库"
|
||||||
:disabled="!!formData.sourceWarehouseId"
|
:disabled="canAddDetail"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="!formData.sourceWarehouseId"
|
:disabled="!canAddDetail"
|
||||||
plain
|
plain
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleAddDetail"
|
@click="handleAddDetail"
|
||||||
|
|
@ -255,6 +255,9 @@ const isSavedPrepareOrder = computed(
|
||||||
formData.value.status !== undefined &&
|
formData.value.status !== undefined &&
|
||||||
OrderUpdateStatusList.includes(formData.value.status)
|
OrderUpdateStatusList.includes(formData.value.status)
|
||||||
)
|
)
|
||||||
|
const canAddDetail = computed(
|
||||||
|
() => !!formData.value.sourceWarehouseId && !!formData.value.targetWarehouseId
|
||||||
|
)
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
|
|
@ -300,7 +303,13 @@ const normalizeDetails = (details: MovementOrderDetailVO[]) =>
|
||||||
totalPrice: detail.totalPrice ?? multiplyPrice(detail.quantity, detail.price)
|
totalPrice: detail.totalPrice ?? multiplyPrice(detail.quantity, detail.price)
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const handleAddDetail = () => inventorySelectRef.value?.open()
|
/** 打开库存选择弹窗 */
|
||||||
|
const handleAddDetail = () => {
|
||||||
|
if (!canAddDetail.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
inventorySelectRef.value?.open()
|
||||||
|
}
|
||||||
|
|
||||||
/** 选择库存 */
|
/** 选择库存 */
|
||||||
const handleSelectInventory = (inventories: InventorySelectRow[]) => {
|
const handleSelectInventory = (inventories: InventorySelectRow[]) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue