|
|
@ -8,7 +8,7 @@ |
|
|
<el-row class="customer-row"> |
|
|
<el-row class="customer-row"> |
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
<el-form-item :label=labels.toolId> |
|
|
<el-form-item :label=labels.toolId> |
|
|
<el-input v-model="pageData.toolId" ></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="pageData.toolId" :disabled="!this.addFlag"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
@ -19,7 +19,7 @@ |
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
<el-form-item :label=labels.site> |
|
|
<el-form-item :label=labels.site> |
|
|
<span slot="label" style="" @click="getBaseList(1017)"><a herf="#">域:</a></span> |
|
|
<span slot="label" style="" @click="getBaseList(1017)"><a herf="#">域:</a></span> |
|
|
<el-input v-model="pageData.site" ></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="pageData.site" :disabled="!this.addFlag"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
@ -49,7 +49,10 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
<el-form-item :label=labels.schedCapacity> |
|
|
<el-form-item :label=labels.schedCapacity> |
|
|
<el-input v-model="pageData.schedCapacity" ></el-input> |
|
|
|
|
|
|
|
|
<el-select filterable v-model="pageData.schedCapacity" style="width: 135px"> |
|
|
|
|
|
<el-option label="Infinite capacity" value="Infinite capacity"></el-option> |
|
|
|
|
|
<el-option label="Finite capacity" value="Finite capacity"></el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -57,7 +60,12 @@ |
|
|
<el-row class="customer-row"> |
|
|
<el-row class="customer-row"> |
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
<el-form-item :label=labels.calibrationControl> |
|
|
<el-form-item :label=labels.calibrationControl> |
|
|
<el-input v-model="pageData.calibrationControl" ></el-input> |
|
|
|
|
|
|
|
|
<el-select filterable v-model="pageData.calibrationControl" style="width: 135px"> |
|
|
|
|
|
<el-option label="No Calibration Required" value="No Calibration Required"></el-option> |
|
|
|
|
|
<el-option label="Calibration Required" value="Calibration Required"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
@ -71,8 +79,8 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
<el-checkbox style="margin-left: 10px; margin-top: 18px;" v-model="pageData.enabledForControlPlanDb" true-label="true" false-label="false" |
|
|
|
|
|
:label=labels.enabledForControlPlanDb name="type"></el-checkbox> |
|
|
|
|
|
|
|
|
<el-checkbox style="margin-left: 10px; margin-top: 18px;" v-model="pageData.enabledForControlPlanDb" true-label="TRUE" false-label="FALSE" |
|
|
|
|
|
:label=labels.enabledForControlPlanDb ></el-checkbox> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<!-- 第四行 --> |
|
|
<!-- 第四行 --> |
|
|
@ -100,7 +108,7 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
</el-container> |
|
|
</el-container> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" @click="addToolInstanceIdFun">{{ buttons.confirmButton }}</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="saveToolInfoFun">{{ buttons.confirmButton }}</el-button> |
|
|
<el-button type="primary" @click="closeDialog">{{buttons.closeButton}}</el-button> |
|
|
<el-button type="primary" @click="closeDialog">{{buttons.closeButton}}</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -130,7 +138,7 @@ export default { |
|
|
titleCon: '工具新增', |
|
|
titleCon: '工具新增', |
|
|
showDefault: false, |
|
|
showDefault: false, |
|
|
visible: false, |
|
|
visible: false, |
|
|
readonlyFlag: true, |
|
|
|
|
|
|
|
|
addFlag: false, |
|
|
pageData: { |
|
|
pageData: { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
@ -139,17 +147,16 @@ export default { |
|
|
toolType: '', |
|
|
toolType: '', |
|
|
toolTypeDesc: '', |
|
|
toolTypeDesc: '', |
|
|
calendarId: '', |
|
|
calendarId: '', |
|
|
schedCapacity: '', |
|
|
|
|
|
|
|
|
schedCapacity: 'Infinite capacity', |
|
|
alternateToolId: '', |
|
|
alternateToolId: '', |
|
|
alternateToolDesc: '', |
|
|
alternateToolDesc: '', |
|
|
calibrationControl: '', |
|
|
calibrationControl: '', |
|
|
calibrationTime: '', |
|
|
|
|
|
enabledForControlPlanDb: '', |
|
|
|
|
|
|
|
|
calibrationTime: 0, |
|
|
|
|
|
enabledForControlPlanDb: 'TRUE', |
|
|
lastUsed: '', |
|
|
lastUsed: '', |
|
|
noteText: '', |
|
|
noteText: '', |
|
|
ifsRowId: 0, |
|
|
ifsRowId: 0, |
|
|
ifsRowVersion: '', |
|
|
ifsRowVersion: '', |
|
|
addFlag: false |
|
|
|
|
|
}, |
|
|
}, |
|
|
dataListLoading: false, |
|
|
dataListLoading: false, |
|
|
labels: { |
|
|
labels: { |
|
|
@ -276,22 +283,21 @@ export default { |
|
|
this.pageData.toolId = ''; |
|
|
this.pageData.toolId = ''; |
|
|
this.pageData.toolType = ''; |
|
|
this.pageData.toolType = ''; |
|
|
this.pageData.toolDesc = ''; |
|
|
this.pageData.toolDesc = ''; |
|
|
this.pageData.toolType = ''; |
|
|
|
|
|
this.pageData.toolTypeDesc = ''; |
|
|
this.pageData.toolTypeDesc = ''; |
|
|
this.pageData.calendarId = ''; |
|
|
this.pageData.calendarId = ''; |
|
|
this.pageData.schedCapacity = ''; |
|
|
|
|
|
|
|
|
this.pageData.schedCapacity = 'Infinite capacity'; |
|
|
this.pageData.alternateToolId = ''; |
|
|
this.pageData.alternateToolId = ''; |
|
|
this.pageData.alternateToolDesc = ''; |
|
|
this.pageData.alternateToolDesc = ''; |
|
|
this.pageData.calibrationControl = ''; |
|
|
|
|
|
this.pageData.calibrationTime = ''; |
|
|
|
|
|
this.pageData.enabledForControlPlanDb = ''; |
|
|
|
|
|
|
|
|
this.pageData.calibrationControl = 'No Calibration Required'; |
|
|
|
|
|
this.pageData.calibrationTime = 0; |
|
|
|
|
|
this.pageData.enabledForControlPlanDb = 'FALSE'; |
|
|
this.pageData.lastUsed = ''; |
|
|
this.pageData.lastUsed = ''; |
|
|
this.pageData.noteText = ''; |
|
|
this.pageData.noteText = ''; |
|
|
}else{ |
|
|
}else{ |
|
|
this.titleCon = '工具修改'; |
|
|
this.titleCon = '工具修改'; |
|
|
this.pageData = JSON.parse(JSON.stringify(toolInfo)); |
|
|
this.pageData = JSON.parse(JSON.stringify(toolInfo)); |
|
|
} |
|
|
} |
|
|
this.pageData.addFlag = addFlag; |
|
|
|
|
|
|
|
|
this.addFlag = addFlag; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/*关闭modal*/ |
|
|
/*关闭modal*/ |
|
|
@ -332,53 +338,49 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*检查新的工具实例信息*/ |
|
|
|
|
|
checkToolInstanceIdFun(){ |
|
|
|
|
|
if(this.pageData.toolInstanceId == null || this.pageData.toolInstanceId == ''){ |
|
|
|
|
|
this.$message.error(this.labels.pleaseScanToolInstanceId); |
|
|
|
|
|
|
|
|
/*检查新的工信息*/ |
|
|
|
|
|
saveToolInfoFun(){ |
|
|
|
|
|
if(this.pageData.toolId == null || this.pageData.toolId == ''){ |
|
|
|
|
|
this.$message.error('工具标识号不能为空!'); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
checkToolInstanceId(this.pageData).then(({data}) => { |
|
|
|
|
|
//判断是否存在异常 |
|
|
|
|
|
if(data.code == 500){ |
|
|
|
|
|
this.$message.error(data.msg); |
|
|
|
|
|
}else if (data.resultMap.resultCode == 201){ |
|
|
|
|
|
let msg = data.resultMap.resultMsg; |
|
|
|
|
|
this.$confirm(msg, '提示', { |
|
|
|
|
|
confirmButtonText: this.labels.confirmLabel, |
|
|
|
|
|
cancelButtonText: this.labels.cancelLabel, |
|
|
|
|
|
type: "warning" |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.pageData.checkFlag = true; |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.pageData.checkFlag = false; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if(this.pageData.toolDesc == null || this.pageData.toolDesc == ''){ |
|
|
|
|
|
this.$message.error('工具描述不能为空!'); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.pageData.toolType == null || this.pageData.toolType == ''){ |
|
|
|
|
|
this.$message.error('工具类型不能为空!'); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.pageData.calendarId == null || this.pageData.calendarId == ''){ |
|
|
|
|
|
this.$message.error('日历标识不能为空!'); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.pageData.calibrationTime == null || this.pageData.calibrationTime === ''){ |
|
|
|
|
|
this.$message.error('校准间隔时间不能为空!'); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
//判断是否是新增 |
|
|
|
|
|
if (this.addFlag){ |
|
|
|
|
|
insertToolInfo(this.pageData).then(({data}) =>{ |
|
|
|
|
|
if(data.code === 200){ |
|
|
|
|
|
this.$message.success('操作成功!'); |
|
|
|
|
|
this.closeDialog(); |
|
|
}else{ |
|
|
}else{ |
|
|
this.pageData.checkFlag = true; |
|
|
|
|
|
|
|
|
this.$message.error(data.msg); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*添加刀模记录*/ |
|
|
|
|
|
addToolInstanceIdFun(){ |
|
|
|
|
|
/*添加工具的实例*/ |
|
|
|
|
|
addToolInstanceId(this.pageData).then(({data}) => { |
|
|
|
|
|
if(data.code == 500){ |
|
|
|
|
|
this.$message.error(data.msg); |
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
//清空数据再次准备 |
|
|
|
|
|
this.pageData.toolInstanceId = ''; |
|
|
|
|
|
this.pageData.oriToolInstanceId = ''; |
|
|
|
|
|
this.pageData.consumeQty = ''; |
|
|
|
|
|
this.pageData.oriConsumeQty = ''; |
|
|
|
|
|
this.pageData.totalConsumeQty = ''; |
|
|
|
|
|
|
|
|
modifyToolInfo(this.pageData).then(({data}) =>{ |
|
|
|
|
|
if(data.code === 200){ |
|
|
|
|
|
this.$message.success('操作成功!'); |
|
|
|
|
|
this.closeDialog(); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(data.msg); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
// this.factoryList() |
|
|
// this.factoryList() |
|
|
|