From cf6831dfbe8b59d014ab2a500d1c0129d183056d Mon Sep 17 00:00:00 2001 From: XingCheng3 <1773407212@qq.com> Date: Wed, 27 May 2026 16:33:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BD=AC=E5=8F=B0=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=20=E5=A2=9E=E5=8A=A0=E7=A8=8B=E5=BA=8F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DeviceUpLineBarCodeZT/index.vue | 70 ++++++++++++++++--- 1 file changed, 60 insertions(+), 10 deletions(-) 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