|
|
@ -48,6 +48,7 @@ |
|
|
|
:apiCreate="EquipmentReportRepairRequestApi.createEquipmentReportRepairRequest" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
:isBusiness="false" |
|
|
|
@onChange="onChange" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
@ -65,6 +66,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
import {Maintenance} from "@/views/eam/maintenance/maintenance.data"; |
|
|
|
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; |
|
|
|
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|
|
|
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; |
|
|
|
import * as ToolItemApi from "@/api/eam/toolAccounts"; |
|
|
|
|
|
|
|
defineOptions({ name: 'EquipmentReportRepairRequest' }) |
|
|
|
|
|
|
@ -99,9 +105,9 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:equipmentReportRepairRequest:create'}), // 新增 |
|
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:equipmentReportRepairRequest:import'}), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:equipmentReportRepairRequest:export'}), // 导出 |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentReportRepairRequest:create'}), // 新增 |
|
|
|
//defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentReportRepairRequest:import'}), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'eam:equipmentReportRepairRequest:export'}), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
@ -133,8 +139,8 @@ const buttonBaseClick = (val, item) => { |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:equipmentReportRepairRequest:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:equipmentReportRepairRequest:delete'}), // 删除 |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentReportRepairRequest:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentReportRepairRequest:delete'}), // 删除 |
|
|
|
] |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
@ -149,6 +155,17 @@ const buttonTableClick = async (val, row) => { |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const basicFormRef = ref() |
|
|
|
const openForm = (type: string, row?: any) => { |
|
|
|
if(type == "create"){ |
|
|
|
EquipmentReportRepairRequest.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(item.field == 'status'){ |
|
|
|
} |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
EquipmentReportRepairRequest.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(item.field == 'status'){ |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
@ -226,6 +243,34 @@ const importSuccess = () => { |
|
|
|
getList() |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onChange = (field, item) => { |
|
|
|
//设备 |
|
|
|
if(field == 'type' && item == 'DEVICE'){ |
|
|
|
EquipmentReportRepairRequest.allSchemas.formSchema.forEach((items) => { |
|
|
|
if (items.field == 'equipmentCode') { |
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
equipmentCode:'' |
|
|
|
}) |
|
|
|
items.componentProps.searchAllSchemas = EquipmentAccounts.allSchemas |
|
|
|
items.componentProps.searchPage = EquipmentItemApi.getEquipmentAccountsPage |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
//工装 |
|
|
|
if(field == 'type' && item == 'EQUIPMENT'){ |
|
|
|
EquipmentReportRepairRequest.allSchemas.formSchema.forEach((items) => { |
|
|
|
if (items.field == 'equipmentCode') { |
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
equipmentCode:'' |
|
|
|
}) |
|
|
|
items.componentProps.searchAllSchemas = ToolAccounts.allSchemas |
|
|
|
items.componentProps.searchPage = ToolItemApi.getToolAccountsPage |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 筛选提交 |
|
|
|
const searchFormClick = (searchData) => { |
|
|
|
tableObject.params = { |
|
|
|