This commit is contained in:
yin 2026-10-27 19:10:53 +08:00
parent b7d302d65a
commit 41a3563bce
42 changed files with 2428 additions and 426 deletions

View File

@ -308,8 +308,65 @@ export function getShopList(data?: {
} as any)
}
/** 获取指定店铺可用快递列表 */
export function getShopExpressList(data?: { shop_id?: string | number; shopId?: string | number }) {
/** 快递产品类型(非 PDD 平台由服务端按 sys_express_code 匹配 wms_express_product_type 补充;PDD 平台不返回) */
export type ShopExpressProductType = {
code?: string
name?: string
[key: string]: unknown
}
/** 店铺可用快递列表项(各平台字段有差异:前端按需取值 + 索引签名兜底) */
export type ShopExpressListItem = {
/** 电子面单快递编码(淘宝系 wp_code;其次 express_code / code) */
wp_code?: string
wp_name?: string
express_code?: string
express_name?: string
code?: string
name?: string
label?: string
/** 系统快递编码(与本系统 wms_express.express_code 对齐) */
sys_express_code?: string
/** 快递公司编号(部分平台用 providerid / provider_id / providerId) */
providerid?: string | number
provider_id?: string | number
providerId?: string | number
/** 产品类型列表:**非 PDD 平台**服务端会补充;PDD 平台不返回该字段 */
product_types?: ShopExpressProductType[]
/** 签约网点/账号(含面单余量、地址、增值服务;字段随平台差异) */
accounts?: Record<string, any>[]
[key: string]: unknown
}
/**
* index.getShopExpressList 响应
*
* ⚠️ 该接口响应形如 `{ code, message, data }`(**无 flag / timestamp**),业务数据在 `data` 内。
*/
export type ShopExpressListResponse = {
/** 业务状态码,成功 200 */
code?: number
/** 业务提示信息,成功 ok */
message?: string
data?: {
/** 当前店铺ID */
shop_id?: number
/** 店铺所属平台编码(服务端已转大写) */
platform_code?: string
/** 服务端按平台收敛后的可用快递列表;未接入的平台返回空数组 */
list?: ShopExpressListItem[]
}
}
/**
* 获取指定店铺可用快递列表
*
* 入参 `shop_id` / `shopId` 二选一至少传一个(服务端按 shop_id、shopId 顺序读首个非空值)。
*/
export function getShopExpressList(data?: {
shop_id?: string | number
shopId?: string | number
}): Promise<ShopExpressListResponse> {
return request({
url: '/system',
method: 'post',

View File

@ -79,12 +79,16 @@ export type StockCheckDetailStatus = 'none_checked' | 'partial_checked' | 'all_c
* 盘点范围类型
*
* 明细行形态由 type 决定:
* all / location → 明细为「库位行」(scope_type=location,一行=一个库位,行内按商品聚合 stocks[])
* store / goods → 明细为「商品行」(scope_type=goods,一行=一个库存商品)
* location → 明细为「库位行」(scope_type=location,一行=一个库位,行内按商品聚合 stocks[])
* store / goods → 明细为「商品行」(scope_type=goods,一行=一个库存商品)
*
* ⚠️ **`all` 已下线**(2026-10-27 文档,与 location 语义重复):create / addDetail 传 `all` 均报 400;
* 原「全盘」语义已并入 `location`——按库位盘点添加明细时未传库位/库位ID,
* 由后端自动拉取全仓库启用且有效的库位生成盘点范围。
* 历史 type=all 的任务仅能查看,**不能再添加明细**。
*/
export type StockCheckType =
| 'all' // 按库位盘点(缺省):添加明细未传库位时由后端自动拉取全仓库启用库位生成盘点范围
| 'location' // 按库位盘点(指定库位)
| 'location' // 按库位盘点(**缺省**;未传库位时后端自动拉取全仓库启用库位 → 原 all 全盘语义)
| 'store' // 按货主按商品盘点(商品行)
| 'goods' // 按商品盘点(商品行)
@ -351,15 +355,20 @@ export type StockCheckResultRow = StockCheckDetailRow & {
* 文档最新入参:title / type / mode / store_id / remark(**已无 check_date**,主表也不再返回该字段);
* 盘点时间改由作业流程回填(start_time=首个盘点明细写入时间、end_time=完成盘点时间)。
*
* mode 口径:按库位盘点(type=all/location)一律盲盘 blind(前端传值被忽略);
* mode 口径:按库位盘点(type=location)一律盲盘 blind(前端传值被忽略);
* 按商品盘点(type=store/goods)按传入值(默认明盘 open)。
*/
export type StockCheckCreateParams = {
/** 盘点名称/主题 */
title?: string
/** 盘点范围类型,缺省 all */
/**
* 盘点范围类型,**缺省 `location`**(2026-10-27 文档)
*
* ⚠️ `all` 已下线(与 location 语义重复),**传入返回 400**;
* 原「全盘」语义用 `location`:不传库位即由后端拉取全仓库启用库位生成盘点范围。
*/
type?: StockCheckType
/** 盘点方式:open=明盘 / blind=盲盘;库位类(all/location)一律 blind */
/** 盘点方式:open=明盘 / blind=盲盘;库位类(type=location)一律 blind */
mode?: StockCheckMode
/** 货主ID(type=store 时必填;添加商品明细时商品货主必须与该货主一致) */
store_id?: number
@ -543,7 +552,10 @@ export type StockCheckListWhere = {
status?: StockCheckWhereCondition
/** 货主筛选:`{ operator: 'eq', value: 100000, type: 'number' }` */
store_id?: StockCheckWhereCondition
/** 盘点范围筛选(all/location/store/goods):`{ operator: 'eq', value: 'goods', type: 'text' }` */
/**
* 盘点范围筛选(location/store/goods;已下线的 `all` 不在筛选枚举内,仅历史行可能存在该值):
* `{ operator: 'eq', value: 'goods', type: 'text' }`
*/
type?: StockCheckWhereCondition
/** 盘点方式筛选(open/blind):`{ operator: 'eq', value: 'blind', type: 'text' }` */
mode?: StockCheckWhereCondition
@ -599,14 +611,15 @@ export function stockCheckList(
* → 前端语义:传 N 个 stock_ids 可能得到 >N 条明细,响应 `added` 是**明细行数**而非商品数。
*
* 维度校验(传错维度后端报 400):
* - 按库位盘点(type=all/location)传 stock_ids → 「当前盘点类型按库位盘点,请传 locations 或
* - 按库位盘点(type=location)传 stock_ids → 「当前盘点类型按库位盘点,请传 locations 或
* location_ids(如需按商品盘点请创建 type=goods 任务)」
* - 按商品盘点(type=store/goods)传 locations → 「当前盘点类型按商品盘点,请传 stock_ids」
* - 按商品盘点传 location_ids → 「当前盘点类型按商品盘点,不能添加库位明细」
*
* 商品判定:商品必须属于本仓库;任务 store_id 非空时商品货主必须与任务货主一致
* (不一致的商品计入 invalid_stock_ids)。
* 兼容:type=all 且已存在商品明细行(改造前创建的旧任务)时,继续按商品模式接受 stock_ids。
* ⚠️ `all` 已下线(2026-10-27):**历史 type=all 的任务添加明细直接返回 400**,
* 需新建 type=location 的任务;库位也必须有效(未删除且所属分区 zone 存在,剔除无头库位)。
* 幂等:已存在同盘点项(商品行 stock_id / 库位行 location_code)自动跳过(计入 skipped)。
*/
export type StockCheckAddDetailParams = {
@ -621,15 +634,15 @@ export type StockCheckAddDetailParams = {
*/
stock_ids?: number[]
/**
* 库位编码列表(wms_location_space.space_code):type=all/location 按库位盘点时使用,
* 库位编码列表(wms_location_space.space_code):type=location 按库位盘点时使用,
* 与 stock_ids 按任务类型二选一;**与 location_ids 同时传入时被忽略(location_ids 优先)**;
* **type=all 未传库位且未传 location_ids 时由后端自动拉取全仓库启用库位生成盘点范围**
* **type=location 未传库位且未传 location_ids 时由后端自动拉取全仓库启用库位生成盘点范围**
*/
locations?: string[]
/** 库位编码列表(兼容别名;locations 优先,两者都传时以 locations 为准) */
location_codes?: string[]
/**
* 库位ID列表(wms_location_space.id):type=all/location 按库位盘点时使用,
* 库位ID列表(wms_location_space.id):type=location 按库位盘点时使用,
* 直接按 id + warehouse_id 查库校验(**不再按编码二次解析**),查不到的 ID 记入
* `invalid_location_ids`(不报错);与 locations 同时传入时 **location_ids 优先、locations 忽略**
*/
@ -879,7 +892,7 @@ export function stockCheckResult(
*
* ⚠️ 这**不是入参**:`view` 入参已废弃(传了也被忽略)。实际返回哪种结构由
* **任务范围类型 + `is_goods`** 解析:
* - 任务范围是库位(`type=location/all`)→ **一律 `location`**(库位结构)
* - 任务范围是库位(`type=location`;历史 `all` 任务同属库位结构)→ **一律 `location`**(库位结构)
* - 任务范围是商品(`type=goods/store`)→ 默认 **`space`**(聚合库位);
* 仅 `is_goods=true` → **`goods`**(商品结构)
*/
@ -1101,7 +1114,7 @@ export type StockCheckWorkDataParams = {
/**
* 商品任务是否按商品视图返回(**仅商品任务生效**):
* true → `goods`(商品结构);缺省 false → `space`(聚合库位,按拣货路径)
* 库位任务(type=location/all)**无视该参数**,一律返回 `location`(库位结构)
* 库位任务(type=location,含历史 all 任务)**无视该参数**,一律返回 `location`(库位结构)
*/
is_goods?: boolean
/** 商品视图开关(驼峰别名,兼容写法;is_goods 优先) */

View File

@ -480,10 +480,17 @@ const etaLabel = computed(
background: #fafafa;
}
/* 标签列固定宽度(含必填星号占位):对齐「手工录入运单号」表单,保证各行标签/值对齐 */
&__field-label {
flex: none;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
text-align: left;
white-space: nowrap;
}
&__field-value {

View File

@ -157,7 +157,15 @@ function close() {
.utp-actions {
display: flex;
gap: 8px;
align-items: center;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
/* 清掉 el-button 默认 `+ .el-button { margin-left: 12px }`,避免与 gap 叠加成 18px */
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
</style>

View File

@ -47,3 +47,14 @@
.el-range-separator {
box-sizing: content-box;
}
// ElMessageBox(确认/提示弹窗)底部按钮间距:对齐工具栏按钮组
// (OrderToolbarButtonGroup gap 6px),覆盖 Element Plus 默认的
// .el-button + .el-button { margin-left: 12px }
.el-message-box__btns {
gap: 6px;
.el-button + .el-button {
margin-left: 0;
}
}

View File

@ -1,34 +1,139 @@
<template>
<el-dialog v-model="visible" title="登记理赔" width="550px" align-center append-to-body destroy-on-close @closed="resetForm">
<el-form ref="formRef" :model="form" :rules="rules" label-width="110px" size="small">
<el-divider content-position="left">仓库理赔</el-divider>
<el-form-item label="是否需要"><el-switch v-model="form.claim_needed" :active-value="1" :inactive-value="0" /></el-form-item>
<template v-if="form.claim_needed">
<el-form-item label="金额"><el-input-number v-model="form.claim_amount" :min="0" :precision="2" style="width:180px" /></el-form-item>
<el-form-item label="状态">
<el-select v-model="form.claim_status" style="width:180px">
<el-option v-for="(l,v) in claimStatusOptions" :key="v" :label="l" :value="v" />
</el-select>
</el-form-item>
</template>
<el-divider content-position="left">运方理赔</el-divider>
<el-form-item label="是否需要"><el-switch v-model="form.carrier_claim_needed" :active-value="1" :inactive-value="0" /></el-form-item>
<template v-if="form.carrier_claim_needed">
<el-form-item label="金额"><el-input-number v-model="form.carrier_claim_amount" :min="0" :precision="2" style="width:180px" /></el-form-item>
<el-form-item label="状态">
<el-select v-model="form.carrier_claim_status" style="width:180px">
<el-option v-for="(l,v) in claimStatusOptions" :key="v" :label="l" :value="v" />
</el-select>
</el-form-item>
</template>
<el-divider content-position="left">操作信息</el-divider>
<el-form-item label="操作动作" prop="claim_action"><el-input v-model="form.claim_action" /></el-form-item>
<el-form-item label="备注"><el-input v-model="form.claim_remark" type="textarea" :rows="2" /></el-form-item>
</el-form>
<template #footer>
<el-button size="small" @click="visible = false">取消</el-button>
<el-button type="primary" size="small" :loading="loading" @click="submit">确认</el-button>
</template>
<!--
售后明细 - 登记理赔弹窗
面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm)
-->
<template>
<el-dialog
v-model="visible"
class="after-sale-claim-dialog"
width="min(560px, 92vw)"
align-center
append-to-body
destroy-on-close
:show-close="false"
:close-on-click-modal="false"
@closed="resetForm"
>
<div class="task-panel">
<header class="task-panel__head">
<div class="task-panel__titles">
<h2>登记理赔</h2>
<p>登记仓库理赔与运方理赔信息,并记录本次操作</p>
</div>
<button
class="task-panel__close"
type="button"
aria-label="关闭"
@click="visible = false"
>
<svg viewBox="0 0 12 12" fill="none">
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
</svg>
</button>
</header>
<div class="task-panel__body task-panel__body--scroll">
<el-form ref="formRef" :model="form" :rules="rules" class="task-panel__form">
<div class="task-panel__section-title">仓库理赔</div>
<div class="task-panel__field">
<span class="task-panel__field-label">是否需要</span>
<el-switch v-model="form.claim_needed" :active-value="1" :inactive-value="0" />
</div>
<template v-if="form.claim_needed">
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">金额</span>
<div class="task-panel__field-control">
<el-input-number
v-model="form.claim_amount"
size="default"
:min="0"
:precision="2"
controls-position="right"
style="width: 180px"
/>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">状态</span>
<div class="task-panel__field-control">
<el-select v-model="form.claim_status" size="default" placeholder="请选择理赔状态" style="width: 180px">
<el-option v-for="(l, v) in claimStatusOptions" :key="v" :label="l" :value="v" />
</el-select>
</div>
</div>
</template>
<div class="task-panel__section-title is-spaced">运方理赔</div>
<div class="task-panel__field">
<span class="task-panel__field-label">是否需要</span>
<el-switch v-model="form.carrier_claim_needed" :active-value="1" :inactive-value="0" />
</div>
<template v-if="form.carrier_claim_needed">
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">金额</span>
<div class="task-panel__field-control">
<el-input-number
v-model="form.carrier_claim_amount"
size="default"
:min="0"
:precision="2"
controls-position="right"
style="width: 180px"
/>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">状态</span>
<div class="task-panel__field-control">
<el-select v-model="form.carrier_claim_status" size="default" placeholder="请选择理赔状态" style="width: 180px">
<el-option v-for="(l, v) in claimStatusOptions" :key="v" :label="l" :value="v" />
</el-select>
</div>
</div>
</template>
<div class="task-panel__section-title is-spaced">操作信息</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">操作动作</span>
<div class="task-panel__field-control">
<el-form-item prop="claim_action">
<el-input v-model="form.claim_action" size="default" placeholder="请输入本次操作动作" />
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input task-panel__field--textarea">
<span class="task-panel__field-label">备注</span>
<div class="task-panel__field-control">
<el-input
v-model="form.claim_remark"
type="textarea"
:rows="3"
resize="none"
size="default"
placeholder="请输入备注(可选)"
/>
<p class="task-panel__field-tip">操作动作与备注将记入售后单处理记录</p>
</div>
</div>
</el-form>
</div>
<footer class="task-panel__foot">
<span class="task-panel__hint">提交后理赔信息将更新到售后单</span>
<div class="task-panel__actions">
<el-button size="small" @click="visible = false">取消</el-button>
<el-button size="small" type="primary" :loading="loading" @click="submit">确认</el-button>
</div>
</footer>
</div>
</el-dialog>
</template>
@ -92,3 +197,203 @@ async function submit() {
defineExpose({ open })
</script>
<style scoped lang="scss">
/* 面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) */
.task-panel {
background: #fff;
color: #303133;
&__head {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px;
}
&__titles {
flex: 1;
min-width: 0;
h2 {
margin: 0;
font-size: 18px;
line-height: 24px;
font-weight: 400;
color: #303133;
}
p {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
}
&__close {
width: 24px;
height: 24px;
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 4px;
background: transparent;
color: #909399;
cursor: pointer;
transition: color 0.2s;
svg {
width: 12px;
height: 12px;
}
&:hover {
color: #409eff;
}
}
/* 分组较多:超出 64vh 时面板内滚动 */
&__body {
padding: 12px 16px 0;
&--scroll {
max-height: 64vh;
overflow-y: auto;
}
}
/* 分组标题(仓库理赔 / 运方理赔 / 操作信息) */
&__section-title {
font-size: 13px;
font-weight: 600;
line-height: 20px;
color: #303133;
&.is-spaced {
margin-top: 8px;
}
}
&__form {
display: flex;
flex-direction: column;
gap: 8px;
}
&__field {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 40px;
padding: 8px 12px;
border: 1px solid #ebeef5;
border-radius: 4px;
background: #fafafa;
/* 输入行:去掉灰色容器,与静态信息行区分 */
&--input {
align-items: flex-start;
min-height: 0;
padding: 4px 0 0 12px;
border: none;
border-radius: 0;
background: transparent;
.task-panel__field-label {
padding-top: 7px;
}
}
/* 多行文本行:标签与文本域顶部对齐 */
&--textarea {
padding-top: 8px;
}
}
&__field-label {
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
&.is-required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
&__field-control {
flex: 1;
min-width: 0;
}
&__field-tip {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
&__foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 16px;
}
&__hint {
font-size: 12px;
color: #909399;
}
&__actions {
display: flex;
align-items: center;
gap: 8px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
}
/* 面板内嵌 el-form-item:去掉默认间距,错误提示改回文档流内展示 */
.task-panel__form {
:deep(.el-form-item) {
margin-bottom: 0;
}
:deep(.el-form-item__content) {
margin-left: 0;
line-height: 1.4;
}
:deep(.el-form-item__error) {
position: static;
padding-top: 4px;
}
}
</style>
<style lang="scss">
/* el-dialog 会被 append 到 body:去掉默认头/内边距,统一交给面板 */
.el-dialog.after-sale-claim-dialog {
padding: 0;
overflow: hidden;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 0;
}
}
</style>

View File

@ -1,19 +1,82 @@
<template>
<el-dialog v-model="visible" title="转单" width="450px" align-center append-to-body destroy-on-close @closed="resetForm">
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px" size="small">
<el-form-item label="目标角色组" prop="role_group">
<el-select v-model="form.role_group" style="width:100%">
<el-option label="客服组" value="customer_service" />
<el-option label="仓库组" value="warehouse" />
<el-option label="财务组" value="finance" />
</el-select>
</el-form-item>
<el-form-item label="备注"><el-input v-model="form.remark" type="textarea" :rows="2" /></el-form-item>
</el-form>
<template #footer>
<el-button size="small" @click="visible = false">取消</el-button>
<el-button type="primary" size="small" :loading="loading" @click="submit">确认</el-button>
</template>
<!--
售后明细 - 转单弹窗
面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm)
-->
<template>
<el-dialog
v-model="visible"
class="after-sale-transfer-detail-dialog"
width="min(560px, 92vw)"
align-center
append-to-body
destroy-on-close
:show-close="false"
:close-on-click-modal="false"
@closed="resetForm"
>
<div class="task-panel">
<header class="task-panel__head">
<div class="task-panel__titles">
<h2>转单</h2>
<p>将当前售后单转交给其他角色组处理</p>
</div>
<button
class="task-panel__close"
type="button"
aria-label="关闭"
@click="visible = false"
>
<svg viewBox="0 0 12 12" fill="none">
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
</svg>
</button>
</header>
<div class="task-panel__body">
<el-form ref="formRef" :model="form" :rules="rules" class="task-panel__form">
<div class="task-panel__field">
<span class="task-panel__field-label">售后单 ID</span>
<strong class="task-panel__field-value">{{ afterSaleId || '—' }}</strong>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">目标角色组</span>
<div class="task-panel__field-control">
<el-form-item prop="role_group">
<el-select v-model="form.role_group" size="default" placeholder="请选择目标角色组" style="width: 100%">
<el-option label="客服组" value="customer_service" />
<el-option label="仓库组" value="warehouse" />
<el-option label="财务组" value="finance" />
</el-select>
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input task-panel__field--textarea">
<span class="task-panel__field-label">备注</span>
<div class="task-panel__field-control">
<el-input
v-model="form.remark"
type="textarea"
:rows="3"
resize="none"
size="default"
placeholder="请输入转单备注(可选)"
/>
<p class="task-panel__field-tip">备注将随转单记录保存,便于接收方了解转单原因</p>
</div>
</div>
</el-form>
</div>
<footer class="task-panel__foot">
<span class="task-panel__hint">提交后该售后单将由目标角色组接手</span>
<div class="task-panel__actions">
<el-button size="small" @click="visible = false">取消</el-button>
<el-button size="small" type="primary" :loading="loading" @click="submit">确认</el-button>
</div>
</footer>
</div>
</el-dialog>
</template>
@ -57,3 +120,193 @@ async function submit() {
defineExpose({ open })
</script>
<style scoped lang="scss">
/* 面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) */
.task-panel {
background: #fff;
color: #303133;
&__head {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px;
}
&__titles {
flex: 1;
min-width: 0;
h2 {
margin: 0;
font-size: 18px;
line-height: 24px;
font-weight: 400;
color: #303133;
}
p {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
}
&__close {
width: 24px;
height: 24px;
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 4px;
background: transparent;
color: #909399;
cursor: pointer;
transition: color 0.2s;
svg {
width: 12px;
height: 12px;
}
&:hover {
color: #409eff;
}
}
&__body {
padding: 12px 16px 0;
}
&__form {
display: flex;
flex-direction: column;
gap: 8px;
}
&__field {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 40px;
padding: 8px 12px;
border: 1px solid #ebeef5;
border-radius: 4px;
background: #fafafa;
/* 输入行:去掉灰色容器,与静态信息行区分 */
&--input {
align-items: flex-start;
min-height: 0;
padding: 4px 0 0 12px;
border: none;
border-radius: 0;
background: transparent;
.task-panel__field-label {
padding-top: 7px;
}
}
/* 多行文本行:标签与文本域顶部对齐 */
&--textarea {
padding-top: 8px;
}
}
&__field-label {
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
&.is-required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
&__field-value {
font-size: 13px;
font-weight: 500;
color: #303133;
text-align: right;
word-break: break-all;
}
&__field-control {
flex: 1;
min-width: 0;
}
&__field-tip {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
&__foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 16px;
}
&__hint {
font-size: 12px;
color: #909399;
}
&__actions {
display: flex;
align-items: center;
gap: 8px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
}
/* 面板内嵌 el-form-item:去掉默认间距,错误提示改回文档流内展示 */
.task-panel__form {
:deep(.el-form-item) {
margin-bottom: 0;
}
:deep(.el-form-item__content) {
margin-left: 0;
line-height: 1.4;
}
:deep(.el-form-item__error) {
position: static;
padding-top: 4px;
}
}
</style>
<style lang="scss">
/* el-dialog 会被 append 到 body:去掉默认头/内边距,统一交给面板 */
.el-dialog.after-sale-transfer-detail-dialog {
padding: 0;
overflow: hidden;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 0;
}
}
</style>

View File

@ -163,33 +163,85 @@
</template>
</el-dialog>
<!-- 转单弹窗 -->
<!-- 转单弹窗:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) -->
<el-dialog
v-model="transferDialogVisible"
title="转单"
width="500px"
class="after-sale-transfer-dialog"
width="min(560px, 92vw)"
align-center
append-to-body
:show-close="false"
destroy-on-close
:close-on-click-modal="false"
>
<el-form ref="transferFormRef" :model="transferForm" :rules="transferRules" label-width="110px" size="small">
<el-form-item label="售后单号">
<el-input :model-value="transferForm.after_sale_no" disabled />
</el-form-item>
<el-form-item label="目标角色组" prop="role_group">
<el-select v-model="transferForm.role_group" placeholder="请选择目标角色组" style="width: 100%">
<el-option label="客服组" value="customer_service" />
<el-option label="仓库组" value="warehouse" />
<el-option label="财务组" value="finance" />
</el-select>
</el-form-item>
<el-form-item label="转单备注">
<el-input v-model="transferForm.remark" type="textarea" :rows="2" placeholder="请输入转单备注" />
</el-form-item>
</el-form>
<template #footer>
<el-button size="small" @click="transferDialogVisible = false">取消</el-button>
<el-button type="primary" size="small" :loading="transferLoading" @click="handleSubmitTransfer">确认转单</el-button>
</template>
<div class="task-panel">
<header class="task-panel__head">
<div class="task-panel__titles">
<h2>转单</h2>
<p>将售后单转交给其他角色组处理</p>
</div>
<button
class="task-panel__close"
type="button"
aria-label="关闭"
@click="transferDialogVisible = false"
>
<svg viewBox="0 0 12 12" fill="none">
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
</svg>
</button>
</header>
<div class="task-panel__body">
<el-form ref="transferFormRef" :model="transferForm" :rules="transferRules" class="task-panel__form">
<div class="task-panel__field">
<span class="task-panel__field-label">售后单号</span>
<strong class="task-panel__field-value">{{ transferForm.after_sale_no || '—' }}</strong>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">目标角色组</span>
<div class="task-panel__field-control">
<el-form-item prop="role_group">
<el-select
v-model="transferForm.role_group"
size="default"
placeholder="请选择目标角色组"
style="width: 100%"
>
<el-option label="客服组" value="customer_service" />
<el-option label="仓库组" value="warehouse" />
<el-option label="财务组" value="finance" />
</el-select>
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input task-panel__field--textarea">
<span class="task-panel__field-label">转单备注</span>
<div class="task-panel__field-control">
<el-input
v-model="transferForm.remark"
type="textarea"
:rows="3"
resize="none"
size="default"
placeholder="请输入转单备注(可选)"
/>
<p class="task-panel__field-tip">备注将随转单记录保存,便于接收方了解转单原因</p>
</div>
</div>
</el-form>
</div>
<footer class="task-panel__foot">
<span class="task-panel__hint">提交后该售后单将由目标角色组接手</span>
<div class="task-panel__actions">
<el-button size="small" @click="transferDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="transferLoading" @click="handleSubmitTransfer">确认转单</el-button>
</div>
</footer>
</div>
</el-dialog>
<!-- 导出进度弹窗 -->
@ -830,4 +882,192 @@ onUnmounted(() => {
color: #909399;
padding: 16px;
}
/* 转单:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) */
.task-panel {
background: #fff;
color: #303133;
&__head {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px;
}
&__titles {
flex: 1;
min-width: 0;
h2 {
margin: 0;
font-size: 18px;
line-height: 24px;
font-weight: 400;
color: #303133;
}
p {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
}
&__close {
width: 24px;
height: 24px;
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 4px;
background: transparent;
color: #909399;
cursor: pointer;
transition: color 0.2s;
svg {
width: 12px;
height: 12px;
}
&:hover {
color: #409eff;
}
}
&__body {
padding: 12px 16px 0;
}
&__form {
display: flex;
flex-direction: column;
gap: 8px;
}
&__field {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 40px;
padding: 8px 12px;
border: 1px solid #ebeef5;
border-radius: 4px;
background: #fafafa;
/* 输入行:去掉灰色容器,与静态信息行区分 */
&--input {
align-items: flex-start;
min-height: 0;
padding: 4px 0 0 12px;
border: none;
border-radius: 0;
background: transparent;
.task-panel__field-label {
padding-top: 7px;
}
}
/* 多行文本行:标签与文本域顶部对齐 */
&--textarea {
padding-top: 8px;
}
}
&__field-label {
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
&.is-required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
&__field-value {
font-size: 13px;
font-weight: 500;
color: #303133;
text-align: right;
word-break: break-all;
}
&__field-control {
flex: 1;
min-width: 0;
}
&__field-tip {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
&__foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 16px;
}
&__hint {
font-size: 12px;
color: #909399;
}
&__actions {
display: flex;
align-items: center;
gap: 8px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
}
/* 面板内嵌 el-form-item:去掉默认间距,错误提示改回文档流内展示 */
.task-panel__form {
:deep(.el-form-item) {
margin-bottom: 0;
}
:deep(.el-form-item__content) {
margin-left: 0;
line-height: 1.4;
}
:deep(.el-form-item__error) {
position: static;
padding-top: 4px;
}
}
</style>
<style lang="scss">
/* el-dialog 会被 append 到 body:去掉默认头/内边距,统一交给面板 */
.el-dialog.after-sale-transfer-dialog {
padding: 0;
overflow: hidden;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 0;
}
}
</style>

View File

@ -13,84 +13,133 @@
<template>
<el-dialog
:model-value="visible"
:title="dialogTitle"
width="520px"
class="after-sale-type-dialog"
width="min(560px, 92vw)"
align-center
destroy-on-close
:show-close="false"
:close-on-click-modal="false"
append-to-body
@closed="handleClosed"
>
<div class="form-body">
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px" size="small">
<!-- 子类型:所属类型(编辑态不可改) -->
<el-form-item v-if="isSubType" label="所属类型" prop="type">
<el-select
v-model="form.type"
placeholder="请选择所属类型"
filterable
:disabled="isEdit"
style="width: 100%"
>
<el-option
v-for="opt in typeOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value"
<div class="task-panel">
<header class="task-panel__head">
<div class="task-panel__titles">
<h2>{{ dialogTitle }}</h2>
<p>
{{ isEdit
? '编码创建后不可修改,仅可调整名称、排序与状态'
: (isSubType ? '新增售后子类型,需选择所属类型' : '新增售后类型分类') }}
</p>
</div>
<button
class="task-panel__close"
type="button"
aria-label="关闭"
@click="handleClosed"
>
<svg viewBox="0 0 12 12" fill="none">
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
</svg>
</button>
</header>
<div class="task-panel__body">
<el-form ref="formRef" :model="form" :rules="rules" class="task-panel__form">
<!-- 子类型:所属类型(编辑态不可改) -->
<div v-if="isSubType" class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">所属类型</span>
<div class="task-panel__field-control">
<el-form-item prop="type">
<el-select
v-model="form.type"
size="default"
placeholder="请选择所属类型"
filterable
:disabled="isEdit"
style="width: 100%"
>
<el-option
v-for="opt in typeOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
</el-select>
</el-form-item>
<p v-if="!typeOptions.length" class="task-panel__field-tip is-warning">
暂无可选类型,请先在「售后类型」页签新增类型
</p>
</div>
</div>
<!-- 编码:类型 / 子类型;编辑态不可改 -->
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">{{ isSubType ? '子类型编码' : '类型编码' }}</span>
<div class="task-panel__field-control">
<el-form-item prop="code">
<el-input
v-model="form.code"
size="default"
:placeholder="codePlaceholder"
:disabled="isEdit"
:maxlength="codeMaxLength"
show-word-limit
/>
</el-form-item>
<p class="task-panel__field-tip">
仅支持小写字母、数字、下划线,最长 {{ codeMaxLength }} 位;创建后不可修改
</p>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">名称</span>
<div class="task-panel__field-control">
<el-form-item prop="name">
<el-input v-model="form.name" size="default" placeholder="请输入名称" maxlength="50" show-word-limit />
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">排序</span>
<div class="task-panel__field-control">
<el-form-item prop="sort_order">
<el-input-number
v-model="form.sort_order"
size="default"
:min="0"
:max="99999"
:precision="0"
controls-position="right"
/>
</el-form-item>
<p class="task-panel__field-tip">越小越靠前,默认 0</p>
</div>
</div>
<div class="task-panel__field">
<span class="task-panel__field-label">状态</span>
<el-switch
v-model="form.is_enabled"
:active-value="1"
:inactive-value="0"
active-text="启用"
inactive-text="停用"
/>
</el-select>
<div v-if="!typeOptions.length" class="form-tip form-tip--warn">
暂无可选类型,请先在「售后类型」页签新增类型
</div>
</el-form-item>
</el-form>
</div>
<!-- 编码:类型 / 子类型;编辑态不可改 -->
<el-form-item :label="isSubType ? '子类型编码' : '类型编码'" prop="code">
<el-input
v-model="form.code"
:placeholder="codePlaceholder"
:disabled="isEdit"
:maxlength="codeMaxLength"
show-word-limit
/>
<div class="form-tip">
仅支持小写字母、数字、下划线,最长 {{ codeMaxLength }} 位;创建后不可修改
</div>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称" maxlength="50" show-word-limit />
</el-form-item>
<el-form-item label="排序" prop="sort_order">
<div class="sort-row">
<el-input-number
v-model="form.sort_order"
:min="0"
:max="99999"
:precision="0"
controls-position="right"
/>
<span class="form-tip">越小越靠前,默认 0</span>
</div>
</el-form-item>
<el-form-item label="状态" prop="is_enabled">
<el-switch
v-model="form.is_enabled"
:active-value="1"
:inactive-value="0"
active-text="启用"
inactive-text="停用"
/>
</el-form-item>
</el-form>
<footer class="task-panel__foot">
<span class="task-panel__hint">提交前请确认编码与名称无误</span>
<div class="task-panel__actions">
<el-button size="small" @click="handleClosed">取消</el-button>
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
</div>
</footer>
</div>
<template #footer>
<el-button size="small" @click="handleClosed">取消</el-button>
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
</template>
</el-dialog>
</template>
@ -281,24 +330,182 @@ async function submitForm() {
</script>
<style lang="scss" scoped>
.form-body {
padding: 0 4px;
}
/* 面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) */
.task-panel {
background: #fff;
color: #303133;
.form-tip {
margin-top: 2px;
font-size: 12px;
line-height: 18px;
color: #909399;
&__head {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px;
}
&--warn {
color: #e6a23c;
&__titles {
flex: 1;
min-width: 0;
h2 {
margin: 0;
font-size: 18px;
line-height: 24px;
font-weight: 400;
color: #303133;
}
p {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
}
&__close {
width: 24px;
height: 24px;
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 4px;
background: transparent;
color: #909399;
cursor: pointer;
transition: color 0.2s;
svg {
width: 12px;
height: 12px;
}
&:hover {
color: #409eff;
}
}
&__body {
padding: 12px 16px 0;
}
&__form {
display: flex;
flex-direction: column;
gap: 8px;
}
&__field {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 40px;
padding: 8px 12px;
border: 1px solid #ebeef5;
border-radius: 4px;
background: #fafafa;
/* 输入行:去掉灰色容器,与静态信息行区分 */
&--input {
align-items: flex-start;
min-height: 0;
padding: 4px 0 0 12px;
border: none;
border-radius: 0;
background: transparent;
.task-panel__field-label {
padding-top: 7px;
}
}
}
&__field-label {
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
&.is-required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
&__field-control {
flex: 1;
min-width: 0;
}
&__field-tip {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
&.is-warning {
color: #e6a23c;
}
}
&__foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 16px;
}
&__hint {
font-size: 12px;
color: #909399;
}
&__actions {
display: flex;
align-items: center;
gap: 8px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
}
.sort-row {
display: flex;
align-items: center;
gap: 8px;
/* 面板内嵌 el-form-item:去掉默认间距,错误提示改回文档流内展示 */
.task-panel__form {
:deep(.el-form-item) {
margin-bottom: 0;
}
:deep(.el-form-item__content) {
margin-left: 0;
line-height: 1.4;
}
:deep(.el-form-item__error) {
position: static;
padding-top: 4px;
}
}
</style>
<style lang="scss">
/* el-dialog 会被 append 到 body:去掉默认头/内边距,统一交给面板 */
.el-dialog.after-sale-type-dialog {
padding: 0;
overflow: hidden;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 0;
}
}
</style>

View File

@ -113,26 +113,78 @@
<!-- ========== 弹窗 ========== -->
<!-- 生成绑群码弹窗 -->
<el-dialog v-model="bindDialogVisible" title="生成绑群码" width="550px" align-center destroy-on-close @closed="resetBindForm">
<el-form ref="bindFormRef" :model="bindForm" :rules="bindRules" label-width="100px" size="small">
<el-form-item label="选择货主" prop="storeId">
<el-select v-model="bindForm.storeId" placeholder="请选择货主" filterable style="width: 100%" :loading="storeLoading">
<el-option v-for="store in storeList" :key="store.value" :label="store.label" :value="store.value" />
</el-select>
</el-form-item>
<el-form-item label="子类型">
<el-select v-model="bindForm.subType" placeholder="可选" clearable style="width: 100%">
<el-option label="售后" value="after_sales" />
<el-option label="财务" value="finance" />
<el-option label="收货" value="receiving" />
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button size="small" @click="bindDialogVisible = false">取消</el-button>
<el-button type="primary" size="small" :loading="bindLoading" @click="handleGenerateCode">生成</el-button>
</template>
<!-- 生成绑群码弹窗:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) -->
<el-dialog
v-model="bindDialogVisible"
class="bind-code-dialog"
width="min(560px, 92vw)"
align-center
append-to-body
:show-close="false"
destroy-on-close
:close-on-click-modal="false"
@closed="resetBindForm"
>
<div class="task-panel">
<header class="task-panel__head">
<div class="task-panel__titles">
<h2>生成绑群码</h2>
<p>选择货主后生成绑群码,生成后 5 分钟内有效</p>
</div>
<button
class="task-panel__close"
type="button"
aria-label="关闭"
@click="bindDialogVisible = false"
>
<svg viewBox="0 0 12 12" fill="none">
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
</svg>
</button>
</header>
<div class="task-panel__body">
<el-form ref="bindFormRef" :model="bindForm" :rules="bindRules" class="task-panel__form">
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">选择货主</span>
<div class="task-panel__field-control">
<el-form-item prop="storeId">
<el-select
v-model="bindForm.storeId"
size="default"
placeholder="请选择货主"
filterable
style="width: 100%"
:loading="storeLoading"
>
<el-option v-for="store in storeList" :key="store.value" :label="store.label" :value="store.value" />
</el-select>
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">子类型</span>
<div class="task-panel__field-control">
<el-select v-model="bindForm.subType" size="default" placeholder="可选" clearable style="width: 100%">
<el-option label="售后" value="after_sales" />
<el-option label="财务" value="finance" />
<el-option label="收货" value="receiving" />
</el-select>
<p class="task-panel__field-tip">不选则生成通用绑群码</p>
</div>
</div>
</el-form>
</div>
<footer class="task-panel__foot">
<span class="task-panel__hint">绑群码仅可使用一次,过期需重新生成</span>
<div class="task-panel__actions">
<el-button size="small" @click="bindDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="bindLoading" @click="handleGenerateCode">生成</el-button>
</div>
</footer>
</div>
</el-dialog>
<!-- 绑群码结果弹窗 -->
@ -567,7 +619,11 @@ async function handleSubmitEdit() {
async function handleToggleDisable(row: any) {
const action = row.is_blocked ? '启用' : '禁用'
try {
await ElMessageBox.confirm(`确定要${action}群组「${row.group_name}」吗?`, `${action}确认`, { type: 'warning' })
await ElMessageBox.confirm(`确定要${action}群组「${row.group_name}」吗?`, `${action}确认`, {
type: 'warning',
// 按钮尺寸对齐面板表单底部按钮(Element Plus small)
buttonSize: 'small'
})
const res: any = await inboxGroupDisable({ id: row.id, isBlocked: row.is_blocked ? 0 : 1 })
if (res && (res.code === 1 || res.code === 200 || res.code === 20000)) {
ElMessage.success(res.data?.message || res.message || `群已${action}`); fetchData()
@ -582,7 +638,13 @@ async function handleResetGroupConfig(row: any) {
await ElMessageBox.confirm(
`确定要清空群组「${row.group_name}」的群类型配置吗?群类型/子类型/货主/快递接口/系统快递编码将被清空,AI 自动回复与模板消息回复将关闭,仅保留群创建时信息。`,
'清空配置确认',
{ type: 'warning', confirmButtonText: '清空', confirmButtonClass: 'el-button--danger' }
{
type: 'warning',
confirmButtonText: '清空',
confirmButtonClass: 'el-button--danger',
// 按钮尺寸对齐面板表单底部按钮(Element Plus small)
buttonSize: 'small'
}
)
const res: any = await inboxGroupReset({ id: row.id })
if (res && (res.code === 1 || res.code === 200 || res.code === 20000)) {
@ -659,4 +721,192 @@ onMounted(() => { loadStoreList(); fetchData() })
.msg-table-wrapper { margin-bottom: 0; }
.msg-pagination-wrapper { display: flex; justify-content: flex-end; margin-top: 10px; }
.empty-tip { color: #909399; font-size: 13px; padding: 16px; text-align: center; }
/* 生成绑群码:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) */
.task-panel {
background: #fff;
color: #303133;
&__head {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px;
}
&__titles {
flex: 1;
min-width: 0;
h2 {
margin: 0;
font-size: 18px;
line-height: 24px;
font-weight: 400;
color: #303133;
}
p {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
}
&__close {
width: 24px;
height: 24px;
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 4px;
background: transparent;
color: #909399;
cursor: pointer;
transition: color 0.2s;
svg {
width: 12px;
height: 12px;
}
&:hover {
color: #409eff;
}
}
&__body {
padding: 12px 16px 0;
}
&__form {
display: flex;
flex-direction: column;
gap: 8px;
}
&__field {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 40px;
padding: 8px 12px;
border: 1px solid #ebeef5;
border-radius: 4px;
background: #fafafa;
/* 输入行:去掉灰色容器,与静态信息行区分 */
&--input {
align-items: flex-start;
min-height: 0;
padding: 4px 0 0 12px;
border: none;
border-radius: 0;
background: transparent;
.task-panel__field-label {
padding-top: 7px;
&.is-required::before {
top: 7px;
}
}
}
}
/* 标签列固定宽度(含必填星号占位):保证各选项输入框左边缘对齐、长度一致 */
&__field-label {
position: relative;
flex: 0 0 88px;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
text-align: left;
&.is-required::before {
content: '*';
position: absolute;
left: 0;
top: 0;
line-height: 20px;
color: #f56c6c;
}
}
&__field-control {
flex: 1;
min-width: 0;
}
&__field-tip {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
&__foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 16px;
}
&__hint {
font-size: 12px;
color: #909399;
}
&__actions {
display: flex;
align-items: center;
gap: 8px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
}
/* 面板内嵌 el-form-item:去掉默认间距,错误提示改回文档流内展示 */
.task-panel__form {
:deep(.el-form-item) {
margin-bottom: 0;
}
:deep(.el-form-item__content) {
margin-left: 0;
line-height: 1.4;
}
:deep(.el-form-item__error) {
position: static;
padding-top: 4px;
}
}
</style>
<style lang="scss">
/* el-dialog 会被 append 到 body:去掉默认头/内边距,统一交给面板 */
.el-dialog.bind-code-dialog {
padding: 0;
overflow: hidden;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 0;
}
}
</style>

View File

@ -157,39 +157,108 @@
</div>
</el-dialog>
<!-- 回信弹窗 -->
<el-dialog v-model="replyVisible" title="系统回信" width="550px" destroy-on-close @closed="resetReplyForm" align-center>
<el-form ref="replyFormRef" :model="replyForm" :rules="replyRules" label-width="100px" size="small">
<el-form-item label="原消息ID">
<el-input :model-value="replyForm.parentId" disabled />
</el-form-item>
<el-form-item label="目标渠道" prop="targetChannel">
<el-select v-model="replyForm.targetChannel" placeholder="请选择目标渠道" style="width: 100%">
<el-option label="企业微信" value="wecom" />
<el-option label="钉钉" value="dingtalk" />
<el-option label="飞书" value="feishu" />
<el-option label="仓库API" value="warehouse_api" />
<el-option label="Webhook" value="webhook" />
</el-select>
</el-form-item>
<el-form-item label="目标类型">
<el-select v-model="replyForm.targetType" placeholder="可选" clearable style="width: 100%">
<el-option label="IM" value="im" />
<el-option label="API" value="api" />
<el-option label="Webhook" value="webhook" />
</el-select>
</el-form-item>
<el-form-item label="扩展数据">
<el-input v-model="replyForm.extDataJson" type="textarea" :rows="4" placeholder='JSON 格式' />
</el-form-item>
<el-form-item label="处理标记">
<el-input v-model="replyForm.flagsJson" type="textarea" :rows="3" placeholder='JSON 格式' />
</el-form-item>
</el-form>
<template #footer>
<el-button size="small" @click="replyVisible = false">取消</el-button>
<el-button type="primary" size="small" :loading="replyLoading" @click="handleSubmitReply">确认回信</el-button>
</template>
<!-- 回信弹窗:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) -->
<el-dialog
v-model="replyVisible"
class="system-reply-dialog"
width="min(560px, 92vw)"
destroy-on-close
align-center
append-to-body
:show-close="false"
:close-on-click-modal="false"
@closed="resetReplyForm"
>
<div class="task-panel">
<header class="task-panel__head">
<div class="task-panel__titles">
<h2>系统回信</h2>
<p>向目标渠道发送系统回信,JSON 字段请保持格式正确</p>
</div>
<button
class="task-panel__close"
type="button"
aria-label="关闭"
@click="replyVisible = false"
>
<svg viewBox="0 0 12 12" fill="none">
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
</svg>
</button>
</header>
<div class="task-panel__body task-panel__body--scroll">
<el-form ref="replyFormRef" :model="replyForm" :rules="replyRules" class="task-panel__form">
<div class="task-panel__field">
<span class="task-panel__field-label">原消息 ID</span>
<strong class="task-panel__field-value">{{ replyForm.parentId || '—' }}</strong>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">目标渠道</span>
<div class="task-panel__field-control">
<el-form-item prop="targetChannel">
<el-select v-model="replyForm.targetChannel" size="default" placeholder="请选择目标渠道" style="width: 100%">
<el-option label="企业微信" value="wecom" />
<el-option label="钉钉" value="dingtalk" />
<el-option label="飞书" value="feishu" />
<el-option label="仓库API" value="warehouse_api" />
<el-option label="Webhook" value="webhook" />
</el-select>
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">目标类型</span>
<div class="task-panel__field-control">
<el-select v-model="replyForm.targetType" size="default" placeholder="可选" clearable style="width: 100%">
<el-option label="IM" value="im" />
<el-option label="API" value="api" />
<el-option label="Webhook" value="webhook" />
</el-select>
</div>
</div>
<div class="task-panel__field task-panel__field--input task-panel__field--textarea">
<span class="task-panel__field-label">扩展数据</span>
<div class="task-panel__field-control">
<el-input
v-model="replyForm.extDataJson"
type="textarea"
:rows="4"
resize="none"
size="default"
placeholder="JSON 格式"
/>
<p class="task-panel__field-tip">随回信下发的扩展字段,需为合法 JSON(可留空)</p>
</div>
</div>
<div class="task-panel__field task-panel__field--input task-panel__field--textarea">
<span class="task-panel__field-label">处理标记</span>
<div class="task-panel__field-control">
<el-input
v-model="replyForm.flagsJson"
type="textarea"
:rows="3"
resize="none"
size="default"
placeholder="JSON 格式"
/>
</div>
</div>
</el-form>
</div>
<footer class="task-panel__foot">
<span class="task-panel__hint">提交前请确认目标渠道与 JSON 内容无误</span>
<div class="task-panel__actions">
<el-button size="small" @click="replyVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="replyLoading" @click="handleSubmitReply">确认回信</el-button>
</div>
</footer>
</div>
</el-dialog>
<!-- 对话链弹窗 -->
@ -640,4 +709,198 @@ onMounted(() => {
}
.thread-empty { text-align: center; padding: 40px; color: #909399; }
.empty-tip { color: #909399; font-size: 13px; padding: 16px; }
/* 系统回信:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) */
.task-panel {
background: #fff;
color: #303133;
&__head {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px;
}
&__titles {
flex: 1;
min-width: 0;
h2 {
margin: 0;
font-size: 18px;
line-height: 24px;
font-weight: 400;
color: #303133;
}
p {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
}
&__close {
width: 24px;
height: 24px;
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 4px;
background: transparent;
color: #909399;
cursor: pointer;
transition: color 0.2s;
svg {
width: 12px;
height: 12px;
}
&:hover {
color: #409eff;
}
}
&__body {
padding: 12px 16px 0;
/* 两个 JSON 文本域较高:超出 64vh 时面板内滚动 */
&--scroll {
max-height: 64vh;
overflow-y: auto;
}
}
&__form {
display: flex;
flex-direction: column;
gap: 8px;
}
&__field {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 40px;
padding: 8px 12px;
border: 1px solid #ebeef5;
border-radius: 4px;
background: #fafafa;
/* 输入行:去掉灰色容器,与静态信息行区分 */
&--input {
align-items: flex-start;
min-height: 0;
padding: 4px 0 0 12px;
border: none;
border-radius: 0;
background: transparent;
.task-panel__field-label {
padding-top: 7px;
}
}
/* 多行文本行:标签与文本域顶部对齐 */
&--textarea {
padding-top: 8px;
}
}
&__field-label {
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
&.is-required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
&__field-value {
font-size: 13px;
font-weight: 500;
color: #303133;
text-align: right;
word-break: break-all;
}
&__field-control {
flex: 1;
min-width: 0;
}
&__field-tip {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
color: #909399;
}
&__foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 16px;
}
&__hint {
font-size: 12px;
color: #909399;
}
&__actions {
display: flex;
align-items: center;
gap: 8px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
}
/* 面板内嵌 el-form-item:去掉默认间距,错误提示改回文档流内展示 */
.task-panel__form {
:deep(.el-form-item) {
margin-bottom: 0;
}
:deep(.el-form-item__content) {
margin-left: 0;
line-height: 1.4;
}
:deep(.el-form-item__error) {
position: static;
padding-top: 4px;
}
}
</style>
<style lang="scss">
/* el-dialog 会被 append 到 body:去掉默认头/内边距,统一交给面板 */
.el-dialog.system-reply-dialog {
padding: 0;
overflow: hidden;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 0;
}
}
</style>

View File

@ -61,8 +61,10 @@
</div>
<template #footer>
<el-button size="small" @click="handleClose">取消</el-button>
<el-button size="small" type="primary" :loading="submitting" @click="handleSubmit">绑定</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="handleClose">取消</el-button>
<el-button size="small" type="primary" :loading="submitting" @click="handleSubmit">绑定</el-button>
</div>
</template>
</el-dialog>
</template>
@ -202,6 +204,18 @@ async function handleSubmit() {
</script>
<style scoped lang="scss">
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
justify-content: flex-end;
gap: 6px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
.bind-result {
margin-top: 4px;
}

View File

@ -30,6 +30,17 @@
<el-button size="small" type="primary" plain @click="triggerImportFileSelect">选择Excel</el-button>
<el-button size="small" type="primary" plain :loading="downloadTemplateLoading" @click="handleDownloadCreateTemplate">下载模板</el-button>
<el-button size="small" type="primary" plain :disabled="parseImportFileLoading" @click="addImportPreviewRow()">添加明细</el-button>
<el-button size="small" type="primary" plain @click="clearImportData">清除数据</el-button>
<el-button
size="small"
type="primary"
plain
:loading="exportSelectedLoading"
:disabled="!selectedPreviewRowCount"
@click="handleExportSelectedPreviewRows"
>
导出选中
</el-button>
<el-button
size="small"
type="primary"
@ -50,18 +61,6 @@
>
地址重识
</el-button>
<el-button size="small" type="primary" plain @click="clearImportData">清除数据</el-button>
<el-button
size="small"
type="primary"
plain
:loading="exportSelectedLoading"
:disabled="!selectedPreviewRowCount"
@click="handleExportSelectedPreviewRows"
>
导出选中
</el-button>
<el-button
size="small"
type="primary"
@ -380,10 +379,7 @@
</div>
</template>
<template #column-import_status="{ row }">
<el-tag v-if="row.import_status === '成功'" type="success" size="small">成功</el-tag>
<el-tag v-else-if="row.import_status === '失败'" type="danger" size="small">失败</el-tag>
<el-tag v-else-if="row.import_status === '待创建'" type="info" size="small">待创建</el-tag>
<span v-else>{{ row.import_status || '—' }}</span>
<span :class="getImportStatusTextClass(row.import_status)">{{ row.import_status || '—' }}</span>
</template>
<template #column-row_action="{ row }">
<el-button type="danger" link size="small" :disabled="isPreviewRowLocked(row)" @click="removeImportPreviewRow(row)">
@ -535,6 +531,7 @@ import {
} from '@/views/system/setting/expressinterface/express-interface-config'
import {
extractStoreListFromResponse,
getStatusTextClass,
mapStoreListToSelectOptions
} from '../config/order-common-config'
@ -607,11 +604,11 @@ type ImportPreviewRow = {
}
const importPreviewColumns = [
{ prop: 'row_no', label: '行号', width: '70', fixed: 'left' },
{ prop: 'row_no', label: '行号', width: '70', fixed: 'left', align: 'center' },
{ prop: '_issue', label: '异常', width: '60', fixed: 'left' },
{ prop: 'delivery_order_code', label: '发货单号', minWidth: '140', fixed: 'left' },
{ prop: 'store_id', label: '货主', minWidth: '160', fixed: 'left' },
{ prop: 'selected_items', label: '商品', minWidth: '110', fixed: 'left' },
{ prop: 'selected_items', label: '商品', minWidth: '110', fixed: 'left', align: 'center' },
{ prop: 'shop_nick', label: '自定义店铺*', minWidth: '140' },
{ prop: 'remark', label: '留言', minWidth: '140' },
{ prop: 'name', label: '收件人', minWidth: '100' },
@ -624,11 +621,21 @@ const importPreviewColumns = [
{ prop: 'logistics_code', label: '快递', minWidth: '140' },
{ prop: 'source_platform_code', label: '来源平台', minWidth: '140' },
{ prop: 'sys_platform_code', label: '平台', minWidth: '140' },
{ prop: 'import_status', label: '状态', width: '90' },
{ prop: 'import_status', label: '状态', width: '90', align: 'center' },
{ prop: 'import_message', label: '结果说明', minWidth: '180' },
{ prop: 'row_action', label: '操作', width: '70', fixed: 'right' }
{ prop: 'row_action', label: '操作', width: '70', fixed: 'right', align: 'center' }
]
/** 建单预览「状态」:与待处理订单「同步状态」一致,用轻量状态文字(ut-status-text)替代 el-tag */
function getImportStatusTextClass(status?: string) {
const tagTypeMap: Record<string, string> = {
成功: 'success',
失败: 'danger',
待创建: 'info'
}
return getStatusTextClass(tagTypeMap[String(status ?? '').trim()] || 'info')
}
let previewRowKeySeed = 1
const importOrderLoading = ref(false)
@ -656,7 +663,8 @@ const issuePreviewRows = computed(() =>
const issueRowsCount = computed(() => issuePreviewRows.value.length)
const normalRowsCount = computed(() => importPreviewRows.value.length - issueRowsCount.value)
const previewIssueFilterOptions = computed(() => [
{ label: `全部 (${importPreviewRows.value.length})`, value: 'all' as PreviewIssueFilter },
// 「全部」不加数量标识(默认选项,收起后显示更简洁)
{ label: '全部', value: 'all' as PreviewIssueFilter },
{ label: `有异常 (${issueRowsCount.value})`, value: 'issue' as PreviewIssueFilter },
{ label: `正常 (${normalRowsCount.value})`, value: 'normal' as PreviewIssueFilter }
])
@ -2677,6 +2685,18 @@ async function handleParseAddress() {
white-space: nowrap;
}
/* 状态文字:与待处理订单「同步状态」同一套轻量样式(同 styles/order-sub.scss) */
.ut-status-text {
font-size: 12px;
line-height: 18px;
white-space: nowrap;
}
.ut-status-text--primary { color: var(--el-color-primary); }
.ut-status-text--success { color: var(--el-color-success); }
.ut-status-text--warning { color: var(--el-color-warning); }
.ut-status-text--info { color: var(--el-color-info); }
.ut-status-text--danger { color: var(--el-color-danger); }
.unmatched-tip {
color: #f56c6c;
font-size: 11px;

View File

@ -59,8 +59,10 @@
</el-form-item>
</el-form>
<template #footer>
<el-button size="small" @click="weighingDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="weighingSaving" @click="submitWeighing">保存</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="weighingDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="weighingSaving" @click="submitWeighing">保存</el-button>
</div>
</template>
</el-dialog>
@ -241,6 +243,18 @@ watch(
</script>
<style scoped lang="scss">
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
justify-content: flex-end;
gap: 6px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
.express-waybill-panel {
height: 100%;
display: flex;

View File

@ -89,10 +89,12 @@
</div>
<template #footer>
<el-button size="small" @click="emit('update:visible', false)">取消</el-button>
<el-button size="small" type="primary" :loading="loading" :disabled="selected.length === 0" @click="handleConfirm">
导出
</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="emit('update:visible', false)">取消</el-button>
<el-button size="small" type="primary" :loading="loading" :disabled="selected.length === 0" @click="handleConfirm">
导出
</el-button>
</div>
</template>
</el-dialog>
</template>
@ -269,6 +271,18 @@ function handleConfirm() {
</script>
<style scoped lang="scss">
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
justify-content: flex-end;
gap: 6px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
.export-columns-dialog {
.export-columns-summary {
display: grid;

View File

@ -36,8 +36,10 @@
</el-form>
<template #footer>
<el-button size="small" @click="handleClose">取消</el-button>
<el-button size="small" type="primary" :loading="submitting" @click="handleSubmit">确认审核</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="handleClose">取消</el-button>
<el-button size="small" type="primary" :loading="submitting" @click="handleSubmit">确认审核</el-button>
</div>
</template>
</el-dialog>
</template>
@ -100,3 +102,17 @@ function handleSubmit() {
emit('submit', { ...form })
}
</script>
<style scoped lang="scss">
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
justify-content: flex-end;
gap: 6px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
</style>

View File

@ -106,8 +106,10 @@
</div>
<template #footer>
<el-button size="small" @click="visible = false">取消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="visible = false">取消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button>
</div>
</template>
</el-dialog>
</template>
@ -517,6 +519,18 @@ function handleConfirm() {
</script>
<style scoped lang="scss">
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
justify-content: flex-end;
gap: 6px;
:deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
}
.select-product-meta {
display: flex;
align-items: center;

View File

@ -51,10 +51,10 @@
<el-table-column label="订单ID" width="100" align="center">
<template #default="{ row }">{{ row.order_id ?? '-' }}</template>
</el-table-column>
<el-table-column label="发货单号" min-width="170" show-overflow-tooltip>
<el-table-column label="发货单号" min-width="170" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.delivery_order_code || '-' }}</template>
</el-table-column>
<el-table-column label="运单号" min-width="170" show-overflow-tooltip>
<el-table-column label="运单号" min-width="170" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.waybill_codes || '-' }}</template>
</el-table-column>
<el-table-column label="拦截状态" width="130" align="center">
@ -62,7 +62,7 @@
</el-table-column>
<el-table-column label="能否转换" width="150" align="center">
<template #default="{ row }">
<el-tag size="small" :type="row.tagType">{{ row.tagText }}</el-tag>
<span :class="getStatusTextClass(row.tagType)">{{ row.tagText }}</span>
</template>
</el-table-column>
</el-table>
@ -213,7 +213,7 @@ import type {
ReturnUnpackTransferByOrdersSkippedItem,
ReturnUnpackTransferByOrdersSuccessItem,
} from '@/api/returnunpack'
import { translateInterceptStatus } from '../config/order-common-config'
import { getStatusTextClass, translateInterceptStatus } from '../config/order-common-config'
/**
* 配送订单批量转退回拆包单(returnUnpack.transferByOrders)
@ -413,6 +413,18 @@ async function copyIds(list: Array<{ order_id?: number | string }>, label: strin
</script>
<style scoped lang="scss">
/* 状态文字颜色:与待处理订单「同步状态」同一套轻量样式(定义同 styles/order-sub.scss) */
.ut-status-text {
font-size: 12px;
line-height: 18px;
white-space: nowrap;
}
.ut-status-text--primary { color: var(--el-color-primary); }
.ut-status-text--success { color: var(--el-color-success); }
.ut-status-text--warning { color: var(--el-color-warning); }
.ut-status-text--info { color: var(--el-color-info); }
.ut-status-text--danger { color: var(--el-color-danger); }
/* 面板结构 / 尺寸对齐 TaskProgressPanel(手工录入运单号) */
.task-panel {
display: flex;
@ -599,7 +611,8 @@ async function copyIds(list: Array<{ order_id?: number | string }>, label: strin
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -267,16 +267,16 @@
empty-text="无"
@selection-change="onSubWaybillSelectChange"
>
<el-table-column type="selection" width="48" />
<el-table-column prop="waybill_code" label="运单号" min-width="190" show-overflow-tooltip />
<el-table-column type="selection" width="48" align="center" />
<el-table-column prop="waybill_code" label="运单号" min-width="190" align="center" show-overflow-tooltip />
<el-table-column label="类型" width="80" align="center">
<template #default="{ row }">
<el-tag :type="row.is_main ? 'info' : 'success'" size="small">
<span :class="row.is_main ? 'ut-status-text ut-status-text--info' : 'ut-status-text ut-status-text--success'">
{{ row.is_main ? '主单' : '子单' }}
</el-tag>
</span>
</template>
</el-table-column>
<el-table-column prop="logistics_name" label="物流公司" min-width="130" show-overflow-tooltip />
<el-table-column prop="logistics_name" label="物流公司" min-width="130" align="center" show-overflow-tooltip />
</el-table>
</div>
</div>
@ -972,7 +972,8 @@ function handleToolbarButtonClick(action: ToolbarButtonConfig['action']) {
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -1260,11 +1260,16 @@ function onBatchPrintSuccess() {
}
}
/* 标签列固定宽度(含必填星号占位):对齐「手工录入运单号」表单 */
&__field-label {
flex: none;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
text-align: left;
white-space: nowrap;
}
@ -1310,7 +1315,8 @@ function onBatchPrintSuccess() {
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -9,8 +9,10 @@
>
<p class="allocate-confirm-text">是否确认分配?</p>
<template #footer>
<el-button size="small" @click="visible = false">取消</el-button>
<el-button size="small" type="primary" :loading="loading" @click="emit('submit')">确认</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="visible = false">取消</el-button>
<el-button size="small" type="primary" :loading="loading" @click="emit('submit')">确认</el-button>
</div>
</template>
</el-dialog>
</template>
@ -35,4 +37,16 @@ const emit = defineEmits<{
line-height: 1.6;
color: #303133;
}
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
justify-content: flex-end;
gap: 6px;
}
.dialog-footer-actions :deep(.el-button) {
margin-left: 0;
margin-right: 0;
}
</style>

View File

@ -58,9 +58,10 @@
</el-form>
</div>
</div>
<!-- <p class="task-panel__form-tip">
<!-- 提示条:对齐「手工录入运单号」表单的 .task-panel__form-tip -->
<p class="task-panel__form-tip">
子单号数量需为不小于 1 的整数,提交后按填写的数量为该订单分配子单号。
</p> -->
</p>
</div>
<footer class="task-panel__foot">
@ -234,15 +235,35 @@ function handleClosed() {
.task-panel__field-label {
padding-top: 7px;
&.is-required::before {
top: 7px;
}
}
}
}
/* 标签列固定宽度(含必填星号占位):保证输入框左边缘与上方静态信息行的标签列对齐 */
&__field-label {
position: relative;
flex: 0 0 88px;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
text-align: left;
white-space: nowrap;
&.is-required::before {
content: '*';
position: absolute;
left: 0;
top: 0;
line-height: 20px;
color: #f56c6c;
}
}
&__field-value {
@ -298,7 +319,8 @@ function handleClosed() {
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -46,16 +46,16 @@
<span class="task-panel__section-title">订单预览</span>
<div class="task-panel__table-wrap">
<el-table :data="selectedRows" border size="small" max-height="160" empty-text="无">
<el-table-column prop="id" label="订单 ID" width="96" />
<el-table-column prop="delivery_order_code" label="发货单号" min-width="150" show-overflow-tooltip />
<el-table-column label="复核状态" width="96">
<el-table-column prop="id" label="订单 ID" width="96" align="center" />
<el-table-column prop="delivery_order_code" label="发货单号" min-width="150" align="center" show-overflow-tooltip />
<el-table-column label="复核状态" width="96" align="center">
<template #default="{ row }">
{{ translateRecheckStatus(row) }}
<span :class="getRecheckStatusClass(row)">{{ translateRecheckStatus(row) }}</span>
</template>
</el-table-column>
<el-table-column label="拣货状态" width="96">
<el-table-column label="拣货状态" width="96" align="center">
<template #default="{ row }">
{{ translatePickStatus(row) }}
<span :class="getPickStatusClass(row)">{{ translatePickStatus(row) }}</span>
</template>
</el-table-column>
</el-table>
@ -63,9 +63,10 @@
</div>
</div>
<!-- <p class="task-panel__form-tip">
<!-- 提示条:对齐「手工录入运单号」表单的 .task-panel__form-tip -->
<p class="task-panel__form-tip">
对每个订单执行前置检查(已分配储位、已分配快递、已同步且未被拦截),必要时自动完成拣货后标记发货;各订单独立事务,支持部分失败。
</p> -->
</p>
<div v-if="result" class="recheck-result">
<div class="result-summary">
@ -75,17 +76,17 @@
<el-tabs v-model="resultTab" class="result-tabs">
<el-tab-pane :label="`成功 (${result.success.length})`" name="success">
<el-table :data="normalizeResultRows(result.success)" border size="small" max-height="220" empty-text="无">
<el-table-column prop="order_id" label="订单 ID" width="100" />
<el-table-column prop="waybill_no" label="运单号" min-width="140" show-overflow-tooltip />
<el-table-column prop="message" label="说明" min-width="160" show-overflow-tooltip />
<el-table-column prop="order_id" label="订单 ID" width="100" align="center" />
<el-table-column prop="waybill_no" label="运单号" min-width="140" align="center" show-overflow-tooltip />
<el-table-column prop="message" label="说明" min-width="160" align="center" show-overflow-tooltip />
</el-table>
</el-tab-pane>
<el-tab-pane :label="`失败 (${result.failed.length})`" name="failed">
<el-table :data="normalizeResultRows(result.failed)" border size="small" max-height="220" empty-text="无">
<el-table-column prop="order_id" label="订单 ID" width="100" />
<el-table-column prop="waybill_no" label="运单号" min-width="140" show-overflow-tooltip />
<el-table-column prop="reason" label="原因" min-width="180" show-overflow-tooltip />
<el-table-column prop="message" label="说明" min-width="160" show-overflow-tooltip />
<el-table-column prop="order_id" label="订单 ID" width="100" align="center" />
<el-table-column prop="waybill_no" label="运单号" min-width="140" align="center" show-overflow-tooltip />
<el-table-column prop="reason" label="原因" min-width="180" align="center" show-overflow-tooltip />
<el-table-column prop="message" label="说明" min-width="160" align="center" show-overflow-tooltip />
</el-table>
</el-tab-pane>
</el-tabs>
@ -111,7 +112,7 @@ import {
batchQuickRecheck,
type BatchQuickRecheckResponse
} from '@/api/order.recheckorder/recheckOrder'
import { translateOrderField } from '../config/order-common-config'
import { getStatusTextClass, getTagType, translateOrderField } from '../config/order-common-config'
import { resolveOrderRecheckStatus } from '../utils/order-index-helpers'
export type BatchQuickRecheckPreviewRow = {
@ -192,6 +193,16 @@ function translatePickStatus(row: BatchQuickRecheckPreviewRow) {
return translateOrderField('pick_status', row.pick_status)
}
/** 复核状态文字颜色:与待处理订单「复核状态」相同(ut-status-text) */
function getRecheckStatusClass(row: BatchQuickRecheckPreviewRow) {
return getStatusTextClass(getTagType('recheck_status', resolveOrderRecheckStatus(row)))
}
/** 拣货状态文字颜色:与待处理订单「拣货状态」相同(ut-status-text) */
function getPickStatusClass(row: BatchQuickRecheckPreviewRow) {
return getStatusTextClass(getTagType('pick_status', row.pick_status))
}
function fillSuggestedIds() {
if (!suggestedIds.value.length) return
form.idsText = suggestedIds.value.join(', ')
@ -282,6 +293,18 @@ async function handleSubmit() {
</script>
<style scoped lang="scss">
/* 状态文字颜色:与待处理订单「同步状态」同一套轻量样式(定义同 styles/order-sub.scss) */
.ut-status-text {
font-size: 12px;
line-height: 18px;
white-space: nowrap;
}
.ut-status-text--primary { color: var(--el-color-primary); }
.ut-status-text--success { color: var(--el-color-success); }
.ut-status-text--warning { color: var(--el-color-warning); }
.ut-status-text--info { color: var(--el-color-info); }
.ut-status-text--danger { color: var(--el-color-danger); }
/* 面板结构 / 尺寸对齐手工录入运单号(TaskProgressPanel) */
.task-panel {
background: #fff;
@ -372,11 +395,16 @@ async function handleSubmit() {
}
&__field-label {
flex: none;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
text-align: left;
white-space: nowrap;
flex-shrink: 0;
}
&__field-value {
@ -431,7 +459,8 @@ async function handleSubmit() {
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -145,11 +145,16 @@ const emit = defineEmits<{
}
&__field-label {
flex: none;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
text-align: left;
white-space: nowrap;
flex-shrink: 0;
}
&__field-value {
@ -186,7 +191,8 @@ const emit = defineEmits<{
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -236,11 +236,17 @@ function handleClosed() {
}
}
/* 标签列固定宽度(含必填星号占位):输入框左边缘与上方静态信息行的标签列对齐 */
&__field-label {
position: relative;
flex: 0 0 88px;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
text-align: left;
}
&__field-value {
@ -296,7 +302,8 @@ function handleClosed() {
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -24,10 +24,6 @@
</header>
<div class="task-panel__body">
<p class="task-panel__form-tip">
仅允许修改 post_status='none'(未分配快递)的订单;至少填写一项地址字段,空白字段不会更新到订单。
</p>
<div class="task-panel__form">
<div class="task-panel__field">
<span class="task-panel__field-label">已选订单数</span>
@ -143,6 +139,10 @@
</div>
</div>
</div>
<!-- 提示条:对齐「手工录入运单号」表单的 .task-panel__form-tip -->
<p class="task-panel__form-tip">
仅允许修改 post_status='none'(未分配快递)的订单;至少填写一项地址字段,空白字段不会更新到订单。
</p>
</div>
<footer class="task-panel__foot">
@ -339,17 +339,35 @@ function handleAreaChange(code: string) {
.task-panel__field-label {
padding-top: 7px;
&.is-required::before {
top: 7px;
}
}
}
}
/* 标签列固定宽度(含必填星号占位):保证各输入框左边缘对齐、长度一致 */
&__field-label {
position: relative;
flex: 0 0 88px;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
width: 72px;
text-align: left;
white-space: nowrap;
&.is-required::before {
content: '*';
position: absolute;
left: 0;
top: 0;
line-height: 20px;
color: #f56c6c;
}
}
&__field-value {
@ -365,7 +383,7 @@ function handleAreaChange(code: string) {
}
&__form-tip {
margin: 0 0 8px;
margin: 8px 0 0;
padding: 8px 12px;
border-radius: 4px;
background: #f4f4f5;
@ -391,7 +409,8 @@ function handleAreaChange(code: string) {
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -55,9 +55,10 @@
</div>
</div>
</div>
<!-- <p class="task-panel__form-tip">
<!-- 提示条:对齐「手工录入运单号」表单的 .task-panel__form-tip -->
<p class="task-panel__form-tip">
支持下拉选择或直接输入{{ mode === 'express' ? '快递编码' : '平台编码' }},提交后仅更新已选订单。
</p> -->
</p>
</div>
<footer class="task-panel__foot">
@ -186,20 +187,33 @@ const codeProxy = computed({
.task-panel__field-label {
padding-top: 7px;
&.is-required::before {
top: 7px;
}
}
}
}
/* 标签列固定宽度(含必填星号占位):输入框左边缘与上方静态信息行的标签列对齐 */
&__field-label {
position: relative;
flex: 0 0 88px;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
text-align: left;
&.is-required::before {
content: '*';
position: absolute;
left: 0;
top: 0;
line-height: 20px;
color: #f56c6c;
margin-right: 4px;
}
}
@ -208,6 +222,7 @@ const codeProxy = computed({
font-weight: 500;
color: #303133;
text-align: right;
word-break: break-all;
}
&__field-control {
@ -241,7 +256,8 @@ const codeProxy = computed({
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -44,9 +44,10 @@
</div>
</div>
</div>
<!-- <p class="task-panel__form-tip">
<!-- 提示条:对齐「手工录入运单号」表单的 .task-panel__form-tip -->
<p class="task-panel__form-tip">
批量覆盖所选订单的备注/留言,不受 post_status 限制;更新成功后写入操作日志。
</p> -->
</p>
</div>
<footer class="task-panel__foot">
@ -172,22 +173,34 @@ const emit = defineEmits<{
.task-panel__field-label {
padding-top: 7px;
&.is-required::before {
top: 7px;
}
}
}
}
/* 标签列固定宽度(含必填星号占位):保证各输入框左边缘对齐、长度一致 */
&__field-label {
position: relative;
flex: 0 0 88px;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
width: 72px;
text-align: left;
white-space: nowrap;
&.is-required::before {
content: '*';
position: absolute;
left: 0;
top: 0;
line-height: 20px;
color: #f56c6c;
margin-right: 4px;
}
}
@ -229,7 +242,8 @@ const emit = defineEmits<{
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -1257,11 +1257,16 @@ async function handleConfirmInterceptBatch() {
}
}
/* 标签列固定宽度(含必填星号占位):对齐「手工录入运单号」表单 */
&__field-label {
flex: none;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
text-align: left;
white-space: nowrap;
}
@ -1307,7 +1312,8 @@ async function handleConfirmInterceptBatch() {
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -416,8 +416,10 @@
@current-change="handleGroupOrderPageChange"
@size-change="handleGroupOrderPageSizeChange"
/>
<el-button size="small" @click="groupOrderDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="groupOrderSubmitting" @click="submitGroupOrderDialog">抓取选中结构</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="groupOrderDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="groupOrderSubmitting" @click="submitGroupOrderDialog">抓取选中结构</el-button>
</div>
</div>
</template>
</el-dialog>
@ -867,10 +869,12 @@
</el-form-item>
</el-form>
<template #footer>
<el-button size="small" @click="waveStrategyFormDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="waveStrategyFormSubmitting" @click="submitWaveStrategyForm">
保存
</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="waveStrategyFormDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="waveStrategyFormSubmitting" @click="submitWaveStrategyForm">
保存
</el-button>
</div>
</template>
</el-dialog>
@ -4161,6 +4165,20 @@ async function submitFallbackOrderFetchByIds() {
<style scoped lang="scss">
@use "../orderManagement/styles/order-sub.scss";
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 6px;
/* 仅重置直接子按钮外边距,避免与 gap 叠加 */
> .el-button {
margin-left: 0;
margin-right: 0;
}
}
/* 详情区外壳不留上/下间距(波次明细组件自带 padding: 6px 10px 8px),只留左右 10px */
.order-sub-container .main-content .lower-level .detail-container {
padding: 0 10px;

View File

@ -408,8 +408,10 @@
</div>
</div>
<template #footer>
<el-button size="small" @click="groupOrderDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="groupOrderSubmitting" @click="submitGroupOrderDialog">抓取选中结构</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="groupOrderDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="groupOrderSubmitting" @click="submitGroupOrderDialog">抓取选中结构</el-button>
</div>
</template>
</el-dialog>
@ -2817,6 +2819,20 @@ async function submitGroupOrderDialog() {
<style scoped lang="scss">
@use "../orderManagement/styles/order-sub.scss";
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 6px;
/* 仅重置直接子按钮外边距,避免与 gap 叠加 */
> .el-button {
margin-left: 0;
margin-right: 0;
}
}
/* 详情区外壳不留上/下间距(波次明细组件自带 padding: 6px 10px 8px),只留左右 10px */
.order-sub-container .main-content .lower-level .detail-container {
padding: 0 10px;

View File

@ -384,10 +384,12 @@
</el-form>
</div>
<template #footer>
<el-button size="small" @click="waveStrategyFormDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="waveStrategyFormSubmitting" @click="submitWaveStrategyForm">
保存
</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="waveStrategyFormDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="waveStrategyFormSubmitting" @click="submitWaveStrategyForm">
保存
</el-button>
</div>
</template>
</el-dialog>
</div>
@ -1106,6 +1108,20 @@ onMounted(() => {
<style scoped lang="scss">
@use "../orderManagement/styles/order-sub.scss";
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 6px;
/* 仅重置直接子按钮外边距,避免与 gap 叠加 */
> .el-button {
margin-left: 0;
margin-right: 0;
}
}
.wave-operation-actions {
display: flex;
flex-wrap: wrap;

View File

@ -40,6 +40,8 @@
size="default"
placeholder="扫描或输入面单号后回车"
clearable
maxlength="64"
show-word-limit
:disabled="submitting"
@keyup.enter="handleSubmit"
/>
@ -255,7 +257,7 @@ async function handleSubmit() {
/* 面单号输入行:不需要灰色容器,与上方静态信息行拉开层次 */
&--input {
align-items: center;
align-items: flex-start;
min-height: 0;
/* 左 12px 与上方标签对齐;右 0 让输入框右边顶到灰色容器右边缘 */
padding: 4px 0 0 12px;
@ -263,6 +265,10 @@ async function handleSubmit() {
border-radius: 0;
background: transparent;
.task-panel__field-label {
padding-top: 7px;
}
.el-input {
flex: 1;
min-width: 0;
@ -276,11 +282,16 @@ async function handleSubmit() {
}
}
/* 标签列固定宽度(含必填星号占位):对齐「手工录入运单号」表单 */
&__field-label {
flex: none;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
line-height: 20px;
color: #606266;
flex-shrink: 0;
text-align: left;
white-space: nowrap;
}
@ -329,7 +340,8 @@ async function handleSubmit() {
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;

View File

@ -76,9 +76,11 @@
</div>
<template #footer>
<el-button size="small" @click="visibleProxy = false">关闭</el-button>
<el-button size="small" :disabled="!payload || loading" @click="copyJson">复制 JSON</el-button>
<el-button size="small" type="primary" :disabled="!payload || loading" @click="printReport">浏览器打印</el-button>
<div class="dialog-footer-actions">
<el-button size="small" @click="visibleProxy = false">关闭</el-button>
<el-button size="small" :disabled="!payload || loading" @click="copyJson">复制 JSON</el-button>
<el-button size="small" type="primary" :disabled="!payload || loading" @click="printReport">浏览器打印</el-button>
</div>
</template>
</el-dialog>
</template>
@ -254,6 +256,19 @@ function escapeHtml(s: string) {
</script>
<style scoped lang="scss">
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 6px;
> .el-button {
margin-left: 0;
margin-right: 0;
}
}
.wave-print-loading {
display: flex;
align-items: center;

View File

@ -274,38 +274,40 @@
<div v-else class="wave-print-muted">(无数据)</div>
<template #footer>
<el-button size="small" @click="visibleProxy = false">关闭</el-button>
<el-button size="small" type="primary" plain @click="printerComponentConnectionVisible = true">
打印组件连接
</el-button>
<el-button-group>
<el-button
size="small"
type="primary"
:loading="printMode === 'station' ? stationPrinting : browserPrinting"
:disabled="!payload || (printMode === 'station' ? (!printSettings.station || !hasWaveGroups) : (!hasWaveGroups || !allComponentsConnected))"
@click="handlePrint"
>
打印
<div class="dialog-footer-actions">
<el-button size="small" @click="visibleProxy = false">关闭</el-button>
<el-button size="small" type="primary" plain @click="printerComponentConnectionVisible = true">
打印组件连接
</el-button>
<el-dropdown trigger="click" @command="handlePrintModeSwitch">
<el-button-group>
<el-button
size="small"
type="primary"
:disabled="!payload"
>▾</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="station" :class="{ 'is-active': printMode === 'station' }">
打印到打印台 {{ printMode === 'station' ? '✓' : '' }}
</el-dropdown-item>
<el-dropdown-item command="browser" :class="{ 'is-active': printMode === 'browser' }">
浏览器打印 {{ printMode === 'browser' ? '✓' : '' }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</el-button-group>
:loading="printMode === 'station' ? stationPrinting : browserPrinting"
:disabled="!payload || (printMode === 'station' ? (!printSettings.station || !hasWaveGroups) : (!hasWaveGroups || !allComponentsConnected))"
@click="handlePrint"
>
打印
</el-button>
<el-dropdown trigger="click" @command="handlePrintModeSwitch">
<el-button
size="small"
type="primary"
:disabled="!payload"
>▾</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="station" :class="{ 'is-active': printMode === 'station' }">
打印到打印台 {{ printMode === 'station' ? '✓' : '' }}
</el-dropdown-item>
<el-dropdown-item command="browser" :class="{ 'is-active': printMode === 'browser' }">
浏览器打印 {{ printMode === 'browser' ? '✓' : '' }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</el-button-group>
</div>
</template>
<el-dialog
@ -1461,6 +1463,20 @@ async function printReport() {
</script>
<style scoped lang="scss">
/* 弹窗底部按钮间距:对齐工具栏按钮组(OrderToolbarButtonGroup)gap 6px */
.dialog-footer-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 6px;
/* 仅重置直接子按钮外边距,避免破坏 el-button-group 内部拼接 */
> .el-button {
margin-left: 0;
margin-right: 0;
}
}
.wave-platform-print-dialog :deep(.el-dialog) {
max-height: 80vh;
display: flex;

View File

@ -206,7 +206,7 @@
:close-on-click-modal="false"
>
<!-- 面板结构对齐「手工录入运单号」(TaskProgressPanel) -->
<div class="task-panel">
<div class="task-panel task-panel--reject">
<header class="task-panel__head">
<div class="task-panel__titles">
<h2>批量驳回收货单</h2>
@ -235,9 +235,10 @@
/>
</div>
</div>
<!-- <p class="task-panel__form-tip">
<!-- 提示条:对齐「手工录入运单号」表单的 .task-panel__form-tip -->
<p class="task-panel__form-tip">
驳回理由为选填项,填写后会覆盖收货单原备注;驳回后不可撤销。
</p> -->
</p>
</div>
<footer class="task-panel__foot">
@ -2013,7 +2014,8 @@ async function handleExportAll() {
&__actions {
display: flex;
align-items: center;
gap: 8px;
/* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */
gap: 6px;
:deep(.el-button) {
margin-left: 0;
@ -2021,6 +2023,17 @@ async function handleExportAll() {
}
}
}
/* 批量驳回收货单:标签列固定宽度,对齐「手工录入运单号」表单(不影响匹配入库弹窗) */
.task-panel--reject {
.task-panel__field-label {
flex: none;
width: 88px;
padding-left: 10px;
box-sizing: border-box;
text-align: left;
}
}
</style>
<style lang="scss">

View File

@ -11,7 +11,7 @@
- 商品行(scope_type=goods,type=store/goods):一行一个库存商品(商品快照 + 已盘聚合);
行级聚合(checked_quantity/diff_quantity)**已含未知商品**,故不再平铺 unknown_items,
改为在「商品名称」列提示「含未知商品 N 项」,避免合计重复展示
- 库位行(scope_type=location,type=all/location):一行一个库位 + 行内商品各一行
- 库位行(scope_type=location,type=location):一行一个库位 + 行内商品各一行
(result 的 stocks[] 平铺)+ **未知商品各一行**(unknown_items 平铺,带「未知」标记);
行级合计不单独展示(只展示明细),所以平铺不会重复
2. 盘点作业:行内上报(stock.check.report,**覆盖式**:同明细+同商品+同库位重复上报为更新)
@ -220,7 +220,7 @@
import { computed, nextTick, reactive, ref, watch } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
import { formatTime, isCheckApiSuccess, isLocationScopeType, translate } from '../template-config'
import { formatTime, isCheckApiSuccess, isLegacyAllCheckType, isLocationScopeType, translate } from '../template-config'
import UpperTable from '@/components/UpperTable/index.vue'
import RecordImages from './RecordImages.vue'
import CheckReportDialog from './CheckReportDialog.vue'
@ -257,13 +257,19 @@ const taskStatus = computed(() => String(props.row?.status ?? ''))
* created/rejected:可添加明细
* - 商品类:addDetail 传 stock_ids
* - 库位类:勾选库位走 addLocationDetail(location_ids)/ 手填编码走 addDetail(locations)
*
* ⚠️ type=all 已下线(2026-10-27):历史全盘任务调 addDetail 返回 400 → 不给入口
*/
const canAddItems = computed(() => ['created', 'rejected'].includes(taskStatus.value))
const canAddItems = computed(
() =>
['created', 'rejected'].includes(taskStatus.value) &&
!isLegacyAllCheckType(props.row?.type)
)
/** approved/checking:可上报实盘、可完成 */
const canReport = computed(() => ['approved', 'checking'].includes(taskStatus.value))
/** completed:可导出盘点明细(stock.check.exportDetail) */
const isCompleted = computed(() => taskStatus.value === 'completed')
/** 库位类任务(type=all/location):明细为「库位行」,上报需带 stock_id → 在展开行里按商品上报 */
/** 库位类任务(type=location,历史 all 同属库位行):明细为「库位行」,上报需带 stock_id → 在展开行里按商品上报 */
const isLocationTask = computed(() => isLocationScopeType(props.row?.type))
/** 盲盘:账面数量前端不可见 */
const isBlind = computed(() => String(props.row?.mode ?? '') === 'blind')
@ -406,11 +412,15 @@ const flatRows = computed<Record<string, any>[]>(() => {
/** 本次上报目标:商品行只带明细;库位行还需带 stock_id */
type ReportTarget = { item: Record<string, any>; stock?: Record<string, any> }
const emptyText = computed(() =>
canAddItems.value
? `暂无盘点明细,可点击「${isLocationTask.value ? '添加库位' : '添加商品'}」生成明细`
: '暂无盘点明细'
)
const emptyText = computed(() => {
if (isLegacyAllCheckType(props.row?.type)) {
return '该任务为已下线的「全盘(all)」类型,无法再添加明细(请新建「按库位」盘点任务)'
}
if (canAddItems.value) {
return `暂无盘点明细,可点击「${isLocationTask.value ? '添加库位' : '添加商品'}」生成明细`
}
return '暂无盘点明细'
})
/** 表格勾选行(UpperTable selection-change) */
const selectedRows = ref<Record<string, any>[]>([])

View File

@ -25,7 +25,7 @@
开启时单行刷新会退化为整表刷新(行的去留只有服务端知道)
⚠️ **视图不是自由入参**(`view` 已废弃,传了也被忽略),由「任务范围 + `is_goods`」解析:
- 库位任务(type=all/location)→ **固定 location**(库位结构),页面不提供切换
- 库位任务(type=location,历史 all 同属库位结构)→ **固定 location**(库位结构),页面不提供切换
- 商品任务(type=store/goods)→ 默认 **space**(聚合库位,按拣货路径);
切「商品结构」时传 `is_goods: true` 得 goods 视图
@ -436,7 +436,7 @@ const isBlind = computed(() => String(props.row?.mode ?? '') === 'blind')
*/
const canLoad = computed(() => ['approved', 'checking'].includes(taskStatus.value))
/** 库位类任务(type=all/location):视图固定 location,后端无视 is_goods */
/** 库位类任务(type=location):视图固定 location,后端无视 is_goods */
const isLocationTask = computed(() => isLocationScopeType(props.row?.type))
/**

View File

@ -208,12 +208,15 @@ export const VALUE_MAPS: Record<string, Record<string, string>> = {
},
/**
* 盘点范围 type
* 决定明细行形态:all/location=库位行(一行一个库位,行内按商品聚合)
* 决定明细行形态:location=库位行(一行一个库位,行内按商品聚合)
* store/goods=商品行(一行一个库存商品)
*
* ⚠️ `all` 已下线(2026-10-27,create/addDetail 传入返回 400):保留该映射**仅用于翻译历史行**,
* 不再作为新建/筛选选项(筛选选项见 getCheckTypeFilterOptions)。
*/
type: {
all: '按库位(默认全仓)',
location: '按库位(指定库位)',
all: '按库位(全盘·已下线)',
location: '按库位',
store: '按货主按商品',
goods: '按商品'
},
@ -242,19 +245,39 @@ export function getOptions(field: string): { label: string; value: string }[] {
}
/**
* 是否为「库位类」盘点范围(all / location)
* 盘点范围**筛选**选项:排除已下线的 `all`(documented enum = location/store/goods)
*/
export function getCheckTypeFilterOptions(): { label: string; value: string }[] {
return getOptions('type').filter((opt) => opt.value !== 'all')
}
/**
* 是否为「库位类」盘点范围(location;历史 `all` 也归入此类便于渲染旧任务)
*
* 决定明细行形态与添加明细的入参:
* - true → 明细为「库位行」(scope_type=location),三条通道:
* ① 勾选库位 → addLocationDetail 传 location_ids(库位ID直查)
* ② 手填编码 → addDetail 传 locations(库位编码,兼容通道)
* ③ type=all 且都不传 → addDetail 不传库位,后端自动生成全仓盘点范围
* ③ 都不传 → addDetail 不传库位,后端自动拉取全仓启用库位生成盘点范围
* - false → 明细为「商品行」(scope_type=goods),addDetail 传 stock_ids
*
* ⚠️ `all` 已下线(2026-10-27):仅为兼容**历史任务行**的展示/明细行形态判断而保留,
* 这类任务不能再添加明细(见 isLegacyAllCheckType)。
*/
export function isLocationScopeType(type: unknown): boolean {
return ['all', 'location'].includes(String(type ?? ''))
}
/**
* 是否为**已下线**的历史「全盘(all)」任务
*
* 2026-10-27 文档:`type=all` 已下线(语义并入 location),create 传 all 返回 400,
* 对历史 all 任务调 addDetail 同样返回 400 → 这类任务只保留查看,不再提供「添加明细」入口。
*/
export function isLegacyAllCheckType(type: unknown): boolean {
return String(type ?? '').trim().toLowerCase() === 'all'
}
/** 翻译 value → label */
export function translate(field: string, value: any): string {
const map = VALUE_MAPS[field]
@ -417,8 +440,8 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
type: {
key: 'type',
label: '盘点范围',
// 范围筛选(value 为英文枚举,直接作为 where.type 回传)
scanBox: { type: 'select', group: SCANBOX_GROUPS.basic, options: getOptions('type') },
// 范围筛选(value 为英文枚举,直接作为 where.type 回传);已下线的 all 不作为筛选项
scanBox: { type: 'select', group: SCANBOX_GROUPS.basic, options: getCheckTypeFilterOptions() },
table: { minWidth: 100, align: 'center' },
slot: { type: 'tag', tagType: 'info', translateField: 'type' }
},
@ -1152,11 +1175,13 @@ const OPERATION_BUTTONS: OperationButtonConfig[] = [
{
key: 'addItems',
label: '添加商品',
// 库位类任务(all/location)明细为库位行 → 文案换成「添加库位」
// 库位类任务(location,含历史 all)明细为库位行 → 文案换成「添加库位」
labelWhen: (row) => (isLocationScopeType(row?.type) ? '添加库位' : '添加商品'),
actionType: 'action',
type: 'primary',
visibleWhen: (row) => EDITABLE_STATUSES.includes(row?.status)
// ⚠️ type=all 已下线:对历史 all 任务调 addDetail 返回 400 → 不给入口
visibleWhen: (row) =>
EDITABLE_STATUSES.includes(row?.status) && !isLegacyAllCheckType(row?.type)
},
{
key: 'submitCheck',

View File

@ -1008,7 +1008,7 @@ const patternVisible = ref(false)
const pickerVisible = ref(false)
const pickerTask = ref<Record<string, any> | null>(null)
const pickerTaskId = computed(() => Number(pickerTask.value?.id) || 0)
/** 任务范围类型:all/location=库位类(添加库位);store/goods=商品类(添加商品) */
/** 任务范围类型:location=库位类(添加库位);store/goods=商品类(添加商品);all 已下线 */
const pickerTaskType = computed(() => String(pickerTask.value?.type ?? ''))
const pickerTaskLabel = computed(() => {
const task = pickerTask.value

View File

@ -3,11 +3,12 @@
字段说明(接口文档):
- title 盘点名称,非必填
- type 盘点范围:all 按库位(缺省,未传库位时后端自动拉取全仓启用库位)
/ location 按库位(指定库位)/ store 按货主按商品 / goods 按商品
—— all/location 生成「库位明细行」,store/goods 生成「商品明细行」
- type 盘点范围:location 按库位(**缺省**;不选库位时后端自动拉取全仓启用库位)
/ store 按货主按商品 / goods 按商品
—— location 生成「库位明细行」,store/goods 生成「商品明细行」
⚠️ all 已下线(2026-10-27,传入返回 400),原「全盘」语义已并入 location
- mode 盘点方式:open 明盘 / blind 盲盘
—— 库位类(all / location)固定为 blind 盲盘且不可更改;商品类(store / goods)默认明盘
—— 库位类(location)固定为 blind 盲盘且不可更改;商品类(store / goods)默认明盘
- store_id 货主ID(type=store 时必填)
- remark 备注
盘点时间不在本表单维护:主表已无 check_date,start_time(首个盘点明细写入时间)/
@ -38,14 +39,13 @@
<el-form-item label="盘点范围" prop="type">
<el-radio-group v-model="form.type">
<el-radio value="all">按库位(默认全仓)</el-radio>
<el-radio value="location">按库位(指定库位)</el-radio>
<el-radio value="location">按库位</el-radio>
<el-radio value="store">按货主按商品</el-radio>
<el-radio value="goods">按商品</el-radio>
</el-radio-group>
<div class="type-tip">
{{ isLocationType
? '库位盘点:明细行为「库位」(一行一个库位,行内按商品聚合),创建后添加盘点库位。'
? '库位盘点:明细行为「库位」(一行一个库位,行内按商品聚合),创建后添加盘点库位;不选库位时由后端自动拉取全仓库启用库位。'
: '商品盘点:明细行为「商品」(一行一个库存商品),创建后从库存中挑选商品。' }}
</div>
</el-form-item>
@ -150,7 +150,7 @@ const form = reactive<{
remark: string
}>({
title: '',
type: 'all',
type: 'location',
store_id: undefined,
mode: 'blind',
remark: ''
@ -170,7 +170,7 @@ const rules: FormRules = {
const isLocationType = computed(() => isLocationScopeType(form.type))
/** 库位类盘点(all/location)固定盲盘、不可更改;切回商品类恢复默认明盘 */
/** 库位类盘点(location)固定盲盘、不可更改;切回商品类恢复默认明盘 */
watch(
() => form.type,
(type) => {
@ -183,9 +183,8 @@ const createAlertText = computed(() => {
if (!isLocationType.value) {
return '创建后为「空盘点单」,需再添加盘点商品并提交审核。'
}
return form.type === 'all'
? '创建后为「空盘点单」,需再添加盘点库位并提交审核;不选库位时由后端自动拉取全仓库启用库位生成盘点范围。'
: '创建后为「空盘点单」,需再添加盘点库位并提交审核。'
// all 已下线:库位类只有 location,「不选库位=全仓」的兜底口径也并入 location
return '创建后为「空盘点单」,需再添加盘点库位并提交审核;不选库位时由后端自动拉取全仓库启用库位生成盘点范围。'
})
function handleVisibleChange(value: boolean) {
@ -199,7 +198,7 @@ function handleClosed() {
function resetForm() {
form.title = ''
form.type = 'all'
form.type = 'location'
form.store_id = undefined
form.mode = 'blind'
form.remark = ''

View File

@ -8,10 +8,12 @@
· 无启用库存库位的商品不入明细,计入 invalid_stock_ids(提示为「无效商品」)
· **携带货主(taskStoreId>0,即 type=store 的任务)时,库存列表加 where.store_id 限定,
只显示该货主的商品**(与后端 addDetail 的货主一致性校验对齐,避免勾选后被判无效商品)
- 库位类(type=all/location):从库位列表(index.searchSpace)勾选库位 →
- 库位类(type=location):从库位列表(index.searchSpace)勾选库位 →
· 已勾选库位 → stock.check.addLocationDetail 传 location_ids(库位ID直查,不解析编码)
· 未勾选但手填了库位编码 → stock.check.addDetail 传 locations(兼容通道)
· 未勾选且未填且 type=all → stock.check.addDetail 不传库位,由后端自动拉取全仓启用库位
· 都不传 → stock.check.addDetail 不传库位,由后端自动拉取全仓启用库位(二次确认)
⚠️ `type=all` 已下线(2026-10-27):历史 all 任务列表已不给「添加明细」入口,
这里再做一道拦截(addDetail 对该类任务返回 400)
无效项提示:addLocationDetail → invalid_location_ids;addDetail → invalid_stock_ids / invalid_locations。
仅 created(新建)/ rejected(驳回)状态可添加,后端会校验。
@ -270,7 +272,7 @@ import {
stockCheckAddLocationDetail,
type StockCheckAddDetailParams
} from '@/api/stock.check/stock.check'
import { isCheckApiSuccess, isLocationScopeType } from '../config/template-config'
import { isCheckApiSuccess, isLegacyAllCheckType, isLocationScopeType } from '../config/template-config'
defineOptions({ name: 'CheckStockPickerDialog' })
@ -280,7 +282,7 @@ const props = defineProps<{
taskId?: number
/** 目标盘点单号(展示用) */
taskTitle?: string
/** 目标盘点单范围类型(all/location=库位类 → 添加库位;store/goods=商品类 → 添加商品) */
/** 目标盘点单范围类型(location=库位类 → 添加库位;store/goods=商品类 → 添加商品) */
taskType?: string
/**
* 目标盘点单货主ID:>0 时库存列表只显示该货主的商品
@ -354,10 +356,10 @@ const locationCodes = computed<string[]>(() => {
return [...new Set(parts.map((s) => s.trim()).filter(Boolean))]
})
const locationAlertText = computed(() =>
props.taskType === 'all'
? '按库位盘点(默认全仓):勾选库位则按库位添加;一个都不勾选时,由后端自动拉取全仓库启用库位生成盘点范围。'
: '按库位盘点:请从下方列表勾选要盘点的库位(后端按库位ID直接入库,无需担心编码写错)。'
const locationAlertText = computed(
() =>
'按库位盘点:勾选库位 / 填写库位编码则按所选添加(后端按库位ID直接入库);' +
'一个都不选时,确认后由后端自动拉取全仓库启用库位生成盘点范围。'
)
/**
@ -377,13 +379,14 @@ const goodsAlertText = computed(() => {
)
})
/** 库位模式:勾了库位 / 填了库位编码 / all 类型(允许不选=全仓) */
/**
* 库位模式是否可提交
*
* 2026-10-27 文档:原 `type=all` 的「全盘」语义已并入 `location`——
* 不传库位/库位ID 即由后端自动拉取全仓启用库位,故「什么都不选」也允许提交(走二次确认)。
*/
const canSubmit = computed(() => {
if (isLocationMode.value) {
return (
selectedLocationIds.value.length > 0 || locationCodes.value.length > 0 || props.taskType === 'all'
)
}
if (isLocationMode.value) return true
return selectedStockIds.value.length > 0
})
@ -398,9 +401,7 @@ const submitChannelTip = computed(() => {
if (locationCodes.value.length > 0) {
return `未勾选库位 · 将按手动输入的 ${locationCodes.value.length} 个库位编码添加`
}
return props.taskType === 'all'
? '未选库位 · 将由后端生成全仓库盘点范围'
: '请至少勾选一个库位'
return '未选库位 · 确认后由后端生成全仓库盘点范围'
})
const filters = reactive({ keyword: '', batch_no: '' })
@ -657,6 +658,11 @@ async function handleSubmit() {
ElMessage.error('缺少盘点单ID,无法添加明细')
return
}
// type=all 已下线:历史全盘任务调 addDetail 返回 400 → 前端直接拦下
if (isLegacyAllCheckType(props.taskType)) {
ElMessage.error('该任务为已下线的「全盘(all)」类型,无法再添加明细,请新建「按库位」盘点任务')
return
}
if (isLocationMode.value) {
await submitLocationRows(taskId)
return
@ -668,7 +674,7 @@ async function handleSubmit() {
* 库位类任务:三条通道(优先级从高到低)
* ① 已勾选库位 → stock.check.addLocationDetail(库位ID直查,不解析编码)
* ② 未勾选但填了库位编码 → stock.check.addDetail(locations 兼容通道)
* ③ type=all 且都未填 → stock.check.addDetail 不传库位,后端自动生成全仓盘点范围
* ③ 都不传 → stock.check.addDetail 不传库位,后端自动拉取全仓启用库位(二次确认)
*/
async function submitLocationRows(taskId: number) {
const locationIds = selectedLocationIds.value
@ -692,8 +698,8 @@ async function submitLocationRows(taskId: number) {
const payload: StockCheckAddDetailParams = { id: taskId }
if (locationCodes.value.length > 0) {
payload.locations = locationCodes.value
} else if (props.taskType === 'all') {
// type=all:不传库位,由后端自动拉取全仓启用库位
} else {
// 都不传 → 后端自动拉取全仓启用库位(原 type=all 口径,现归属 location),二次确认
try {
await ElMessageBox.confirm(
'未选择库位,将由后端自动拉取全仓库启用库位生成盘点范围,确定继续?',
@ -703,9 +709,6 @@ async function submitLocationRows(taskId: number) {
} catch {
return
}
} else {
ElMessage.warning('请至少选择一个库位')
return
}
submitting.value = true