Browse Source

检修工单问题

master
zhang_li 8 months ago
parent
commit
598f9f61cd
  1. 8
      src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts
  2. 6
      src/views/eam/device/deviceinspectionjob/index.vue
  3. 2
      src/views/eam/device/devicemaintenancejob/index.vue

8
src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts

@ -6,7 +6,7 @@ import * as DeviceMaintenanceMainApi from '@/api/eam/device/deviceMaintenanceMai
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { ItemSearchTable } from '../../basic/item/item.data' import { ItemSearchTable } from '../../basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item' import * as ItemApi from '@/api/eam/basic/item'
import { validateHanset, validateNumDot, validateNum, validateEmail } from '@/utils/validator' import { validateHanset, validateInteger, validateNum } from '@/utils/validator'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -18,7 +18,7 @@ const deviceListAll = await DeviceAccountsApi.getDeviceAccountsAllNoPage({})
const deviceListByFactory = deviceListAll.filter(item => item.factoryAreaNumber == userStore.userSelfInfo.dept.parentId) const deviceListByFactory = deviceListAll.filter(item => item.factoryAreaNumber == userStore.userSelfInfo.dept.parentId)
// const deviceListByFactoryAndStatus = deviceListByFactory.filter(item => item.status == '0') // const deviceListByFactoryAndStatus = deviceListByFactory.filter(item => item.status == '0')
const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }) const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 })
const dutyUserList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: undefined }) const dutyUserList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '' })
const repairList = await DeviceMaintenanceMainApi.getDeviceMainTempList('DEVICE') const repairList = await DeviceMaintenanceMainApi.getDeviceMainTempList('DEVICE')
// 表单校验 // 表单校验
export const DeviceInspectionMainRules = reactive({ export const DeviceInspectionMainRules = reactive({
@ -316,11 +316,11 @@ export const DeviceInspectionDetailRules = reactive({
], ],
estimatedMinutes:[ estimatedMinutes:[
required, required,
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'} { validator:validateNum, message: '请输入正整数', trigger: 'blur'},
], ],
number: [required], number: [required],
actualMinutes: [ actualMinutes: [
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'} { validator:validateNum, message: '请输入正整数', trigger: 'blur'},
], ],
maintenance: [required], maintenance: [required],
}) })

6
src/views/eam/device/deviceinspectionjob/index.vue

@ -410,7 +410,7 @@ const detailValidate = (data) => {
return tag return tag
} }
// //
const detailSubmitForm = async (formType, data, getList, formRef, tableList) => { const detailSubmitForm = async (formType, data, formRef, tableList) => {
console.log('data',data) console.log('data',data)
try { try {
let data1 = { let data1 = {
@ -452,9 +452,9 @@ const detailSubmitForm = async (formType, data, getList, formRef, tableList) =>
} }
}) })
await formRef.getList() await detailRef.value.getList()
} finally { } finally {
formRef.value.formLoading = false formRef.formLoading = false
} }
} }

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

@ -716,7 +716,7 @@ const detailSubmitForm= async (formType,data,formRef,tableList) => {
await getList() await getList()
} finally { } finally {
formRef.value.formLoading = false formRef.formLoading = false
} }
} }

Loading…
Cancel
Save