Browse Source

测试bug修复

master
ljlong_2630 8 months ago
parent
commit
1326e6cbc8
  1. 6
      src/components/Detail/src/DetailDeviceLedger.vue
  2. 2
      src/views/eam/device/deviceSpotInspectionRecordMain/index.vue
  3. 3
      src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts
  4. 2
      src/views/eam/device/devicemaintainjob/index.vue
  5. 17
      src/views/eam/device/devicemaintenancejob/index.vue
  6. 21
      src/views/eam/mold/moldAccounts/moldAccounts.data.ts
  7. 3
      src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts
  8. 45
      src/views/eam/mold/moldmaintenancejob/index.vue

6
src/components/Detail/src/DetailDeviceLedger.vue

@ -235,9 +235,6 @@ const dialogAllSchemasRef = ref()
const dialogTableObjectRef = ref()
const dialogTableMethodsRef = ref()
const dialogUploadTitle = ref()
const fileDialogUploadData = ref({
filePathList: []
})
const dialogUploadVisible = ref(false)
const dialogUploadNumber = ref()
const dialogUploadBusiCode = ref()
@ -445,6 +442,9 @@ const imageFormData = ref({
const fileFormData = ref({
filePathList: []
})
const fileDialogUploadData = ref({
filePathList: []
})
const subIndex = ref('A')
const isShowDrawer = ref(false)
const detailLoading = ref(false)

2
src/views/eam/device/deviceSpotInspectionRecordMain/index.vue

@ -249,8 +249,6 @@ const butttondata = (row) => {
}
const onChange = (field, cur, item) => {
if (field == 'deviceNumber') {
// DeviceSpotInspectionRecordMain.allSchemas.formSchema[1].componentProps.disabled = true
// DeviceSpotInspectionRecordMain.allSchemas.formSchema[2].componentProps.disabled = true
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(item)

3
src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts

@ -100,7 +100,6 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
return factoryList.find((account) => account.id == cellValue)?.name
},
search: {
show: true,
component: 'Select',
api: () => factoryList,
componentProps: {
@ -138,7 +137,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
search: {
show: true,
component: 'Select',
api: () => deviceList,
api: () => deviceListAll,
componentProps: {
optionsAlias: {
labelField: 'name',

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

@ -267,8 +267,6 @@ const buttonTableClick = async (val, row) => {
openForm('turnOrder', row)
} else if (val == 'finishOrder') {
finishOrder(row)
} else if (val == 'finishOrder') {
finishOrder(row)
}
}

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

@ -81,7 +81,7 @@
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitFormSec"
@success="submitForm"
@success="submitFormSec"
:isSearchTableItem="true"
/>
@ -146,6 +146,7 @@ import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts'
import { useUserStore } from '@/store/modules/user'
import { selecUserByType } from '@/api/system/dept'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as UserApi from '@/api/system/user'
import { emit } from 'process'
const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE)
const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value != 'MOLD')
@ -408,6 +409,9 @@ const onChangeSec = (field, cur, item,formRefSec) => {
setV['deviceNumber'] = ''
formRefSec.setValues(setV)
}
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = false
}
if (field == 'turnType') {
if (cur == '0') {
@ -424,6 +428,9 @@ const onChangeSec = (field, cur, item,formRefSec) => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = true
} else if (cur == '1') {
const setV = {}
setV['deviceNumber'] = newRow.value.deviceNumber
@ -438,6 +445,9 @@ const onChangeSec = (field, cur, item,formRefSec) => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber'
}).componentProps.disabled = false
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = false
}
}
@ -508,6 +518,9 @@ const openFormSec = async (type: string, row?: any) => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = true
await MoldAccountsApi.getMoldAccountsNoPage({})
.then(res => {
moldList.value = res
@ -672,12 +685,10 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
formRefSec.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
formRefSec.value.formLoading = false
}
}

21
src/views/eam/mold/moldAccounts/moldAccounts.data.ts

@ -255,27 +255,6 @@ export const MoldMilestoneRules = reactive({
export const MoldMilestone = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '编号唯一标识',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '模具编号',
field: 'moldNumber',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '里程碑阶段',
field: 'milestoneStage',

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

@ -99,7 +99,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
search: {
show: true,
component: 'Select',
api: () => moldList,
api: () => moldListAll,
componentProps: {
optionsAlias: {
labelField: 'name',
@ -132,7 +132,6 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
return factoryList.find((account) => account.id == cellValue)?.name
},
search: {
show: true,
component: 'Select',
api: () => factoryList,
componentProps: {

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

@ -81,7 +81,7 @@
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitFormSec"
@success="submitForm"
@success="submitFormSec"
:isSearchTableItem="true"
/>
@ -148,7 +148,7 @@ import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts'
import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts'
const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE)
const moldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'MOLD')
const userListAll = await UserApi.getSimpleUserList()
defineOptions({ name: 'MoldMaintenanceMain' })
const message = useMessage() //
const { t } = useI18n() //
@ -408,9 +408,14 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const openForm = (type: string, row?: any) => {
const openForm = async (type: string, row?: any) => {
await MoldAccountsApi.getMoldAccountsNoPage({}).then(res => {
MoldMaintenanceMain.allSchemas.formSchema.find(item => {
return item.field === 'deviceNumber'
}).componentProps.options = res
tableData.value = [] //
formRef.value.open(type, row)
})
}
/** 详情操作 */
@ -680,6 +685,9 @@ const openFormSec = async (type: string, row?: any) => {
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = true
await MoldAccountsApi.getMoldAccountsNoPage({})
.then(res => {
moldList.value = res
@ -740,6 +748,9 @@ const onChangeSec = (field, cur, item,formRefSec) => {
setV['deviceNumber'] = ''
formRefSec.setValues(setV)
}
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = false
}
if (field == 'turnType') {
if (cur == '0') {
@ -756,6 +767,9 @@ const onChangeSec = (field, cur, item,formRefSec) => {
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = true
} else if (cur == '1') {
const setV = {}
setV['deviceNumber'] = newRow.value.deviceNumber
@ -770,6 +784,9 @@ const onChangeSec = (field, cur, item,formRefSec) => {
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber'
}).componentProps.disabled = false
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = false
}
}
@ -789,25 +806,17 @@ const onChangeSec = (field, cur, item,formRefSec) => {
//
const submitFormSec = async (formType, data) => {
data.subList = tableData.value.map((item) => {
return {
describes: item.describes,
describes1: item.describes1,
itemNumbers: item.itemNumbers,
maintenances: item.maintenances.join(','),
workOut: item.workOut,
factoryAreaNumber: newRow.value.factoryAreaNumber,
const data1 = {
status: data.turnType,
deviceNumber: data.deviceNumber,
type: data.type,
maintenance: data.maintenance,
id: data.id
}
}) //
console.log(data.subList)
try {
if (formType === 'create') {
await DeviceMaintenanceMainApi.createDeviceMaintenanceMain(data)
message.success(t('common.createSuccess'))
} else {
await DeviceMaintenanceMainApi.updateDeviceMaintenanceMain(data)
await MoldMaintenanceMainApi.orderTurnTo(data1)
message.success(t('common.updateSuccess'))
}
formRefSec.value.dialogVisible = false
//
getList()

Loading…
Cancel
Save