工艺模块,推送bom 推送工艺校验等 :页面完全完善

This commit is contained in:
tzy1042411602 2024-12-27 17:25:48 +08:00
parent 89ebffaf86
commit b4d34c812f
3 changed files with 140 additions and 207 deletions

View File

@ -109,11 +109,14 @@ export function updateProcessPlan(rooteProdet) {
export function generatePDFs(rooteProdet) { export function generatePDFs(rooteProdet) {
return request({ return request({
url: '/system/route/generatePDFs', url: '/system/route/generatePDFs',
method: 'post', method: 'get',
params: { rooteProdet }, params: { rooteProdet },
responseType: 'blob',
headers:{ 'Content-Type': 'application/json; application/octet-stream'},
}); });
} }
// 获取物料BOM信息,后端返回物料BOM信息集合 // 获取物料BOM信息,后端返回物料BOM信息集合
export function getBomInfo(materialCode, materialName, productionOrderNo) { export function getBomInfo(materialCode, materialName, productionOrderNo) {
return request({ return request({
@ -130,7 +133,7 @@ export function getBomInfo(materialCode, materialName, productionOrderNo) {
// 新增BOM // 新增BOM
export function addBom(data) { export function addBom(data) {
return request({ return request({
url: '/system/bom', url: '/system/materialbom',
method: 'post', method: 'post',
data: data data: data
}) })
@ -139,7 +142,7 @@ export function addBom(data) {
// 修改BOM // 修改BOM
export function updateBom(data) { export function updateBom(data) {
return request({ return request({
url: '/system/bom', url: '/system/materialbom',
method: 'put', method: 'put',
data: data data: data
}) })
@ -148,7 +151,7 @@ export function updateBom(data) {
// 删除BOM // 删除BOM
export function deleteBom(id) { export function deleteBom(id) {
return request({ return request({
url: '/system/bom/' + id, url: '/system/materialbom/' + id,
method: 'delete' method: 'delete'
}) })
} }

View File

@ -290,7 +290,7 @@ export default {
handleDetail(productionOrderNo) { handleDetail(productionOrderNo) {
// 跳转到目标路由并传递查询参数 // 跳转到目标路由并传递查询参数
this.$router.push({ this.$router.push({
path: '/tool/route', // 替换为你的详情页面的路径 path: '/route/route', // 替换为你的详情页面的路径
query: { productionOrderNo: productionOrderNo } // 通过 query 传递参数 query: { productionOrderNo: productionOrderNo } // 通过 query 传递参数
}); });
}, },

View File

@ -42,9 +42,6 @@
v-hasPermi="['system:route:export']">导出 v-hasPermi="['system:route:export']">导出
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-refresh" size="mini" @click="refreshAllStock">刷新库存</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport"
v-hasPermi="['system:details:import']">导入工艺 v-hasPermi="['system:details:import']">导入工艺
@ -66,7 +63,7 @@
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload" size="mini" @click="generatePDFs" <el-button type="info" plain icon="el-icon-upload" size="mini" @click="generatePDFs1"
v-hasPermi="['system:details:import']">生成PDF v-hasPermi="['system:details:import']">生成PDF
</el-button> </el-button>
</el-col> </el-col>
@ -116,13 +113,9 @@
<el-table-column label="工序号" width="60" align="center" prop="processNo" /> <el-table-column label="工序号" width="60" align="center" prop="processNo" />
<el-table-column label="工作中心" width="150" align="center"> <el-table-column label="工作中心" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item v-if="scope.row.id < 0 || scope.row.isEdit" <el-form-item v-if="scope.row.isEdit" :prop="'routeList.' + scope.$index + '.workCenter'">
:prop="'routeList.' + scope.$index + '.workCenter'"> <el-select v-model="scope.row.workCenter" placeholder="工作中心" clearable
<el-select @change="() => handleWorkCenterChange(scope)"> <!-- 修改这里 -->
v-model="scope.row.workCenter"
placeholder="工作中心"
clearable
@change="(val) => handleWorkCenterChange(scope)">
<el-option label="机一工段" value="机一工段"></el-option> <el-option label="机一工段" value="机一工段"></el-option>
<el-option label="机二工段" value="机二工段"></el-option> <el-option label="机二工段" value="机二工段"></el-option>
<el-option label="机三工段" value="机三工段"></el-option> <el-option label="机三工段" value="机三工段"></el-option>
@ -131,6 +124,7 @@
<el-option label="铆焊工段" value="铆焊工段"></el-option> <el-option label="铆焊工段" value="铆焊工段"></el-option>
<el-option label="电钳工段" value="电钳工段"></el-option> <el-option label="电钳工段" value="电钳工段"></el-option>
<el-option label="委外中心" value="委外中心"></el-option> <el-option label="委外中心" value="委外中心"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<span v-else>{{ scope.row.workCenter }}</span> <span v-else>{{ scope.row.workCenter }}</span>
@ -160,13 +154,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工序控制" width="220" align="center"> <!-- 工序控制列 -->
<el-table-column label="工序控制码" width="220" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item v-if="scope.row.id < 0 || scope.row.isEdit" <el-form-item v-if="scope.row.isEdit" :prop="'routeList.' + scope.$index + '.processControl'">
:prop="'routeList.' + scope.$index + '.processControl'"> <el-select v-model="scope.row.processControl" placeholder="请选择工序控制码" clearable>
<el-select v-model="scope.row.processControl" placeholder="工序控制" clearable
:disabled="isProcessControlDisabled(scope.row, scope.$index)"
@change="handleProcessControlChange(scope.row, scope.$index)">
<el-option label="汇报+免检" value="汇报+免检"></el-option> <el-option label="汇报+免检" value="汇报+免检"></el-option>
<el-option label="委外+质量" value="委外+质量"></el-option> <el-option label="委外+质量" value="委外+质量"></el-option>
<el-option label="汇报+质量" value="汇报+质量"></el-option> <el-option label="汇报+质量" value="汇报+质量"></el-option>
@ -368,7 +360,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工序控制" prop="processControl"> <el-form-item label="工序控制" prop="processControl">
<el-select v-model="form.processControl" placeholder="请选择工序控制" clearable> <el-select v-model="form.processControl" placeholder="请选择工序控制码" clearable>
<el-option label="汇报+免检" value="汇报+免检"></el-option> <el-option label="汇报+免检" value="汇报+免检"></el-option>
<el-option label="委外+质量" value="委外+质量"></el-option> <el-option label="委外+质量" value="委外+质量"></el-option>
<el-option label="汇报+质量" value="汇报+质量"></el-option> <el-option label="汇报+质量" value="汇报+质量"></el-option>
@ -589,7 +581,7 @@ import {
addRoute, addRoute,
updateRoute, updateRoute,
getDistinctProjectCodes, getDistinctProjectCodes,
updateProcessPlan, generatePDFs, updateBom, addBom updateProcessPlan, generatePDFs, updateBom, addBom, deleteBom
} from "@/api/system/route"; } from "@/api/system/route";
import upload from "svg-sprite-loader/examples/custom-runtime-generator/build/main"; import upload from "svg-sprite-loader/examples/custom-runtime-generator/build/main";
import { getToken } from "../../../utils/auth"; import { getToken } from "../../../utils/auth";
@ -598,6 +590,8 @@ import Bomfrom from './bomfrom'
import { getProcessInfoList, pushRouteBom, onSave, getBomInfo } from "@/api/system/route"; import { getProcessInfoList, pushRouteBom, onSave, getBomInfo } from "@/api/system/route";
import { listMaterial } from "@/api/system/material"; import { listMaterial } from "@/api/system/material";
import axios from 'axios';
export default { export default {
name: "", name: "",
components: { components: {
@ -792,25 +786,27 @@ export default {
id: 0,//动态增加表格列的ID id: 0,//动态增加表格列的ID
// 表单校验 // 表单校验
rules: { rules: {
workCenter: [ id: [
{ required: true, message: "工作中心不能为空", trigger: "blur" } { required: true, message: "主键ID不能为空", trigger: "blur" }
], ],
processName: [ routeDescription: [
{ required: true, message: "工序名称不能为空", trigger: "blur" } { required: true, message: "工艺路线描述不能为空", trigger: "blur" }
], ],
// 添加物料相关的验证规则 materialCode: [
materialCode: [ { required: true, message: "物料编码不能为空", trigger: "blur" }
{ required: true, message: "物料编码不能为空", trigger: "blur" } ],
], materialName: [
materialName: [ { required: true, message: "物料名称不能为空", trigger: "blur" }
{ required: true, message: "物料名称不能为空", trigger: "blur" } ],
], processControl: [ // 添加工序控制码的验证
material: [ { required: true, message: "工序控制码不能为空", trigger: "blur" }
{ required: true, message: "材质不能为空", trigger: "blur" } ],
], processName: [ // 添加工序名称的验证
discWeight: [ { required: true, message: "工序名称不能为空", trigger: "blur" }
{ required: true, message: "单重不能为空", trigger: "blur" } ],
], activityDuration: [ // 添加活动时长的验证
{ required: true, message: "活动时长不能为空", trigger: "blur" }
]
}, },
bomDialogVisible: false, bomDialogVisible: false,
bomDialogTitle: '', bomDialogTitle: '',
@ -880,6 +876,10 @@ export default {
// 当路由参数 productionOrderNo 变化时,重新获取 // 当路由参数 productionOrderNo 变化时,重新获取
this.setTotalWeight(); this.setTotalWeight();
this.getList(); this.getList();
// 设置查询参数中的 routeDescription
if (newVal) {
this.queryParams.routeDescription = newVal;
}
} }
}, },
mounted() { mounted() {
@ -897,25 +897,54 @@ export default {
} }
}, },
methods: { methods: {
// 处理工作中心变化 // 处理工作中心变化
handleWorkCenterChange(scope) { handleWorkCenterChange(scope) {
const { row, $index } = scope; const { row } = scope;
// 如果是委外中心,自动设置工序控制为"委外+质量" const currentIndex = this.form.routeList.findIndex(item => item === row);
if (row.workCenter === '委外中心') {
row.processControl = '委外+质量'; // 移除自动设置工序控制码的逻辑
} else { // 只需记录工作中心的变化,不再自动填写
// 非委外中心时,检查是否需要设置为"汇报+免检" console.log("工作中心变化:", row.workCenter);
this.setProcessControl(row, $index); },
}
}, // 验证工序控制
// 处理工序控制变化 validateProcessControl(row, index) {
handleProcessControlChange(row, index) { // 验证逻辑保持不变
// 验证工序控制是否符合规则 if (row.workCenter === '委外中心' && row.processControl !== '委外+质量') {
const validControl = this.validateProcessControl(row, index); return {
if (!validControl.valid) { valid: false,
this.$message.warning(validControl.message); message: '委外中心的工序控制必须为"委外+质量"',
// 设置正确的工序控制值 correctValue: '委外+质量'
row.processControl = validControl.correctValue; };
}
if (index > 0) {
const previousRow = this.form.routeList[index - 1];
if (previousRow.workCenter === row.workCenter &&
previousRow.workCenter !== '委外中心' &&
row.processControl !== '汇报+免检') {
return {
valid: false,
message: '与上道工序工作中心相同时,工序控制应为"汇报+免检"',
correctValue: '汇报+免检'
};
}
}
return { valid: true };
},
// 开始编辑行
handleRowEdit(scope) {
// 保存原始数据
scope.row.originalData = JSON.parse(JSON.stringify(scope.row));
// 设置编辑状态
this.$set(scope.row, 'isEdit', true);
// 如果是委外中心,确保工序控制正确
if (scope.row.workCenter === '委外中心') {
this.$set(scope.row, 'processControl', '委外+质量');
} }
}, },
@ -926,39 +955,17 @@ export default {
// 设置工序控制 // 设置工序控制
setProcessControl(row, index) { setProcessControl(row, index) {
console.log('进入setProcessControl方法'); // 添加日志
if (row.workCenter === '委外中心') { if (row.workCenter === '委外中心') {
// 委外中心必须是委外+质量 console.log('设置委外+质量'); // 添加日志
this.$set(row, 'processControl', '委外+质量'); this.$set(row, 'processControl', '委外+质量');
} else if (this.shouldBeAutoFreeInspection(row, index)) { } else if (this.shouldBeAutoFreeInspection(row, index)) {
// 与上序工作中心相同时设置为汇报+免检 console.log('设置汇报+免检'); // 添加日志
this.$set(row, 'processControl', '汇报+免检'); this.$set(row, 'processControl', '汇报+免检');
} }
}, },
// 验证工序控制 // 验证工序控制
validateProcessControl(row, index) {
// 首先检查是否是委外中心
if (row.workCenter === '委外中心') {
if (row.processControl !== '委外+质量') {
return {
valid: false,
message: '委外中心的工序控制必须为"委外+质量"',
correctValue: '委外+质量'
};
}
return { valid: true };
}
// 如果不是委外中心,检查是否需要自动免检
if (this.shouldBeAutoFreeInspection(row, index) && row.processControl !== '汇报+免检') {
return {
valid: false,
message: '与上序工作中心相同时,工序控制应为"汇报+免检"',
correctValue: '汇报+免检'
};
}
return { valid: true };
},
// 判断是否应该自动设置为免检 // 判断是否应该自动设置为免检
shouldBeAutoFreeInspection(row, index) { shouldBeAutoFreeInspection(row, index) {
if (!row.parentId || index === 0 || row.workCenter === '委外中心') { if (!row.parentId || index === 0 || row.workCenter === '委外中心') {
@ -985,55 +992,7 @@ export default {
/* // 查询单个物料库存
async handleMaterialSelect(materialCode) {
if (!materialCode) return;
// 设置加载状态
const row = this.form.routeList.find(item => item.materialCode === materialCode);
if (row) {
this.$set(row, 'loadingStock', true);
}
try {
const response = await listMaterial({
materialCode: materialCode
});
if (response.rows && response.rows.length > 0) {
const material = response.rows[0];
// 更新对应行的库存信息
if (row) {
this.$set(row, 'stock', material.singleWeight || 0);
}
}
} catch (error) {
console.error('查询库存失败:', error);
this.$message.error('查询库存失败');
} finally {
if (row) {
this.$set(row, 'loadingStock', false);
}
}
},*/
// 刷新所有物料库存
// 修改刷新所有物料库存的方法
async refreshAllStock() {
this.loading = true;
try {
const promises = this.form.routeList
.filter(row => row.materialCode) // 只处理有物料编码的行
.map(row => this.handleMaterialSelect(row.materialCode));
await Promise.all(promises);
this.$message.success('库存刷新完成');
} catch (error) {
console.error('批量刷新库存失败:', error);
this.$message.error('部分库存刷新失败');
} finally {
this.loading = false;
}
},
/** 导入时间按钮操作 */ /** 导入时间按钮操作 */
handleImportTime() { handleImportTime() {
this.timeUpload.title = "导入时间"; this.timeUpload.title = "导入时间";
@ -1205,8 +1164,6 @@ export default {
} }
}); });
}, },
// 删除子集 // 删除子集
@ -1275,11 +1232,9 @@ export default {
const response = await listRoute(this.queryParams); const response = await listRoute(this.queryParams);
this.form.routeList = response.rows; this.form.routeList = response.rows;
this.total = response.total; this.total = response.total;
// 自动刷新库存
await this.refreshAllStock();
} catch (error) { } catch (error) {
console.error('获取数据失败:', error); console.error('获取数据失败:', error);
this.$message.error('数据加载失败');
} finally { } finally {
this.loading = false; this.loading = false;
} }
@ -1409,16 +1364,15 @@ export default {
}, },
/**推送工艺 */ /**推送工艺 */
async pushRouteBom() { async pushRouteBom() {
// 获取生产订单号 // 获取生产订单号
const productionOrderNo = this.$route.query.productionOrderNo; const productionOrderNo = this.$route.query.productionOrderNo;
if (!productionOrderNo) { if (!productionOrderNo) {
this.$modal.msgError("未获取到生产订单号,请检查!"); this.$modal.msgError("未获取到生产订单号,请检查!");
return; return;
} }
try { try {
// 显示确认对话框 // 显示确认对话框
await this.$confirm( await this.$confirm(
@ -1430,7 +1384,6 @@ export default {
type: 'warning' type: 'warning'
} }
); );
// 显示全屏 loading // 显示全屏 loading
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
@ -1438,10 +1391,8 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}); });
// 重置表单状态 // 重置表单状态
this.reset(); this.reset();
// 设置超时检测 // 设置超时检测
const timeout = 600000; // 10分钟超时 const timeout = 600000; // 10分钟超时
const timeoutPromise = new Promise((_, reject) => { const timeoutPromise = new Promise((_, reject) => {
@ -1449,17 +1400,29 @@ export default {
reject(new Error('推送操作超时,请检查后台处理状态')); reject(new Error('推送操作超时,请检查后台处理状态'));
}, timeout); }, timeout);
}); });
// 调用推送 API 并设置超时 // 调用推送 API 并设置超时
const response = await Promise.race([ const response = await Promise.race([
pushRouteBom(productionOrderNo), pushRouteBom(productionOrderNo),
timeoutPromise timeoutPromise
]); ]);
// 处理后端返回的数据
// 更新表单数据 const { duplicateRoutes, failedRoutes, successfulRoutes } = response;
if (response && response.data) { // 提取物料编码
this.form = response.data; const duplicateCodes = duplicateRoutes.join(', ');
} const failedCodes = failedRoutes.map(route => route.materialCode).join(', ');
const successfulCodes = successfulRoutes.map(route => route.materialCode).join(', ');
// 显示成功消息
this.$alert(`
<div><strong>成功 (${successfulRoutes.length}):</strong></div>
<div style="margin-left: 20px;">${successfulCodes || '无'}</div>
<div><strong>失败 (${failedRoutes.length}):</strong></div>
<div style="margin-left: 20px;">${failedCodes || '无'}</div>
<div><strong>重复 (${duplicateRoutes.length}):</strong></div>
<div style="margin-left: 20px;">${duplicateCodes || '无'}</div>
`, '推送完成', {
dangerouslyUseHTMLString: true,
confirmButtonText: '确定'
});
// 刷新列表 // 刷新列表
await this.getList(); await this.getList();
@ -1467,14 +1430,6 @@ export default {
// 关闭 loading // 关闭 loading
loading.close(); loading.close();
// 显示成功消息
this.$notify({
title: '推送成功',
message: `工艺路线[${productionOrderNo}]推送完成`,
type: 'success',
duration: 5000
});
} catch (error) { } catch (error) {
// 错误处理 // 错误处理
console.error('[推送工艺失败]:', error); console.error('[推送工艺失败]:', error);
@ -1496,7 +1451,7 @@ export default {
this.loading = false; this.loading = false;
} }
}, },
/** 更新计划时间*/ /** 更新计划<EFBFBD><EFBFBD><EFBFBD>间*/
updateProcessPlan(row) { updateProcessPlan(row) {
// 显示加载状态 // 显示加载状态
this.loading = true; this.loading = true;
@ -1526,8 +1481,7 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 更新计划时间*/ generatePDFs1(row) {
generatePDFs(row) {
// 显示加载状态 // 显示加载状态
this.loading = true; this.loading = true;
// 调用 reset 方法,重置表单或状态 // 调用 reset 方法,重置表单或状态
@ -1539,8 +1493,14 @@ export default {
// 调用封装好的 API 方法 // 调用封装好的 API 方法
generatePDFs(rooteProdet) generatePDFs(rooteProdet)
.then(response => { .then(response => {
// 假设后端返回的数据可以直接赋值给表单
this.form = response; let blob = new Blob([response], {type: 'application/zip'})
let url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = rooteProdet+'.zip' // 重命名文件
link.click()
URL.revokeObjectURL(url) // 释放内存
// 弹出成功消息 // 弹出成功消息
this.$modal.msgSuccess("生成" + rooteProdet + "的PDF 成功 "); this.$modal.msgSuccess("生成" + rooteProdet + "的PDF 成功 ");
// 调用方法更新列表 // 调用方法更新列表
@ -1548,8 +1508,8 @@ export default {
}) })
.catch(error => { .catch(error => {
// 处理错误,弹出错误提示 // 处理错误,弹出错误提示
this.$modal.msgError("更新,请重试!"); this.$modal.msgError("生成PDF失败,请重试!");
console.error('更新工序计划失败:', error); console.error('生成PDF失败:', error);
}) })
.finally(() => { .finally(() => {
// 隐藏加载状态 // 隐藏加载状态
@ -1560,23 +1520,15 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
// 添加工序控制验证 // 提交逻辑
const processControlValid = this.validateAllProcessControls();
if (!processControlValid.valid) {
this.$message.error(processControlValid.message);
return;
}
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.id != null) { if (this.form.id != null) {
updateRoute(this.form).then(response => { updateRoute(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.reset();
}).finally(() => { }).finally(() => {
this.buttonLoading = false; this.buttonLoading = false;
}); });
@ -1585,28 +1537,17 @@ export default {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.reset();
}).finally(() => { }).finally(() => {
this.buttonLoading = false; this.buttonLoading = false;
}); });
} }
} else {
this.$message.error("请填写必填项");
} }
}); });
}, },
// 验证所有工序控制 // 验证所有工序控制
validateAllProcessControls() {
for (const row of this.form.routeList) {
if (row.children) {
for (let i = 0; i < row.children.length; i++) {
const validResult = this.validateProcessControl(row.children[i], i);
if (!validResult.valid) {
return validResult;
}
}
}
}
return { valid: true };
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(scope) { handleDelete(scope) {
const ids = [scope.row.id]; const ids = [scope.row.id];
@ -1638,7 +1579,7 @@ export default {
this.bomDialogTitle = '新增BOM'; this.bomDialogTitle = '新增BOM';
this.bomForm = { this.bomForm = {
id: undefined, id: undefined,
projectNumber: this.currentMaterial.productionOrderNo, // 使用当前的项目令号 projectNumber: this.currentMaterial.productionOrderNo, // 使用当<EFBFBD><EFBFBD>的项目令号
materialCode: '', materialCode: '',
materialName: '', materialName: '',
materialType: '', materialType: '',
@ -1734,17 +1675,6 @@ export default {
this.bomForm.unit = item.classificationName; this.bomForm.unit = item.classificationName;
} }
}, },
// 开始编辑行
handleRowEdit(scope) {
// 保存原始数据,用于取消编辑时恢复
scope.row.originalData = JSON.parse(JSON.stringify(scope.row));
// 设置编辑状态
this.$set(scope.row, 'isEdit', true);
},
// 取消编辑 // 取消编辑
cancelEdit(scope) { cancelEdit(scope) {
// 恢复原始数据 // 恢复原始数据
@ -1752,14 +1682,14 @@ export default {
// 退出编辑状态 // 退出编辑状态
this.$set(scope.row, 'isEdit', false); this.$set(scope.row, 'isEdit', false);
}, },
// 保存单行数据 // 保存单行数据
onSaveRow(scope) { onSaveRow(scope) {
// 显示加载状态 // 显示加载状态
this.loading = true; this.loading = true;
// 获取行数据并创建副本 // 获取行数据并创建副本
const row = scope.row; const row = scope.row;
// 验证委外中心的工序控制
const saveData = { const saveData = {
id: row.id, id: row.id,
parentId: row.parentId, parentId: row.parentId,