Browse Source

盘点加loading

hella_online_20240829
wangyufei 3 months ago
parent
commit
203a140f91
  1. 20
      src/views/wms/countManage/count/countJobMain/index.vue
  2. 5
      src/views/wms/countManage/count/countPlanMain/index.vue
  3. 20
      src/views/wms/countManage/count/countRequestMain/index.vue
  4. 16
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

20
src/views/wms/countManage/count/countJobMain/index.vue

@ -236,13 +236,23 @@ const buttonTableClick = async (val, row) => {
console.log('列表-操作按钮事件-执行')
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
tableObject.loading = true
try {
await CountJobMainApi.abandonCountJobMain(row.id)
await getList()
} finally {
tableObject.loading = false
}
} else if (val == 'mainJobClo') { //
handleClose(row.id)
} else if (val == 'mainJobAcc') { //
tableObject.loading = true
try {
await CountJobMainApi.acceptCountJobMain(row.id)
await getList()
} finally {
tableObject.loading = false
}
console.log('列表-操作按钮事件-承接')
} else if (val == 'exportCountJob'){//
handleExportCountJob(row.id,row.number)
@ -258,19 +268,23 @@ const buttonTableClick = async (val, row) => {
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
tableObject.loading = true
await CountJobMainApi.closeCountJobMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
} finally {
tableObject.loading = false
}
}
//
const handleDone = async (id: number) => {
try {
await message.confirm('确认完成吗?')
tableObject.loading = true
await CountJobMainApi.doneCountJobMain(id)
await getList()
} catch {
} finally {
tableObject.loading = true
}
}

5
src/views/wms/countManage/count/countPlanMain/index.vue

@ -607,7 +607,9 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
} finally {
tableObject.loading = false
}
}
/** 导出按钮操作 */
@ -676,6 +678,7 @@ const submitForm = async (formType, data) => {
value: item.value
}
}) //
formRef.value.formLoading = true
try {
if (formType === 'create') {
await CountPlanMainApi.createCountPlanMain(data)

20
src/views/wms/countManage/count/countRequestMain/index.vue

@ -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
}
}
/** 导出按钮操作 */

16
src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

@ -257,13 +257,18 @@ const buttonTableClick = async (val, row) => {
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
tableObject.loading = true
let getLoading = ElLoading.service({
lock: true,
text: 'loading...',
background: 'rgba(0, 0, 0, 0.7)'
})
CountadjustRequestMainApi.handle(row.id).then(() => {
message.success(t('处理成功'))
tableObject.loading = false
getLoading?.close()
getList()
}).catch(err => {
tableObject.loading = false
getLoading?.close()
console.log(err)
})
} else if (val == 'edit') { //
@ -299,11 +304,12 @@ const handleDelete = async (id: number) => {
tableObject.loading = true
//
await CountadjustRequestMainApi.deleteCountadjustRequestMain(id)
tableObject.loading = false
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
} finally {
tableObject.loading = false
}
}
/** 导出按钮操作 */

Loading…
Cancel
Save