|
|
@ -172,10 +172,10 @@ const isShowMainButton = (row,val) => { |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 |
|
|
|
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:accept'}), // 承接 |
|
|
|
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 |
|
|
|
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 |
|
|
|
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 |
|
|
|
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:abandon'}), // 放弃 |
|
|
|
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:execute'}), // 执行 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
@ -183,15 +183,38 @@ const butttondata = (row) => { |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'mainJobExe') { // 执行 |
|
|
|
console.log('列表-操作按钮事件-执行') |
|
|
|
handleExecuteSpare(row.id) |
|
|
|
} else if (val == 'mainJobAba') { // 放弃 |
|
|
|
console.log('列表-操作按钮事件-放弃') |
|
|
|
handleAbandon(row.id) |
|
|
|
} else if (val == 'mainJobClo') { // 关闭 |
|
|
|
handleClose(row.id) |
|
|
|
} else if (val == 'mainJobAcc') { // 承接 |
|
|
|
console.log('列表-操作按钮事件-承接') |
|
|
|
handleAccept(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 执行按钮操作 */ |
|
|
|
const handleExecuteSpare = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm("是否确认执行任务!") |
|
|
|
await PurchasereceiptJobMainApi.executePurchasereceiptJobMainSpare(id) |
|
|
|
message.success("执行成功") |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 放弃按钮操作 */ |
|
|
|
const handleAbandon = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm("是否确认放弃任务!") |
|
|
|
await PurchasereceiptJobMainApi.abandonPurchasereceiptJobMainSpare(id) |
|
|
|
message.success("放弃成功") |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
const handleClose = async (id: number) => { |
|
|
|
try { |
|
|
@ -202,6 +225,16 @@ const handleClose = async (id: number) => { |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 承接按钮操作 */ |
|
|
|
const handleAccept = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm("是否承接任务!") |
|
|
|
await PurchasereceiptJobMainApi.acceptPurchasereceiptJobMain(id) |
|
|
|
message.success("承接成功") |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|