|
|
@ -64,6 +64,26 @@ |
|
|
|
@success="submitForm" |
|
|
|
:isSearchTableItem="true" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="formRefSec" |
|
|
|
:rules="DeviceMaintenanceMainSecRules" |
|
|
|
:formAllSchemas="DeviceMaintenanceMainSec.allSchemas" |
|
|
|
:tableAllSchemas="DeviceMaintenanceDetail.allSchemas" |
|
|
|
:tableFormRules="DeviceMaintenanceDetailRules" |
|
|
|
:tableData="tableData" |
|
|
|
:apiUpdate="DeviceMaintenanceMainApi.updateDeviceMaintenanceMain" |
|
|
|
:apiCreate="DeviceMaintenanceMainApi.createDeviceMaintenanceMain" |
|
|
|
:isBusiness="false" |
|
|
|
@onChange="onChange" |
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
@success="submitForm" |
|
|
|
:isSearchTableItem="true" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<!-- <Detail ref="detailRef" :isBasic="true" :allSchemas="DeviceMaintenanceMain.allSchemas" /> --> |
|
|
@ -113,7 +133,9 @@ import { |
|
|
|
DeviceMaintenanceMain, |
|
|
|
DeviceMaintenanceMainRules, |
|
|
|
DeviceMaintenanceDetail, |
|
|
|
DeviceMaintenanceDetailRules |
|
|
|
DeviceMaintenanceDetailRules, |
|
|
|
DeviceMaintenanceMainSec, |
|
|
|
DeviceMaintenanceMainSecRules, |
|
|
|
} from './deviceMaintenanceMain.data' |
|
|
|
import * as DeviceMaintenanceMainApi from '@/api/eam/device/deviceMaintenanceMain' |
|
|
|
import * as DeviceMaintenanceDetailApi from '@/api/eam/device/deviceMaintenanceDetail' |
|
|
@ -130,6 +152,7 @@ const userStore = useUserStore() // 用户信息 |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
const formRef = ref() |
|
|
|
const formRefSec = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(DeviceMaintenanceMain.allSchemas.tableColumns) |
|
|
|
const tableData = ref([]) |
|
|
@ -295,14 +318,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'repair') { |
|
|
|
openDetail(row, '代码', row.number) |
|
|
|
} else if (val == 'turnOrder') { |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'turnType' |
|
|
|
}).show = true |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'type' |
|
|
|
}).componentProps.options = deviceMoldTypeList |
|
|
|
openForm('turnOrder', row) |
|
|
|
} else if (val == 'finish') { |
|
|
|
openFormSec('turnOrder', row) |
|
|
|
} else if (val == 'finishOrder') { |
|
|
|
finishOrder(row) |
|
|
|
} else if (val == 'verifyOrder') { |
|
|
|
verifyOrder(row) |
|
|
@ -317,8 +334,13 @@ const buttonTableClick = async (val, row) => { |
|
|
|
|
|
|
|
const openForm = (type: string, row?: any) => { |
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
debugger |
|
|
|
formRef.value.open(type, row) |
|
|
|
} |
|
|
|
const openFormSec = (type: string, row?: any) => { |
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
formRefSec.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|