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

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

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

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

@ -390,6 +390,12 @@ const onChange = (field, cur, item) => {
// console.log(item)
// console.log(item.componentProps.options)
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) => {
return true;
let tag = false;
if(data.qty <= 0){
message.warning('数量必须大于0')
tag = false;
return tag;
}else {
tag = true;
return tag;
}
// let tag = false;
// if(data.qty <= 0){
// message.warning('0')
// tag = false;
// return tag;
// }else {
// tag = true;
// return tag;
// }
}
//
const detailSubmitForm = async (formType, data, formRef, tableList) => {
@ -1013,6 +1019,22 @@ const cancel = () => {
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 () => {
getList()

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

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

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

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

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

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

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

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

Loading…
Cancel
Save