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: () => ({})
}
})
console.log('schema',props.schema)
const { getPrefixCls } = useDesign()
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 userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 })
const dutyUserList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: null })
import * as UserApi from '@/api/system/user'
// 表单校验
export const DeviceMaintainOrderMainRules = reactive({
@ -151,27 +153,23 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: '150',
},
isDetail:false
},
{
label: '接单时间',
field: 'receiveTime',
label: '接单人员',
field: 'maintenanceName',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
isForm:false,
isDetail:true,
isTable:false,
},
{
label: '完成时间',
field: 'finishedTime',
label: '接单时间',
field: 'receiveTime',
sort: 'custom',
isSearch: false,
table: {
@ -185,10 +183,13 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
detail:{
dateFormat:'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '验证时间',
field: 'verifyTime',
label: '完成时间',
field: 'finishedTime',
sort: 'custom',
isSearch: false,
table: {
@ -202,6 +203,9 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
detail:{
dateFormat:'YYYY-MM-DD HH:mm:ss'
}
},
{
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 defaultButtons from '@/utils/disposition/defaultButtons'
import { useUserStore } from '@/store/modules/user'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'DeviceMaintainOrderMain' })
const message = useMessage() //
@ -286,7 +287,9 @@ const openForm = (type: string, row?: any) => {
/** 详情操作 */
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')
}

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

@ -286,6 +286,8 @@ const openForm = (type: string, row?: any) => {
/** 详情操作 */
const detailRef = ref()
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()
row.factoryAreaNumber1 = factoryList.find((account) => account.id == row.factoryAreaNumber)?.name
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: {
width: '150',
},
isDetail:false
},
{
label: '接单时间',
field: 'receiveTime',
label: '接单人员',
field: 'maintenanceName',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
isForm:false,
isDetail:true,
isTable:false,
},
{
label: '工程师',
field: 'engineer',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '指派时间',
field: 'assignTime',
label: '接单时间',
field: 'receiveTime',
sort: 'custom',
isSearch: false,
table: {
@ -191,7 +173,11 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
detail:{
dateFormat:'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '完成时间',
field: 'finishedTime',
@ -208,24 +194,10 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
},
{
label: '验证时间',
field: 'verifyTime',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
detail:{
dateFormat:'YYYY-MM-DD HH:mm:ss'
}
},
},
// {
// label: '创建时间',
@ -442,6 +414,9 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
type: 'datetime',
valueFormat: 'x'
}
},
detail:{
dateFormat:'YYYY-MM-DD HH:mm:ss'
}
},
{

Loading…
Cancel
Save