- 批次行摘要改为「区 入库日 数量单位」(如 冷库B 10-12 5斤),无区时回退「入库日 数量单位」 - 小程序彻底不做打印:移除「一键确认」后的自动下发打印,删除 printPickLabels/printCurrentPick/choosePrintDevice/pickPrintCodes 及相关 state 与 import;同步更新 mpPickingScopeSelect 契约断言 - Web 批次编辑弹窗去掉 ↑↓,删除 moveBatchEditorRow 与 i18n picking.batch.moveUp/moveDown 无迁移,未动后端逻辑。小程序需重新编译。
39 lines
1.6 KiB
TypeScript
39 lines
1.6 KiB
TypeScript
import { readFileSync } from 'fs';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
const wxml = readFileSync(
|
|
new URL('../../miniprogram/components/picking-panel/index.wxml', import.meta.url),
|
|
'utf8'
|
|
);
|
|
const js = readFileSync(
|
|
new URL('../../miniprogram/components/picking-panel/index.js', import.meta.url),
|
|
'utf8'
|
|
);
|
|
|
|
describe('小程序分拣范围选择框', () => {
|
|
it('页内点击选范围:按订单/分类/商品都走选择框;完成组不占位', () => {
|
|
expect(wxml).not.toContain('scroll-x class="task-tabs"');
|
|
expect(wxml).toContain('toggleScopeMenu');
|
|
expect(wxml).toContain('scope-menu');
|
|
expect(wxml).toContain('wx:if="{{scopeGroups.length}}"');
|
|
expect(wxml).not.toContain('!skuCatalogMode');
|
|
expect(js).toContain('function groupStillOpen');
|
|
expect(js).toContain('onScopeOptionTap');
|
|
expect(js).toContain('scopeMenuOpen');
|
|
expect(js).toContain("if (type === 'category') return String(task.scope_label");
|
|
expect(js).toContain("if (type === 'sku') return String(task.scope_label");
|
|
expect(js).toContain('this.selectGroupByKey(activeGroupKey)');
|
|
expect(js).not.toContain('this.applyPickingDayView()');
|
|
});
|
|
|
|
it('日期轴仍在;小程序不做打印(2026-10-12 起)', () => {
|
|
expect(wxml).toContain('date-axis');
|
|
expect(js).toContain('confirmAllPicks');
|
|
// 小程序不做打印:行上打印按钮与下发打印的代码均已移除
|
|
expect(wxml).not.toContain('printCurrentPick');
|
|
expect(wxml).not.toContain('btn-print-row');
|
|
expect(js).not.toContain('printCurrentPick');
|
|
expect(js).not.toContain('printPickLabels');
|
|
});
|
|
});
|