|
|
@ -184,7 +184,7 @@ const isShowMainButton = (row,val) => { |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:customerreceipt-request-main:close'}), // 关闭 |
|
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:customerreceipt-request-main:reAdd'}), //重新添加 |
|
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:customerreceipt-request-main:reAdd'}), //重新添加 |
|
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customerreceipt-request-main:submit'}), // 提交审批 |
|
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customerreceipt-request-main:refused'}), // 驳回 |
|
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customerreceipt-request-main:agree'}), // 审批通过 |
|
|
@ -198,15 +198,53 @@ const butttondata = (row) => { |
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'mainClose') { // 关闭 |
|
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
|
await message.confirm('确认要关闭吗?') |
|
|
|
CustomerreceiptRequestMainApi.close(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
CustomerreceiptRequestMainApi.reAdd(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
CustomerreceiptRequestMainApi.submit(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
CustomerreceiptRequestMainApi.refused(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
|
await message.confirm('确认要审批通过吗?') |
|
|
|
CustomerreceiptRequestMainApi.agree(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
await message.confirm('确认要 处理吗?') |
|
|
|
CustomerreceiptRequestMainApi.handle(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|