Browse Source

修改测试bug

master
ljlong_2630 8 months ago
parent
commit
9db349707d
  1. 6
      src/views/eam/device/devicemaintainjob/index.vue
  2. 18
      src/views/eam/device/devicemaintenancejob/index.vue
  3. 1
      src/views/eam/mold/moldinspectionjob/index.vue
  4. 10
      src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts
  5. 4
      src/views/eam/mold/moldmaintainjob/index.vue
  6. 8
      src/views/eam/mold/moldmaintenancejob/index.vue

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

@ -192,8 +192,6 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { if (val == 'add') {
// //
DeviceMaintainOrderMain.allSchemas.formSchema[3].value = 'DEVICE'
DeviceMaintainOrderMain.allSchemas.formSchema[0].componentProps.disabled = false
openForm('create') openForm('create')
} else if (val == 'import') { } else if (val == 'import') {
// //
@ -247,8 +245,6 @@ const butttondata = (row) => {
} }
const onChange = (field, cur, item) => { const onChange = (field, cur, item) => {
if (field == 'deviceNumber') { if (field == 'deviceNumber') {
// DeviceMaintainOrderMain.allSchemas.formSchema[1].componentProps.disabled = true
// DeviceMaintainOrderMain.allSchemas.formSchema[2].componentProps.disabled = true
formRef.value.formRef.formModel.factoryAreaNumber =String(item.componentProps.options.find((item) => item.number == cur).factoryAreaNumber) formRef.value.formRef.formModel.factoryAreaNumber =String(item.componentProps.options.find((item) => item.number == cur).factoryAreaNumber)
console.log(typeof formRef.value.formRef.formModel.factoryAreaNumber) console.log(typeof formRef.value.formRef.formModel.factoryAreaNumber)
// console.log(item) // console.log(item)
@ -258,11 +254,9 @@ const onChange = (field, cur, item) => {
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
DeviceMaintainOrderMain.allSchemas.formSchema[0].componentProps.disabled = false
if (val == 'edit') { if (val == 'edit') {
// //
openForm('update', row) openForm('update', row)
DeviceMaintainOrderMain.allSchemas.formSchema[0].componentProps.disabled = true
} else if (val == 'delete') { } else if (val == 'delete') {
// //
handleDelete(row.id) handleDelete(row.id)

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

@ -298,8 +298,12 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { if (val == 'add') {
// //
DeviceMaintenanceMain.allSchemas.formSchema[3].value = 'DEVICE' DeviceMaintenanceMain.allSchemas.formSchema.find(item => {
DeviceMaintenanceMain.allSchemas.formSchema[0].componentProps.disabled = false return item.field == 'deviceNumber'
}).componentProps.disabled = false
DeviceMaintenanceMain.allSchemas.formSchema.find(item => {
return item.field == 'type'
}).value = 'DEVICE'
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { DeviceMaintenanceMain.allSchemas.formSchema.find(item => {
return item.field == 'type' return item.field == 'type'
}).componentProps.options = deviceTypeList }).componentProps.options = deviceTypeList
@ -358,8 +362,6 @@ const butttondata = (row) => {
} }
const onChange = (field, cur, item) => { const onChange = (field, cur, item) => {
if (field == 'deviceNumber') { if (field == 'deviceNumber') {
// DeviceMaintenanceMain.allSchemas.formSchema[1].componentProps.disabled = true
// DeviceMaintenanceMain.allSchemas.formSchema[2].componentProps.disabled = true
formRef.value.formRef.formModel.factoryAreaNumber =String(item.componentProps.options.find((item) => item.number == cur).factoryAreaNumber) formRef.value.formRef.formModel.factoryAreaNumber =String(item.componentProps.options.find((item) => item.number == cur).factoryAreaNumber)
console.log(typeof formRef.value.formRef.formModel.factoryAreaNumber) console.log(typeof formRef.value.formRef.formModel.factoryAreaNumber)
// console.log(item) // console.log(item)
@ -455,14 +457,18 @@ const onChangeSec = (field, cur, item,formRefSec) => {
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
DeviceMaintenanceMain.allSchemas.formSchema[0].componentProps.disabled = false DeviceMaintenanceMain.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.disabled = false
if (val == 'edit') { if (val == 'edit') {
// //
DeviceMaintenanceMain.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.disabled = true
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { DeviceMaintenanceMain.allSchemas.formSchema.find(item => {
return item.field == 'type' return item.field == 'type'
}).componentProps.options = deviceTypeList }).componentProps.options = deviceTypeList
openForm('update', row) openForm('update', row)
DeviceMaintenanceMain.allSchemas.formSchema[0].componentProps.disabled = true
} else if (val == 'delete') { } else if (val == 'delete') {
// //
handleDelete(row.id) handleDelete(row.id)

1
src/views/eam/mold/moldinspectionjob/index.vue

@ -176,7 +176,6 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
// MoldInspectionMain.allSchemas.formSchema[4].value = 'PROCCED';
MoldInspectionMain.allSchemas.formSchema.find((item) => item.field == 'status').value = 'PROCCED'; MoldInspectionMain.allSchemas.formSchema.find((item) => item.field == 'status').value = 'PROCCED';
MoldInspectionMain.allSchemas.formSchema.find((item) => item.field == 'type').value = 'MOLD'; MoldInspectionMain.allSchemas.formSchema.find((item) => item.field == 'type').value = 'MOLD';
openForm('create') openForm('create')

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

@ -16,7 +16,7 @@ const moldList = await MoldAccountsApi.getMoldAccountsNoPage({})
const moldListAll = await MoldAccountsApi.getMoldAccountsAllNoPage({}) const moldListAll = await MoldAccountsApi.getMoldAccountsAllNoPage({})
const moldListByFactory = moldListAll.filter(item => item.factoryAreaNumber == userStore.userSelfInfo.dept.parentId) const moldListByFactory = moldListAll.filter(item => item.factoryAreaNumber == userStore.userSelfInfo.dept.parentId)
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: null })
const engineerList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 2}) const engineerList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 2})
const repairList = await MoldMaintenanceMainApi.getMoldMainTempList('MOLD') const repairList = await MoldMaintenanceMainApi.getMoldMainTempList('MOLD')
// 表单校验 // 表单校验
@ -175,12 +175,12 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
api: () => userList, api: () => userList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.find((account) => account.id == cellValue)?.name return userListAll.find((account) => account.id == cellValue)?.nickname
}, },
search: { search: {
show: true, show: true,
component: 'Select', component: 'Select',
api: () => userList, api: () => dutyUserList,
componentProps: { componentProps: {
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
@ -190,7 +190,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'Select', component: 'Select',
api: () => userList, api: () => dutyUserList,
componentProps: { componentProps: {
disabled: true, disabled: true,
optionsAlias: { optionsAlias: {
@ -350,7 +350,7 @@ export const MoldInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',
initOptions: userList, initOptions: dutyUserList,
multiple:true, multiple:true,
collapseTags:true, collapseTags:true,
collapseTagsTooltip:true, collapseTagsTooltip:true,

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

@ -193,8 +193,6 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { if (val == 'add') {
// //
MoldMaintainOrderMain.allSchemas.formSchema[3].value = 'MOLD'
MoldMaintainOrderMain.allSchemas.formSchema[0].componentProps.disabled = false
openForm('create') openForm('create')
} else if (val == 'import') { } else if (val == 'import') {
// //
@ -259,11 +257,9 @@ const onChange = (field, cur, item) => {
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
MoldMaintainOrderMain.allSchemas.formSchema[0].componentProps.disabled = false
if (val == 'edit') { if (val == 'edit') {
// //
openForm('update', row) openForm('update', row)
MoldMaintainOrderMain.allSchemas.formSchema[0].componentProps.disabled = true
} else if (val == 'delete') { } else if (val == 'delete') {
// //
handleDelete(row.id) handleDelete(row.id)

8
src/views/eam/mold/moldmaintenancejob/index.vue

@ -356,7 +356,7 @@ const butttondata = (row) => {
) )
}), // }), //
defaultButtons.finishOrderBtn({ defaultButtons.finishOrderBtn({
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id && row.hasDetails)
}), // }), //
defaultButtons.pictureBtn({ defaultButtons.pictureBtn({
hide: !(row.filePathList != null && row.filePathList.length > 0) hide: !(row.filePathList != null && row.filePathList.length > 0)
@ -365,8 +365,6 @@ const butttondata = (row) => {
} }
const onChange = (field, cur, item) => { const onChange = (field, cur, item) => {
if (field == 'deviceNumber') { if (field == 'deviceNumber') {
// MoldMaintenanceMain.allSchemas.formSchema[1].componentProps.disabled = true
// MoldMaintenanceMain.allSchemas.formSchema[2].componentProps.disabled = true
formRef.value.formRef.formModel.factoryAreaNumber =String(item.componentProps.options.find((item) => item.number == cur).factoryAreaNumber) formRef.value.formRef.formModel.factoryAreaNumber =String(item.componentProps.options.find((item) => item.number == cur).factoryAreaNumber)
console.log(typeof formRef.value.formRef.formModel.factoryAreaNumber) console.log(typeof formRef.value.formRef.formModel.factoryAreaNumber)
// console.log(item) // console.log(item)
@ -376,7 +374,9 @@ const onChange = (field, cur, item) => {
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
MoldMaintenanceMain.allSchemas.formSchema[0].componentProps.disabled = false MoldMaintenanceMain.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.disabled = false
if (val == 'edit') { if (val == 'edit') {
// //
openForm('update', row) openForm('update', row)

Loading…
Cancel
Save