diff --git a/changelog.md b/changelog.md index 81fa05e5..c34a2db3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,23 @@ +## 3.1.2026072309 + +- feat: 新增功能 + - 工艺画布scFlow更名xtFlow;工艺包产品常驻画布为终点节点可直接连线;节点按物料真实类型着色;fix:拖线新增setData覆盖params_json致排一次棒表单报错;perf:vue-flow分包prefetch预取+查看器合并重复布局;style:route_show查看页卡片化紧凑布局 [caoqianming] + - 物料表单新增入库检验方式,入库明细未检免检物料显示免检标识;fix:其他配置页提交未实现导致保存无效 [caoqianming] + - 工艺路线新增可视化流程编辑器scFlowEditor(Vue Flow+dagre异步分包); 编辑工艺抽屉压缩布局留白 [caoqianming] + - 禅道444扭转工序,快速报工,扫码框后面加数字识别功能 [shijing] + - 禅道446深加工统计里加工装tab页面 [shijing] + - 销售发货批次选择隐藏可发数量为0的批次 [caoqianming] + - 合格B类字段文案改为记为合格更准确表达 [caoqianming] +- fix: 问题修复 + - 抽屉内打开的el-dialog统一加append-to-body(24文件28处),避免被pages.scss抽屉工作流表单样式误伤成卡片/灰底/底部留白 [caoqianming] + - 抽屉内el-main/el-aside恢复nopadding约定优先级; route_form弹窗加append-to-body避免被抽屉工作流表单样式误伤成卡片 [caoqianming] + - 分检加人员筛选不生效修改 [shijing] + - table下的tr补上tbody包裹,消除vue3.5模板编译的HTML嵌套规范警告 [caoqianming] + - scScanner内置扫码枪输入框改为opt-in(默认隐藏),消除与调用页自有输入框重复 [caoqianming] + - 禅道452综合查询界面棒数据未显示发货数 [shijing] + - 禅道452综合查询界面棒数据未显示发货数 [shijing] + - 禅道452综合查询界面棒数据未显示发货数 [shijing] + - 出入库记录及明细表单新增时清空,避免上次保存数据残留导致"物料找不到" [caoqianming] ## 3.1.2026071608 - feat: 新增功能 diff --git a/package.json b/package.json index dada463e..bbb6e66b 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,9 @@ "@element-plus/icons-vue": "^2.3.2", "@kjgl77/datav-vue3": "^1.7.1", "@tinymce/tinymce-vue": "5.0.0", + "@vue-flow/background": "^1.3.2", + "@vue-flow/controls": "^1.1.3", + "@vue-flow/core": "^1.48.2", "animate.css": "^4.1.1", "axios": "^1.18.1", "babylonjs": "^6.46.0", @@ -24,6 +27,7 @@ "crypto-browserify": "^3.12.0", "crypto-js": "^4.2.0", "d3": "^7.6.1", + "dagre": "^0.8.5", "dagre-d3": "^0.6.4", "dhtmlx-gantt": "^8.0.6", "echarts": "^5.5.1", diff --git a/src/api/model/mtm.js b/src/api/model/mtm.js index 9cabf4f2..376aa841 100644 --- a/src/api/model/mtm.js +++ b/src/api/model/mtm.js @@ -516,6 +516,12 @@ export default { return await http.get(`${config.API_URL}/mtm/routepack/${id}/final_materials/`); }, }, + validate: { + name: "校验工艺图", + req: async function (id) { + return await http.get(`${config.API_URL}/mtm/routepack/${id}/validate/`); + }, + }, update: { name: "更新", req: async function (id, data) { diff --git a/src/components/flow/MaterialNode.vue b/src/components/flow/MaterialNode.vue new file mode 100644 index 00000000..1edf847d --- /dev/null +++ b/src/components/flow/MaterialNode.vue @@ -0,0 +1,106 @@ + + + + {{ kindLabel }} + {{ data.label }} + + + + + + + + + diff --git a/src/components/flow/dagreLayout.js b/src/components/flow/dagreLayout.js new file mode 100644 index 00000000..a7275036 --- /dev/null +++ b/src/components/flow/dagreLayout.js @@ -0,0 +1,24 @@ +import dagre from "dagre"; + +export const NODE_W = 150; +export const NODE_H = 54; + +/** + * dagre 自动布局,返回带 position 的 nodes + * @param {Array} nodes Vue Flow 节点(id 必须为字符串) + * @param {Array} edges Vue Flow 边 + * @param {Object} opts { rankdir: TB|BT|LR|RL, nodeW, nodeH } + */ +export function layoutGraph(nodes, edges, opts = {}) { + const { rankdir = "TB", nodeW = NODE_W, nodeH = NODE_H } = opts; + const g = new dagre.graphlib.Graph(); + g.setGraph({ rankdir, nodesep: 30, ranksep: 56, marginx: 20, marginy: 20 }); + g.setDefaultEdgeLabel(() => ({})); + nodes.forEach((n) => g.setNode(n.id, { width: nodeW, height: nodeH })); + edges.forEach((e) => g.setEdge(e.source, e.target)); + dagre.layout(g); + return nodes.map((n) => { + const gn = g.node(n.id); + return { ...n, position: { x: gn.x - nodeW / 2, y: gn.y - nodeH / 2 } }; + }); +} diff --git a/src/components/scBind/index.vue b/src/components/scBind/index.vue index 9649cf95..239a0e00 100644 --- a/src/components/scBind/index.vue +++ b/src/components/scBind/index.vue @@ -1,5 +1,5 @@ - + + + + + 新增工序 + 自动布局 + 适应画布 + 校验 + + + 原料 + 半成品 + 成品 + + + + 从左侧拖入原料作为起点 → 节点间拉线新建工序,拉到空白处自动生成半成品,连到产品节点收尾;单击线条编辑,右键线条删工序 / 右键节点移除物料 + + 当前状态不可编辑(仅创建中的工艺可编辑) + + + + + + 物料库 + + + + + + + + + + + {{ m.full_name }} + + 无匹配物料 + + + + + + + + + + + + + + + + + 从左侧把「原料」拖到这里开始搭建工艺路线 + + + + + + + + + + + + + diff --git a/src/components/xtFlowViewer.vue b/src/components/xtFlowViewer.vue new file mode 100644 index 00000000..15119b9a --- /dev/null +++ b/src/components/xtFlowViewer.vue @@ -0,0 +1,261 @@ + + + + + + 适应画布 + + + 原料 + 半成品 + 成品 + + + + + + + + + + + + + 暂无工艺图数据 + + + + + + + + + + diff --git a/src/config/index.js b/src/config/index.js index cc04592b..c4b3e1cc 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -6,7 +6,7 @@ const DEFAULT_CONFIG = { DASHBOARD_URL: "/dashboard", //版本号 - APP_VER: "3.1.2026071608", + APP_VER: "3.1.2026072309", //内核版本号 CORE_VER: "1.6.9", diff --git a/src/style/pages.scss b/src/style/pages.scss index 906b4ce3..87449d90 100644 --- a/src/style/pages.scss +++ b/src/style/pages.scss @@ -62,6 +62,11 @@ position: relative; } + /* 显式声明 nopadding 的区域不受上面默认内边距影响 */ + .el-main.nopadding { + padding: 0; + } + /* 表单卡片化 */ .el-main > .el-form { background: var(--el-bg-color); @@ -159,6 +164,11 @@ padding: 14px 10px 14px 14px; overflow-y: auto; } + .el-aside.nopadding { + background: transparent; + border-left: 0; + padding: 0; + } } /* ============================================================ diff --git a/src/views/edu/paper_form.vue b/src/views/edu/paper_form.vue index 28236285..92662d62 100644 --- a/src/views/edu/paper_form.vue +++ b/src/views/edu/paper_form.vue @@ -208,7 +208,7 @@ >保 存 - + - - 否 - 是 + 是 + 免检 + 否 diff --git a/src/views/inm/mioitem_check.vue b/src/views/inm/mioitem_check.vue index a9869012..694cb030 100644 --- a/src/views/inm/mioitem_check.vue +++ b/src/views/inm/mioitem_check.vue @@ -1,5 +1,5 @@ - - 取消 - + 没有找到该前缀的发货编号,请完善发货流水号位数(填整数) diff --git a/src/views/inm/packPrint_form.vue b/src/views/inm/packPrint_form.vue index 71a713a8..b3a1657e 100644 --- a/src/views/inm/packPrint_form.vue +++ b/src/views/inm/packPrint_form.vue @@ -1,5 +1,5 @@ - + + + + + + + + + + + + + + + + @@ -207,7 +219,7 @@ export default { edit: "编辑物料", show: "查看物料", }, - form: {}, + form: { test_mode_in: 20 }, rules: { name: [ { @@ -353,6 +365,7 @@ export default { that.form.unit = data.unit; that.form.process = data.process; that.form.tracking = data.tracking; + that.form.test_mode_in = data.test_mode_in; that.form.count_safe = data.count_safe; that.form.count_safe_upper = data.count_safe_upper; that.form.is_hidden = data.is_hidden; diff --git a/src/views/mtm/route.vue b/src/views/mtm/route.vue index b6fe9275..fdb2f33d 100644 --- a/src/views/mtm/route.vue +++ b/src/views/mtm/route.vue @@ -17,14 +17,7 @@ - - + @@ -130,6 +123,9 @@ diff --git a/src/views/mtm/routepack_form.vue b/src/views/mtm/routepack_form.vue index ffce585a..0ea87702 100644 --- a/src/views/mtm/routepack_form.vue +++ b/src/views/mtm/routepack_form.vue @@ -7,7 +7,7 @@ @closed="$emit('closed')" > - + - - 工艺路线流程图 - - + + - + - - + + - + - + 上一步 @@ -194,11 +193,14 @@