Browse Source

HL-6303EDI订单重新生成标签报错

hella_online_20241024
yufei_wang 1 month ago
parent
commit
3008ffd45e
  1. 5
      src/api/wms/purchasereceiptRequestMain/index.ts
  2. 67
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

5
src/api/wms/purchasereceiptRequestMain/index.ts

@ -153,3 +153,8 @@ export const genLabel = async (data) => {
export const queryPurchasePlan = async (data) => { export const queryPurchasePlan = async (data) => {
return await request.post({ url: `/wms/purchasereceipt-request-main/queryPurchasePlan`, data }) return await request.post({ url: `/wms/purchasereceipt-request-main/queryPurchasePlan`, data })
} }
// 重新生成标签前先删除标签
export const deleteOldLabels = async (id) => {
return await request.post({ url: `/wms/purchasereceipt-request-main/deleteOldLabels?id=`+ id })
}

67
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -420,13 +420,34 @@ const butttondata = (row,$index) => {
hasPermi: '', hasPermi: '',
link: true // link: true //
}, },
{
label: t('ts.重新生成标签'),
name: 'ressbq',
hide: isReGenLabelShowMainButtonLabel(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: 'wms:purchasereceipt-request-main:genLabels',
link: true //
},
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','6','8']) }), // defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','6','8']) }), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), //
] ]
} }
//
const isReGenLabelShowMainButtonLabel = (row, val) => {
if (val.indexOf(row.status) > -1) {
if (row.labelStatus == '1') {
return true
} else {
return false
}
} else {
return true
}
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
@ -466,6 +487,50 @@ 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
} else if (val == 'ressbq') {
console.log('重新生成标签')
// ElMessageBox.confirm(`<div style="color:red">
//
// </div>`,'',{
// dangerouslyUseHTMLString: true,
// })
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(async () => {
try {
alert(row.masterId)
await PurchasereceiptRequestMainApi.deleteOldLabels(row.masterId).then(async (res) => {
if (res) {
//
detatableData.params = {
masterId: 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') { }else if (val == 'point') {
// //
labelPrint(row) labelPrint(row)

Loading…
Cancel
Save