ljlong_2630 8 months ago
parent
commit
b66dee5c2c
  1. 19
      src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts
  2. 42
      src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

19
src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts

@ -4,6 +4,7 @@ import { selecUserByType } from '@/api/system/dept'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { ItemSearchTable } from '../../basic/item/item.data' import { ItemSearchTable } from '../../basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item' import * as ItemApi from '@/api/eam/basic/item'
import { validateHanset, validateInteger, validateNum } from '@/utils/validator'
const factoryList = await selectAllFactoryArea() const factoryList = await selectAllFactoryArea()
const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }) const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 })
const dutyUserList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: null }) const dutyUserList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: null })
@ -221,9 +222,21 @@ export const DeviceMaintainOrderDetailRules = reactive({
concurrencyStamp: [required], concurrencyStamp: [required],
name: [required], name: [required],
number: [required], number: [required],
peoples: [required], peoples: [
estimatedMinutes: [required],
actualMinutes: [required], required,
{ validator:validateNum, message: '请输入正整数', trigger: 'blur'},
],
estimatedMinutes: [
required,
{ validator:validateNum, message: '请输入正整数', trigger: 'blur'},
],
actualMinutes: [
required,
{ validator:validateNum, message: '请输入正整数', trigger: 'blur'},
],
chargePeoples: [required], chargePeoples: [required],
completionTime: [required], completionTime: [required],
engineer: [required], engineer: [required],

42
src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

@ -4,6 +4,7 @@ import { selecUserByType } from '@/api/system/dept'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { ItemSearchTable } from '../../basic/item/item.data' import { ItemSearchTable } from '../../basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item' import * as ItemApi from '@/api/eam/basic/item'
import { validateNum } from '@/utils/validator'
const factoryList = await selectAllFactoryArea() const factoryList = await selectAllFactoryArea()
const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 }) const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 })
const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: undefined }) const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: undefined })
@ -282,9 +283,18 @@ export const MoldMaintainOrderDetailRules = reactive({
concurrencyStamp: [required], concurrencyStamp: [required],
name: [required], name: [required],
number: [required], number: [required],
peoples: [required], peoples: [
estimatedMinutes: [required], required,
actualMinutes: [required], { validator: validateNum, message: '请输入正整数', trigger: 'blur' },
],
estimatedMinutes: [
required,
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' },
],
actualMinutes: [
required,
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' },
],
chargePeoples: [required], chargePeoples: [required],
completionTime: [required], completionTime: [required],
engineer: [required], engineer: [required],
@ -355,9 +365,9 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm: { tableForm: {
type: 'Select', type: 'Select',
initOptions: userList, initOptions: userList,
multiple:true, multiple: true,
collapseTags:true, collapseTags: true,
collapseTagsTooltip:true, collapseTagsTooltip: true,
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
@ -366,7 +376,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
api: () => dutyUserList, api: () => dutyUserList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',') return userList.filter(item => cellValue?.includes(item.id)).map(cur => cur.name).join(',')
}, },
form: { form: {
component: 'Select', component: 'Select',
@ -405,7 +415,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: false, disabled: false,
} }
}, },
},{ }, {
label: '完成时间', label: '完成时间',
field: 'completionTime', field: 'completionTime',
sort: 'custom', sort: 'custom',
@ -436,7 +446,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
type:'textarea' type: 'textarea'
} }
} }
}, },
@ -459,12 +469,12 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
}, },
tableForm:{ tableForm: {
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择备件', searchListPlaceholder: '请选择备件',
searchField: 'itemNumbers1', searchField: 'itemNumbers1',
searchTitle: '备件', searchTitle: '备件',
multiple:true, multiple: true,
searchAllSchemas: ItemSearchTable.allSchemas, searchAllSchemas: ItemSearchTable.allSchemas,
searchPage: ItemApi.getItemList, searchPage: ItemApi.getItemList,
tableSelectionChange: (value) => { tableSelectionChange: (value) => {
@ -485,7 +495,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择备件', // 输入框占位文本 searchListPlaceholder: '请选择备件', // 输入框占位文本
searchField: 'itemNumbers1', // 查询弹窗赋值字段 searchField: 'itemNumbers1', // 查询弹窗赋值字段
searchTitle: '备件', // 查询弹窗标题 searchTitle: '备件', // 查询弹窗标题
multiple:true, multiple: true,
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法 searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
@ -504,9 +514,9 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
}, },
isForm:false, isForm: false,
isDetail:false, isDetail: false,
isTable:false, isTable: false,
isSearch: false, isSearch: false,
isTableForm: false, isTableForm: false,
}, },
@ -520,7 +530,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
type:'TextArea' type: 'TextArea'
} }
} }
}, },

Loading…
Cancel
Save