diff --git a/src/api/tool/com_tool_info_add_update.js b/src/api/tool/com_tool_info_add_update.js index dd8d231..4501818 100644 --- a/src/api/tool/com_tool_info_add_update.js +++ b/src/api/tool/com_tool_info_add_update.js @@ -7,3 +7,5 @@ export const insertToolInfo = data => createAPI('plm/tool/insertToolInfo', 'POST export const modifyToolInfo = data => createAPI('plm/tool/modifyToolInfo', 'POST', data) export const getNextToolId = data => createAPI('plm/tool/getNextToolId', 'POST', data) +//获取配置的默认参数 +export const getBaseConfigData = data => createAPI('plm/baseConfig/getBaseConfigBySiteAndType', 'POST', data) diff --git a/src/views/modules/tooling/components/com_tool_info_add_update.vue b/src/views/modules/tooling/components/com_tool_info_add_update.vue index ca7bef9..d72332e 100644 --- a/src/views/modules/tooling/components/com_tool_info_add_update.vue +++ b/src/views/modules/tooling/components/com_tool_info_add_update.vue @@ -128,6 +128,7 @@ import { insertToolInfo, modifyToolInfo, getNextToolId, + getBaseConfigData, } from '@/api/tool/com_tool_info_add_update.js'; /*组件*/ @@ -152,7 +153,7 @@ export default { toolDesc: '', toolType: '', toolTypeDesc: '', - calendarId: '', + calendarId: 'CN_2', schedCapacity: 'Infinite capacity', alternateToolId: '', alternateToolDesc: '', @@ -330,7 +331,7 @@ export default { this.pageData.toolType = ''; this.pageData.toolDesc = ''; this.pageData.toolTypeDesc = ''; - this.pageData.calendarId = ''; + this.pageData.calendarId = 'CN_2'; this.pageData.schedCapacity = 'Infinite capacity'; this.pageData.alternateToolId = ''; this.pageData.alternateToolDesc = ''; @@ -340,9 +341,12 @@ export default { this.pageData.propertyNo = ''; this.pageData.lastUsed = ''; this.pageData.noteText = ''; + //新增结束调用获取默认的方法 + this.changeToolPrefix(); }else{ this.titleCon = '工具修改'; this.pageData = JSON.parse(JSON.stringify(toolInfo)); + this.pageData.username = this.$store.state.user.name; } this.addFlag = addFlag; }, @@ -375,6 +379,7 @@ export default { getBaseData (val) { if (this.tagNo === 1017) { this.pageData.site = val.SiteID; + this.changeToolPrefix(); }else if (this.tagNo === 1016) { this.pageData.toolType = val.tool_type; this.pageData.toolTypeDesc = val.tool_type_desc; @@ -463,12 +468,26 @@ export default { getNextToolId(this.pageData).then(({data}) =>{ if(data.code === 200){ //如果获取成功 - debugger this.pageData.toolId = data.resultRow.toolId; }else{ this.$message.error(data.msg); } }); + }, + + /*修改工具的前缀*/ + changeToolPrefix(){ + let requestData = {'site': this.pageData.site, 'firstType': 'tool', 'secondType': 'default_tool_prefix'} + getBaseConfigData(requestData).then(({data}) =>{ + if(data.code === '200'){ + //如果获取成功 + this.pageData.toolId = data.resultRow.baseData; + }else{ + this.pageData.toolId = ''; + this.$message.error(data.msg); + } + }); + }, }, diff --git a/src/views/modules/tooling/components/com_tool_instance_add_update.vue b/src/views/modules/tooling/components/com_tool_instance_add_update.vue index cfd1a87..ba5f0d4 100644 --- a/src/views/modules/tooling/components/com_tool_instance_add_update.vue +++ b/src/views/modules/tooling/components/com_tool_instance_add_update.vue @@ -353,6 +353,7 @@ export default { }else{ this.titleCon = '工具修改'; this.pageData = JSON.parse(JSON.stringify(toolInfo)); + this.pageData.username = this.$store.state.user.name; } this.addFlag = addFlag; }, diff --git a/src/views/modules/tooling/manuf_tool.vue b/src/views/modules/tooling/manuf_tool.vue index 2f7179e..c7f3f24 100644 --- a/src/views/modules/tooling/manuf_tool.vue +++ b/src/views/modules/tooling/manuf_tool.vue @@ -435,6 +435,78 @@ export default { fixed: '', columnWidth: 180 }, + { + userId: this.$store.state.user.name, + functionId: 106003, + serialNumber: '106003Table1CreatedBy', + tableId: "106003Table1", + tableName: "刀具信息主表", + columnProp: "createdBy", + headerAlign: "center", + align: "left", + columnLabel: "创建人", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 106003, + serialNumber: '106003Table1CreateDate', + tableId: "106003Table1", + tableName: "刀具信息主表", + columnProp: "createDate", + headerAlign: "center", + align: "left", + columnLabel: "创建时间", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, + { + userId: this.$store.state.user.name, + functionId: 106003, + serialNumber: '106003Table1UpdatedBy', + tableId: "106003Table1", + tableName: "刀具信息主表", + columnProp: "updatedBy", + headerAlign: "center", + align: "left", + columnLabel: "修改人", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 106003, + serialNumber: '106003Table1UpdatedDate', + tableId: "106003Table1", + tableName: "刀具信息主表", + columnProp: "updatedDate", + headerAlign: "center", + align: "left", + columnLabel: "修改时间", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, ], columnDetailList: [ { @@ -635,7 +707,78 @@ export default { fixed: '', columnWidth: 200 }, - + { + userId: this.$store.state.user.name, + functionId: 106003, + serialNumber: '106003Table2CreatedBy', + tableId: "106003Table2", + tableName: "工具实例明细", + columnProp: "createdBy", + headerAlign: "center", + align: "left", + columnLabel: "创建人", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 106003, + serialNumber: '106003Table2CreatedDate', + tableId: "106003Table2", + tableName: "工具实例明细", + columnProp: "createdDate", + headerAlign: "center", + align: "left", + columnLabel: "创建时间", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, + { + userId: this.$store.state.user.name, + functionId: 106003, + serialNumber: '106003Table2UpdatedBy', + tableId: "106003Table2", + tableName: "工具实例明细", + columnProp: "updatedBy", + headerAlign: "center", + align: "left", + columnLabel: "修改人", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 106003, + serialNumber: '106003Table2UpdatedDate', + tableId: "106003Table2", + tableName: "刀具信息主表", + columnProp: "updatedDate", + headerAlign: "center", + align: "left", + columnLabel: "修改时间", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, ], } },