diff --git a/悦/PDA(海外)/.codex-local-server.js b/悦/PDA(海外)/.codex-local-server.js new file mode 100644 index 0000000..e4f9c97 --- /dev/null +++ b/悦/PDA(海外)/.codex-local-server.js @@ -0,0 +1,7 @@ +const http=require('http'); +const fs=require('fs'); +const path=require('path'); +http.createServer((req,res)=>{ + const file=path.join(process.cwd(), req.url==='/'?'index.html':req.url); + fs.createReadStream(file).on('error',()=>{res.statusCode=404;res.end('Not found')}).pipe(res); +}).listen(3000,'127.0.0.1'); diff --git a/悦/PDA(海外)/index.html b/悦/PDA(海外)/index.html new file mode 100644 index 0000000..e99f51d --- /dev/null +++ b/悦/PDA(海外)/index.html @@ -0,0 +1,791 @@ + + + + + +Overseas Warehouse PDA + + + + + + + +
+ +
+ + + diff --git a/悦/PDA(海外)/tests/handover-summary.test.ps1 b/悦/PDA(海外)/tests/handover-summary.test.ps1 new file mode 100644 index 0000000..906e0ab --- /dev/null +++ b/悦/PDA(海外)/tests/handover-summary.test.ps1 @@ -0,0 +1,27 @@ +$ErrorActionPreference = 'Stop' +$html = Get-Content -Raw -LiteralPath (Join-Path $PSScriptRoot '..\index.html') + +$required = @( + 'totalWeightLb:203.0', + 'totalWeightLb:99.9', + "totalBoxes:'总箱数'", + "totalWeight:'总重量'", + "totalBoxes:'Total cartons'", + "totalWeight:'Total weight'", + "totalBoxes:'Total de cajas'", + "totalWeight:'Peso total'", + 'pickTasks.reduce((sum,task)=>sum+Number(task.palletCount||0),0)', + 'pickTasks.reduce((sum,task)=>sum+Number(task.boxes||0),0)', + 'pickTasks.reduce((sum,task)=>sum+Number(task.totalWeightLb||0),0)', + '${totalWeight.toFixed(1)} lb' +) + +$missing = $required | Where-Object { -not $html.Contains($_) } +if ($missing) { throw "Missing handover summary contract: $($missing -join ', ')" } + +$handoverSource = [regex]::Match($html, '(?s)function handoverView\(\).*?(?=function handleHandoverPhoto)').Value +if ($handoverSource.Contains('${t(''boxes'')}')) { + throw 'Handover still uses the generic cartons label' +} + +Write-Output 'PASS: handover summary source contract' diff --git a/悦/PDA(海外)/tests/pallet-order-tabs.runtime.test.js b/悦/PDA(海外)/tests/pallet-order-tabs.runtime.test.js new file mode 100644 index 0000000..b38194d --- /dev/null +++ b/悦/PDA(海外)/tests/pallet-order-tabs.runtime.test.js @@ -0,0 +1,149 @@ +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); + +const html = fs.readFileSync(path.join(__dirname, '..', 'index.html'), 'utf8'); +const match = html.match(/ + +
@@ -9001,9 +9051,11 @@ FORM: 通用模块中的管理清单加分区编辑弹窗,作为既有后台
-
入库单详情
入库单号 —
—
应收费用明细
序号费用项目币种金额备注
暂无应收费用明细
应收费用合计(USD)$0.00
+
入库单详情
入库单号 —
—
托盘明细
托盘号产品名称箱数附件名称(打托照片)
暂无托盘明细
应收费用明细
序号费用项目币种金额备注
暂无应收费用明细
应收费用合计(USD)$0.00
+ +
@@ -10425,7 +10477,7 @@ FORM: 采用现有后台的列表加标准详情结构,保持高信息密度
完成时间—
目的地—
-
+
支持 PDF、Office、JPG、PNG、WEBP
@@ -11012,6 +11064,43 @@ FORM: 采用现有后台的列表加标准详情结构,保持高信息密度
+ + + + + + + + + + + + + + + + + + + + + + + +