Files
LWLT-AIBOT/schemas/plan_add_form_schema.json
2026-08-25 10:33:29 +08:00

91 lines
4.7 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://local.lwltapi/schemas/plan_add_form_schema.json",
"title": "LTJT Scatter Plan Add Form",
"description": "Observed native scatter-plan creation form on the logged-in LWLT ERP deployment.",
"type": "object",
"additionalProperties": false,
"required": ["page", "form", "submit", "fields", "cycle_shortcuts"],
"properties": {
"page": {
"type": "object",
"required": ["path"],
"additionalProperties": false,
"properties": {
"path": { "const": "/System/Business/plan_add.asp" },
"entry": { "const": "OPEN_adds() from the scatter-plan list" }
}
},
"form": {
"type": "object",
"required": ["id", "action"],
"additionalProperties": false,
"properties": {
"id": { "const": "InfoForm1" },
"method": { "const": "post" },
"action": { "const": "/System/DAT/plan.asp?Act=DoInfoSPs" },
"observed_control_count": { "type": "integer", "minimum": 1 }
}
},
"submit": {
"type": "object",
"required": ["endpoint", "action", "payload_prefix"],
"additionalProperties": false,
"properties": {
"endpoint": { "const": "/System/DAT/plan.asp" },
"action": { "const": "DoInfoSPs" },
"payload_prefix": { "const": "Act=DoInfoSPs&" },
"response_type": { "const": "script" }
}
},
"fields": {
"type": "object",
"additionalProperties": false,
"required": [
"Riqi1", "Riqi2", "jihuashu", "jiedairen", "tuanxuhao1", "tuanxuhao2",
"S_chanpinming", "cp_id", "zutuanshe", "zutuansheid", "darenshu", "xiaorenshu",
"ertrenshu", "yingrenshu", "quanrenshu", "xiaoshouren", "frenshu0", "frenshu1",
"frenshu2", "frenshu3", "frenshu4", "frenshu5", "frenshu6", "zhouqi", "zhidingzhouqi"
],
"properties": {
"Riqi1": { "type": "string", "description": "发团日期范围起始值ERP 接受 YYYY-M-D。" },
"Riqi2": { "type": "string", "description": "发团日期范围结束值ERP 接受 YYYY-M-D。" },
"jihuashu": { "type": "integer", "minimum": 1 },
"jiedairen": { "type": "string" },
"tuanxuhao1": { "type": "string" },
"tuanxuhao2": { "type": "string" },
"S_chanpinming": { "type": "string" },
"cp_id": { "type": "string" },
"zutuanshe": { "type": "string", "description": "ERP 选填客户字段data.split_order.customer 有值时唯一匹配并填写,否则保持页面默认/空值。" },
"zutuansheid": { "type": "string", "description": "客户隐藏 ID仅在 data.split_order.customer 有值且唯一匹配成功时由 ERP SelectBox 联动写入。" },
"darenshu": { "type": "integer", "minimum": 0, "description": "ERP 选填成人数data.split_order.passenger_counts.adult 有值时写入,否则不主动修改。" },
"xiaorenshu": { "type": "integer", "minimum": 0, "description": "ERP 选填小童占床人数;有对应人数值时写入,否则不主动修改。" },
"ertrenshu": { "type": "integer", "minimum": 0, "description": "ERP 选填小童不占床人数;有对应人数值时写入,否则不主动修改。" },
"yingrenshu": { "type": "integer", "minimum": 0, "description": "ERP 选填婴儿人数;有对应人数值时写入,否则不主动修改。" },
"quanrenshu": { "type": "integer", "minimum": 0, "description": "ERP 选填领队人数;有对应人数值时写入,否则不主动修改。" },
"xiaoshouren": { "type": "string" },
"frenshu0": { "type": "integer", "minimum": 0, "description": "SGL 单房。" },
"frenshu1": { "type": "integer", "minimum": 0, "description": "TWN 标间。" },
"frenshu2": { "type": "integer", "minimum": 0 },
"frenshu3": { "type": "integer", "minimum": 0 },
"frenshu4": { "type": "integer", "minimum": 0 },
"frenshu5": { "type": "integer", "minimum": 0 },
"frenshu6": { "type": "integer", "minimum": 0, "description": "sum_fang() 计算的总房数。" },
"zhouqi": { "type": "array", "items": { "type": "string" } },
"zhidingzhouqi": { "type": "array", "items": { "type": "string" } }
}
},
"cycle_shortcuts": {
"type": "object",
"additionalProperties": false,
"required": ["daily", "weekly", "odd_days", "even_days"],
"properties": {
"daily": { "const": ["All"] },
"weekly": { "const": { "monday": "1", "tuesday": "2", "wednesday": "3", "thursday": "4", "friday": "5", "saturday": "6", "sunday": "0" } },
"odd_days": { "const": ["d1d", "d3d", "d5d", "d7d", "d9d"] },
"even_days": { "const": ["d2d", "d4d", "d6d", "d8d", "d0d"] }
}
}
}
}