Browse Source

生成标签和重新生成标签loading

hella_online_20240821
zhang_li 3 months ago
parent
commit
5a55097a66
  1. 40
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

40
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -22,11 +22,7 @@
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" :detailAllSchemas="SupplierdeliverRequestDetail.allSchemas"
> >
<template #rightBtn_right> <template #rightBtn_right>
<el-tooltip <el-tooltip effect="dark" content="查询条件" placement="top-start">
effect="dark"
content="查询条件"
placement="top-start"
>
<el-button @click="foldUpClick"> <el-button @click="foldUpClick">
<Icon :icon="visibleSearch ? 'ep:arrow-up' : 'ep:arrow-down'" /> <Icon :icon="visibleSearch ? 'ep:arrow-up' : 'ep:arrow-down'" />
</el-button> </el-button>
@ -414,7 +410,7 @@ const foldUpClick = ()=>{
clearTimeout(timer) clearTimeout(timer)
timer = null timer = null
} }
}, 500); }, 500)
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
@ -612,6 +608,8 @@ const buttonTableClick = async (val, row) => {
handleDelete(row.masterId) handleDelete(row.masterId)
} else if (val == 'ssbq') { } else if (val == 'ssbq') {
// //
try {
tableObject.loading = true
detatableData.params = { detatableData.params = {
masterId: row.masterId masterId: row.masterId
} }
@ -620,6 +618,9 @@ const buttonTableClick = async (val, row) => {
await getGenerateLabelList(row) await getGenerateLabelList(row)
count.value++ count.value++
formLabelRef.value.open('create', row, null, 'createLabel') // createLabel formLabelRef.value.open('create', row, null, 'createLabel') // createLabel
} finally {
tableObject.loading = false
}
} else if (val == 'ressbq') { } else if (val == 'ressbq') {
console.log('重新生成标签') console.log('重新生成标签')
// ElMessageBox.confirm(`<div style="color:red"> // ElMessageBox.confirm(`<div style="color:red">
@ -627,17 +628,23 @@ const buttonTableClick = async (val, row) => {
// </div>`,'',{ // </div>`,'',{
// dangerouslyUseHTMLString: true, // dangerouslyUseHTMLString: true,
// }) // })
ElMessageBox.confirm(`<div> tableObject.loading = true
ElMessageBox.confirm(
`<div>
<strong style="color:red;font-size:18px">重新生成标签后必须撕毁原标签打印并粘贴新标签如标签错误将拒绝收货</strong> <strong style="color:red;font-size:18px">重新生成标签后必须撕毁原标签打印并粘贴新标签如标签错误将拒绝收货</strong>
<br> <br>
<span>重新生成标签会删除上次生成的标签是否确认继续</span> <span>重新生成标签会删除上次生成的标签是否确认继续</span>
</div>`, '提示', { </div>`,
'提示',
{
confirmButtonText: t('ts.确 认'), confirmButtonText: t('ts.确 认'),
cancelButtonText: t('ts.取 消'), cancelButtonText: t('ts.取 消'),
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
}) }
.then(() => { )
SupplierdeliverRequestMainApi.deleteOldLabels(row.masterId).then(async (res) => { .then(async () => {
try {
await SupplierdeliverRequestMainApi.deleteOldLabels(row.masterId).then(async (res) => {
if (res) { if (res) {
// //
detatableData.params = { detatableData.params = {
@ -650,9 +657,13 @@ const buttonTableClick = async (val, row) => {
formLabelRef.value.open('create', row, null, 'createLabel') // createLabel formLabelRef.value.open('create', row, null, 'createLabel') // createLabel
} }
}) })
} finally {
tableObject.loading = false
}
}) })
.catch(() => { .catch(() => {
console.info('操作取消') console.info('操作取消')
tableObject.loading = false
}) })
} else if (val == 'point') { } else if (val == 'point') {
// //
@ -713,7 +724,11 @@ const footButtonClick = async (val) => {
return return
} }
let isNext1 = detatableData1.value.some((item) => { let isNext1 = detatableData1.value.some((item) => {
return item.secondPackQty && item.packQty && parseFloat(item.packQty) > parseFloat(item.secondPackQty) return (
item.secondPackQty &&
item.packQty &&
parseFloat(item.packQty) > parseFloat(item.secondPackQty)
)
}) })
if (isNext1) { if (isNext1) {
message.warning('托的包装数量要大于箱的包装数量,请修改') message.warning('托的包装数量要大于箱的包装数量,请修改')
@ -762,7 +777,6 @@ const formSelectChangeLabel = (field, val, row) => {
} }
} }
// //
const { wsCache } = useCache() const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */

Loading…
Cancel
Save