|
|
|
@ -404,8 +404,30 @@ export default { |
|
|
|
palletId: this.form.palletId |
|
|
|
}) |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success(data.msg || '强制置空托盘成功') |
|
|
|
this.reloadAfterSave('置空') |
|
|
|
// 先把页面改成置空后的库位,再按立库同步结果弹窗;同步失败也不回滚本地置空 - rqrq |
|
|
|
this.applyForceRemovedForm() |
|
|
|
await this.reloadAfterSave('置空') |
|
|
|
await this.$nextTick() |
|
|
|
const wcsSyncSuccess = !!(data.row && data.row.wcsSyncSuccess) |
|
|
|
if (wcsSyncSuccess) { |
|
|
|
await this.$alert('wms和立库数据已同步更新', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
closeOnClickModal: false |
|
|
|
}).catch(() => {}) |
|
|
|
} else { |
|
|
|
await this.$alert( |
|
|
|
'<div class="danger-mark-text">当前栈板已置空,但立库系统同步失败,请联系管理员</div>', |
|
|
|
'危险操作', |
|
|
|
{ |
|
|
|
confirmButtonText: '已知晓', |
|
|
|
type: 'error', |
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
customClass: 'special-edit-danger-alert', |
|
|
|
closeOnClickModal: false, |
|
|
|
closeOnPressEscape: false |
|
|
|
} |
|
|
|
).catch(() => {}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$alert((data && data.msg) || '强制置空托盘失败', '错误', { confirmButtonText: '确定' }) |
|
|
|
} |
|
|
|
@ -417,21 +439,32 @@ export default { |
|
|
|
this.removeLoading = false |
|
|
|
} |
|
|
|
}, |
|
|
|
// 强制置空成功后立刻清空页面库位,避免等重查才看到变化;区域和货架一并按已释放回显 - rqrq |
|
|
|
applyForceRemovedForm () { |
|
|
|
this.wcsOccupied = false |
|
|
|
this.form.callingFlag = 'N' |
|
|
|
this.form.areaId = '' |
|
|
|
this.form.locationCode = '' |
|
|
|
this.form.onShelfFlag = 'N' |
|
|
|
this.form.batchWcsFlag = null |
|
|
|
this.stationOptions = [] |
|
|
|
}, |
|
|
|
// 保存或置空后重查同一托盘,页面回显数据库最新区域、位置和任务标记;刷新失败提示当前操作名称 - rqrq |
|
|
|
reloadAfterSave (operationName = '保存') { |
|
|
|
async reloadAfterSave (operationName = '保存') { |
|
|
|
this.scanLoading = true |
|
|
|
scanPalletForSpecialEdit({ |
|
|
|
site: this.site, |
|
|
|
palletId: this.form.palletId |
|
|
|
}).then(({ data }) => { |
|
|
|
try { |
|
|
|
const { data } = await scanPalletForSpecialEdit({ |
|
|
|
site: this.site, |
|
|
|
palletId: this.form.palletId |
|
|
|
}) |
|
|
|
if (data && data.code === 0 && data.row) { |
|
|
|
this.applyScanResult(data.row, this.form.palletId) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
} catch (error) { |
|
|
|
this.$message.error(operationName + '后刷新栈板失败') |
|
|
|
}).finally(() => { |
|
|
|
} finally { |
|
|
|
this.scanLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
clearScan() { |
|
|
|
this.scanned = false |
|
|
|
|