|
|
@ -502,6 +502,7 @@ |
|
|
<el-button type="primary" @click="addOrDelItem1">新增</el-button> |
|
|
<el-button type="primary" @click="addOrDelItem1">新增</el-button> |
|
|
<el-button type="primary" :loading="loading" @click="clickSave1">{{ attributeFlag1?'编辑':'保存' }}</el-button> |
|
|
<el-button type="primary" :loading="loading" @click="clickSave1">{{ attributeFlag1?'编辑':'保存' }}</el-button> |
|
|
<el-button type="primary" @click="chooseProcessTimeMatrix">选择ProcessTimeMatrix</el-button> |
|
|
<el-button type="primary" @click="chooseProcessTimeMatrix">选择ProcessTimeMatrix</el-button> |
|
|
|
|
|
<el-button type="primary" @click="openPtmDialog">韩ProcessTimeMatrix</el-button> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div class="rq " v-show="attributeFlag1"> |
|
|
<div class="rq " v-show="attributeFlag1"> |
|
|
<el-table |
|
|
<el-table |
|
|
@ -1439,6 +1440,75 @@ |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- PTM参数选择对话框 --> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
title="选择ProcessTimeMatrix参数" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
v-drag |
|
|
|
|
|
:visible.sync="ptmDialogVisible" |
|
|
|
|
|
width="95%" |
|
|
|
|
|
top="3vh"> |
|
|
|
|
|
<div class="rq"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-bottom: 10px"> |
|
|
|
|
|
<el-form-item label="Code筛选"> |
|
|
|
|
|
<el-input v-model="ptmSearchCode" placeholder="请输入条件描述" clearable style="width: 200px" @keyup.enter.native="filterPtmList"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label=" "> |
|
|
|
|
|
<el-button type="primary" @click="filterPtmList">筛选</el-button> |
|
|
|
|
|
<el-button @click="resetPtmFilter">重置</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label=" " style="float: right"> |
|
|
|
|
|
<span style="color: #67C23A; font-size: 13px;"> |
|
|
|
|
|
💡 提示:双击某一行直接添加该ProcessTimeMatrix的参数 |
|
|
|
|
|
</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-table |
|
|
|
|
|
ref="ptmTable" |
|
|
|
|
|
:data="filteredPtmDataList" |
|
|
|
|
|
:height="520" |
|
|
|
|
|
border |
|
|
|
|
|
@row-dblclick="handlePtmRowDoubleClick" |
|
|
|
|
|
highlight-current-row |
|
|
|
|
|
:header-cell-style="{padding: '2px 2px', fontSize: '12px'}" |
|
|
|
|
|
:cell-style="{padding: '2px 2px', fontSize: '11px', cursor: 'pointer'}" |
|
|
|
|
|
style="width: 100%;"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
type="index" |
|
|
|
|
|
label="序号" |
|
|
|
|
|
width="60" |
|
|
|
|
|
align="center" |
|
|
|
|
|
fixed="left"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="conditionDesc" |
|
|
|
|
|
label="Code" |
|
|
|
|
|
width="180" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="left" |
|
|
|
|
|
fixed="left" |
|
|
|
|
|
show-overflow-tooltip> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
v-for="(col, index) in ptmColumnList" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
:prop="col.prop" |
|
|
|
|
|
:label="col.label" |
|
|
|
|
|
:min-width="col.width || 100" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
:align="col.align || 'center'" |
|
|
|
|
|
show-overflow-tooltip> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ scope.row[col.prop] || '-' }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="ptmDialogVisible=false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 新增物料 --> |
|
|
<!-- 新增物料 --> |
|
|
<part-create :init-data="searchData" ref="PartCreate" @update-part-item="getPartItem" @refreshPageTables="getBomInfo" @refreshPageTables2="getInfoByBomTemplate" v-drag></part-create> |
|
|
<part-create :init-data="searchData" ref="PartCreate" @update-part-item="getPartItem" @refreshPageTables="getBomInfo" @refreshPageTables2="getInfoByBomTemplate" v-drag></part-create> |
|
|
|
|
|
|
|
|
@ -1467,6 +1537,7 @@ import RoutingCreate from "./routing_create.vue"; |
|
|
import PartCreate from "./part_create.vue"; |
|
|
import PartCreate from "./part_create.vue"; |
|
|
import {updateInquiryDetailStatusAndPart} from "../../../api/inquiry/inquiryDetail"; |
|
|
import {updateInquiryDetailStatusAndPart} from "../../../api/inquiry/inquiryDetail"; |
|
|
import {EventBus} from "../../../main"; |
|
|
import {EventBus} from "../../../main"; |
|
|
|
|
|
import {searchProductGroupPtmCondition, batchSearchProductGroupPtmConditionsWithItems} from "../../../api/part/partProductGroupInformation"; |
|
|
import { |
|
|
import { |
|
|
addPartItem, |
|
|
addPartItem, |
|
|
batchUpdateItem, |
|
|
batchUpdateItem, |
|
|
@ -3581,7 +3652,16 @@ export default { |
|
|
copyPartModelFlag: false, |
|
|
copyPartModelFlag: false, |
|
|
itemUpdateFlag: false, |
|
|
itemUpdateFlag: false, |
|
|
processTimeMatrixFlag: false, |
|
|
processTimeMatrixFlag: false, |
|
|
productGroupFlag: false |
|
|
|
|
|
|
|
|
productGroupFlag: false, |
|
|
|
|
|
|
|
|
|
|
|
ptmDialogVisible: false, // PTM参数选择对话框显示控制 |
|
|
|
|
|
ptmDataList: [], // PTM完整数据列表(53行,每行包含Code和12个参数列) |
|
|
|
|
|
filteredPtmDataList: [], // PTM筛选后的数据列表 |
|
|
|
|
|
ptmColumnList: [], // PTM参数动态列配置(12个参数列) |
|
|
|
|
|
ptmSearchCode: '', // PTM Code筛选条件 |
|
|
|
|
|
ptmItemList: [], // PTM参数列表(去重后的item列表) |
|
|
|
|
|
selectedPtmItems: [], // 用户勾选的PTM参数 |
|
|
|
|
|
copyPartModelFlag: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created () { |
|
|
created () { |
|
|
@ -6006,7 +6086,332 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 打开PTM参数选择对话框 |
|
|
|
|
|
* 展示商品组1下所有ProcessTimeMatrix及其参数(横向展示:53行 × 12列) |
|
|
|
|
|
* 使用批量查询API,只请求一次后台 |
|
|
|
|
|
*/ |
|
|
|
|
|
openPtmDialog() { |
|
|
|
|
|
if (!this.attributeFlag1) { |
|
|
|
|
|
this.$message.warning('请先保存当前编辑的内容!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 检查是否有选中的物料 |
|
|
|
|
|
if (!this.partList1 || this.partList1.length === 0) { |
|
|
|
|
|
this.$message.warning('请先选择物料!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 获取第一个物料的信息 |
|
|
|
|
|
const firstPart = this.partList1[0] |
|
|
|
|
|
if (!firstPart.productGroupId1) { |
|
|
|
|
|
this.$message.warning('当前物料未设置商品组1,无法查询PTM参数!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 查询该商品组下所有PTM条件及其参数(一次查询) |
|
|
|
|
|
const queryData = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
buNo: firstPart.buNo, |
|
|
|
|
|
productGroupId: firstPart.productGroupId1 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 显示加载提示 |
|
|
|
|
|
const loadingInstance = this.$loading({ |
|
|
|
|
|
lock: true, |
|
|
|
|
|
text: '正在加载ProcessTimeMatrix数据...', |
|
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
batchSearchProductGroupPtmConditionsWithItems(queryData).then(({data}) => { |
|
|
|
|
|
loadingInstance.close() |
|
|
|
|
|
|
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
const ptmConditions = data.conditions || [] |
|
|
|
|
|
const allItems = data.items || [] |
|
|
|
|
|
|
|
|
|
|
|
if (ptmConditions.length === 0) { |
|
|
|
|
|
this.$message.info('该商品组下未配置PTM参数') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (allItems.length === 0) { |
|
|
|
|
|
this.$message.info('该商品组的PTM配置中没有参数') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 处理数据:将items按conditionId分组 |
|
|
|
|
|
this.processPtmData(ptmConditions, allItems) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg || '查询PTM条件失败', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
loadingInstance.close() |
|
|
|
|
|
this.$message.error('查询PTM条件异常') |
|
|
|
|
|
console.error(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 处理PTM数据(横向展示) |
|
|
|
|
|
* 将后端返回的数据处理成表格展示格式 |
|
|
|
|
|
* @param ptmConditions PTM条件列表 |
|
|
|
|
|
* @param allItems 所有参数列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
processPtmData(ptmConditions, allItems) { |
|
|
|
|
|
const flatDataList = [] |
|
|
|
|
|
const columnSet = new Set() |
|
|
|
|
|
const columnMap = new Map() |
|
|
|
|
|
|
|
|
|
|
|
// 将items按conditionId分组 |
|
|
|
|
|
const itemsByCondition = {} |
|
|
|
|
|
allItems.forEach(item => { |
|
|
|
|
|
if (!itemsByCondition[item.conditionId]) { |
|
|
|
|
|
itemsByCondition[item.conditionId] = [] |
|
|
|
|
|
} |
|
|
|
|
|
itemsByCondition[item.conditionId].push(item) |
|
|
|
|
|
|
|
|
|
|
|
// 收集唯一的列信息 |
|
|
|
|
|
if (!columnSet.has(item.itemNo)) { |
|
|
|
|
|
columnSet.add(item.itemNo) |
|
|
|
|
|
columnMap.set(item.itemNo, { |
|
|
|
|
|
itemNo: item.itemNo, |
|
|
|
|
|
itemDesc: item.itemDesc, |
|
|
|
|
|
valueType: item.valueTypeDb, |
|
|
|
|
|
valueChooseFlag: item.valueChooseFlag |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 构建表格数据 |
|
|
|
|
|
ptmConditions.forEach(condition => { |
|
|
|
|
|
const items = itemsByCondition[condition.conditionId] || [] |
|
|
|
|
|
|
|
|
|
|
|
if (items.length === 0) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 构建一行数据:包含conditionDesc和所有参数的值 |
|
|
|
|
|
const rowData = { |
|
|
|
|
|
conditionId: condition.conditionId, |
|
|
|
|
|
conditionDesc: condition.conditionDesc, |
|
|
|
|
|
seqNo: condition.seqNo, |
|
|
|
|
|
site: condition.site, |
|
|
|
|
|
buNo: condition.buNo, |
|
|
|
|
|
productGroupId: condition.productGroupId, |
|
|
|
|
|
items: items // 保存原始items数据,用于后续添加操作 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 将每个参数转换为列数据 |
|
|
|
|
|
items.forEach(item => { |
|
|
|
|
|
const propName = `param_${item.itemNo}` |
|
|
|
|
|
const displayValue = item.valueTypeDb === 'T' ? item.textValue : item.numValue |
|
|
|
|
|
rowData[propName] = displayValue || '-' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
flatDataList.push(rowData) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 构建动态列配置 |
|
|
|
|
|
const columns = [] |
|
|
|
|
|
columnMap.forEach((colInfo, itemNo) => { |
|
|
|
|
|
columns.push({ |
|
|
|
|
|
prop: `param_${itemNo}`, |
|
|
|
|
|
label: colInfo.itemDesc || itemNo, |
|
|
|
|
|
itemNo: itemNo, |
|
|
|
|
|
valueType: colInfo.valueType, |
|
|
|
|
|
width: 110, |
|
|
|
|
|
align: colInfo.valueType === 'N' ? 'right' : 'left' |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 按itemNo排序列 |
|
|
|
|
|
columns.sort((a, b) => a.itemNo.localeCompare(b.itemNo)) |
|
|
|
|
|
|
|
|
|
|
|
// 设置数据并打开对话框 |
|
|
|
|
|
this.ptmDataList = flatDataList |
|
|
|
|
|
this.filteredPtmDataList = flatDataList |
|
|
|
|
|
this.ptmColumnList = columns |
|
|
|
|
|
this.ptmSearchCode = '' |
|
|
|
|
|
this.ptmDialogVisible = true |
|
|
|
|
|
|
|
|
|
|
|
this.$message.success(`已加载 ${flatDataList.length} 个 ProcessTimeMatrix(共 ${columns.length} 个参数列)`) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 处理双击PTM行事件 |
|
|
|
|
|
* @param row 双击的行数据 |
|
|
|
|
|
*/ |
|
|
|
|
|
handlePtmRowDoubleClick(row) { |
|
|
|
|
|
if (!row || !row.items || row.items.length === 0) { |
|
|
|
|
|
this.$message.warning('该ProcessTimeMatrix没有参数!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 显示loading |
|
|
|
|
|
const loadingInstance = this.$loading({ |
|
|
|
|
|
lock: true, |
|
|
|
|
|
text: '正在添加参数...', |
|
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 直接添加该行的参数 |
|
|
|
|
|
this.addPtmItemsFromRow(row, loadingInstance) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 筛选PTM列表(按Code条件描述) |
|
|
|
|
|
*/ |
|
|
|
|
|
filterPtmList() { |
|
|
|
|
|
if (!this.ptmSearchCode || this.ptmSearchCode.trim() === '') { |
|
|
|
|
|
this.filteredPtmDataList = this.ptmDataList |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const searchText = this.ptmSearchCode.trim().toLowerCase() |
|
|
|
|
|
this.filteredPtmDataList = this.ptmDataList.filter(row => { |
|
|
|
|
|
return row.conditionDesc && row.conditionDesc.toLowerCase().includes(searchText) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
if (this.filteredPtmDataList.length === 0) { |
|
|
|
|
|
this.$message.info('没有找到匹配的ProcessTimeMatrix') |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.success(`找到 ${this.filteredPtmDataList.length} 条匹配的ProcessTimeMatrix`) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 重置PTM筛选 |
|
|
|
|
|
*/ |
|
|
|
|
|
resetPtmFilter() { |
|
|
|
|
|
this.ptmSearchCode = '' |
|
|
|
|
|
this.filteredPtmDataList = this.ptmDataList |
|
|
|
|
|
this.$message.info('已重置筛选条件') |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 添加选中的PTM行的参数到物料属性列表 |
|
|
|
|
|
* @param row 双击的行数据 |
|
|
|
|
|
* @param loadingInstance loading实例 |
|
|
|
|
|
*/ |
|
|
|
|
|
addPtmItemsFromRow(row, loadingInstance) { |
|
|
|
|
|
// 从行中提取参数,并转换为后端期望的格式 |
|
|
|
|
|
const allItems = [] |
|
|
|
|
|
|
|
|
|
|
|
if (row.items && row.items.length > 0) { |
|
|
|
|
|
row.items.forEach(item => { |
|
|
|
|
|
// 转换为后端期望的格式 |
|
|
|
|
|
const itemData = { |
|
|
|
|
|
itNo: item.itemNo, // 属性编码(后端接口字段名为itNo) |
|
|
|
|
|
valueTypeDb: item.valueTypeDb, |
|
|
|
|
|
itemDesc: item.itemDesc |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 根据类型设置值 |
|
|
|
|
|
if (item.valueTypeDb === 'T') { |
|
|
|
|
|
itemData.textValue = item.textValue || null |
|
|
|
|
|
itemData.numValue = null |
|
|
|
|
|
} else if (item.valueTypeDb === 'N') { |
|
|
|
|
|
itemData.textValue = null |
|
|
|
|
|
// 确保numValue是数值类型 |
|
|
|
|
|
itemData.numValue = item.numValue !== null && item.numValue !== undefined && item.numValue !== '' |
|
|
|
|
|
? (typeof item.numValue === 'number' ? item.numValue : parseFloat(item.numValue)) |
|
|
|
|
|
: null |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
allItems.push(itemData) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (allItems.length === 0) { |
|
|
|
|
|
loadingInstance.close() |
|
|
|
|
|
this.$message.warning('选中的ProcessTimeMatrix中没有参数!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 使用与addItem1相同的逻辑 |
|
|
|
|
|
const partList = this.partList1.filter(item => |
|
|
|
|
|
item.partNo && item.partNo !== '' && item.buNo && item.buNo === this.searchData.buNo |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
if (partList.length === 0) { |
|
|
|
|
|
loadingInstance.close() |
|
|
|
|
|
this.$message.warning('没有符合条件的物料!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
const inDataList = [] |
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < partList.length; i++) { |
|
|
|
|
|
if (!partList[i].codeNo || partList[i].codeNo === '') { |
|
|
|
|
|
continue |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inDataList.push({ |
|
|
|
|
|
site: partList[i].site, |
|
|
|
|
|
buNo: partList[i].buNo, |
|
|
|
|
|
partNo: partList[i].partNo, |
|
|
|
|
|
codeNo: partList[i].codeNo, |
|
|
|
|
|
codeDesc: partList[i].codeDesc, |
|
|
|
|
|
recordType: 'IP', |
|
|
|
|
|
itemList: allItems |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (inDataList.length === 0) { |
|
|
|
|
|
loadingInstance.close() |
|
|
|
|
|
this.$message.warning('请确保物料已配置属性模板(codeNo)!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 调用批量添加接口(与addItem1相同的逻辑) |
|
|
|
|
|
addPartsItem(inDataList).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
// 更新可选属性列表和已有属性列表 |
|
|
|
|
|
getItemLists(inDataList[0]).then(({data}) => { |
|
|
|
|
|
this.itemList1 = data.row1 |
|
|
|
|
|
this.itemList2 = data.row2 |
|
|
|
|
|
loadingInstance.close() |
|
|
|
|
|
// 刷新物料属性列表 |
|
|
|
|
|
this.getPartItem2() |
|
|
|
|
|
|
|
|
|
|
|
this.$message.success(`成功添加 ${allItems.length} 个参数(ProcessTimeMatrix: ${row.conditionDesc})`) |
|
|
|
|
|
|
|
|
|
|
|
// 关闭对话框 |
|
|
|
|
|
this.ptmDialogVisible = false |
|
|
|
|
|
|
|
|
|
|
|
// 清空数据 |
|
|
|
|
|
this.ptmDataList = [] |
|
|
|
|
|
this.filteredPtmDataList = [] |
|
|
|
|
|
this.ptmColumnList = [] |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
loadingInstance.close() |
|
|
|
|
|
this.getPartItem2() |
|
|
|
|
|
this.$message.success(`成功添加 ${allItems.length} 个参数(ProcessTimeMatrix: ${row.conditionDesc})`) |
|
|
|
|
|
this.ptmDialogVisible = false |
|
|
|
|
|
this.ptmDataList = [] |
|
|
|
|
|
this.filteredPtmDataList = [] |
|
|
|
|
|
this.ptmColumnList = [] |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
loadingInstance.close() |
|
|
|
|
|
this.$alert(data.msg || '添加属性失败', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
loadingInstance.close() |
|
|
|
|
|
this.$message.error('添加属性异常: ' + error.message) |
|
|
|
|
|
console.error(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
|