feat(worker-platform): 寄卖价格改由接单模板只读定价,我的寄卖支持服务端搜索与分页
1. 寄售价不再由卖家填写:打手端改为只读展示模板价(与履约押金同款只读框),服务端在发布时按同一套规则复算金额,保证展示口径与落库口径一致,直连接口也无法随意定价; 2. 模板缺档按「最接近的已配置档位」报价、距离相同取更低档:后台只配了 1/3/7 钻时,号主出 2 钻报 1 钻价、出 6 钻报 7 钻价,不再因为中间档没配价而拿不到价格; 3. 我的寄卖列表把分组、关键字、翻页全部下沉到 SQL:新增 listWorkerConsignmentPage 用 UNION ALL 合成「提报单行 + 无提报单库存兜底行」,CASE 推导 待审核/履约中/已完成 分组,返回当前分组 total 与三个分组的角标计数; 4. 关键字覆盖寄卖单号、规格名、系统/区服/系列/钻级、卖家角色名与数字 ID、联系方式、买家昵称与游戏 ID(读取 work_orders.material_json.collect.fields 的多种历史键名); 5. 前端搜索框 300ms 防抖后才请求服务端、换分组或换关键字自动回到第 1 页、列表底部增加分页器,并移除原来固定 pageSize 200 的隐形截断; 6. 新增仓库层与匹配层单测,其中包含 SQL 分组 CASE 与 domain/consignment-item-stage.ts 的 group 映射交叉断言,防止两处状态机漂移;后端 516 项、前端 66 项测试全部通过。
This commit is contained in:
@@ -4520,6 +4520,37 @@ body {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* 寄售价只读展示:做成和「履约押金」同款的只读框,避免卡片里只剩一个数字显得空 */
|
||||
.worker-consignment-price-readonly {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
gap: 2px 8px;
|
||||
min-height: 40px;
|
||||
padding: 0 11px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
background: #f1f5f9;
|
||||
}
|
||||
|
||||
.worker-consignment-price-readonly .is-amount {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #ff6a00;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.worker-consignment-price-readonly .is-pending,
|
||||
.worker-consignment-price-readonly .is-empty {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 13px;
|
||||
color: #94a3b8;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.worker-consignment-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -4557,12 +4588,32 @@ body {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
/* 「我的寄卖」搜索:单号/角色名/区服/买家,靠右不与筛选按钮抢位 */
|
||||
.worker-consignment-search {
|
||||
margin-left: auto;
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.worker-consignment-search {
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.worker-consignment-record-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* 「我的寄卖」服务端分页 */
|
||||
.worker-consignment-pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.worker-consignment-record-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
Reference in New Issue
Block a user