Browse Source

BUG修改

master
parent
commit
f64c2fe9d2
  1. 5
      src/api/eam/basic/deviceMaintenance/index.ts
  2. 61
      src/api/eam/basic/inspection/index.ts
  3. 5
      src/api/eam/basic/moldMaintenance/index.ts
  4. 5
      src/api/eam/item/itemAccounts/index.ts
  5. 4
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  6. 4
      src/views/eam/basic/inspection/index.vue
  7. 8
      src/views/eam/basic/inspection/inspection.data.ts
  8. 3
      src/views/eam/basic/item/index.vue
  9. 76
      src/views/eam/item/itemAccounts/index.vue
  10. 18
      src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

5
src/api/eam/basic/deviceMaintenance/index.ts

@ -13,6 +13,7 @@ export interface DeviceMoldItemsVO {
// 查询项记录表(设备 模具 保养 维修 巡检点检)列表
export const getDeviceMoldItemsPage = async (params) => {
params.type="DEVICE"
params.status="MAINTAIN"
if (params.isSearch) {
delete params.isSearch
const data = {...params}
@ -35,11 +36,15 @@ export const getNumber = async (params) => {
// 新增项记录表(设备 模具 保养 维修 巡检点检)
export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="DEVICE"
data.status="MAINTAIN"
return await request.post({ url: `/eam/device-mold-items/create`, data })
}
// 修改项记录表(设备 模具 保养 维修 巡检点检)
export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="DEVICE"
data.status="MAINTAIN"
return await request.put({ url: `/eam/device-mold-items/update`, data })
}

61
src/api/eam/basic/inspection/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface DeviceMoldItemsVO {
name: string
deviceNumber: string
type: "DEVICE"
status: string
siteId: string
available: string
concurrencyStamp: number
}
// 查询项记录表(设备 模具 保养 维修 巡检点检)列表
export const getDeviceMoldItemsPage = async (params) => {
params.type="DEVICE"
params.status="INSPECTION"
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/device-mold-items/senior', data })
} else {
return await request.get({ url: `/eam/device-mold-items/page`, params })
}
}
// 查询项记录表(设备 模具 保养 维修 巡检点检)详情
export const getDeviceMoldItems = async (id: number) => {
return await request.get({ url: `/eam/device-mold-items/get?id=` + id })
}
// 查询供应商发票申请主详情
export const getNumber = async (params) => {
return await request.get({ url: `/eam/device-mold-items/getNumber`, params})
}
// 新增项记录表(设备 模具 保养 维修 巡检点检)
export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="DEVICE"
data.status="INSPECTION"
return await request.post({ url: `/eam/device-mold-items/create`, data })
}
// 修改项记录表(设备 模具 保养 维修 巡检点检)
export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="DEVICE"
data.status="INSPECTION"
return await request.put({ url: `/eam/device-mold-items/update`, data })
}
// 删除项记录表(设备 模具 保养 维修 巡检点检)
export const deleteDeviceMoldItems = async (id: number) => {
return await request.delete({ url: `/eam/device-mold-items/delete?id=` + id })
}
// 导出项记录表(设备 模具 保养 维修 巡检点检) Excel
export const exportDeviceMoldItems = async (params) => {
return await request.download({ url: `/eam/device-mold-items/export-excel`, params })
}

5
src/api/eam/basic/moldMaintenance/index.ts

@ -13,6 +13,7 @@ export interface DeviceMoldItemsVO {
// 查询项记录表(设备 模具 保养 维修 巡检点检)列表
export const getDeviceMoldItemsPage = async (params) => {
params.type="MOLD"
params.status="MAINTAIN"
if (params.isSearch) {
delete params.isSearch
const data = {...params}
@ -35,11 +36,15 @@ export const getNumber = async (params) => {
// 新增项记录表(设备 模具 保养 维修 巡检点检)
export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="MOLD"
data.status="MAINTAIN"
return await request.post({ url: `/eam/device-mold-items/create`, data })
}
// 修改项记录表(设备 模具 保养 维修 巡检点检)
export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="MOLD"
data.status="MAINTAIN"
return await request.put({ url: `/eam/device-mold-items/update`, data })
}

5
src/api/eam/item/itemAccounts/index.ts

@ -50,3 +50,8 @@ export const exportItemAccounts = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/eam/item-accounts/get-import-template' })
}
// 更改备件库位
export const createDeviceItemBatch = async (data: Array<DeviceItemVO>) => {
return await request.post({url: `/rel/device-item/createBatch `, data });
};

4
src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts

@ -113,7 +113,7 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '人数',
field: 'peopleNum',
field: 'peoples',
sort: 'custom',
isSearch: false,
table: {
@ -125,7 +125,7 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '保养所需时间(h)',
field: 'maintenanceTime',
field: 'estimatedMinutes',
sort: 'custom',
isSearch: false,
table: {

4
src/views/eam/basic/inspection/index.vue

@ -57,8 +57,8 @@
<script setup lang="ts">
import download from '@/utils/download'
import { DeviceMoldItems,DeviceMoldItemsRules } from './deviceMoldItems.data'
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance'
import { DeviceMoldItems,DeviceMoldItemsRules } from './inspection.data'
import * as DeviceMoldItemsApi from '@/api/eam/basic/inspection'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

8
src/views/eam/basic/inspection/deviceMoldItems.data.ts → src/views/eam/basic/inspection/inspection.data.ts

@ -42,7 +42,6 @@ export const DeviceMoldItems = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
},
{
label: '类型',
field: 'type',
@ -51,8 +50,11 @@ export const DeviceMoldItems = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
form: {
component: 'Select'
},
value: 'DEVICE',
componentProps: {
disabled: true,
}
}
},
{
label: '设备/模具编号',

3
src/views/eam/basic/item/index.vue

@ -146,9 +146,6 @@
null
)
}
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map(element => ({
itemNumber: itemNumber.value,

76
src/views/eam/item/itemAccounts/index.vue

@ -61,6 +61,8 @@
import download from '@/utils/download'
import { ItemAccounts,ItemAccountsRules } from './itemAccounts.data'
import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
import { Item } from '@/views/eam/basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -70,9 +72,9 @@ defineOptions({ name: 'ItemAccounts' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
const locationNumber = ref()
routeName.value = route.name
const tableColumns = ref(ItemAccounts.allSchemas.tableColumns)
@ -134,6 +136,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:itemAccounts:update'}), //
defaultButtons.selectItemBtn(null), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemAccounts:delete'}), //
]
@ -143,6 +146,77 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'selectItem') {
openItem(row.locationNumber)
}
}
const searchTableRef = ref()
/** 绑定备件操作 */
const openItem = async (number: String) => {
locationNumber.value = number
searchTableRef.value.open(
'选择备件',
Item.allSchemas,
getDeviceItemList,
null,
Item.allSchemas.searchSchema,
true,
null,
null,
null,
null
)
}
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map((element) => ({
locationNumber: locationNumber.value,
itemNumber: element.number
}))
createDeviceItemBatch(deviceItemRelList).then((res) => {
console.log('res', res)
})
console.log('deviceItemRelList', deviceItemRelList)
}
const getItemWithOutBind = async () => {
try {
const res = await ItemApi.getItemPage({
...Item.allSchemas.searchSchema
})
if (res.list?.length > 0) {
// const response = await getDeviceItemPage(DeviceAccounts.allSchemas.searchSchema);
// const filteredList = res.list.filter(item => {
// return !response.list?.some(element => {
// return item.number === element.itemNumber
// });
// });
// console.log('filteredList',filteredList);
const filteredList = res.list
return filteredList //
}
return [] //
} catch (error) {
console.error(error)
throw error //
}
}
// getListApi getItemWithOutBind
const getDeviceItemList = async () => {
tableObject.loading = true
try {
const res = await getItemWithOutBind()
let result = {
list: res,
total: res.length
}
return result
} catch (error) {
console.error(error)
} finally {
tableObject.loading = false
}
}

18
src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

@ -20,6 +20,19 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
},
// {
// label: '日期',
// field: 'date',
// sort: 'custom',
// formatter: dateFormatter,
// form: {
// component: 'DatePicker',
// componentProps: {
// type: 'datetime',
// valueFormat: 'x'
// }
// },
// },
{
label: '日期',
field: 'date',
@ -28,10 +41,13 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
type: 'date',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD'
}
},
{
label: '电话',

Loading…
Cancel
Save