Browse Source

维修工单

master_hella_20240701
zhang_li 5 months ago
parent
commit
c2c8cf8a95
  1. 4
      src/views/eam/equipmentRepairRecordMain/index.vue
  2. 26
      src/views/eam/repairExperience/index.vue
  3. 38
      src/views/eam/repairExperience/repairExperience.data.ts

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

@ -242,7 +242,9 @@ const repairExperienceFormsSuccess = async (formType, data) => {
const data1 = {
repairNumber: data.number,
name: data.name,
content: data.content
content: data.content,
masterId: data.id,
ooderType: 'REPAIR',
}
console.log(data1)
try {

26
src/views/eam/repairExperience/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 #name="{ row }">
<el-button type="primary" link @click="openDetail(row, '经验标题', row.repairNumber)">
<span>{{ row.name }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -51,8 +51,17 @@
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="RepairExperience.allSchemas" />
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="RepairExperience.allSchemas"
:detailAllSchemas="EquipmentRepairRecordDetail.allSchemas"
:detailAllSchemasRules="EquipmentRepairRecordDetailRules"
:apiPage="EquipmentRepairRecordDetailApi.getEquipmentRepairRecordDetailPage"
:detailButtonIsShowAdd="false"
:detailButtonIsShowEdit="false"
:detailButtonIsShowDelete="false"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/record/repair-experience/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
@ -60,7 +69,13 @@
<script setup lang="ts">
import download from '@/utils/download'
import { RepairExperience,RepairExperienceRules } from './repairExperience.data'
import * as RepairExperienceApi from '@/api/eam/repairExperience/index'
import {
EquipmentRepairRecordDetail,
EquipmentRepairRecordDetailRules
} from '../equipmentRepairRecordDetail/equipmentRepairRecordDetail.data'
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'
@ -238,7 +253,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await RepairExperienceApi.importTemplate()
})
</script>

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

@ -40,44 +40,54 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '维修工单来源',
field: 'repairNumber',
label: '来源字典',
field: 'sources',
sort: 'custom',
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
isForm:false
},
{
label: '报修类型',
field: 'repairNumber',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
isForm:false
},
{
label: '设备/工装编号',
field: 'repairNumber',
field: 'equipmentCode',
sort: 'custom',
isSearch:false,
isForm:false
},
{
label: '设备/工装名称',
field: 'repairNumber',
field: 'equipmentName',
sort: 'custom',
isSearch:false,
isForm:false
},
{
label: '故障时间',
field: 'repairNumber',
field: 'faultTime',
formatter: dateFormatter,
sort: 'custom',
isSearch:false,
isForm:false
isForm:false,
detail:{
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '故障类型',
field: 'repairNumber',
field: 'faultType',
sort: 'custom',
dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
isForm:false
},
@ -95,15 +105,9 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
formatter: dateFormatter,
isForm: false,
isSearch:false,
detail:{
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

Loading…
Cancel
Save