1
This commit is contained in:
parent
cf674d9fd0
commit
b92f40734a
@ -17,15 +17,30 @@ export type SettingWarehouseAutoOutboundRule = {
|
||||
require_weigh?: boolean
|
||||
/** 是否要求已同步(sync_status=fin),默认 true */
|
||||
require_sync?: boolean
|
||||
/** 是否不出库当天复核的订单(默认 true):按订单复核时间所在日计算,需等到该日的「放行时间」才自动出库 */
|
||||
/**
|
||||
* 是否不出库当天复核订单(flag),默认 true;开启后按订单复核时间所在日计算:复核时间在「允许当天出库最后时间」之后的订单,
|
||||
* 需等到该复核日的「放行时间」才自动出库;复核时间早于该最后时间、或为空的订单不受影响
|
||||
*/
|
||||
exclude_same_day_outbound?: boolean
|
||||
/** 允许当天出库最后时间,格式 HH:mm,默认 06:00(当天内 00:00~23:59),不能大于放行时间 */
|
||||
/**
|
||||
* 允许当天出库最后时间(HH:mm,默认 06:00,**当天内 00:00~23:59**,不支持 24:00);
|
||||
* 复核时间早于该时间的订单不受「不出库当天订单」影响,**不能大于放行时间**;
|
||||
* 想表达「当天复核的订单全天不出库」时设为 00:00(配合放行时间 23:59 = 过了零点后全部出库)
|
||||
*/
|
||||
same_day_outbound_deadline_time?: string
|
||||
/** 放行时间,格式 HH:mm,默认 22:00;支持跨天 00:00~47:59(24:00 之后表示次日,如 27:00 = 次日 03:00) */
|
||||
/**
|
||||
* 放行时间(HH:mm,默认 22:00,**支持跨天 00:00~47:59**:24:00 之后的数字表示次日,如 27:00 = 次日 03:00);
|
||||
* 到达该时刻后,该复核日被限制的订单放行。常用:23:59 = 当天不放、过了零点出库;27:00 = 到次日 03:00 才出库
|
||||
*/
|
||||
same_day_outbound_release_time?: string
|
||||
}
|
||||
|
||||
/** 自动出库规则(subject_config.auto_outbound_rules):数组,空数组表示不自动出库任何订单 */
|
||||
/**
|
||||
* 自动出库规则(subject_config.auto_outbound_rules):**数组**,空数组表示不自动出库任何订单。
|
||||
* 每项规则独立判断,订单满足任意一条规则即自动出库;规则内条件为「与」关系。
|
||||
* 固定前置条件(不可配置):已复核 recheck_status=fin + 已分配储位 storage_status=fin。
|
||||
* ⚠️ 旧版本的对象结构(含 enabled/require_recheck/require_print/require_pick)已废弃不再兼容,**保存为非数组时后端返回 400**
|
||||
*/
|
||||
export type SettingWarehouseAutoOutboundRules = SettingWarehouseAutoOutboundRule[]
|
||||
|
||||
/** 规则中的布尔(flag)子项 */
|
||||
@ -54,22 +69,22 @@ export const DEFAULT_AUTO_OUTBOUND_RULE: Required<SettingWarehouseAutoOutboundRu
|
||||
|
||||
/** 收货未入库提醒配置(subject_config.receiving_pending_inbound_notice) */
|
||||
export type SettingWarehouseReceivingPendingInboundNotice = {
|
||||
/** 是否通知收货未入库(flag:0=关闭,1=开启;默认关闭)。开启后定时任务才会在提醒时间执行 */
|
||||
/** 是否通知收货未入库(flag:0=关闭,1=开启;默认 0 关闭,非 0/1 等非法值报 400)。开启后定时任务才会在提醒时间执行 */
|
||||
enabled?: boolean
|
||||
/** 提醒时间,格式 HH:mm,默认 08:30,范围 00:00-23:59(含 10 分钟宽限,每天提醒一次) */
|
||||
/** 提醒时间,格式 HH:mm,默认 08:30,范围 00:00-23:59(含 10 分钟宽限,每天提醒一次);⚠️ 非法值报 400 */
|
||||
notice_time?: string
|
||||
/** 超时下限(小时):创建时间距今超过该值才提醒,默认 24,须为大于 0 的整数 */
|
||||
/** 超时下限(小时):创建时间距今超过该值才提醒,默认 24,须为大于 0 的整数;⚠️ 非法值报 400 */
|
||||
min_hours?: number
|
||||
/** 超时上限(小时):距今小于该值才提醒(超过则不再提醒),默认 48,须为大于 min_hours 的整数 */
|
||||
/** 超时上限(小时):距今小于该值才提醒(超过则不再提醒),默认 48,须为大于 min_hours 的整数;⚠️ 非法值报 400 */
|
||||
max_hours?: number
|
||||
/**
|
||||
* 通知短语(消息第一行,仓库/客服群)。支持变量:{warehouse} 仓库名 / {warehouse_id} 仓库ID /
|
||||
* {store} 货主名(未绑定为「未绑定货主」)/ {store_id} 货主ID / {count} 本批单数 /
|
||||
* {min_hours} 超时下限 / {max_hours} 超时上限 / {date} 提醒日期(YYYY-MM-DD)/ {numbers} 本批收货单号;
|
||||
* 未识别的占位符原样保留;短语后换行逐行列出明细(最多 20 行),留空使用默认短语
|
||||
* 未识别的占位符原样保留;短语后换行逐行列出明细(一行一条,最多 20 行),留空使用默认短语;最长 500 字符,超长报 400
|
||||
*/
|
||||
notice_template?: string
|
||||
/** 通知短语(消息第一行,货主群)。变量同 notice_template,留空使用默认短语;最长 500 字符 */
|
||||
/** 通知短语(消息第一行,货主群)。变量同 notice_template,留空使用默认短语;最长 500 字符,超长报 400 */
|
||||
store_notice_template?: string
|
||||
}
|
||||
|
||||
@ -150,12 +165,14 @@ export type SettingWarehouseSubjectConfig = SettingWarehouseSenderConfig & {
|
||||
group_order_pack_max_minutes?: number
|
||||
/**
|
||||
* 大团购波次(wave_scope=1)打包中,扫描其他波次订单至少需等待「当前波次打包数 × 系数」秒,
|
||||
* 单位:秒/单,默认 3,**必须大于 0**(用于 workbench 大团购波次打包时长闸门与倒计时)
|
||||
* 单位:秒/单,默认 3,**必须大于 0**(用于 workbench 大团购波次打包时长闸门与倒计时);
|
||||
* 非法值报 400:`subject_config.big_group_pack_coefficient 必须是大于 0 的数字`
|
||||
*/
|
||||
big_group_pack_coefficient?: number
|
||||
/**
|
||||
* 散单称重是否需要打包(flag,默认 false 关闭):开启后散单称重(订单波次范围 wave_scope 非 1 大团购/3 小团购)
|
||||
* 前必须已打包完成(pack_status=fin),未打包时拒绝称重并返回错误
|
||||
* 前必须已打包完成(pack_status=fin),未打包时拒绝称重并返回错误。
|
||||
* 仅接受布尔/like-flag(true/1/'1'/'true' → true;false/0/'0'/'false' → false),非法值报 400
|
||||
*/
|
||||
single_weigh_require_pack?: boolean
|
||||
/** 拆包最大录制时长,单位:分钟,默认 5,min 1;超过上限时拆包提交的结束时间自动截断为开始时间+上限 */
|
||||
@ -168,11 +185,11 @@ export type SettingWarehouseSubjectConfig = SettingWarehouseSenderConfig & {
|
||||
group_wave_prefix?: string
|
||||
/** 自动分配快递排除备注:订单备注命中任一关键字时,跳过自动分配快递 */
|
||||
auto_allocate_express_exclude_remarks?: string[]
|
||||
/** 默认库位(库位ID,未配置时为 null) */
|
||||
/** 默认库位(库位ID,未配置时为 null;传入需属于当前仓库且未删除、已启用,否则报 400,传 null 清空) */
|
||||
default_location_id?: number | null
|
||||
/** 启用截单(flag:0=关闭,1=开启;默认 1)。启用后订单创建时间早于开始自动分配时间或超过截单时间(开始时间晚于截单时间时截单时间视为次日),不再自动分配快递和储位、不再自动加团 */
|
||||
cutoff_order_enabled?: number
|
||||
/** 开始自动分配时间,格式 HH:mm,默认 08:00,范围 00:00-23:59;早于该时间的订单与超过截单时间行为一致(不自动分配快递和储位、不自动加团) */
|
||||
/** 开始自动分配时间,格式 HH:mm,默认 08:00,范围 00:00-23:59;早于该时间的订单与超过截单时间行为一致(不自动分配快递和储位、不自动加团);⚠️ 与截单时间相同(自动分配窗口为空)时报 400 */
|
||||
allocate_start_time?: string
|
||||
/** 截单时间,格式 HH:mm,默认 18:00,范围 00:00-23:59;作为最后允许自动分配的时间,开始时间晚于截单时间时截单时间视为次日(跨天窗口) */
|
||||
cutoff_order_time?: string
|
||||
@ -240,9 +257,10 @@ function schemaChildren(field: WarehouseSubjectFieldSchema): WarehouseSubjectFie
|
||||
}
|
||||
|
||||
function schemaFlagValue(value: unknown, fallback: unknown): boolean {
|
||||
if (value === true || value === 1 || value === '1') return true
|
||||
if (value === false || value === 0 || value === '0') return false
|
||||
return fallback === true || fallback === 1 || fallback === '1'
|
||||
// 文档口径(like-flag):true/1/'1'/'true' → true;false/0/'0'/'false' → false
|
||||
if (value === true || value === 1 || value === '1' || value === 'true') return true
|
||||
if (value === false || value === 0 || value === '0' || value === 'false') return false
|
||||
return fallback === true || fallback === 1 || fallback === '1' || fallback === 'true'
|
||||
}
|
||||
|
||||
const SCHEMA_FLAG_TYPES = new Set(['flag', 'boolean', 'bool', 'switch'])
|
||||
@ -421,10 +439,13 @@ export function normalizeWarehouseSubjectConfig(
|
||||
? bigGroupPackCoefficient
|
||||
: 3
|
||||
|
||||
// 散单称重是否需要打包(flag,默认 false 关闭;兼容 boolean / 数字 / 字符串输入)
|
||||
// 散单称重是否需要打包(flag,默认 false 关闭;文档口径 like-flag:true/1/'1'/'true' → 开启)
|
||||
const weighRequirePack = base.single_weigh_require_pack
|
||||
base.single_weigh_require_pack =
|
||||
weighRequirePack === true || weighRequirePack === 1 || weighRequirePack === '1'
|
||||
weighRequirePack === true ||
|
||||
weighRequirePack === 1 ||
|
||||
weighRequirePack === '1' ||
|
||||
weighRequirePack === 'true'
|
||||
|
||||
// 默认库位(库位ID,未配置时为 null)
|
||||
const locIdRaw = base.default_location_id
|
||||
|
||||
@ -114,7 +114,8 @@
|
||||
<div class="card-header">
|
||||
<h3>新增语言信息</h3>
|
||||
</div>
|
||||
<el-form :model="newLangForm" label-width="120px">
|
||||
<!-- label-width 要容得下最长的「初始语言JSON数据内容」(≈153px @14px),120px 会让 label 文字溢出盒子并压向左侧 -->
|
||||
<el-form :model="newLangForm" label-width="170px">
|
||||
<el-form-item label="自定义语言名称" required>
|
||||
<el-input v-model="newLangForm.name" placeholder="例如:日本語" />
|
||||
</el-form-item>
|
||||
|
||||
@ -293,7 +293,7 @@
|
||||
:close-on-click-modal="false"
|
||||
align-center
|
||||
>
|
||||
<el-form :model="setEndTimeForm" label-width="100px">
|
||||
<el-form :model="setEndTimeForm" label-width="100px" size="small">
|
||||
<el-form-item label="任务ID">
|
||||
<span>{{ operatingRow?.id ?? '—' }}</span>
|
||||
</el-form-item>
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
align-center
|
||||
@close="resetForm"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px" size="small">
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="包材编码" prop="material_code">
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
align-center
|
||||
@close="resetForm"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px" size="small">
|
||||
<el-form-item label="供应商编码" prop="supplier_code">
|
||||
<el-input
|
||||
v-model="formData.supplier_code"
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<el-select
|
||||
v-model="selectedComponent"
|
||||
placeholder="选择打印平台"
|
||||
size="default"
|
||||
size="small"
|
||||
style="width: 260px"
|
||||
clearable
|
||||
>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="upper-table-container">
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="120px" :disabled="loading">
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="120px" size="small" :disabled="loading">
|
||||
<!-- 货主 -->
|
||||
<el-form-item label="货主" prop="store_id" title="商品归属货主">
|
||||
<el-input v-if="storeDisabled" :model-value="storeDisplayName" disabled style="width: 100%;" />
|
||||
|
||||
@ -1130,17 +1130,22 @@ watch(
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.el-overlay-dialog:has(> .el-dialog.entry-bind-dialog) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/*
|
||||
* 弹窗自带居中(position: fixed + translate)。
|
||||
* 原来靠 `.el-overlay-dialog:has(> .el-dialog.entry-bind-dialog){display:flex;align-items:center;justify-content:center}` 居中,
|
||||
* 但下面同时给弹窗写了 `margin: 0`(覆盖了 EP 的 `.el-dialog.is-align-center{margin:auto}`),
|
||||
* 于是不支持 :has() 的内核(Chrome<105 / Safari<15.4 / Firefox<121 / 老版国产浏览器)里弹窗会贴到左上角。
|
||||
* 改成弹窗自己定位后任何浏览器都居中,:has() 规则已删除。
|
||||
*/
|
||||
.el-overlay-dialog > .el-dialog.entry-bind-dialog {
|
||||
width: 1200px !important;
|
||||
height: 596px;
|
||||
max-height: 596px;
|
||||
margin: 0;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
输入框已回显库内当前日期:不改动=保持原值(不下发);改选日期=下发新日期;点「清空」清空输入框=下发 null 置空。两个日期至少改一项,且生产日期不得晚于到期日期。
|
||||
</p>
|
||||
|
||||
<el-form label-width="80px" class="expiry-form">
|
||||
<el-form label-width="80px" size="small" class="expiry-form">
|
||||
<el-form-item label="生产日期">
|
||||
<div class="expiry-field">
|
||||
<el-date-picker
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="basic-info">
|
||||
<el-form :model="formData" label-width="120px" disabled>
|
||||
<el-form :model="formData" label-width="120px" size="small" disabled>
|
||||
<div class="form-grid">
|
||||
<template v-for="col in productdetail" :key="col.prop">
|
||||
<el-form-item :label="col.label">
|
||||
|
||||
@ -176,7 +176,7 @@
|
||||
style="margin-bottom: 16px;"
|
||||
/> -->
|
||||
|
||||
<el-form :model="toOrderForm" label-width="110px">
|
||||
<el-form :model="toOrderForm" label-width="110px" size="small">
|
||||
<el-form-item label="新订单号">
|
||||
<el-input v-model="toOrderForm.delivery_order_code" placeholder="不填自动生成(SK 前缀)" clearable />
|
||||
</el-form-item>
|
||||
@ -263,7 +263,7 @@
|
||||
style="margin-bottom: 16px;"
|
||||
/> -->
|
||||
|
||||
<el-form :model="updateInfoForm" label-width="100px">
|
||||
<el-form :model="updateInfoForm" label-width="100px" size="small">
|
||||
<el-divider content-position="left">收件人信息</el-divider>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
@ -408,7 +408,7 @@
|
||||
:title="`更新出库单「${updateExpressTargetRow?.stockout_order_code || updateExpressTargetRow?.id || ''}」的运单号。`"
|
||||
style="margin-bottom: 16px;"
|
||||
/> -->
|
||||
<el-form :model="updateExpressForm" label-width="100px">
|
||||
<el-form :model="updateExpressForm" label-width="100px" size="small">
|
||||
<el-form-item label="快递公司">
|
||||
<el-select
|
||||
v-model="updateExpressForm.express_code"
|
||||
|
||||
@ -475,7 +475,7 @@ async function handleConfirmSign(row: any) {
|
||||
await ElMessageBox.confirm(
|
||||
`确认与「${row.store_name || row.remask || row.counterparty_name}」的签约关系?`,
|
||||
'确认签约',
|
||||
{ type: 'warning' }
|
||||
{ type: 'warning', buttonSize: 'small' }
|
||||
)
|
||||
} catch { return }
|
||||
try {
|
||||
@ -495,6 +495,7 @@ async function handleRename(row: any) {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputValue: row.remask || row.counterparty_name,
|
||||
buttonSize: 'small'
|
||||
})
|
||||
const res = await storeWarehouseRename({ id: row.id, remask: value }) as any
|
||||
if (res?.flag === 'success' || res?.code === 200) {
|
||||
@ -512,7 +513,7 @@ async function handleUnbind(row: any, targetStatus: number) {
|
||||
await ElMessageBox.confirm(
|
||||
`确认要${actionLabel}与「${row.store_name || row.remask || row.counterparty_name}」的签约关系吗?`,
|
||||
`${actionLabel}签约`,
|
||||
{ type: targetStatus === 0 ? 'warning' : 'info', confirmButtonText: actionLabel, cancelButtonText: '取消' }
|
||||
{ type: targetStatus === 0 ? 'warning' : 'info', confirmButtonText: actionLabel, cancelButtonText: '取消', buttonSize: 'small' }
|
||||
)
|
||||
} catch { return }
|
||||
try {
|
||||
|
||||
@ -817,6 +817,7 @@
|
||||
:model="adjustBalanceForm"
|
||||
label-width="120px"
|
||||
label-position="right"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item
|
||||
v-for="item in adjustBalanceFormItems"
|
||||
@ -863,11 +864,12 @@
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="adjustBalanceDialog.visible = false">取消</el-button>
|
||||
<el-button size="small" @click="adjustBalanceDialog.visible = false">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="adjustBalanceDialog.loading"
|
||||
:disabled="adjustBalanceDialog.fetchLoading"
|
||||
size="small"
|
||||
@click="submitAdjustBalance"
|
||||
>
|
||||
确认设置
|
||||
@ -1666,7 +1668,7 @@ async function handleConfirmSign(row: any) {
|
||||
await ElMessageBox.confirm(
|
||||
`确认与「${row.store_name || row.remask || row.counterparty_name}」的签约关系?`,
|
||||
'确认签约',
|
||||
{ type: 'warning' }
|
||||
{ type: 'warning', buttonSize: 'small' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
@ -1694,7 +1696,7 @@ async function handleUnbind(row: any, targetStatus: number) {
|
||||
await ElMessageBox.confirm(
|
||||
`确认要${actionLabel}与「${row.store_name || row.remask || row.counterparty_name}」的签约关系吗?`,
|
||||
`${actionLabel}签约`,
|
||||
{ type: targetStatus === 0 ? 'warning' : 'info', confirmButtonText: actionLabel, cancelButtonText: '取消' }
|
||||
{ type: targetStatus === 0 ? 'warning' : 'info', confirmButtonText: actionLabel, cancelButtonText: '取消', buttonSize: 'small' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
@ -1722,6 +1724,7 @@ async function handleRename(row: any) {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputValue: row.remask || row.counterparty_name,
|
||||
buttonSize: 'small'
|
||||
})
|
||||
const res = await storeWarehouseRename({
|
||||
id: row.id,
|
||||
@ -2307,7 +2310,7 @@ async function submitCreateUser() {
|
||||
ElMessageBox.alert(
|
||||
copyText,
|
||||
'创建成功',
|
||||
{ confirmButtonText: '复制并关闭', type: 'success' }
|
||||
{ confirmButtonText: '复制并关闭', type: 'success', buttonSize: 'small' }
|
||||
).then(() => {
|
||||
navigator.clipboard?.writeText(copyText).catch(() => {})
|
||||
}).catch(() => {})
|
||||
@ -2629,7 +2632,7 @@ async function handleDeleteQimenConfig(config: any) {
|
||||
await ElMessageBox.confirm(
|
||||
`确认要删除奇门配置「${config.app_name}」吗?删除后签约关系将无奇门配置。`,
|
||||
'删除奇门配置',
|
||||
{ type: 'warning', confirmButtonText: '确认删除', cancelButtonText: '取消' }
|
||||
{ type: 'warning', confirmButtonText: '确认删除', cancelButtonText: '取消', buttonSize: 'small' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
|
||||
@ -284,7 +284,7 @@ const FALLBACK_FIELDS: NormalizedField[] = [
|
||||
],
|
||||
description: '启用后订单创建时间早于开始自动分配时间或超过截单时间(开始时间晚于截单时间时截单时间视为次日),不再自动分配快递和储位、不再自动加团;默认开启'
|
||||
},
|
||||
{ key: 'allocate_start_time', label: '开始自动分配时间', type: 'string', maxLength: 5, default: '08:00', description: '格式 HH:mm,默认 08:00,范围 00:00-23:59;早于该时间的订单与超过截单时间行为一致,不自动分配快递和储位、不自动加团' },
|
||||
{ key: 'allocate_start_time', label: '开始自动分配时间', type: 'string', maxLength: 5, default: '08:00', description: '格式 HH:mm,默认 08:00,范围 00:00-23:59;早于该时间的订单与超过截单时间行为一致,不自动分配快递和储位、不自动加团;与截单时间相同(自动分配窗口为空)时报 400' },
|
||||
{ key: 'cutoff_order_time', label: '截单时间', type: 'string', maxLength: 5, default: '18:00', description: '格式 HH:mm,默认 18:00,范围 00:00-23:59;作为最后允许自动分配的时间,开始时间晚于截单时间时截单时间视为次日(跨天窗口)' },
|
||||
{ key: 'day_start_time', label: '自然日开始时间', type: 'string', maxLength: 5, default: '06:00', description: '格式 HH:mm,默认 06:00,范围 00:00-23:59;业务日分界点,今日统计窗口为 [该时间点, 次日该时间点),当前时间早于今日该时间点时窗口从昨日该时间点开始' },
|
||||
{ key: 'sender_name', label: '默认发件人姓名', type: 'string', maxLength: 50 },
|
||||
@ -307,14 +307,14 @@ const FALLBACK_FIELDS: NormalizedField[] = [
|
||||
label: '自动出库规则',
|
||||
type: 'array',
|
||||
default: [],
|
||||
description: '多条规则之间为「或」关系,任一命中即自动出库;规则内条件为「与」关系。空数组表示不自动出库。固定前置条件:已复核 + 已分配储位。',
|
||||
description: '多条规则之间为「或」关系,任一命中即自动出库;规则内条件为「与」关系。空数组表示不自动出库。固定前置条件:已复核 + 已分配储位。⚠️ 旧版对象结构(enabled/require_recheck/require_print/require_pick)已废弃,非数组会被后端拒绝。',
|
||||
itemFields: [
|
||||
{ key: 'require_pack', label: '要求已打包', type: 'boolean', defaultValue: true, description: 'pack_status=fin,默认开启' },
|
||||
{ key: 'require_weigh', label: '要求已称重', type: 'boolean', defaultValue: true, description: 'weighing_weight>0,默认开启' },
|
||||
{ key: 'require_sync', label: '要求已同步', type: 'boolean', defaultValue: true, description: 'sync_status=fin,默认开启' },
|
||||
{ key: 'exclude_same_day_outbound', label: '不出库当天订单', type: 'boolean', defaultValue: true, description: '开启后,按订单复核时间所在日计算:复核时间在「允许当天出库最后时间」之后的订单,需等到该日的「放行时间」才自动出库;默认开启' },
|
||||
{ key: 'same_day_outbound_deadline_time', label: '允许当天出库最后时间', type: 'string', maxLength: 5, defaultValue: '06:00', description: '格式 HH:mm,默认 06:00,范围 00:00-23:59;不能大于放行时间。当天不出库请设为 00:00' },
|
||||
{ key: 'same_day_outbound_release_time', label: '放行时间', type: 'string', maxLength: 5, defaultValue: '22:00', description: '格式 HH:mm,默认 22:00,支持跨天 00:00-47:59(24:00 之后表示次日,如 27:00 = 次日 03:00)。常用:23:59 = 当天不放、过零点出库' }
|
||||
{ key: 'same_day_outbound_deadline_time', label: '允许当天出库最后时间', type: 'string', maxLength: 5, defaultValue: '06:00', description: '格式 HH:mm,默认 06:00,范围 00:00-23:59(不支持 24:00);不能大于放行时间。想表达「当天复核的订单全天不出库」时设为 00:00' },
|
||||
{ key: 'same_day_outbound_release_time', label: '放行时间', type: 'string', maxLength: 5, defaultValue: '22:00', description: '格式 HH:mm,默认 22:00,支持跨天 00:00-47:59(24:00 之后的数字表示次日,如 27:00 = 次日 03:00)。常用:23:59 = 当天不放、过了零点出库;27:00 = 到次日 03:00 才出库' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -330,7 +330,7 @@ const FALLBACK_FIELDS: NormalizedField[] = [
|
||||
label: '散单称重需要打包',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: '默认关闭;开启后散单称重(订单波次范围 wave_scope 非 1 大团购/3 小团购)前必须已打包完成(pack_status=fin),未打包时拒绝称重并返回错误'
|
||||
description: '默认关闭;开启后散单称重(订单波次范围 wave_scope 非 1 大团购/3 小团购)前必须已打包完成(pack_status=fin),未打包时拒绝称重并返回错误(like-flag:true/1/\'1\'/\'true\' 为开启)'
|
||||
},
|
||||
{
|
||||
key: 'big_group_pack_coefficient',
|
||||
@ -339,7 +339,7 @@ const FALLBACK_FIELDS: NormalizedField[] = [
|
||||
min: 0.1,
|
||||
step: 0.1,
|
||||
default: 3,
|
||||
description: '大团购波次(wave_scope=1)打包中,扫描其他波次订单至少需等待「当前波次打包数 × 系数」秒;默认 3,必须大于 0,允许小数'
|
||||
description: '大团购波次(wave_scope=1)打包中,扫描其他波次订单至少需等待「当前波次打包数 × 系数」秒;默认 3,必须大于 0,允许小数(非法值后端报 400)'
|
||||
},
|
||||
{
|
||||
key: 'default_location_id',
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
align-center
|
||||
@close="resetForm"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px" size="small">
|
||||
<el-form-item label="业务编码" prop="code">
|
||||
<el-input
|
||||
v-model="formData.code"
|
||||
@ -106,8 +106,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -392,7 +392,7 @@ async function handleDelete(row: ExpressRecord) {
|
||||
await ElMessageBox.confirm(
|
||||
`确定软删除快递映射「${row.name || row.code}」吗?`,
|
||||
'删除确认',
|
||||
{ type: 'warning', confirmButtonText: '删除', cancelButtonText: '取消' }
|
||||
{ type: 'warning', confirmButtonText: '删除', cancelButtonText: '取消', buttonSize: 'small' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
@ -425,7 +425,7 @@ async function handleBatchDelete() {
|
||||
await ElMessageBox.confirm(
|
||||
`确定批量软删除选中的 ${ids.length} 条快递映射吗?`,
|
||||
'删除确认',
|
||||
{ type: 'warning', confirmButtonText: '删除', cancelButtonText: '取消' }
|
||||
{ type: 'warning', confirmButtonText: '删除', cancelButtonText: '取消', buttonSize: 'small' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
align-center
|
||||
@close="resetForm"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px" size="small">
|
||||
<el-form-item label="业务编码" prop="code">
|
||||
<el-input v-model="formData.code" placeholder="如 DY" />
|
||||
</el-form-item>
|
||||
@ -91,8 +91,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -374,7 +374,7 @@ async function submitForm() {
|
||||
|
||||
function handleDelete(row: PlatformRecord) {
|
||||
if (!row.id) return
|
||||
ElMessageBox.confirm(`确认删除平台编码「${row.code}」吗?`, '提示', { type: 'warning' })
|
||||
ElMessageBox.confirm(`确认删除平台编码「${row.code}」吗?`, '提示', { type: 'warning', buttonSize: 'small' })
|
||||
.then(async () => {
|
||||
const res: any = await settingPlatformDelete({ id: row.id as number })
|
||||
if (!isSuccess(res)) {
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
:class="{ 'config-dialog--edit': dialogMode === 'edit' }"
|
||||
@close="resetForm"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="128px" class="dialog-form">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="128px" class="dialog-form" size="small">
|
||||
|
||||
|
||||
<div class="form-section">
|
||||
@ -202,6 +202,7 @@
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
size="small"
|
||||
:loading="authLoading"
|
||||
:disabled="!formData.platform_code"
|
||||
@click="handleAuthorizeFromSelection"
|
||||
@ -516,8 +517,8 @@
|
||||
</div> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -2075,7 +2076,7 @@ function handleDelete(row: ExpressInterfaceRecord) {
|
||||
return
|
||||
}
|
||||
if (!row?.id) return
|
||||
ElMessageBox.confirm(`确认删除配置「${row.name || row.id}」吗?`, '提示', { type: 'warning' })
|
||||
ElMessageBox.confirm(`确认删除配置「${row.name || row.id}」吗?`, '提示', { type: 'warning', buttonSize: 'small' })
|
||||
.then(async () => {
|
||||
const res: any = await expressInterfaceDelete({ id: row.id })
|
||||
if (!isSuccess(res)) {
|
||||
@ -2160,6 +2161,10 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
:deep(.config-dialog--edit.el-dialog) {
|
||||
/* 先写 vh/vw 兜底:不支持 dvh/dvw 的内核(Chrome<108 / Safari<15.4 / Firefox<101 / 老版国产浏览器)会丢掉下一组声明 */
|
||||
height: calc(100vh - 32px);
|
||||
max-height: calc(100vh - 32px);
|
||||
max-width: calc(100vw - 32px);
|
||||
height: calc(100dvh - 32px);
|
||||
max-height: calc(100dvh - 32px);
|
||||
max-width: calc(100dvw - 32px);
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
align-center
|
||||
@close="resetForm"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px" size="small">
|
||||
<el-form-item label="拣货车编码" prop="cart_code">
|
||||
<el-input
|
||||
v-model="formData.cart_code"
|
||||
@ -138,14 +138,14 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 扫码查询 -->
|
||||
<el-dialog v-model="scanDialogVisible" title="扫码查询拣货车" width="520px" align-center @close="resetScan">
|
||||
<el-form label-width="110px" @submit.prevent="submitScan">
|
||||
<el-form label-width="110px" size="small" @submit.prevent="submitScan">
|
||||
<el-form-item label="拣货车编码">
|
||||
<el-input
|
||||
v-model="scanForm.cart_code"
|
||||
@ -171,8 +171,8 @@
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="scanDialogVisible = false">关闭</el-button>
|
||||
<el-button type="primary" :loading="scanLoading" @click="submitScan">查询</el-button>
|
||||
<el-button size="small" @click="scanDialogVisible = false">关闭</el-button>
|
||||
<el-button size="small" type="primary" :loading="scanLoading" @click="submitScan">查询</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
@ -184,7 +184,7 @@
|
||||
align-center
|
||||
@close="resetBatchForm"
|
||||
>
|
||||
<el-form ref="batchFormRef" :model="batchForm" :rules="batchRules" label-width="110px">
|
||||
<el-form ref="batchFormRef" :model="batchForm" :rules="batchRules" label-width="110px" size="small">
|
||||
<div class="batch-section-title">拣货车编码</div>
|
||||
<el-form-item label="编码前缀" prop="code.prefix">
|
||||
<el-input v-model="batchForm.code.prefix" placeholder="如 CART-" maxlength="32" show-word-limit />
|
||||
@ -255,8 +255,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="batchDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="batchSaving" :disabled="batchPreviewCount <= 0" @click="submitBatchCreate">
|
||||
<el-button size="small" @click="batchDialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="batchSaving" :disabled="batchPreviewCount <= 0" @click="submitBatchCreate">
|
||||
确认新增
|
||||
</el-button>
|
||||
</template>
|
||||
@ -270,7 +270,7 @@
|
||||
align-center
|
||||
@close="resetBindForm"
|
||||
>
|
||||
<el-form ref="bindFormRef" :model="bindForm" :rules="bindRules" label-width="110px">
|
||||
<el-form ref="bindFormRef" :model="bindForm" :rules="bindRules" label-width="110px" size="small">
|
||||
<el-form-item label="拣货车">
|
||||
<el-input :model-value="bindForm.cartLabel" disabled />
|
||||
</el-form-item>
|
||||
@ -284,8 +284,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="bindDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="bindLoading" @click="submitBind">确认绑定</el-button>
|
||||
<el-button size="small" @click="bindDialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="bindLoading" @click="submitBind">确认绑定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -656,7 +656,7 @@ async function submitBatchCreate() {
|
||||
await ElMessageBox.confirm(
|
||||
`确认批量新增 ${items.length} 辆拣货车吗?`,
|
||||
'批量新增确认',
|
||||
{ type: 'warning' }
|
||||
{ type: 'warning', buttonSize: 'small' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
@ -791,7 +791,7 @@ function handleDelete(row: PickCartRecord) {
|
||||
ElMessageBox.confirm(
|
||||
`确认删除拣货车「${label}」吗?若已绑定任务则无法删除。`,
|
||||
'提示',
|
||||
{ type: 'warning' }
|
||||
{ type: 'warning', buttonSize: 'small' }
|
||||
)
|
||||
.then(async () => {
|
||||
const res: any = await pickCartDelete({ cart_id: row.cart_id as number })
|
||||
@ -820,7 +820,7 @@ function handleBatchDelete() {
|
||||
ElMessageBox.confirm(
|
||||
`确认批量删除 ${ids.length} 辆拣货车吗?已绑定任务的拣货车将被跳过。`,
|
||||
'批量删除确认',
|
||||
{ type: 'warning' }
|
||||
{ type: 'warning', buttonSize: 'small' }
|
||||
)
|
||||
.then(async () => {
|
||||
const res: any = await pickCartBatchDelete({ ids } as PickCartBatchDeleteParams)
|
||||
|
||||
@ -104,7 +104,7 @@
|
||||
align-center
|
||||
@close="resetForm"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="110px" size="small">
|
||||
<el-form-item label="平台" prop="platform_code">
|
||||
<el-select
|
||||
v-model="formData.platform_code"
|
||||
@ -145,8 +145,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
@ -157,7 +157,7 @@
|
||||
align-center
|
||||
@close="resetAuthForm"
|
||||
>
|
||||
<el-form ref="authFormRef" :model="authForm" :rules="authRules" label-width="110px">
|
||||
<el-form ref="authFormRef" :model="authForm" :rules="authRules" label-width="110px" size="small">
|
||||
<el-form-item label="店铺">
|
||||
<el-input :model-value="authForm.shopLabel" disabled />
|
||||
</el-form-item>
|
||||
@ -165,7 +165,7 @@
|
||||
<el-input :model-value="authForm.platform_name || authForm.platformCode || '--'" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="授权">
|
||||
<el-button type="primary" plain :loading="authLinkLoading" @click="handleOpenAuthorizeLink">
|
||||
<el-button size="small" type="primary" plain :loading="authLinkLoading" @click="handleOpenAuthorizeLink">
|
||||
去授权
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@ -190,8 +190,8 @@
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="authDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="authConfirmLoading" @click="submitConfirmAuthorize">
|
||||
<el-button size="small" @click="authDialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="authConfirmLoading" @click="submitConfirmAuthorize">
|
||||
确认授权
|
||||
</el-button>
|
||||
</template>
|
||||
@ -649,7 +649,7 @@ async function submitForm() {
|
||||
function handleDelete(row: ShopRecord) {
|
||||
if (!row.id) return
|
||||
const name = row.custom_name || row.shop_name || String(row.id)
|
||||
ElMessageBox.confirm(`确认删除店铺「${name}」吗?删除后相关快递接口将不可用`, '提示', { type: 'warning' })
|
||||
ElMessageBox.confirm(`确认删除店铺「${name}」吗?删除后相关快递接口将不可用`, '提示', { type: 'warning', buttonSize: 'small' })
|
||||
.then(async () => {
|
||||
const res: any = await shopsDel({ id: row.id as number })
|
||||
if (!isSuccess(res)) {
|
||||
|
||||
@ -105,7 +105,7 @@
|
||||
align-center
|
||||
@close="resetForm"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px" size="small">
|
||||
<el-form-item label="策略名称" prop="custom_name">
|
||||
<el-input v-model="formData.custom_name" placeholder="请输入策略名称" maxlength="100" show-word-limit />
|
||||
</el-form-item>
|
||||
@ -286,8 +286,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -630,7 +630,7 @@ async function submitForm() {
|
||||
function handleDelete(row: StoreExpressBindingPolicyRecord) {
|
||||
if (!row.id) return
|
||||
const name = row.custom_name || String(row.id)
|
||||
ElMessageBox.confirm(`确认删除策略「${name}」吗?`, '提示', { type: 'warning' })
|
||||
ElMessageBox.confirm(`确认删除策略「${name}」吗?`, '提示', { type: 'warning', buttonSize: 'small' })
|
||||
.then(async () => {
|
||||
const res: any = await storeExpressBindingPolicyDel({ id: row.id as number })
|
||||
if (!isSuccess(res)) {
|
||||
|
||||
@ -94,7 +94,8 @@ async function handleActionClick(btn: OperationButtonConfig) {
|
||||
{
|
||||
confirmButtonText: btn.confirmButtonText || '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: (btn.confirmType || 'warning') as any
|
||||
type: (btn.confirmType || 'warning') as any,
|
||||
buttonSize: 'small'
|
||||
}
|
||||
)
|
||||
} catch {
|
||||
|
||||
@ -258,7 +258,7 @@
|
||||
:close-on-click-modal="false"
|
||||
@close="resetForm"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px" size="small">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入工作台名称" maxlength="100" show-word-limit />
|
||||
</el-form-item>
|
||||
@ -285,8 +285,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
@ -398,8 +398,8 @@
|
||||
<el-empty v-if="filteredCameras.length === 0 && !bindCameraLoading" description="暂无摄像头" :image-size="60" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="bindCameraVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="bindCameraSaving" @click="submitBindCamera">保存</el-button>
|
||||
<el-button size="small" @click="bindCameraVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="bindCameraSaving" @click="submitBindCamera">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
@ -783,7 +783,7 @@ function getAuthStatusLabel(status: number): string {
|
||||
async function handleUnbind(row: any, targetStatus: number) {
|
||||
const action = targetStatus === 1 ? '启用' : '禁用'
|
||||
try {
|
||||
await ElMessageBox.confirm(`确认${action}该签约关系?`, '提示', { type: 'warning' })
|
||||
await ElMessageBox.confirm(`确认${action}该签约关系?`, '提示', { type: 'warning', buttonSize: 'small' })
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
@ -802,7 +802,8 @@ async function handleRename(row: any) {
|
||||
const { value } = await ElMessageBox.prompt('请输入新的备注名', '修改备注', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputValue: row.remask || ''
|
||||
inputValue: row.remask || '',
|
||||
buttonSize: 'small'
|
||||
})
|
||||
if (value != null) {
|
||||
await storeWarehouseRename({ id: row.id, remask: value })
|
||||
@ -915,7 +916,7 @@ async function handleConfirmSign(row: any) {
|
||||
await ElMessageBox.confirm(
|
||||
`确认与「${row.warehouse_name || row.remask || row.counterparty_name}」的签约关系?`,
|
||||
'确认签约',
|
||||
{ type: 'warning' }
|
||||
{ type: 'warning', buttonSize: 'small' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user