diff --git a/src/views/EquipmentManagement/DeviceUpLineBarCodeZT/index.vue b/src/views/EquipmentManagement/DeviceUpLineBarCodeZT/index.vue index 9804f03..955293f 100644 --- a/src/views/EquipmentManagement/DeviceUpLineBarCodeZT/index.vue +++ b/src/views/EquipmentManagement/DeviceUpLineBarCodeZT/index.vue @@ -48,6 +48,18 @@ + + + + + + + + + + +
+
+ + + + + + + + + + +
+
{ valueMap[item.tagTypeCodeID] = item.tagValue }) - const { status, tray } = this.getWorkstationData(opName) + const { status, tray, result } = this.getWorkstationData(opName) // 更新四个状态灯 Object.entries(STATUS_TAG_MAP).forEach(([tagId, key]) => { if (valueMap[tagId] !== undefined) { @@ -477,6 +518,7 @@ export default { if (valueMap['200380'] !== undefined) tray.托盘号 = valueMap['200380'] if (valueMap['203240'] !== undefined) this.convertMaterialCode(opName, valueMap['203240']) if (valueMap['200440'] !== undefined) tray.托盘工件状态 = TRAY_STATUS_TEXT[valueMap['200440']] || '' + if (valueMap[PROGRAM_VERSION_TAG_ID] !== undefined) result.程序版本 = valueMap[PROGRAM_VERSION_TAG_ID] || '' }, /** 将PLC读取到的物料号通过存储过程转换为物料编码 */ @@ -756,6 +798,12 @@ export default { return } + const programVersion = result.程序版本 ? result.程序版本.toString() : '' + if (!programVersion) { + this.$message.warning('请先选择或输入程序版本!') + return + } + try { await this.$confirm('确定要执行手动请求上线操作吗?', '确认操作', { confirmButtonText: '确定', @@ -776,11 +824,13 @@ export default { return } - axios.post(writePlcApi_BtnType, { - tagTypeCodeID: '205015', - OPName: opName, - tagValue: 'true' - }, { timeout: 5000 }) + this.writePLCValue(opName, PROGRAM_VERSION_TAG_ID, programVersion) + .then(response => { + if (response.data.code != 0) { + return Promise.reject(new Error(response.data.msg || '程序版本写入失败')) + } + return this.writePLCValue(opName, '205015', 'true') + }) .then(response => { if (response.data.code == 0) { partLoadStatus.success = true