Browse Source

保养工单时间和接单员

master
zhang_li 8 months ago
parent
commit
6056a53d04
  1. 2
      src/components/Descriptions/src/Descriptions.vue
  2. 32
      src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts
  3. 5
      src/views/eam/device/devicemaintainjob/index.vue
  4. 2
      src/views/eam/mold/moldmaintainjob/index.vue
  5. 59
      src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

2
src/components/Descriptions/src/Descriptions.vue

@ -36,7 +36,7 @@ const props = defineProps({
default: () => ({}) default: () => ({})
} }
}) })
console.log('schema',props.schema)
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('descriptions') const prefixCls = getPrefixCls('descriptions')

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

@ -8,6 +8,8 @@ import { validateNum100, 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 })
import * as UserApi from '@/api/system/user'
// 表单校验 // 表单校验
export const DeviceMaintainOrderMainRules = reactive({ export const DeviceMaintainOrderMainRules = reactive({
@ -151,27 +153,23 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: '150', width: '150',
}, },
isDetail:false
}, },
{ {
label: '接单时间', label: '接单人员',
field: 'receiveTime', field: 'maintenanceName',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: { table: {
width: '150', width: '150',
}, },
formatter: dateFormatter, isForm:false,
form: { isDetail:true,
component: 'DatePicker', isTable:false,
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
}, },
{ {
label: '完成时间', label: '接单时间',
field: 'finishedTime', field: 'receiveTime',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: { table: {
@ -185,10 +183,13 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail:{
dateFormat:'YYYY-MM-DD HH:mm:ss'
}
}, },
{ {
label: '验证时间', label: '完成时间',
field: 'verifyTime', field: 'finishedTime',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: { table: {
@ -202,6 +203,9 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail:{
dateFormat:'YYYY-MM-DD HH:mm:ss'
}
}, },
{ {
label: '操作', label: '操作',

5
src/views/eam/device/devicemaintainjob/index.vue

@ -111,6 +111,7 @@ import * as DeviceMaintainOrderMainApi from '@/api/eam/device/deviceMaintainOrde
import * as DeviceMaintainOrderDetailApi from '@/api/eam/device/deviceMaintainOrderDetail' import * as DeviceMaintainOrderDetailApi from '@/api/eam/device/deviceMaintainOrderDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'DeviceMaintainOrderMain' }) defineOptions({ name: 'DeviceMaintainOrderMain' })
const message = useMessage() // const message = useMessage() //
@ -286,7 +287,9 @@ const openForm = (type: string, row?: any) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail =async (row: any, titleName: any, titleValue: any) => {
const userListAll = await UserApi.getSimpleUserList()
row.maintenanceName = userListAll.find((account) => account.id == row.maintenance)?.nickname
detailRef.value.openDetail(row, titleName, titleValue,'DeviceMaintainOrderMain') detailRef.value.openDetail(row, titleName, titleValue,'DeviceMaintainOrderMain')
} }

2
src/views/eam/mold/moldmaintainjob/index.vue

@ -286,6 +286,8 @@ const openForm = (type: string, row?: any) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any) => { const openDetail = async (row: any, titleName: any, titleValue: any) => {
const userListAll = await UserApi.getSimpleUserList()
row.maintenanceName = userListAll.find((account) => account.id == row.maintenance)?.nickname
const factoryList = await selectAllFactoryArea() const factoryList = await selectAllFactoryArea()
row.factoryAreaNumber1 = factoryList.find((account) => account.id == row.factoryAreaNumber)?.name row.factoryAreaNumber1 = factoryList.find((account) => account.id == row.factoryAreaNumber)?.name
detailRef.value.openDetail(row, titleName, titleValue,'MoldMaintainOrderMain') detailRef.value.openDetail(row, titleName, titleValue,'MoldMaintainOrderMain')

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

@ -143,41 +143,23 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: '150', width: '150',
}, },
isDetail:false
}, },
{ {
label: '接单时间', label: '接单人员',
field: 'receiveTime', field: 'maintenanceName',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: { table: {
width: '150', width: '150',
}, },
formatter: dateFormatter, isForm:false,
form: { isDetail:true,
component: 'DatePicker', isTable:false,
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
}, },
{ {
label: '工程师', label: '接单时间',
field: 'engineer', field: 'receiveTime',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '指派时间',
field: 'assignTime',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: { table: {
@ -191,7 +173,11 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail:{
dateFormat:'YYYY-MM-DD HH:mm:ss'
}
}, },
{ {
label: '完成时间', label: '完成时间',
field: 'finishedTime', field: 'finishedTime',
@ -208,24 +194,10 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
}, detail:{
{ dateFormat:'YYYY-MM-DD HH:mm:ss'
label: '验证时间',
field: 'verifyTime',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
} }
}, },
},
// { // {
// label: '创建时间', // label: '创建时间',
@ -442,6 +414,9 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
type: 'datetime', type: 'datetime',
valueFormat: 'x' valueFormat: 'x'
} }
},
detail:{
dateFormat:'YYYY-MM-DD HH:mm:ss'
} }
}, },
{ {

Loading…
Cancel
Save