Browse Source

EAM ——> 巡检点检 前后端 PDA更新

master_hella_20240701
高竟松 8 months ago
parent
commit
b8604a9974
  1. 2
      src/api/eam/equipmentSpotCheckMain/index.ts
  2. 1
      src/utils/dict.ts
  3. 8
      src/views/eam/equipmentInspectionDetail/equipmentInspectionDetail.data.ts
  4. 23
      src/views/eam/equipmentInspectionMain/finishForm1.vue
  5. 8
      src/views/eam/equipmentSpotCheckDetail/equipmentSpotCheckDetail.data.ts
  6. 23
      src/views/eam/equipmentSpotCheckMain/finishForm1.vue
  7. 12
      src/views/eam/equipmentSpotCheckMain/index.vue

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

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

1
src/utils/dict.ts

@ -354,6 +354,7 @@ export enum DICT_TYPE {
REPAIR_DEGREE = 'repair_degree', //维修紧急程度 REPAIR_DEGREE = 'repair_degree', //维修紧急程度
REPAIR_LEVEL = 'repair_level', //维修级别 REPAIR_LEVEL = 'repair_level', //维修级别
IS_COMPLETED = 'is_completed', //是否完成 IS_COMPLETED = 'is_completed', //是否完成
IS_NORMAL = 'is_normal', //正常异常
MAINTENANCE_CYCLE = 'maintenance_cycle', // 保养周期 MAINTENANCE_CYCLE = 'maintenance_cycle', // 保养周期
INSPECTION_CYCLE = 'inspection_cycle', // 巡检周期 INSPECTION_CYCLE = 'inspection_cycle', // 巡检周期
SPOTCHECK_CYCLE = 'spotcheck_cycle', // 巡检周期 SPOTCHECK_CYCLE = 'spotcheck_cycle', // 巡检周期

8
src/views/eam/equipmentInspectionDetail/equipmentInspectionDetail.data.ts

@ -78,18 +78,18 @@ export const EquipmentInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '未完成原因', label: '异常原因',
field: 'uncompletedCause', field: 'uncompletedCause',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ {
label: '结果枚举', label: '结果',
field: 'result', field: 'result',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
dictType: DICT_TYPE.IS_COMPLETED, dictType: DICT_TYPE.IS_NORMAL,
dictClass: 'string', dictClass: 'string'
}, },
{ {
label: '巡检项名称', label: '巡检项名称',

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

@ -2,11 +2,11 @@
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false"> <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-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px">
<el-row> <el-row>
<el-col :span="12"> <!-- <el-col :span="12">-->
<el-form-item label="验证人" prop="verifyer"> <!-- <el-form-item label="验证人" prop="verifyer">-->
<el-input v-model="formData.verifyer" placeholder="请输入验证人" :disabled="isDisabled"/> <!-- <el-input v-model="formData.verifyer" placeholder="请输入验证人" :disabled="isDisabled"/>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="验证内容" prop="verifyContent"> <el-form-item label="验证内容" prop="verifyContent">
<el-input v-model="formData.verifyContent" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入验证内容" /> <el-input v-model="formData.verifyContent" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入验证内容" />
@ -41,6 +41,7 @@ import * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain
import * as EquipmentInspectionMainApi from '@/api/eam/equipmentInspectionMain' import * as EquipmentInspectionMainApi from '@/api/eam/equipmentInspectionMain'
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus"; import {ElInput} from "element-plus";
import {updateEquipmentInspection} from "@/api/eam/equipmentInspectionMain";
defineOptions({ name: 'TeamForm' }) defineOptions({ name: 'TeamForm' })
@ -62,15 +63,15 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({ const formData = ref({
id:'', id:'',
number:'', number:'',
verifyer: '', //verifyer: '',
verifyContent: '', verifyContent: '',
verifyTime: '', verifyTime: '',
}) })
const formRules = reactive({ const formRules = reactive({
verifyer: [ // verifyer: [
{ required: true, message: '验证人不能为空', trigger: 'blur' }, // { required: true, message: '', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } // { max: 50, message: '50', trigger: 'blur' }
], // ],
verifyContent: [ verifyContent: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' }, { required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
@ -102,7 +103,7 @@ const submitForm = async (val) => {
if (!valid) return if (!valid) return
// //
await EquipmentInspectionMainApi.updateEquipmentInspectionMain(formData.value) await EquipmentInspectionMainApi.updateEquipmentInspection(formData.value)
//success //success
emit('success',formData.value.id) emit('success',formData.value.id)
dialogVisible.value = false dialogVisible.value = false

8
src/views/eam/equipmentSpotCheckDetail/equipmentSpotCheckDetail.data.ts

@ -11,7 +11,7 @@ export const EquipmentSpotCheckDetailRules = reactive({
masterId: [required], masterId: [required],
name: [required], name: [required],
uncompletedCause:[{ uncompletedCause:[{
required:false , required: false,
message:'该项为必填项', message:'该项为必填项',
tagger:['blur','change'] tagger:['blur','change']
}], }],
@ -78,17 +78,17 @@ export const EquipmentSpotCheckDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '未完成原因', label: '异常原因',
field: 'uncompletedCause', field: 'uncompletedCause',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ {
label: '结果枚举', label: '结果',
field: 'result', field: 'result',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
dictType: DICT_TYPE.IS_COMPLETED, dictType: DICT_TYPE.IS_NORMAL,
dictClass: 'string' dictClass: 'string'
}, },
{ {

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

@ -2,11 +2,11 @@
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false"> <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-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px">
<el-row> <el-row>
<el-col :span="12"> <!-- <el-col :span="12">-->
<el-form-item label="验证人" prop="verifyer"> <!-- <el-form-item label="验证人" prop="verifyer">-->
<el-input v-model="formData.verifyer" placeholder="请输入验证人" :disabled="isDisabled"/> <!-- <el-input v-model="formData.verifyer" placeholder="请输入验证人" :disabled="isDisabled"/>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="验证内容" prop="verifyContent"> <el-form-item label="验证内容" prop="verifyContent">
<el-input v-model="formData.verifyContent" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入验证内容" /> <el-input v-model="formData.verifyContent" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入验证内容" />
@ -42,6 +42,7 @@ import * as EquipmentInspectionMainApi from '@/api/eam/equipmentInspectionMain'
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus"; import {ElInput} from "element-plus";
import * as EquipmentSpotCheckMainApi from "@/api/eam/equipmentSpotCheckMain"; import * as EquipmentSpotCheckMainApi from "@/api/eam/equipmentSpotCheckMain";
import {updateEquipmentSpotCheck} from "@/api/eam/equipmentSpotCheckMain";
defineOptions({ name: 'TeamForm' }) defineOptions({ name: 'TeamForm' })
@ -63,15 +64,15 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({ const formData = ref({
id:'', id:'',
number:'', number:'',
verifyer: '', // verifyer: '',
verifyContent: '', verifyContent: '',
verifyTime: '', verifyTime: '',
}) })
const formRules = reactive({ const formRules = reactive({
verifyer: [ // verifyer: [
{ required: true, message: '验证人不能为空', trigger: 'blur' }, // { required: true, message: '', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } // { max: 50, message: '50', trigger: 'blur' }
], // ],
verifyContent: [ verifyContent: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' }, { required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
@ -103,7 +104,7 @@ const submitForm = async (val) => {
if (!valid) return if (!valid) return
// //
await EquipmentSpotCheckMainApi.updateEquipmentSpotCheckMain(formData.value) await EquipmentSpotCheckMainApi.updateEquipmentSpotCheck(formData.value)
//success //success
emit('success',formData.value.id) emit('success',formData.value.id)
dialogVisible.value = false dialogVisible.value = false

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

@ -89,10 +89,6 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/views/eam/equipmentSpotCheckMain/SpotCheckOrderDetail.vue' import Detail from '@/views/eam/equipmentSpotCheckMain/SpotCheckOrderDetail.vue'
import FinishForm1 from '@/views/eam/equipmentSpotCheckMain/finishForm1.vue' import FinishForm1 from '@/views/eam/equipmentSpotCheckMain/finishForm1.vue'
import FinishForm2 from '@/views/eam/equipmentSpotCheckMain/finishForm2.vue' import FinishForm2 from '@/views/eam/equipmentSpotCheckMain/finishForm2.vue'
import {
EquipmentInspectionDetail,
EquipmentInspectionDetailRules
} from "@/views/eam/equipmentInspectionDetail/equipmentInspectionDetail.data";
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
@ -395,19 +391,19 @@ const handleValidate = async (row) => {
const detailBasicFormOnChange = (field, item) => { const detailBasicFormOnChange = (field, item) => {
// //
if(field == 'result' && item == '1'){ if(field == 'result' && item == '1'){
EquipmentSpotCheckDetail.allSchemas.formSchema.forEach((items) => { EquipmentSpotCheckDetail.allSchemas.formSchema.forEach((items) => {
if (items.field == 'uncompletedCause') { if (items.field == 'uncompletedCause') {
EquipmentInspectionDetailRules.uncompletedCause[0].required = true EquipmentSpotCheckDetailRules.uncompletedCause[0].required = true
} }
}) })
} }
// //
if(field == 'result' && item == '0'){ if(field == 'result' && item == '0'){
EquipmentSpotCheckDetail.allSchemas.formSchema.forEach((items) => { EquipmentSpotCheckDetail.allSchemas.formSchema.forEach((items) => {
if (items.field == 'uncompletedCause') { if (items.field == 'uncompletedCause') {
EquipmentInspectionDetailRules.uncompletedCause[0].required = false EquipmentSpotCheckDetailRules.uncompletedCause[0].required = false
detailRef.value.formRef.formRef.setValues({ detailRef.value.formRef.formRef.setValues({
uncompletedCause:'' uncompletedCause:''
}) })

Loading…
Cancel
Save