|
@ -144,8 +144,26 @@ const buttonBaseClick = (val, item) => { |
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = [ |
|
|
const butttondata = [ |
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:containerMain:update'}), // 编辑 |
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:container-main:update'}), // 编辑 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:containerMain:delete'}), // 删除 |
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:container-main:delete'}), // 删除 |
|
|
|
|
|
{ |
|
|
|
|
|
label: '维修', |
|
|
|
|
|
name: 'repair', |
|
|
|
|
|
hide: false, |
|
|
|
|
|
type: 'primary', |
|
|
|
|
|
color: '', |
|
|
|
|
|
link: true, // 文本展现按钮 |
|
|
|
|
|
hasPermi: '' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '报废', |
|
|
|
|
|
name: 'scrap', |
|
|
|
|
|
hide: false, |
|
|
|
|
|
type: 'danger', |
|
|
|
|
|
color: '', |
|
|
|
|
|
link: true, // 文本展现按钮 |
|
|
|
|
|
hasPermi: '' |
|
|
|
|
|
} |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
@ -154,7 +172,31 @@ const buttonTableClick = async (val, row) => { |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
|
handleDelete(row.id) |
|
|
handleDelete(row.id) |
|
|
|
|
|
} else if(val == 'repair'){ // 维修 |
|
|
|
|
|
repairSubmit(row.id) |
|
|
|
|
|
} else if(val == 'scrap'){ // 报废 |
|
|
|
|
|
scrapSubmit(row.id) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 维修按钮操作 */ |
|
|
|
|
|
const repairSubmit = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
await message.confirm(t('common.confirmSubmit')) |
|
|
|
|
|
await ContainerMainApi.repairSubmitContainerRequestMain(id) |
|
|
|
|
|
message.success(t('common.submitSuccess')) |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 报废按钮操作 */ |
|
|
|
|
|
const scrapSubmit = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
await message.confirm(t('common.confirmSubmit')) |
|
|
|
|
|
await ContainerMainApi.scrapSubmitContainerRequestMain(id) |
|
|
|
|
|
message.success(t('common.submitSuccess')) |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|