|
|
@ -69,6 +69,8 @@ |
|
|
|
:apiPage="ProductrepairRequestDetailApi.getProductrepairRequestDetailaPage" |
|
|
|
:apiDelete="ProductrepairRequestDetailApi.deleteProductrepairRequestDetaila" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
:buttondataTable="buttondataTable" |
|
|
|
@tableFormButton="tableFormButton" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- bom列表 --> |
|
|
@ -117,6 +119,18 @@ const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(ProductrepairRequestMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
// 详情 table 操作扩展 按钮 |
|
|
|
const buttondataTable = ref([{ |
|
|
|
label: 'Bom', |
|
|
|
name: 'bom', |
|
|
|
hide: false, |
|
|
|
type: 'primary', |
|
|
|
icon: '', |
|
|
|
color: '', |
|
|
|
hasPermi: '', |
|
|
|
link: true, // 文本展现按钮 |
|
|
|
}]) |
|
|
|
|
|
|
|
// Bom 窗口 |
|
|
|
const DialogTitle = ref('Bom信息') |
|
|
|
const bomModelVisible = ref(false) |
|
|
@ -171,7 +185,6 @@ const buttonOperationClick = async (row, label, index)=> { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
@ -190,6 +203,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
row['uom'] = val[0]['uom'] |
|
|
|
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
row['fromLocationCode'] = val[0]['locationCode'] |
|
|
|
} else if(formField == 'productionLineCode'){ |
|
|
|
row['productionLineCode'] = val[0]['code'] |
|
|
|
} else if(formField == 'workStationCode'){ |
|
|
|
row['workStationCode'] = val[0]['code'] |
|
|
|
} else if(formField == 'formField'){ |
|
|
|
row['workStationCode'] = val[0]['code'] |
|
|
|
} else { |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
@ -284,14 +303,22 @@ const butttondata = (row) => { |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'mainClose') { // 关闭 |
|
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
|
handleClose(row.id) |
|
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
|
handleReAdd(row.id) |
|
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
|
handleSubmit(row.id) |
|
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
|
handleRefused(row.id) |
|
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
|
handleAgree(row.id) |
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
console.log('列表-操作按钮事件-处理') |
|
|
|
handleHandle(row.id) |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
@ -299,6 +326,66 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
const handleClose = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmColse')) |
|
|
|
await ProductrepairRequestMainApi.closeProductrepairRequestMain(id) |
|
|
|
message.success(t('common.closeSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 重新添加按钮操作 */ |
|
|
|
const handleReAdd = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmReAdd')) |
|
|
|
await ProductrepairRequestMainApi.reAddProductrepairRequestMain(id) |
|
|
|
message.success(t('common.reAddSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 提交按钮操作 */ |
|
|
|
const handleSubmit = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmSubmit')) |
|
|
|
await ProductrepairRequestMainApi.submitProductrepairRequestMain(id) |
|
|
|
message.success(t('common.submitSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批驳回按钮操作 */ |
|
|
|
const handleRefused = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmRefused')) |
|
|
|
await ProductrepairRequestMainApi.refusedProductrepairRequestMain(id) |
|
|
|
message.success(t('common.refusedSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
const handleAgree = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmAgree')) |
|
|
|
await ProductrepairRequestMainApi.agreeProductrepairRequestMain(id) |
|
|
|
message.success(t('common.agreeSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 处理按钮操作 */ |
|
|
|
const handleHandle = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmHandle')) |
|
|
|
await ProductrepairRequestMainApi.handleProductrepairRequestMain(id) |
|
|
|
message.success(t('common.handleSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm =async (type: string, row?: number) => { |
|
|
@ -404,7 +491,18 @@ const searchFormClick = (searchData) => { |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 查看 Bom 按钮回调事件 |
|
|
|
const tableFormButton = async (val , row) => { |
|
|
|
if (val == 'bom') { // 查看 bom |
|
|
|
bomModelVisible.value = true |
|
|
|
DialogTitle.value = '物品代码【' + row.itemCode + '】——Bom信息' |
|
|
|
detatableDataBom.params = { |
|
|
|
itemCode: row.itemCode, |
|
|
|
masterId: row.id |
|
|
|
} |
|
|
|
await getDetailListBom() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|