|
|
@ -249,8 +249,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
// 查看质检报告 |
|
|
|
checkQualityReport(row) |
|
|
|
} else if(val == 'mainJobRefusal'){ |
|
|
|
handleRefusal(row.masterId) |
|
|
|
getList() |
|
|
|
// handleRefusal(row.masterId) |
|
|
|
resonSubmit(row) |
|
|
|
} |
|
|
|
} |
|
|
|
// 查看质检报告 |
|
|
@ -270,12 +270,33 @@ const handleClose = async (id: number) => { |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
const resonSubmit = async (row)=>{ |
|
|
|
|
|
|
|
ElMessageBox.prompt(t('ts.请输入拒收原因'), t('ts.提示'), { |
|
|
|
confirmButtonText: t('common.ok'), |
|
|
|
cancelButtonText: t('common.cancel'), |
|
|
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格 |
|
|
|
inputErrorMessage: t(`ts.${'驳回原因不能为空,且不超过256字'}`), |
|
|
|
inputType:'textarea', |
|
|
|
inputValidator:(value)=>{ |
|
|
|
if(value.length>60||value.length==0){ |
|
|
|
return false |
|
|
|
}else{ |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
}).then(({ value }) => { |
|
|
|
// 驳回原因 |
|
|
|
handleRefusal(row.masterId,value) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
} |
|
|
|
/** 拒收按钮操作 */ |
|
|
|
const handleRefusal = async (id: number) => { |
|
|
|
const handleRefusal = async (id: number,refuseReason:string) => { |
|
|
|
// refuseReason |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmRefusal')) |
|
|
|
await PurchasereceiptJobMainApi.refusalPurchasereceiptJobMain(id) |
|
|
|
await PurchasereceiptJobMainApi.refusalPurchasereceiptJobMain({id,refuseReason}) |
|
|
|
message.success(t('common.refusalSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|