Browse Source

EAM ——> 维修工单 模具联动更新

master_hella_20240701
gaojs 5 months ago
parent
commit
5258502597
  1. 5
      src/api/eam/equipmentRepairJobMain/index.ts
  2. 5
      src/api/eam/equipmentReportRepairRequest/index.ts
  3. 129
      src/views/eam/equipmentRepairJobMain/finishForm1.vue
  4. 6
      src/views/eam/equipmentRepairJobMain/finishForm2.vue
  5. 126
      src/views/eam/equipmentRepairJobMain/finishForm3.vue
  6. 54
      src/views/eam/equipmentRepairJobMain/index.vue
  7. 23
      src/views/eam/equipmentReportRepairRequest/audiForm.vue

5
src/api/eam/equipmentRepairJobMain/index.ts

@ -69,6 +69,11 @@ export const createEquipmentRepairJobMain = async (data: EquipmentRepairJobMainV
return await request.post({ url: `/eam/equipment-repair-job-main/create`, data })
}
// 维修验证更新工单主
export const wxVerifyEquipmentRepairJobMain = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/wxVerify`, data })
}
// 修改维修工单主
export const updateEquipmentRepairJobMain = async (data: EquipmentRepairJobMainVO) => {
return await request.put({ url: `/eam/equipment-repair-job-main/update`, data })

5
src/api/eam/equipmentReportRepairRequest/index.ts

@ -77,6 +77,11 @@ export const updateEquipmentReportRepairOrder = async (data: EquipmentReportRepa
return await request.post({ url: `/eam/equipment-report-repair-request/updateOrder`, data })
}
// 审核报修工单状态
export const audiEquipmentReportRepairOrder = async (data: EquipmentReportRepairRequestVO) => {
return await request.post({ url: `/eam/equipment-report-repair-request/audiOrder`, data })
}
// 完成并创建维修工单
export const createEquipmentWeixiuOrder = async (data: EquipmentReportRepairRequestVO) => {
return await request.post({ url: `/eam/equipment-report-repair-request/updateCreateOrder`, data })

129
src/views/eam/equipmentRepairJobMain/finishForm1.vue

@ -2,29 +2,29 @@
<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="verifyerRepair">
<el-input v-model="formData.verifyerRepair" placeholder="请输入维修验证人" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="维修验证人" prop="verifyerRepair">-->
<!-- <el-input v-model="formData.verifyerRepair" placeholder="请输入维修验证人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="维修验证内容" prop="verifyContentRepair">
<el-input v-model="formData.verifyContentRepair" placeholder="请输入维修验证内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="维修验证时间" prop="verifyTimeRepair">
<el-date-picker
v-model="formData.verifyTimeRepair"
type="datetime"
value-format="x"
placeholder="选择维修验证时间">
</el-date-picker>
<el-input v-model="formData.verifyContentRepair" 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="verifyTimeRepair">-->
<!-- <el-date-picker-->
<!-- v-model="formData.verifyTimeRepair"-->
<!-- 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 +41,10 @@ import * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import * as EquipmentRepairJobMainApi from "@/api/eam/equipmentRepairJobMain";
import {updateEquipmentRepairJobMain} from "@/api/eam/equipmentRepairJobMain";
import {
updateEquipmentRepairJobMain,
wxVerifyEquipmentRepairJobMain
} from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'TeamForm' })
@ -64,93 +67,25 @@ const formData = ref({
id:'',
number:'',
sources:'',
verifyerRepair: '',
//verifyerRepair: '',
verifyContentRepair: '',
verifyTimeRepair: '',
//verifyTimeRepair: '',
})
const formRules = reactive({
verifyerRepair: [
{ required: true, message: '验证人不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
// verifyerRepair: [
// { required: true, message: '', trigger: 'blur' },
// { max: 50, message: '50', trigger: 'blur' }
// ],
verifyContentRepair: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyTimeRepair: [
{ required: true, message: '验证时间不能为空', trigger: 'blur' },
],
// verifyTimeRepair: [
// { 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
@ -172,7 +107,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentRepairJobMainApi.updateEquipmentRepairJobMain(formData.value)
await EquipmentRepairJobMainApi.wxVerifyEquipmentRepairJobMain(formData.value)
//success
emit('success',formData.value.id,formData.value.sources)
dialogVisible.value = false

6
src/views/eam/equipmentRepairJobMain/finishForm2.vue

@ -76,7 +76,6 @@
import * as EquipmentRepairJobMainApi from '@/api/eam/equipmentRepairJobMain'
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import {updateEquipmentRepairMain} from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'TeamForm' })
@ -104,7 +103,7 @@ const formData = ref({
endTime:'',
maintenancePhone:'',
completeResult:'',
status:'5'
status:'6'
})
const formRules = reactive({
maintenanceDesc: [
@ -137,6 +136,7 @@ const open = async (type: string, row?: object) => {
//
formData.value.id = row.id
formData.value.number = row.number
formData.value.status = '5'
}
defineExpose({ open }) // open
@ -150,7 +150,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentRepairJobMainApi.updateEquipmentRepairMain(formData.value);
await EquipmentRepairJobMainApi.executeEquipmentRepairJobMain(formData.value);
//success
emit('success',formData.value.id)

126
src/views/eam/equipmentRepairJobMain/finishForm3.vue

@ -2,29 +2,29 @@
<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="verifyerReport">
<el-input v-model="formData.verifyerReport" placeholder="请输入报修验证人" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="报修验证人" prop="verifyerReport">-->
<!-- <el-input v-model="formData.verifyerReport" placeholder="请输入报修验证人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="报修验证内容" prop="verifyContentReport">
<el-input v-model="formData.verifyContentReport" placeholder="请输入报修验证内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="报修验证时间" prop="verifyTimeReport">
<el-date-picker
v-model="formData.verifyTimeReport"
type="datetime"
value-format="x"
placeholder="选择报修验证时间">
</el-date-picker>
<el-input v-model="formData.verifyContentReport" 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="verifyTimeReport">-->
<!-- <el-date-picker-->
<!-- v-model="formData.verifyTimeReport"-->
<!-- 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>
@ -40,6 +40,7 @@
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import * as EquipmentRepairJobMainApi from "@/api/eam/equipmentRepairJobMain";
import {bxVerifyEquipmentRepairJobMain} from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'TeamForm' })
@ -61,93 +62,25 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
verifyerReport: '',
//verifyerReport: '',
verifyContentReport: '',
verifyTimeReport: '',
//verifyTimeReport: '',
})
const formRules = reactive({
verifyerReport: [
{ required: true, message: '验证人不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
// verifyerReport: [
// { required: true, message: '', trigger: 'blur' },
// { max: 50, message: '50', trigger: 'blur' }
// ],
verifyContentReport: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyTimeReport: [
{ required: true, message: '验证时间不能为空', trigger: 'blur' },
],
// verifyTimeReport: [
// { 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
@ -156,6 +89,7 @@ const open = async (type: string, row?: object) => {
//
formData.value.id = row.id
formData.value.number = row.number
formData.value.status = '8'
}
defineExpose({ open }) // open
@ -168,7 +102,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentRepairJobMainApi.updateEquipmentRepairJobMain(formData.value)
await EquipmentRepairJobMainApi.createEquipmentRepairNewOrder(formData.value)
//success
emit('success',formData.value.id)
dialogVisible.value = false

54
src/views/eam/equipmentRepairJobMain/index.vue

@ -184,7 +184,7 @@ const isShowBaoXiuButton = (row) => {
// -
const butttondata = (row) => {
return[
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListTransferBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
@ -319,15 +319,8 @@ const finishForm3Ref = ref()
const handleValidateReport = async (row) => {
await message.delConfirm('是否验证所选中工单?');
message.confirmPassword(t('')).then(async () => {
const params = ref({id: '', status:''})
params.value.id = row.id
params.value.status = '8'
//
await EquipmentRepairJobMainApi.createEquipmentRepairNewOrder(params.value)
message.success(t('工单已结束'))
//
await getList()
finishForm3Ref.value.open('update', row);
}).catch (async (action: Action) => {
if(action === 'cancel'){
const params = ref({id: '', number:''})
@ -460,18 +453,18 @@ const getClosed1=(val)=> {
const getData1=(val1,val2)=> {
nextTick?.(async () => {
try {
const params = ref({
id: '',
status:'',
})
params.value.id = val1
if(val2 == '1'){
params.value.status = '8'
}
if(val2 == '0'){
params.value.status = '7'
}
await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
// const params = ref({
// id: '',
// status:'',
// })
// params.value.id = val1
// if(val2 == '1'){
// params.value.status = '8'
// }
// if(val2 == '0'){
// params.value.status = '7'
// }
// await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
@ -520,20 +513,17 @@ const getClosed3=(val)=> {
//finishForm3
const getData3=(val)=> {
nextTick?.(async () => {
console.log(val)
try {
const params = ref({
id: '',
status:'',
})
params.value.id = val
params.value.status = '7'
await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
//console.log(val)
// const params = ref({
// id: '',
// status:'',
// })
// params.value.id = val
// params.value.status = '7'
// await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
} catch {}
}
)
}

23
src/views/eam/equipmentReportRepairRequest/audiForm.vue

@ -2,11 +2,11 @@
<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="approver">
<el-input v-model="formData.approver" placeholder="请输入审核人" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="审核人" prop="approver">-->
<!-- <el-input v-model="formData.approver" placeholder="请输入审核人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="审核内容" prop="approveContent">
<el-input v-model="formData.approveContent" placeholder="请输入审核内容" />
@ -40,6 +40,7 @@
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import * as EquipmentReportRepairRequestApi from "@/api/eam/equipmentReportRepairRequest";
import {audiEquipmentReportRepairOrder} from "@/api/eam/equipmentReportRepairRequest";
defineOptions({ name: 'TeamForm' })
@ -61,15 +62,15 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
approver: '',
//approver: '',
approveContent: '',
approveTime: '',
})
const formRules = reactive({
approver: [
{ required: true, message: '审核人不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
// approver: [
// { required: true, message: '', trigger: 'blur' },
// { max: 50, message: '50', trigger: 'blur' }
// ],
approveContent: [
{ required: true, message: '审核内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
@ -102,7 +103,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentReportRepairRequestApi.updateEquipmentReportRepairRequest(formData.value)
await EquipmentReportRepairRequestApi.audiEquipmentReportRepairOrder(formData.value)
dialogVisible.value = false
}

Loading…
Cancel
Save