|
|
|
@ -5,6 +5,7 @@ |
|
|
|
<el-col :span="24"> |
|
|
|
<el-button @click="initToolHeaderModel('Y')" type="primary">{{ buttons.add }}</el-button> |
|
|
|
<el-button @click="initToolHeaderModel('N')" type="primary">{{ buttons.edit }}</el-button> |
|
|
|
<el-button @click="deleteToolHeader()" type="primary">{{ '删除' }}</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
@ -69,7 +70,8 @@ |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
|
|
|
|
<el-tabs style="font-size: 12px" class="customer-tab" v-model="activeName" type="border-card"> |
|
|
|
<el-tabs @tab-click="selectTabs" style="font-size: 12px" class="customer-tab" v-model="activeName" |
|
|
|
type="border-card"> |
|
|
|
<el-tab-pane :label="'工具实例'" name="toolInfo"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="7"> |
|
|
|
@ -247,6 +249,31 @@ |
|
|
|
</el-row> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane :label="'使用该工具的产品清单'" name="tool"> |
|
|
|
<el-table |
|
|
|
width="100%" |
|
|
|
:height="height+50" |
|
|
|
:data="toolRouteDataList" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
@selection-change="selectionChangeHandle" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in routeToolList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
@ -399,7 +426,9 @@ |
|
|
|
saveTableDefaultList, |
|
|
|
saveTableUser, |
|
|
|
getTableDefaultListLanguage, |
|
|
|
getTableUserListLanguage |
|
|
|
getTableUserListLanguage, |
|
|
|
removerDefault, |
|
|
|
removerUser |
|
|
|
} from "@/api/table.js" |
|
|
|
import { |
|
|
|
userFavoriteList, |
|
|
|
@ -415,12 +444,16 @@ |
|
|
|
updateToolDetail, |
|
|
|
saveToolInfoDetail, |
|
|
|
editToolHeader, |
|
|
|
saveToolHeader |
|
|
|
saveToolHeader, |
|
|
|
deleteToolHeader |
|
|
|
} from '@/api/knifemold/tool-info.js' |
|
|
|
import { |
|
|
|
printToolData |
|
|
|
} from "@/api/knifemold/receive.js" |
|
|
|
|
|
|
|
import { |
|
|
|
searchProcessRouteTool, |
|
|
|
} from "@/api/base/productProcessRoute.js" |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
@ -696,7 +729,7 @@ |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -713,7 +746,7 @@ |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -730,7 +763,7 @@ |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
fixed: '', |
|
|
|
} |
|
|
|
], |
|
|
|
// 展示列集 |
|
|
|
@ -765,7 +798,7 @@ |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -781,7 +814,7 @@ |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -797,7 +830,7 @@ |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
// { |
|
|
|
// userId: this.$store.state.user.name, |
|
|
|
@ -813,42 +846,194 @@ |
|
|
|
// columnSortable: true, |
|
|
|
// sortLv: 0, |
|
|
|
// status: true, |
|
|
|
// fixed: false, |
|
|
|
// fixed: '', |
|
|
|
// } |
|
|
|
], |
|
|
|
columnList2: [ |
|
|
|
// 工具显示列表 |
|
|
|
toolRouteDataList: [], |
|
|
|
// 工具使用清单 |
|
|
|
routeToolList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 2501, |
|
|
|
tableId: "toolHeader2501", |
|
|
|
tableName: "toolHeader", |
|
|
|
columnProp: "toolId", |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TablePartNo', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "partNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "工具编码", |
|
|
|
align: "left", |
|
|
|
columnLabel: "产品编码", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: true, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
fixed: '', |
|
|
|
columnWidth: 150 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 2501, |
|
|
|
tableId: "toolHeader2501", |
|
|
|
tableName: "toolHeader", |
|
|
|
columnProp: "toolDescription", |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TablePartDescription', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "partDescription", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "工具名称", |
|
|
|
align: "left", |
|
|
|
columnLabel: "产品名称", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: true, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
fixed: '', |
|
|
|
columnWidth: 200 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TableSpec', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "spec", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "规格型号", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TableRevNo', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "revNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "工艺路线版本", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TableItemNo', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "itemNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "工序号", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TableActive', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "active", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "产品是否在用", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TableActive', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "toolqty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: "工具数量", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TableSite', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "remark", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "备注", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 160 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TableSite', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "createdate", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "录入日期", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
serialNumber: this.$route.meta.menuId + 'TableSite', |
|
|
|
tableId: "toolRouteInfo", |
|
|
|
tableName: "查询工艺路线工具", |
|
|
|
columnProp: "createby", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "录入人", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
} |
|
|
|
], |
|
|
|
// 数据集 |
|
|
|
dataList: [], |
|
|
|
@ -991,6 +1176,45 @@ |
|
|
|
this.getLanguageList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 删除 工具主表信息 |
|
|
|
deleteToolHeader() { |
|
|
|
this.$confirm(`确定进行删除操作?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let dto = { |
|
|
|
site: this.site, |
|
|
|
toolId: this.headerData.toolId |
|
|
|
} |
|
|
|
// 删除工具主记录 |
|
|
|
deleteToolHeader(dto).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 选在 tab 时触发 |
|
|
|
selectTabs() { |
|
|
|
if (this.activeName == 'tool') { |
|
|
|
this.getToolRouteList() |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取工具对应的使用工序信息 |
|
|
|
getToolRouteList() { |
|
|
|
let query = { |
|
|
|
site: this.site, |
|
|
|
toolID: this.headerData.toolId, |
|
|
|
user: this.$store.state.user.name |
|
|
|
} |
|
|
|
searchProcessRouteTool(query).then(({data}) => { |
|
|
|
this.toolRouteDataList = data.rows |
|
|
|
}) |
|
|
|
}, |
|
|
|
printMethod(val) { |
|
|
|
if (!this.currentDetailData.toolInstanceId) { |
|
|
|
this.$alert('请选择工具信息!', '操作提示', { |
|
|
|
@ -1062,8 +1286,8 @@ |
|
|
|
LODOP.ADD_PRINT_TEXT(55, 71, 133, 14, printData.createdBy); |
|
|
|
} |
|
|
|
//LODOP.PRINT_DESIGN(); |
|
|
|
//LODOP.PREVIEW(); |
|
|
|
LODOP.PRINT(); |
|
|
|
LODOP.PREVIEW(); |
|
|
|
// LODOP.PRINT(); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
@ -1104,7 +1328,7 @@ |
|
|
|
LODOP.ADD_PRINT_TEXT(181, 9, 60, 15, "检验签章"); |
|
|
|
LODOP.ADD_PRINT_TEXT(25, 72, 180, 14, printData.toolDescription); |
|
|
|
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2); |
|
|
|
LODOP.ADD_PRINT_TEXT(42, 72, 180, 14, ""); // 规格 |
|
|
|
LODOP.ADD_PRINT_TEXT(42, 72, 180, 14, printData.spec); // 规格 |
|
|
|
LODOP.ADD_PRINT_TEXT(60, 72, 180, 14, printData.toolId); |
|
|
|
LODOP.ADD_PRINT_TEXT(78, 71, 180, 14, printData.toolInstanceId); |
|
|
|
LODOP.ADD_PRINT_TEXT(94, 71, 180, 14, printData.SupplierName); |
|
|
|
@ -1115,8 +1339,8 @@ |
|
|
|
|
|
|
|
} |
|
|
|
//LODOP.PRINT_DESIGN(); |
|
|
|
//LODOP.PREVIEW(); |
|
|
|
LODOP.PRINT(); |
|
|
|
LODOP.PREVIEW(); |
|
|
|
//LODOP.PRINT(); |
|
|
|
} |
|
|
|
}, |
|
|
|
getBaseData(val) { |
|
|
|
@ -1491,25 +1715,50 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 保存 默认配置 列 |
|
|
|
saveColumnList() { |
|
|
|
|
|
|
|
saveTableDefaultList(this.columnList).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
// this.showDefault = false |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
async saveColumnList() { |
|
|
|
// 删除所有的该页面下保存的数据 |
|
|
|
if (this.userColumnList) { |
|
|
|
//删除 user自定义的数据 |
|
|
|
await removerUser(this.queryTable) |
|
|
|
} |
|
|
|
// 删除默认配置 |
|
|
|
await removerDefault(this.queryTable) |
|
|
|
// 保存页面 table属性 |
|
|
|
let sumColumnList = this.columnList.concat(this.columnList1); |
|
|
|
sumColumnList = sumColumnList.map(item => { |
|
|
|
return item = { |
|
|
|
tableId: item.tableId, |
|
|
|
tableName: item.tableName, |
|
|
|
columnProp: item.columnProp, |
|
|
|
columnLabel: item.columnLabel, |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
columnWidth: item.columnWidth, |
|
|
|
format: item.format, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
sortLv: item.sortLv, |
|
|
|
status: true, |
|
|
|
fixed: item.fixed, |
|
|
|
serialNumber: item.serialNumber, |
|
|
|
columnType: item.columnType, |
|
|
|
align: item.align |
|
|
|
} |
|
|
|
}) |
|
|
|
saveTableDefaultList(this.columnList1).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
// this.showDefault = false |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
|
|
|
|
await saveTableDefaultList(sumColumnList) |
|
|
|
// 保存页面 button label title 属性 |
|
|
|
let buttons = this.buttonList.map(item => { |
|
|
|
return item = { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
languageValue: item.languageValue, |
|
|
|
objectId: item.objectId, |
|
|
|
objectType: item.objectType, |
|
|
|
tableId: item.tableId |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getFunctionButtonList(); |
|
|
|
await saveButtonList(buttons) |
|
|
|
this.getFunctionButtonList() |
|
|
|
this.getColumnList() |
|
|
|
}, |
|
|
|
// 获取 tableDefault 列 |
|
|
|
|