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. 44
      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 = { const data1 = {
repairNumber: data.number, repairNumber: data.number,
name: data.name, name: data.name,
content: data.content content: data.content,
masterId: data.id,
ooderType: 'REPAIR',
} }
console.log(data1) console.log(data1)
try { try {

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

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #name="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '经验标题', row.repairNumber)">
<span>{{ row.code }}</span> <span>{{ row.name }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <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" /> <ImportForm ref="importFormRef" url="/record/repair-experience/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template> </template>
@ -60,7 +69,13 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { RepairExperience,RepairExperienceRules } from './repairExperience.data' import { RepairExperience,RepairExperienceRules } from './repairExperience.data'
import * as RepairExperienceApi from '@/api/eam/repairExperience/index' 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 * 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'
@ -238,7 +253,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await RepairExperienceApi.importTemplate()
}) })
</script> </script>

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

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

Loading…
Cancel
Save