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-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"
|
||||
|
||||
# 1. 本地打包
|
||||
@ -17,11 +20,11 @@ npm run build
|
||||
|
||||
# 2. 压缩并上传
|
||||
tar -czf dist.tar.gz -C $LOCAL_DIST .
|
||||
ssh $USER@$IP "mkdir -p $BASE_PATH/releases/$RELEASE_NAME"
|
||||
scp dist.tar.gz $USER@$IP:$BASE_PATH/releases/$RELEASE_NAME
|
||||
ssh $SSH_OPTS $USER@$IP "mkdir -p $BASE_PATH/releases/$RELEASE_NAME"
|
||||
scp $SSH_OPTS dist.tar.gz $USER@$IP:$BASE_PATH/releases/$RELEASE_NAME
|
||||
|
||||
# 3. 远程解压、更新软链接、清理旧版本
|
||||
ssh $USER@$IP << EOF
|
||||
ssh $SSH_OPTS $USER@$IP << EOF
|
||||
cd $BASE_PATH/releases/$RELEASE_NAME
|
||||
tar -xzf 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
|
||||
} as any)
|
||||
}
|
||||
export function loadStores(type:any) {
|
||||
export function loadStores() {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
@ -22,7 +22,7 @@ export function loadStores(type:any) {
|
||||
v: '1.0',
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data: {type},
|
||||
data: {},
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
@ -14,6 +14,10 @@ export type WaybillWarehouseListWhere = {
|
||||
orderId?: number
|
||||
/** 订单号(模糊搜索,匹配 delivery_order_code 快照列) */
|
||||
orderNo?: string
|
||||
/** 运单类型:"main"/"1"=主单号,"child"/"2"=子单号 */
|
||||
waybillType?: string
|
||||
/** 货主ID(等值匹配) */
|
||||
storeId?: number
|
||||
/** 物流公司编码(等值匹配),如 SF/YT/STO/ZTO 等 */
|
||||
logisticsCode?: string
|
||||
/** 物流接口ID(等值匹配) */
|
||||
|
||||
@ -55,6 +55,8 @@ export interface FieldDefinition {
|
||||
type: 'text' | 'select' | 'daterange' | 'number'
|
||||
group?: string
|
||||
options?: { label: string; value: any }[]
|
||||
multiple?: boolean
|
||||
filterable?: boolean
|
||||
} | null
|
||||
table: {
|
||||
minWidth?: number
|
||||
@ -86,7 +88,8 @@ export const VALUE_MAPS: Record<string, Record<string, string>> = {
|
||||
'未分配': '未分配', '已分配': '已分配'
|
||||
},
|
||||
waybillType: {
|
||||
'主单号': '主单号', '子单号': '子单号'
|
||||
'1': '主单号', '2': '子单号',
|
||||
'main': '主单号', 'child': '子单号'
|
||||
},
|
||||
yesNo: {
|
||||
'Y': '是', 'N': '否',
|
||||
@ -212,11 +215,18 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
||||
order_id: {
|
||||
key: 'order_id',
|
||||
label: '订单ID',
|
||||
scanBox: null,
|
||||
scanBox: { type: 'text', group: SCANBOX_GROUPS.basic },
|
||||
table: { minWidth: 90, align: 'center' },
|
||||
slot: null,
|
||||
detailLabel: '订单ID'
|
||||
},
|
||||
keyword: {
|
||||
key: 'keyword',
|
||||
label: '关键词',
|
||||
scanBox: { type: 'text', group: SCANBOX_GROUPS.basic },
|
||||
table: null,
|
||||
slot: null
|
||||
},
|
||||
business_key: {
|
||||
key: 'business_key',
|
||||
label: '业务键',
|
||||
@ -236,7 +246,7 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
||||
store_name: {
|
||||
key: 'store_name',
|
||||
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 },
|
||||
slot: null,
|
||||
detailLabel: '货主名称'
|
||||
@ -301,7 +311,7 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
||||
logistics_interface_id: {
|
||||
key: 'logistics_interface_id',
|
||||
label: '物流接口ID',
|
||||
scanBox: null,
|
||||
scanBox: { type: 'text', group: SCANBOX_GROUPS.logistics },
|
||||
table: { minWidth: 110, align: 'center' },
|
||||
slot: null,
|
||||
detailLabel: '物流接口ID'
|
||||
@ -326,7 +336,7 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
||||
package_material_id: {
|
||||
key: 'package_material_id',
|
||||
label: '包材ID',
|
||||
scanBox: null,
|
||||
scanBox: { type: 'text', group: SCANBOX_GROUPS.basic },
|
||||
table: { minWidth: 90, align: 'center' },
|
||||
slot: null,
|
||||
detailLabel: '包材ID'
|
||||
@ -406,6 +416,13 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
||||
slot: null,
|
||||
detailLabel: '称重重量'
|
||||
},
|
||||
hasWeighingWeight: {
|
||||
key: 'hasWeighingWeight',
|
||||
label: '是否已称重',
|
||||
scanBox: { type: 'select', group: SCANBOX_GROUPS.status, options: getOptions('bool') },
|
||||
table: null,
|
||||
slot: null
|
||||
},
|
||||
print_count: {
|
||||
key: 'print_count',
|
||||
label: '打印次数',
|
||||
@ -439,13 +456,13 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
|
||||
slot: null
|
||||
},
|
||||
// —— 操作列 ——
|
||||
operation: {
|
||||
key: 'operation',
|
||||
label: '操作',
|
||||
scanBox: null,
|
||||
table: { minWidth: 120, fixed: 'right', align: 'center' },
|
||||
slot: { type: 'operation' }
|
||||
}
|
||||
// operation: {
|
||||
// key: 'operation',
|
||||
// label: '操作',
|
||||
// scanBox: null,
|
||||
// table: { minWidth: 120, fixed: 'right', align: 'center' },
|
||||
// slot: { type: 'operation' }
|
||||
// }
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
@ -582,6 +599,8 @@ export function resolveTabConfig(raw: TabPageRawConfig): TabPageConfig {
|
||||
type: def.scanBox.type,
|
||||
options: def.scanBox.options ? [...def.scanBox.options] : undefined,
|
||||
group: def.scanBox.group,
|
||||
multiple: def.scanBox.multiple,
|
||||
filterable: def.scanBox.filterable,
|
||||
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> {
|
||||
const where: Record<string, any> = {}
|
||||
|
||||
for (const [key, cond] of Object.entries(rawConditions || {})) {
|
||||
let value: any = undefined
|
||||
if (cond && typeof cond === 'object' && 'operator' in cond) {
|
||||
value = (cond as any).value
|
||||
} else if (cond !== undefined && cond !== null && cond !== '') {
|
||||
value = Array.isArray(cond) ? cond[0] ?? '' : cond
|
||||
// 从 ScanBox 结构化条件 { value, operator, field, type, isMultiple } 中提取值
|
||||
let value: any
|
||||
if (cond && typeof cond === 'object' && !Array.isArray(cond) && 'operator' in cond) {
|
||||
if (['isnull', 'isnotnull'].includes(cond.operator)) continue
|
||||
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
|
||||
}
|
||||
|
||||
// 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]
|
||||
if (def?.filterParamMap) {
|
||||
if (def?.filterParamMap && !Array.isArray(value)) {
|
||||
const mapped = def.filterParamMap[String(value)]
|
||||
if (mapped !== undefined) {
|
||||
where[key] = mapped
|
||||
where[apiKey] = mapped
|
||||
continue
|
||||
}
|
||||
}
|
||||
where[key] = value
|
||||
|
||||
// 扁平传值(string / number / boolean / array)
|
||||
where[apiKey] = value
|
||||
}
|
||||
|
||||
return where
|
||||
}
|
||||
|
||||
@ -760,12 +846,17 @@ export const tabPages: TabPageRawConfig[] = [
|
||||
scanBoxFieldKeys: [
|
||||
'waybill_code',
|
||||
'main_waybill_code',
|
||||
'keyword',
|
||||
'waybill_type',
|
||||
'order_no',
|
||||
'order_id',
|
||||
'store_name',
|
||||
'logistics_code',
|
||||
'logistics_interface_id',
|
||||
'platform_code',
|
||||
'status',
|
||||
'pack_status',
|
||||
'package_material_id',
|
||||
'hasWeighingWeight',
|
||||
'is_back',
|
||||
'is_intercept',
|
||||
'is_galaxy_receive',
|
||||
@ -871,11 +962,6 @@ export const tabPages: TabPageRawConfig[] = [
|
||||
},
|
||||
buildListParams({ pagination, conditions, sort }) {
|
||||
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> = {
|
||||
pagination: { page: pagination.page, pageSize: pagination.pageSize },
|
||||
where
|
||||
|
||||
@ -334,13 +334,13 @@ function injectScanBoxOptions(fieldValue: string, options: { label: string; valu
|
||||
async function loadScanBoxOptions() {
|
||||
try {
|
||||
const [expressRes, platformRes, storesRes] = await Promise.all([
|
||||
getExpressList({}),
|
||||
getPlatformList({}),
|
||||
loadStores({ type: 'order' })
|
||||
getExpressList({ systemOnly: true }),
|
||||
getPlatformList({ systemOnly: true }),
|
||||
loadStores()
|
||||
])
|
||||
const expressRaw: any[] = expressRes?.data?.list ?? expressRes?.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) => ({
|
||||
label: `${item.code ?? item.logistics_code ?? ''} — ${item.name ?? item.logistics_name ?? ''}`,
|
||||
@ -353,9 +353,9 @@ async function loadScanBoxOptions() {
|
||||
})).filter((opt: any) => opt.value)
|
||||
|
||||
const storeOptions = storesRaw.map((item: any) => ({
|
||||
label: item.name ?? item.store_name ?? '',
|
||||
value: String(item.name ?? item.store_name ?? '')
|
||||
})).filter((opt: any) => opt.value)
|
||||
label: item.label ?? item.name ?? item.store_name ?? '',
|
||||
value: item.value ?? item.id ?? item.store_id
|
||||
})).filter((opt: any) => opt.value != null && opt.value !== '')
|
||||
|
||||
injectScanBoxOptions('logistics_code', expressOptions)
|
||||
injectScanBoxOptions('platform_code', platformOptions)
|
||||
@ -505,11 +505,6 @@ const {
|
||||
function buildExportAllPayload() {
|
||||
const conditions = scanBoxRef.value?.getConditions?.() || {}
|
||||
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 {
|
||||
where,
|
||||
sort: currentSort.prop
|
||||
@ -708,7 +703,7 @@ const handleRowClick = async (row: Record<string, any>) => {
|
||||
try {
|
||||
const detailRes = await waybillWarehouseDetail({
|
||||
id: row.id,
|
||||
waybill_code: row.waybill_code
|
||||
waybillCode: row.waybill_code
|
||||
})
|
||||
if (detailRes && (detailRes.code === 1 || detailRes.code === 200)) {
|
||||
const raw = detailRes.data ?? detailRes
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -302,7 +302,7 @@ const {
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const [storesRes, expressRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'order' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.getExpressList({})
|
||||
])
|
||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
width="92%"
|
||||
@ -1122,7 +1122,7 @@ function getOrderGroupKey(row: ImportPreviewRow) {
|
||||
|
||||
async function loadStoreOptions() {
|
||||
try {
|
||||
const storesRes: any = await indexApi.loadStores({ type: 'order' })
|
||||
const storesRes: any = await indexApi.loadStores()
|
||||
storeOptions.value = mapStoreListToSelectOptions(extractStoreListFromResponse(storesRes))
|
||||
} catch {
|
||||
storeOptions.value = []
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -297,7 +297,7 @@ const {
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const [storesRes, expressRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'order' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.getExpressList({})
|
||||
])
|
||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -366,7 +366,7 @@ async function loadOrderMetaOptions() {
|
||||
const [expressRes, platformRes, storesRes] = await Promise.all([
|
||||
indexApi.getExpressList({}),
|
||||
indexApi.getPlatformList({}),
|
||||
indexApi.loadStores({ type: 'order' })
|
||||
indexApi.loadStores()
|
||||
])
|
||||
const expressData: any = expressRes?.data
|
||||
const platformData: any = platformRes?.data
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -297,7 +297,7 @@ const {
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const [storesRes, expressRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'order' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.getExpressList({})
|
||||
])
|
||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -702,7 +702,7 @@ const {
|
||||
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const storesRes: any = await indexApi.loadStores({ type: 'order' })
|
||||
const storesRes: any = await indexApi.loadStores()
|
||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||
} catch {
|
||||
fillStoreScanFieldOptions(availableFieldsRef, [])
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -426,7 +426,7 @@ async function loadOrderMetaOptions() {
|
||||
const [expressRes, platformRes, storesRes] = await Promise.all([
|
||||
indexApi.getExpressList({}),
|
||||
indexApi.getPlatformList({}),
|
||||
indexApi.loadStores({ type: 'order' })
|
||||
indexApi.loadStores()
|
||||
])
|
||||
const expressData: any = expressRes?.data
|
||||
const platformData: any = platformRes?.data
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -988,7 +988,7 @@ async function loadOrderMetaOptions() {
|
||||
|
||||
async function loadStoreOptions() {
|
||||
try {
|
||||
const storesRes: any = await indexApi.loadStores({ type: 'order' })
|
||||
const storesRes: any = await indexApi.loadStores()
|
||||
fillStoreScanFieldOptions(availableFieldsRef, extractStoreListFromResponse(storesRes))
|
||||
} catch {
|
||||
fillStoreScanFieldOptions(availableFieldsRef, [])
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -286,7 +286,7 @@ async function loadOrderMetaOptions() {
|
||||
const [platformRes, expressRes, storesRes] = await Promise.all([
|
||||
indexApi.getPlatformList({}),
|
||||
indexApi.getExpressList({}),
|
||||
indexApi.loadStores({ type: 'order' })
|
||||
indexApi.loadStores()
|
||||
])
|
||||
const platformData: any = platformRes?.data
|
||||
const platformRaw = platformData?.list || platformData || []
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<!-- <scan-box
|
||||
ref="scanBox"
|
||||
@ -436,7 +436,7 @@ async function loadFallbackOrderFilterOptions() {
|
||||
|
||||
try {
|
||||
const [storesRes, expressRes, platformRes] = await Promise.all([
|
||||
indexApi.loadStores({ type: 'order' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.getExpressList({}),
|
||||
indexApi.getPlatformList({})
|
||||
])
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -2988,7 +2988,7 @@ async function loadFallbackOrderFilterOptions() {
|
||||
|
||||
try {
|
||||
const [storesRes, expressRes, platformRes] = await Promise.all([
|
||||
indexApi.loadStores({ type: 'order' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.getExpressList({}),
|
||||
indexApi.getPlatformList({})
|
||||
])
|
||||
@ -3061,7 +3061,7 @@ async function loadFallbackOrderFilterOptions() {
|
||||
async function loadGroupOrderStoreOptions() {
|
||||
if (groupOrderStoreOptions.value.length > 0) return
|
||||
try {
|
||||
const res: any = await indexApi.loadStores({ type: 'order' })
|
||||
const res: any = await indexApi.loadStores()
|
||||
const stores = Array.isArray(res?.stores) ? res.stores : []
|
||||
groupOrderStoreOptions.value = stores.map((item: any) => ({
|
||||
label: item.label || item.name || String(item.value || item.id),
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -2355,7 +2355,7 @@ function openGroupOrderDialog() {
|
||||
async function loadGroupOrderStoreOptions() {
|
||||
if (groupOrderStoreOptions.value.length > 0) return
|
||||
try {
|
||||
const res: any = await indexApi.loadStores({ type: 'order' })
|
||||
const res: any = await indexApi.loadStores()
|
||||
const stores = Array.isArray(res?.stores) ? res.stores : []
|
||||
groupOrderStoreOptions.value = stores.map((item: any) => ({
|
||||
label: item.label || item.name || String(item.value || item.id),
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -726,7 +726,7 @@ async function loadStrategyFilterOptions() {
|
||||
|
||||
try {
|
||||
const [storesRes, expressRes, platformRes] = await Promise.all([
|
||||
indexApi.loadStores({ type: 'order' }),
|
||||
indexApi.loadStores(),
|
||||
/** 编辑策略:允许快递编码仅使用系统基础快递(index.getExpressList systemOnly) */
|
||||
indexApi.getExpressList({ systemOnly: true }),
|
||||
/** 编辑策略:允许平台仅使用系统基础平台(index.getPlatformList systemOnly) */
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="pending-order-panel">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -603,7 +603,7 @@ function normalizeStoreOptions(rawStores: any[]) {
|
||||
|
||||
async function loadStoreOptions() {
|
||||
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 storeField = availableFieldsRef.find((item: any) => item.value === 'store_id')
|
||||
if (storeField) {
|
||||
|
||||
@ -282,7 +282,7 @@ const props = defineProps<{
|
||||
modelValue: boolean
|
||||
errorMessage: string
|
||||
payload: WavePlatformPrintDataPayload | null
|
||||
requestMeta: { warehouse_id: number; wave_ids: Array<number | string> } | null
|
||||
requestMeta: Record<string, any> | null
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<!--
|
||||
FetchGroupOrderForm — 抓取团购单表单
|
||||
|
||||
对应 waveOrder 中 GroupWaveBatchListPanel 的团购单抓取对话框。
|
||||
@ -269,7 +269,7 @@ async function loadStoreOptions() {
|
||||
}
|
||||
if (storeOptions.value.length > 0) return
|
||||
try {
|
||||
const res: any = await loadStores({ type: 'order' })
|
||||
const res: any = await loadStores()
|
||||
const stores = Array.isArray(res?.stores) ? res.stores : []
|
||||
storeOptions.value = stores.map((item: any) => ({
|
||||
label: item.label || item.name || String(item.value || item.id),
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:title="mode === 'create' ? '新增组合商品' : '编辑组合商品'"
|
||||
@ -168,7 +168,7 @@ const storeOptions = ref<Array<{ label: string; value: number | string }>>([])
|
||||
|
||||
async function loadStoreOptions() {
|
||||
try {
|
||||
const res: any = await indexApi.loadStores({ type: 'stock' })
|
||||
const res: any = await indexApi.loadStores()
|
||||
storeOptions.value = mapStoreListToSelectOptions(extractStoreListFromResponse(res))
|
||||
} catch {
|
||||
// 货主列表加载失败不影响主流程
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
width="92%"
|
||||
@ -304,7 +304,7 @@ watch(() => props.modelValue, (v) => { if (v) { clearData(); loadStores() } })
|
||||
|
||||
async function loadStores() {
|
||||
try {
|
||||
const res: any = await indexApi.loadStores({ type: 'stock' })
|
||||
const res: any = await indexApi.loadStores()
|
||||
const list = res?.stores || res?.data?.stores || res?.data || []
|
||||
stores.value = (Array.isArray(list) ? list : []).map((s: any) => ({
|
||||
value: s.id || s.store_id || s.value,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -759,7 +759,7 @@ const openImportDialog = () => { importDialogVisible.value = true }
|
||||
onMounted(async () => {
|
||||
// Load stores, prohibited types etc.
|
||||
try {
|
||||
const res = await indexApi.loadStores({ type: 'stock' })
|
||||
const res = await indexApi.loadStores()
|
||||
if (res && (res as any).stores) {
|
||||
const storeField = findScanField('store_id')
|
||||
if (storeField) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -864,7 +864,7 @@ async function handleDetailRefresh() {
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const [storesRes, presetRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'entry' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.fastWhereTree('entry')
|
||||
])
|
||||
if (storesRes && storesRes.code === 200) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -382,7 +382,7 @@ async function loadData() {
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const [storesRes, presetRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'entry' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.fastWhereTree('entry')
|
||||
])
|
||||
if (storesRes && storesRes.code === 200) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -185,7 +185,7 @@ onMounted(() => {
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const [storesRes, presetRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'transaction' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.fastWhereTree('stock')
|
||||
])
|
||||
if (storesRes && storesRes.code === 200) {
|
||||
|
||||
@ -1,152 +1,156 @@
|
||||
<template>
|
||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="storage-productflow"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
:available-fields="availableFieldsRef"
|
||||
@condition-change="handleConditionChange"
|
||||
@reset="handleConditionReset"
|
||||
@condition-clear="handleConditionClear"
|
||||
/>
|
||||
<template>
|
||||
<div class="page-wrapper" :style="{ height: containerHeight }">
|
||||
<div class="main-container">
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="storage-productflow"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
:available-fields="availableFieldsRef"
|
||||
@condition-change="handleConditionChange"
|
||||
@reset="handleConditionReset"
|
||||
@condition-clear="handleConditionClear"
|
||||
/>
|
||||
|
||||
<div class="main-content">
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-left">
|
||||
<order-toolbar-button-group
|
||||
:buttons="toolbarButtons"
|
||||
:resolve-disabled="resolveButtonDisabled"
|
||||
:resolve-loading="resolveButtonLoading"
|
||||
:resolve-label="resolveButtonLabel"
|
||||
:layout-key="toolbarLayoutKey"
|
||||
@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 class="main-content">
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-left">
|
||||
<order-toolbar-button-group
|
||||
:buttons="toolbarButtons"
|
||||
:resolve-disabled="resolveButtonDisabled"
|
||||
:resolve-loading="resolveButtonLoading"
|
||||
:resolve-label="resolveButtonLabel"
|
||||
:layout-key="toolbarLayoutKey"
|
||||
@action="handleToolbarButtonClick"
|
||||
/>
|
||||
</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) }}
|
||||
</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>
|
||||
</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>
|
||||
</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 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 v-else class="no-selection" :style="lowerPaneStyle">
|
||||
<div class="empty-tip">
|
||||
<p>请从上方列表中选择一项查看详情</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -391,7 +395,7 @@ function getLockClass(type?: string): string {
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const [storesRes, presetRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'transaction' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.fastWhereTree('stock')
|
||||
])
|
||||
if (storesRes?.code === 200 || storesRes?.flag === 'success') {
|
||||
@ -543,34 +547,239 @@ onMounted(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "../../order/orderManagement/styles/order-sub.scss";
|
||||
<style lang="scss" scoped>
|
||||
/* ================================================================
|
||||
整体布局(对齐 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;
|
||||
overflow: auto;
|
||||
/* ---- 主内容区(卡片容器) ---- */
|
||||
.main-container {
|
||||
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) {
|
||||
width: 100px;
|
||||
.order-sub-container {
|
||||
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;
|
||||
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;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.detail-title {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
.toolbar-right {
|
||||
flex: 0 0 auto;
|
||||
margin-left: 10px;
|
||||
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 {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
@ -612,11 +821,4 @@ onMounted(() => {
|
||||
font-weight: 700;
|
||||
color: var(--el-color-info);
|
||||
}
|
||||
|
||||
.empty-tip {
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
max-width: 360px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
<template>
|
||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="store-productflow"
|
||||
<div class="page-wrapper" :style="{ height: containerHeight }">
|
||||
<div class="main-container">
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="store-productflow"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
@ -149,6 +151,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AsyncExportProgressDialog
|
||||
v-model:visible="exportDialogVisible"
|
||||
title="商品流水导出进度"
|
||||
@ -560,34 +565,239 @@ onMounted(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "../../../order/orderManagement/styles/order-sub.scss";
|
||||
<style lang="scss" scoped>
|
||||
/* ================================================================
|
||||
整体布局(对齐 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;
|
||||
overflow: auto;
|
||||
/* ---- 主内容区(卡片容器) ---- */
|
||||
.main-container {
|
||||
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) {
|
||||
width: 100px;
|
||||
.order-sub-container {
|
||||
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;
|
||||
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;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.detail-title {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
.toolbar-right {
|
||||
flex: 0 0 auto;
|
||||
margin-left: 10px;
|
||||
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 {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
@ -629,11 +839,4 @@ onMounted(() => {
|
||||
font-weight: 700;
|
||||
color: var(--el-color-info);
|
||||
}
|
||||
|
||||
.empty-tip {
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
max-width: 360px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="receiving-details-container">
|
||||
<el-form :model="form" label-width="92px" size="small" class="details-form">
|
||||
<el-row :gutter="16">
|
||||
@ -260,7 +260,7 @@ const loadStoreList = async () => {
|
||||
|
||||
storeListLoading.value = true
|
||||
try {
|
||||
const res: any = await indexApi.loadStores({ type: 'receiving' })
|
||||
const res: any = await indexApi.loadStores()
|
||||
if (res && res.code === 200 && res.stores) {
|
||||
// 更新本地availableFields中store_id的options
|
||||
const storeIdField = localAvailableFields.find((f: any) => f.value === 'store_id')
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -576,7 +576,7 @@ async function loadData() {
|
||||
|
||||
async function loadFilterData() {
|
||||
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) {
|
||||
const stores = storesRes.stores || []
|
||||
const f = availableFieldsRef.find((i: any) => i.value === 'store_id')
|
||||
@ -1243,7 +1243,7 @@ async function ensureMatchEntryStores() {
|
||||
}
|
||||
if (matchEntryStoreOptions.value.length) return
|
||||
try {
|
||||
const res: any = await indexApi.loadStores({ type: 'receiving' })
|
||||
const res: any = await indexApi.loadStores()
|
||||
if (res && res.code === 200) {
|
||||
const raw = res.stores ?? res.data?.stores ?? []
|
||||
matchEntryStoreOptions.value = normalizeStoreOptionsForSelect(raw)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -330,7 +330,7 @@ function handleExportAction(action: string) {
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const [storesRes, presetRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'stock' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.fastWhereTree('stock')
|
||||
])
|
||||
if (storesRes && storesRes.code === 200) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="order-sub-container" :style="{ height: containerHeight }">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -274,7 +274,7 @@ async function loadFilterData() {
|
||||
try {
|
||||
// 与 receiving 页面一致,按业务类型加载 store 列表和 presetTree,避免 ScanBox options 不匹配
|
||||
const [storesRes, presetRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'stockout' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.fastWhereTree('stockout')
|
||||
])
|
||||
if (storesRes && storesRes.code === 200) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="validity-period-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
@ -319,7 +319,7 @@ async function loadData() {
|
||||
async function loadFilterData() {
|
||||
try {
|
||||
const [storesRes, presetRes]: any = await Promise.all([
|
||||
indexApi.loadStores({ type: 'entry' }),
|
||||
indexApi.loadStores(),
|
||||
indexApi.fastWhereTree('entry')
|
||||
])
|
||||
if (storesRes?.code === 200) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user