1
This commit is contained in:
parent
11aeb0401e
commit
8d9360bb9f
@ -10,6 +10,9 @@ LOCAL_DIST="./dist"
|
|||||||
# SSH 密钥提示:请确保本地已将 id_ed25519.pub 添加到服务器的 ~/.ssh/authorized_keys
|
# SSH 密钥提示:请确保本地已将 id_ed25519.pub 添加到服务器的 ~/.ssh/authorized_keys
|
||||||
# 密钥内容:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICJtwa+MFLQEgkEbcGQ6dkQOiFydRvjVeidJ/7uBsF2e 3313488199@qq.com
|
# 密钥内容:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICJtwa+MFLQEgkEbcGQ6dkQOiFydRvjVeidJ/7uBsF2e 3313488199@qq.com
|
||||||
|
|
||||||
|
SSH_KEY="$HOME/.ssh/id_ed25519_admin"
|
||||||
|
SSH_OPTS="-i $SSH_KEY -o StrictHostKeyChecking=no"
|
||||||
|
|
||||||
echo "🚀 开始发布版本: $RELEASE_NAME"
|
echo "🚀 开始发布版本: $RELEASE_NAME"
|
||||||
|
|
||||||
# 1. 本地打包
|
# 1. 本地打包
|
||||||
@ -17,11 +20,11 @@ npm run build
|
|||||||
|
|
||||||
# 2. 压缩并上传
|
# 2. 压缩并上传
|
||||||
tar -czf dist.tar.gz -C $LOCAL_DIST .
|
tar -czf dist.tar.gz -C $LOCAL_DIST .
|
||||||
ssh $USER@$IP "mkdir -p $BASE_PATH/releases/$RELEASE_NAME"
|
ssh $SSH_OPTS $USER@$IP "mkdir -p $BASE_PATH/releases/$RELEASE_NAME"
|
||||||
scp dist.tar.gz $USER@$IP:$BASE_PATH/releases/$RELEASE_NAME
|
scp $SSH_OPTS dist.tar.gz $USER@$IP:$BASE_PATH/releases/$RELEASE_NAME
|
||||||
|
|
||||||
# 3. 远程解压、更新软链接、清理旧版本
|
# 3. 远程解压、更新软链接、清理旧版本
|
||||||
ssh $USER@$IP << EOF
|
ssh $SSH_OPTS $USER@$IP << EOF
|
||||||
cd $BASE_PATH/releases/$RELEASE_NAME
|
cd $BASE_PATH/releases/$RELEASE_NAME
|
||||||
tar -xzf dist.tar.gz
|
tar -xzf dist.tar.gz
|
||||||
rm dist.tar.gz
|
rm dist.tar.gz
|
||||||
|
|||||||
BIN
dist.tar.gz
BIN
dist.tar.gz
Binary file not shown.
@ -13,7 +13,7 @@ export function fastWhereTree(type:any) {
|
|||||||
isSystemApi: true
|
isSystemApi: true
|
||||||
} as any)
|
} as any)
|
||||||
}
|
}
|
||||||
export function loadStores(type:any) {
|
export function loadStores() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system',
|
url: '/system',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@ -22,7 +22,7 @@ export function loadStores(type:any) {
|
|||||||
v: '1.0',
|
v: '1.0',
|
||||||
timestamp: new Date().getTime()
|
timestamp: new Date().getTime()
|
||||||
},
|
},
|
||||||
data: {type},
|
data: {},
|
||||||
isSystemApi: true
|
isSystemApi: true
|
||||||
} as any)
|
} as any)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,10 @@ export type WaybillWarehouseListWhere = {
|
|||||||
orderId?: number
|
orderId?: number
|
||||||
/** 订单号(模糊搜索,匹配 delivery_order_code 快照列) */
|
/** 订单号(模糊搜索,匹配 delivery_order_code 快照列) */
|
||||||
orderNo?: string
|
orderNo?: string
|
||||||
|
/** 运单类型:"main"/"1"=主单号,"child"/"2"=子单号 */
|
||||||
|
waybillType?: string
|
||||||
|
/** 货主ID(等值匹配) */
|
||||||
|
storeId?: number
|
||||||
/** 物流公司编码(等值匹配),如 SF/YT/STO/ZTO 等 */
|
/** 物流公司编码(等值匹配),如 SF/YT/STO/ZTO 等 */
|
||||||
logisticsCode?: string
|
logisticsCode?: string
|
||||||
/** 物流接口ID(等值匹配) */
|
/** 物流接口ID(等值匹配) */
|
||||||
|
|||||||
@ -55,6 +55,8 @@ export interface FieldDefinition {
|
|||||||
type: 'text' | 'select' | 'daterange' | 'number'
|
type: 'text' | 'select' | 'daterange' | 'number'
|
||||||
group?: string
|
group?: string
|
||||||
options?: { label: string; value: any }[]
|
options?: { label: string; value: any }[]
|
||||||
|
multiple?: boolean
|
||||||
|
filterable?: boolean
|
||||||
} | null
|
} | null
|
||||||
table: {
|
table: {
|
||||||
minWidth?: number
|
minWidth?: number
|
||||||
@ -86,7 +88,8 @@ export const VALUE_MAPS: Record<string, Record<string, string>> = {
|
|||||||
'未分配': '未分配', '已分配': '已分配'
|
'未分配': '未分配', '已分配': '已分配'
|
||||||
},
|
},
|
||||||
waybillType: {
|
waybillType: {
|
||||||
'主单号': '主单号', '子单号': '子单号'
|
'1': '主单号', '2': '子单号',
|
||||||
|
'main': '主单号', 'child': '子单号'
|
||||||
},
|
},
|
||||||
yesNo: {
|
yesNo: {
|
||||||
'Y': '是', 'N': '否',
|
'Y': '是', 'N': '否',
|
||||||
@ -212,11 +215,18 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
|||||||
order_id: {
|
order_id: {
|
||||||
key: 'order_id',
|
key: 'order_id',
|
||||||
label: '订单ID',
|
label: '订单ID',
|
||||||
scanBox: null,
|
scanBox: { type: 'text', group: SCANBOX_GROUPS.basic },
|
||||||
table: { minWidth: 90, align: 'center' },
|
table: { minWidth: 90, align: 'center' },
|
||||||
slot: null,
|
slot: null,
|
||||||
detailLabel: '订单ID'
|
detailLabel: '订单ID'
|
||||||
},
|
},
|
||||||
|
keyword: {
|
||||||
|
key: 'keyword',
|
||||||
|
label: '关键词',
|
||||||
|
scanBox: { type: 'text', group: SCANBOX_GROUPS.basic },
|
||||||
|
table: null,
|
||||||
|
slot: null
|
||||||
|
},
|
||||||
business_key: {
|
business_key: {
|
||||||
key: 'business_key',
|
key: 'business_key',
|
||||||
label: '业务键',
|
label: '业务键',
|
||||||
@ -236,7 +246,7 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
|||||||
store_name: {
|
store_name: {
|
||||||
key: 'store_name',
|
key: 'store_name',
|
||||||
label: '货主',
|
label: '货主',
|
||||||
scanBox: { type: 'select', group: SCANBOX_GROUPS.basic, options: [] },
|
scanBox: { type: 'select', group: SCANBOX_GROUPS.basic, options: [], multiple: true, filterable: true },
|
||||||
table: { minWidth: 120, showOverflowTooltip: true },
|
table: { minWidth: 120, showOverflowTooltip: true },
|
||||||
slot: null,
|
slot: null,
|
||||||
detailLabel: '货主名称'
|
detailLabel: '货主名称'
|
||||||
@ -301,7 +311,7 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
|||||||
logistics_interface_id: {
|
logistics_interface_id: {
|
||||||
key: 'logistics_interface_id',
|
key: 'logistics_interface_id',
|
||||||
label: '物流接口ID',
|
label: '物流接口ID',
|
||||||
scanBox: null,
|
scanBox: { type: 'text', group: SCANBOX_GROUPS.logistics },
|
||||||
table: { minWidth: 110, align: 'center' },
|
table: { minWidth: 110, align: 'center' },
|
||||||
slot: null,
|
slot: null,
|
||||||
detailLabel: '物流接口ID'
|
detailLabel: '物流接口ID'
|
||||||
@ -326,7 +336,7 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
|||||||
package_material_id: {
|
package_material_id: {
|
||||||
key: 'package_material_id',
|
key: 'package_material_id',
|
||||||
label: '包材ID',
|
label: '包材ID',
|
||||||
scanBox: null,
|
scanBox: { type: 'text', group: SCANBOX_GROUPS.basic },
|
||||||
table: { minWidth: 90, align: 'center' },
|
table: { minWidth: 90, align: 'center' },
|
||||||
slot: null,
|
slot: null,
|
||||||
detailLabel: '包材ID'
|
detailLabel: '包材ID'
|
||||||
@ -406,6 +416,13 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
|||||||
slot: null,
|
slot: null,
|
||||||
detailLabel: '称重重量'
|
detailLabel: '称重重量'
|
||||||
},
|
},
|
||||||
|
hasWeighingWeight: {
|
||||||
|
key: 'hasWeighingWeight',
|
||||||
|
label: '是否已称重',
|
||||||
|
scanBox: { type: 'select', group: SCANBOX_GROUPS.status, options: getOptions('bool') },
|
||||||
|
table: null,
|
||||||
|
slot: null
|
||||||
|
},
|
||||||
print_count: {
|
print_count: {
|
||||||
key: 'print_count',
|
key: 'print_count',
|
||||||
label: '打印次数',
|
label: '打印次数',
|
||||||
@ -439,13 +456,13 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
|||||||
slot: null
|
slot: null
|
||||||
},
|
},
|
||||||
// —— 操作列 ——
|
// —— 操作列 ——
|
||||||
operation: {
|
// operation: {
|
||||||
key: 'operation',
|
// key: 'operation',
|
||||||
label: '操作',
|
// label: '操作',
|
||||||
scanBox: null,
|
// scanBox: null,
|
||||||
table: { minWidth: 120, fixed: 'right', align: 'center' },
|
// table: { minWidth: 120, fixed: 'right', align: 'center' },
|
||||||
slot: { type: 'operation' }
|
// slot: { type: 'operation' }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
@ -582,6 +599,8 @@ export function resolveTabConfig(raw: TabPageRawConfig): TabPageConfig {
|
|||||||
type: def.scanBox.type,
|
type: def.scanBox.type,
|
||||||
options: def.scanBox.options ? [...def.scanBox.options] : undefined,
|
options: def.scanBox.options ? [...def.scanBox.options] : undefined,
|
||||||
group: def.scanBox.group,
|
group: def.scanBox.group,
|
||||||
|
multiple: def.scanBox.multiple,
|
||||||
|
filterable: def.scanBox.filterable,
|
||||||
required: (def.scanBox as any).required
|
required: (def.scanBox as any).required
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -654,30 +673,97 @@ export function resolveTabConfig(raw: TabPageRawConfig): TabPageConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// 七、buildWhereConditions
|
// 七、buildWhereConditions(对齐 waybill.warehouse.list 接口文档)
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
||||||
|
/** ScanBox 字段 key → API where 字段名(snake_case → camelCase) */
|
||||||
|
const WHERE_FIELD_MAP: Record<string, string> = {
|
||||||
|
waybill_code: 'waybillCode',
|
||||||
|
main_waybill_code: 'mainWaybillCode',
|
||||||
|
order_no: 'orderNo',
|
||||||
|
order_id: 'orderId',
|
||||||
|
store_name: 'storeId',
|
||||||
|
logistics_code: 'logisticsCode',
|
||||||
|
logistics_interface_id: 'logisticsInterfaceId',
|
||||||
|
platform_code: 'platformCode',
|
||||||
|
is_back: 'isBack',
|
||||||
|
is_intercept: 'isIntercept',
|
||||||
|
is_galaxy_receive: 'isGalaxyReceive',
|
||||||
|
package_material_id: 'packageMaterialId',
|
||||||
|
waybill_type: 'waybillType',
|
||||||
|
}
|
||||||
|
|
||||||
|
/** API where 字段期望类型(用于值类型转换) */
|
||||||
|
const WHERE_FIELD_TYPE: Record<string, 'string' | 'number' | 'boolean'> = {
|
||||||
|
orderId: 'number',
|
||||||
|
storeId: 'number',
|
||||||
|
logisticsInterfaceId: 'number',
|
||||||
|
packageMaterialId: 'number',
|
||||||
|
status: 'number',
|
||||||
|
hasWeighingWeight: 'boolean',
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 将 ScanBox 值转换为 API 期望类型 */
|
||||||
|
function coerceValue(value: any, apiKey: string): any {
|
||||||
|
const targetType = WHERE_FIELD_TYPE[apiKey]
|
||||||
|
if (!targetType) return value
|
||||||
|
if (targetType === 'number') {
|
||||||
|
if (Array.isArray(value)) return value.map((v: any) => Number(v))
|
||||||
|
return Number(value)
|
||||||
|
}
|
||||||
|
if (targetType === 'boolean') {
|
||||||
|
if (Array.isArray(value)) return value.map((v: any) => v === 'true' || v === '1' || v === true || v === 1)
|
||||||
|
return value === 'true' || value === '1' || value === true || value === 1
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
export function buildWhereConditions(rawConditions: Record<string, any>): Record<string, any> {
|
export function buildWhereConditions(rawConditions: Record<string, any>): Record<string, any> {
|
||||||
const where: Record<string, any> = {}
|
const where: Record<string, any> = {}
|
||||||
|
|
||||||
for (const [key, cond] of Object.entries(rawConditions || {})) {
|
for (const [key, cond] of Object.entries(rawConditions || {})) {
|
||||||
let value: any = undefined
|
// 从 ScanBox 结构化条件 { value, operator, field, type, isMultiple } 中提取值
|
||||||
if (cond && typeof cond === 'object' && 'operator' in cond) {
|
let value: any
|
||||||
value = (cond as any).value
|
if (cond && typeof cond === 'object' && !Array.isArray(cond) && 'operator' in cond) {
|
||||||
} else if (cond !== undefined && cond !== null && cond !== '') {
|
if (['isnull', 'isnotnull'].includes(cond.operator)) continue
|
||||||
value = Array.isArray(cond) ? cond[0] ?? '' : cond
|
value = cond.value
|
||||||
|
} else {
|
||||||
|
value = cond
|
||||||
}
|
}
|
||||||
if (value === undefined || value === null || value === '' || (Array.isArray(value) && value.length === 0)) {
|
|
||||||
|
// 跳过空值
|
||||||
|
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// createdAtStart 日期范围 → 拆分为 createdAtStart / createdAtEnd
|
||||||
|
if (key === 'createdAtStart' && Array.isArray(value)) {
|
||||||
|
const [start, end] = value
|
||||||
|
if (start) where.createdAtStart = start
|
||||||
|
if (end) where.createdAtEnd = end
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// 字段名映射(snake_case → camelCase)
|
||||||
|
const apiKey = WHERE_FIELD_MAP[key] || key
|
||||||
|
|
||||||
|
// 类型转换(对齐 API 参数类型:number / boolean)
|
||||||
|
value = coerceValue(value, apiKey)
|
||||||
|
|
||||||
|
// filterParamMap 值映射(仅单值)
|
||||||
const def = FIELD_DICT[key]
|
const def = FIELD_DICT[key]
|
||||||
if (def?.filterParamMap) {
|
if (def?.filterParamMap && !Array.isArray(value)) {
|
||||||
const mapped = def.filterParamMap[String(value)]
|
const mapped = def.filterParamMap[String(value)]
|
||||||
if (mapped !== undefined) {
|
if (mapped !== undefined) {
|
||||||
where[key] = mapped
|
where[apiKey] = mapped
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
where[key] = value
|
|
||||||
|
// 扁平传值(string / number / boolean / array)
|
||||||
|
where[apiKey] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
return where
|
return where
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -760,12 +846,17 @@ export const tabPages: TabPageRawConfig[] = [
|
|||||||
scanBoxFieldKeys: [
|
scanBoxFieldKeys: [
|
||||||
'waybill_code',
|
'waybill_code',
|
||||||
'main_waybill_code',
|
'main_waybill_code',
|
||||||
|
'keyword',
|
||||||
'waybill_type',
|
'waybill_type',
|
||||||
|
'order_no',
|
||||||
|
'order_id',
|
||||||
'store_name',
|
'store_name',
|
||||||
'logistics_code',
|
'logistics_code',
|
||||||
|
'logistics_interface_id',
|
||||||
'platform_code',
|
'platform_code',
|
||||||
'status',
|
'status',
|
||||||
'pack_status',
|
'package_material_id',
|
||||||
|
'hasWeighingWeight',
|
||||||
'is_back',
|
'is_back',
|
||||||
'is_intercept',
|
'is_intercept',
|
||||||
'is_galaxy_receive',
|
'is_galaxy_receive',
|
||||||
@ -871,11 +962,6 @@ export const tabPages: TabPageRawConfig[] = [
|
|||||||
},
|
},
|
||||||
buildListParams({ pagination, conditions, sort }) {
|
buildListParams({ pagination, conditions, sort }) {
|
||||||
const where = buildWhereConditions(conditions)
|
const where = buildWhereConditions(conditions)
|
||||||
if (conditions?.createdAtStart && Array.isArray(conditions.createdAtStart)) {
|
|
||||||
const [start, end] = conditions.createdAtStart
|
|
||||||
if (start) where.createdAtStart = start
|
|
||||||
if (end) where.createdAtEnd = end
|
|
||||||
}
|
|
||||||
const params: Record<string, any> = {
|
const params: Record<string, any> = {
|
||||||
pagination: { page: pagination.page, pageSize: pagination.pageSize },
|
pagination: { page: pagination.page, pageSize: pagination.pageSize },
|
||||||
where
|
where
|
||||||
|
|||||||
@ -334,13 +334,13 @@ function injectScanBoxOptions(fieldValue: string, options: { label: string; valu
|
|||||||
async function loadScanBoxOptions() {
|
async function loadScanBoxOptions() {
|
||||||
try {
|
try {
|
||||||
const [expressRes, platformRes, storesRes] = await Promise.all([
|
const [expressRes, platformRes, storesRes] = await Promise.all([
|
||||||
getExpressList({}),
|
getExpressList({ systemOnly: true }),
|
||||||
getPlatformList({}),
|
getPlatformList({ systemOnly: true }),
|
||||||
loadStores({ type: 'order' })
|
loadStores()
|
||||||
])
|
])
|
||||||
const expressRaw: any[] = expressRes?.data?.list ?? expressRes?.data ?? []
|
const expressRaw: any[] = expressRes?.data?.list ?? expressRes?.data ?? []
|
||||||
const platformRaw: any[] = platformRes?.data?.list ?? platformRes?.data ?? []
|
const platformRaw: any[] = platformRes?.data?.list ?? platformRes?.data ?? []
|
||||||
const storesRaw: any[] = storesRes?.data?.list ?? storesRes?.data ?? []
|
const storesRaw: any[] = storesRes?.stores ?? []
|
||||||
|
|
||||||
const expressOptions = expressRaw.map((item: any) => ({
|
const expressOptions = expressRaw.map((item: any) => ({
|
||||||
label: `${item.code ?? item.logistics_code ?? ''} — ${item.name ?? item.logistics_name ?? ''}`,
|
label: `${item.code ?? item.logistics_code ?? ''} — ${item.name ?? item.logistics_name ?? ''}`,
|
||||||
@ -353,9 +353,9 @@ async function loadScanBoxOptions() {
|
|||||||
})).filter((opt: any) => opt.value)
|
})).filter((opt: any) => opt.value)
|
||||||
|
|
||||||
const storeOptions = storesRaw.map((item: any) => ({
|
const storeOptions = storesRaw.map((item: any) => ({
|
||||||
label: item.name ?? item.store_name ?? '',
|
label: item.label ?? item.name ?? item.store_name ?? '',
|
||||||
value: String(item.name ?? item.store_name ?? '')
|
value: item.value ?? item.id ?? item.store_id
|
||||||
})).filter((opt: any) => opt.value)
|
})).filter((opt: any) => opt.value != null && opt.value !== '')
|
||||||
|
|
||||||
injectScanBoxOptions('logistics_code', expressOptions)
|
injectScanBoxOptions('logistics_code', expressOptions)
|
||||||
injectScanBoxOptions('platform_code', platformOptions)
|
injectScanBoxOptions('platform_code', platformOptions)
|
||||||
@ -505,11 +505,6 @@ const {
|
|||||||
function buildExportAllPayload() {
|
function buildExportAllPayload() {
|
||||||
const conditions = scanBoxRef.value?.getConditions?.() || {}
|
const conditions = scanBoxRef.value?.getConditions?.() || {}
|
||||||
const where = buildWhereConditions(conditions)
|
const where = buildWhereConditions(conditions)
|
||||||
if (conditions?.createdAtStart && Array.isArray(conditions.createdAtStart)) {
|
|
||||||
const [start, end] = conditions.createdAtStart
|
|
||||||
if (start) where.createdAtStart = start
|
|
||||||
if (end) where.createdAtEnd = end
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
where,
|
where,
|
||||||
sort: currentSort.prop
|
sort: currentSort.prop
|
||||||
@ -708,7 +703,7 @@ const handleRowClick = async (row: Record<string, any>) => {
|
|||||||
try {
|
try {
|
||||||
const detailRes = await waybillWarehouseDetail({
|
const detailRes = await waybillWarehouseDetail({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
waybill_code: row.waybill_code
|
waybillCode: row.waybill_code
|
||||||
})
|
})
|
||||||
if (detailRes && (detailRes.code === 1 || detailRes.code === 200)) {
|
if (detailRes && (detailRes.code === 1 || detailRes.code === 200)) {
|
||||||
const raw = detailRes.data ?? detailRes
|
const raw = detailRes.data ?? detailRes
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -302,7 +302,7 @@ const {
|
|||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, expressRes]: any = await Promise.all([
|
const [storesRes, expressRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'order' }),
|
indexApi.loadStores(),
|
||||||
indexApi.getExpressList({})
|
indexApi.getExpressList({})
|
||||||
])
|
])
|
||||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
width="92%"
|
width="92%"
|
||||||
@ -1122,7 +1122,7 @@ function getOrderGroupKey(row: ImportPreviewRow) {
|
|||||||
|
|
||||||
async function loadStoreOptions() {
|
async function loadStoreOptions() {
|
||||||
try {
|
try {
|
||||||
const storesRes: any = await indexApi.loadStores({ type: 'order' })
|
const storesRes: any = await indexApi.loadStores()
|
||||||
storeOptions.value = mapStoreListToSelectOptions(extractStoreListFromResponse(storesRes))
|
storeOptions.value = mapStoreListToSelectOptions(extractStoreListFromResponse(storesRes))
|
||||||
} catch {
|
} catch {
|
||||||
storeOptions.value = []
|
storeOptions.value = []
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -297,7 +297,7 @@ const {
|
|||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, expressRes]: any = await Promise.all([
|
const [storesRes, expressRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'order' }),
|
indexApi.loadStores(),
|
||||||
indexApi.getExpressList({})
|
indexApi.getExpressList({})
|
||||||
])
|
])
|
||||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -366,7 +366,7 @@ async function loadOrderMetaOptions() {
|
|||||||
const [expressRes, platformRes, storesRes] = await Promise.all([
|
const [expressRes, platformRes, storesRes] = await Promise.all([
|
||||||
indexApi.getExpressList({}),
|
indexApi.getExpressList({}),
|
||||||
indexApi.getPlatformList({}),
|
indexApi.getPlatformList({}),
|
||||||
indexApi.loadStores({ type: 'order' })
|
indexApi.loadStores()
|
||||||
])
|
])
|
||||||
const expressData: any = expressRes?.data
|
const expressData: any = expressRes?.data
|
||||||
const platformData: any = platformRes?.data
|
const platformData: any = platformRes?.data
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -297,7 +297,7 @@ const {
|
|||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, expressRes]: any = await Promise.all([
|
const [storesRes, expressRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'order' }),
|
indexApi.loadStores(),
|
||||||
indexApi.getExpressList({})
|
indexApi.getExpressList({})
|
||||||
])
|
])
|
||||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -702,7 +702,7 @@ const {
|
|||||||
|
|
||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const storesRes: any = await indexApi.loadStores({ type: 'order' })
|
const storesRes: any = await indexApi.loadStores()
|
||||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||||
} catch {
|
} catch {
|
||||||
fillStoreScanFieldOptions(availableFieldsRef, [])
|
fillStoreScanFieldOptions(availableFieldsRef, [])
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -426,7 +426,7 @@ async function loadOrderMetaOptions() {
|
|||||||
const [expressRes, platformRes, storesRes] = await Promise.all([
|
const [expressRes, platformRes, storesRes] = await Promise.all([
|
||||||
indexApi.getExpressList({}),
|
indexApi.getExpressList({}),
|
||||||
indexApi.getPlatformList({}),
|
indexApi.getPlatformList({}),
|
||||||
indexApi.loadStores({ type: 'order' })
|
indexApi.loadStores()
|
||||||
])
|
])
|
||||||
const expressData: any = expressRes?.data
|
const expressData: any = expressRes?.data
|
||||||
const platformData: any = platformRes?.data
|
const platformData: any = platformRes?.data
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -988,7 +988,7 @@ async function loadOrderMetaOptions() {
|
|||||||
|
|
||||||
async function loadStoreOptions() {
|
async function loadStoreOptions() {
|
||||||
try {
|
try {
|
||||||
const storesRes: any = await indexApi.loadStores({ type: 'order' })
|
const storesRes: any = await indexApi.loadStores()
|
||||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||||
} catch {
|
} catch {
|
||||||
fillStoreScanFieldOptions(availableFieldsRef, [])
|
fillStoreScanFieldOptions(availableFieldsRef, [])
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -286,7 +286,7 @@ async function loadOrderMetaOptions() {
|
|||||||
const [platformRes, expressRes, storesRes] = await Promise.all([
|
const [platformRes, expressRes, storesRes] = await Promise.all([
|
||||||
indexApi.getPlatformList({}),
|
indexApi.getPlatformList({}),
|
||||||
indexApi.getExpressList({}),
|
indexApi.getExpressList({}),
|
||||||
indexApi.loadStores({ type: 'order' })
|
indexApi.loadStores()
|
||||||
])
|
])
|
||||||
const platformData: any = platformRes?.data
|
const platformData: any = platformRes?.data
|
||||||
const platformRaw = platformData?.list || platformData || []
|
const platformRaw = platformData?.list || platformData || []
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<!-- <scan-box
|
<!-- <scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -436,7 +436,7 @@ async function loadFallbackOrderFilterOptions() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const [storesRes, expressRes, platformRes] = await Promise.all([
|
const [storesRes, expressRes, platformRes] = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'order' }),
|
indexApi.loadStores(),
|
||||||
indexApi.getExpressList({}),
|
indexApi.getExpressList({}),
|
||||||
indexApi.getPlatformList({})
|
indexApi.getPlatformList({})
|
||||||
])
|
])
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -2988,7 +2988,7 @@ async function loadFallbackOrderFilterOptions() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const [storesRes, expressRes, platformRes] = await Promise.all([
|
const [storesRes, expressRes, platformRes] = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'order' }),
|
indexApi.loadStores(),
|
||||||
indexApi.getExpressList({}),
|
indexApi.getExpressList({}),
|
||||||
indexApi.getPlatformList({})
|
indexApi.getPlatformList({})
|
||||||
])
|
])
|
||||||
@ -3061,7 +3061,7 @@ async function loadFallbackOrderFilterOptions() {
|
|||||||
async function loadGroupOrderStoreOptions() {
|
async function loadGroupOrderStoreOptions() {
|
||||||
if (groupOrderStoreOptions.value.length > 0) return
|
if (groupOrderStoreOptions.value.length > 0) return
|
||||||
try {
|
try {
|
||||||
const res: any = await indexApi.loadStores({ type: 'order' })
|
const res: any = await indexApi.loadStores()
|
||||||
const stores = Array.isArray(res?.stores) ? res.stores : []
|
const stores = Array.isArray(res?.stores) ? res.stores : []
|
||||||
groupOrderStoreOptions.value = stores.map((item: any) => ({
|
groupOrderStoreOptions.value = stores.map((item: any) => ({
|
||||||
label: item.label || item.name || String(item.value || item.id),
|
label: item.label || item.name || String(item.value || item.id),
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -2355,7 +2355,7 @@ function openGroupOrderDialog() {
|
|||||||
async function loadGroupOrderStoreOptions() {
|
async function loadGroupOrderStoreOptions() {
|
||||||
if (groupOrderStoreOptions.value.length > 0) return
|
if (groupOrderStoreOptions.value.length > 0) return
|
||||||
try {
|
try {
|
||||||
const res: any = await indexApi.loadStores({ type: 'order' })
|
const res: any = await indexApi.loadStores()
|
||||||
const stores = Array.isArray(res?.stores) ? res.stores : []
|
const stores = Array.isArray(res?.stores) ? res.stores : []
|
||||||
groupOrderStoreOptions.value = stores.map((item: any) => ({
|
groupOrderStoreOptions.value = stores.map((item: any) => ({
|
||||||
label: item.label || item.name || String(item.value || item.id),
|
label: item.label || item.name || String(item.value || item.id),
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -726,7 +726,7 @@ async function loadStrategyFilterOptions() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const [storesRes, expressRes, platformRes] = await Promise.all([
|
const [storesRes, expressRes, platformRes] = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'order' }),
|
indexApi.loadStores(),
|
||||||
/** 编辑策略:允许快递编码仅使用系统基础快递(index.getExpressList systemOnly) */
|
/** 编辑策略:允许快递编码仅使用系统基础快递(index.getExpressList systemOnly) */
|
||||||
indexApi.getExpressList({ systemOnly: true }),
|
indexApi.getExpressList({ systemOnly: true }),
|
||||||
/** 编辑策略:允许平台仅使用系统基础平台(index.getPlatformList systemOnly) */
|
/** 编辑策略:允许平台仅使用系统基础平台(index.getPlatformList systemOnly) */
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="pending-order-panel">
|
<div class="pending-order-panel">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -603,7 +603,7 @@ function normalizeStoreOptions(rawStores: any[]) {
|
|||||||
|
|
||||||
async function loadStoreOptions() {
|
async function loadStoreOptions() {
|
||||||
try {
|
try {
|
||||||
const storesRes: any = await indexApi.loadStores({ type: 'order' })
|
const storesRes: any = await indexApi.loadStores()
|
||||||
const rawStores = storesRes?.stores || storesRes?.data?.stores || storesRes?.data || []
|
const rawStores = storesRes?.stores || storesRes?.data?.stores || storesRes?.data || []
|
||||||
const storeField = availableFieldsRef.find((item: any) => item.value === 'store_id')
|
const storeField = availableFieldsRef.find((item: any) => item.value === 'store_id')
|
||||||
if (storeField) {
|
if (storeField) {
|
||||||
|
|||||||
@ -282,7 +282,7 @@ const props = defineProps<{
|
|||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
errorMessage: string
|
errorMessage: string
|
||||||
payload: WavePlatformPrintDataPayload | null
|
payload: WavePlatformPrintDataPayload | null
|
||||||
requestMeta: { warehouse_id: number; wave_ids: Array<number | string> } | null
|
requestMeta: Record<string, any> | null
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<!--
|
<!--
|
||||||
FetchGroupOrderForm — 抓取团购单表单
|
FetchGroupOrderForm — 抓取团购单表单
|
||||||
|
|
||||||
对应 waveOrder 中 GroupWaveBatchListPanel 的团购单抓取对话框。
|
对应 waveOrder 中 GroupWaveBatchListPanel 的团购单抓取对话框。
|
||||||
@ -269,7 +269,7 @@ async function loadStoreOptions() {
|
|||||||
}
|
}
|
||||||
if (storeOptions.value.length > 0) return
|
if (storeOptions.value.length > 0) return
|
||||||
try {
|
try {
|
||||||
const res: any = await loadStores({ type: 'order' })
|
const res: any = await loadStores()
|
||||||
const stores = Array.isArray(res?.stores) ? res.stores : []
|
const stores = Array.isArray(res?.stores) ? res.stores : []
|
||||||
storeOptions.value = stores.map((item: any) => ({
|
storeOptions.value = stores.map((item: any) => ({
|
||||||
label: item.label || item.name || String(item.value || item.id),
|
label: item.label || item.name || String(item.value || item.id),
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
:title="mode === 'create' ? '新增组合商品' : '编辑组合商品'"
|
:title="mode === 'create' ? '新增组合商品' : '编辑组合商品'"
|
||||||
@ -168,7 +168,7 @@ const storeOptions = ref<Array<{ label: string; value: number | string }>>([])
|
|||||||
|
|
||||||
async function loadStoreOptions() {
|
async function loadStoreOptions() {
|
||||||
try {
|
try {
|
||||||
const res: any = await indexApi.loadStores({ type: 'stock' })
|
const res: any = await indexApi.loadStores()
|
||||||
storeOptions.value = mapStoreListToSelectOptions(extractStoreListFromResponse(res))
|
storeOptions.value = mapStoreListToSelectOptions(extractStoreListFromResponse(res))
|
||||||
} catch {
|
} catch {
|
||||||
// 货主列表加载失败不影响主流程
|
// 货主列表加载失败不影响主流程
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
width="92%"
|
width="92%"
|
||||||
@ -304,7 +304,7 @@ watch(() => props.modelValue, (v) => { if (v) { clearData(); loadStores() } })
|
|||||||
|
|
||||||
async function loadStores() {
|
async function loadStores() {
|
||||||
try {
|
try {
|
||||||
const res: any = await indexApi.loadStores({ type: 'stock' })
|
const res: any = await indexApi.loadStores()
|
||||||
const list = res?.stores || res?.data?.stores || res?.data || []
|
const list = res?.stores || res?.data?.stores || res?.data || []
|
||||||
stores.value = (Array.isArray(list) ? list : []).map((s: any) => ({
|
stores.value = (Array.isArray(list) ? list : []).map((s: any) => ({
|
||||||
value: s.id || s.store_id || s.value,
|
value: s.id || s.store_id || s.value,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container">
|
<div class="order-sub-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -759,7 +759,7 @@ const openImportDialog = () => { importDialogVisible.value = true }
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// Load stores, prohibited types etc.
|
// Load stores, prohibited types etc.
|
||||||
try {
|
try {
|
||||||
const res = await indexApi.loadStores({ type: 'stock' })
|
const res = await indexApi.loadStores()
|
||||||
if (res && (res as any).stores) {
|
if (res && (res as any).stores) {
|
||||||
const storeField = findScanField('store_id')
|
const storeField = findScanField('store_id')
|
||||||
if (storeField) {
|
if (storeField) {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -864,7 +864,7 @@ async function handleDetailRefresh() {
|
|||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, presetRes]: any = await Promise.all([
|
const [storesRes, presetRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'entry' }),
|
indexApi.loadStores(),
|
||||||
indexApi.fastWhereTree('entry')
|
indexApi.fastWhereTree('entry')
|
||||||
])
|
])
|
||||||
if (storesRes && storesRes.code === 200) {
|
if (storesRes && storesRes.code === 200) {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -382,7 +382,7 @@ async function loadData() {
|
|||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, presetRes]: any = await Promise.all([
|
const [storesRes, presetRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'entry' }),
|
indexApi.loadStores(),
|
||||||
indexApi.fastWhereTree('entry')
|
indexApi.fastWhereTree('entry')
|
||||||
])
|
])
|
||||||
if (storesRes && storesRes.code === 200) {
|
if (storesRes && storesRes.code === 200) {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -185,7 +185,7 @@ onMounted(() => {
|
|||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, presetRes]: any = await Promise.all([
|
const [storesRes, presetRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'transaction' }),
|
indexApi.loadStores(),
|
||||||
indexApi.fastWhereTree('stock')
|
indexApi.fastWhereTree('stock')
|
||||||
])
|
])
|
||||||
if (storesRes && storesRes.code === 200) {
|
if (storesRes && storesRes.code === 200) {
|
||||||
|
|||||||
@ -1,152 +1,156 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
<div class="page-wrapper" :style="{ height: containerHeight }">
|
||||||
<scan-box
|
<div class="main-container">
|
||||||
ref="scanBox"
|
<div class="order-sub-container">
|
||||||
cache-key="storage-productflow"
|
<scan-box
|
||||||
width="250px"
|
ref="scanBox"
|
||||||
:tree-props="{ children: 'children', label: 'label' }"
|
cache-key="storage-productflow"
|
||||||
:auto-submit="false"
|
width="250px"
|
||||||
:preset-tree="presetTree"
|
:tree-props="{ children: 'children', label: 'label' }"
|
||||||
:available-fields="availableFieldsRef"
|
:auto-submit="false"
|
||||||
@condition-change="handleConditionChange"
|
:preset-tree="presetTree"
|
||||||
@reset="handleConditionReset"
|
:available-fields="availableFieldsRef"
|
||||||
@condition-clear="handleConditionClear"
|
@condition-change="handleConditionChange"
|
||||||
/>
|
@reset="handleConditionReset"
|
||||||
|
@condition-clear="handleConditionClear"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<div class="toolbar-left">
|
<div class="toolbar-left">
|
||||||
<order-toolbar-button-group
|
<order-toolbar-button-group
|
||||||
:buttons="toolbarButtons"
|
:buttons="toolbarButtons"
|
||||||
:resolve-disabled="resolveButtonDisabled"
|
:resolve-disabled="resolveButtonDisabled"
|
||||||
:resolve-loading="resolveButtonLoading"
|
:resolve-loading="resolveButtonLoading"
|
||||||
:resolve-label="resolveButtonLabel"
|
:resolve-label="resolveButtonLabel"
|
||||||
:layout-key="toolbarLayoutKey"
|
:layout-key="toolbarLayoutKey"
|
||||||
@action="handleToolbarButtonClick"
|
@action="handleToolbarButtonClick"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="split-stack" ref="splitStackRef">
|
|
||||||
<div class="upper-wrapper" :style="detailVisible ? upperPaneStyle : upperPaneFullStyle">
|
|
||||||
<upper-table
|
|
||||||
ref="upperTable"
|
|
||||||
title="商品流水列表"
|
|
||||||
default-align="center"
|
|
||||||
table-id="storage-productflow-list"
|
|
||||||
:enable-column-config="true"
|
|
||||||
:data="list"
|
|
||||||
:columns="columns"
|
|
||||||
:table-size="tableSize"
|
|
||||||
:pagination="pagination"
|
|
||||||
:show-index="true"
|
|
||||||
show-selection
|
|
||||||
:loading="loading"
|
|
||||||
:query-time="queryTime"
|
|
||||||
@current-change="handleRowClick"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@page-change="handlePageChange"
|
|
||||||
@page-size-change="handlePageSizeChange"
|
|
||||||
@sort-change="handleSortChange"
|
|
||||||
@refresh="loadList"
|
|
||||||
>
|
|
||||||
<template #column-created_at="{ row }">
|
|
||||||
{{ formatDateTime(row.created_at) }}
|
|
||||||
</template>
|
|
||||||
<template #column-transaction_type="{ row }">
|
|
||||||
<el-tag size="small" :type="getTransactionTypeTag(row.transaction_type)" effect="light">
|
|
||||||
{{ getTransactionTypeLabel(row.transaction_type) }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
<template #column-stock_quantity="{ row }">
|
|
||||||
<span :class="getQuantityClass(row, 'stock')">{{ formatStockQuantity(row) }}</span>
|
|
||||||
</template>
|
|
||||||
<template #column-lock_quantity="{ row }">
|
|
||||||
<span :class="getQuantityClass(row, 'lock')">{{ formatLockQuantity(row) }}</span>
|
|
||||||
</template>
|
|
||||||
<template #column-before_quantity="{ row }">
|
|
||||||
<span :class="getStockClass(row.transaction_type)">{{ row.before_quantity ?? '—' }}</span>
|
|
||||||
</template>
|
|
||||||
<template #column-after_quantity="{ row }">
|
|
||||||
<span :class="getStockClass(row.transaction_type)">{{ row.after_quantity ?? '—' }}</span>
|
|
||||||
</template>
|
|
||||||
<template #column-before_locked_quantity="{ row }">
|
|
||||||
<span :class="getLockClass(row.transaction_type)">{{ row.before_locked_quantity ?? '—' }}</span>
|
|
||||||
</template>
|
|
||||||
<template #column-after_locked_quantity="{ row }">
|
|
||||||
<span :class="getLockClass(row.transaction_type)">{{ row.after_locked_quantity ?? '—' }}</span>
|
|
||||||
</template>
|
|
||||||
<template #column-batch_no="{ row }">
|
|
||||||
{{ row.batch_no || '—' }}
|
|
||||||
</template>
|
|
||||||
<template #column-order_type="{ row }">
|
|
||||||
{{ getOrderTypeLabel(row.order_type) }}
|
|
||||||
</template>
|
|
||||||
<template #column-order_no="{ row }">
|
|
||||||
{{ row.order_no || '—' }}
|
|
||||||
</template>
|
|
||||||
<template #column-operator_name="{ row }">
|
|
||||||
{{ row.operator_name || '—' }}
|
|
||||||
</template>
|
|
||||||
<template #column-remark="{ row }">
|
|
||||||
<span class="remark-text">{{ row.remark || '—' }}</span>
|
|
||||||
</template>
|
|
||||||
<template #empty>
|
|
||||||
<div class="empty-tip">暂无商品流水</div>
|
|
||||||
</template>
|
|
||||||
</upper-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<template v-if="detailVisible">
|
|
||||||
<div
|
|
||||||
class="pane-resizer"
|
|
||||||
title="拖动调整列表与详情区域高度"
|
|
||||||
@mousedown="beginSplitDrag"
|
|
||||||
/>
|
|
||||||
<div v-if="selectedFlowId" class="lower-level" :class="tableSize" :style="lowerPaneStyle">
|
|
||||||
<div class="detail-header">
|
|
||||||
<div class="detail-info">
|
|
||||||
<span class="detail-title">流水详情 #{{ selectedFlowId }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-container">
|
</div>
|
||||||
<el-descriptions :column="2" border size="small">
|
|
||||||
<el-descriptions-item label="流水ID">{{ selectedRowData.id }}</el-descriptions-item>
|
<div class="split-stack" ref="splitStackRef">
|
||||||
<el-descriptions-item label="流水时间">{{ formatDateTime(selectedRowData.created_at) }}</el-descriptions-item>
|
<div class="upper-wrapper" :style="detailVisible ? upperPaneStyle : upperPaneFullStyle">
|
||||||
<el-descriptions-item label="流水类型">
|
<upper-table
|
||||||
<el-tag size="small" :type="getTransactionTypeTag(selectedRowData.transaction_type)" effect="light">
|
ref="upperTable"
|
||||||
{{ getTransactionTypeLabel(selectedRowData.transaction_type) }}
|
title="商品流水列表"
|
||||||
|
default-align="center"
|
||||||
|
table-id="storage-productflow-list"
|
||||||
|
:enable-column-config="true"
|
||||||
|
:data="list"
|
||||||
|
:columns="columns"
|
||||||
|
:table-size="tableSize"
|
||||||
|
:pagination="pagination"
|
||||||
|
:show-index="true"
|
||||||
|
show-selection
|
||||||
|
:loading="loading"
|
||||||
|
:query-time="queryTime"
|
||||||
|
@current-change="handleRowClick"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@page-change="handlePageChange"
|
||||||
|
@page-size-change="handlePageSizeChange"
|
||||||
|
@sort-change="handleSortChange"
|
||||||
|
@refresh="loadList"
|
||||||
|
>
|
||||||
|
<template #column-created_at="{ row }">
|
||||||
|
{{ formatDateTime(row.created_at) }}
|
||||||
|
</template>
|
||||||
|
<template #column-transaction_type="{ row }">
|
||||||
|
<el-tag size="small" :type="getTransactionTypeTag(row.transaction_type)" effect="light">
|
||||||
|
{{ getTransactionTypeLabel(row.transaction_type) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</el-descriptions-item>
|
</template>
|
||||||
<el-descriptions-item label="操作人">{{ selectedRowData.operator_name || '—' }}</el-descriptions-item>
|
<template #column-stock_quantity="{ row }">
|
||||||
<el-descriptions-item label="商品ID">{{ selectedRowData.stock_id ?? '—' }}</el-descriptions-item>
|
<span :class="getQuantityClass(row, 'stock')">{{ formatStockQuantity(row) }}</span>
|
||||||
<el-descriptions-item label="货主ID">{{ selectedRowData.store_id ?? '—' }}</el-descriptions-item>
|
</template>
|
||||||
<el-descriptions-item label="仓库ID">{{ selectedRowData.warehouse_id ?? '—' }}</el-descriptions-item>
|
<template #column-lock_quantity="{ row }">
|
||||||
<el-descriptions-item label="批次号">{{ selectedRowData.batch_no || '—' }}</el-descriptions-item>
|
<span :class="getQuantityClass(row, 'lock')">{{ formatLockQuantity(row) }}</span>
|
||||||
<el-descriptions-item label="变动数量">
|
</template>
|
||||||
<span :class="getQuantityClass(selectedRowData)">{{ formatQuantityDisplay(selectedRowData) }}</span>
|
<template #column-before_quantity="{ row }">
|
||||||
</el-descriptions-item>
|
<span :class="getStockClass(row.transaction_type)">{{ row.before_quantity ?? '—' }}</span>
|
||||||
<el-descriptions-item label="可用库存">
|
</template>
|
||||||
{{ selectedRowData.before_quantity ?? '—' }} → {{ selectedRowData.after_quantity ?? '—' }}
|
<template #column-after_quantity="{ row }">
|
||||||
</el-descriptions-item>
|
<span :class="getStockClass(row.transaction_type)">{{ row.after_quantity ?? '—' }}</span>
|
||||||
<el-descriptions-item label="锁定库存">
|
</template>
|
||||||
{{ selectedRowData.before_locked_quantity ?? '—' }} → {{ selectedRowData.after_locked_quantity ?? '—' }}
|
<template #column-before_locked_quantity="{ row }">
|
||||||
</el-descriptions-item>
|
<span :class="getLockClass(row.transaction_type)">{{ row.before_locked_quantity ?? '—' }}</span>
|
||||||
<el-descriptions-item label="订单类型">{{ getOrderTypeLabel(selectedRowData.order_type) }}</el-descriptions-item>
|
</template>
|
||||||
<el-descriptions-item label="订单号">{{ selectedRowData.order_no || '—' }}</el-descriptions-item>
|
<template #column-after_locked_quantity="{ row }">
|
||||||
<el-descriptions-item label="订单ID">{{ selectedRowData.order_id || '—' }}</el-descriptions-item>
|
<span :class="getLockClass(row.transaction_type)">{{ row.after_locked_quantity ?? '—' }}</span>
|
||||||
<el-descriptions-item label="收货单ID">{{ selectedRowData.receiving_id || '—' }}</el-descriptions-item>
|
</template>
|
||||||
<el-descriptions-item label="入库单ID">{{ selectedRowData.entry_order_id || '—' }}</el-descriptions-item>
|
<template #column-batch_no="{ row }">
|
||||||
<el-descriptions-item label="备注" :span="2">{{ selectedRowData.remark || '—' }}</el-descriptions-item>
|
{{ row.batch_no || '—' }}
|
||||||
</el-descriptions>
|
</template>
|
||||||
|
<template #column-order_type="{ row }">
|
||||||
|
{{ getOrderTypeLabel(row.order_type) }}
|
||||||
|
</template>
|
||||||
|
<template #column-order_no="{ row }">
|
||||||
|
{{ row.order_no || '—' }}
|
||||||
|
</template>
|
||||||
|
<template #column-operator_name="{ row }">
|
||||||
|
{{ row.operator_name || '—' }}
|
||||||
|
</template>
|
||||||
|
<template #column-remark="{ row }">
|
||||||
|
<span class="remark-text">{{ row.remark || '—' }}</span>
|
||||||
|
</template>
|
||||||
|
<template #empty>
|
||||||
|
<div class="empty-tip">暂无商品流水</div>
|
||||||
|
</template>
|
||||||
|
</upper-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<template v-if="detailVisible">
|
||||||
|
<div
|
||||||
|
class="pane-resizer"
|
||||||
|
title="拖动调整列表与详情区域高度"
|
||||||
|
@mousedown="beginSplitDrag"
|
||||||
|
/>
|
||||||
|
<div v-if="selectedFlowId" class="lower-level" :class="tableSize" :style="lowerPaneStyle">
|
||||||
|
<div class="detail-header">
|
||||||
|
<div class="detail-info">
|
||||||
|
<span class="detail-title">流水详情 #{{ selectedFlowId }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="detail-container">
|
||||||
|
<el-descriptions :column="2" border size="small">
|
||||||
|
<el-descriptions-item label="流水ID">{{ selectedRowData.id }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="流水时间">{{ formatDateTime(selectedRowData.created_at) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="流水类型">
|
||||||
|
<el-tag size="small" :type="getTransactionTypeTag(selectedRowData.transaction_type)" effect="light">
|
||||||
|
{{ getTransactionTypeLabel(selectedRowData.transaction_type) }}
|
||||||
|
</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="操作人">{{ selectedRowData.operator_name || '—' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="商品ID">{{ selectedRowData.stock_id ?? '—' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="货主ID">{{ selectedRowData.store_id ?? '—' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="仓库ID">{{ selectedRowData.warehouse_id ?? '—' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="批次号">{{ selectedRowData.batch_no || '—' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="变动数量">
|
||||||
|
<span :class="getQuantityClass(selectedRowData)">{{ formatQuantityDisplay(selectedRowData) }}</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="可用库存">
|
||||||
|
{{ selectedRowData.before_quantity ?? '—' }} → {{ selectedRowData.after_quantity ?? '—' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="锁定库存">
|
||||||
|
{{ selectedRowData.before_locked_quantity ?? '—' }} → {{ selectedRowData.after_locked_quantity ?? '—' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="订单类型">{{ getOrderTypeLabel(selectedRowData.order_type) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="订单号">{{ selectedRowData.order_no || '—' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="订单ID">{{ selectedRowData.order_id || '—' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="收货单ID">{{ selectedRowData.receiving_id || '—' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="入库单ID">{{ selectedRowData.entry_order_id || '—' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="备注" :span="2">{{ selectedRowData.remark || '—' }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else class="no-selection" :style="lowerPaneStyle">
|
||||||
|
<div class="empty-tip">
|
||||||
|
<p>请从上方列表中选择一项查看详情</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="no-selection" :style="lowerPaneStyle">
|
</div>
|
||||||
<div class="empty-tip">
|
|
||||||
<p>请从上方列表中选择一项查看详情</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -391,7 +395,7 @@ function getLockClass(type?: string): string {
|
|||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, presetRes]: any = await Promise.all([
|
const [storesRes, presetRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'transaction' }),
|
indexApi.loadStores(),
|
||||||
indexApi.fastWhereTree('stock')
|
indexApi.fastWhereTree('stock')
|
||||||
])
|
])
|
||||||
if (storesRes?.code === 200 || storesRes?.flag === 'success') {
|
if (storesRes?.code === 200 || storesRes?.flag === 'success') {
|
||||||
@ -543,34 +547,239 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style lang="scss" scoped>
|
||||||
@use "../../order/orderManagement/styles/order-sub.scss";
|
/* ================================================================
|
||||||
|
整体布局(对齐 express/waybill)
|
||||||
|
================================================================ */
|
||||||
|
.page-wrapper {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.order-sub-container .main-content .lower-level .detail-container {
|
/* ---- 主内容区(卡片容器) ---- */
|
||||||
padding: 10px;
|
.main-container {
|
||||||
overflow: auto;
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #e8eef7;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.el-descriptions__label) {
|
.order-sub-container {
|
||||||
width: 100px;
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #f0f2f5;
|
||||||
|
|
||||||
|
:deep(.scan-box-container) {
|
||||||
|
flex: 0 0 250px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs) {
|
||||||
|
flex-shrink: 0;
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
background: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__header) {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__nav-wrap::after) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__active-bar) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__item) {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0 12px;
|
||||||
|
color: #606266;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-bottom: none;
|
||||||
|
border-radius: 4px 4px 0 0;
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__item:hover) {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__item.is-active) {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
background-color: #fff;
|
||||||
|
border-color: #ebeef5;
|
||||||
|
border-bottom-color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-sub-container .main-content .lower-level .detail-header {
|
.main-content {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.detail-info {
|
/* ---- 工具栏 ---- */
|
||||||
|
.toolbar {
|
||||||
|
margin-bottom: 3px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
border: 1px solid #ebeef5;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.toolbar-left {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.detail-title {
|
.toolbar-right {
|
||||||
font-size: 14px;
|
flex: 0 0 auto;
|
||||||
font-weight: 500;
|
margin-left: 10px;
|
||||||
color: #303133;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- 分栏区域 ---- */
|
||||||
|
.split-stack {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.upper-table-container) {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.table-container) {
|
||||||
|
height: auto !important;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.el-table__body-wrapper) {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- 分隔条 ---- */
|
||||||
|
.pane-resizer {
|
||||||
|
flex: 0 0 6px;
|
||||||
|
min-height: 6px;
|
||||||
|
background: #e4e7ed;
|
||||||
|
cursor: row-resize;
|
||||||
|
flex-shrink: 0;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #dcdfe6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- 底部分栏详情面板 ---- */
|
||||||
|
.lower-level {
|
||||||
|
flex: 0 0 38%;
|
||||||
|
height: 38%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.detail-header {
|
||||||
|
background-color: #fafafa;
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
padding: 0 12px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
height: 42px;
|
||||||
|
min-height: 42px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.detail-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.detail-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-container {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 10px;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
:deep(.el-descriptions__label) {
|
||||||
|
width: 100px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---- 无选中项占位 ---- */
|
||||||
|
.no-selection {
|
||||||
|
flex: 0 0 38%;
|
||||||
|
height: 38%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #909399;
|
||||||
|
background-color: #fff;
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
.empty-tip {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- 业务样式(数量变化颜色) ---- */
|
||||||
.remark-text {
|
.remark-text {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
@ -612,11 +821,4 @@ onMounted(() => {
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--el-color-info);
|
color: var(--el-color-info);
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-tip {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 1.5;
|
|
||||||
max-width: 360px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
<div class="page-wrapper" :style="{ height: containerHeight }">
|
||||||
<scan-box
|
<div class="main-container">
|
||||||
ref="scanBox"
|
<div class="order-sub-container">
|
||||||
cache-key="store-productflow"
|
<scan-box
|
||||||
|
ref="scanBox"
|
||||||
|
cache-key="store-productflow"
|
||||||
width="250px"
|
width="250px"
|
||||||
:tree-props="{ children: 'children', label: 'label' }"
|
:tree-props="{ children: 'children', label: 'label' }"
|
||||||
:auto-submit="false"
|
:auto-submit="false"
|
||||||
@ -149,6 +151,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<AsyncExportProgressDialog
|
<AsyncExportProgressDialog
|
||||||
v-model:visible="exportDialogVisible"
|
v-model:visible="exportDialogVisible"
|
||||||
title="商品流水导出进度"
|
title="商品流水导出进度"
|
||||||
@ -560,34 +565,239 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style lang="scss" scoped>
|
||||||
@use "../../../order/orderManagement/styles/order-sub.scss";
|
/* ================================================================
|
||||||
|
整体布局(对齐 express/waybill)
|
||||||
|
================================================================ */
|
||||||
|
.page-wrapper {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.order-sub-container .main-content .lower-level .detail-container {
|
/* ---- 主内容区(卡片容器) ---- */
|
||||||
padding: 10px;
|
.main-container {
|
||||||
overflow: auto;
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #e8eef7;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.el-descriptions__label) {
|
.order-sub-container {
|
||||||
width: 100px;
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #f0f2f5;
|
||||||
|
|
||||||
|
:deep(.scan-box-container) {
|
||||||
|
flex: 0 0 250px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs) {
|
||||||
|
flex-shrink: 0;
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
background: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__header) {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__nav-wrap::after) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__active-bar) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__item) {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0 12px;
|
||||||
|
color: #606266;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-bottom: none;
|
||||||
|
border-radius: 4px 4px 0 0;
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__item:hover) {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scan-box-container .scan-tabs .el-tabs__item.is-active) {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
background-color: #fff;
|
||||||
|
border-color: #ebeef5;
|
||||||
|
border-bottom-color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-sub-container .main-content .lower-level .detail-header {
|
.main-content {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.detail-info {
|
/* ---- 工具栏 ---- */
|
||||||
|
.toolbar {
|
||||||
|
margin-bottom: 3px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
border: 1px solid #ebeef5;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.toolbar-left {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.detail-title {
|
.toolbar-right {
|
||||||
font-size: 14px;
|
flex: 0 0 auto;
|
||||||
font-weight: 500;
|
margin-left: 10px;
|
||||||
color: #303133;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- 分栏区域 ---- */
|
||||||
|
.split-stack {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.upper-table-container) {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.table-container) {
|
||||||
|
height: auto !important;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.el-table__body-wrapper) {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- 分隔条 ---- */
|
||||||
|
.pane-resizer {
|
||||||
|
flex: 0 0 6px;
|
||||||
|
min-height: 6px;
|
||||||
|
background: #e4e7ed;
|
||||||
|
cursor: row-resize;
|
||||||
|
flex-shrink: 0;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #dcdfe6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- 底部分栏详情面板 ---- */
|
||||||
|
.lower-level {
|
||||||
|
flex: 0 0 38%;
|
||||||
|
height: 38%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.detail-header {
|
||||||
|
background-color: #fafafa;
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
padding: 0 12px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
height: 42px;
|
||||||
|
min-height: 42px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.detail-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.detail-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-container {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 10px;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
:deep(.el-descriptions__label) {
|
||||||
|
width: 100px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---- 无选中项占位 ---- */
|
||||||
|
.no-selection {
|
||||||
|
flex: 0 0 38%;
|
||||||
|
height: 38%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #909399;
|
||||||
|
background-color: #fff;
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
.empty-tip {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- 业务样式(数量变化颜色) ---- */
|
||||||
.remark-text {
|
.remark-text {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
@ -629,11 +839,4 @@ onMounted(() => {
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--el-color-info);
|
color: var(--el-color-info);
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-tip {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 1.5;
|
|
||||||
max-width: 360px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="receiving-details-container">
|
<div class="receiving-details-container">
|
||||||
<el-form :model="form" label-width="92px" size="small" class="details-form">
|
<el-form :model="form" label-width="92px" size="small" class="details-form">
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
@ -260,7 +260,7 @@ const loadStoreList = async () => {
|
|||||||
|
|
||||||
storeListLoading.value = true
|
storeListLoading.value = true
|
||||||
try {
|
try {
|
||||||
const res: any = await indexApi.loadStores({ type: 'receiving' })
|
const res: any = await indexApi.loadStores()
|
||||||
if (res && res.code === 200 && res.stores) {
|
if (res && res.code === 200 && res.stores) {
|
||||||
// 更新本地availableFields中store_id的options
|
// 更新本地availableFields中store_id的options
|
||||||
const storeIdField = localAvailableFields.find((f: any) => f.value === 'store_id')
|
const storeIdField = localAvailableFields.find((f: any) => f.value === 'store_id')
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -576,7 +576,7 @@ async function loadData() {
|
|||||||
|
|
||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, presetRes]: any = await Promise.all([indexApi.loadStores({ type: 'receiving' }), indexApi.fastWhereTree('receiving')])
|
const [storesRes, presetRes]: any = await Promise.all([indexApi.loadStores(), indexApi.fastWhereTree('receiving')])
|
||||||
if (storesRes && storesRes.code === 200) {
|
if (storesRes && storesRes.code === 200) {
|
||||||
const stores = storesRes.stores || []
|
const stores = storesRes.stores || []
|
||||||
const f = availableFieldsRef.find((i: any) => i.value === 'store_id')
|
const f = availableFieldsRef.find((i: any) => i.value === 'store_id')
|
||||||
@ -1243,7 +1243,7 @@ async function ensureMatchEntryStores() {
|
|||||||
}
|
}
|
||||||
if (matchEntryStoreOptions.value.length) return
|
if (matchEntryStoreOptions.value.length) return
|
||||||
try {
|
try {
|
||||||
const res: any = await indexApi.loadStores({ type: 'receiving' })
|
const res: any = await indexApi.loadStores()
|
||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
const raw = res.stores ?? res.data?.stores ?? []
|
const raw = res.stores ?? res.data?.stores ?? []
|
||||||
matchEntryStoreOptions.value = normalizeStoreOptionsForSelect(raw)
|
matchEntryStoreOptions.value = normalizeStoreOptionsForSelect(raw)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -330,7 +330,7 @@ function handleExportAction(action: string) {
|
|||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, presetRes]: any = await Promise.all([
|
const [storesRes, presetRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'stock' }),
|
indexApi.loadStores(),
|
||||||
indexApi.fastWhereTree('stock')
|
indexApi.fastWhereTree('stock')
|
||||||
])
|
])
|
||||||
if (storesRes && storesRes.code === 200) {
|
if (storesRes && storesRes.code === 200) {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -274,7 +274,7 @@ async function loadFilterData() {
|
|||||||
try {
|
try {
|
||||||
// 与 receiving 页面一致,按业务类型加载 store 列表和 presetTree,避免 ScanBox options 不匹配
|
// 与 receiving 页面一致,按业务类型加载 store 列表和 presetTree,避免 ScanBox options 不匹配
|
||||||
const [storesRes, presetRes]: any = await Promise.all([
|
const [storesRes, presetRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'stockout' }),
|
indexApi.loadStores(),
|
||||||
indexApi.fastWhereTree('stockout')
|
indexApi.fastWhereTree('stockout')
|
||||||
])
|
])
|
||||||
if (storesRes && storesRes.code === 200) {
|
if (storesRes && storesRes.code === 200) {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="validity-period-container">
|
<div class="validity-period-container">
|
||||||
<scan-box
|
<scan-box
|
||||||
ref="scanBox"
|
ref="scanBox"
|
||||||
@ -319,7 +319,7 @@ async function loadData() {
|
|||||||
async function loadFilterData() {
|
async function loadFilterData() {
|
||||||
try {
|
try {
|
||||||
const [storesRes, presetRes]: any = await Promise.all([
|
const [storesRes, presetRes]: any = await Promise.all([
|
||||||
indexApi.loadStores({ type: 'entry' }),
|
indexApi.loadStores(),
|
||||||
indexApi.fastWhereTree('entry')
|
indexApi.fastWhereTree('entry')
|
||||||
])
|
])
|
||||||
if (storesRes?.code === 200) {
|
if (storesRes?.code === 200) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user