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. 4
      src/views/eam/device/devicemaintainjob/index.vue
  5. 21
      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. 57
      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 dialogTableObjectRef = ref()
const dialogTableMethodsRef = ref() const dialogTableMethodsRef = ref()
const dialogUploadTitle = ref() const dialogUploadTitle = ref()
const fileDialogUploadData = ref({
filePathList: []
})
const dialogUploadVisible = ref(false) const dialogUploadVisible = ref(false)
const dialogUploadNumber = ref() const dialogUploadNumber = ref()
const dialogUploadBusiCode = ref() const dialogUploadBusiCode = ref()
@ -445,6 +442,9 @@ const imageFormData = ref({
const fileFormData = ref({ const fileFormData = ref({
filePathList: [] filePathList: []
}) })
const fileDialogUploadData = ref({
filePathList: []
})
const subIndex = ref('A') const subIndex = ref('A')
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
const detailLoading = 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) => { const onChange = (field, cur, item) => {
if (field == 'deviceNumber') { 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) 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)

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

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

@ -267,9 +267,7 @@ const buttonTableClick = async (val, row) => {
openForm('turnOrder', row) openForm('turnOrder', row)
} else if (val == 'finishOrder') { } else if (val == 'finishOrder') {
finishOrder(row) finishOrder(row)
} else if (val == 'finishOrder') { }
finishOrder(row)
}
} }
/** 添加/修改操作 */ /** 添加/修改操作 */

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

@ -81,7 +81,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitFormSec" @submitForm="submitFormSec"
@success="submitForm" @success="submitFormSec"
:isSearchTableItem="true" :isSearchTableItem="true"
/> />
@ -146,6 +146,7 @@ import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { selecUserByType } from '@/api/system/dept' import { selecUserByType } from '@/api/system/dept'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as UserApi from '@/api/system/user'
import { emit } from 'process' import { emit } from 'process'
const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE) const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE)
const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value != 'MOLD') const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value != 'MOLD')
@ -401,13 +402,16 @@ const onChangeSec = (field, cur, item,formRefSec) => {
setV['maintenance'] = '' setV['maintenance'] = ''
formRefSec.setValues(setV) formRefSec.setValues(setV)
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance' return item.field == 'maintenance'
}).componentProps.options = res }).componentProps.options = res
}) })
const setV = {} const setV = {}
setV['deviceNumber'] = '' setV['deviceNumber'] = ''
formRefSec.setValues(setV) formRefSec.setValues(setV)
} }
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = false
} }
if (field == 'turnType') { if (field == 'turnType') {
if (cur == '0') { if (cur == '0') {
@ -424,6 +428,9 @@ const onChangeSec = (field, cur, item,formRefSec) => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber' return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true }).componentProps.disabled = true
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = true
} else if (cur == '1') { } else if (cur == '1') {
const setV = {} const setV = {}
setV['deviceNumber'] = newRow.value.deviceNumber setV['deviceNumber'] = newRow.value.deviceNumber
@ -438,6 +445,9 @@ const onChangeSec = (field, cur, item,formRefSec) => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber' return item.field == 'factoryAreaNumber'
}).componentProps.disabled = false }).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 => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber' return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true }).componentProps.disabled = true
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = true
await MoldAccountsApi.getMoldAccountsNoPage({}) await MoldAccountsApi.getMoldAccountsNoPage({})
.then(res => { .then(res => {
moldList.value = res moldList.value = res
@ -672,12 +685,10 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
formRefSec.value.dialogVisible = false
// //
getList() getList()
} finally { } finally {
formRef.value.formLoading = false 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[]>([ 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: '里程碑阶段', label: '里程碑阶段',
field: 'milestoneStage', field: 'milestoneStage',

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

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

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

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

Loading…
Cancel
Save