Browse Source

EAM ——> 巡检 点检 保养方案 更新

hella_online_20240829
gaojs 5 months ago
parent
commit
d5cd87ad2a
  1. 47
      src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts
  2. 6
      src/views/eam/equipmentMaintenanceMain/index.vue
  3. 8
      src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts
  4. 30
      src/views/eam/equipmentMaintenanceRecordMain/index.vue
  5. 25
      src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts
  6. 16
      src/views/eam/equipmentRepairJobMain/finishForm2.vue
  7. 10
      src/views/eam/equipmentRepairJobMain/index.vue
  8. 8
      src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts
  9. 29
      src/views/eam/equipmentRepairRecordMain/index.vue
  10. 72
      src/views/eam/equipmentReportRepairRequest/audiForm.vue
  11. 12
      src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts
  12. 38
      src/views/eam/equipmentReportRepairRequest/index.vue
  13. 5
      src/views/eam/inspectionItem/inspectionItem.data.ts
  14. 10
      src/views/eam/maintainExperience/index.vue
  15. 8
      src/views/eam/maintainExperience/maintainExperience.data.ts
  16. 8
      src/views/eam/planInspection/planInspection.data.ts
  17. 10
      src/views/eam/repairExperience/index.vue
  18. 12
      src/views/eam/repairExperience/repairExperience.data.ts
  19. 5
      src/views/eam/spotCheckItem/spotCheckItem.data.ts

47
src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts

@ -99,7 +99,10 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '故障类型', label: '故障类型',
field: 'faultType', field: 'faultType',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: { form: {
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
@ -151,6 +154,9 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -173,6 +179,9 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -195,7 +204,9 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false, isTable: false,
isForm: false,
isDetail:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -218,7 +229,9 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false, isTable: false,
isForm: false,
isDetail:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -369,6 +382,9 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'directCreateRecord', field: 'directCreateRecord',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '所属厂区编号', label: '所属厂区编号',
@ -382,6 +398,9 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'workshopCode', field: 'workshopCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
required: true, required: true,
form: { form: {
componentProps: { componentProps: {
@ -597,26 +616,38 @@ export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>(
label: '人数', label: '人数',
field: 'peoples', field: 'peoples',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isForm: true, isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '预计分钟', label: '预计分钟',
field: 'estimatedMinutes', field: 'estimatedMinutes',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '实际分钟', label: '实际分钟',
field: 'actualMinutes', field: 'actualMinutes',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '责任人多选', label: '责任人多选',
field: 'chargePeoples', field: 'chargePeoples',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '完成时间', label: '完成时间',

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

@ -198,14 +198,14 @@ const isShowEditStatusButton = (row) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // //defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentMaintenanceMain:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:equipmentMaintenanceMain:update'}),
] ]
} }

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

@ -273,6 +273,14 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
dictType: DICT_TYPE.EAM_ORDER_STATUS, dictType: DICT_TYPE.EAM_ORDER_STATUS,
dictClass: 'string', dictClass: 'string',
}, },
{
label: '保养经验',
field: 'isExperience',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
},
// { // {
// label: '自动接单', // label: '自动接单',
// field: 'autoOrder', // field: 'autoOrder',

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

@ -32,8 +32,8 @@
<span>{{ row.recordNo }}</span> <span>{{ row.recordNo }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row,$index }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -88,6 +88,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import {maintainExperienceBtn} from "@/utils/disposition/defaultButtons";
defineOptions({ name: 'EquipmentMaintenanceRecordMain' }) defineOptions({ name: 'EquipmentMaintenanceRecordMain' })
@ -154,21 +155,16 @@ const buttonBaseClick = (val, item) => {
} }
} }
const butttondata = (row,$index) => { const butttondata = (row) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 return [
if(findIndex>-1&&findIndex<$index){ defaultButtons.maintainExperienceBtn({ hide:isShowMainButton(row),hasPermi: 'eam:equipmentMaintenanceRecordMain:maintainExperience' }) //
return [] ]
}
return [
defaultButtons.repairExperienceBtn({ hide:isShowMainButton(row,['0']),hasPermi: 'eam:equipmentMaintenanceRecordMain:maintainExperience' }) //
]
} }
// //
const isShowMainButton = (row,val) => { const isShowMainButton = (row) => {
console.log(row.isExperience) if (row.isExperience === 'FALSE') {
if (val.indexOf(row.isExperience) > -1) {
return false return false
} else { } else{
return true return true
} }
} }
@ -189,7 +185,7 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
// //
const maintainExperienceFormRef = ref() const maintainExperienceFormRef = ref()
const openMaintainExperience = (type: string, row?: any) => { const openMaintainExperience = (type: string, row?: any) => {
maintainExperienceFormRef.value.open(type, row) maintainExperienceFormRef.value.open(type, row)
@ -225,7 +221,6 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
} }
// //
const maintainExperienceFormsSuccess = async (formType, data) => { const maintainExperienceFormsSuccess = async (formType, data) => {
console.log(data)
const data1 = { const data1 = {
maintainRecordNumber: data.recordNo, maintainRecordNumber: data.recordNo,
name: data.name, name: data.name,
@ -233,7 +228,6 @@ const maintainExperienceFormsSuccess = async (formType, data) => {
masterId: data.id, masterId: data.id,
orderType: 'MAINTAIN', orderType: 'MAINTAIN',
} }
console.log(data1)
try { try {
await MaintainExperienceApi.createMaintainExperience(data1) await MaintainExperienceApi.createMaintainExperience(data1)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

25
src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts

@ -90,7 +90,10 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.EAM_MAINTENANCE_LEVEL, dictType: DICT_TYPE.EAM_MAINTENANCE_LEVEL,
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '设备编号', label: '设备编号',
@ -123,7 +126,10 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: { form: {
component: 'Radio' component: 'Radio'
} }
@ -407,6 +413,12 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{
label: '故障描述',
field: 'faultDesc',
sort: 'custom',
isSearch: false
},
{ {
label: '流程状态', label: '流程状态',
field: 'status', field: 'status',
@ -438,12 +450,18 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'directCreateRecord', field: 'directCreateRecord',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '班组类型', label: '班组类型',
field: 'classType', field: 'classType',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
// { // {
// label: '所属厂区编号', // label: '所属厂区编号',
@ -456,6 +474,9 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'workshopCode', field: 'workshopCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
required: true, required: true,
form: { form: {
componentProps: { componentProps: {

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

@ -45,11 +45,11 @@
<!-- <el-input v-model="formData.maintenancer" placeholder="请输入执行人"/>--> <!-- <el-input v-model="formData.maintenancer" placeholder="请输入执行人"/>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="12"> <!-- <el-col :span="12">-->
<el-form-item label="维修人电话" prop="maintenancePhone"> <!-- <el-form-item label="维修人电话" prop="maintenancePhone">-->
<el-input v-model="formData.maintenancePhone" placeholder="请输入维修人电话" /> <!-- <el-input v-model="formData.maintenancePhone" placeholder="请输入维修人电话" />-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -101,9 +101,8 @@ const formData = ref({
level: '', level: '',
startTime:'', startTime:'',
endTime:'', endTime:'',
maintenancePhone:'',
completeResult:'', completeResult:'',
status:'6' status:'5'
}) })
const formRules = reactive({ const formRules = reactive({
maintenanceDesc: [ maintenanceDesc: [
@ -118,9 +117,6 @@ const formRules = reactive({
endTime: [ endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }, { required: true, message: '结束时间不能为空', trigger: 'blur' },
], ],
maintenancePhone: [
{ required: true, message: '维修人电话不能为空', trigger: 'blur' },
],
completeResult: [ completeResult: [
{ required: true, message: '结果不能为空', trigger: 'blur' }, { required: true, message: '结果不能为空', trigger: 'blur' },
], ],

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

@ -184,7 +184,7 @@ const isShowBaoXiuButton = (row) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return[ return[
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),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.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), // defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListTransferBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), // defaultButtons.mainListTransferBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
@ -486,14 +486,6 @@ const getClosed2=(val)=> {
//finishForm2 //finishForm2
const getData2=(val)=> { const getData2=(val)=> {
nextTick?.(async () => { nextTick?.(async () => {
// const params = ref({
// id: '',
// status: '',
// })
// params.value.id = val
// params.value.status = '5'
// //
// await EquipmentRepairJobMainApi.executeEquipmentRepairJobMain(params.value)
message.success(t('工单已完成')) message.success(t('工单已完成'))
// //
await getList() await getList()

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

@ -316,6 +316,14 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: true,
}, },
{
label: '维修经验',
field: 'isExperience',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
},
{ {
label: '自动接单', label: '自动接单',
field: 'autoOrder', field: 'autoOrder',

29
src/views/eam/equipmentRepairRecordMain/index.vue

@ -36,8 +36,8 @@
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row,$index }"> <template #action="{row}">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event, row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event, row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -103,6 +103,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import {repairExperienceBtn} from "@/utils/disposition/defaultButtons";
defineOptions({ name: 'EquipmentRepairRecordMain' }) defineOptions({ name: 'EquipmentRepairRecordMain' })
@ -176,23 +177,17 @@ const buttonBaseClick = (val, item) => {
} }
// - // -
const butttondata = (row) => {
const butttondata = (row,$index) => { return [
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 defaultButtons.repairExperienceBtn({ hide:isShowMainButton(row),hasPermi: 'eam:equipmentMaintenanceRecordMain:maintainExperience' }) //
if(findIndex>-1&&findIndex<$index){ ]
return []
}
return [
defaultButtons.repairExperienceBtn({ hide:isShowMainButton(row,['0']),hasPermi: 'eam:equipmentRepairRecordMain:repairExperience' }) //
]
} }
// //
const isShowMainButton = (row,val) => { const isShowMainButton = (row) => {
console.log(row.isExperience) if (row.isExperience === 'FALSE') {
if (val.indexOf(row.isExperience) > -1) {
return false return false
} else { } else{
return true return true
} }
} }
@ -252,7 +247,6 @@ const openRepairExperience = (type: string, row?: any) => {
} }
// //
const repairExperienceFormsSuccess = async (formType, data) => { const repairExperienceFormsSuccess = async (formType, data) => {
console.log(data)
const data1 = { const data1 = {
repairRecordNumber: data.recordNo, repairRecordNumber: data.recordNo,
name: data.name, name: data.name,
@ -260,7 +254,6 @@ const repairExperienceFormsSuccess = async (formType, data) => {
masterId: data.id, masterId: data.id,
orderType: 'REPAIR', orderType: 'REPAIR',
} }
console.log(data1)
try { try {
await RepairExperienceApi.createRepairExperience(data1) await RepairExperienceApi.createRepairExperience(data1)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

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

@ -2,29 +2,24 @@
<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-form-item label="审核人" prop="approver">-->
<!-- <el-input v-model="formData.approver" placeholder="请输入审核人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="审核内容" prop="approveContent"> <el-form-item label="审核内容" prop="approveContent">
<el-input v-model="formData.approveContent" placeholder="请输入审核内容" /> <el-input v-model="formData.approveContent" 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="approveTime">
<el-date-picker
v-model="formData.approveTime"
type="datetime"
value-format="x"
placeholder="选择审核时间">
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="审核时间" prop="approveTime">-->
<!-- <el-date-picker-->
<!-- v-model="formData.approveTime"-->
<!-- type="datetime"-->
<!-- value-format="x"-->
<!-- placeholder="选择审核时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form> </el-form>
<template #footer> <template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm('success')"> </el-button> <el-button :disabled="formLoading" type="primary" @click="submitForm('success')"> </el-button>
@ -40,7 +35,6 @@
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus"; import {ElInput} from "element-plus";
import * as EquipmentReportRepairRequestApi from "@/api/eam/equipmentReportRepairRequest"; import * as EquipmentReportRepairRequestApi from "@/api/eam/equipmentReportRepairRequest";
import {audiEquipmentReportRepairOrder} from "@/api/eam/equipmentReportRepairRequest";
defineOptions({ name: 'TeamForm' }) defineOptions({ name: 'TeamForm' })
@ -50,7 +44,7 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // passed - noPassed -
const tags=ref([]) const tags=ref([])
const inputValue = ref('') const inputValue = ref('')
@ -62,22 +56,17 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({ const formData = ref({
id:'', id:'',
number:'', number:'',
//approver: '',
approveContent: '', approveContent: '',
approveTime: '', status:'',
}) })
const formRules = reactive({ const formRules = reactive({
// approver: [
// { required: true, message: '', trigger: 'blur' },
// { max: 50, message: '50', trigger: 'blur' }
// ],
approveContent: [ approveContent: [
{ required: true, message: '审核内容不能为空', trigger: 'blur' }, { required: true, message: '审核内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
approveTime: [ // approveTime: [
{ required: true, message: '审核时间不能为空', trigger: 'blur' }, // { required: true, message: '', trigger: 'blur' },
], // ],
}) })
const basicFormRef = ref() // Ref const basicFormRef = ref() // Ref
@ -85,7 +74,7 @@ const basicFormRef = ref() // 表单 Ref
/** 初始化弹窗 */ /** 初始化弹窗 */
const open = async (type: string, row?: object) => { const open = async (type: string, row?: object) => {
dialogVisible.value = true dialogVisible.value = true
dialogTitle.value = t('action.' + type) dialogTitle.value = t('编辑')
formType.value = type formType.value = type
// //
formData.value.id = row.id formData.value.id = row.id
@ -95,16 +84,29 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */ /** 提交表单 */
const submitForm = async (val) => { const submitForm = async (val) => {
//success
emit('success',formData.value.id)
// //
if (!basicFormRef) return if (!basicFormRef) return
const valid = await basicFormRef.value.validate() const valid = await basicFormRef.value.validate()
if (!valid) return if (!valid) return
//
await EquipmentReportRepairRequestApi.audiEquipmentReportRepairOrder(formData.value) if(formType.value == 'passed'){
dialogVisible.value = false formData.value.status = '3'
//
await EquipmentReportRepairRequestApi.audiEquipmentReportRepairOrder(formData.value)
dialogVisible.value = false
}else if(formType.value == 'noPassed'){
formData.value.status = '4'
//
await EquipmentReportRepairRequestApi.audiEquipmentReportRepairOrder(formData.value)
dialogVisible.value = false
}else{
console.log("error")
}
//success
emit('success')
} }
const handleClose=(val)=>{ const handleClose=(val)=>{

12
src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts

@ -105,7 +105,10 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: { form: {
component: 'Radio' component: 'Radio'
} }
@ -140,6 +143,9 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
field: 'workshopCode', field: 'workshopCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
required: true, required: true,
form: { form: {
componentProps: { componentProps: {
@ -162,12 +168,14 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
field: 'repairmaner', field: 'repairmaner',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
}, },
{ {
label: '报修人联系电话', label: '报修人联系电话',
field: 'repairPhone', field: 'repairPhone',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: false,
isForm: false,
}, },
{ {
label: '报修状态', label: '报修状态',

38
src/views/eam/equipmentReportRepairRequest/index.vue

@ -162,7 +162,7 @@ const butttondata = (row) => {
defaultButtons.mainListAuditedBtn({ hide: isShowStatusButton(row, ['2']), hasPermi: 'eam:equipmentReportRepairRequest:update' }), // defaultButtons.mainListAuditedBtn({ hide: isShowStatusButton(row, ['2']), hasPermi: 'eam:equipmentReportRepairRequest:update' }), //
defaultButtons.mainListRevokeBtn({ hide: isShowStatusButton(row, ['0']), hasPermi: 'eam:equipmentReportRepairRequest:update' }), // defaultButtons.mainListRevokeBtn({ hide: isShowStatusButton(row, ['0']), hasPermi: 'eam:equipmentReportRepairRequest:update' }), //
defaultButtons.mainListFinishBtn({ hide: isShowStatusButton(row, ['3']), hasPermi: 'eam:equipmentReportRepairRequest:update' }), defaultButtons.mainListFinishBtn({ hide: isShowStatusButton(row, ['3']), hasPermi: 'eam:equipmentReportRepairRequest:update' }),
defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:equipmentReportRepairRequest:update' }), // //defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:equipmentReportRepairRequest:update' }), //
] ]
} }
@ -281,20 +281,12 @@ const handleFinish = async (id: number) => {
// //
const handleAudited = async (row) => { const handleAudited = async (row) => {
message.confirmAudi(t('')).then(async () => { message.confirmAudi(t('')).then(async () => {
// //
audiFormRef.value.open('update', row); audiFormRef.value.open('passed', row);
}).catch(async (action: Action) => { }).catch(async (action: Action) => {
//
if (action === 'cancel') { if (action === 'cancel') {
const params = ref({ audiFormRef.value.open('noPassed', row);
id: '',
status: '',
})
params.value.id = row.id
params.value.status = '4'
await EquipmentReportRepairRequestApi.updateEquipmentReportRepairOrder(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} }
}) })
} }
@ -387,23 +379,9 @@ const getClosed = (val) => {
//audiForm //audiForm
const getData = (val) => { const getData = (val) => {
nextTick?.(async () => { nextTick?.(() => {
getList()
try { })
const params = ref({
id: '',
status: '',
})
params.value.id = val
params.value.status = '3'
await EquipmentReportRepairRequestApi.updateEquipmentReportRepairOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
} catch { }
}
)
} }

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

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

10
src/views/eam/maintainExperience/index.vue

@ -111,9 +111,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:maintainExperience:create'}), // defaultButtons.defaultAddBtn({hasPermi:'eam:maintainExperience:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:maintainExperience:import'}), // defaultButtons.defaultImportBtn({hasPermi:'eam:maintainExperience:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:maintainExperience:export'}), // defaultButtons.defaultExportBtn({hasPermi:'eam:maintainExperience:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), // // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -145,8 +145,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:maintainExperience:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:maintainExperience:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:maintainExperience:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'eam:maintainExperience:delete'}), //
] ]
// - // -

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

@ -8,7 +8,11 @@ export const MaintainExperienceRules = reactive({
}) })
export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
},
{ {
label: '经验标题', label: '经验标题',
field: 'name', field: 'name',
@ -19,7 +23,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
label: '经验内容', label: '经验内容',
field: 'content', field: 'content',
sort: 'custom', sort: 'custom',
isTable:false, isTable:true,
form: { form: {
componentProps: { componentProps: {
type: 'textarea', type: 'textarea',

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

@ -222,6 +222,9 @@ export const PlanInspection = useCrudSchemas(reactive<CrudSchema[]>([
field: 'directCreateRecord', field: 'directCreateRecord',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '所属厂区编号', label: '所属厂区编号',
@ -237,7 +240,10 @@ export const PlanInspection = useCrudSchemas(reactive<CrudSchema[]>([
field: 'workshopCode', field: 'workshopCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
required: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: { form: {
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗

10
src/views/eam/repairExperience/index.vue

@ -114,9 +114,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:repairExperience:create'}), // defaultButtons.defaultAddBtn({hasPermi:'eam:repairExperience:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:repairExperience:import'}), // defaultButtons.defaultImportBtn({hasPermi:'eam:repairExperience:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:repairExperience:export'}), // defaultButtons.defaultExportBtn({hasPermi:'eam:repairExperience:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), // // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -148,8 +148,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:repairExperience:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:repairExperience:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:repairExperience:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'eam:repairExperience:delete'}), //
] ]
// - // -

12
src/views/eam/repairExperience/repairExperience.data.ts

@ -9,6 +9,11 @@ export const RepairExperienceRules = reactive({
export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
},
{ {
label: '经验标题', label: '经验标题',
field: 'name', field: 'name',
@ -27,7 +32,6 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
label: '经验内容', label: '经验内容',
field: 'content', field: 'content',
sort: 'custom', sort: 'custom',
isTable:false,
isSearch:false, isSearch:false,
form: { form: {
component: 'Input', component: 'Input',
@ -86,8 +90,6 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
label: '故障类型', label: '故障类型',
field: 'faultType', field: 'faultType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false, isSearch: false,
isForm:false isForm:false
}, },
@ -96,7 +98,9 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
isSearch:false, isSearch:false,
isForm:false isForm:false,
isTable:false,
isDetail:false
}, },
{ {
label: '创建时间', label: '创建时间',

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

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

Loading…
Cancel
Save