| | |
| | | editDate: editDate, |
| | | item: orderSelect |
| | | } |
| | | }).then(res => { |
| | | }).then(async res => { |
| | | if (res.data.tbBillList) { |
| | | this.getWomdaaIsShow(); |
| | | |
| | | // 调用后端方法绑定数采标志 |
| | | const bindSuccess = await this.bindDataCollectionFlag(item.daa001); |
| | | |
| | | // 绑定成功后再提示开工成功 |
| | | if (bindSuccess) { |
| | | uni.showToast({ |
| | | title: '开工成功', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 新增:绑定数采标志方法 |
| | | async bindDataCollectionFlag(orderNo) { |
| | | try { |
| | | const res = await this.$post({ |
| | | url: '/MesOrderSelect/AddBySc', |
| | | data: { |
| | | machineNo: this.machineNo, |
| | | editDate: editDate, |
| | | item: orderSelect |
| | | } |
| | | }); |
| | | |
| | | if (res && res.status === 0) { |
| | | console.log('数采标志绑定成功'); |
| | | this.$showMessage('数采标志绑定成功'); |
| | | return true; |
| | | } else { |
| | | console.error('数采标志绑定失败:', res.message || '未知错误'); |
| | | this.$showMessage('数采标志绑定失败'); |
| | | return false; |
| | | } |
| | | } catch (err) { |
| | | console.error('绑定数采标志错误:', err); |
| | | this.$showMessage('绑定数采标志失败'); |
| | | return false; |
| | | } |
| | | }, |
| | | |
| | | // 处理暂停(使用清空重选的逻辑) |
| | | async handlePauseWork(item) { |
| | | if (!this.machineNo) { |