Browse Source

EAM ——> 巡检 点检 保养 维修 更新

hella_online_20240829
gaojs 4 months ago
parent
commit
2eeefcc18a
  1. 6
      src/api/eam/equipmentInspectionMain/index.ts
  2. 6
      src/api/eam/equipmentMaintenanceMain/index.ts
  3. 6
      src/api/eam/equipmentSpotCheckMain/index.ts
  4. 6
      src/views/eam/equipmentInspectionMain/equipmentInspectionMain.data.ts
  5. 27
      src/views/eam/equipmentInspectionMain/finishForm1.vue
  6. 18
      src/views/eam/equipmentInspectionMain/finishForm2.vue
  7. 30
      src/views/eam/equipmentInspectionMain/index.vue
  8. 5
      src/views/eam/equipmentInspectionRecordMain/equipmentInspectionRecordMain.data.ts
  9. 103
      src/views/eam/equipmentMaintenanceMain/finishForm1.vue
  10. 18
      src/views/eam/equipmentMaintenanceMain/finishForm2.vue
  11. 30
      src/views/eam/equipmentMaintenanceMain/index.vue
  12. 5
      src/views/eam/equipmentSpotCheckMain/equipmentSpotCheckMain.data.ts
  13. 34
      src/views/eam/equipmentSpotCheckMain/finishForm1.vue
  14. 18
      src/views/eam/equipmentSpotCheckMain/finishForm2.vue
  15. 11
      src/views/eam/equipmentSpotCheckMain/index.vue
  16. 5
      src/views/eam/equipmentSpotCheckRecordMain/equipmentSpotCheckRecordMain.data.ts

6
src/api/eam/equipmentInspectionMain/index.ts

@ -68,9 +68,9 @@ export const updateEquipmentInspectionMain = async (data: EquipmentInspectionMai
return await request.put({ url: `/eam/equipment-inspection-main/update`, data })
}
// 修改巡检工单主
export const updateEquipmentInspection = async (data: EquipmentInspectionMainVO) => {
return await request.post({ url: `/eam/equipment-inspection-main/updateOrders`, data })
// 验证巡检工单主
export const verifyEquipmentInspectionMain = async (data: EquipmentInspectionMainVO) => {
return await request.post({ url: `/eam/equipment-inspection-main/verifyOrder`, data })
}
// 删除巡检工单主

6
src/api/eam/equipmentMaintenanceMain/index.ts

@ -70,9 +70,9 @@ export const updateEquipmentMaintenanceMain = async (data: EquipmentMaintenanceM
return await request.put({ url: `/eam/equipment-maintenance-main/update`, data })
}
// 修改设备保养工单主
export const updateEquipmentMaintenance = async (data: EquipmentMaintenanceMainVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/updateOrders`, data })
// 验证设备保养工单主
export const verifyEquipmentMaintenanceMain = async (data: EquipmentMaintenanceMainVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/verifyOrder`, data })
}
// 删除设备保养工单主

6
src/api/eam/equipmentSpotCheckMain/index.ts

@ -66,9 +66,9 @@ export const updateEquipmentSpotCheckMain = async (data: EquipmentSpotCheckMainV
return await request.put({ url: `/eam/equipment-spot-check-main/update`, data })
}
// 完成点检工单主
export const updateEquipmentSpotCheck = async (data: EquipmentSpotCheckMainVO) => {
return await request.post({ url: `/eam/equipment-spot-check-main/updateOrders`, data })
// 验证点检工单主
export const verifyEquipmentSpotCheckMain = async (data: EquipmentSpotCheckMainVO) => {
return await request.post({ url: `/eam/equipment-spot-check-main/verifyOrder`, data })
}
// 删除点检工单主

6
src/views/eam/equipmentInspectionMain/equipmentInspectionMain.data.ts

@ -94,8 +94,10 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否拍照',
field: 'isPictures',
sort: 'custom',
isSearch: true,
isForm: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
dictType: DICT_TYPE.FALSE_OR_TRUE,
dictClass: 'string',
form: {

27
src/views/eam/equipmentInspectionMain/finishForm1.vue

@ -13,18 +13,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="验证时间" prop="verifyTime">
<el-date-picker
v-model="formData.verifyTime"
type="datetime"
value-format="x"
placeholder="选择验证时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm('success')"> </el-button>
@ -41,7 +29,10 @@ import * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain
import * as EquipmentInspectionMainApi from '@/api/eam/equipmentInspectionMain'
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import {updateEquipmentInspection} from "@/api/eam/equipmentInspectionMain";
import {
updateEquipmentInspection,
verifyEquipmentInspectionMain
} from "@/api/eam/equipmentInspectionMain";
defineOptions({ name: 'TeamForm' })
@ -63,9 +54,8 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
//verifyer: '',
verifyContent: '',
verifyTime: '',
status:''
})
const formRules = reactive({
// verifyer: [
@ -76,9 +66,6 @@ const formRules = reactive({
{ required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyTime: [
{ required: true, message: '验证时间不能为空', trigger: 'blur' },
],
})
const basicFormRef = ref() // Ref
@ -102,8 +89,10 @@ const submitForm = async (val) => {
const valid = await basicFormRef.value.validate()
if (!valid) return
formData.value.status = '7'
//
await EquipmentInspectionMainApi.updateEquipmentInspection(formData.value)
await EquipmentInspectionMainApi.verifyEquipmentInspectionMain(formData.value)
//success
emit('success',formData.value.id)
dialogVisible.value = false

18
src/views/eam/equipmentInspectionMain/finishForm2.vue

@ -7,11 +7,11 @@
<!-- <el-input v-model="formData.maintenancer" placeholder="请输入巡检人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="巡检人电话" prop="maintenancePhone">
<el-input v-model="formData.maintenancePhone" placeholder="请输入巡检人电话" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="巡检人电话" prop="maintenancePhone">-->
<!-- <el-input v-model="formData.maintenancePhone" placeholder="请输入巡检人电话" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="12">
@ -72,14 +72,16 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
maintenancePhone: '',
startTime:'',
endTime:'',
status:'5',
})
const formRules = reactive({
maintenancePhone: [
{ required: true, message: '巡检人电话不能为空', trigger: 'blur' },
startTime: [
{ required: true, message: '巡检开始时间不能为空', trigger: 'blur' },
],
endTime: [
{ required: true, message: '巡检结束时间不能为空', trigger: 'blur' },
],
})
const basicFormRef = ref() // Ref

30
src/views/eam/equipmentInspectionMain/index.vue

@ -190,7 +190,7 @@ const isShowEditStatusButton = (row) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentInspectionMain:update'}), //
//defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentInspectionMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentInspectionMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentInspectionMain:update'}), //
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentInspectionMain:update'}), //
@ -480,20 +480,8 @@ const getClosed1=(val)=> {
const getData1=(val)=> {
nextTick?.(async () => {
console.log(val)
try {
const params = ref({
id: '',
status:'',
})
params.value.id = val
params.value.status = '7'
await EquipmentInspectionMainApi.updateEquipmentInspectionOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
} catch {}
//
await getList()
}
)
}
@ -501,7 +489,6 @@ const getData1=(val)=> {
//finishForm2
const getClosed2=(val)=> {
nextTick?.(() => {
console.log(val)
getList()
})
}
@ -509,17 +496,6 @@ const getClosed2=(val)=> {
//finishForm2
const getData2=(val)=> {
nextTick?.(async () => {
console.log(val)
// const params = ref({
// id: '',
// status: '',
// })
// params.value.id = val
// params.value.status = '5'
// //
// await EquipmentInspectionMainApi.executeEquipmentInspectionOrder(params.value)
//message.success(t(''))
//
await getList()
})
}

5
src/views/eam/equipmentInspectionRecordMain/equipmentInspectionRecordMain.data.ts

@ -50,7 +50,10 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Radio'
}

103
src/views/eam/equipmentMaintenanceMain/finishForm1.vue

@ -2,26 +2,9 @@
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false">
<el-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="验证人" prop="verifyer">
<el-input v-model="formData.verifyer" placeholder="请输入验证人" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="验证内容" prop="verifyContent">
<el-input v-model="formData.verifyContent" placeholder="请输入验证内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="验证时间" prop="verifyTime">
<el-date-picker
v-model="formData.verifyTime"
type="datetime"
value-format="x"
placeholder="选择验证时间">
</el-date-picker>
<el-input v-model="formData.verifyContent" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入验证内容" />
</el-form-item>
</el-col>
</el-row>
@ -40,6 +23,7 @@
import * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain'
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import {verifyEquipmentMaintenanceMain} from "@/api/eam/equipmentMaintenanceMain";
defineOptions({ name: 'TeamForm' })
@ -61,93 +45,18 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
verifyer: '',
verifyContent: '',
verifyTime: '',
status:''
})
const formRules = reactive({
verifyer: [
{ required: true, message: '验证人不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyContent: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyTime: [
{ required: true, message: '验证时间不能为空', trigger: 'blur' },
],
})
const basicFormRef = ref() // Ref
// /** */
// const searchTableRef = ref();
// const _searchTableTitle = ref();
// const _searchTableAllSchemas = ref();
// const _searchTablePage = ref();
// const _formField = ref();
// const _searchField = ref();
// const _multiple = ref();
// const _type = ref();
// const _row = ref();
// const _searchCondition = ref({})
//
//
// const addItem = () =>{
// addItemCommon(true,'xunJianItem')
// }
//
// /** */
// const addItemCommon = (multiple,field) => {
// _searchCondition.value = {}
// const filters: any[] = []
// filters.push({
// action: "==",
// column: 'available',
// value: 'TRUE'
// })
// //
// _searchCondition.value.isSearch = true
// _searchCondition.value.filters = filters
// _searchTableTitle.value = ''
// _multiple.value = multiple
// _formField.value = field
// _searchField.value = field
// _searchTablePage.value = inspectionItemApi.getInspectionItemPage
// _searchTableAllSchemas.value = InspectionItem.allSchemas
// openCommon()
// }
//
// /** */
// const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
// nextTick?.(() => {
// if (formField === 'xunJianItem') {
// val.forEach(item => {
// const isExist = tags.value.some(tag => tag.content === item.content);
// if (!isExist){
// const newItem = {};
// newItem['content'] = item.content;
// newItem['id'] = item.id;
// tags.value.push(newItem);
// }
// });
// }
// })
// }
// /**/
// const openCommon = () => {
// searchTableRef.value.open(
// _searchTableTitle.value,
// _searchTableAllSchemas.value,
// _searchTablePage.value,
// _formField.value,
// _searchField.value,
// _multiple.value,
// _type.value,
// _row.value,
// _searchCondition.value
// )
// }
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
@ -167,8 +76,10 @@ const submitForm = async (val) => {
const valid = await basicFormRef.value.validate()
if (!valid) return
formData.value.status = '7'
//
await EquipmentMaintenanceMainApi.updateEquipmentMaintenanceMain(formData.value)
await EquipmentMaintenanceMainApi.verifyEquipmentMaintenanceMain(formData.value)
//success
emit('success',formData.value.id)
dialogVisible.value = false

18
src/views/eam/equipmentMaintenanceMain/finishForm2.vue

@ -7,11 +7,11 @@
<!-- <el-input v-model="formData.maintenancer" placeholder="请输入保养人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="保养人电话" prop="maintenancePhone">
<el-input v-model="formData.maintenancePhone" placeholder="请输入保养人电话" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="保养人电话" prop="maintenancePhone">-->
<!-- <el-input v-model="formData.maintenancePhone" placeholder="请输入保养人电话" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="12">
@ -71,14 +71,16 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
maintenancePhone: '',
startTime:'',
endTime:'',
status:'5',
})
const formRules = reactive({
maintenancePhone: [
{ required: true, message: '保养人电话不能为空', trigger: 'blur' },
startTime: [
{ required: true, message: '保养开始时间不能为空', trigger: 'blur' },
],
endTime: [
{ required: true, message: '保养结束时间不能为空', trigger: 'blur' },
],
})
const basicFormRef = ref() // Ref

30
src/views/eam/equipmentMaintenanceMain/index.vue

@ -539,7 +539,6 @@ const searchFormClick = (searchData) => {
//finishForm1
const getClosed1=(val)=> {
nextTick?.(() => {
console.log(val)
getList()
})
}
@ -547,23 +546,8 @@ const getClosed1=(val)=> {
//finishForm1
const getData1=(val)=> {
nextTick?.(async () => {
console.log(val)
try {
const params = ref({
id: '',
status:'',
})
params.value.id = val
params.value.status = '7'
await EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
} catch {}
}
)
await getList()
})
}
//finishForm2
@ -577,16 +561,6 @@ const getClosed2=(val)=> {
//finishForm2
const getData2=(val)=> {
nextTick?.(async () => {
console.log(val)
// const params = ref({
// id: '',
// status: '',
// })
// params.value.id = val
// params.value.status = '5'
// //
// await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value)
//message.success(t(''))
//
await getList()
})

5
src/views/eam/equipmentSpotCheckMain/equipmentSpotCheckMain.data.ts

@ -312,7 +312,10 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否拍照',
field: 'isPictures',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
dictType: DICT_TYPE.FALSE_OR_TRUE,
dictClass: 'string',
},

34
src/views/eam/equipmentSpotCheckMain/finishForm1.vue

@ -2,29 +2,12 @@
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false">
<el-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px">
<el-row>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="验证人" prop="verifyer">-->
<!-- <el-input v-model="formData.verifyer" placeholder="请输入验证人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="验证内容" prop="verifyContent">
<el-input v-model="formData.verifyContent" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入验证内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="验证时间" prop="verifyTime">
<el-date-picker
v-model="formData.verifyTime"
type="datetime"
value-format="x"
placeholder="选择验证时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm('success')"> </el-button>
@ -37,12 +20,9 @@
</template>
<script lang="ts" setup>
import * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain'
import * as EquipmentInspectionMainApi from '@/api/eam/equipmentInspectionMain'
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import * as EquipmentSpotCheckMainApi from "@/api/eam/equipmentSpotCheckMain";
import {updateEquipmentSpotCheck} from "@/api/eam/equipmentSpotCheckMain";
defineOptions({ name: 'TeamForm' })
@ -64,23 +44,15 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
// verifyer: '',
verifyContent: '',
verifyTime: '',
status : '',
isRepair:"",
})
const formRules = reactive({
// verifyer: [
// { required: true, message: '', trigger: 'blur' },
// { max: 50, message: '50', trigger: 'blur' }
// ],
verifyContent: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyTime: [
{ required: true, message: '验证时间不能为空', trigger: 'blur' },
],
})
const basicFormRef = ref() // Ref
@ -105,8 +77,10 @@ const submitForm = async (val) => {
const valid = await basicFormRef.value.validate()
if (!valid) return
formData.value.status = '7'
//
await EquipmentSpotCheckMainApi.updateEquipmentSpotCheck(formData.value)
await EquipmentSpotCheckMainApi.verifyEquipmentSpotCheckMain(formData.value)
//success
emit('success',formData.value.id)
dialogVisible.value = false

18
src/views/eam/equipmentSpotCheckMain/finishForm2.vue

@ -7,11 +7,11 @@
<!-- <el-input v-model="formData.maintenancer" placeholder="请输入巡检人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="巡检人电话" prop="maintenancePhone">
<el-input v-model="formData.maintenancePhone" placeholder="请输入巡检人电话" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="巡检人电话" prop="maintenancePhone">-->
<!-- <el-input v-model="formData.maintenancePhone" placeholder="请输入巡检人电话" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="12">
@ -73,14 +73,16 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
maintenancePhone: '',
startTime:'',
endTime:'',
status:'5',
})
const formRules = reactive({
maintenancePhone: [
{ required: true, message: '巡检人电话不能为空', trigger: 'blur' },
startTime: [
{ required: true, message: '点检开始时间不能为空', trigger: 'blur' },
],
endTime: [
{ required: true, message: '点检结束时间不能为空', trigger: 'blur' },
],
})
const basicFormRef = ref() // Ref

11
src/views/eam/equipmentSpotCheckMain/index.vue

@ -188,7 +188,7 @@ const isShowEditStatusButton = (row) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
//defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
@ -507,15 +507,6 @@ const getClosed2=(val)=> {
const getData2=(val)=> {
nextTick?.(async () => {
console.log(val)
// const params = ref({
// id: '',
// status: '',
// })
// params.value.id = val
// params.value.status = '5'
//
//await EquipmentSpotCheckMainApi.executeEquipmentSpotCheckOrder(params.value)
//message.success(t(''))
//
await getList()
})

5
src/views/eam/equipmentSpotCheckRecordMain/equipmentSpotCheckRecordMain.data.ts

@ -250,7 +250,10 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Radio'
}

Loading…
Cancel
Save