Browse Source

EAM ——> 维修记录 主子明细 前后端

master_hella_20240701
gaojs 5 months ago
parent
commit
27a2daeeb7
  1. 1
      src/utils/dict.ts
  2. 2
      src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts
  3. 1
      src/views/eam/equipmentRepairJobMain/index.vue
  4. 157
      src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts
  5. 29
      src/views/eam/equipmentRepairRecordMain/index.vue

1
src/utils/dict.ts

@ -363,6 +363,7 @@ export enum DICT_TYPE {
EAM_MAINTENANCE_URGENCY = 'eam_maintenance_urgency', // 维保紧急程度
EAM_MAINTENANCE_LEVEL = 'eam_maintenance_level', // 维保维修级别
EAM_REPAIR_STATUS = 'eam_repair_status', // 维修状态
EAM_COMPLETE_RESULT = 'eam_complete_result', // 维修状态
OFF_BACK_STATUS = 'off_back_status',
SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态
IS_LINE_ITEM = 'is_line_item', // 是否是线边

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

@ -249,6 +249,8 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '结果',
field: 'completeResult',
sort: 'custom',
dictType: DICT_TYPE.EAM_COMPLETE_RESULT,
dictClass: 'string',
isSearch: true,
},
{

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

@ -88,7 +88,6 @@ import Detail from '@/views/eam/equipmentRepairJobMain/EquipmentRepairJobDetail.
import FinishForm1 from '@/views/eam/equipmentRepairJobMain/finishForm1.vue'
import FinishForm2 from '@/views/eam/equipmentRepairJobMain/finishForm2.vue'
import FinishForm3 from '@/views/eam/equipmentRepairJobMain/finishForm3.vue'
import {createEquipmentRepairNewOrder} from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'EquipmentRepairJobMain' })

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

@ -1,5 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
// 表单校验
export const EquipmentRepairRecordMainRules = reactive({
@ -11,7 +13,6 @@ export const EquipmentRepairRecordMainRules = reactive({
equipmentCode: [required],
totalMinutes: [required],
faultType: [required],
concurrencyStamp: [required]
})
export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -28,12 +29,9 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '报修工单申请号',
label: '报修工单号',
field: 'repairNumber',
sort: 'custom',
isSearch: true
@ -42,43 +40,56 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '来源字典',
field: 'sources',
sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false
},
{
label: '维修描述',
field: 'maintenanceDesc',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '紧急程度',
field: 'urgency',
sort: 'custom',
dictType: DICT_TYPE.REPAIR_DEGREE,
dictType: DICT_TYPE.EAM_MAINTENANCE_URGENCY,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '维修级别',
field: 'level',
sort: 'custom',
dictType: DICT_TYPE.REPAIR_LEVEL,
dictType: DICT_TYPE.EAM_MAINTENANCE_LEVEL,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '设备编号',
field: 'equipmentCode',
sort: 'custom',
isSearch: true
isSearch: true,
isForm: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '设备信息', // 查询弹窗标题
searchListPlaceholder: '请选择 设备编号', // 输入框占位文本
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '是否停机',
@ -96,7 +107,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'startTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -118,7 +129,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'endTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -139,23 +150,25 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '维修时间',
field: 'totalMinutes',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '验证人',
field: 'verifyer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '验证内容',
field: 'verifyContent',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Editor',
componentProps: {
@ -169,7 +182,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'verifyTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
@ -190,35 +206,31 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '执行人',
field: 'maintenancer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
isSearch: false,
},
{
label: '维修人联系电话',
field: 'maintenancePhone',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '结果枚举',
field: 'completeResult',
sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictType: DICT_TYPE.EAM_COMPLETE_RESULT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '完成时间',
field: 'completionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -240,7 +252,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'maintenanceTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
@ -262,7 +277,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'repairTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -283,11 +298,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '报修人',
field: 'repairer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
isSearch: false,
},
{
label: '故障类型',
@ -296,75 +307,86 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '流程状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.EAM_REPAIR_STATUS,
dictClass: 'string',
isSearch: true,
form: {
component: 'Radio'
}
},
{
label: '自动接单',
field: 'autoOrder',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '自动执行',
field: 'autoPerform',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '自动验证',
field: 'autoVerify',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '直接生成记录',
field: 'directCreateRecord',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '班组类型',
field: 'classType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
}
isSearch: false,
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用',
@ -372,7 +394,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '操作',

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

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -51,7 +51,16 @@
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="EquipmentRepairRecordMain.allSchemas" />
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="EquipmentRepairRecordMain.allSchemas"
:detailAllSchemas="EquipmentRepairRecordDetail.allSchemas"
:detailAllSchemasRules="EquipmentRepairRecordDetailRules"
:apiPage="EquipmentRepairRecordDetailApi.getEquipmentRepairRecordDetailPage"
:detailButtonIsShowAdd=false
:detailButtonIsShowEdit=false
:detailButtonIsShowDelete=false
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/equipment-repair-record-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -60,7 +69,9 @@
<script setup lang="ts">
import download from '@/utils/download'
import { EquipmentRepairRecordMain,EquipmentRepairRecordMainRules } from './equipmentRepairRecordMain.data'
import { EquipmentRepairRecordDetail,EquipmentRepairRecordDetailRules } from '../equipmentRepairRecordDetail/equipmentRepairRecordDetail.data'
import * as EquipmentRepairRecordMainApi from '@/api/eam/equipmentRepairRecordMain'
import * as EquipmentRepairRecordDetailApi from '@/api/eam/equipmentRepairRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -99,9 +110,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:equipmentRepairRecordMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:equipmentRepairRecordMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:equipmentRepairRecordMain:export'}), //
// defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentRepairRecordMain:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentRepairRecordMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:equipmentRepairRecordMain:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,8 +144,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:equipmentRepairRecordMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:equipmentRepairRecordMain:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentRepairRecordMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentRepairRecordMain:delete'}), //
]
// -

Loading…
Cancel
Save