|
@ -21,15 +21,11 @@ |
|
|
:allSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
:allSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" |
|
|
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" |
|
|
> |
|
|
> |
|
|
<template #rightBtn_right> |
|
|
<template #rightBtn_right> |
|
|
<el-tooltip |
|
|
<el-tooltip effect="dark" content="查询条件" placement="top-start"> |
|
|
effect="dark" |
|
|
<el-button @click="foldUpClick"> |
|
|
content="查询条件" |
|
|
<Icon :icon="visibleSearch ? 'ep:arrow-up' : 'ep:arrow-down'" /> |
|
|
placement="top-start" |
|
|
</el-button> |
|
|
> |
|
|
|
|
|
<el-button @click="foldUpClick "> |
|
|
|
|
|
<Icon :icon="visibleSearch ? 'ep:arrow-up' : 'ep:arrow-down'" /> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
</template> |
|
|
</template> |
|
|
</TableHead> |
|
|
</TableHead> |
|
@ -405,16 +401,16 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row |
|
|
} |
|
|
} |
|
|
// 为了折叠 |
|
|
// 为了折叠 |
|
|
const visibleSearch = ref(false) |
|
|
const visibleSearch = ref(false) |
|
|
const foldUpClick = ()=>{ |
|
|
const foldUpClick = () => { |
|
|
visibleSearch.value = !visibleSearch.value |
|
|
visibleSearch.value = !visibleSearch.value |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
let timer = setTimeout(() => { |
|
|
let timer = setTimeout(() => { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
if(timer){ |
|
|
if (timer) { |
|
|
clearTimeout(timer) |
|
|
clearTimeout(timer) |
|
|
timer = null |
|
|
timer = null |
|
|
} |
|
|
} |
|
|
}, 500); |
|
|
}, 500) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
const { tableObject, tableMethods } = useTable({ |
|
@ -612,14 +608,19 @@ const buttonTableClick = async (val, row) => { |
|
|
handleDelete(row.masterId) |
|
|
handleDelete(row.masterId) |
|
|
} else if (val == 'ssbq') { |
|
|
} else if (val == 'ssbq') { |
|
|
// 生成标签 |
|
|
// 生成标签 |
|
|
detatableData.params = { |
|
|
try { |
|
|
masterId: row.masterId |
|
|
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') { |
|
|
} else if (val == 'ressbq') { |
|
|
console.log('重新生成标签') |
|
|
console.log('重新生成标签') |
|
|
// ElMessageBox.confirm(`<div style="color:red"> |
|
|
// ElMessageBox.confirm(`<div style="color:red"> |
|
@ -627,32 +628,42 @@ 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.确 认'), |
|
|
'提示', |
|
|
cancelButtonText: t('ts.取 消'), |
|
|
{ |
|
|
dangerouslyUseHTMLString: true |
|
|
confirmButtonText: t('ts.确 认'), |
|
|
}) |
|
|
cancelButtonText: t('ts.取 消'), |
|
|
.then(() => { |
|
|
dangerouslyUseHTMLString: true |
|
|
SupplierdeliverRequestMainApi.deleteOldLabels(row.masterId).then(async (res) => { |
|
|
} |
|
|
if (res) { |
|
|
) |
|
|
// 生成标签 |
|
|
.then(async () => { |
|
|
detatableData.params = { |
|
|
try { |
|
|
masterId: row.masterId |
|
|
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() |
|
|
} finally { |
|
|
count.value++ |
|
|
tableObject.loading = false |
|
|
await getGenerateLabelList(row) |
|
|
} |
|
|
formLabelRef.value.open('create', row, null, 'createLabel') //创建标签页面 createLabel 标题 |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
}) |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
|
console.info('操作取消') |
|
|
console.info('操作取消') |
|
|
|
|
|
tableObject.loading = false |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'point') { |
|
|
} else if (val == 'point') { |
|
|
// 标签打印 |
|
|
// 标签打印 |
|
@ -679,7 +690,7 @@ const getGenerateLabelList = async (row) => { |
|
|
detatableData1.value = res |
|
|
detatableData1.value = res |
|
|
detatableData1.value.forEach((item) => { |
|
|
detatableData1.value.forEach((item) => { |
|
|
// console.log(3333, item?.boxPackaging[0]) |
|
|
// console.log(3333, item?.boxPackaging[0]) |
|
|
item.boxPackaging =item.boxPackaging ? item.boxPackaging:[] |
|
|
item.boxPackaging = item.boxPackaging ? item.boxPackaging : [] |
|
|
item.packUnitInitOptions = item.boxPackaging |
|
|
item.packUnitInitOptions = item.boxPackaging |
|
|
item.secondPackUnitInitOptions = item.palletPackaging || [] |
|
|
item.secondPackUnitInitOptions = item.palletPackaging || [] |
|
|
let obj = item?.boxPackaging[0] |
|
|
let obj = item?.boxPackaging[0] |
|
@ -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() |
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|