修复纸面单据长值溢出和日期格式
This commit is contained in:
@@ -5,6 +5,7 @@ const files = [
|
||||
"src/components/documentForms/DocumentPaper.vue",
|
||||
"src/components/documentForms/DocumentGrid.vue",
|
||||
"src/components/documentForms/DocumentLineTable.vue",
|
||||
"src/components/documentForms/WarehouseDocumentFormShell.vue",
|
||||
"src/components/documentForms/DocumentArchiveActions.vue",
|
||||
"src/styles/main.css"
|
||||
];
|
||||
@@ -39,6 +40,17 @@ for (const snippet of ["预览PDF", "下载PDF", "重新生成"]) {
|
||||
}
|
||||
}
|
||||
|
||||
const warehouseDocumentFormShell = sources.get("src/components/documentForms/WarehouseDocumentFormShell.vue");
|
||||
for (const snippet of ["formatChineseDate", "displayBusinessDate"]) {
|
||||
if (!warehouseDocumentFormShell.includes(snippet)) {
|
||||
throw new Error(`WarehouseDocumentFormShell missing business date formatting snippet: ${snippet}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (warehouseDocumentFormShell.includes("{{ businessDate || \"-\" }}")) {
|
||||
throw new Error("WarehouseDocumentFormShell must not render raw businessDate values");
|
||||
}
|
||||
|
||||
for (const forbiddenSnippet of ["ghost-button", "action-button"]) {
|
||||
if (archiveActions.includes(forbiddenSnippet)) {
|
||||
throw new Error(`DocumentArchiveActions must not use global button class: ${forbiddenSnippet}`);
|
||||
@@ -58,6 +70,25 @@ for (const selector of [".document-paper-shell", ".document-paper-sheet", ".docu
|
||||
}
|
||||
}
|
||||
|
||||
for (const selector of [
|
||||
".document-grid-value input",
|
||||
".document-grid-value select",
|
||||
".document-grid-value textarea",
|
||||
".document-line-table input",
|
||||
".document-line-table select",
|
||||
".document-line-table textarea"
|
||||
]) {
|
||||
if (!css.includes(selector)) {
|
||||
throw new Error(`main.css missing document form overflow guard selector: ${selector}`);
|
||||
}
|
||||
}
|
||||
|
||||
for (const snippet of ["box-sizing: border-box", "min-width: 0", "max-width: 100%", "text-overflow: ellipsis"]) {
|
||||
if (!css.includes(snippet)) {
|
||||
throw new Error(`document form controls missing overflow guard declaration: ${snippet}`);
|
||||
}
|
||||
}
|
||||
|
||||
for (const selector of [
|
||||
".document-archive-button",
|
||||
".document-archive-button-preview",
|
||||
|
||||
@@ -10,7 +10,7 @@ assert.doesNotMatch(source, /YL-NB|buildDefaultLotNo/, "purchase receipt UI must
|
||||
assert.doesNotMatch(source, /送货单号|supplier_delivery_no/, "purchase receipt UI should not keep the duplicate supplier delivery number field");
|
||||
assert.match(source, /后端自动生成库存批次号|系统自动生成库存批次号/, "purchase receipt UI should explain that inventory lot numbers are generated by the backend");
|
||||
assert.match(source, /uploadResource/, "purchase receipt UI should upload logistics auxiliary photos");
|
||||
assert.match(source, /selectedPurchaseTargetType\s*===\s*["']RAW["'][\s\S]*运单号[\s\S]*辅助照片/, "raw purchase receipt UI should show waybill and auxiliary photo fields");
|
||||
assert.match(source, /selectedPurchaseTargetType(?:\.value)?\s*===\s*["']RAW["'][\s\S]*运单号[\s\S]*辅助照片/, "raw purchase receipt UI should show waybill and auxiliary photo fields");
|
||||
assert.match(source, /validateLogisticsForm\s*\(\s*\)/, "raw purchase receipt submit should validate logistics information before posting");
|
||||
assert.match(source, /waybill_no:\s*selectedPurchaseTargetType\.value\s*===\s*["']RAW["']\s*\?\s*form\.waybill_no/, "purchase receipt payload should include raw waybill number");
|
||||
assert.match(source, /order_photo_url:\s*selectedPurchaseTargetType\.value\s*===\s*["']RAW["']\s*\?\s*form\.order_photo_url/, "purchase receipt payload should include raw auxiliary photo URL");
|
||||
|
||||
Reference in New Issue
Block a user