You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
2.5 KiB
90 lines
2.5 KiB
import request from '@/config/axios'
|
|
|
|
export interface EquipmentAccountsVO {
|
|
id: number
|
|
code: string
|
|
name: string
|
|
specification: string
|
|
type: string
|
|
power: string
|
|
equity: string
|
|
electricMachine: string
|
|
beat: string
|
|
storageLocation: string
|
|
useDept: string
|
|
principal: string
|
|
principalTelephone: string
|
|
status: string
|
|
changeReason: string
|
|
startDate: Date
|
|
supplierCode: string
|
|
purchaseTime: Date
|
|
purchaseDept: string
|
|
purchaser: string
|
|
productionDate: Date
|
|
manufactureCode: string
|
|
equipmentLife: string
|
|
acceptanceDate: Date
|
|
purchasePrice: number
|
|
factoryAreaCode: string
|
|
workshopCode: string
|
|
workshopSectionCode: string
|
|
departmentCode: string
|
|
remark: string
|
|
siteId: string
|
|
available: string
|
|
deletionTime: Date
|
|
deleterId: byte[]
|
|
concurrencyStamp: number
|
|
}
|
|
|
|
// 查询设备台账列表
|
|
export const getEquipmentAccountsPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/eam/device/equipment-accounts/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/eam/device/equipment-accounts/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询设备台账详情
|
|
export const getEquipmentAccounts = async (id: number) => {
|
|
return await request.get({ url: `/eam/device/equipment-accounts/get?id=` + id })
|
|
}
|
|
|
|
// 新增设备台账
|
|
export const createEquipmentAccounts = async (data: EquipmentAccountsVO) => {
|
|
return await request.post({ url: `/eam/device/equipment-accounts/create`, data })
|
|
}
|
|
|
|
// 修改设备台账
|
|
export const updateEquipmentAccounts = async (data: EquipmentAccountsVO) => {
|
|
return await request.put({ url: `/eam/device/equipment-accounts/update`, data })
|
|
}
|
|
|
|
// 删除设备台账
|
|
export const deleteEquipmentAccounts = async (id: number) => {
|
|
return await request.delete({ url: `/eam/device/equipment-accounts/delete?id=` + id })
|
|
}
|
|
|
|
// 导出设备台账 Excel
|
|
export const exportEquipmentAccounts = async (params) => {
|
|
return await request.download({ url: `/eam/device/equipment-accounts/export-excel`, params })
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/eam/device/equipment-accounts/get-import-template' })
|
|
}
|
|
|
|
// 查询设备台账列表
|
|
export const getEquipmentAccountsNoPage = async (params) => {
|
|
return await request.get({ url: `/eam/device/equipment-accounts/noPage`, params })
|
|
}
|
|
|
|
//停用启用
|
|
export const ableEquipmentAccountsMain = async (data: EquipmentAccountsVO) => {
|
|
return await request.post({ url: `/eam/device/equipment-accounts/ables`, data })
|
|
}
|
|
|