Commit 9ca29d34 by qinjianhui

fix: 问题修改

parent aa9cac68
...@@ -153,19 +153,6 @@ const buildQueryParams = () => ({ ...@@ -153,19 +153,6 @@ const buildQueryParams = () => ({
inventoryStatus: filterForm.value.inventoryStatus || undefined, inventoryStatus: filterForm.value.inventoryStatus || undefined,
}) })
const applyQueryWarehouseName = (records: OrderInventoryData[]) => {
const { warehouseId } = filterForm.value
if (!warehouseId) {
return records
}
const warehouseName = props.warehouseList.find((w) => w.id === warehouseId)
?.name
return records.map((record) => ({
...record,
warehouseName: record.inventoryStatus === 3 ? warehouseName : record.warehouseName,
}))
}
const { const {
loading, loading,
currentPage, currentPage,
...@@ -184,10 +171,7 @@ const { ...@@ -184,10 +171,7 @@ const {
current, current,
size, size,
) )
return { return res.data
...res.data,
records: applyQueryWarehouseName(res.data.records),
}
}, },
}) })
...@@ -255,7 +239,6 @@ const columns = [ ...@@ -255,7 +239,6 @@ const columns = [
align: 'right', align: 'right',
render: (row: OrderInventoryData) => { render: (row: OrderInventoryData) => {
const v = getShortageQuantity(row) const v = getShortageQuantity(row)
if (row.inventoryStatus === 3) return ''
if (v > 0) { if (v > 0) {
return <span style="color: #f56c6c; font-weight: bold">{v}</span> return <span style="color: #f56c6c; font-weight: bold">{v}</span>
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment