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.
79 lines
2.1 KiB
79 lines
2.1 KiB
1 year ago
|
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
|
||
|
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/equipment-accounts/senior', data })
|
||
|
} else {
|
||
|
return await request.get({ url: `/eam/equipment-accounts/page`, params })
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// 查询设备台账详情
|
||
|
export const getEquipmentAccounts = async (id: number) => {
|
||
|
return await request.get({ url: `/eam/equipment-accounts/get?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 新增设备台账
|
||
|
export const createEquipmentAccounts = async (data: EquipmentAccountsVO) => {
|
||
|
return await request.post({ url: `/eam/equipment-accounts/create`, data })
|
||
|
}
|
||
|
|
||
|
// 修改设备台账
|
||
|
export const updateEquipmentAccounts = async (data: EquipmentAccountsVO) => {
|
||
|
return await request.put({ url: `/eam/equipment-accounts/update`, data })
|
||
|
}
|
||
|
|
||
|
// 删除设备台账
|
||
|
export const deleteEquipmentAccounts = async (id: number) => {
|
||
|
return await request.delete({ url: `/eam/equipment-accounts/delete?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 导出设备台账 Excel
|
||
|
export const exportEquipmentAccounts = async (params) => {
|
||
|
return await request.download({ url: `/eam/equipment-accounts/export-excel`, params })
|
||
|
}
|
||
|
|
||
|
// 下载用户导入模板
|
||
|
export const importTemplate = () => {
|
||
|
return request.download({ url: '/eam/equipment-accounts/get-import-template' })
|
||
|
}
|