Browse Source

保修维修bug修复

master
ljlong_2630 7 months ago
parent
commit
5035645dcc
  1. 2
      src/api/eam/device/deviceAccounts/index.ts
  2. 1
      src/api/eam/device/deviceMaintenanceMain/index.ts
  3. 1
      src/api/eam/device/deviceRepair/index.ts
  4. 1
      src/api/eam/device/techMaintenanceMain/index.ts
  5. 1
      src/api/eam/device/techRepair/index.ts
  6. 1
      src/api/eam/mold/moldMaintenanceMain/index.ts
  7. 1
      src/api/eam/mold/moldRepair/index.ts
  8. 27
      src/views/eam/device/deviceRepair/deviceRepair.data.ts
  9. 59
      src/views/eam/device/deviceRepair/index.vue
  10. 4
      src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts
  11. 59
      src/views/eam/device/techRepair/index.vue
  12. 29
      src/views/eam/device/techRepair/techRepair.data.ts
  13. 15
      src/views/eam/device/techmaintenancejob/techMaintenanceMain.data.ts
  14. 63
      src/views/eam/mold/moldRepair/index.vue
  15. 50
      src/views/eam/mold/moldRepair/moldRepair.data.ts
  16. 6
      src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

2
src/api/eam/device/deviceAccounts/index.ts

@ -13,6 +13,7 @@ export interface DeviceAccountsVO {
productionDate: Date
purchasePrice: number
siteId: string
status: string
available: string
concurrencyStamp: number
}
@ -70,3 +71,4 @@ export const getDeviceAccountsAllNoPage = async (data: DeviceAccountsVO) => {
return await request.post({ url: `/eam/device-accounts/noPage`,data })
}

1
src/api/eam/device/deviceMaintenanceMain/index.ts

@ -18,7 +18,6 @@ export interface DeviceMaintenanceMainVO {
// 查询设备维修工单主列表
export const getDeviceMaintenanceMainPage = async (params) => {
params.type = 'DEVICE'
if (params.isSearch) {
delete params.isSearch
const data = {...params}

1
src/api/eam/device/deviceRepair/index.ts

@ -17,7 +17,6 @@ export interface DeviceRepairVO {
// 查询报修申请列表
export const getDeviceRepairPage = async (params) => {
params.type = 'DEVICE'
if (params.isSearch) {
delete params.isSearch
const data = { ...params }

1
src/api/eam/device/techMaintenanceMain/index.ts

@ -18,7 +18,6 @@ export interface DeviceMaintenanceMainVO {
// 查询工艺维修工单主列表
export const getTechMaintenanceMainPage = async (params) => {
params.type = 'TECH'
if (params.isSearch) {
delete params.isSearch
const data = {...params}

1
src/api/eam/device/techRepair/index.ts

@ -17,7 +17,6 @@ export interface DeviceRepairVO {
// 查询报修申请列表
export const getDeviceRepairPage = async (params) => {
params.type = 'TECH'
if (params.isSearch) {
delete params.isSearch
const data = { ...params }

1
src/api/eam/mold/moldMaintenanceMain/index.ts

@ -18,7 +18,6 @@ export interface MoldMaintenanceMainVO {
// 查询维修工单主列表
export const getMoldMaintenanceMainPage = async (params) => {
params.type = 'MOLD'
if (params.isSearch) {
delete params.isSearch
const data = {...params}

1
src/api/eam/mold/moldRepair/index.ts

@ -16,7 +16,6 @@ export interface MoldRepairVO {
// 查询报修申请列表
export const getMoldRepairPage = async (params) => {
params.type = 'MOLD'
if (params.isSearch) {
delete params.isSearch
const data = { ...params }

27
src/views/eam/device/deviceRepair/deviceRepair.data.ts

@ -72,16 +72,6 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
valueField: 'id'
},
filterable: true,
onChange: (val) => {
DeviceAccountsApi.getDeviceAccountsNoPage({
isSearch: false,
factoryAreaNumber: val
}).then((res) => {
deviceList.value = res
}).catch((e) => {
console.log(e)
})
}
},
}
},
@ -96,10 +86,23 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
},
isSearch: true,
search: {
component: 'Select',
componentProps: {
options: deviceMoldTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
// disabled: true,
filterable: true,
placeholder: "请选择类型"
}
},
form: {
component: 'Select',
componentProps: {
options: deviceTypeList,
options: deviceMoldTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
@ -138,7 +141,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'Select',
componentProps: {
options: deviceList,
options: deviceListNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'number'

59
src/views/eam/device/deviceRepair/index.vue

@ -66,6 +66,7 @@ import { DeviceRepair, DeviceRepairRules } from './deviceRepair.data'
import * as DeviceRepairApi from '@/api/eam/device/deviceRepair'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as DeviceAccountApi from '@/api/eam/device/deviceAccounts'
import * as MoldAccountApi from '@/api/eam/mold/moldAccounts'
import { DeviceAccounts } from '../deviceAccounts/deviceAccounts.data'
import { useUserStore } from '@/store/modules/user'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
@ -88,7 +89,8 @@ const urls = ref([])
const viewKey = ref(0)
routeName.value = route.name
const tableColumns = ref(DeviceRepair.allSchemas.tableColumns)
const factoryAreaNumber = ref('');
const type = ref('');
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
@ -308,6 +310,61 @@ const onChange = (field, cur, item,formRef) => {
setV['deviceNumber'] = ''
formRef.setValues(setV)
})
factoryAreaNumber.value = cur
if(type.value != 'MOLD'){
DeviceAccountApi.getDeviceAccountsAllNoPage({
factoryAreaNumber: cur,
type: type.value,
status: '0'
}).then((res) => {
DeviceRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}else{
MoldAccountApi.getMoldAccountsAllNoPage({
factoryAreaNumber: cur,
type: type.value,
status: '0'
}).then((res) => {
DeviceRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}
}
if (field == 'type') {
nextTick(() => {
const setV = {}
setV['deviceNumber'] = ''
formRef.setValues(setV)
})
type.value = cur
if(cur != 'MOLD'){
type.value = 'DEVICE'
DeviceAccountApi.getDeviceAccountsAllNoPage({
factoryAreaNumber: factoryAreaNumber.value,
type: 'DEVICE',
status: '0'
}).then((res) => {
DeviceRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}else{
type.value = 'MOLD'
MoldAccountApi.getMoldAccountsAllNoPage({
factoryAreaNumber: factoryAreaNumber.value,
type: 'MOLD',
status: '0'
}).then((res) => {
DeviceRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}
}
// if (field == 'factoryAreaNumber') {

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

@ -705,7 +705,9 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'label',
valueField: 'value'
},
disabled: false,
filterable: true,
placeholder: "请选择类型"
},
},
form: {
@ -717,7 +719,7 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
valueField: 'value'
},
filterable: true,
placeholder: "请选择设备"
placeholder: "请选择类型"
}
},
},

59
src/views/eam/device/techRepair/index.vue

@ -66,6 +66,7 @@ import { DeviceRepair, DeviceRepairRules } from './techRepair.data'
import * as DeviceRepairApi from '@/api/eam/device/techRepair'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as DeviceAccountApi from '@/api/eam/device/deviceAccounts'
import * as MoldAccountApi from '@/api/eam/mold/moldAccounts'
import { DeviceAccounts } from '../deviceAccounts/deviceAccounts.data'
import { useUserStore } from '@/store/modules/user'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
@ -88,7 +89,8 @@ const urls = ref([])
const viewKey = ref(0)
routeName.value = route.name
const tableColumns = ref(DeviceRepair.allSchemas.tableColumns)
const factoryAreaNumber = ref('');
const type = ref('');
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
@ -308,6 +310,61 @@ const onChange = (field, cur, item,formRef) => {
setV['deviceNumber'] = ''
formRef.setValues(setV)
})
factoryAreaNumber.value = cur
if(type.value != 'MOLD'){
DeviceAccountApi.getDeviceAccountsAllNoPage({
factoryAreaNumber: cur,
type: type.value,
status: '0'
}).then((res) => {
DeviceRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}else{
MoldAccountApi.getMoldAccountsAllNoPage({
factoryAreaNumber: cur,
type: type.value,
status: '0'
}).then((res) => {
DeviceRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}
}
if (field == 'type') {
nextTick(() => {
const setV = {}
setV['deviceNumber'] = ''
formRef.setValues(setV)
})
type.value = cur
if(cur != 'MOLD'){
type.value = 'DEVICE'
DeviceAccountApi.getDeviceAccountsAllNoPage({
factoryAreaNumber: factoryAreaNumber.value,
type: 'DEVICE',
status: '0'
}).then((res) => {
DeviceRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}else{
type.value = 'MOLD'
MoldAccountApi.getMoldAccountsAllNoPage({
factoryAreaNumber: factoryAreaNumber.value,
type: 'MOLD',
status: '0'
}).then((res) => {
DeviceRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}
}
// if (field == 'factoryAreaNumber') {

29
src/views/eam/device/techRepair/techRepair.data.ts

@ -72,16 +72,6 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
valueField: 'id'
},
filterable: true,
onChange: (val) => {
DeviceAccountsApi.getDeviceAccountsNoPage({
isSearch: false,
factoryAreaNumber: val
}).then((res) => {
deviceList.value = res
}).catch((e) => {
console.log(e)
})
}
},
}
},
@ -96,17 +86,30 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
},
isSearch: true,
search: {
component: 'Select',
componentProps: {
options: deviceMoldTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
// disabled: true,
filterable: true,
placeholder: "请选择类型"
}
},
form: {
component: 'Select',
componentProps: {
options: deviceTypeList,
options: deviceMoldTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
// disabled: true,
filterable: true,
placeholder: "请选择设备"
placeholder: "请选择类型"
}
},
},
@ -138,7 +141,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'Select',
componentProps: {
options: deviceList,
options: deviceListNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'number'

15
src/views/eam/device/techmaintenancejob/techMaintenanceMain.data.ts

@ -215,7 +215,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
},
// dictType: DICT_TYPE.APP_DEVICE_MOLD_TYPE,
isSearch: false,
isSearch: true,
form: {
component: 'Select',
componentProps: {
@ -229,6 +229,19 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
placeholder: "请选择设备"
},
},
search: {
component: 'Select',
componentProps: {
options: deviceMoldTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
disabled: false,
filterable: true,
placeholder: "请选择设备"
},
},
},
{
label: '类型',

63
src/views/eam/mold/moldRepair/index.vue

@ -64,7 +64,8 @@ import download from '@/utils/download'
import { MoldRepair, MoldRepairRules } from './moldRepair.data'
import * as MoldRepairApi from '@/api/eam/mold/moldRepair'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as MoldAccountApi from '@/api/eam/mold/moldAccount'
import * as MoldAccountApi from '@/api/eam/mold/moldAccounts'
import * as DeviceAccountApi from '@/api/eam/device/deviceAccounts'
defineOptions({ name: 'MoldRepair' })
@ -80,6 +81,8 @@ const viewKey = ref(0)
routeName.value = route.name
const tableColumns = ref(MoldRepair.allSchemas.tableColumns)
const factoryAreaNumber = ref('');
const type = ref('');
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
@ -182,7 +185,6 @@ const formsSuccess = async (formType, data) => {
}
if (data.activeTime == 0) data.activeTime = null;
if (data.expireTime == 0) data.expireTime = null;
data.type = 'MOLD';
data.result = 'PENDING';
if (data.upload != null && data.upload != "") {
data.filePathList = data?.upload?.map((item: any) => {
@ -289,13 +291,68 @@ onMounted(async () => {
importTemplateData.templateUrl = await MoldRepairApi.importTemplate()
})
const onChange = (field, cur, item, formRef) => {
const onChange = (field, cur, item,formRef) => {
if (field == 'factoryAreaNumber') {
nextTick(() => {
const setV = {}
setV['deviceNumber'] = ''
formRef.setValues(setV)
})
factoryAreaNumber.value = cur
if(type.value != 'MOLD'){
DeviceAccountApi.getDeviceAccountsAllNoPage({
factoryAreaNumber: cur,
type: type.value,
status: '0'
}).then((res) => {
MoldRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}else{
MoldAccountApi.getMoldAccountsAllNoPage({
factoryAreaNumber: cur,
type: type.value,
status: '0'
}).then((res) => {
MoldRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}
}
if (field == 'type') {
nextTick(() => {
const setV = {}
setV['deviceNumber'] = ''
formRef.setValues(setV)
})
if(cur != 'MOLD'){
type.value = 'DEVICE'
DeviceAccountApi.getDeviceAccountsAllNoPage({
factoryAreaNumber: factoryAreaNumber.value,
type: 'DEVICE',
status: '0'
}).then((res) => {
MoldRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}else{
type.value = 'MOLD'
MoldAccountApi.getMoldAccountsAllNoPage({
factoryAreaNumber: factoryAreaNumber.value,
type: 'MOLD',
status: '0'
}).then((res) => {
MoldRepair.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = res
})
}
}
}

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

@ -2,9 +2,11 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { selectAllFactoryArea } from '@/api/system/dept'
import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { validateHanset,validateNumDot, validateEmail } from '@/utils/validator'
import * as UserApi from '@/api/system/user'
const userListAll = await UserApi.getSimpleUserList()
const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE)
// 邮箱账号的列表
@ -73,19 +75,47 @@ export const MoldRepair = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
onChange: (val) => {
MoldAccountsApi.getMoldAccountsNoPage({
isSearch: false,
factoryAreaNumber: val
}).then((res) => {
moldList.value = res
}).catch((e) => {
console.log(e)
})
},
}
},
{
label: '类型',
field: 'type',
sort: 'custom',
table: {
width: '150',
},
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
},
isSearch: true,
search: {
component: 'Select',
componentProps: {
options: deviceMoldTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
// disabled: true,
filterable: true,
placeholder: "请选择类型"
}
},
form: {
component: 'Select',
componentProps: {
options: deviceMoldTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
// disabled: true,
filterable: true,
placeholder: "请选择类型"
}
},
},
{
label: '模具',
field: 'deviceNumber',
@ -101,7 +131,7 @@ export const MoldRepair = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'Select',
componentProps: {
options: moldList,
options: moldListNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'number'

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

@ -116,16 +116,18 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
},
isSearch: false,
isSearch: true,
search: {
component: 'Select',
componentProps: {
options: deviceTypeList,
options: deviceMoldTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
disabled: false,
filterable: true,
placeholder: "请选择类型"
},
},
form: {

Loading…
Cancel
Save