diff --git a/src/views/order/orderManagement/archiveOrder.vue b/src/views/order/orderManagement/archiveOrder.vue
index 2305af2c..e3a5fe51 100644
--- a/src/views/order/orderManagement/archiveOrder.vue
+++ b/src/views/order/orderManagement/archiveOrder.vue
@@ -26,9 +26,10 @@
/>
-
+
+
@@ -179,7 +180,6 @@ const hasSelection = ref(false)
const selectedOrderId = ref(null)
const detailVisible = ref(true)
-const quickSearch = ref('')
const toolbarButtons = archiveOrderToolbarButtons
const selectedRow = computed(() => {
@@ -268,22 +268,7 @@ async function loadData() {
}
function buildWhere() {
- let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
- if (quickSearch.value) {
- const q = quickSearch.value.trim()
- if (/^\d+$/.test(q)) {
- where.id = {
- operator: 'eq',
- value: Number(q),
- type: 'text'
- }
- }
- where.delivery_order_code = {
- operator: 'like',
- value: q,
- type: 'text'
- }
- }
+ const where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
return sanitizeArchiveListWhere(where)
}
@@ -366,11 +351,6 @@ function handlePageSizeChange(size: number) {
loadData()
}
-function onQuickSearch() {
- pagination.currentPage = 1
- loadData()
-}
-
function openColumnConfigPanel() {
upperTable.value?.openColumnConfig?.()
}
diff --git a/src/views/order/orderManagement/component/BindPackageMaterialByWaybillDialog.vue b/src/views/order/orderManagement/component/BindPackageMaterialByWaybillDialog.vue
index 49d8684b..92f86d93 100644
--- a/src/views/order/orderManagement/component/BindPackageMaterialByWaybillDialog.vue
+++ b/src/views/order/orderManagement/component/BindPackageMaterialByWaybillDialog.vue
@@ -8,13 +8,13 @@
@close="handleClose"
@closed="resetForm"
>
-
+ /> -->
diff --git a/src/views/order/orderManagement/config/order-common-config.ts b/src/views/order/orderManagement/config/order-common-config.ts
index 1614b0b6..aff86ceb 100644
--- a/src/views/order/orderManagement/config/order-common-config.ts
+++ b/src/views/order/orderManagement/config/order-common-config.ts
@@ -1095,6 +1095,8 @@ export const orderIdScanField = scanBasicField({ label: '订单ID', value: 'id',
export const orderFlagScanField = scanBasicField({ label: '订单标记', value: 'order_flag', type: 'text', operators: ['like', 'notlike'], defaultOperator: 'like' })
export const waveNoScanField = scanBasicField({ label: '波次号', value: 'wave_no', type: 'text', operators: ORDER_BULK_SEARCH_OPERATORS, defaultOperator: 'eq' })
export const deliveryOrderCodeScanField = scanBasicField({ label: '发货单号', value: 'delivery_order_code', type: 'text', operators: ORDER_BULK_SEARCH_OPERATORS, defaultOperator: 'eq' })
+/** ScanBox:搜索订单号(模糊匹配发货单号,替代表格右上角快捷搜索) */
+export const orderQuickSearchScanField = scanBasicField({ label: '搜索订单号', value: 'delivery_order_code', type: 'text', operators: ORDER_BULK_SEARCH_OPERATORS, defaultOperator: 'like' })
export const sourceOrderCodesScanField = scanBasicField({ label: '平台交易单号', value: 'source_order_codes', type: 'text', operators: ORDER_BULK_SEARCH_OPERATORS, defaultOperator: 'eq' })
export const pendingOrderCodeScanField = scanBasicField({ label: '发货单号', value: 'order_code', type: 'text', operators: ORDER_BULK_SEARCH_OPERATORS, defaultOperator: 'eq' })
export const exceptionOrderCodeScanField = scanBasicField({ label: '发货单号', value: 'order_code', type: 'text', operators: ORDER_BULK_SEARCH_OPERATORS, defaultOperator: 'eq' })
@@ -1146,6 +1148,17 @@ export const waveAssignmentScanField = scanBasicField({
]
})
+/** ScanBox:储位分配(合并 unassigned/assigning/error 为「未分配」) */
+export const storageAssignScanField = scanWorkflowField({
+ label: '储位分配',
+ value: 'storage_status',
+ type: 'select',
+ options: [
+ { label: '未分配', value: '__storage_assign_unassigned__', operator: 'in', conditionValue: ['unassigned', 'assigning', 'error'] },
+ { label: '已完成', value: '__storage_assign_completed__', operator: 'eq', conditionValue: 'completed' }
+ ]
+})
+
/** ScanBox:快递公司(快递编码),选项由 index.getExpressList + fillExpressCompanyScanFieldOptions 注入 */
export const expressCompanyScanField = scanBasicField({
label: '快递公司',
@@ -1225,7 +1238,8 @@ export const deliveryAvailableFields = [
// 基础信息
storeScanField,
orderIdScanField,
- deliveryOrderCodeScanField,
+ orderQuickSearchScanField,
+ // deliveryOrderCodeScanField,
sourceOrderCodesScanField,
orderFlagScanField,
waveAssignmentScanField,
@@ -1441,7 +1455,8 @@ export const reviewAvailableFields = [
// 基础信息
storeScanField,
orderIdScanField,
- deliveryOrderCodeScanField,
+ orderQuickSearchScanField,
+ // deliveryOrderCodeScanField,
sourceOrderCodesScanField,
waveAssignmentScanField,
waveNoScanField,
@@ -1588,7 +1603,8 @@ export const pendingAvailableFields = [
// 基础信息
storeScanField,
orderIdScanField,
- pendingOrderCodeScanField,
+ orderQuickSearchScanField,
+ // pendingOrderCodeScanField,
sourceOrderCodesScanField,
orderFlagScanField,
waveAssignmentScanField,
@@ -1612,7 +1628,8 @@ export const pendingAvailableFields = [
orderStatusScanField(pendingOrderStatusFilterOptions),
syncStatusScanField,
recheckStatusScanField,
- storageStatusScanField,
+ storageAssignScanField,
+ // storageStatusScanField,
postStatusScanField,
pickStatusScanField,
packStatusScanField,
@@ -1913,8 +1930,9 @@ export const expectionOrderAvailableFields = [
// 基础信息
storeScanField,
orderIdScanField,
- exceptionOrderCodeScanField,
- deliveryOrderCodeScanField,
+ orderQuickSearchScanField,
+ // exceptionOrderCodeScanField,
+ // deliveryOrderCodeScanField,
sourceOrderCodesScanField,
orderFlagScanField,
waveAssignmentScanField,
@@ -1930,7 +1948,8 @@ export const expectionOrderAvailableFields = [
orderStatusScanField(exceptionOrderStatusFilterOptions),
syncStatusScanField,
recheckStatusScanField,
- storageStatusScanField,
+ storageAssignScanField,
+ // storageStatusScanField,
postStatusScanField,
pickStatusScanField,
packStatusScanField,
@@ -2025,8 +2044,9 @@ export const archiveAvailableFields = [
// 基础信息
storeScanField,
orderIdScanField,
- exceptionOrderCodeScanField,
- deliveryOrderCodeScanField,
+ orderQuickSearchScanField,
+ // exceptionOrderCodeScanField,
+ // deliveryOrderCodeScanField,
sourceOrderCodesScanField,
waveAssignmentScanField,
waveNoScanField,
diff --git a/src/views/order/orderManagement/deliveryException.vue b/src/views/order/orderManagement/deliveryException.vue
index 1c0316c2..3ac553ed 100644
--- a/src/views/order/orderManagement/deliveryException.vue
+++ b/src/views/order/orderManagement/deliveryException.vue
@@ -26,9 +26,10 @@
/>
-
+
+
@@ -174,7 +175,6 @@ const hasSelection = ref(false)
const selectedOrderId = ref(null)
const detailVisible = ref(true)
-const quickSearch = ref('')
const toolbarButtons = deliveryExceptionToolbarButtons
const selectedRow = computed(() => {
@@ -263,22 +263,7 @@ async function loadData() {
}
function buildWhere() {
- let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
- if (quickSearch.value) {
- const q = quickSearch.value.trim()
- if (/^\d+$/.test(q)) {
- where.id = {
- operator: 'eq',
- value: Number(q),
- type: 'text'
- }
- }
- where.delivery_order_code = {
- operator: 'like',
- value: q,
- type: 'text'
- }
- }
+ const where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
return sanitizeDeliveryExpectionListWhere(where)
}
@@ -361,11 +346,6 @@ function handlePageSizeChange(size: number) {
loadData()
}
-function onQuickSearch() {
- pagination.currentPage = 1
- loadData()
-}
-
function openColumnConfigPanel() {
upperTable.value?.openColumnConfig?.()
}
diff --git a/src/views/order/orderManagement/entrustWarehouse.vue b/src/views/order/orderManagement/entrustWarehouse.vue
index 138ae7be..643523df 100644
--- a/src/views/order/orderManagement/entrustWarehouse.vue
+++ b/src/views/order/orderManagement/entrustWarehouse.vue
@@ -26,9 +26,10 @@
/>
-
+
+
@@ -174,7 +175,6 @@ const hasSelection = ref(false)
const selectedOrderId = ref(null)
const detailVisible = ref(true)
-const quickSearch = ref('')
const toolbarButtons = entrustWarehouseToolbarButtons
const selectedRow = computed(() => {
@@ -263,22 +263,7 @@ async function loadData() {
}
function buildWhere() {
- let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
- if (quickSearch.value) {
- const q = quickSearch.value.trim()
- if (/^\d+$/.test(q)) {
- where.id = {
- operator: 'eq',
- value: Number(q),
- type: 'text'
- }
- }
- where.delivery_order_code = {
- operator: 'like',
- value: q,
- type: 'text'
- }
- }
+ const where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
return sanitizeEntrustListWhere(where)
}
@@ -361,11 +346,6 @@ function handlePageSizeChange(size: number) {
loadData()
}
-function onQuickSearch() {
- pagination.currentPage = 1
- loadData()
-}
-
function openColumnConfigPanel() {
upperTable.value?.openColumnConfig?.()
}
diff --git a/src/views/order/orderManagement/exceptionOrder.vue b/src/views/order/orderManagement/exceptionOrder.vue
index 58a1fd93..d37a7857 100644
--- a/src/views/order/orderManagement/exceptionOrder.vue
+++ b/src/views/order/orderManagement/exceptionOrder.vue
@@ -24,7 +24,8 @@
:layout-key="toolbarLayoutKey"
@action="handleToolbarButtonClick"
/>
-
+
-
+
+
@@ -467,12 +469,6 @@ const hasSelection = ref(false)
const selectedOrderId = ref(null)
const detailVisible = ref(true)
-const quickSearch = ref('')
-const storageAssignFilter = ref('')
-const handleStorageAssignFilterChange = () => {
- pagination.currentPage = 1
- loadData()
-}
const toolbarButtons = exceptionToolbarButtons
const selectedRow = computed(() => {
@@ -651,37 +647,7 @@ async function loadData() {
}
function buildExportWhere() {
- let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
- if (quickSearch.value) {
- const q = quickSearch.value.trim()
- // 输入纯数字时同时按订单ID和发货单号搜索
- if (/^\d+$/.test(q)) {
- where.id = {
- operator: 'eq',
- value: Number(q),
- type: 'text'
- }
- }
- where.delivery_order_code = {
- operator: 'like',
- value: q,
- type: 'text'
- }
- }
- // 储位分配筛选:未分配合并 unassigned/assigning/error
- if (storageAssignFilter.value === 'unassigned') {
- where.storage_status = {
- operator: 'in',
- value: ['unassigned', 'assigning', 'error'],
- type: 'text'
- }
- } else if (storageAssignFilter.value === 'completed') {
- where.storage_status = {
- operator: 'eq',
- value: 'completed',
- type: 'text'
- }
- }
+ const where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
return sanitizeExpectionListWhere(where)
}
@@ -783,11 +749,6 @@ function handlePageSizeChange(size: number) {
loadData()
}
-function onQuickSearch() {
- pagination.currentPage = 1
- loadData()
-}
-
function openResolveExceptionDialog() {
if (!selectionRows.value.length) {
ElMessage.warning('请先勾选需要处理的异常订单')
diff --git a/src/views/order/orderManagement/form/ManualWaybillForm.vue b/src/views/order/orderManagement/form/ManualWaybillForm.vue
index e239f180..ed29c3da 100644
--- a/src/views/order/orderManagement/form/ManualWaybillForm.vue
+++ b/src/views/order/orderManagement/form/ManualWaybillForm.vue
@@ -7,13 +7,13 @@
destroy-on-close
@closed="handleClosed"
>
-
+ /> -->
-
+
-
+
+
@@ -428,12 +430,6 @@ const hasSelection = ref(false)
const selectedOrderId = ref(null)
const detailVisible = ref(true)
-const quickSearch = ref('')
-const storageAssignFilter = ref('')
-const handleStorageAssignFilterChange = () => {
- pagination.currentPage = 1
- loadData()
-}
const toolbarButtons = pendingToolbarButtons
const initialConditions = computed(() => {
const waveNo = String(route.query.wave_no || '').trim()
@@ -560,35 +556,6 @@ function buildExportWhere() {
type: 'text'
}
}
- if (quickSearch.value) {
- const q = quickSearch.value.trim()
- if (/^\d+$/.test(q)) {
- where.id = {
- operator: 'eq',
- value: Number(q),
- type: 'text'
- }
- }
- where.delivery_order_code = {
- operator: 'like',
- value: q,
- type: 'text'
- }
- }
- // 储位分配筛选:未分配合并 unassigned/assigning/error
- if (storageAssignFilter.value === 'unassigned') {
- where.storage_status = {
- operator: 'in',
- value: ['unassigned', 'assigning', 'error'],
- type: 'text'
- }
- } else if (storageAssignFilter.value === 'completed') {
- where.storage_status = {
- operator: 'eq',
- value: 'completed',
- type: 'text'
- }
- }
return sanitizePendingListWhere(where)
}
@@ -655,11 +622,6 @@ function handlePageSizeChange(size: number) {
loadData()
}
-function onQuickSearch() {
- pagination.currentPage = 1
- loadData()
-}
-
function openResolveExceptionDialog() {
if (!selectionRows.value.length) {
ElMessage.warning('请先勾选需要处理的异常订单')
diff --git a/src/views/order/orderManagement/reviewOrder.vue b/src/views/order/orderManagement/reviewOrder.vue
index 848a5989..1a17ef5b 100644
--- a/src/views/order/orderManagement/reviewOrder.vue
+++ b/src/views/order/orderManagement/reviewOrder.vue
@@ -27,9 +27,10 @@
/>
-
+
+
@@ -225,7 +226,6 @@ const selectionRows = ref
([])
const hasSelection = ref(false)
const selectedOrderId = ref(null)
-const quickSearch = ref('')
const toolbarButtons = reviewToolbarButtons
const selectedRow = computed(() => {
@@ -341,22 +341,7 @@ async function loadData() {
}
function buildExportWhere() {
- let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
- if (quickSearch.value) {
- const q = quickSearch.value.trim()
- if (/^\d+$/.test(q)) {
- where.id = {
- operator: 'eq',
- value: Number(q),
- type: 'text'
- }
- }
- where.delivery_order_code = {
- operator: 'like',
- value: q,
- type: 'text'
- }
- }
+ const where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
return sanitizeReviewListWhere(where)
}
@@ -423,11 +408,6 @@ function handlePageSizeChange(size: number) {
loadData()
}
-function onQuickSearch() {
- pagination.currentPage = 1
- loadData()
-}
-
function openColumnConfigPanel() {
upperTable.value?.openColumnConfig?.()
}
diff --git a/src/views/stock/stock/component/ImportDialog.vue b/src/views/stock/stock/component/ImportDialog.vue
index 6dde94f0..884d1c74 100644
--- a/src/views/stock/stock/component/ImportDialog.vue
+++ b/src/views/stock/stock/component/ImportDialog.vue
@@ -1,123 +1,157 @@
-
-
-
- 选择文件
- 下载模板
- 新增行
- 删除行
- 清空数据
- {{ selectedFileName || '未选择文件' }}
-
-
- 汇总:共 {{ importSummary.total }} 条,新增 {{ importSummary.addCount }} 条,修改 {{ importSummary.updateCount }} 条
+
+
+
-
-
-
-
-
- SKU ⓘ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 失败
-
-
-
- 缺失数据
-
-
- 货主异常
-
+
+
+ 选择Excel
+ 下载模板
+ 添加明细
+ 删除行
+ 清除数据
+ 确认导入
+ 已选文件:{{ selectedFileName || '未选择' }}
+
+
+
+ 汇总:共 {{ importSummary.total }} 条,新增 {{ importSummary.addCount }} 条,修改 {{ importSummary.updateCount }} 条
+
+
+
+
+
+
+
+
+
+ SKU ⓘ
- 成功
- 未提交
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 失败
+
+
+
+ 缺失数据
+
+
+ 货主异常
+
+
+ 成功
+ 未提交
+
+
+
+
- 提交
关闭
-
-
+
-
diff --git a/src/views/stock/stock/stock-config.ts b/src/views/stock/stock/stock-config.ts
index 7a1c2b41..3d03b95e 100644
--- a/src/views/stock/stock/stock-config.ts
+++ b/src/views/stock/stock/stock-config.ts
@@ -541,11 +541,10 @@ export const stockToolbarButtons: StockToolbarButtonConfig[] = [
disabledKey: 'hasNoSelection',
action: 'confirmBatchDelete'
},
- { key: 'clearData', label: '清空数据', type: 'warning', size: 'small', action: 'handleClearData' },
+ // { key: 'clearData', label: '清空数据', type: 'warning', size: 'small', action: 'handleClearData' },
{
key: 'export',
label: '导出',
- type: 'success',
size: 'small',
permissionKey: 'warehouseExport',
loadingKey: 'exportLoading',
diff --git a/src/views/storage/inventory/component/panelstockdetail.vue b/src/views/storage/inventory/component/panelstockdetail.vue
index 74e8c1eb..edb2bbc2 100644
--- a/src/views/storage/inventory/component/panelstockdetail.vue
+++ b/src/views/storage/inventory/component/panelstockdetail.vue
@@ -4,7 +4,7 @@
@@ -202,7 +202,7 @@ const loadData = () => {
function openTransferDialog(mode: TransferMode) {
if (mode === 'location' && !canTransferByLocation.value) {
- ElMessage.warning('当前记录缺少库存记录 ID,请开启「按批次查询」后选择明细行')
+ ElMessage.warning('当前记录缺少库存记录 ID,请在左侧查询设置中开启「按批次查询」后选择明细行')
return
}
if (mode === 'product' && !canTransferByProduct.value) {
diff --git a/src/views/storage/inventory/index.vue b/src/views/storage/inventory/index.vue
index ca6e4b0d..47e6fdf8 100644
--- a/src/views/storage/inventory/index.vue
+++ b/src/views/storage/inventory/index.vue
@@ -26,14 +26,6 @@
{{ detailVisible ? '隐藏详情' : '显示详情' }}
-
-
- 按批次查询
-
-
-
-
-
@@ -202,6 +194,8 @@ import {
formatInventoryTypeLabel,
inventoryExportColumns,
isInventoryFlagEnabled,
+ normalizeScanConditionToInventoryWhere,
+ parseInventoryGroupByBatch,
productstockColums,
} from './inventory-config'
import { exportUpperTableRows } from '@/views/order/orderManagement/utils/export'
@@ -261,7 +255,8 @@ const queryTime = ref(0)
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
const tableSize = ref('small')
-const groupByBatch = ref(false)
+const currentConditionRaw = ref
(null)
+const groupByBatch = computed(() => parseInventoryGroupByBatch(currentConditionRaw.value))
const columns = computed(() => {
const cols: any[] = JSON.parse(JSON.stringify(productstockColums))
if (groupByBatch.value) {
@@ -345,7 +340,9 @@ async function loadData() {
try {
const params: any = {
pagination: { page: pagination.currentPage, pageSize: pagination.pageSize },
- where: scanBox.value?.getConditions?.() || {},
+ where: normalizeScanConditionToInventoryWhere(
+ currentConditionRaw.value ?? scanBox.value?.getConditions?.() ?? {}
+ ),
group_by_batch: groupByBatch.value
}
@@ -436,17 +433,23 @@ async function loadFilterData() {
}
function handleConditionChange(condition: any) {
+ currentConditionRaw.value = condition
pagination.currentPage = 1
+ selectedEntryId.value = null
loadData()
}
const handleConditionClear = () => {
+ currentConditionRaw.value = {}
pagination.currentPage = 1
+ selectedEntryId.value = null
loadData()
}
function handleConditionReset() {
+ currentConditionRaw.value = {}
pagination.currentPage = 1
+ selectedEntryId.value = null
if (scanBox.value?.reset) {
scanBox.value.reset()
}
@@ -531,12 +534,6 @@ function handlePageSizeChange(size: number) {
loadData()
}
-function handleGroupByBatchChange() {
- pagination.currentPage = 1
- selectedEntryId.value = null
- loadData()
-}
-
function handleCreateEntry() {
ElMessage.info('新建入库单')
}
@@ -581,7 +578,7 @@ async function handleExport(mode: 'waybill' | 'item' = 'waybill') {
const params: any = {
pagination: { page: 1, pageSize: 10000 },
- where: scanBox.value?.getConditions?.() || {},
+ where: normalizeScanConditionToInventoryWhere(currentConditionRaw.value ?? scanBox.value?.getConditions?.() ?? {}),
group_by_batch: true
}
const res: any = await inventoryApi.getInventoryList(params)
@@ -700,18 +697,6 @@ function orderStatusTagType(val: string): any {
@use "../../order/orderManagement/styles/order-sub.scss";
.order-sub-container .main-content {
- .toolbar-right {
- display: flex;
- flex-direction: row;
- gap: 8px;
- align-items: center;
-
- .toolbar-label {
- font-size: 12px;
- color: #606266;
- }
- }
-
.expiry-date-expired {
color: #f56c6c;
font-weight: 600;
diff --git a/src/views/storage/inventory/inventory-config.ts b/src/views/storage/inventory/inventory-config.ts
index b7248054..58fb9f58 100644
--- a/src/views/storage/inventory/inventory-config.ts
+++ b/src/views/storage/inventory/inventory-config.ts
@@ -3,6 +3,58 @@ import { scanWorkflowField } from '@/views/order/orderManagement/config/order-co
/** ScanBox 基础信息分组(对齐收货单排版) */
export const INVENTORY_SCAN_BASIC_INFO_GROUP = '基础信息'
+/** ScanBox 筛选字段分组(库存模块专用) */
+export const INVENTORY_SCAN_FIELD_GROUPS = {
+ basic: '基础信息',
+ options: '查询设置'
+} as const
+
+type InventoryScanFieldGroupKey = keyof typeof INVENTORY_SCAN_FIELD_GROUPS
+
+export function inventoryScanField(
+ group: G,
+ field: Record
+) {
+ return { ...field, group: INVENTORY_SCAN_FIELD_GROUPS[group] }
+}
+
+function extractInventoryScanConds(condition: any): Record | null {
+ if (!condition || typeof condition !== 'object') return null
+ if (condition.conditions && typeof condition.conditions === 'object') {
+ return condition.conditions
+ }
+ return condition
+}
+
+/** 从 ScanBox 条件解析 group_by_batch(默认 false = 合并模式) */
+export function parseInventoryGroupByBatch(condition: any): boolean {
+ const conds = extractInventoryScanConds(condition)
+ if (!conds || !Object.prototype.hasOwnProperty.call(conds, 'group_by_batch')) {
+ return false
+ }
+ const raw = conds.group_by_batch?.value ?? conds.group_by_batch
+ if (raw === true || raw === 'true' || raw === 1 || raw === '1') return true
+ return false
+}
+
+/** 将 ScanBox 条件转为 list 接口 where(排除查询设置项 group_by_batch) */
+export function normalizeScanConditionToInventoryWhere(condition: any): Record {
+ const conds = extractInventoryScanConds(condition)
+ if (!conds) return {}
+
+ const where: Record = {}
+ Object.keys(conds).forEach((key) => {
+ if (key === 'group_by_batch') return
+ const c = conds[key]
+ if (c && typeof c === 'object' && !Array.isArray(c) && 'value' in c) {
+ where[key] = c
+ } else {
+ where[key] = c
+ }
+ })
+ return where
+}
+
/** 为库存 ScanBox 基础信息字段附加分组标签 */
export type InventoryScanFieldConfig = Record & {
group: string
@@ -51,6 +103,13 @@ export const availableFields: InventoryScanFieldConfig[] = [
{ label: '分配', value: 'FP' }
]
}) as InventoryScanFieldConfig,
+ inventoryScanField('options', {
+ value: 'group_by_batch',
+ label: '按批次查询',
+ type: 'boolean',
+ defaultValue: false,
+ placeholder: '开启后按库存明细逐条返回;关闭则按库位+商品合并'
+ })
]
/** 库位展示名:优先 custom_name,其次 space_code */
export function formatInventorySpaceLabel(space?: Record | null, fallback = ''): string {
diff --git a/src/views/storage/receiving/component/Product.vue b/src/views/storage/receiving/component/Product.vue
index f1c96060..3f59a0c0 100644
--- a/src/views/storage/receiving/component/Product.vue
+++ b/src/views/storage/receiving/component/Product.vue
@@ -93,7 +93,7 @@
@@ -189,7 +189,7 @@
-
+
实际收货数量*
箱数*
@@ -240,7 +240,7 @@
-
+
@@ -249,23 +249,22 @@
-
+
条码*
-
+
商品名称*
-
-
-
-
+
+
+
@@ -595,7 +594,7 @@ const isRowNotStored = (row?: any) => {
return !Number.isFinite(storedQuantity) || storedQuantity <= 0
}
- if (storageStatus === 'none' || storageStatus === '未入库') return true
+ if (storageStatus === 'waiting' || storageStatus === '待入库' || storageStatus === 'none' || storageStatus === '未入库') return true
if (storageStatus === 'all' || storageStatus === '全部入库' || storageStatus === 'partial' || storageStatus === '部分入库') {
return false
}
@@ -2816,6 +2815,17 @@ onUnmounted(() => {
width: 100%;
}
+.edit-detail-form {
+ :deep(.el-input-group) {
+ width: 100%;
+ }
+
+ :deep(.el-form-item .el-input),
+ :deep(.el-form-item .el-date-editor) {
+ width: 100%;
+ }
+}
+
.right-col {
grid-column: 2 / 3;
grid-row: 2 / 3;
@@ -2873,6 +2883,13 @@ onUnmounted(() => {
color: #E6A23C;
border: 1px solid #f5dab1;
}
+
+ /* 待入库 - 蓝色 */
+ .storage-status-waiting {
+ background-color: #ecf5ff;
+ color: #409EFF;
+ border: 1px solid #b3d8ff;
+ }
/* 未入库 - 灰色 */
.storage-status-none {
diff --git a/src/views/storage/receiving/receiving-config.ts b/src/views/storage/receiving/receiving-config.ts
index df61dbc2..42ed7306 100644
--- a/src/views/storage/receiving/receiving-config.ts
+++ b/src/views/storage/receiving/receiving-config.ts
@@ -41,6 +41,7 @@ export const detailStatusConfig = {
export const storageStatusConfig = {
all: { text: '全部入库', tagType: 'success' },
partial: { text: '部分入库', tagType: 'warning' },
+ waiting: { text: '待入库', tagType: 'primary' },
none: { text: '未入库', tagType: 'info' }
}
@@ -48,6 +49,7 @@ export const storageStatusConfig = {
export const productStorageStatusConfig: any = {
all: { text: '全部入库', tagType: 'success', color: '#67C23A' },
partial: { text: '部分入库', tagType: 'warning', color: '#E6A23C' },
+ waiting: { text: '待入库', tagType: 'primary', color: '#409EFF' },
none: { text: '未入库', tagType: 'info', color: '#909399' }
}
@@ -302,7 +304,8 @@ export const availableFields: ReceivingScanFieldConfig[] = [
label: '入库状态',
type: 'select',
options: [
- { value: 'none', label: '待入库' },
+ { value: 'waiting', label: '待入库' },
+ { value: 'none', label: '未入库' },
{ value: 'partial', label: '部分入库' },
{ value: 'all', label: '已入库' }
]