docs: 更新 AGENTS/README 平台架构说明与月度总结,运行日志视图支持已取消状态
This commit is contained in:
@@ -27,7 +27,7 @@ npm run build # 产物输出到 ../ui/(vite.config.js 里 base=/pui/xq0031
|
||||
2. `desktop/` 下执行:`../.venv/Scripts/python.exe ../plugins/xq0031_xq0032/_pack.py`
|
||||
→ 产出 `dist-plugin/xq0031_xq0032_v<版本>.zip`(自动排除 ui-src 等)
|
||||
3. `desktop/` 下发布:
|
||||
`.venv\Scripts\python.exe -m controlplane.tools.agent_cli publish dist-plugin\xq0031_xq0032_v<版本>.zip --id xq0031_xq0032 --version <版本> --admin puddy`
|
||||
`.venv\Scripts\python.exe tools\agent_cli.py publish dist-plugin\xq0031_xq0032_v<版本>.zip --id xq0031_xq0032 --version <版本> --admin puddy`
|
||||
|
||||
## 个性化配置(自带界面)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ def _as_str_list(value):
|
||||
class ErpReportExportPlugin(ScenePlugin):
|
||||
id = "xq0031_xq0032"
|
||||
name = "ERP物料收发汇总-采购订单报表导出"
|
||||
version = "1.0.11"
|
||||
version = "1.0.13"
|
||||
description = "金蝶K3Cloud报表导出:物料收发汇总表+ 采购订单列表,支持新旧系统与个性化配置"
|
||||
platform = "" # ERP 自带登录页(无验证码),插件内现场真登录,不使用底座共享登录态
|
||||
uses_month = False
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
用法(desktop/ 下执行):
|
||||
../.venv/Scripts/python.exe ../plugins/XQ0001-0100/XQ0031_XQ0032 物料收发与采购订单导出/_pack.py
|
||||
随后发布:
|
||||
.venv\\Scripts\\python.exe -m controlplane.tools.agent_cli publish \
|
||||
.venv\\Scripts\\python.exe tools\\agent_cli.py publish \
|
||||
dist-plugin\\xq0031_xq0032_v1.0.0.zip --id xq0031_xq0032 --version 1.0.0
|
||||
"""
|
||||
import json
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
"schema_version": 1,
|
||||
"id": "xq0031_xq0032",
|
||||
"name": "ERP物料收发汇总-采购订单报表导出",
|
||||
"version": "1.0.12",
|
||||
"version": "1.0.13",
|
||||
"description": "金蝶K3Cloud报表自动导出:物料收发汇总表+ 采购订单列表,支持新旧系统、下载全部仓库后按所选仓库中文名自动筛选、日期多选(含自定义区间),个性化配置保存在本机",
|
||||
"category": "报表",
|
||||
"icon": "",
|
||||
"platform": "",
|
||||
"uses_month": false,
|
||||
"ui": true,
|
||||
"capabilities": ["xq0031_xq0032"],
|
||||
"capabilities": [
|
||||
"xq0031_xq0032"
|
||||
],
|
||||
"permissions": {
|
||||
"platforms": []
|
||||
},
|
||||
@@ -20,14 +22,21 @@
|
||||
"type": "string",
|
||||
"title": "执行模式",
|
||||
"default": "两个都导",
|
||||
"enum": ["两个都导", "物料收发汇总表", "采购订单列表"],
|
||||
"enum": [
|
||||
"两个都导",
|
||||
"物料收发汇总表",
|
||||
"采购订单列表"
|
||||
],
|
||||
"description": "需求31=物料收发汇总表(按仓库/日期多档导出),需求32=采购订单列表(按方案导出)"
|
||||
},
|
||||
"erp_system": {
|
||||
"type": "string",
|
||||
"title": "ERP系统",
|
||||
"default": "新版",
|
||||
"enum": ["新版", "旧版"],
|
||||
"enum": [
|
||||
"新版",
|
||||
"旧版"
|
||||
],
|
||||
"description": "新版 criterion.erp.37du.co / 旧版 erp.37du.co"
|
||||
},
|
||||
"erp_username": {
|
||||
@@ -54,9 +63,22 @@
|
||||
"title": "仓库编码(可多选)",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": ["0101010101", "0101010201", "0101020201", "0101030201", "0101040201", "03010127"]
|
||||
"enum": [
|
||||
"0101010101",
|
||||
"0101010201",
|
||||
"0101020201",
|
||||
"0101030201",
|
||||
"0101040201",
|
||||
"03010127"
|
||||
]
|
||||
},
|
||||
"default": ["0101010101", "0101010201", "0101020201", "0101030201", "0101040201"],
|
||||
"default": [
|
||||
"0101010101",
|
||||
"0101010201",
|
||||
"0101020201",
|
||||
"0101030201",
|
||||
"0101040201"
|
||||
],
|
||||
"description": "查询统一下载全部仓库,下载后按所选编码对应的中文仓库名自动筛选保存;留空=全部仓库不筛选。新版默认=五个三方仓;旧版默认=03010127(代管仓,切换ERP系统自动带出)"
|
||||
},
|
||||
"date_options": {
|
||||
@@ -64,9 +86,21 @@
|
||||
"title": "日期选项(多选,逐个导出)",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": ["60D", "30D", "15D", "7D", "3D"]
|
||||
"enum": [
|
||||
"60D",
|
||||
"30D",
|
||||
"15D",
|
||||
"7D",
|
||||
"3D"
|
||||
]
|
||||
},
|
||||
"default": ["60D", "30D", "15D", "7D", "3D"],
|
||||
"default": [
|
||||
"60D",
|
||||
"30D",
|
||||
"15D",
|
||||
"7D",
|
||||
"3D"
|
||||
],
|
||||
"description": "N天=今天往前推N天;可混入自定义区间如 2026-01-01~2026-09-15"
|
||||
},
|
||||
"scheme_name": {
|
||||
|
||||
@@ -293,7 +293,8 @@ export function usePluginUI(opts = {}) {
|
||||
ws = connectWS((ev) => {
|
||||
if (ev.run_id && ev.run_id !== runId) return // 只看本次运行
|
||||
if (ev.t === 'progress') progress.value = Math.max(progress.value, ev.pct || 0)
|
||||
else if (ev.t === 'run_done') ev.ok ? finished() : failed(ev.error || '执行失败')
|
||||
// 用户强制停止 / 排队取消 / 排队超时 → 「已取消」,不显示成「执行失败」
|
||||
else if (ev.t === 'run_done') ev.ok ? finished() : (ev.status === 'cancelled' ? cancelled(ev.error) : failed(ev.error || '执行失败'))
|
||||
})
|
||||
ws.onclose = () => { ws = null }
|
||||
}
|
||||
@@ -305,6 +306,7 @@ export function usePluginUI(opts = {}) {
|
||||
try {
|
||||
const r = await getRun(runId)
|
||||
if (r.status === 'done') finished(r.result?.summary || '执行完成')
|
||||
else if (r.status === 'cancelled') cancelled(r.error)
|
||||
else if (r.status === 'error') failed(r.error || '执行失败')
|
||||
} catch (_) { /* 下轮再试 */ }
|
||||
}, 5000)
|
||||
@@ -321,6 +323,13 @@ export function usePluginUI(opts = {}) {
|
||||
banner.value = { type: 'success', text: summary || '执行完成' }
|
||||
}
|
||||
|
||||
// 用户主动停止 / 排队取消 / 排队超时:不算失败,给中性的「已取消」提示
|
||||
function cancelled(err) {
|
||||
stopPolling()
|
||||
running.value = false
|
||||
banner.value = { type: 'warning', text: '任务已取消:' + (err || '用户已停止') }
|
||||
}
|
||||
|
||||
function failed(err) {
|
||||
stopPolling()
|
||||
running.value = false
|
||||
|
||||
+12
-12
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ERP报表导出</title>
|
||||
<script type="module" crossorigin src="/pui/xq0031_xq0032/assets/index-DCZznIjf.js"></script>
|
||||
<script type="module" crossorigin src="/pui/xq0031_xq0032/assets/index-BAsvdLec.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/pui/xq0031_xq0032/assets/index-u2-ZnLC2.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user