|
@ -69,6 +69,8 @@ |
|
|
:apiPage="ProductrepairRequestDetailApi.getProductrepairRequestDetailaPage" |
|
|
:apiPage="ProductrepairRequestDetailApi.getProductrepairRequestDetailaPage" |
|
|
:apiDelete="ProductrepairRequestDetailApi.deleteProductrepairRequestDetaila" |
|
|
:apiDelete="ProductrepairRequestDetailApi.deleteProductrepairRequestDetaila" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
|
|
:buttondataTable="buttondataTable" |
|
|
|
|
|
@tableFormButton="tableFormButton" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- bom列表 --> |
|
|
<!-- bom列表 --> |
|
@ -117,6 +119,18 @@ const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref(ProductrepairRequestMain.allSchemas.tableColumns) |
|
|
const tableColumns = ref(ProductrepairRequestMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
|
|
|
|
// 详情 table 操作扩展 按钮 |
|
|
|
|
|
const buttondataTable = ref([{ |
|
|
|
|
|
label: 'Bom', |
|
|
|
|
|
name: 'bom', |
|
|
|
|
|
hide: false, |
|
|
|
|
|
type: 'primary', |
|
|
|
|
|
icon: '', |
|
|
|
|
|
color: '', |
|
|
|
|
|
hasPermi: '', |
|
|
|
|
|
link: true, // 文本展现按钮 |
|
|
|
|
|
}]) |
|
|
|
|
|
|
|
|
// Bom 窗口 |
|
|
// Bom 窗口 |
|
|
const DialogTitle = ref('Bom信息') |
|
|
const DialogTitle = ref('Bom信息') |
|
|
const bomModelVisible = ref(false) |
|
|
const bomModelVisible = ref(false) |
|
@ -171,7 +185,6 @@ const buttonOperationClick = async (row, label, index)=> { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
@ -190,6 +203,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
row['uom'] = val[0]['uom'] |
|
|
row['uom'] = val[0]['uom'] |
|
|
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
row['fromLocationCode'] = val[0]['locationCode'] |
|
|
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 { |
|
|
} else { |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
|
} |
|
|
} |
|
@ -226,7 +245,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:productrepair-request-main:create'}), // 新增——需要手动修改下权限 |
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:productrepair-request-main:create'}), // 新增——需要手动修改下权限 |
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:productrepair-request-main:import'}), // 导入 |
|
|
// defaultButtons.defaultImportBtn({hasPermi:'wms:productrepair-request-main:import'}), // 导入 暂时不做主子子表结构 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:productrepair-request-main:export'}), // 导出 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:productrepair-request-main:export'}), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
@ -284,14 +303,22 @@ const butttondata = (row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
|
|
|
handleClose(row.id) |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
|
|
|
handleReAdd(row.id) |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
|
|
|
handleSubmit(row.id) |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
|
|
|
handleRefused(row.id) |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
|
|
|
handleAgree(row.id) |
|
|
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
|
|
console.log('列表-操作按钮事件-处理') |
|
|
|
|
|
handleHandle(row.id) |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} 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 formRef = ref() |
|
|
const openForm =async (type: string, row?: number) => { |
|
|
const openForm =async (type: string, row?: number) => { |
|
@ -404,7 +491,19 @@ const searchFormClick = (searchData) => { |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 查看 Bom 按钮回调事件 |
|
|
|
|
|
const tableFormButton = async (val , row) => { |
|
|
|
|
|
if (val == 'bom') { // 查看 bom |
|
|
|
|
|
bomModelVisible.value = true |
|
|
|
|
|
DialogTitle.value = '物品代码【' + row.itemCode + '】——Bom信息' |
|
|
|
|
|
detatableDataBom.params = { |
|
|
|
|
|
itemCode: row.itemCode, |
|
|
|
|
|
bomVersion: row.bomVersion, |
|
|
|
|
|
masterId: row.id |
|
|
|
|
|
} |
|
|
|
|
|
await getDetailListBom() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|