|
|
@ -420,13 +420,34 @@ const butttondata = (row,$index) => { |
|
|
|
hasPermi: '', |
|
|
|
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.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.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) => { |
|
|
|
if (val == 'mainClose') { // 关闭 |
|
|
@ -466,6 +487,50 @@ const buttonTableClick = async (val, row) => { |
|
|
|
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"> |
|
|
|
// 重新生成标签后必须撕毁原标签,打印并粘贴新标签,如标签错误将拒绝收货!! |
|
|
|
// </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') { |
|
|
|
// 标签打印 |
|
|
|
labelPrint(row) |
|
|
|