feat(shipping-notice): 收料异动解析配置闭环与按需触发FK违例修复

- 收料单元 schedule_run_id 改可空,修复按需触发 FK 违例
- 收料配置绑定已发布异动解析规则(校验/回显/审计快照)
- 预检未绑异动规则 fail-closed,不再徒劳触发 RPA
- 标准异动字段目录只读接口;解析规则用途切换与批号映射表单(四语言)
- movement 解析规则可发布(跳过订单匹配键校验);站点启停门禁仅限库存站点页签
- 只读映射卡三列布局修复
This commit is contained in:
hugo committed 2026-09-21 19:12:29 +08:00
1 parent ab57ab3b1f
commit 20835dcfc0
28 files changed
+987 -73

No files matched your search

+18 -1
View File
@@ -635,7 +635,9 @@
"pathSectionConfigured": "Configured",
"pathSectionNotConfigured": "Not configured",
"parsingProfiles": "Inventory Parsing",
"parsingProfilesHelp": "Maintain inventory file structures, field mappings, and order-field match keys shared by inventory sites.",
"parsingProfilesHelp": "Maintain reusable file parsing rules: inventory parsing targets the inventory field catalog and order match keys; receipt movement targets the standard movement fields (read-only contract).",
"inventoryParsing": { "code": "Inventory Parsing Code", "name": "Inventory Parsing Name", "sampleFile": "Inventory Sample File", "sampleFileHint": "Upload an Excel or CSV file. The system reads worksheets, headers, and a small sample for plan confirmation.", "sampleRequired": "Upload an inventory sample file and complete structure recognition first.", "sourceHeader": "Inventory File Header", "fieldMappings": "Inventory Standard Field Mappings", "analysisPreview": "Inventory Analysis Preview" },
"movementParsing": { "code": "Movement Parsing Code", "name": "Movement Parsing Name", "sampleFile": "Receipt Sample File", "sampleFileHint": "Upload an Excel or CSV file. The system reads worksheets, headers, and a small sample for movement parsing confirmation.", "sampleRequired": "Upload a receipt movement sample file and complete structure recognition first.", "sourceHeader": "Movement File Header", "fieldMappings": "Standard Movement Field Mappings", "analysisPreview": "Movement Analysis Preview" },
"inventoryMapping": "Inventory Parsing",
"inventoryMappingPlans": "Parsing Rules",
"inventoryFields": "Inventory Field Catalog",
@@ -690,6 +692,21 @@
"inventorySampleAnalysing": "Analysing inventory file structure...",
"inventorySampleRequired": "Upload an inventory sample file and complete structure recognition first.",
"parsingProfileName": "Inventory Parsing Name",
"parsingPurposeLabel": "Rule Purpose",
"parsingPurposeHint": "Purpose cannot be changed after creation: inventory parsing uses the inventory field catalog, receipt movement uses the standard movement fields (read-only contract).",
"parsingPurpose": { "inventory": "Inventory Parsing", "movement": "Receipt Movement" },
"movementMappingHint": "Standard movement fields are a read-only business contract (✱ required, 🔑 match identity). Just pick the report header alias for each field.",
"movementRequiredMark": "Required",
"movementIdentityMark": "Match identity",
"movementStandardField": "Standard Movement Field",
"movementBindingLabel": "Movement Parsing Rule",
"movementBindingNone": "Not bound",
"movementBindingHint": "With a published movement rule bound, precheck reuses archived receipt files; when unbound, precheck will not trigger a fetch (fail-closed).",
"movementFields": {
"doc_no": "Doc No.", "line_no": "Line No.", "in_out_flag": "In/Out Flag", "material_code": "Material Code",
"material_name": "Material Name", "warehouse_code": "Warehouse", "storage_code": "Storage Bin", "lot_no": "Lot No.",
"quantity": "Quantity", "movement_date": "Movement Date"
},
"inventoryAnalysisFailed": "Inventory file structure recognition failed.",
"inventoryAnalysisPreview": "Recognition Preview",
"inventoryAnalysisSummary": "Found {candidate_count} candidate headers with {sample_row_count} sample rows and suggested {valid_inventory_field_suggestions} inventory fields.",
+18 -1
View File
@@ -635,7 +635,9 @@
"pathSectionConfigured": "ตั้งค่าแล้ว",
"pathSectionNotConfigured": "ยังไม่ได้ตั้งค่า",
"parsingProfiles": "แผนการแยกวิเคราะห์ไฟล์สต็อก",
"parsingProfilesHelp": "จัดการโครงสร้างไฟล์สต็อก การจับคู่ฟิลด์ และคีย์จับคู่ฟิลด์คำสั่งซื้อที่ใช้ร่วมกันได้ระหว่างไซต์สต็อก",
"parsingProfilesHelp": "จัดการกฎการอ่านไฟล์ที่ใช้ร่วมกันได้ระหว่างไซต์: การแยกวิเคราะห์สต็อกใช้สารบัญฟิลด์สต็อกและคีย์จับคู่คำสั่งซื้อ ส่วนการรับ-เคลื่อนไหวใช้ฟิลด์มาตรฐาน (สัญญาแบบอ่านอย่างเดียว)",
"inventoryParsing": { "code": "รหัสแผนการอ่านสต็อก", "name": "ชื่อแผนการอ่านสต็อก", "sampleFile": "ไฟล์ตัวอย่างสต็อก", "sampleFileHint": "อัปโหลด Excel หรือ CSV แล้วระบบจะอ่านชีต หัวตาราง และตัวอย่างเล็กน้อยเพื่อยืนยันแผนการอ่านสต็อก", "sampleRequired": "โปรดอัปโหลดไฟล์ตัวอย่างสต็อกและทำการระบุโครงสร้างให้เสร็จก่อน", "sourceHeader": "หัวตารางไฟล์สต็อก", "fieldMappings": "การจับคู่ฟิลด์มาตรฐานสต็อก", "analysisPreview": "ภาพรวมการวิเคราะห์สต็อก" },
"movementParsing": { "code": "รหัสแผนการอ่านการเคลื่อนไหว", "name": "ชื่อแผนการอ่านการเคลื่อนไหว", "sampleFile": "ไฟล์ตัวอย่างการรับ", "sampleFileHint": "อัปโหลด Excel หรือ CSV แล้วระบบจะอ่านชีต หัวตาราง และตัวอย่างเล็กน้อยเพื่อยืนยันการอ่านการรับ-เคลื่อนไหว", "sampleRequired": "โปรดอัปโหลดไฟล์ตัวอย่างการรับ-เคลื่อนไหวและทำการระบุโครงสร้างให้เสร็จก่อน", "sourceHeader": "หัวตารางไฟล์การเคลื่อนไหว", "fieldMappings": "การจับคู่ฟิลด์มาตรฐานการเคลื่อนไหว", "analysisPreview": "ภาพรวมการวิเคราะห์การเคลื่อนไหว" },
"inventoryMapping": "แผนการแยกวิเคราะห์ไฟล์สต็อก",
"inventoryMappingPlans": "แผนการแยกข้อมูล",
"inventoryFields": "รายการฟิลด์สต็อก",
@@ -690,6 +692,21 @@
"inventorySampleAnalysing": "กำลังวิเคราะห์โครงสร้างไฟล์สต็อก...",
"inventorySampleRequired": "โปรดอัปโหลดไฟล์ตัวอย่างสต็อกและทำการระบุโครงสร้างให้เสร็จก่อน",
"parsingProfileName": "ชื่อแผนการอ่านไฟล์",
"parsingPurposeLabel": "วัตถุประสงค์ของกฎ",
"parsingPurposeHint": "เปลี่ยนวัตถุประสงค์ไม่ได้หลังสร้าง: การแยกวิเคราะห์สินค้าคงเหลือใช้สารบัญฟิลด์สินค้าคงเหลือ ส่วนการรับ-เคลื่อนไหวใช้ฟิลด์มาตรฐาน (สัญญาแบบอ่านอย่างเดียว)",
"parsingPurpose": { "inventory": "แยกวิเคราะห์สินค้าคงเหลือ", "movement": "การรับ-เคลื่อนไหว" },
"movementMappingHint": "ฟิลด์มาตรฐานเป็นสัญญาแบบอ่านอย่างเดียว (✱ จำเป็น, 🔑 ตัวตนสำหรับจับคู่) เพียงเลือกหัวคอลัมน์รายงานให้แต่ละฟิลด์",
"movementRequiredMark": "จำเป็น",
"movementIdentityMark": "ตัวตนจับคู่",
"movementStandardField": "ฟิลด์มาตรฐานการเคลื่อนไหว",
"movementBindingLabel": "กฎการแยกวิเคราะห์การเคลื่อนไหว",
"movementBindingNone": "ยังไม่ผูก",
"movementBindingHint": "เมื่อผูกกฎที่เผยแพร่แล้ว การตรวจก่อนจะใช้ไฟล์ที่เก็บถาวรซ้ำ หากไม่ผูก การตรวจก่อนจะไม่เรียกดึงข้อมูล (fail-closed)",
"movementFields": {
"doc_no": "เลขที่เอกสาร", "line_no": "ลำดับรายการ", "in_out_flag": "เข้า/ออก", "material_code": "รหัสวัสดุ",
"material_name": "ชื่อวัสดุ", "warehouse_code": "คลังสินค้า", "storage_code": "ตำแหน่งจัดเก็บ", "lot_no": "เลขล็อต",
"quantity": "จำนวน", "movement_date": "วันที่เคลื่อนไหว"
},
"inventoryAnalysisFailed": "การระบุโครงสร้างไฟล์สต็อกล้มเหลว",
"inventoryAnalysisPreview": "ตัวอย่างผลการระบุ",
"inventoryAnalysisSummary": "พบหัวตารางที่เลือกได้ {candidate_count} รายการ มีแถวตัวอย่าง {sample_row_count} แถว และแนะนำฟิลด์สต็อก {valid_inventory_field_suggestions} รายการ",
+18 -1
View File
@@ -764,7 +764,9 @@
"pathSectionConfigured": "已配置",
"pathSectionNotConfigured": "未配置",
"parsingProfiles": "库存解析",
"parsingProfilesHelp": "维护可由多个库存站点共享的库存文件结构、字段对应关系和订单字段匹配键。",
"parsingProfilesHelp": "维护可跨站点复用的文件解析规则:库存解析面向库存字段目录与订单匹配键,收料异动面向标准异动字段(只读契约)。",
"inventoryParsing": { "code": "库存解析编号", "name": "库存解析名称", "sampleFile": "库存样本文件", "sampleFileHint": "上传 .xls、.xlsx 或 .csv 后,系统会读取工作表、表头和少量样例,供确认库存解析。", "sampleRequired": "请先上传库存样本文件并完成结构识别。", "sourceHeader": "库存文件表头名称", "fieldMappings": "库存标准字段映射", "analysisPreview": "库存分析预览" },
"movementParsing": { "code": "异动解析编号", "name": "异动解析名称", "sampleFile": "收料样本文件", "sampleFileHint": "上传 .xls、.xlsx 或 .csv 后,系统会读取工作表、表头和少量样例,供确认收料异动解析。", "sampleRequired": "请先上传收料异动样本文件并完成结构识别。", "sourceHeader": "异动文件表头名称", "fieldMappings": "标准异动字段映射", "analysisPreview": "异动分析预览" },
"inventoryMapping": "库存解析",
"inventoryMappingPlans": "解析规则",
"inventoryFields": "库存字段目录",
@@ -819,6 +821,21 @@
"inventorySampleAnalysing": "正在分析库存文件结构...",
"inventorySampleRequired": "请先上传库存样本文件并完成结构识别。",
"parsingProfileName": "库存解析名称",
"parsingPurposeLabel": "规则用途",
"parsingPurposeHint": "用途创建后不可变更:库存解析面向库存字段目录,收料异动面向标准异动字段(只读契约)。",
"parsingPurpose": { "inventory": "库存解析", "movement": "收料异动" },
"movementMappingHint": "标准异动字段为只读业务契约(✱ 必填、🔑 匹配身份),只需为每个字段选择报表表头别名。",
"movementRequiredMark": "必填",
"movementIdentityMark": "匹配身份",
"movementStandardField": "标准异动字段",
"movementBindingLabel": "异动解析规则",
"movementBindingNone": "未绑定",
"movementBindingHint": "绑定已发布异动规则后,预检将复用已归档收料文件;未绑定时预检不会触发抓取(fail-closed)。",
"movementFields": {
"doc_no": "单号", "line_no": "项次", "in_out_flag": "进出库别", "material_code": "料号",
"material_name": "品名", "warehouse_code": "仓库", "storage_code": "储位", "lot_no": "批号",
"quantity": "数量", "movement_date": "异动日期"
},
"inventoryAnalysisFailed": "库存文件结构识别失败。",
"inventoryAnalysisPreview": "识别结果预览",
"inventoryAnalysisSummary": "识别到 {candidate_count} 个可选表头,当前样例行数 {sample_row_count};已建议 {valid_inventory_field_suggestions} 个库存字段。",
+18 -1
View File
@@ -635,7 +635,9 @@
"pathSectionConfigured": "已設定",
"pathSectionNotConfigured": "未設定",
"parsingProfiles": "庫存解析",
"parsingProfilesHelp": "維護可由多個庫存站點共用的庫存檔案結構、欄位對應與訂單欄位匹配鍵。",
"parsingProfilesHelp": "維護可跨站點共用的檔案解析規則:庫存解析面向庫存欄位目錄與訂單匹配鍵,收料異動面向標準異動欄位(唯讀契約)。",
"inventoryParsing": { "code": "庫存解析編碼", "name": "庫存解析名稱", "sampleFile": "庫存樣本檔案", "sampleFileHint": "上傳 .xls、.xlsx 或 .csv 後,系統會讀取工作表、表頭與少量樣例,供確認庫存解析。", "sampleRequired": "請先上傳庫存樣本檔案並完成結構識別。", "sourceHeader": "庫存檔案表頭名稱", "fieldMappings": "庫存標準欄位映射", "analysisPreview": "庫存分析預覽" },
"movementParsing": { "code": "異動解析編碼", "name": "異動解析名稱", "sampleFile": "收料樣本檔案", "sampleFileHint": "上傳 .xls、.xlsx 或 .csv 後,系統會讀取工作表、表頭與少量樣例,供確認收料異動解析。", "sampleRequired": "請先上傳收料異動樣本檔案並完成結構識別。", "sourceHeader": "異動檔案表頭名稱", "fieldMappings": "標準異動欄位映射", "analysisPreview": "異動分析預覽" },
"inventoryMapping": "庫存解析",
"inventoryMappingPlans": "解析規則",
"inventoryFields": "庫存欄位目錄",
@@ -690,6 +692,21 @@
"inventorySampleAnalysing": "正在分析庫存檔案結構...",
"inventorySampleRequired": "請先上傳庫存樣本檔案並完成結構識別。",
"parsingProfileName": "庫存解析名稱",
"parsingPurposeLabel": "規則用途",
"parsingPurposeHint": "用途建立後不可變更:庫存解析面向庫存欄位目錄,收料異動面向標準異動欄位(唯讀契約)。",
"parsingPurpose": { "inventory": "庫存解析", "movement": "收料異動" },
"movementMappingHint": "標準異動欄位為唯讀業務契約(✱ 必填、🔑 匹配身份),只需為每個欄位選擇報表表頭別名。",
"movementRequiredMark": "必填",
"movementIdentityMark": "匹配身份",
"movementStandardField": "標準異動欄位",
"movementBindingLabel": "異動解析規則",
"movementBindingNone": "未綁定",
"movementBindingHint": "綁定已發布異動規則後,預檢將複用已歸檔收料文件;未綁定時預檢不會觸發抓取(fail-closed)。",
"movementFields": {
"doc_no": "單號", "line_no": "項次", "in_out_flag": "進出庫別", "material_code": "料號",
"material_name": "品名", "warehouse_code": "倉庫", "storage_code": "儲位", "lot_no": "批號",
"quantity": "數量", "movement_date": "異動日期"
},
"inventoryAnalysisFailed": "庫存檔案結構識別失敗。",
"inventoryAnalysisPreview": "識別結果預覽",
"inventoryAnalysisSummary": "識別到 {candidate_count} 個可選表頭,目前樣例行數 {sample_row_count};已建議 {valid_inventory_field_suggestions} 個庫存欄位。",