|
|
@ -169,6 +169,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
|
// 重盘和监盘点击去确定的时候返回 |
|
|
|
const searchTableSuccessCount = (formField, searchField, val, type,row,count) => { |
|
|
|
nextTick(() => { |
|
|
|
let getLoading = ElLoading.service({ |
|
|
|
lock: true, |
|
|
|
text: 'loading...', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
if (formField == 'reCount') { |
|
|
|
// 重盘 |
|
|
|
if(type == 3){ |
|
|
@ -177,7 +182,10 @@ const searchTableSuccessCount = (formField, searchField, val, type,row,count) => |
|
|
|
row.type = type |
|
|
|
CountRequestMainApi.reCount(row).then((res)=>{ |
|
|
|
message.success('重盘成功') |
|
|
|
getLoading?.close() |
|
|
|
getList() |
|
|
|
}).catch((err) => { |
|
|
|
getLoading?.close() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
// 监盘 |
|
|
@ -189,7 +197,10 @@ const searchTableSuccessCount = (formField, searchField, val, type,row,count) => |
|
|
|
row.type = type |
|
|
|
CountRequestMainApi.superviseCount(row).then((res)=>{ |
|
|
|
message.success('监盘成功') |
|
|
|
getLoading?.close() |
|
|
|
getList() |
|
|
|
}).catch((err) => { |
|
|
|
getLoading?.close() |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
@ -413,12 +424,15 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'countAdjustRequest') { |
|
|
|
// 生成盘点调整申请 |
|
|
|
await message.confirm('确认要生成盘点调整申请吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CountRequestMainApi.generateCountadjustRequest(row.id) |
|
|
|
.then(() => { |
|
|
|
message.success(t('已生成盘点调整申请')) |
|
|
|
tableObject.loading = false |
|
|
|
getList() |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
tableObject.loading = false |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainThaw') { |
|
|
@ -469,11 +483,13 @@ const handleDelete = async (id: number) => { |
|
|
|
tableObject.loading = true |
|
|
|
// 发起删除 |
|
|
|
await CountRequestMainApi.deleteCountRequestMain(id) |
|
|
|
tableObject.loading = false |
|
|
|
|
|
|
|
message.success(t('common.delSuccess')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} finally { |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|