Browse Source

Merge branch 'hella_online_20240821' into hella_online_20240803

hella_online_20240823
陈薪名 3 months ago
parent
commit
70a01e93a0
  1. 96
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

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

@ -21,15 +21,11 @@
:allSchemas="SupplierdeliverRequestMain.allSchemas"
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas"
>
<template #rightBtn_right>
<el-tooltip
effect="dark"
content="查询条件"
placement="top-start"
>
<el-button @click="foldUpClick ">
<Icon :icon="visibleSearch ? 'ep:arrow-up' : 'ep:arrow-down'" />
</el-button>
<template #rightBtn_right>
<el-tooltip effect="dark" content="查询条件" placement="top-start">
<el-button @click="foldUpClick">
<Icon :icon="visibleSearch ? 'ep:arrow-up' : 'ep:arrow-down'" />
</el-button>
</el-tooltip>
</template>
</TableHead>
@ -405,16 +401,16 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row
}
//
const visibleSearch = ref(false)
const foldUpClick = ()=>{
const foldUpClick = () => {
visibleSearch.value = !visibleSearch.value
tableObject.loading = true
let timer = setTimeout(() => {
tableObject.loading = false
if(timer){
if (timer) {
clearTimeout(timer)
timer = null
}
}, 500);
}, 500)
}
const { tableObject, tableMethods } = useTable({
@ -612,14 +608,19 @@ const buttonTableClick = async (val, row) => {
handleDelete(row.masterId)
} else if (val == 'ssbq') {
//
detatableData.params = {
masterId: row.masterId
try {
tableObject.loading = true
detatableData.params = {
masterId: row.masterId
}
genLabelId.value = row.masterId
// await getDetailList()
await getGenerateLabelList(row)
count.value++
formLabelRef.value.open('create', row, null, 'createLabel') // createLabel
} finally {
tableObject.loading = false
}
genLabelId.value = row.masterId
// await getDetailList()
await getGenerateLabelList(row)
count.value++
formLabelRef.value.open('create', row, null, 'createLabel') // createLabel
} else if (val == 'ressbq') {
console.log('重新生成标签')
// ElMessageBox.confirm(`<div style="color:red">
@ -627,32 +628,42 @@ const buttonTableClick = async (val, row) => {
// </div>`,'',{
// dangerouslyUseHTMLString: true,
// })
ElMessageBox.confirm(`<div>
tableObject.loading = true
ElMessageBox.confirm(
`<div>
<strong style="color:red;font-size:18px">重新生成标签后必须撕毁原标签打印并粘贴新标签如标签错误将拒绝收货</strong>
<br>
<span>重新生成标签会删除上次生成的标签是否确认继续</span>
</div>`, '提示', {
confirmButtonText: t('ts.确 认'),
cancelButtonText: t('ts.取 消'),
dangerouslyUseHTMLString: true
})
.then(() => {
SupplierdeliverRequestMainApi.deleteOldLabels(row.masterId).then(async (res) => {
if (res) {
//
detatableData.params = {
masterId: row.masterId
</div>`,
'提示',
{
confirmButtonText: t('ts.确 认'),
cancelButtonText: t('ts.取 消'),
dangerouslyUseHTMLString: true
}
)
.then(async () => {
try {
await SupplierdeliverRequestMainApi.deleteOldLabels(row.masterId).then(async (res) => {
if (res) {
//
detatableData.params = {
masterId: row.masterId
}
genLabelId.value = row.masterId
// await getDetailList()
count.value++
await getGenerateLabelList(row)
formLabelRef.value.open('create', row, null, 'createLabel') // createLabel
}
genLabelId.value = row.masterId
// await getDetailList()
count.value++
await getGenerateLabelList(row)
formLabelRef.value.open('create', row, null, 'createLabel') // createLabel
}
})
})
} finally {
tableObject.loading = false
}
})
.catch(() => {
console.info('操作取消')
tableObject.loading = false
})
} else if (val == 'point') {
//
@ -679,7 +690,7 @@ const getGenerateLabelList = async (row) => {
detatableData1.value = res
detatableData1.value.forEach((item) => {
// console.log(3333, item?.boxPackaging[0])
item.boxPackaging =item.boxPackaging ? item.boxPackaging:[]
item.boxPackaging = item.boxPackaging ? item.boxPackaging : []
item.packUnitInitOptions = item.boxPackaging
item.secondPackUnitInitOptions = item.palletPackaging || []
let obj = item?.boxPackaging[0]
@ -713,7 +724,11 @@ const footButtonClick = async (val) => {
return
}
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) {
message.warning('托的包装数量要大于箱的包装数量,请修改')
@ -762,7 +777,6 @@ const formSelectChangeLabel = (field, val, row) => {
}
}
//
const { wsCache } = useCache()
/** 详情操作 */

Loading…
Cancel
Save