feat(procurement): show customer sample fulfillment and charges

This commit is contained in:
2026-10-10 02:19:39 +08:00
parent c0b151bc15
commit d7f8365ecc
13 changed files with 759 additions and 187 deletions
@@ -7,6 +7,8 @@ import ts from 'typescript'
const api = readFileSync(new URL('./api/businessOrders.ts', import.meta.url), 'utf8')
const routes = readFileSync(new URL('./routes.ts', import.meta.url), 'utf8')
const view = readFileSync(new URL('./components/BusinessOrdersView.vue', import.meta.url), 'utf8')
const procurementApi = readFileSync(new URL('./api/procurement.ts', import.meta.url), 'utf8')
const procurementView = readFileSync(new URL('./views/ProcurementView.vue', import.meta.url), 'utf8')
test('renders unknown pallet service and container type as dashes while preserving explicit values', () => {
const helpers = view.slice(view.indexOf('function read('), view.indexOf('function idempotencyKey('))
@@ -42,14 +44,15 @@ test('activates all three customer cross-border pages with frozen permissions',
assert.match(routes, new RegExp(`path: '${path}'[\\s\\S]*?release: 'active'[\\s\\S]*?permission: '${permission}'`))
}
assert.doesNotMatch(view, /PrototypeFeatureView|mock|customerId|tenantId/i)
assert.match(view, /merchant:cross-border:procurement:create/)
assert.match(procurementView, /merchant:cross-border:procurement:create/)
assert.match(view, /merchant:cross-border:domestic-trucking:create/)
assert.match(view, /merchant:cross-border:pallet-shipping:create/)
assert.match(view, /v-if="canCreate"[^>]*type="primary"/)
})
test('uses only merchant overseas endpoints and keeps retry idempotency stable', () => {
assert.match(api, /overseas-procurements/)
assert.match(procurementApi, /overseas-procurements/)
assert.doesNotMatch(api, /overseas-procurements|ProcurementSummary|ProcurementDetail/)
assert.match(api, /us-truck-orders/)
assert.match(api, /local-looseboard-orders/)
assert.doesNotMatch(api, /\/platform\/|\/internal\/|customerId|tenantId/)
@@ -69,11 +72,9 @@ test('covers list detail create loading error empty pagination and actions-first
assert.match(view, /<DataTable[^>]*:row-actions="getRowActions"/)
assert.match(view, /key: 'actions', label: '操作', width: 90, fixed: 'left'/)
assert.match(view, /class="business-table-card"/)
assert.match(view, /PENDING_OUTBOUND: '待出库'/)
assert.match(view, /PARTIALLY_OUTBOUND: '部分出库'/)
assert.match(view, /OUTBOUNDED: '全部出库'/)
assert.match(view, /\['入库量', read\(summary, 'inboundQuantity'\)\]/)
assert.match(view, /\['审核备注', current\.reviewRemark\]/)
assert.doesNotMatch(procurementView, /inventoryQuantity|outboundQuantity|reviewRemark/)
assert.match(procurementView, /procurementStatuses/)
assert.match(procurementView, /ProcurementDetailPanel/)
})
test('opens every dashboard cross-border action on a dedicated protected create page', () => {
@@ -100,7 +101,7 @@ test('opens all cross-border details on dedicated protected routes', () => {
assert.match(view, /class="business-detail-error"/)
})
test('keeps procurement filters, details and forms readable at PDA width', () => {
test('preserves the existing transport responsive rules without adding a narrow-screen procurement acceptance gate', () => {
assert.match(view, /@media \(max-width: 767px\)/)
assert.match(view, /queryFields/)
assert.match(view, /\.detail-grid \{ grid-template-columns: 1fr; \}/)