Browse Source

EAM ——> 巡检记录 点检记录 前后端更新

master_hella_20240701
gaojs 5 months ago
parent
commit
645ab64f65
  1. 4
      src/views/eam/equipmentInspectionMain/finishForm2.vue
  2. 16
      src/views/eam/equipmentInspectionMain/index.vue
  3. 87
      src/views/eam/equipmentInspectionRecordMain/equipmentInspectionRecordMain.data.ts
  4. 29
      src/views/eam/equipmentInspectionRecordMain/index.vue
  5. 3
      src/views/eam/equipmentMaintenanceMain/finishForm2.vue
  6. 16
      src/views/eam/equipmentMaintenanceMain/index.vue
  7. 70
      src/views/eam/equipmentRepairJobMain/finishForm2.vue
  8. 16
      src/views/eam/equipmentRepairJobMain/index.vue
  9. 4
      src/views/eam/equipmentSpotCheckMain/finishForm2.vue
  10. 14
      src/views/eam/equipmentSpotCheckMain/index.vue
  11. 71
      src/views/eam/equipmentSpotCheckRecordMain/equipmentSpotCheckRecordMain.data.ts
  12. 29
      src/views/eam/equipmentSpotCheckRecordMain/index.vue

4
src/views/eam/equipmentInspectionMain/finishForm2.vue

@ -50,6 +50,7 @@
import * as EquipmentInspectionMainApi from '@/api/eam/equipmentInspectionMain'
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import {executeEquipmentInspectionOrder} from "@/api/eam/equipmentInspectionMain";
defineOptions({ name: 'TeamForm' })
@ -75,6 +76,7 @@ const formData = ref({
maintenancePhone: '',
startTime:'',
endTime:'',
status:'5',
})
const formRules = reactive({
maintenancer: [
@ -108,7 +110,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentInspectionMainApi.updateEquipmentInspection(formData.value);
await EquipmentInspectionMainApi.executeEquipmentInspectionOrder(formData.value);
//success
emit('success',formData.value.id)

16
src/views/eam/equipmentInspectionMain/index.vue

@ -486,14 +486,14 @@ const getClosed2=(val)=> {
const getData2=(val)=> {
nextTick?.(async () => {
console.log(val)
const params = ref({
id: '',
status: '',
})
params.value.id = val
params.value.status = '5'
//
await EquipmentInspectionMainApi.executeEquipmentInspectionOrder(params.value)
// const params = ref({
// id: '',
// status: '',
// })
// params.value.id = val
// params.value.status = '5'
// //
// await EquipmentInspectionMainApi.executeEquipmentInspectionOrder(params.value)
//message.success(t(''))
//
await getList()

87
src/views/eam/equipmentInspectionRecordMain/equipmentInspectionRecordMain.data.ts

@ -24,13 +24,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
label: '描述',
field: 'describing',
sort: 'custom',
isSearch: true
},
{
label: '设备编号',
field: 'equipmentCode',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '类型',
@ -43,6 +37,13 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
component: 'SelectV2'
}
},
{
label: '设备编号',
field: 'equipmentCode',
sort: 'custom',
isSearch: true
},
{
label: '是否拍照',
field: 'isPictures',
@ -65,7 +66,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -87,7 +88,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -109,7 +110,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
field: 'startTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -131,7 +132,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
field: 'endTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -163,7 +164,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
label: '验证人',
field: 'verifyer',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'InputNumber',
value: 0
@ -173,7 +174,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
label: '验证内容',
field: 'verifyContent',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'Editor',
componentProps: {
@ -187,7 +188,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
field: 'verifyTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -208,7 +209,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
label: '巡检人',
field: 'maintenancer',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'InputNumber',
value: 0
@ -219,7 +220,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
field: 'completionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -241,7 +242,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
field: 'maintenanceTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -262,8 +263,8 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
label: '流程状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
dictType: DICT_TYPE.EAM_ORDER_STATUS,
dictClass: 'string',
isSearch: true,
form: {
component: 'Radio'
@ -273,46 +274,52 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
label: '自动接单',
field: 'autoOrder',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '自动执行',
field: 'autoPerform',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '自动验证',
field: 'autoVerify',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '直接生成记录',
field: 'directCreateRecord',
sort: 'custom',
isSearch: true
isSearch: false,
},
{
label: '故障类型枚举',
field: 'faultType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
}
isSearch: false,
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true
isSearch: false,
},
{
label: '车间编号',
@ -324,13 +331,16 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '是否可用',
@ -338,7 +348,10 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Switch',
value: 'TRUE',

29
src/views/eam/equipmentInspectionRecordMain/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="EquipmentInspectionRecordMain.allSchemas" />
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="EquipmentInspectionRecordMain.allSchemas"
:detailAllSchemasRules="EquipmentInspectionRecordDetailRules"
:detailAllSchemas="EquipmentInspectionRecordDetail.allSchemas"
:apiPage="EquipmentInspectionRecordDetailApi.getEquipmentInspectionRecordDetailPage"
:detailButtonIsShowAdd=false
:detailButtonIsShowEdit=false
:detailButtonIsShowDelete=false
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/equipment-inspection-record-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -60,7 +69,9 @@
<script setup lang="ts">
import download from '@/utils/download'
import { EquipmentInspectionRecordMain,EquipmentInspectionRecordMainRules } from './equipmentInspectionRecordMain.data'
import { EquipmentInspectionRecordDetail,EquipmentInspectionRecordDetailRules } from '../equipmentInspectionRecordDetail/equipmentInspectionRecordDetail.data'
import * as EquipmentInspectionRecordMainApi from '@/api/eam/equipmentInspectionRecordMain'
import * as EquipmentInspectionRecordDetailApi from '@/api/eam/equipmentInspectionRecordDetail'
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:equipmentInspectionRecordMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:equipmentInspectionRecordMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:equipmentInspectionRecordMain:export'}), //
//defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentInspectionRecordMain:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentInspectionRecordMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:equipmentInspectionRecordMain:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,8 +144,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:equipmentInspectionRecordMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:equipmentInspectionRecordMain:delete'}), //
//defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentInspectionRecordMain:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentInspectionRecordMain:delete'}), //
]
// -

3
src/views/eam/equipmentMaintenanceMain/finishForm2.vue

@ -75,6 +75,7 @@ const formData = ref({
maintenancePhone: '',
startTime:'',
endTime:'',
status:'5',
})
const formRules = reactive({
maintenancer: [
@ -175,7 +176,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentMaintenanceMainApi.updateEquipmentMaintenance(formData.value);
await EquipmentMaintenanceMainApi.executeMaintenanceOrder(formData.value);
//success
emit('success',formData.value.id)

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

@ -555,14 +555,14 @@ const getClosed2=(val)=> {
const getData2=(val)=> {
nextTick?.(async () => {
console.log(val)
const params = ref({
id: '',
status: '',
})
params.value.id = val
params.value.status = '5'
//
await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value)
// const params = ref({
// id: '',
// status: '',
// })
// params.value.id = val
// params.value.status = '5'
// //
// await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value)
//message.success(t(''))
//
await getList()

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

@ -105,6 +105,7 @@ const formData = ref({
maintenancer:'',
maintenancePhone:'',
completeResult:'',
status:'5'
})
const formRules = reactive({
maintenanceDesc: [
@ -131,74 +132,7 @@ const formRules = reactive({
})
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

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

@ -468,14 +468,14 @@ const getClosed2=(val)=> {
//finishForm2
const getData2=(val)=> {
nextTick?.(async () => {
const params = ref({
id: '',
status: '',
})
params.value.id = val
params.value.status = '5'
//
await EquipmentRepairJobMainApi.executeEquipmentRepairJobMain(params.value)
// const params = ref({
// id: '',
// status: '',
// })
// params.value.id = val
// params.value.status = '5'
// //
// await EquipmentRepairJobMainApi.executeEquipmentRepairJobMain(params.value)
message.success(t('工单已完成'))
//
await getList()

4
src/views/eam/equipmentSpotCheckMain/finishForm2.vue

@ -51,6 +51,7 @@ import * as EquipmentInspectionMainApi from '@/api/eam/equipmentInspectionMain'
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import * as EquipmentSpotCheckMainApi from "@/api/eam/equipmentSpotCheckMain";
import {executeEquipmentSpotCheckOrder} from "@/api/eam/equipmentSpotCheckMain";
defineOptions({ name: 'TeamForm' })
@ -76,6 +77,7 @@ const formData = ref({
maintenancePhone: '',
startTime:'',
endTime:'',
status:'5',
})
const formRules = reactive({
maintenancer: [
@ -109,7 +111,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentSpotCheckMainApi.updateEquipmentSpotCheck(formData.value);
await EquipmentSpotCheckMainApi.executeEquipmentSpotCheckOrder(formData.value);
//success
emit('success',formData.value.id)

14
src/views/eam/equipmentSpotCheckMain/index.vue

@ -488,14 +488,14 @@ const getClosed2=(val)=> {
const getData2=(val)=> {
nextTick?.(async () => {
console.log(val)
const params = ref({
id: '',
status: '',
})
params.value.id = val
params.value.status = '5'
// const params = ref({
// id: '',
// status: '',
// })
// params.value.id = val
// params.value.status = '5'
//
await EquipmentSpotCheckMainApi.executeEquipmentSpotCheckOrder(params.value)
//await EquipmentSpotCheckMainApi.executeEquipmentSpotCheckOrder(params.value)
//message.success(t(''))
//
await getList()

71
src/views/eam/equipmentSpotCheckRecordMain/equipmentSpotCheckRecordMain.data.ts

@ -24,7 +24,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
label: '描述',
field: 'describing',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '设备工装编号',
@ -39,9 +39,6 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '计划工单号',
@ -54,7 +51,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -76,7 +73,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -98,7 +95,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
field: 'startTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -120,7 +117,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
field: 'endTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -143,7 +140,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom',
dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
isSearch: false,
form: {
component: 'SelectV2'
}
@ -152,7 +149,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
label: '验证人',
field: 'verifyer',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'InputNumber',
value: 0
@ -162,7 +159,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
label: '验证内容',
field: 'verifyContent',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'Editor',
componentProps: {
@ -176,7 +173,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
field: 'verifyTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -197,7 +194,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
label: '点检人',
field: 'maintenancer',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'InputNumber',
value: 0
@ -208,7 +205,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
field: 'completionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -230,7 +227,7 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
field: 'maintenanceTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -251,8 +248,8 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
label: '是否拍照',
field: 'isPictures',
sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Radio'
@ -262,9 +259,9 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
label: '流程状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
dictType: DICT_TYPE.EAM_ORDER_STATUS,
dictClass: 'string',
isSearch: false,
form: {
component: 'Radio'
}
@ -273,25 +270,34 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
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: '班组类型',
@ -300,27 +306,27 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
dictType: DICT_TYPE.BASIC_TEAM_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
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: 'remark',
sort: 'custom',
isSearch: true
isSearch: false,
},
{
label: '是否可用',
@ -328,7 +334,10 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Switch',
value: 'TRUE',

29
src/views/eam/equipmentSpotCheckRecordMain/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 }">
@ -53,6 +53,17 @@
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="EquipmentSpotCheckRecordMain.allSchemas" />
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="EquipmentSpotCheckRecordMain.allSchemas"
:detailAllSchemasRules="EquipmentSpotCheckRecordDetailRules"
:detailAllSchemas="EquipmentSpotCheckRecordDetail.allSchemas"
:apiPage="EquipmentSpotCheckRecordDetailApi.getEquipmentSpotCheckRecordDetailPage"
:detailButtonIsShowAdd=false
:detailButtonIsShowEdit=false
:detailButtonIsShowDelete=false
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/equipment-spot-check-record-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
@ -60,7 +71,9 @@
<script setup lang="ts">
import download from '@/utils/download'
import { EquipmentSpotCheckRecordMain,EquipmentSpotCheckRecordMainRules } from './equipmentSpotCheckRecordMain.data'
import { EquipmentSpotCheckRecordDetail,EquipmentSpotCheckRecordDetailRules } from '../equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data'
import * as EquipmentSpotCheckRecordMainApi from '@/api/eam/equipmentSpotCheckRecordMain'
import * as EquipmentSpotCheckRecordDetailApi from '@/api/eam/equipmentSpotCheckRecordDetail'
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 +112,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:equipmentSpotCheckRecordMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:equipmentSpotCheckRecordMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:equipmentSpotCheckRecordMain:export'}), //
//defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentSpotCheckRecordMain:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentSpotCheckRecordMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:equipmentSpotCheckRecordMain:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,8 +146,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:equipmentSpotCheckRecordMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:equipmentSpotCheckRecordMain:delete'}), //
//defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentSpotCheckRecordMain:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentSpotCheckRecordMain:delete'}), //
]
// -

Loading…
Cancel
Save