feat(wms):减法,去掉批次号等字段
parent
fdbb98fe65
commit
8d06f87e0f
|
|
@ -15,9 +15,6 @@ export interface InventoryHistoryVO {
|
||||||
quantity?: number
|
quantity?: number
|
||||||
beforeQuantity?: number
|
beforeQuantity?: number
|
||||||
afterQuantity?: number
|
afterQuantity?: number
|
||||||
batchNo?: string
|
|
||||||
productionDate?: Date
|
|
||||||
expirationDate?: Date
|
|
||||||
amount?: number
|
amount?: number
|
||||||
remark?: string
|
remark?: string
|
||||||
orderId?: number
|
orderId?: number
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,6 @@ export interface CheckOrderDetailVO {
|
||||||
inventoryId?: number
|
inventoryId?: number
|
||||||
warehouseId?: number
|
warehouseId?: number
|
||||||
warehouseName?: string
|
warehouseName?: string
|
||||||
batchNo?: string
|
|
||||||
productionDate?: Date
|
|
||||||
expirationDate?: Date
|
|
||||||
receiptTime?: Date
|
receiptTime?: Date
|
||||||
quantity?: number
|
quantity?: number
|
||||||
checkQuantity?: number
|
checkQuantity?: number
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,6 @@ export interface MovementOrderDetailVO {
|
||||||
sourceWarehouseName?: string
|
sourceWarehouseName?: string
|
||||||
targetWarehouseId?: number
|
targetWarehouseId?: number
|
||||||
targetWarehouseName?: string
|
targetWarehouseName?: string
|
||||||
batchNo?: string
|
|
||||||
productionDate?: Date
|
|
||||||
expirationDate?: Date
|
|
||||||
quantity?: number
|
quantity?: number
|
||||||
availableQuantity?: number
|
availableQuantity?: number
|
||||||
amount?: number
|
amount?: number
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,6 @@ export interface ReceiptOrderDetailVO {
|
||||||
skuName?: string
|
skuName?: string
|
||||||
warehouseId?: number
|
warehouseId?: number
|
||||||
warehouseName?: string
|
warehouseName?: string
|
||||||
batchNo?: string
|
|
||||||
productionDate?: Date
|
|
||||||
expirationDate?: Date
|
|
||||||
quantity?: number
|
quantity?: number
|
||||||
amount?: number
|
amount?: number
|
||||||
remark?: string
|
remark?: string
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,6 @@ export interface ShipmentOrderDetailVO {
|
||||||
skuName?: string
|
skuName?: string
|
||||||
warehouseId?: number
|
warehouseId?: number
|
||||||
warehouseName?: string
|
warehouseName?: string
|
||||||
batchNo?: string
|
|
||||||
productionDate?: Date
|
|
||||||
expirationDate?: Date
|
|
||||||
quantity?: number
|
quantity?: number
|
||||||
availableQuantity?: number
|
availableQuantity?: number
|
||||||
amount?: number
|
amount?: number
|
||||||
|
|
|
||||||
|
|
@ -129,9 +129,6 @@ import { InventoryApi, InventoryVO } from '@/api/wms/inventory'
|
||||||
import { formatQuantity } from '@/views/wms/utils/format'
|
import { formatQuantity } from '@/views/wms/utils/format'
|
||||||
|
|
||||||
export interface InventorySelectRow extends InventoryVO {
|
export interface InventorySelectRow extends InventoryVO {
|
||||||
batchNo?: string
|
|
||||||
productionDate?: Date
|
|
||||||
expirationDate?: Date
|
|
||||||
amount?: number
|
amount?: number
|
||||||
availableQuantity?: number
|
availableQuantity?: number
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -156,17 +156,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column label="生产日期/过期日期" min-width="180">
|
|
||||||
<template #default="scope">
|
|
||||||
<div v-if="scope.row.productionDate">
|
|
||||||
生产日期:{{ formatDate(scope.row.productionDate, 'YYYY-MM-DD') }}
|
|
||||||
</div>
|
|
||||||
<div v-if="scope.row.expirationDate">
|
|
||||||
过期日期:{{ formatDate(scope.row.expirationDate, 'YYYY-MM-DD') }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -187,7 +176,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { dateFormatter, defaultShortcuts, formatDate } from '@/utils/formatTime'
|
import { dateFormatter, defaultShortcuts } from '@/utils/formatTime'
|
||||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
import { InventoryHistoryApi, InventoryHistoryVO } from '@/api/wms/inventory/history'
|
import { InventoryHistoryApi, InventoryHistoryVO } from '@/api/wms/inventory/history'
|
||||||
import WarehouseSelect from '@/views/wms/md/warehouse/components/WarehouseSelect.vue'
|
import WarehouseSelect from '@/views/wms/md/warehouse/components/WarehouseSelect.vue'
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,13 @@
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
@row-dblclick="handleRowDblClick"
|
@row-dblclick="handleRowDblClick"
|
||||||
>
|
>
|
||||||
<el-table-column :reserve-selection="true" align="center" type="selection" width="50" />
|
<el-table-column
|
||||||
|
:reserve-selection="true"
|
||||||
|
:selectable="isRowSelectable"
|
||||||
|
align="center"
|
||||||
|
type="selection"
|
||||||
|
width="50"
|
||||||
|
/>
|
||||||
<el-table-column label="商品信息" min-width="220">
|
<el-table-column label="商品信息" min-width="220">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div>{{ row.itemName || '-' }}</div>
|
<div>{{ row.itemName || '-' }}</div>
|
||||||
|
|
@ -149,6 +155,7 @@ const total = ref(0) // 列表的总条数
|
||||||
const selectedList = ref<ItemSkuVO[]>([]) // 已选择 SKU 列表
|
const selectedList = ref<ItemSkuVO[]>([]) // 已选择 SKU 列表
|
||||||
const selectedMap = ref<Map<number, ItemSkuVO>>(new Map()) // 跨页已选择 SKU
|
const selectedMap = ref<Map<number, ItemSkuVO>>(new Map()) // 跨页已选择 SKU
|
||||||
const preSelectedIds = ref<number[]>([]) // 打开弹窗时传入的已选 SKU 编号
|
const preSelectedIds = ref<number[]>([]) // 打开弹窗时传入的已选 SKU 编号
|
||||||
|
const disabledSelectedIds = ref<Set<number>>(new Set()) // 已在业务明细中使用的 SKU 编号
|
||||||
const tableRef = ref<InstanceType<typeof ElTable>>() // 表格 Ref
|
const tableRef = ref<InstanceType<typeof ElTable>>() // 表格 Ref
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const getDefaultQueryParams = () => ({
|
const getDefaultQueryParams = () => ({
|
||||||
|
|
@ -172,6 +179,7 @@ const open = async (selectedIds?: number[]) => {
|
||||||
selectedList.value = []
|
selectedList.value = []
|
||||||
selectedMap.value = new Map()
|
selectedMap.value = new Map()
|
||||||
preSelectedIds.value = selectedIds || []
|
preSelectedIds.value = selectedIds || []
|
||||||
|
disabledSelectedIds.value = new Set(preSelectedIds.value)
|
||||||
await nextTick()
|
await nextTick()
|
||||||
tableRef.value?.clearSelection()
|
tableRef.value?.clearSelection()
|
||||||
await loadSkuList()
|
await loadSkuList()
|
||||||
|
|
@ -261,15 +269,24 @@ const applyPreSelection = () => {
|
||||||
}
|
}
|
||||||
list.value.forEach((row) => {
|
list.value.forEach((row) => {
|
||||||
if (row.id && selectedMap.value.has(row.id)) {
|
if (row.id && selectedMap.value.has(row.id)) {
|
||||||
table.toggleRowSelection(row, true)
|
table.toggleRowSelection(row, true, true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 是否允许勾选 SKU */
|
||||||
|
const isRowSelectable = (row: ItemSkuVO) => {
|
||||||
|
return row.id === undefined || !disabledSelectedIds.value.has(row.id)
|
||||||
|
}
|
||||||
|
|
||||||
/** 选择变化 */
|
/** 选择变化 */
|
||||||
const handleSelectionChange = (rows: ItemSkuVO[]) => {
|
const handleSelectionChange = (rows: ItemSkuVO[]) => {
|
||||||
const currentPageIds = list.value.map((row) => row.id).filter((id): id is number => !!id)
|
const currentPageIds = list.value.map((row) => row.id).filter((id): id is number => !!id)
|
||||||
currentPageIds.forEach((id) => selectedMap.value.delete(id))
|
currentPageIds.forEach((id) => {
|
||||||
|
if (!disabledSelectedIds.value.has(id)) {
|
||||||
|
selectedMap.value.delete(id)
|
||||||
|
}
|
||||||
|
})
|
||||||
rows.forEach((row) => {
|
rows.forEach((row) => {
|
||||||
if (row.id) {
|
if (row.id) {
|
||||||
selectedMap.value.set(row.id, row)
|
selectedMap.value.set(row.id, row)
|
||||||
|
|
@ -280,16 +297,22 @@ const handleSelectionChange = (rows: ItemSkuVO[]) => {
|
||||||
|
|
||||||
/** 双击行:切换勾选 */
|
/** 双击行:切换勾选 */
|
||||||
const handleRowDblClick = (row: ItemSkuVO) => {
|
const handleRowDblClick = (row: ItemSkuVO) => {
|
||||||
|
if (row.id && disabledSelectedIds.value.has(row.id)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
tableRef.value?.toggleRowSelection(row)
|
tableRef.value?.toggleRowSelection(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 确认选择 */
|
/** 确认选择 */
|
||||||
const handleConfirm = () => {
|
const handleConfirm = () => {
|
||||||
if (selectedList.value.length === 0) {
|
const newSelectedList = selectedList.value.filter(
|
||||||
|
(sku) => sku.id !== undefined && !disabledSelectedIds.value.has(sku.id)
|
||||||
|
)
|
||||||
|
if (newSelectedList.length === 0) {
|
||||||
message.warning('请至少选择一条数据')
|
message.warning('请至少选择一条数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
emit('change', selectedList.value)
|
emit('change', newSelectedList)
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@
|
||||||
<div v-if="row.skuCode" class="text-12px text-gray-500">规格编号:{{ row.skuCode }}</div>
|
<div v-if="row.skuCode" class="text-12px text-gray-500">规格编号:{{ row.skuCode }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column align="right" label="账面数量" prop="quantity" width="120">
|
<el-table-column align="right" label="账面数量" prop="quantity" width="120">
|
||||||
<template #default="{ row }">{{ formatQuantity(row.quantity) || '-' }}</template>
|
<template #default="{ row }">{{ formatQuantity(row.quantity) || '-' }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,6 @@
|
||||||
<div v-if="row.skuCode" class="text-12px text-gray-500">规格编号:{{ row.skuCode }}</div>
|
<div v-if="row.skuCode" class="text-12px text-gray-500">规格编号:{{ row.skuCode }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column align="right" label="账面数量" width="120">
|
<el-table-column align="right" label="账面数量" width="120">
|
||||||
<template #default="{ row }">{{ formatQuantity(row.quantity) || '-' }}</template>
|
<template #default="{ row }">{{ formatQuantity(row.quantity) || '-' }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -228,9 +227,6 @@ const buildDetail = (inventory: InventorySelectRow): CheckOrderDetailVO => ({
|
||||||
inventoryId: inventory.id,
|
inventoryId: inventory.id,
|
||||||
warehouseId: inventory.warehouseId,
|
warehouseId: inventory.warehouseId,
|
||||||
warehouseName: inventory.warehouseName,
|
warehouseName: inventory.warehouseName,
|
||||||
batchNo: inventory.batchNo,
|
|
||||||
productionDate: inventory.productionDate,
|
|
||||||
expirationDate: inventory.expirationDate,
|
|
||||||
quantity: inventory.availableQuantity,
|
quantity: inventory.availableQuantity,
|
||||||
checkQuantity: inventory.availableQuantity,
|
checkQuantity: inventory.availableQuantity,
|
||||||
availableQuantity: inventory.availableQuantity,
|
availableQuantity: inventory.availableQuantity,
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,6 @@
|
||||||
<div v-if="detail.skuCode" class="text-12px text-gray-500">规格编号:{{ detail.skuCode }}</div>
|
<div v-if="detail.skuCode" class="text-12px text-gray-500">规格编号:{{ detail.skuCode }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column align="right" label="账面数量" width="120">
|
<el-table-column align="right" label="账面数量" width="120">
|
||||||
<template #default="{ row: detail }">{{ formatQuantity(detail.quantity) }}</template>
|
<template #default="{ row: detail }">{{ formatQuantity(detail.quantity) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,6 @@
|
||||||
<div v-if="row.skuCode" class="text-12px text-gray-500">规格编号:{{ row.skuCode }}</div>
|
<div v-if="row.skuCode" class="text-12px text-gray-500">规格编号:{{ row.skuCode }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column align="right" label="数量" prop="quantity" width="120">
|
<el-table-column align="right" label="数量" prop="quantity" width="120">
|
||||||
<template #default="{ row }">{{ formatQuantity(row.quantity) || '-' }}</template>
|
<template #default="{ row }">{{ formatQuantity(row.quantity) || '-' }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@
|
||||||
<div v-if="row.skuCode" class="text-12px text-gray-500">规格编号:{{ row.skuCode }}</div>
|
<div v-if="row.skuCode" class="text-12px text-gray-500">规格编号:{{ row.skuCode }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column align="right" label="可用库存" width="120">
|
<el-table-column align="right" label="可用库存" width="120">
|
||||||
<template #default="{ row }">{{ formatQuantity(row.availableQuantity) || '-' }}</template>
|
<template #default="{ row }">{{ formatQuantity(row.availableQuantity) || '-' }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -229,9 +228,6 @@ const buildDetail = (inventory: InventorySelectRow): MovementOrderDetailVO => ({
|
||||||
sourceWarehouseId: inventory.warehouseId,
|
sourceWarehouseId: inventory.warehouseId,
|
||||||
sourceWarehouseName: inventory.warehouseName,
|
sourceWarehouseName: inventory.warehouseName,
|
||||||
targetWarehouseId: formData.value.targetWarehouseId,
|
targetWarehouseId: formData.value.targetWarehouseId,
|
||||||
batchNo: inventory.batchNo,
|
|
||||||
productionDate: inventory.productionDate,
|
|
||||||
expirationDate: inventory.expirationDate,
|
|
||||||
quantity: undefined,
|
quantity: undefined,
|
||||||
availableQuantity: inventory.availableQuantity,
|
availableQuantity: inventory.availableQuantity,
|
||||||
amount: undefined,
|
amount: undefined,
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,6 @@
|
||||||
<div v-if="detail.skuCode" class="text-12px text-gray-500">规格编号:{{ detail.skuCode }}</div>
|
<div v-if="detail.skuCode" class="text-12px text-gray-500">规格编号:{{ detail.skuCode }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column align="right" label="移库数量" width="120">
|
<el-table-column align="right" label="移库数量" width="120">
|
||||||
<template #default="{ row: detail }">{{ formatQuantity(detail.quantity) }}</template>
|
<template #default="{ row: detail }">{{ formatQuantity(detail.quantity) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -71,17 +71,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column label="生产日期" width="140">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ formatNullableDate(scope.row.productionDate, 'YYYY-MM-DD') }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="过期日期" width="140">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ formatNullableDate(scope.row.expirationDate, 'YYYY-MM-DD') }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="right" label="数量" prop="quantity" width="120">
|
<el-table-column align="right" label="数量" prop="quantity" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatQuantity(scope.row.quantity) || '-' }}
|
{{ formatQuantity(scope.row.quantity) || '-' }}
|
||||||
|
|
|
||||||
|
|
@ -107,33 +107,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="160">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-input v-model="scope.row.batchNo" maxlength="64" placeholder="请输入批号" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="生产日期" width="180">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="scope.row.productionDate"
|
|
||||||
class="!w-1/1"
|
|
||||||
placeholder="请选择生产日期"
|
|
||||||
type="datetime"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="过期日期" width="180">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="scope.row.expirationDate"
|
|
||||||
class="!w-1/1"
|
|
||||||
placeholder="请选择过期日期"
|
|
||||||
type="datetime"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="入库数量" width="160">
|
<el-table-column label="入库数量" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
|
@ -303,9 +276,6 @@ const buildDetail = (sku: ItemSkuVO): ReceiptOrderDetailVO => ({
|
||||||
skuId: sku.id,
|
skuId: sku.id,
|
||||||
skuCode: sku.code,
|
skuCode: sku.code,
|
||||||
skuName: sku.name,
|
skuName: sku.name,
|
||||||
batchNo: undefined,
|
|
||||||
productionDate: undefined,
|
|
||||||
expirationDate: undefined,
|
|
||||||
quantity: undefined,
|
quantity: undefined,
|
||||||
amount: undefined,
|
amount: undefined,
|
||||||
remark: undefined
|
remark: undefined
|
||||||
|
|
@ -313,7 +283,7 @@ const buildDetail = (sku: ItemSkuVO): ReceiptOrderDetailVO => ({
|
||||||
|
|
||||||
/** 添加商品 */
|
/** 添加商品 */
|
||||||
const handleAddDetail = () => {
|
const handleAddDetail = () => {
|
||||||
skuSelectRef.value?.open()
|
skuSelectRef.value?.open(getSelectedSkuIds())
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 选择商品 SKU */
|
/** 选择商品 SKU */
|
||||||
|
|
@ -322,10 +292,24 @@ const handleSelectSku = (skus: ItemSkuVO[]) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
formData.value.details = formData.value.details || []
|
formData.value.details = formData.value.details || []
|
||||||
skus.forEach((sku) => formData.value.details!.push(buildDetail(sku)))
|
const selectedSkuIds = new Set(getSelectedSkuIds())
|
||||||
|
skus.forEach((sku) => {
|
||||||
|
if (!sku.id || selectedSkuIds.has(sku.id)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
formData.value.details!.push(buildDetail(sku))
|
||||||
|
selectedSkuIds.add(sku.id)
|
||||||
|
})
|
||||||
refreshTotalAmount()
|
refreshTotalAmount()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 获得已选 SKU 编号 */
|
||||||
|
const getSelectedSkuIds = () => {
|
||||||
|
return (formData.value.details || [])
|
||||||
|
.map((detail) => detail.skuId)
|
||||||
|
.filter((id): id is number => !!id)
|
||||||
|
}
|
||||||
|
|
||||||
/** 删除明细 */
|
/** 删除明细 */
|
||||||
const handleDeleteDetail = (index: number) => {
|
const handleDeleteDetail = (index: number) => {
|
||||||
formData.value.details?.splice(index, 1)
|
formData.value.details?.splice(index, 1)
|
||||||
|
|
|
||||||
|
|
@ -23,21 +23,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">商品信息</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">商品信息</th>
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">规格信息</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">规格信息</th>
|
||||||
<th
|
|
||||||
class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left"
|
|
||||||
>
|
|
||||||
批号
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left"
|
|
||||||
>
|
|
||||||
生产日期
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left"
|
|
||||||
>
|
|
||||||
过期日期
|
|
||||||
</th>
|
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">数量</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">数量</th>
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">金额(元)</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">金额(元)</th>
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">备注</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">备注</th>
|
||||||
|
|
@ -53,15 +38,6 @@
|
||||||
<div>{{ detail.skuName || '-' }}</div>
|
<div>{{ detail.skuName || '-' }}</div>
|
||||||
<div v-if="detail.skuCode" class="text-12px">编号:{{ detail.skuCode }}</div>
|
<div v-if="detail.skuCode" class="text-12px">编号:{{ detail.skuCode }}</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="border border-solid border-#dcdfe6 p-8px">
|
|
||||||
{{ detail.batchNo || '-' }}
|
|
||||||
</td>
|
|
||||||
<td class="border border-solid border-#dcdfe6 p-8px">
|
|
||||||
{{ formatNullableDate(detail.productionDate, 'YYYY-MM-DD') }}
|
|
||||||
</td>
|
|
||||||
<td class="border border-solid border-#dcdfe6 p-8px">
|
|
||||||
{{ formatNullableDate(detail.expirationDate, 'YYYY-MM-DD') }}
|
|
||||||
</td>
|
|
||||||
<td class="border border-solid border-#dcdfe6 p-8px text-right">
|
<td class="border border-solid border-#dcdfe6 p-8px text-right">
|
||||||
{{ formatQuantity(detail.quantity) || '-' }}
|
{{ formatQuantity(detail.quantity) || '-' }}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -95,7 +71,7 @@ defineOptions({ name: 'WmsReceiptOrderPrint' })
|
||||||
|
|
||||||
const printData = ref<ReceiptOrderVO>({}) // 打印数据
|
const printData = ref<ReceiptOrderVO>({}) // 打印数据
|
||||||
const printButtonRef = ref<HTMLButtonElement>() // 打印按钮
|
const printButtonRef = ref<HTMLButtonElement>() // 打印按钮
|
||||||
const tableColumnCount = 8
|
const tableColumnCount = 5
|
||||||
const printObj = ref({
|
const printObj = ref({
|
||||||
id: 'wmsReceiptOrderPrint',
|
id: 'wmsReceiptOrderPrint',
|
||||||
popTitle: ' ',
|
popTitle: ' ',
|
||||||
|
|
|
||||||
|
|
@ -237,17 +237,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column label="生产日期/过期日期" min-width="180">
|
|
||||||
<template #default="detailScope">
|
|
||||||
<div v-if="detailScope.row.productionDate">
|
|
||||||
生产日期:{{ formatNullableDate(detailScope.row.productionDate, 'YYYY-MM-DD') }}
|
|
||||||
</div>
|
|
||||||
<div v-if="detailScope.row.expirationDate">
|
|
||||||
过期日期:{{ formatNullableDate(detailScope.row.expirationDate, 'YYYY-MM-DD') }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="right" label="入库数量" width="120">
|
<el-table-column align="right" label="入库数量" width="120">
|
||||||
<template #default="detailScope">
|
<template #default="detailScope">
|
||||||
{{ formatQuantity(detailScope.row.quantity) }}
|
{{ formatQuantity(detailScope.row.quantity) }}
|
||||||
|
|
|
||||||
|
|
@ -71,17 +71,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column label="生产日期" width="140">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ formatNullableDate(scope.row.productionDate, 'YYYY-MM-DD') }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="过期日期" width="140">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ formatNullableDate(scope.row.expirationDate, 'YYYY-MM-DD') }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="right" label="数量" prop="quantity" width="120">
|
<el-table-column align="right" label="数量" prop="quantity" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatQuantity(scope.row.quantity) || '-' }}
|
{{ formatQuantity(scope.row.quantity) || '-' }}
|
||||||
|
|
|
||||||
|
|
@ -107,21 +107,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批号" min-width="160">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ scope.row.batchNo || '-' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="生产日期" width="180">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ formatNullableDate(scope.row.productionDate, 'YYYY-MM-DD') }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="过期日期" width="180">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ formatNullableDate(scope.row.expirationDate, 'YYYY-MM-DD') }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="right" label="可用库存" width="120">
|
<el-table-column align="right" label="可用库存" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatQuantity(scope.row.availableQuantity) || '-' }}
|
{{ formatQuantity(scope.row.availableQuantity) || '-' }}
|
||||||
|
|
@ -304,9 +289,6 @@ const buildDetail = (inventory: InventorySelectRow): ShipmentOrderDetailVO => ({
|
||||||
skuName: inventory.skuName,
|
skuName: inventory.skuName,
|
||||||
warehouseId: inventory.warehouseId,
|
warehouseId: inventory.warehouseId,
|
||||||
warehouseName: inventory.warehouseName,
|
warehouseName: inventory.warehouseName,
|
||||||
batchNo: inventory.batchNo,
|
|
||||||
productionDate: inventory.productionDate,
|
|
||||||
expirationDate: inventory.expirationDate,
|
|
||||||
quantity: undefined,
|
quantity: undefined,
|
||||||
availableQuantity: inventory.availableQuantity,
|
availableQuantity: inventory.availableQuantity,
|
||||||
amount: undefined,
|
amount: undefined,
|
||||||
|
|
|
||||||
|
|
@ -23,21 +23,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">商品信息</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">商品信息</th>
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">规格信息</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">规格信息</th>
|
||||||
<th
|
|
||||||
class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left"
|
|
||||||
>
|
|
||||||
批号
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left"
|
|
||||||
>
|
|
||||||
生产日期
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left"
|
|
||||||
>
|
|
||||||
过期日期
|
|
||||||
</th>
|
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">数量</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">数量</th>
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">金额(元)</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">金额(元)</th>
|
||||||
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">备注</th>
|
<th class="border border-solid border-#dcdfe6 bg-#f5f7fa p-8px text-left">备注</th>
|
||||||
|
|
@ -53,15 +38,6 @@
|
||||||
<div>{{ detail.skuName || '-' }}</div>
|
<div>{{ detail.skuName || '-' }}</div>
|
||||||
<div v-if="detail.skuCode" class="text-12px">编号:{{ detail.skuCode }}</div>
|
<div v-if="detail.skuCode" class="text-12px">编号:{{ detail.skuCode }}</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="border border-solid border-#dcdfe6 p-8px">
|
|
||||||
{{ detail.batchNo || '-' }}
|
|
||||||
</td>
|
|
||||||
<td class="border border-solid border-#dcdfe6 p-8px">
|
|
||||||
{{ formatNullableDate(detail.productionDate, 'YYYY-MM-DD') }}
|
|
||||||
</td>
|
|
||||||
<td class="border border-solid border-#dcdfe6 p-8px">
|
|
||||||
{{ formatNullableDate(detail.expirationDate, 'YYYY-MM-DD') }}
|
|
||||||
</td>
|
|
||||||
<td class="border border-solid border-#dcdfe6 p-8px text-right">
|
<td class="border border-solid border-#dcdfe6 p-8px text-right">
|
||||||
{{ formatQuantity(detail.quantity) || '-' }}
|
{{ formatQuantity(detail.quantity) || '-' }}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -95,7 +71,7 @@ defineOptions({ name: 'WmsShipmentOrderPrint' })
|
||||||
|
|
||||||
const printData = ref<ShipmentOrderVO>({}) // 打印数据
|
const printData = ref<ShipmentOrderVO>({}) // 打印数据
|
||||||
const printButtonRef = ref<HTMLButtonElement>() // 打印按钮
|
const printButtonRef = ref<HTMLButtonElement>() // 打印按钮
|
||||||
const tableColumnCount = 8
|
const tableColumnCount = 5
|
||||||
const printObj = ref({
|
const printObj = ref({
|
||||||
id: 'wmsShipmentOrderPrint',
|
id: 'wmsShipmentOrderPrint',
|
||||||
popTitle: ' ',
|
popTitle: ' ',
|
||||||
|
|
|
||||||
|
|
@ -237,17 +237,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="批号" min-width="140" prop="batchNo" />
|
|
||||||
<el-table-column label="生产日期/过期日期" min-width="180">
|
|
||||||
<template #default="detailScope">
|
|
||||||
<div v-if="detailScope.row.productionDate">
|
|
||||||
生产日期:{{ formatNullableDate(detailScope.row.productionDate, 'YYYY-MM-DD') }}
|
|
||||||
</div>
|
|
||||||
<div v-if="detailScope.row.expirationDate">
|
|
||||||
过期日期:{{ formatNullableDate(detailScope.row.expirationDate, 'YYYY-MM-DD') }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="right" label="出库数量" width="120">
|
<el-table-column align="right" label="出库数量" width="120">
|
||||||
<template #default="detailScope">
|
<template #default="detailScope">
|
||||||
{{ formatQuantity(detailScope.row.quantity) }}
|
{{ formatQuantity(detailScope.row.quantity) }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue