Browse Source

工具的BUG代码

master
DouDou 1 year ago
parent
commit
9d78d18423
  1. 2
      src/api/tool/com_tool_info_add_update.js
  2. 25
      src/views/modules/tooling/components/com_tool_info_add_update.vue
  3. 1
      src/views/modules/tooling/components/com_tool_instance_add_update.vue
  4. 145
      src/views/modules/tooling/manuf_tool.vue

2
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)

25
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);
}
});
},
},

1
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;
},

145
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
},
],
}
},

Loading…
Cancel
Save