Browse Source

修复测试bug

master
ljlong_2630 8 months ago
parent
commit
73f560efb8
  1. 7
      src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts
  2. 7
      src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts
  3. 40
      src/views/eam/device/devicemaintenancejob/index.vue
  4. 2
      src/views/eam/mold/moldRepair/moldRepair.data.ts
  5. 20
      src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts
  6. 8
      src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts
  7. 34
      src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

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

@ -10,6 +10,7 @@ const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber:
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' import * as UserApi from '@/api/system/user'
const userListAll = await UserApi.getSimpleUserList()
// 表单校验 // 表单校验
export const DeviceMaintainOrderMainRules = reactive({ export const DeviceMaintainOrderMainRules = reactive({
@ -155,7 +156,11 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: '150', width: '150',
}, },
isDetail:false isDetail:false,
api: () => userListAll,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname
},
}, },
{ {
label: '接单人员', label: '接单人员',

7
src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts

@ -55,7 +55,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true, isTable: true,
}, },
{ {
label: '设备模具', label: '设备',
field: 'deviceNumber', field: 'deviceNumber',
sort: 'custom', sort: 'custom',
table: { table: {
@ -73,7 +73,8 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'number' valueField: 'number'
} },
filterable: true,
} }
}, },
form: { form: {
@ -84,6 +85,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'number' valueField: 'number'
}, },
filterable: true,
}, },
} }
}, },
@ -220,6 +222,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'label', labelField: 'label',
valueField: 'value' valueField: 'value'
}, },
disabled: true,
filterable: true, filterable: true,
placeholder: "请选择设备" placeholder: "请选择设备"
} }

40
src/views/eam/device/devicemaintenancejob/index.vue

@ -390,6 +390,12 @@ const onChange = (field, cur, item) => {
// console.log(item) // console.log(item)
// console.log(item.componentProps.options) // console.log(item.componentProps.options)
formRef.value.formRef.formModel.maintenance = Number(userStore?.getUser?.id) formRef.value.formRef.formModel.maintenance = Number(userStore?.getUser?.id)
if (judgeIfDeviceRole()) {
formRef.value.formRef.formModel.type = 'DEVICE'
} else {
formRef.value.formRef.formModel.type = 'TECH'
}
} }
} }
@ -889,15 +895,15 @@ const detailOpenForm = (type, row) =>{
// / // /
const detailValidate = (data) => { const detailValidate = (data) => {
return true; return true;
let tag = false; // let tag = false;
if(data.qty <= 0){ // if(data.qty <= 0){
message.warning('数量必须大于0') // message.warning('0')
tag = false; // tag = false;
return tag; // return tag;
}else { // }else {
tag = true; // tag = true;
return tag; // return tag;
} // }
} }
// //
const detailSubmitForm = async (formType, data, formRef, tableList) => { const detailSubmitForm = async (formType, data, formRef, tableList) => {
@ -1013,6 +1019,22 @@ const cancel = () => {
showTempIdeaRefView.value = false; showTempIdeaRefView.value = false;
}; };
const getActorClass = () => {
}
const judgeIfDeviceRole = () => {
const rolesOk = userStore.roles.find(item => {
return item == 'device_class_worker_role' || item == 'device_class_Engineer_role'
})
if (rolesOk != undefined && rolesOk != null) {
return true
} else {
return false
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

2
src/views/eam/mold/moldRepair/moldRepair.data.ts

@ -106,6 +106,7 @@ export const MoldRepair = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'number' valueField: 'number'
}, },
filterable: true,
}, },
}, },
search: { search: {
@ -116,6 +117,7 @@ export const MoldRepair = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'number' valueField: 'number'
}, },
filterable: true,
}, },
} }
}, },

20
src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts

@ -70,7 +70,8 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'number', labelField: 'number',
valueField: 'number' valueField: 'number'
} },
filterable: true,
} }
}, },
form: { form: {
@ -81,6 +82,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'number', labelField: 'number',
valueField: 'number' valueField: 'number'
}, },
filterable: true,
}, },
} }
}, },
@ -104,7 +106,8 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'number' valueField: 'number'
} },
filterable: true,
} }
}, },
form: { form: {
@ -115,6 +118,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'number' valueField: 'number'
}, },
filterable: true,
}, },
} }
}, },
@ -138,7 +142,8 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
} },
filterable: true,
} }
}, },
form: { form: {
@ -150,6 +155,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
filterable: true,
placeholder: "请选择设备" placeholder: "请选择设备"
}, },
} }
@ -184,7 +190,8 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
} },
filterable: true,
} }
}, },
form: { form: {
@ -196,6 +203,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
filterable: true,
placeholder: "请选择维修人" placeholder: "请选择维修人"
}, },
} }
@ -356,7 +364,8 @@ export const MoldInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
} },
filterable: true,
}, },
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
const cellValueList = cellValue ? cellValue.split(',') : []; const cellValueList = cellValue ? cellValue.split(',') : [];
@ -374,6 +383,7 @@ export const MoldInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
filterable: true,
placeholder: "请选择责任人", placeholder: "请选择责任人",
multiple: true, multiple: true,
}, },

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

@ -70,7 +70,8 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
} },
filterable: true,
} }
}, },
form: { form: {
@ -82,6 +83,7 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
filterable: true,
placeholder: "请先选择设备" placeholder: "请先选择设备"
}, },
}, },
@ -350,7 +352,8 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
} },
filterable: true,
}, },
api: () => dutyUserList, api: () => dutyUserList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
@ -366,6 +369,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
filterable: true,
placeholder: "请选择责任人", placeholder: "请选择责任人",
multiple: true, multiple: true,
}, },

34
src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

@ -73,7 +73,8 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
} },
filterable: true,
} }
}, },
form: { form: {
@ -85,6 +86,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
filterable: true,
placeholder: "请先选择设备" placeholder: "请先选择设备"
}, },
} }
@ -120,22 +122,25 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'label', labelField: 'label',
valueField: 'value' valueField: 'value'
}, },
filterable: true,
}, },
}, },
form: { form: {
component: 'Select', component: 'Select',
api:()=>deviceTypeList,
componentProps: { componentProps: {
options: deviceTypeList, disabled: true,
optionsAlias: { optionsAlias: {
labelField: 'label', labelField: 'label',
valueField: 'value' valueField: 'value'
}, },
placeholder: "请选择设备" filterable: true,
placeholder: "请选择类型"
} }
}, },
}, },
{ {
label: '设备模具', label: '模具',
field: 'deviceNumber', field: 'deviceNumber',
sort: 'custom', sort: 'custom',
table: { table: {
@ -153,7 +158,8 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'number' valueField: 'number'
} },
filterable: true,
} }
}, },
form: { form: {
@ -164,6 +170,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'number' valueField: 'number'
}, },
filterable: true,
}, },
} }
}, },
@ -187,7 +194,8 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'nickname', labelField: 'nickname',
valueField: 'id' valueField: 'id'
}, },
placeholder: "请先选择模具" filterable: true,
placeholder: "请先选择维修人"
}, },
}, },
isSearch:true, isSearch:true,
@ -200,7 +208,8 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'nickname', labelField: 'nickname',
valueField: 'id' valueField: 'id'
} },
filterable: true,
} }
} }
}, },
@ -350,7 +359,8 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'nickname', labelField: 'nickname',
valueField: 'id' valueField: 'id'
} },
filterable: true,
}, },
form: { form: {
component: 'Select', component: 'Select',
@ -362,7 +372,8 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
} },
filterable: true,
} }
} }
}, },
@ -559,7 +570,8 @@ export const MoldMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
} },
filterable: true,
} }
}, },
form: { form: {
@ -571,6 +583,7 @@ export const MoldMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
filterable: true,
placeholder: "请先选择设备" placeholder: "请先选择设备"
}, },
} }
@ -642,6 +655,7 @@ export const MoldMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
filterable: true,
placeholder: "请先选择模具" placeholder: "请先选择模具"
}, },
} }

Loading…
Cancel
Save