This commit is contained in:
shijing 2026-07-23 13:24:58 +08:00
commit 070b41fd51
41 changed files with 1388 additions and 137 deletions

View File

@ -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: 新增功能

View File

@ -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",

View File

@ -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) {

View File

@ -0,0 +1,106 @@
<template>
<div class="mnode" :class="'mnode--' + (data.kind || 'mid')">
<Handle type="target" :position="Position.Top" class="mnode__handle" />
<span class="mnode__tag">{{ kindLabel }}</span>
<div class="mnode__name" :title="data.label">{{ data.label }}</div>
<Handle type="source" :position="Position.Bottom" class="mnode__handle" />
</div>
</template>
<script>
import { Handle, Position } from "@vue-flow/core";
// xtFlowEditor xtFlowViewer
export default {
name: "MaterialNode",
components: { Handle },
props: {
// { label, kind: raw|mid|final }
data: { type: Object, default: () => ({}) },
},
data() {
return { Position };
},
computed: {
kindLabel() {
return { raw: "原料", final: "成品", mid: "半成品" }[this.data.kind] || "半成品";
},
},
};
</script>
<style scoped>
.mnode {
position: relative;
width: 150px;
padding: 6px 10px 8px;
border-radius: 8px;
border: 1px solid #dcdfe6;
background: #fff;
box-shadow: 0 2px 8px rgba(31, 45, 61, 0.08);
text-align: center;
transition: box-shadow 0.15s, transform 0.15s;
}
.mnode:hover {
box-shadow: 0 4px 14px rgba(31, 45, 61, 0.16);
transform: translateY(-1px);
}
.mnode__tag {
display: inline-block;
font-size: 11px;
line-height: 1;
padding: 2px 6px;
border-radius: 8px;
margin-bottom: 5px;
color: #fff;
}
.mnode__name {
font-size: 12px;
line-height: 1.3;
color: #303133;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.mnode--raw {
border-color: #f0c78a;
background: #fffaf2;
}
.mnode--raw .mnode__tag {
background: #e6a23c;
}
.mnode--mid {
border-color: #a3d0ff;
background: #f5faff;
}
.mnode--mid .mnode__tag {
background: #409eff;
}
.mnode--final {
border-color: #a4da89;
background: #f6fcf1;
}
.mnode--final .mnode__tag {
background: #67c23a;
}
</style>
<style>
/* Vue Flow 内部元素(非 scoped */
.vue-flow__node-material {
background: transparent;
border: none;
padding: 0;
}
.vue-flow__handle {
width: 9px;
height: 9px;
background: #fff;
border: 2px solid #409eff;
}
.vue-flow__handle:hover {
background: #409eff;
}
</style>

View File

@ -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 } };
});
}

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
title="绑定定位卡"
destroy-on-close
v-model="pageShow"

View File

@ -0,0 +1,687 @@
<template>
<div class="flow-editor" v-loading="loading">
<!-- 顶部工具栏 -->
<div class="flow-toolbar">
<div class="flow-toolbar__left">
<el-button v-if="!readonly" type="primary" icon="el-icon-plus" size="small" round @click="addStep">新增工序</el-button>
<el-button icon="el-icon-magic-stick" size="small" round @click="relayout">自动布局</el-button>
<el-button icon="el-icon-full-screen" size="small" round @click="doFit">适应画布</el-button>
<el-button icon="el-icon-circle-check" size="small" round @click="doValidate" :loading="validating">校验</el-button>
</div>
<div class="flow-legend">
<span class="lg lg--raw">原料</span>
<span class="lg lg--mid">半成品</span>
<span class="lg lg--final">成品</span>
</div>
</div>
<div class="flow-tip" v-if="!readonly">
从左侧拖入原料作为起点 节点间拉线新建工序拉到空白处自动生成半成品连到产品节点收尾单击线条编辑右键线条删工序 / 右键节点移除物料
</div>
<div class="flow-tip flow-tip--ro" v-else>当前状态不可编辑仅创建中的工艺可编辑</div>
<div class="flow-body">
<!-- 左侧物料面板拖入画布作为节点 -->
<div class="flow-palette" v-if="!readonly">
<div class="palette-head">
<div class="palette-title">物料库</div>
<el-select v-model="matType" size="small" @change="loadMaterials" style="width: 100%">
<el-option label="主要原料" value="30"></el-option>
<el-option label="成品" value="10"></el-option>
<el-option label="半成品" value="20"></el-option>
</el-select>
<el-input
v-model="matKeyword"
size="small"
clearable
prefix-icon="el-icon-search"
placeholder="搜索物料"
style="margin-top: 6px"
></el-input>
</div>
<div class="palette-list" v-loading="matLoading">
<div
v-for="m in filteredMaterials"
:key="m.id"
class="palette-item"
:draggable="true"
@dragstart="onDragStart($event, m)"
:title="m.full_name"
>
<i class="el-icon-rank palette-item__grip"></i>
<span class="palette-item__txt">{{ m.full_name }}</span>
</div>
<div v-if="!matLoading && filteredMaterials.length === 0" class="palette-empty">无匹配物料</div>
</div>
</div>
<!-- 画布 -->
<div class="flow-canvas" @drop="onDrop" @dragover.prevent>
<VueFlow
:id="flowId"
:default-viewport="{ zoom: 0.9 }"
:min-zoom="0.2"
:max-zoom="2"
:nodes-draggable="true"
:nodes-connectable="!readonly"
:elements-selectable="true"
@nodes-initialized="onNodesInit"
@connect-start="onConnectStart"
@connect="onConnect"
@connect-end="onConnectEnd"
@edge-click="onEdgeClick"
@edge-context-menu="onEdgeContextMenu"
@node-context-menu="onNodeContextMenu"
>
<!-- 自定义物料节点 xtFlowViewer 共用 -->
<template #node-material="{ data }">
<material-node :data="data" />
</template>
<Background :gap="18" pattern-color="#e6e9ef" />
<Controls :show-interactive="false" />
</VueFlow>
<div v-if="!loading && nodes.length === 0" class="flow-empty">
<i class="el-icon-position flow-empty__icon"></i>
<div>从左侧把原料拖到这里开始搭建工艺路线</div>
</div>
</div>
</div>
<!-- 复用现有单步表单新增/编辑一条 Route -->
<route-form
v-if="dialogVisible"
ref="routeForm"
:count="count"
:routepack="routepack"
@success="onFormSuccess"
@closed="dialogVisible = false"
></route-form>
</div>
</template>
<script>
import { VueFlow, useVueFlow } from "@vue-flow/core";
import { Background } from "@vue-flow/background";
import { Controls } from "@vue-flow/controls";
import routeForm from "@/views/mtm/route_form.vue";
import MaterialNode from "./flow/MaterialNode.vue";
import { layoutGraph } from "./flow/dagreLayout";
import "@vue-flow/core/dist/style.css";
import "@vue-flow/core/dist/theme-default.css";
import "@vue-flow/controls/dist/style.css";
// flowId Vue Flow store id
let flowSeq = 0;
export default {
name: "xtFlowEditor",
components: { VueFlow, Background, Controls, routeForm, MaterialNode },
props: {
// id
routepack: { type: String, default: "" },
// 线
productId: { type: [String, Number], default: "" },
productName: { type: String, default: "" },
//
readonly: { type: Boolean, default: false },
},
emits: ["changed"],
setup() {
const flowId = "route-flow-editor-" + ++flowSeq;
const { fitView, screenToFlowCoordinate, project, setNodes, setEdges, addNodes, removeNodes } =
useVueFlow(flowId);
return { flowId, fitView, screenToFlowCoordinate, project, setNodes, setEdges, addNodes, removeNodes };
},
data() {
return {
loading: false,
validating: false,
routes: [],
nodes: [],
edges: [],
count: 0,
dialogVisible: false,
//
matType: "30",
matKeyword: "",
materials: [],
matLoading: false,
// Route
seedNodes: [],
// 线
connectSource: null,
connectMade: false,
//
hasFitted: false,
};
},
computed: {
filteredMaterials() {
const kw = (this.matKeyword || "").trim().toLowerCase();
if (!kw) return this.materials;
return this.materials.filter((m) => (m.full_name || "").toLowerCase().includes(kw));
},
},
watch: {
routepack() {
this.reload();
},
productId() {
if (this.routepack) this.reload();
},
},
mounted() {
this.loadMaterials();
if (this.routepack) this.reload();
},
methods: {
/** 加载左侧物料面板列表 */
loadMaterials() {
this.matLoading = true;
this.$API.mtm.material.list
.req({ page: 0, type__in: this.matType, is_hidden: false, query: "{full_name,id}" })
.then((res) => {
this.materials = Array.isArray(res) ? res : res.results || [];
})
.finally(() => {
this.matLoading = false;
});
},
/** 重新拉取路线并重建图 */
reload() {
if (!this.routepack) return;
this.loading = true;
this.$API.mtm.route.list
.req({ page: 0, routepack: this.routepack })
.then((res) => {
this.routes = Array.isArray(res) ? res : res.results || [];
this.count = this.routes.length;
this.buildGraph();
})
.finally(() => {
this.loading = false;
});
},
/** 物料真实类型 → 节点配色10成品 30原料 其余半成品 */
kindOfType(t) {
const s = String(t);
if (s === "10") return "final";
if (s === "30") return "raw";
return "mid";
},
/** 拓扑推断兜底(后端未返回物料类型时用):起点原料 / 终点成品 / 中间半成品 */
kindOf(id, targetIds) {
const isSrc = this.routes.some((r) => String(r.material_in) === id);
const isTgt = targetIds.has(id);
if (isTgt && !isSrc) return "final";
if (!isTgt && isSrc) return "raw";
return "mid";
},
/** 由 routes 构建 物料节点 + 工序边,并用 dagre 自动布局;合并未落库的种子节点 */
buildGraph() {
const matMap = {};
const matKind = {};
const targetIds = new Set();
const edges = [];
this.routes.forEach((r) => {
if (r.material_in == null || r.material_out == null) return;
const sid = String(r.material_in);
const tid = String(r.material_out);
if (!matMap[sid]) matMap[sid] = r.material_in_name || sid;
if (!matMap[tid]) matMap[tid] = r.material_out_name || tid;
if (r.material_in_type != null) matKind[sid] = this.kindOfType(r.material_in_type);
if (r.material_out_type != null) matKind[tid] = this.kindOfType(r.material_out_type);
targetIds.add(tid);
const locked = !!r.from_route;
edges.push({
id: String(r.id),
source: sid,
target: tid,
label: (r.process_name || "") + (locked ? " 🔒" : ""),
data: { route: r, locked },
type: "smoothstep",
markerEnd: "arrowclosed",
style: {
stroke: locked ? "#c0c4cc" : "#409eff",
strokeWidth: locked ? 1.5 : 2,
strokeDasharray: locked ? "5 4" : undefined,
},
labelStyle: { fill: "#5b6370", fontSize: "12px", fontWeight: 500 },
labelBgStyle: { fill: "#ffffff", stroke: "#e4e7ed", strokeWidth: 1 },
labelBgPadding: [7, 4],
labelBgBorderRadius: 6,
});
});
const routeNodes = Object.keys(matMap).map((id) => ({
id,
type: "material",
data: { label: matMap[id], kind: matKind[id] || this.kindOf(id, targetIds) },
position: { x: 0, y: 0 },
}));
//
const pid = this.productId ? String(this.productId) : "";
if (pid && !matMap[pid]) {
routeNodes.push({
id: pid,
type: "material",
data: { label: this.productName || "产品", kind: "final" },
position: { x: 0, y: 0 },
});
}
//
const routeNodeIds = new Set(Object.keys(matMap));
if (pid) routeNodeIds.add(pid);
this.seedNodes = this.seedNodes.filter((s) => !routeNodeIds.has(s.id));
this.edges = edges;
this.nodes = layoutGraph(routeNodes.concat(this.seedNodes), edges);
this.syncStore();
},
/** 把本地 nodes/edges 命令式同步到 Vue Flow store先节点后边避免边找不到端点 */
syncStore() {
this.setEdges([]);
this.setNodes(this.nodes);
this.setEdges(this.edges);
},
/** 重新布局并适应画布 */
relayout() {
this.nodes = layoutGraph([...this.nodes], this.edges);
this.setNodes(this.nodes);
this.doFit();
},
doFit() {
this.$nextTick(() => {
try {
this.fitView({ padding: 0.25, maxZoom: 1, duration: 300 });
} catch (e) {
/* noop */
}
});
},
/** VueFlow 节点尺寸测量完成:仅首次自动适配一次 */
onNodesInit() {
if (this.hasFitted) return;
if (this.nodes.length === 0) return;
this.hasFitted = true;
this.doFit();
},
/* ============ 左侧面板拖拽入画布 ============ */
onDragStart(evt, mat) {
evt.dataTransfer.setData(
"application/xtflow",
JSON.stringify({ id: mat.id, name: mat.full_name, type: this.matType })
);
evt.dataTransfer.effectAllowed = "move";
},
onDrop(evt) {
if (this.readonly) return;
const raw = evt.dataTransfer.getData("application/xtflow");
if (!raw) return;
let mat;
try {
mat = JSON.parse(raw);
} catch (e) {
return;
}
const pos = this.toFlowPos(evt.clientX, evt.clientY);
this.addSeed(mat, pos);
},
toFlowPos(clientX, clientY) {
if (typeof this.screenToFlowCoordinate === "function") {
return this.screenToFlowCoordinate({ x: clientX, y: clientY });
}
if (typeof this.project === "function") {
return this.project({ x: clientX, y: clientY });
}
return { x: clientX, y: clientY };
},
addSeed(mat, position) {
const id = String(mat.id);
if (this.nodes.some((n) => n.id === id)) {
const inUse = this.routes.some(
(r) => String(r.material_in) === id || String(r.material_out) === id
);
this.$message.info(inUse ? "该物料已在工序中使用" : "该物料已在画布中(右键节点可移除)");
return;
}
const node = {
id,
type: "material",
data: { label: mat.name, kind: this.kindOfType(mat.type) },
position,
};
this.seedNodes.push(node);
this.nodes = [...this.nodes, node];
// store Handle dimensions
this.addNodes([node]);
},
/* ============ 连线手势 ============ */
onConnectStart(params) {
this.connectSource = (params && (params.nodeId || params.source)) || null;
this.connectMade = false;
},
/** 连到已有节点:新建一条 Route预填输入/输出物料 */
onConnect(conn) {
this.connectMade = true;
if (this.readonly) return;
const src = this.nodes.find((n) => n.id === conn.source);
const tgt = this.nodes.find((n) => n.id === conn.target);
// id Number()
this.openForm("add", {
material_in: conn.source,
material_in_name: src ? src.data.label : "",
material_out: conn.target,
material_out_name: tgt ? tgt.data.label : "",
});
},
/** 拉线到空白处:新建工序,输出物料留空由后端自动生成下一节点 */
onConnectEnd() {
const src = this.connectSource;
const made = this.connectMade;
this.connectSource = null;
this.connectMade = false;
if (this.readonly || made || !src) return;
const node = this.nodes.find((n) => n.id === src);
// id
this.openForm("add", {
material_in: src,
material_in_name: node ? node.data.label : "",
});
},
/** 单击边 => 编辑对应 Route复用 route_form */
onEdgeClick(evt) {
const edge = evt.edge || evt;
const route = edge.data && edge.data.route;
if (!route) return;
if (this.readonly) {
this.$message.info("当前状态不可编辑");
return;
}
if (edge.data.locked) {
this.$message.warning("该工序引用了其他步骤,无法编辑");
return;
}
this.openForm("edit", route);
},
/** 右键边 => 删除对应 Route */
onEdgeContextMenu(evt) {
const oe = evt.event || evt;
if (oe && oe.preventDefault) oe.preventDefault();
if (this.readonly) return;
const edge = evt.edge || evt;
const route = edge.data && edge.data.route;
if (!route) return;
if (edge.data.locked) {
this.$message.warning("该工序被其他步骤引用,无法删除");
return;
}
this.$confirm(`确定删除工序「${route.process_name || ""}」吗?`, "提示", {
type: "warning",
})
.then(() => {
this.$API.mtm.route.delete.req(route.id).then(() => {
this.$message.success("删除成功");
this.reload();
this.$emit("changed");
});
})
.catch(() => {});
},
/** 右键节点 => 移除未落库的种子节点(已用于工序的物料需删对应工序) */
onNodeContextMenu(evt) {
const oe = evt.event || evt;
if (oe && oe.preventDefault) oe.preventDefault();
if (this.readonly) return;
const node = evt.node || evt;
const nid = node.id;
if (this.productId && nid === String(this.productId)) {
this.$message.warning("产品节点为工艺终点,不可移除");
return;
}
const inUse = this.routes.some(
(r) => String(r.material_in) === nid || String(r.material_out) === nid
);
if (inUse) {
this.$message.warning("该物料已用于工序,请删除对应工序");
return;
}
const label = (node.data && node.data.label) || "";
this.$confirm(`从画布移除「${label}」?`, "提示", { type: "warning" })
.then(() => {
this.seedNodes = this.seedNodes.filter((s) => s.id !== nid);
this.nodes = this.nodes.filter((n) => n.id !== nid);
this.removeNodes([nid]);
})
.catch(() => {});
},
addStep() {
this.openForm("add", null);
},
/** 打开单步表单prefill 为 null 表示纯新增 */
openForm(mode, prefill) {
this.dialogVisible = true;
this.$nextTick(() => {
const inst = this.$refs.routeForm.open(mode);
if (prefill) inst.setData(prefill);
});
},
onFormSuccess() {
this.dialogVisible = false;
this.reload();
this.$emit("changed");
},
/** 调后端 validate 接口,实时反馈 DAG 是否合法 */
doValidate() {
if (!this.routepack) return;
this.validating = true;
this.$API.mtm.routepack.validate
.req(this.routepack)
.then((res) => {
if (res && res.valid) {
this.$message.success("工艺图校验通过");
} else {
this.$message.error("校验未通过:" + (res ? res.error : "未知错误"));
}
})
.finally(() => {
this.validating = false;
});
},
},
};
</script>
<style scoped>
.flow-editor {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
min-height: 480px;
}
.flow-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 4px 8px;
background: #f7f9fc;
border: 1px solid #eef1f6;
border-radius: 8px;
flex-wrap: wrap;
}
.flow-toolbar__left {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.flow-legend {
display: flex;
align-items: center;
gap: 12px;
}
.lg {
position: relative;
padding-left: 16px;
font-size: 12px;
color: #606266;
}
.lg::before {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 10px;
height: 10px;
border-radius: 3px;
border: 1px solid;
}
.lg--raw::before {
background: #fdf6ec;
border-color: #e6a23c;
}
.lg--mid::before {
background: #ecf5ff;
border-color: #409eff;
}
.lg--final::before {
background: #f0f9eb;
border-color: #67c23a;
}
.flow-tip {
color: #909399;
font-size: 12px;
padding: 3px 2px 4px;
}
.flow-tip--ro {
color: #e6a23c;
}
.flow-body {
display: flex;
flex: 1;
min-height: 420px;
gap: 6px;
}
.flow-palette {
width: 190px;
flex: 0 0 190px;
display: flex;
flex-direction: column;
border: 1px solid #eef1f6;
border-radius: 8px;
overflow: hidden;
background: #fff;
}
.palette-head {
padding: 8px;
border-bottom: 1px solid #f0f2f5;
background: #fafbfd;
}
.palette-title {
font-size: 13px;
font-weight: 600;
color: #303133;
margin-bottom: 8px;
}
.palette-list {
flex: 1;
overflow-y: auto;
padding: 8px;
}
.palette-item {
display: flex;
align-items: center;
gap: 6px;
padding: 7px 9px;
margin-bottom: 6px;
border: 1px solid #ebeef5;
border-radius: 6px;
background: #fff;
cursor: grab;
font-size: 12px;
color: #303133;
transition: all 0.15s;
}
.palette-item:hover {
border-color: #409eff;
background: #ecf5ff;
box-shadow: 0 2px 6px rgba(64, 158, 255, 0.15);
transform: translateY(-1px);
}
.palette-item:active {
cursor: grabbing;
}
.palette-item__grip {
color: #c0c4cc;
flex-shrink: 0;
}
.palette-item__txt {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.palette-empty {
color: #909399;
font-size: 12px;
text-align: center;
padding: 16px 0;
}
.flow-canvas {
position: relative;
flex: 1;
min-height: 420px;
border: 1px solid #eef1f6;
border-radius: 8px;
overflow: hidden;
background: #fbfcfe;
}
.flow-empty {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #a8abb2;
font-size: 13px;
text-align: center;
pointer-events: none;
}
.flow-empty__icon {
font-size: 34px;
color: #c8ccd4;
display: block;
margin-bottom: 10px;
}
</style>
<style>
/* Vue Flow 内部元素(非 scoped物料节点样式在 flow/MaterialNode.vue */
.vue-flow__controls {
box-shadow: 0 2px 10px rgba(31, 45, 61, 0.12);
border-radius: 6px;
overflow: hidden;
}
</style>

View File

@ -0,0 +1,261 @@
<template>
<div class="xt-flow-viewer">
<!-- 顶部工具栏 xtFlowEditor 视觉一致 -->
<div class="flow-toolbar">
<div class="flow-toolbar__left">
<el-button icon="el-icon-full-screen" size="small" round @click="doFit">适应画布</el-button>
</div>
<div class="flow-legend">
<span class="lg lg--raw">原料</span>
<span class="lg lg--mid">半成品</span>
<span class="lg lg--final">成品</span>
</div>
</div>
<div class="flow-canvas">
<VueFlow
:id="flowId"
:min-zoom="0.2"
:max-zoom="2"
:nodes-draggable="false"
:nodes-connectable="false"
:elements-selectable="false"
@nodes-initialized="onNodesInit"
>
<template #node-material="{ data }">
<material-node :data="data" />
</template>
<Background :gap="18" pattern-color="#e6e9ef" />
<Controls :show-interactive="false" />
</VueFlow>
<div v-if="isEmpty" class="flow-empty">
<i class="el-icon-warning-outline flow-empty__icon"></i>
<div>暂无工艺图数据</div>
</div>
</div>
</div>
</template>
<script>
import { VueFlow, useVueFlow } from "@vue-flow/core";
import { Background } from "@vue-flow/background";
import { Controls } from "@vue-flow/controls";
import MaterialNode from "./flow/MaterialNode.vue";
import { layoutGraph } from "./flow/dagreLayout";
import "@vue-flow/core/dist/style.css";
import "@vue-flow/core/dist/theme-default.css";
import "@vue-flow/controls/dist/style.css";
// flowId Vue Flow store id
let viewerSeq = 0;
/**
* 工艺路线只读流程图Vue Flow xtFlowEditor 共用节点样式与布局
* props scDegra 对齐nodes [{id,label}]edges [{id,source,target,label}]
*/
export default {
name: "xtFlowViewer",
components: { VueFlow, Background, Controls, MaterialNode },
props: {
nodes: { type: Array, default: () => [] },
edges: { type: Array, default: () => [] },
rankdir: { type: String, default: "TB" },
},
setup() {
const flowId = "xt-flow-viewer-" + ++viewerSeq;
const { fitView, setNodes, setEdges } = useVueFlow(flowId);
return { flowId, fitView, setNodes, setEdges };
},
data() {
return {
// fit
hasFitted: false,
rebuildPending: false,
};
},
computed: {
isEmpty() {
return !(this.nodes || []).length;
},
},
watch: {
nodes() {
this.scheduleRebuild();
},
edges() {
this.scheduleRebuild();
},
},
mounted() {
this.rebuild();
},
methods: {
/** nodes/edges 通常被先后赋值,用微任务合并成一次 rebuild避免双次 dagre 布局 */
scheduleRebuild() {
if (this.rebuildPending) return;
this.rebuildPending = true;
Promise.resolve().then(() => {
this.rebuildPending = false;
this.rebuild();
});
},
/** nodes/edges -> Vue Flow 图;节点类型按出入度推断(无入边=原料,无出边=成品) */
rebuild() {
const sourceIds = new Set();
const targetIds = new Set();
const rawEdges = (this.edges || [])
.filter((e) => e.source != null && e.target != null)
.map((e) => {
const sid = String(e.source);
const tid = String(e.target);
sourceIds.add(sid);
targetIds.add(tid);
return {
id: e.id != null ? String(e.id) : sid + "-" + tid,
source: sid,
target: tid,
label: e.label || "",
type: "smoothstep",
markerEnd: "arrowclosed",
style: { stroke: "#409eff", strokeWidth: 2 },
labelStyle: { fill: "#5b6370", fontSize: "12px", fontWeight: 500 },
labelBgStyle: { fill: "#ffffff", stroke: "#e4e7ed", strokeWidth: 1 },
labelBgPadding: [7, 4],
labelBgBorderRadius: 6,
};
});
const vNodes = (this.nodes || [])
.filter((n) => n.id != null && n.label)
.map((n) => {
const id = String(n.id);
const isSrc = sourceIds.has(id);
const isTgt = targetIds.has(id);
let kind = "mid";
if (isTgt && !isSrc) kind = "final";
else if (isSrc && !isTgt) kind = "raw";
return { id, type: "material", data: { label: n.label, kind }, position: { x: 0, y: 0 } };
});
const nodeIds = new Set(vNodes.map((n) => n.id));
const vEdges = rawEdges.filter((e) => nodeIds.has(e.source) && nodeIds.has(e.target));
this.setEdges([]);
this.setNodes(layoutGraph(vNodes, vEdges, { rankdir: this.rankdir }));
this.setEdges(vEdges);
// nodes-initialized fit fit
if (this.hasFitted) this.doFit();
},
onNodesInit() {
this.doFit();
},
doFit() {
this.$nextTick(() => {
try {
this.fitView({ padding: 0.2, maxZoom: 1, duration: this.hasFitted ? 200 : 0 });
this.hasFitted = true;
} catch (e) {
/* noop */
}
});
},
},
};
</script>
<style scoped>
.xt-flow-viewer {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
min-height: 320px;
gap: 6px;
}
.flow-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 4px 8px;
background: #f7f9fc;
border: 1px solid #eef1f6;
border-radius: 8px;
flex-wrap: wrap;
}
.flow-toolbar__left {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.flow-legend {
display: flex;
align-items: center;
gap: 12px;
}
.lg {
position: relative;
padding-left: 16px;
font-size: 12px;
color: #606266;
}
.lg::before {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 10px;
height: 10px;
border-radius: 3px;
border: 1px solid;
}
.lg--raw::before {
background: #fdf6ec;
border-color: #e6a23c;
}
.lg--mid::before {
background: #ecf5ff;
border-color: #409eff;
}
.lg--final::before {
background: #f0f9eb;
border-color: #67c23a;
}
.flow-canvas {
position: relative;
flex: 1;
min-height: 280px;
border: 1px solid #eef1f6;
border-radius: 8px;
overflow: hidden;
background: #fbfcfe;
}
.flow-empty {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #a8abb2;
font-size: 13px;
text-align: center;
pointer-events: none;
}
.flow-empty__icon {
font-size: 34px;
color: #c8ccd4;
display: block;
margin-bottom: 10px;
}
/* 只读视图:隐藏连接点 */
.xt-flow-viewer :deep(.vue-flow__handle) {
opacity: 0;
pointer-events: none;
}
</style>
<style>
.xt-flow-viewer .vue-flow__controls {
box-shadow: 0 2px 10px rgba(31, 45, 61, 0.12);
border-radius: 6px;
overflow: hidden;
}
</style>

View File

@ -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",

View File

@ -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;
}
}
/* ============================================================

View File

@ -208,7 +208,7 @@
> </el-button
>
</el-footer>
<el-dialog title="选择题目" v-model="questionCVisible" width="90%">
<el-dialog append-to-body title="选择题目" v-model="questionCVisible" width="90%">
<Question
style="height: 500px"
ref="QuestionChoseRef"
@ -219,7 +219,7 @@
</template>
</el-dialog>
<!-- <el-button type="primary" @click="handleChoose1" icon="el-icon-plus" style="margin-right: 10px;">上传试题</el-button> -->
<el-dialog
<el-dialog append-to-body
v-model="impDialogVisible"
title="上传试题"
:left="'200px'"

View File

@ -149,8 +149,9 @@
</el-table-column>
<el-table-column label="检验提交" prop="count_tested" v-if="cate=='mainso'&&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')">
<template #default="scope">
<el-tag v-if="scope.row.test_date == null" type="warning"></el-tag>
<el-tag v-else type="success"></el-tag>
<el-tag v-if="scope.row.test_date !== null" type="success"></el-tag>
<el-tag v-else-if="scope.row.material_&&scope.row.material_.test_mode_in==10" type="info">免检</el-tag>
<el-tag v-else type="warning"></el-tag>
</template>
</el-table-column>
<el-table-column label="不合格数量" prop="count_notok" v-if="cate!=='helpso'">

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
title="检验"
v-model="visible"
:size="1200"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
:title="titleMap[form.type]"
v-model="visible"
:size="1000"
@ -272,7 +272,7 @@
<el-button @click="visible = false">取消</el-button>
</template>
</el-dialog>
<el-dialog title="设置发货流水位数" v-model="showDigit">
<el-dialog append-to-body title="设置发货流水位数" v-model="showDigit">
<h4>没有找到该前缀的发货编号请完善发货流水号位数填整数</h4>
<el-form :model="wprParams" label-width="80px">
<el-form-item label="流水位数">

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
title="标签信息"
v-model="visible"
:size="1000"

View File

@ -132,6 +132,18 @@
<el-switch v-model="form.is_hidden" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="入库检验方式" prop="test_mode_in">
<el-select
v-model="form.test_mode_in"
placeholder="入库检验方式"
style="width: 100%"
>
<el-option label="免检" :value="10"></el-option>
<el-option label="必检" :value="20"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="安全库存下限" prop="count_safe">
<el-input-number
@ -231,7 +243,7 @@ export default {
show: "查看物料",
},
brothers: [],
form: {},
form: { test_mode_in: 20 },
rules: {
name: [
{

View File

@ -157,6 +157,18 @@
<el-switch v-model="form.is_hidden" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="入库检验方式" prop="test_mode_in">
<el-select
v-model="form.test_mode_in"
placeholder="入库检验方式"
style="width: 100%"
>
<el-option label="免检" :value="10"></el-option>
<el-option label="必检" :value="20"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="form.type == 40">
<el-form-item label="是否进入车间库存">
<el-switch v-model="form.into_wm" />
@ -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;

View File

@ -17,14 +17,7 @@
</div>
</el-header>
<el-main class="nopadding">
<scDegra
style="margin-top: 50px;"
ref="degraDialogs"
:nodes="nodes"
:edges="edges"
:rankdir="'DL'"
>
</scDegra>
<xtFlowViewer :nodes="nodes" :edges="edges"></xtFlowViewer>
</el-main>
</el-container>
</el-aside>
@ -130,6 +123,9 @@
</el-dialog>
</template>
<script>
import { defineAsyncComponent } from "vue";
// Vue Flow
const xtFlowViewer = defineAsyncComponent(() => import(/* webpackPrefetch: true */ "@/components/xtFlowViewer.vue"));
const defaultForm = {
process: null,
sort: 1,
@ -139,7 +135,7 @@ const defaultForm = {
};
export default {
name: "route",
components: {},
components: { xtFlowViewer },
data() {
return {
apiObj: null,

View File

@ -3,6 +3,7 @@
:title="titleMap[mode]"
v-model="visible"
:size="1000"
append-to-body
destroy-on-close
@closed="$emit('closed')"
>
@ -484,16 +485,18 @@ export default {
Object.assign(that.form, data);
that.routeId = data.id;
that.addTemplate.route = data.id;
that.params_json=that.form.params_json;
// 线(prefill)params_json,undefined
if (that.form.params_json) {
that.params_json = Object.assign({}, that.params_json, that.form.params_json);
}
if((this.project_code=='bxerp'||this.project_code=='tcerp')&&this.form.material_out_tracking==null){
this.form.material_out_tracking = 20;
}
if(data.process_name=='捆棒'){
that.params_json2=that.form.params_json;
if(data.process_name=='捆棒'&&that.form.params_json){
that.params_json2 = Object.assign({}, that.params_json2, that.form.params_json);
}
if(data.process_name=='排一次棒'){
that.fileIds= [];
that.params_json=that.form.params_json;
if(that.params_json.fileurl&&that.params_json.fileurl!=="[]"){
let fileurl = JSON.parse(that.params_json.fileurl);
fileurl.forEach((item)=>{

View File

@ -1,79 +1,81 @@
<template>
<el-container v-loading="loading">
<el-container class="rs-page" v-loading="loading">
<el-main class="nopadding rs-main">
<!-- 基本信息条 -->
<div class="rs-card rs-head">
<div class="rs-card__title">基本信息</div>
<div class="rs-head__items">
<div class="rs-head__item">
<span class="rs-lbl">工艺名称</span>
<span class="rs-val">{{ form.name || "-" }}</span>
</div>
<div class="rs-head__item">
<span class="rs-lbl">物料名称</span>
<span class="rs-val">{{ form.material_name || "-" }}</span>
</div>
</div>
</div>
<el-main class="nopadding" style="padding-right: 1px;">
<el-container>
<el-header style="height: 80px;display: block;padding:0">
<el-card shadow="hover">
<el-descriptions :column="3" title="基本信息">
<el-descriptions-item label="工艺名称:">{{
form.name
}}</el-descriptions-item>
<el-descriptions-item label="物料名称:">{{
form.material_name
}}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-header>
<el-main>
<el-container>
<el-aside style="width: 50%;overflow: scroll;">
<div
style="font-weight: 600;color: #303133;font-size: 16px;padding: 10px 0;position: fixed;">
工艺路线流程图</div>
<el-tabs v-if="tabsTitle.length > 1" v-model="activeName" :tab-position="'left'"
style="flex-direction: row;" @tab-click="tabshandleClick">
<el-tab-pane :label="item" v-for="item in tabsTitle" :key="item"></el-tab-pane>
</el-tabs>
<scDegra style="margin-top: 50px;" v-if="limitedWatch" ref="degraDialogs" :nodes="nodes"
:edges="edges" :rankdir="'DL'" @closeDialog="limitedWatch = false">
</scDegra>
</el-aside>
<el-main class="padding: 1px">
<scTable ref="tables" :data="tableData" row-key="id" hidePagination hideDo stripe border>
<el-table-column label="排序" prop="sort" width="50">
</el-table-column>
<el-table-column label="工序" prop="process_name">
</el-table-column>
<el-table-column label="输入" prop="material_in_name">
</el-table-column>
<el-table-column label="输出" prop="material_out_name">
</el-table-column>
<el-table-column label="追踪方式">
<template #default="scope">
<span>{{ tracking_[scope.row.material_out_tracking] }}</span>
</template>
</el-table-column>
<el-table-column label="出材率" prop="out_rate">
</el-table-column>
<el-table-column label="切分融合数量" prop="div_number">
</el-table-column>
<el-table-column label="工时" prop="hour_work">
</el-table-column>
<el-table-column label="批次校验" v-if="project_code !== 'bxerp'">
<template #default="scope">
<el-tag v-if="scope.row.batch_bind" type="success"></el-tag>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<div class="rs-body">
<!-- 流程图卡 -->
<div class="rs-card rs-flow">
<div class="rs-card__title">工艺路线流程图</div>
<el-tabs v-if="tabsTitle.length > 1" v-model="activeName" class="rs-tabs"
@tab-click="tabshandleClick">
<el-tab-pane :label="item" v-for="item in tabsTitle" :key="item"></el-tab-pane>
</el-tabs>
<xtFlowViewer v-if="limitedWatch" :nodes="nodes" :edges="edges" class="rs-flow__canvas"
style="min-height: 0">
</xtFlowViewer>
</div>
</el-main>
</el-container>
<!-- 工序表格卡 -->
<div class="rs-card rs-steps">
<div class="rs-card__title">工序步骤</div>
<div class="rs-steps__table">
<scTable ref="tables" :data="tableData" row-key="id" hidePagination hideDo stripe border>
<el-table-column label="排序" prop="sort" width="50">
</el-table-column>
<el-table-column label="工序" prop="process_name">
</el-table-column>
<el-table-column label="输入" prop="material_in_name">
</el-table-column>
<el-table-column label="输出" prop="material_out_name">
</el-table-column>
<el-table-column label="追踪方式" width="80">
<template #default="scope">
<span>{{ tracking_[scope.row.material_out_tracking] }}</span>
</template>
</el-table-column>
<el-table-column label="出材率" prop="out_rate" width="70">
</el-table-column>
<el-table-column label="切分融合数量" prop="div_number" width="80">
</el-table-column>
<el-table-column label="工时" prop="hour_work" width="60">
</el-table-column>
<el-table-column label="批次校验" width="80" v-if="project_code !== 'bxerp'">
<template #default="scope">
<el-tag v-if="scope.row.batch_bind" type="success"></el-tag>
</template>
</el-table-column>
</scTable>
</div>
</div>
</div>
</el-main>
<el-aside width="20%" v-if="form.ticket">
<el-aside width="20%" v-if="form.ticket" class="rs-aside">
<ticketd :ticket_="form.ticket_"></ticketd>
</el-aside>
</el-container>
</template>
<script>
import { defineAsyncComponent } from "vue";
import ticketd from '@/views/wf/ticketd.vue'
// Vue Flow
const xtFlowViewer = defineAsyncComponent(() => import(/* webpackPrefetch: true */ "@/components/xtFlowViewer.vue"));
export default {
emits: ["success", "closed"],
components: { ticketd },
components: { ticketd, xtFlowViewer },
props: {
t_id: { type: String, default: null },
},
@ -178,7 +180,99 @@ export default {
</script>
<style scoped>
.el-transfer {
--el-transfer-panel-width: 345px !important;
/* 页面底色:浅灰承托白卡 */
.rs-page {
height: 100%;
background: #f5f7fa;
}
.rs-main {
display: flex;
flex-direction: column;
gap: 10px;
padding: 10px;
overflow: hidden;
}
/* 统一卡片语言 */
.rs-card {
background: #fff;
border: 1px solid #ebeef5;
border-radius: 10px;
box-shadow: 0 1px 2px rgba(31, 45, 61, 0.04);
padding: 12px 14px;
}
.rs-card__title {
display: flex;
align-items: center;
gap: 8px;
font-size: 15px;
font-weight: 600;
color: #303133;
margin-bottom: 10px;
}
.rs-card__title::before {
content: "";
width: 3px;
height: 14px;
border-radius: 2px;
background: var(--el-color-primary, #409eff);
}
/* 基本信息条:单行轻量 */
.rs-head {
flex-shrink: 0;
padding-bottom: 10px;
}
.rs-head .rs-card__title {
margin-bottom: 8px;
}
.rs-head__items {
display: flex;
gap: 48px;
flex-wrap: wrap;
}
.rs-lbl {
color: #909399;
font-size: 13px;
margin-right: 10px;
}
.rs-val {
color: #303133;
font-size: 13px;
font-weight: 500;
}
/* 主体:流程图 + 工序表 两卡并排 */
.rs-body {
flex: 1;
min-height: 0;
display: flex;
gap: 10px;
}
.rs-flow {
width: 50%;
display: flex;
flex-direction: column;
overflow: hidden;
}
.rs-flow__canvas {
flex: 1;
min-height: 0;
}
.rs-tabs :deep(.el-tabs__header) {
margin: 0 0 8px;
}
.rs-steps {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.rs-steps__table {
flex: 1;
min-height: 0;
}
/* 右侧工单/审批面板:与主体同底色,间距交给 ticketd 自身的内边距 */
.rs-aside {
background: #f5f7fa;
padding: 0;
}
</style>

View File

@ -7,7 +7,7 @@
@closed="$emit('closed')"
>
<el-container>
<el-header>
<el-header style="height: auto; padding: 6px 20px 0">
<el-steps
:active="active"
style="width: 100%"
@ -93,30 +93,29 @@
<!--工序!-->
<el-main class="nopadding" v-if="active === 1">
<el-container>
<el-aside style="width: 50%;overflow: scroll;">
<div style="font-weight: 600;color: #303133;font-size: 16px;padding: 10px 0;position: fixed;width: 30px;">工艺路线流程图</div>
<scDegra
style="margin-top: 50px;"
v-if="limitedWatch"
ref="degraDialogs"
:nodes="nodes"
:edges="edges"
:rankdir="'DL'"
>
</scDegra>
<el-aside class="nopadding" style="width: 55%;overflow: hidden;padding-right: 6px;">
<xtFlowEditor
ref="flowEditor"
:routepack="routepack"
:product-id="form.material || ''"
:product-name="form.material_name || ''"
:readonly="!!(form.state && form.state !== 10)"
@changed="handleEditorChanged"
></xtFlowEditor>
</el-aside>
<el-main style="width: 50%;overflow: scroll;">
<el-main class="nopadding" style="width: 45%;overflow: auto;">
<el-container>
<el-header>
<div class="left-panel" style="margin: 10px">
<el-header style="height: auto; padding: 4px 0">
<div class="left-panel">
<el-button
type="primary"
icon="el-icon-plus"
size="small"
@click="table_add"
></el-button>
</div>
</el-header>
<el-main>
<el-main class="nopadding">
<scTable
ref="tables"
:apiObj="apiObj"
@ -176,7 +175,7 @@
</el-main>
</el-container>
</el-main>
<el-footer v-if="active === 1" style="text-align: center">
<el-footer v-if="active === 1" style="height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px;">
<el-button @click="handleLastStep" style="margin-right: 4px">上一步</el-button>
<ticketd_b :workflow_key="'routepack'" :title="form.name" :t_id="form.id" :ticket_="form.ticket_"
@success="$emit('closed')"></ticketd_b>
@ -194,11 +193,14 @@
</el-drawer>
</template>
<script>
import { defineAsyncComponent } from "vue";
import saveDialog from "./route_form.vue";
import ticketd_b from "@/views/wf/ticketd_b.vue";
// Vue Flow + dagre
const xtFlowEditor = defineAsyncComponent(() => import(/* webpackPrefetch: true */ "@/components/xtFlowEditor.vue"));
export default {
name: "routepack_form",
components: { saveDialog, ticketd_b },
components: { saveDialog, ticketd_b, xtFlowEditor },
data() {
return {
active: 0,
@ -369,7 +371,7 @@ export default {
let that = this;
that.$API.mtm.route.delete.req(row.id).then((res) => {
that.$message.success("工序步骤删除成功");
that.getDEGdatas();
that.$refs.flowEditor && that.$refs.flowEditor.reload();
that.$refs.tables.refresh();
return res;
}).catch((err) => {
@ -378,10 +380,13 @@ export default {
},
//
handleSaveSuccess() {
console.log("handleSaveSuccess");
let that = this;
that.$refs.tables.refresh();
that.getDEGdatas();
that.$refs.flowEditor && that.$refs.flowEditor.reload();
},
// ->
handleEditorChanged() {
this.$refs.tables && this.$refs.tables.refresh();
},
},
};

View File

@ -6,7 +6,7 @@
label-width="auto"
style="margin-top: 20px"
>
<el-form-item label="领料时校验是否检验">
<el-form-item label="领料时校验是否检验(总开关,物料可单独设为免检)">
<el-switch v-model="form.mes.check_test_when_do_out"></el-switch>
</el-form-item>
<el-divider />
@ -51,7 +51,16 @@ export default {
})
},
submitForm() {
this.saveLoading = true;
this.$API.system.config.updateInfo.req({
mes: this.form.mes,
sms: this.form.sms
}).then(() => {
this.$message.success("保存成功");
this.saveLoading = false;
}).catch(() => {
this.saveLoading = false;
})
}
}
}

View File

@ -100,7 +100,7 @@
</el-main>
<ScBind v-model="showBindBlt" :bindBtl="bindBtl" :bindType="bindType" :bindName="bindName"
:bindEmployee="bindEmployee" @success="showBindBltSuccess" @closed="showBindBltClose"></ScBind>
<el-dialog title="提前离厂" v-model="leaveVisible" width="30%">
<el-dialog append-to-body title="提前离厂" v-model="leaveVisible" width="30%">
<el-form ref="dialogForm" label-width="80px">
<el-form-item label="离厂原因">
<el-input v-model="reason" type="text" clearable></el-input>
@ -112,7 +112,7 @@
</template>
</el-dialog>
<!-- 人员添加编辑 -->
<el-dialog v-model="workerVisible" :title="workDialogTitle">
<el-dialog append-to-body v-model="workerVisible" :title="workDialogTitle">
<el-form ref="workerForm" :model="formworker" label-width="120px">
<el-row>
<el-col :md="24" :sm="12" :xs="24">

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-dialog
<el-dialog append-to-body
title="打印物料标签"
v-model="visible"
destroy-on-close

View File

@ -286,7 +286,7 @@
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
<el-dialog v-model="printVisible" width="1200px">
<el-dialog append-to-body v-model="printVisible" width="1200px">
<print :baseData="form" :tableData="tableData" :type="form.type" mtype="20" @closePrint="printVisible=false"/>
</el-dialog>
<print-dialog

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
:title="titleMap[form.type]"
v-model="visible"
:size="1000"

View File

@ -276,7 +276,7 @@
</scTable>
</el-card>
<!-- 输入物料编辑 -->
<el-dialog v-model="saveInDialog" title="编辑">
<el-dialog append-to-body v-model="saveInDialog" title="编辑">
<el-form
:model="saveInForm"
:rules="rules"
@ -444,7 +444,7 @@
@closed="dialog.edit = false"
>
</edit-dialog>
<el-dialog v-model="printVisible" width="1200px">
<el-dialog append-to-body v-model="printVisible" width="1200px">
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="102" @closePrint="printVisible=false"/>
</el-dialog>
</div>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
:title="titleMap[mode]"
v-model="visible"
style="width: 80%;"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
title="过程检验"
v-model="visible"
:size="1000"

View File

@ -1,6 +1,6 @@
<!-- 新增mlogbIn -->
<template>
<el-dialog
<el-dialog append-to-body
title="添加日志详情"
v-model="visible"
:size="1000"

View File

@ -274,7 +274,7 @@
</sc-form-table>
</el-main>
</el-container>
<el-dialog
<el-dialog append-to-body
title="检验"
v-model="checkVisible"
destroy-on-close
@ -378,7 +378,7 @@
</el-main>
</el-container>
</el-dialog>
<el-dialog
<el-dialog append-to-body
title="批量检验"
v-model="setVisible"
destroy-on-close

View File

@ -68,7 +68,7 @@
<el-button type="primary" @click="mtaskb_submit">提交</el-button>
</div>
</div>
<el-dialog v-model="printVisible" width="1200px">
<el-dialog append-to-body v-model="printVisible" width="1200px">
<print :baseData="mtaskObj" type="mtask" @closePrint="printVisible=false"/>
</el-dialog>
</el-drawer>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
:title="titleMap[mode]"
v-model="visible"
destroy-on-close

View File

@ -116,7 +116,7 @@
@closed="dialog.check = false"
>
</check-dialog>
<el-dialog v-model="printVisible" width="1200px">
<el-dialog append-to-body v-model="printVisible" width="1200px">
<print :baseData="fmlogItem" :tableData="tableData" type="101" @closePrint="printVisible=false"/>
</el-dialog>
</div>

View File

@ -310,7 +310,7 @@
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
<el-dialog v-model="printVisible" width="1200px">
<el-dialog append-to-body v-model="printVisible" width="1200px">
<print :baseData="form" :tableData="tableData" :type="form.type" mtype="20" @closePrint="printVisible=false"/>
</el-dialog>
<print-dialog

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
:title="titleMap[form.type]"
v-model="visible"
style="width: 80%;"

View File

@ -168,7 +168,7 @@
</scTable>
</el-card>
<!-- 输入物料编辑 -->
<el-dialog v-model="saveInDialog" title="编辑">
<el-dialog append-to-body v-model="saveInDialog" title="编辑">
<el-form
:model="saveInForm"
:rules="rules"
@ -359,7 +359,7 @@
@closed="dialog.edit = false"
>
</edit-dialog>
<el-dialog v-model="printVisible" width="1200px">
<el-dialog append-to-body v-model="printVisible" width="1200px">
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="102" @closePrint="printVisible=false"/>
</el-dialog>
<print-dialog

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
:title="titleMap[mode]"
v-model="visible"
destroy-on-close

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
title="过程检验"
v-model="visible"
style="width: 80%;"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<el-dialog append-to-body
:title="titleMap[mode]"
v-model="visible"
style="width: 80%;"

View File

@ -68,7 +68,7 @@
<el-button type="primary" @click="mtaskb_submit">提交</el-button>
</div>
</div>
<el-dialog v-model="printVisible" width="1200px">
<el-dialog append-to-body v-model="printVisible" width="1200px">
<print :baseData="mtaskObj" type="mtask" @closePrint="printVisible=false"/>
</el-dialog>
</el-drawer>