Browse Source

SBBJ-977设备维护-维修工单

master
zhaoyiran 3 weeks ago
parent
commit
e5289f1fcc
  1. 14
      src/views/eam/device/devicemaintenancejob/index.vue

14
src/views/eam/device/devicemaintenancejob/index.vue

@ -50,7 +50,7 @@
ref="formRef"
:rules="DeviceMaintenanceMainRules"
:formAllSchemas="DeviceMaintenanceMain.allSchemas"
:tableAllSchemas="DeviceMaintenanceDetail.allSchemas"
:tableAllSchemas="DeviceMaintenanceDetailFilter.allSchemas"
:tableFormRules="DeviceMaintenanceDetailRules"
:tableData="tableData"
:apiUpdate="DeviceMaintenanceMainApi.updateDeviceMaintenanceMain"
@ -70,7 +70,7 @@
ref="formRefSec"
:rules="DeviceMaintenanceMainSecRules"
:formAllSchemas="DeviceMaintenanceMainSec.allSchemas"
:tableAllSchemas="DeviceMaintenanceDetail.allSchemas"
:tableAllSchemas="DeviceMaintenanceDetailFilter.allSchemas"
:tableFormRules="DeviceMaintenanceDetailRules"
:tableData="tableData"
:apiUpdate="DeviceMaintenanceMainApi.updateDeviceMaintenanceMain"
@ -91,7 +91,7 @@
ref="detailRef"
:isBasic="false"
:allSchemas="DeviceMaintenanceMain.allSchemas"
:detailAllSchemas="DeviceMaintenanceDetail.allSchemas"
:detailAllSchemas="DeviceMaintenanceDetailFilter.allSchemas"
:detailAllSchemasRules="DeviceMaintenanceDetailRules"
:apiCreate="DeviceMaintenanceDetailApi.createDeviceMaintenanceDetail"
:apiUpdate="DeviceMaintenanceDetailApi.updateDeviceMaintenanceDetail"
@ -253,6 +253,8 @@ import { watch } from 'vue';
import dayjs from 'dayjs'
import * as RepairRelationApi from '@/api/eam/basic/repairRelation'
import * as InspectionApi from '@/api/eam/basic/inspection'
import { cloneDeep } from 'lodash-es'
const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE)
const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value != 'MOLD')
defineOptions({ name: 'DeviceMaintenanceMain' })
@ -300,6 +302,7 @@ const confirmDialogLoading = ref(false)
const selectedOptions = ref([])
const options = ref([])
const isTemporaryShow = ref(false)
const DeviceMaintenanceDetailFilter = ref(cloneDeep(DeviceMaintenanceDetail))
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
@ -798,6 +801,11 @@ const openFormSec = async (type: string, row?: any) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any) => {
if(row.status == 'COMPLETED' || row.status == 'VERIFIED'){
DeviceMaintenanceDetailFilter.value.allSchemas.tableColumns = DeviceMaintenanceDetail.allSchemas.tableColumns.filter(item => item.field !== 'action');
}else{
DeviceMaintenanceDetailFilter.value.allSchemas.tableColumns = DeviceMaintenanceDetail.allSchemas.tableColumns;
}
const userListAll = await UserApi.getSimpleUserList()
const factoryList = await selectAllFactoryArea()
const deviceListAll = await DeviceAccountsApi.getDeviceAccountsAllNoPage({})

Loading…
Cancel
Save