ljlong_2630
5 months ago
471 changed files with 24088 additions and 7425 deletions
@ -1,43 +0,0 @@ |
|||
# wms海拉长春生产环境 |
|||
NODE_ENV=production |
|||
|
|||
VITE_DEV=false |
|||
|
|||
# 请求路径 |
|||
VITE_BASE_URL='http://172.21.32.13/api' |
|||
|
|||
# 上传路径 |
|||
VITE_UPLOAD_URL='http://172.21.32.13/api/admin-api/infra/file/upload' |
|||
|
|||
# 接口前缀 |
|||
VITE_API_BASEPATH= |
|||
|
|||
# 接口地址 |
|||
VITE_API_URL=/admin-api |
|||
|
|||
# 是否删除debugger |
|||
VITE_DROP_DEBUGGER=true |
|||
|
|||
# 是否删除console.log |
|||
VITE_DROP_CONSOLE=true |
|||
|
|||
# 是否sourcemap |
|||
VITE_SOURCEMAP=false |
|||
|
|||
# 打包路径 |
|||
VITE_BASE_PATH=/ |
|||
|
|||
# 输出路径 |
|||
VITE_OUT_DIR=sfms3.0-ui |
|||
|
|||
# 自定义接口路径 |
|||
VITE_INTERFACE_URL='http://172.21.32.13:90/magic/web/index.html' |
|||
|
|||
# 积木报表请求路径 |
|||
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' |
|||
|
|||
# 租户配置 |
|||
VITE_TENANT='["长春"]' |
|||
|
|||
# 查看质检报告环境 |
|||
VITE_REPORT_URL = 'https://scp.faway-hella.com' |
@ -1,43 +0,0 @@ |
|||
# wms海拉长春测试环境 |
|||
NODE_ENV=production |
|||
|
|||
VITE_DEV=false |
|||
|
|||
# 请求路径 |
|||
VITE_BASE_URL='http://172.21.32.14/api' |
|||
|
|||
# 上传路径 |
|||
VITE_UPLOAD_URL='http://172.21.32.14/api/admin-api/infra/file/upload' |
|||
|
|||
# 接口前缀 |
|||
VITE_API_BASEPATH= |
|||
|
|||
# 接口地址 |
|||
VITE_API_URL=/admin-api |
|||
|
|||
# 是否删除debugger |
|||
VITE_DROP_DEBUGGER=true |
|||
|
|||
# 是否删除console.log |
|||
VITE_DROP_CONSOLE=true |
|||
|
|||
# 是否sourcemap |
|||
VITE_SOURCEMAP=false |
|||
|
|||
# 打包路径 |
|||
VITE_BASE_PATH=/ |
|||
|
|||
# 输出路径 |
|||
VITE_OUT_DIR=sfms3.0-ui |
|||
|
|||
# 自定义接口路径 |
|||
VITE_INTERFACE_URL='http://172.21.32.14:90/magic/web/index.html' |
|||
|
|||
# 积木报表请求路径 |
|||
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' |
|||
|
|||
# 租户配置 |
|||
VITE_TENANT='["长春"]' |
|||
|
|||
# 查看质检报告环境 |
|||
VITE_REPORT_URL = 'https://scptest.faway-hella.com' |
@ -1,40 +0,0 @@ |
|||
# scp海拉长春测试环境 |
|||
NODE_ENV=production |
|||
|
|||
VITE_DEV=false |
|||
|
|||
# 请求路径 |
|||
VITE_BASE_URL='https://scptest.faway-hella.com/api' |
|||
|
|||
# 上传路径 |
|||
VITE_UPLOAD_URL='https://scptest.faway-hella.com/api/admin-api/infra/file/upload' |
|||
|
|||
# 接口前缀 |
|||
VITE_API_BASEPATH= |
|||
|
|||
# 接口地址 |
|||
VITE_API_URL=/admin-api |
|||
|
|||
# 是否删除debugger |
|||
VITE_DROP_DEBUGGER=true |
|||
|
|||
# 是否删除console.log |
|||
VITE_DROP_CONSOLE=true |
|||
|
|||
# 是否sourcemap |
|||
VITE_SOURCEMAP=false |
|||
|
|||
# 打包路径 |
|||
VITE_BASE_PATH=/ |
|||
|
|||
# 输出路径 |
|||
VITE_OUT_DIR=sfms3.0-ui |
|||
|
|||
# 自定义接口路径 |
|||
VITE_INTERFACE_URL='https://scptest.faway-hella.com/magic/web/index.html' |
|||
|
|||
# 积木报表请求路径 |
|||
VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com' |
|||
|
|||
# 租户配置 |
|||
VITE_TENANT='["长春","成都"]' |
@ -1,44 +0,0 @@ |
|||
# wms海拉成都生产环境 |
|||
NODE_ENV=production |
|||
|
|||
VITE_DEV=false |
|||
|
|||
# 请求路径 |
|||
VITE_BASE_URL='http://172.22.32.8/api' |
|||
|
|||
# 上传路径 |
|||
VITE_UPLOAD_URL='http://172.22.32.8/api/admin-api/infra/file/upload' |
|||
|
|||
# 接口前缀 |
|||
VITE_API_BASEPATH= |
|||
|
|||
# 接口地址 |
|||
VITE_API_URL=/admin-api |
|||
|
|||
# 是否删除debugger |
|||
VITE_DROP_DEBUGGER=true |
|||
|
|||
# 是否删除console.log |
|||
VITE_DROP_CONSOLE=true |
|||
|
|||
# 是否sourcemap |
|||
VITE_SOURCEMAP=false |
|||
|
|||
# 打包路径 |
|||
VITE_BASE_PATH=/ |
|||
|
|||
# 输出路径 |
|||
VITE_OUT_DIR=sfms3.0-ui |
|||
|
|||
# 自定义接口路径 |
|||
VITE_INTERFACE_URL='http://172.22.32.8:90/magic/web/index.html' |
|||
|
|||
# 积木报表请求路径 |
|||
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' |
|||
|
|||
|
|||
# 租户配置 |
|||
VITE_TENANT='["成都"]' |
|||
|
|||
# 查看质检报告环境 |
|||
VITE_REPORT_URL = 'https://scp.faway-hella.com' |
@ -1,43 +0,0 @@ |
|||
# wms海拉成都测试环境 |
|||
NODE_ENV=production |
|||
|
|||
VITE_DEV=false |
|||
|
|||
# 请求路径 |
|||
VITE_BASE_URL='http://172.22.32.9/api' |
|||
|
|||
# 上传路径 |
|||
VITE_UPLOAD_URL='http://172.22.32.9/api/admin-api/infra/file/upload' |
|||
|
|||
# 接口前缀 |
|||
VITE_API_BASEPATH= |
|||
|
|||
# 接口地址 |
|||
VITE_API_URL=/admin-api |
|||
|
|||
# 是否删除debugger |
|||
VITE_DROP_DEBUGGER=true |
|||
|
|||
# 是否删除console.log |
|||
VITE_DROP_CONSOLE=true |
|||
|
|||
# 是否sourcemap |
|||
VITE_SOURCEMAP=false |
|||
|
|||
# 打包路径 |
|||
VITE_BASE_PATH=/ |
|||
|
|||
# 输出路径 |
|||
VITE_OUT_DIR=sfms3.0-ui |
|||
|
|||
# 自定义接口路径 |
|||
VITE_INTERFACE_URL='http://172.22.32.9:90/magic/web/index.html' |
|||
|
|||
# 积木报表请求路径 |
|||
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' |
|||
|
|||
# 租户配置 |
|||
VITE_TENANT='["成都"]' |
|||
|
|||
# 查看质检报告环境 |
|||
VITE_REPORT_URL = 'https://scptest.faway-hella.com' |
@ -0,0 +1,14 @@ |
|||
let systemConfig = { |
|||
// 请求路径
|
|||
baseUrl: 'http://172.22.32.8/api', |
|||
// 上传路径
|
|||
uploadUrl: 'http://172.22.32.8/api/admin-api/infra/file/upload', |
|||
// 自定义接口路径
|
|||
interfaceUrl: 'http://172.22.32.8:90/magic/web/index.html', |
|||
// 积木报表请求路径
|
|||
jmreportBaseUrl: 'http://172.22.32.8:90', |
|||
// 查看质检报告环境
|
|||
reportUrl: 'https://scp.faway-hella.com', |
|||
// 租户配置
|
|||
tenant: '["成都"]' |
|||
} |
@ -0,0 +1,60 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface EquipmentInspectionDetailVO { |
|||
id: number |
|||
number: string |
|||
masterId: number |
|||
completionTime: Date |
|||
uncompletedCause: string |
|||
result: string |
|||
name: string |
|||
content: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询巡检工单子列表
|
|||
export const getEquipmentInspectionDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/equipment-inspection-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/equipment-inspection-detail/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询巡检工单子详情
|
|||
export const getEquipmentInspectionDetail = async (id: number) => { |
|||
return await request.get({ url: `/eam/equipment-inspection-detail/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增巡检工单子
|
|||
export const createEquipmentInspectionDetail = async (data: EquipmentInspectionDetailVO) => { |
|||
return await request.post({ url: `/eam/equipment-inspection-detail/create`, data }) |
|||
} |
|||
|
|||
// 修改巡检工单子
|
|||
export const updateEquipmentInspectionDetail = async (data: EquipmentInspectionDetailVO) => { |
|||
return await request.put({ url: `/eam/equipment-inspection-detail/update`, data }) |
|||
} |
|||
|
|||
// 删除巡检工单子
|
|||
export const deleteEquipmentInspectionDetail = async (id: number) => { |
|||
return await request.delete({ url: `/eam/equipment-inspection-detail/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出巡检工单子 Excel
|
|||
export const exportEquipmentInspectionDetail = async (params) => { |
|||
return await request.download({ url: `/eam/equipment-inspection-detail/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/equipment-inspection-detail/get-import-template' }) |
|||
} |
@ -0,0 +1,104 @@ |
|||
import request from '@/config/axios' |
|||
import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart"; |
|||
import {EquipmentMaintenanceMainVO} from "@/api/eam/equipmentMaintenanceMain"; |
|||
|
|||
export interface EquipmentInspectionMainVO { |
|||
id: number |
|||
number: string |
|||
sources: string |
|||
describing: string |
|||
equipmentCode: string |
|||
type: string |
|||
isPictures: boolean |
|||
planNumber: string |
|||
planStartTime: Date |
|||
planEndTime: Date |
|||
startTime: Date |
|||
endTime: Date |
|||
classType: string |
|||
verifyer: number |
|||
verifyContent: string |
|||
verifyTime: Date |
|||
maintenancer: number |
|||
completionTime: Date |
|||
maintenanceTime: Date |
|||
status: string |
|||
autoOrder: string |
|||
autoPerform: string |
|||
autoVerify: string |
|||
directCreateRecord: string |
|||
faultType: string |
|||
factoryAreaCode: string |
|||
workshopCode: string |
|||
lineCode: string |
|||
processCode: string |
|||
workstationCode: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询巡检工单主列表
|
|||
export const getEquipmentInspectionMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/equipment-inspection-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/equipment-inspection-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询巡检工单主详情
|
|||
export const getEquipmentInspectionMain = async (id: number) => { |
|||
return await request.get({ url: `/eam/equipment-inspection-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增巡检工单主
|
|||
export const createEquipmentInspectionMain = async (data: EquipmentInspectionMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-inspection-main/create`, data }) |
|||
} |
|||
|
|||
// 修改巡检工单主
|
|||
export const updateEquipmentInspectionMain = async (data: EquipmentInspectionMainVO) => { |
|||
return await request.put({ url: `/eam/equipment-inspection-main/update`, data }) |
|||
} |
|||
|
|||
// 修改巡检工单主
|
|||
export const updateEquipmentInspection = async (data: EquipmentInspectionMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-inspection-main/updateOrders`, data }) |
|||
} |
|||
|
|||
// 删除巡检工单主
|
|||
export const deleteEquipmentInspectionMain = async (id: number) => { |
|||
return await request.delete({ url: `/eam/equipment-inspection-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出巡检工单主 Excel
|
|||
export const exportEquipmentInspectionMain = async (params) => { |
|||
return await request.download({ url: `/eam/equipment-inspection-main/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/equipment-inspection-main/get-import-template' }) |
|||
} |
|||
|
|||
// 修改保养工单状态
|
|||
export const updateEquipmentInspectionOrder = async (data: EquipmentInspectionMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-inspection-main/updateOrder`, data }) |
|||
} |
|||
|
|||
//完成保养工单
|
|||
export const executeEquipmentInspectionOrder = async (data: EquipmentInspectionMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-inspection-main/execute`, data }) |
|||
} |
|||
|
|||
//验证不通过,打回保养工单
|
|||
export const backEquipmentInspectionOrder = async (data: EquipmentInspectionMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-inspection-main/fallback`, data }) |
|||
} |
@ -0,0 +1,62 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface EquipmentSpotCheckDetailVO { |
|||
id: number |
|||
number: string |
|||
masterId: number |
|||
completionTime: Date |
|||
uncompletedCause: string |
|||
result: string |
|||
name: string |
|||
content: string |
|||
equipmentParts: string |
|||
methods: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询点检工单子列表
|
|||
export const getEquipmentSpotCheckDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/equipment-spot-check-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/equipment-spot-check-detail/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询点检工单子详情
|
|||
export const getEquipmentSpotCheckDetail = async (id: number) => { |
|||
return await request.get({ url: `/eam/equipment-spot-check-detail/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增点检工单子
|
|||
export const createEquipmentSpotCheckDetail = async (data: EquipmentSpotCheckDetailVO) => { |
|||
return await request.post({ url: `/eam/equipment-spot-check-detail/create`, data }) |
|||
} |
|||
|
|||
// 修改点检工单子
|
|||
export const updateEquipmentSpotCheckDetail = async (data: EquipmentSpotCheckDetailVO) => { |
|||
return await request.put({ url: `/eam/equipment-spot-check-detail/update`, data }) |
|||
} |
|||
|
|||
// 删除点检工单子
|
|||
export const deleteEquipmentSpotCheckDetail = async (id: number) => { |
|||
return await request.delete({ url: `/eam/equipment-spot-check-detail/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出点检工单子 Excel
|
|||
export const exportEquipmentSpotCheckDetail = async (params) => { |
|||
return await request.download({ url: `/eam/equipment-spot-check-detail/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/equipment-spot-check-detail/get-import-template' }) |
|||
} |
@ -0,0 +1,103 @@ |
|||
import request from '@/config/axios' |
|||
import {EquipmentInspectionMainVO} from "@/api/eam/equipmentInspectionMain"; |
|||
|
|||
export interface EquipmentSpotCheckMainVO { |
|||
id: number |
|||
number: string |
|||
describing: string |
|||
equipmentCode: string |
|||
type: string |
|||
planNumber: string |
|||
planStartTime: Date |
|||
planEndTime: Date |
|||
startTime: Date |
|||
endTime: Date |
|||
faultType: string |
|||
verifyer: number |
|||
verifyContent: string |
|||
verifyTime: Date |
|||
maintenancer: number |
|||
completionTime: Date |
|||
maintenanceTime: Date |
|||
isPictures: boolean |
|||
status: string |
|||
autoOrder: string |
|||
autoPerform: string |
|||
autoVerify: string |
|||
directCreateRecord: string |
|||
classType: string |
|||
factoryAreaCode: string |
|||
workshopCode: string |
|||
lineCode: string |
|||
processCode: string |
|||
workstationCode: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询点检工单主列表
|
|||
export const getEquipmentSpotCheckMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/equipment-spot-check-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/equipment-spot-check-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询点检工单主详情
|
|||
export const getEquipmentSpotCheckMain = async (id: number) => { |
|||
return await request.get({ url: `/eam/equipment-spot-check-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增点检工单主
|
|||
export const createEquipmentSpotCheckMain = async (data: EquipmentSpotCheckMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-spot-check-main/create`, data }) |
|||
} |
|||
|
|||
// 修改点检工单主
|
|||
export const updateEquipmentSpotCheckMain = async (data: EquipmentSpotCheckMainVO) => { |
|||
return await request.put({ url: `/eam/equipment-spot-check-main/update`, data }) |
|||
} |
|||
|
|||
// 修改点检工单主
|
|||
export const updateEquipmentSpotCheck = async (data: EquipmentSpotCheckMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-spot-check-main/updateOrders`, data }) |
|||
} |
|||
|
|||
// 删除点检工单主
|
|||
export const deleteEquipmentSpotCheckMain = async (id: number) => { |
|||
return await request.delete({ url: `/eam/equipment-spot-check-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出点检工单主 Excel
|
|||
export const exportEquipmentSpotCheckMain = async (params) => { |
|||
return await request.download({ url: `/eam/equipment-spot-check-main/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/equipment-spot-check-main/get-import-template' }) |
|||
} |
|||
|
|||
|
|||
// 修改点检工单状态
|
|||
export const updateEquipmentSpotCheckOrder = async (data: EquipmentSpotCheckMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-spot-check-main/updateOrder`, data }) |
|||
} |
|||
|
|||
//完成点检工单
|
|||
export const executeEquipmentSpotCheckOrder = async (data: EquipmentSpotCheckMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-spot-check-main/execute`, data }) |
|||
} |
|||
|
|||
//验证不通过,打回点检工单
|
|||
export const backEquipmentSpotCheckOrder = async (data: EquipmentSpotCheckMainVO) => { |
|||
return await request.post({ url: `/eam/equipment-spot-check-main/fallback`, data }) |
|||
} |
@ -0,0 +1,80 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface ItemVO { |
|||
number : string |
|||
name : string |
|||
brand : string |
|||
specifications : string |
|||
isConstant : string |
|||
subject : string |
|||
classification : string |
|||
uom : string |
|||
singlePrice : number |
|||
reprocurement : number |
|||
safetyStock : number |
|||
cost : string |
|||
purchaser : string |
|||
financer : string |
|||
isFramework : string |
|||
isRadeIn : string |
|||
siteId : string |
|||
available : string |
|||
concurrencyStamp : number |
|||
} |
|||
|
|||
// 查询备件列表
|
|||
export const getItemPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = { ...params } |
|||
return await request.post({ url: '/eam/item/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/item/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 生成标签
|
|||
export const genDevice = async (data) => { |
|||
return await request.post({ url: `/eam/item/genDevice`, data }) |
|||
} |
|||
|
|||
// 查询备件详情
|
|||
export const getItem = async (id : number) => { |
|||
return await request.get({ url: `/eam/item/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增备件
|
|||
export const createItem = async (data : ItemVO) => { |
|||
return await request.post({ url: `/eam/item/create`, data }) |
|||
} |
|||
|
|||
// 修改备件
|
|||
export const updateItem = async (data : ItemVO) => { |
|||
return await request.put({ url: `/eam/item/update`, data }) |
|||
} |
|||
|
|||
// 删除备件
|
|||
export const deleteItem = async (id : number) => { |
|||
return await request.delete({ url: `/eam/item/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出备件 Excel
|
|||
export const exportItem = async (params) => { |
|||
return await request.download({ url: `/eam/item/export-excel`, params }) |
|||
} |
|||
|
|||
// 修改备件
|
|||
export const getItemList = async (params) => { |
|||
return await request.get({ url: `/eam/item/getListByNumber`, params }) |
|||
} |
|||
|
|||
// // 删除备件
|
|||
// export const getaaa = async () => {
|
|||
// return await request.get({ url: `/eam/producePlan/produce`})
|
|||
// }
|
|||
|
|||
// 备件不分页
|
|||
|
|||
export const getItemNoPage = async (params) => { |
|||
return await request.get({ url: `/eam/item/noPage`, params }) |
|||
} |
@ -0,0 +1,63 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface ItemApplyMainVO { |
|||
number: string |
|||
name: string |
|||
type: string |
|||
applyId: number |
|||
applyDeptId: number |
|||
approveId: number |
|||
approveTime: Date |
|||
outId: number |
|||
outTime: Date |
|||
siteId: string |
|||
available: string |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询备件申领记录主列表
|
|||
export const getItemApplyMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/item-apply-request-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/item-apply-request-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询备件申领记录主详情
|
|||
export const getItemApplyMain = async (id: number) => { |
|||
return await request.get({ url: `/eam/item-apply-request-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增备件申领记录主
|
|||
export const createItemApplyMain = async (data: ItemApplyMainVO) => { |
|||
return await request.post({ url: `/eam/item-apply-request-main/create`, data }) |
|||
} |
|||
|
|||
// 修改备件申领记录主
|
|||
export const updateItemApplyMain = async (data: ItemApplyMainVO) => { |
|||
return await request.put({ url: `/eam/item-apply-request-main/update`, data }) |
|||
} |
|||
|
|||
// 删除备件申领记录主
|
|||
export const deleteItemApplyMain = async (id: number) => { |
|||
return await request.delete({ url: `/eam/item-apply-request-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 撤销备件申领记录主
|
|||
export const backoutItemApplyMain = async (id: number) => { |
|||
return await request.get({ url: `/eam/item-apply-request-main/backout?id=` + id }) |
|||
} |
|||
|
|||
|
|||
// 导出备件申领记录主 Excel
|
|||
export const exportItemApplyMain = async (params) => { |
|||
return await request.download({ url: `/eam/item-apply-request-main/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/item-apply-request-main/get-import-template' }) |
|||
} |
@ -0,0 +1,65 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface ItemAccountsVO { |
|||
itemNumber: string |
|||
qty: number |
|||
areaNumber: string |
|||
isInAccount: string |
|||
siteId: string |
|||
available: string |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询备件台账移除列表
|
|||
export const getItemAccountsPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = { ...params } |
|||
data.qty = 0 |
|||
return await request.post({ url: '/eam/item-accounts/senior', data }) |
|||
} else { |
|||
params.qty = 0 |
|||
return await request.get({ url: `/eam/item-accounts/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询备件台账详情
|
|||
export const getItemAccounts = async (id: number) => { |
|||
return await request.get({ url: `/eam/item-accounts/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增备件台账
|
|||
export const createItemAccounts = async (data: ItemAccountsVO) => { |
|||
return await request.post({ url: `/eam/item-accounts/create`, data }) |
|||
} |
|||
|
|||
// 修改备件台账
|
|||
export const updateItemAccounts = async (data: ItemAccountsVO) => { |
|||
return await request.put({ url: `/eam/item-accounts/update`, data }) |
|||
} |
|||
|
|||
// 删除备件台账
|
|||
export const deleteItemAccounts = async (id: number) => { |
|||
return await request.delete({ url: `/eam/item-accounts/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出备件台账 Excel
|
|||
export const exportItemAccounts = async (params) => { |
|||
return await request.download({ url: `/eam/item-accounts/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/item-accounts/get-import-template' }) |
|||
} |
|||
|
|||
// 更改备件库位
|
|||
export const replaceLocation = async (data: Array<ItemAccountsVO>) => { |
|||
return await request.post({ url: `/eam/item-accounts/replaceLocation `, data }) |
|||
} |
|||
|
|||
// 备件不分页
|
|||
|
|||
export const getItemAccountsNoPage = async (params) => { |
|||
return await request.get({ url: `/eam/item-accounts/noPage`, params }) |
|||
} |
@ -0,0 +1,55 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface LocationVO { |
|||
number: string |
|||
name: string |
|||
description: string |
|||
areaNumber: string |
|||
type: string |
|||
isInAccount: string |
|||
siteId: string |
|||
available: string |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询库位列表
|
|||
export const getLocationPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/location/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/location/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询库位详情
|
|||
export const getLocation = async (id: number) => { |
|||
return await request.get({ url: `/eam/location/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增库位
|
|||
export const createLocation = async (data: LocationVO) => { |
|||
return await request.post({ url: `/eam/location/create`, data }) |
|||
} |
|||
|
|||
// 修改库位
|
|||
export const updateLocation = async (data: LocationVO) => { |
|||
return await request.put({ url: `/eam/location/update`, data }) |
|||
} |
|||
|
|||
// 删除库位
|
|||
export const deleteLocation = async (id: number) => { |
|||
return await request.delete({ url: `/eam/location/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出库位 Excel
|
|||
export const exportLocation = async (params) => { |
|||
return await request.download({ url: `/eam/location/export-excel`, params }) |
|||
} |
|||
|
|||
|
|||
// 查询库位列表
|
|||
export const getLocationNoPage = async (params) => { |
|||
return await request.get({ url: `/eam/location/noPage`, params }) |
|||
} |
@ -0,0 +1,48 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface LocationAreaVO { |
|||
number: string |
|||
name: string |
|||
description: string |
|||
type: string |
|||
siteId: string |
|||
available: string |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询库区列表
|
|||
export const getLocationAreaPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/location-area/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/location-area/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询库区详情
|
|||
export const getLocationArea = async (id: number) => { |
|||
return await request.get({ url: `/eam/location-area/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增库区
|
|||
export const createLocationArea = async (data: LocationAreaVO) => { |
|||
return await request.post({ url: `/eam/location-area/create`, data }) |
|||
} |
|||
|
|||
// 修改库区
|
|||
export const updateLocationArea = async (data: LocationAreaVO) => { |
|||
return await request.put({ url: `/eam/location-area/update`, data }) |
|||
} |
|||
|
|||
// 删除库区
|
|||
export const deleteLocationArea = async (id: number) => { |
|||
return await request.delete({ url: `/eam/location-area/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出库区 Excel
|
|||
export const exportLocationArea = async (params) => { |
|||
return await request.download({ url: `/eam/location-area/export-excel`, params }) |
|||
} |
|||
|
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface MaintainExperienceVO { |
|||
id: number |
|||
name: string |
|||
content: string |
|||
masterId: number |
|||
orderType: string |
|||
maintainNumber: string |
|||
} |
|||
|
|||
// 查询保养经验记录列表
|
|||
export const getMaintainExperiencePage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/record/maintain-experience/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/record/maintain-experience/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询保养经验记录详情
|
|||
export const getMaintainExperience = async (id: number) => { |
|||
return await request.get({ url: `/record/maintain-experience/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增保养经验记录
|
|||
export const createMaintainExperience = async (data: MaintainExperienceVO) => { |
|||
return await request.post({ url: `/record/maintain-experience/create`, data }) |
|||
} |
|||
|
|||
// 修改保养经验记录
|
|||
export const updateMaintainExperience = async (data: MaintainExperienceVO) => { |
|||
return await request.put({ url: `/record/maintain-experience/update`, data }) |
|||
} |
|||
|
|||
// 删除保养经验记录
|
|||
export const deleteMaintainExperience = async (id: number) => { |
|||
return await request.delete({ url: `/record/maintain-experience/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出保养经验记录 Excel
|
|||
export const exportMaintainExperience = async (params) => { |
|||
return await request.download({ url: `/record/maintain-experience/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/record/maintain-experience/get-import-template' }) |
|||
} |
@ -0,0 +1,57 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface RelationInspectionPlanItemVO { |
|||
id: number |
|||
planNumber: string |
|||
itemCode: string |
|||
itemName: string |
|||
isSelectd: boolean |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询巡检计划和巡检项关系列表
|
|||
export const getRelationInspectionPlanItemPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/relation-inspection-plan-item/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/relation-inspection-plan-item/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询巡检计划和巡检项关系详情
|
|||
export const getRelationInspectionPlanItem = async (id: number) => { |
|||
return await request.get({ url: `/eam/relation-inspection-plan-item/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增巡检计划和巡检项关系
|
|||
export const createRelationInspectionPlanItem = async (data: RelationInspectionPlanItemVO) => { |
|||
return await request.post({ url: `/eam/relation-inspection-plan-item/create`, data }) |
|||
} |
|||
|
|||
// 修改巡检计划和巡检项关系
|
|||
export const updateRelationInspectionPlanItem = async (data: RelationInspectionPlanItemVO) => { |
|||
return await request.put({ url: `/eam/relation-inspection-plan-item/update`, data }) |
|||
} |
|||
|
|||
// 删除巡检计划和巡检项关系
|
|||
export const deleteRelationInspectionPlanItem = async (id: number) => { |
|||
return await request.delete({ url: `/eam/relation-inspection-plan-item/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出巡检计划和巡检项关系 Excel
|
|||
export const exportRelationInspectionPlanItem = async (params) => { |
|||
return await request.download({ url: `/eam/relation-inspection-plan-item/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/relation-inspection-plan-item/get-import-template' }) |
|||
} |
@ -0,0 +1,57 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface RelationSpotCheckPlanItemVO { |
|||
id: number |
|||
planNumber: string |
|||
itemCode: string |
|||
itemName: string |
|||
isSelectd: boolean |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询点检计划表和巡检项关系列表
|
|||
export const getRelationSpotCheckPlanItemPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/relation-spot-check-plan-item/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/relation-spot-check-plan-item/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询点检计划表和巡检项关系详情
|
|||
export const getRelationSpotCheckPlanItem = async (id: number) => { |
|||
return await request.get({ url: `/eam/relation-spot-check-plan-item/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增点检计划表和巡检项关系
|
|||
export const createRelationSpotCheckPlanItem = async (data: RelationSpotCheckPlanItemVO) => { |
|||
return await request.post({ url: `/eam/relation-spot-check-plan-item/create`, data }) |
|||
} |
|||
|
|||
// 修改点检计划表和巡检项关系
|
|||
export const updateRelationSpotCheckPlanItem = async (data: RelationSpotCheckPlanItemVO) => { |
|||
return await request.put({ url: `/eam/relation-spot-check-plan-item/update`, data }) |
|||
} |
|||
|
|||
// 删除点检计划表和巡检项关系
|
|||
export const deleteRelationSpotCheckPlanItem = async (id: number) => { |
|||
return await request.delete({ url: `/eam/relation-spot-check-plan-item/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出点检计划表和巡检项关系 Excel
|
|||
export const exportRelationSpotCheckPlanItem = async (params) => { |
|||
return await request.download({ url: `/eam/relation-spot-check-plan-item/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/relation-spot-check-plan-item/get-import-template' }) |
|||
} |
@ -0,0 +1,49 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface RepairExperienceVO { |
|||
id: number |
|||
name: string |
|||
content: string |
|||
repairNumber: string |
|||
} |
|||
|
|||
// 查询维修经验记录列表
|
|||
export const getRepairExperiencePage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/record/repair-experience/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/record/repair-experience/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询维修经验记录详情
|
|||
export const getRepairExperience = async (id: number) => { |
|||
return await request.get({ url: `/record/repair-experience/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增维修经验记录
|
|||
export const createRepairExperience = async (data: RepairExperienceVO) => { |
|||
return await request.post({ url: `/record/repair-experience/create`, data }) |
|||
} |
|||
|
|||
// 修改维修经验记录
|
|||
export const updateRepairExperience = async (data: RepairExperienceVO) => { |
|||
return await request.put({ url: `/record/repair-experience/update`, data }) |
|||
} |
|||
|
|||
// 删除维修经验记录
|
|||
export const deleteRepairExperience = async (id: number) => { |
|||
return await request.delete({ url: `/record/repair-experience/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出维修经验记录 Excel
|
|||
export const exportRepairExperience = async (params) => { |
|||
return await request.download({ url: `/record/repair-experience/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/record/repair-experience/get-import-template' }) |
|||
} |
@ -1,63 +0,0 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface SparePartsApplyDetailVO { |
|||
id: number |
|||
number: string |
|||
masterId: number |
|||
sparePartsCode: string |
|||
isRadeIn: string |
|||
applyQty: number |
|||
currentQty: number |
|||
type: string |
|||
currentSinglePrice: number |
|||
equipmentCode: byte[] |
|||
jobNumber: byte[] |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询备件领用申请子列表
|
|||
export const getSparePartsApplyDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/spare-parts-apply-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/spare-parts-apply-detail/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询备件领用申请子详情
|
|||
export const getSparePartsApplyDetail = async (id: number) => { |
|||
return await request.get({ url: `/eam/spare-parts-apply-detail/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增备件领用申请子
|
|||
export const createSparePartsApplyDetail = async (data: SparePartsApplyDetailVO) => { |
|||
return await request.post({ url: `/eam/spare-parts-apply-detail/create`, data }) |
|||
} |
|||
|
|||
// 修改备件领用申请子
|
|||
export const updateSparePartsApplyDetail = async (data: SparePartsApplyDetailVO) => { |
|||
return await request.put({ url: `/eam/spare-parts-apply-detail/update`, data }) |
|||
} |
|||
|
|||
// 删除备件领用申请子
|
|||
export const deleteSparePartsApplyDetail = async (id: number) => { |
|||
return await request.delete({ url: `/eam/spare-parts-apply-detail/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出备件领用申请子 Excel
|
|||
export const exportSparePartsApplyDetail = async (params) => { |
|||
return await request.download({ url: `/eam/spare-parts-apply-detail/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/spare-parts-apply-detail/get-import-template' }) |
|||
} |
@ -1,65 +0,0 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface SparePartsApplyMainVO { |
|||
id: number |
|||
number: string |
|||
description: string |
|||
applyDeptId: string |
|||
sumVal: number |
|||
status: string |
|||
applyer: string |
|||
approver: number |
|||
approveContent: string |
|||
approveTime: Date |
|||
autoExamine: string |
|||
autoAgree: string |
|||
directCreateRecord: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询备件领用申请列表
|
|||
export const getSparePartsApplyMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/spare-parts-apply-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/spare-parts-apply-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询备件领用申请详情
|
|||
export const getSparePartsApplyMain = async (id: number) => { |
|||
return await request.get({ url: `/eam/spare-parts-apply-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增备件领用申请
|
|||
export const createSparePartsApplyMain = async (data: SparePartsApplyMainVO) => { |
|||
return await request.post({ url: `/eam/spare-parts-apply-main/create`, data }) |
|||
} |
|||
|
|||
// 修改备件领用申请
|
|||
export const updateSparePartsApplyMain = async (data: SparePartsApplyMainVO) => { |
|||
return await request.put({ url: `/eam/spare-parts-apply-main/update`, data }) |
|||
} |
|||
|
|||
// 删除备件领用申请
|
|||
export const deleteSparePartsApplyMain = async (id: number) => { |
|||
return await request.delete({ url: `/eam/spare-parts-apply-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出备件领用申请 Excel
|
|||
export const exportSparePartsApplyMain = async (params) => { |
|||
return await request.download({ url: `/eam/spare-parts-apply-main/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/spare-parts-apply-main/get-import-template' }) |
|||
} |
@ -1,58 +0,0 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface SparePartsInLocationDetailVO { |
|||
id: number |
|||
number: string |
|||
masterId: number |
|||
sparePartsCode: string |
|||
isRadeIn: string |
|||
applyQty: number |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询备件入库记录子列表
|
|||
export const getSparePartsInLocationDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/spare-parts-in-location-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-detail/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询备件入库记录子详情
|
|||
export const getSparePartsInLocationDetail = async (id: number) => { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-detail/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增备件入库记录子
|
|||
export const createSparePartsInLocationDetail = async (data: SparePartsInLocationDetailVO) => { |
|||
return await request.post({ url: `/eam/spare-parts-in-location-detail/create`, data }) |
|||
} |
|||
|
|||
// 修改备件入库记录子
|
|||
export const updateSparePartsInLocationDetail = async (data: SparePartsInLocationDetailVO) => { |
|||
return await request.put({ url: `/eam/spare-parts-in-location-detail/update`, data }) |
|||
} |
|||
|
|||
// 删除备件入库记录子
|
|||
export const deleteSparePartsInLocationDetail = async (id: number) => { |
|||
return await request.delete({ url: `/eam/spare-parts-in-location-detail/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出备件入库记录子 Excel
|
|||
export const exportSparePartsInLocationDetail = async (params) => { |
|||
return await request.download({ url: `/eam/spare-parts-in-location-detail/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/spare-parts-in-location-detail/get-import-template' }) |
|||
} |
@ -1,87 +0,0 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface SparePartsInLocationMainVO { |
|||
id: number |
|||
number: string |
|||
theme: string |
|||
status: string |
|||
applyer: string |
|||
approver: number |
|||
approveContent: string |
|||
approveTime: Date |
|||
autoExamine: string |
|||
autoAgree: string |
|||
directCreateRecord: string |
|||
areaCode: string |
|||
locationCode: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询备件入库记录主列表
|
|||
export const getSparePartsInLocationMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/spare-parts-in-location-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询备件入库记录主详情
|
|||
export const getSparePartsInLocationMain = async (id: number) => { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增备件入库记录主
|
|||
export const createSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => { |
|||
return await request.post({ url: `/eam/spare-parts-in-location-main/create`, data }) |
|||
} |
|||
|
|||
// 修改备件入库记录主
|
|||
export const updateSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => { |
|||
return await request.put({ url: `/eam/spare-parts-in-location-main/update`, data }) |
|||
} |
|||
|
|||
// 删除备件入库记录主
|
|||
export const deleteSparePartsInLocationMain = async (id: number) => { |
|||
return await request.delete({ url: `/eam/spare-parts-in-location-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出备件入库记录主 Excel
|
|||
export const exportSparePartsInLocationMain = async (params) => { |
|||
if (params.isSearch) { |
|||
const data = {...params} |
|||
return await request.downloadPost({ url: `/eam/spare-parts-in-location-main/export-excel-senior`, data }) |
|||
}else{ |
|||
return await request.download({ url: `/eam/spare-parts-in-location-main/export-excel`, params }) |
|||
} |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/spare-parts-in-location-main/get-import-template' }) |
|||
} |
|||
|
|||
// 撤回
|
|||
export const cancelSparePartsInLocation = async (id) => { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-main/cancel?id=` + id }) |
|||
} |
|||
// 审核
|
|||
export const submitExamineSparePartsInLocation = async (id) => { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-main/submitExamine?id=` + id }) |
|||
} |
|||
// 审核驳回
|
|||
export const rejectSparePartsInLocation = async (id) => { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-main/reject?id=` + id }) |
|||
} |
|||
// 审核通过
|
|||
export const approveSparePartsInLocation = async (data) => { |
|||
return await request.post({ url: `/eam/spare-parts-in-location-main/approve`,data }) |
|||
} |
@ -1,58 +0,0 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface SparePartsInLocationDetailRecordVO { |
|||
id: number |
|||
number: string |
|||
masterId: number |
|||
sparePartsCode: string |
|||
isRadeIn: string |
|||
applyQty: number |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询备件入库记录子列表
|
|||
export const getSparePartsInLocationDetailRecordPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/spare-parts-in-location-detail-record/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-detail-record/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询备件入库记录子详情
|
|||
export const getSparePartsInLocationDetailRecord = async (id: number) => { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-detail-record/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增备件入库记录子
|
|||
export const createSparePartsInLocationDetailRecord = async (data: SparePartsInLocationDetailRecordVO) => { |
|||
return await request.post({ url: `/eam/spare-parts-in-location-detail-record/create`, data }) |
|||
} |
|||
|
|||
// 修改备件入库记录子
|
|||
export const updateSparePartsInLocationDetailRecord = async (data: SparePartsInLocationDetailRecordVO) => { |
|||
return await request.put({ url: `/eam/spare-parts-in-location-detail-record/update`, data }) |
|||
} |
|||
|
|||
// 删除备件入库记录子
|
|||
export const deleteSparePartsInLocationDetailRecord = async (id: number) => { |
|||
return await request.delete({ url: `/eam/spare-parts-in-location-detail-record/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出备件入库记录子 Excel
|
|||
export const exportSparePartsInLocationDetailRecord = async (params) => { |
|||
return await request.download({ url: `/eam/spare-parts-in-location-detail-record/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/spare-parts-in-location-detail-record/get-import-template' }) |
|||
} |
@ -1,72 +0,0 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface SparePartsInLocationMainRecordVO { |
|||
id: number |
|||
number: string |
|||
theme: string |
|||
status: string |
|||
applyer: string |
|||
approver: number |
|||
approveContent: string |
|||
approveTime: Date |
|||
autoExamine: string |
|||
autoAgree: string |
|||
directCreateRecord: string |
|||
areaCode: string |
|||
locationCode: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询备件入库记录主列表
|
|||
export const getSparePartsInLocationMainRecordPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = { ...params } |
|||
return await request.post({ url: '/eam/spare-parts-in-location-main-record/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-main-record/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询备件入库记录主详情
|
|||
export const getSparePartsInLocationMainRecord = async (id: number) => { |
|||
return await request.get({ url: `/eam/spare-parts-in-location-main-record/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增备件入库记录主
|
|||
export const createSparePartsInLocationMainRecord = async ( |
|||
data: SparePartsInLocationMainRecordVO |
|||
) => { |
|||
return await request.post({ url: `/eam/spare-parts-in-location-main-record/create`, data }) |
|||
} |
|||
|
|||
// 修改备件入库记录主
|
|||
export const updateSparePartsInLocationMainRecord = async ( |
|||
data: SparePartsInLocationMainRecordVO |
|||
) => { |
|||
return await request.put({ url: `/eam/spare-parts-in-location-main-record/update`, data }) |
|||
} |
|||
|
|||
// 删除备件入库记录主
|
|||
export const deleteSparePartsInLocationMainRecord = async (id: number) => { |
|||
return await request.delete({ url: `/eam/spare-parts-in-location-main-record/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出备件入库记录主 Excel
|
|||
export const exportSparePartsInLocationMainRecord = async (params) => { |
|||
return await request.download({ |
|||
url: `/eam/spare-parts-in-location-main-record/export-excel`, |
|||
params |
|||
}) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/spare-parts-in-location-main-record/get-import-template' }) |
|||
} |
@ -1,54 +0,0 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
// 创建领用出库记录子
|
|||
export function createSparePartsOutLocationRecordDetail(data) { |
|||
return request({ |
|||
url: '/eam/spare-parts-out-location-detail-record/create', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 更新领用出库记录子
|
|||
export function updateSparePartsOutLocationRecordDetail(data) { |
|||
return request({ |
|||
url: '/eam/spare-parts-out-location-detail-record/update', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除领用出库记录子
|
|||
export function deleteSparePartsOutLocationRecordDetail(id) { |
|||
return request({ |
|||
url: '/eam/spare-parts-out-location-detail-record/delete?id=' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 获得领用出库记录子
|
|||
export function getSparePartsOutLocationRecordDetail(id) { |
|||
return request({ |
|||
url: '/eam/spare-parts-out-location-detail-record/get?id=' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 获得领用出库记录子分页
|
|||
export function getSparePartsOutLocationRecordDetailPage(query) { |
|||
return request({ |
|||
url: '/eam/spare-parts-out-location-detail-record/page', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
|||
|
|||
// 导出领用出库记录子 Excel
|
|||
export function exportSparePartsOutLocationRecordDetailExcel(query) { |
|||
return request({ |
|||
url: '/eam/spare-parts-out-location-detail-record/export-excel', |
|||
method: 'get', |
|||
params: query, |
|||
responseType: 'blob' |
|||
}) |
|||
} |
@ -1,71 +0,0 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface SparePartsOutLocationRecordMainVO { |
|||
id: number |
|||
number: string |
|||
theme: string |
|||
applyer: string |
|||
approver: number |
|||
approveContent: string |
|||
approveTime: Date |
|||
autoExamine: string |
|||
autoAgree: string |
|||
directCreateRecord: string |
|||
areaCode: string |
|||
locationCode: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询领用出库记录主列表
|
|||
export const getSparePartsOutLocationRecordMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = { ...params } |
|||
return await request.post({ url: '/eam/spare-parts-out-location-main-record/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/spare-parts-out-location-main-record/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询领用出库记录主详情
|
|||
export const getSparePartsOutLocationRecordMain = async (id: number) => { |
|||
return await request.get({ url: `/eam/spare-parts-out-location-main-record/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增领用出库记录主
|
|||
export const createSparePartsOutLocationRecordMain = async ( |
|||
data: SparePartsOutLocationRecordMainVO |
|||
) => { |
|||
return await request.post({ url: `/eam/spare-parts-out-location-main-record/create`, data }) |
|||
} |
|||
|
|||
// 修改领用出库记录主
|
|||
export const updateSparePartsOutLocationRecordMain = async ( |
|||
data: SparePartsOutLocationRecordMainVO |
|||
) => { |
|||
return await request.put({ url: `/eam/spare-parts-out-location-main-record/update`, data }) |
|||
} |
|||
|
|||
// 删除领用出库记录主
|
|||
export const deleteSparePartsOutLocationRecordMain = async (id: number) => { |
|||
return await request.delete({ url: `/eam/spare-parts-out-location-main-record/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出领用出库记录主 Excel
|
|||
export const exportSparePartsOutLocationRecordMain = async (params) => { |
|||
return await request.download({ |
|||
url: `/eam/spare-parts-out-location-main-record/export-excel`, |
|||
params |
|||
}) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/spare-parts-out-location-main-record/get-import-template' }) |
|||
} |
@ -0,0 +1,976 @@ |
|||
<template> |
|||
<Dialog |
|||
:title="dialogTitle" |
|||
v-model="dialogVisible" |
|||
:width="dialogWidth" |
|||
:close-on-click-modal="false" |
|||
:vLoading="formLoading" |
|||
> |
|||
|
|||
<div |
|||
style="max-height: 60vh;overflow-y: auto;"> |
|||
<Form |
|||
ref="formRef" |
|||
:rules="rules" |
|||
:schema="formSchema" |
|||
:is-col="true" |
|||
@opensearchTable="opensearchTable" |
|||
@hiddenFilterButton="hiddenSearchTableFilterButton" |
|||
@changeDialogWidth="changeDialogWidth" |
|||
@clearSearchInput="clearSearchInput" |
|||
@onChange="onChange" |
|||
@onBlur="onBlur" |
|||
@onEnter="onEnter" |
|||
> |
|||
<template #crontab="formSchema1" v-if="fromeWhere == 'countPlan'"> |
|||
|
|||
<crontab v-model="formSchema1.crontab" :disabled="formSchema?.find(item=>item.field == 'crontab')?.componentProps?.disabled "/> |
|||
</template> |
|||
<template #type="formSchema" v-if="fromeWhere == 'countPlan'"> |
|||
<el-select |
|||
v-model="formSchema.type" |
|||
placeholder="选择盘点类型" |
|||
@change="selectChange('type', $event)" |
|||
v-if="!isDetail" |
|||
> |
|||
<el-option |
|||
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
<el-select |
|||
v-model="formSchema.type" |
|||
placeholder="选择盘点范围类型" |
|||
@change="selectChangeDetail('type', $event,formSchema)" |
|||
v-if="isDetail" |
|||
> |
|||
<el-option |
|||
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</template> |
|||
<template #value="formSchema" v-if="fromeWhere == 'countPlan'"> |
|||
<el-select |
|||
v-model="formSchema.value" |
|||
placeholder="选择盘点范围值" |
|||
v-if="isDetail&& formTypeDetail =='Select'" |
|||
> |
|||
<el-option |
|||
v-for="dict in countPlanAllList" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
<el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail =='InputString'"/> |
|||
</template> |
|||
</Form> |
|||
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'"> |
|||
<TableForm |
|||
ref="tableFormRef" |
|||
class="w-[100%]" |
|||
:maxHeight = "490" |
|||
:tableFields="tableAllSchemas.tableFormColumns" |
|||
:tableData="tableData" |
|||
:tableFormRules="tableFormRules" |
|||
:isShowButton="isShowButton" |
|||
:isShowReduceButton="isShowReduceButton" |
|||
:isShowReduceButtonSelection="isShowReduceButtonSelection" |
|||
@handleAddTable="handleAddTable" |
|||
@handleDeleteTable="handleDeleteTable" |
|||
@tableSelectionChange="tableSelectionChange" |
|||
@tableSelectionDelete="tableSelectionDelete" |
|||
@extendedButtonsClick="extendedButtonsClick" |
|||
@formSelectChange="formSelectChange" |
|||
@formSelectvVisibleChange="formSelectvVisibleChange" |
|||
@tableSortChange="tableSortChange" |
|||
@selectCallback="selectCallback" |
|||
@handleTableSelect="handleTableSelect" |
|||
@inpuFocus="inpuFocus" |
|||
@buttonOperationClick="buttonOperationClick" |
|||
@inputStringBlur="inputStringBlur" |
|||
@inputNumberChange="inputNumberChange" |
|||
@tableFormSelectOnBlur="tableFormSelectOnBlur" |
|||
@formFormDateChange="formFormDateChange" |
|||
@clearInput='clearInput' |
|||
@inputFocusPlan='inputFocusPlan' |
|||
> |
|||
<template v-slot="{row}"> |
|||
<slot :row="row"></slot> |
|||
</template> |
|||
</TableForm> |
|||
</div> |
|||
<div v-if="isBusiness && formType == 'create' && fromeWhere == 'countPlan'"> |
|||
<TableFormCountPlan |
|||
:tableFields="tableAllSchemas.tableFormColumns" |
|||
:tableData="tableData" |
|||
:countScopeType="countScopeType" |
|||
:tableFormRules="tableFormRules" |
|||
ref="tableFormRef" |
|||
@tableFormChange="tableFormChange" |
|||
@handleAddTable="handleAddTable" |
|||
@handleDeleteTable="handleDeleteTable" |
|||
@inpuFocus="inpuFocus" |
|||
/> |
|||
|
|||
</div> |
|||
<Form |
|||
ref="formRef1" |
|||
:rules="rules" |
|||
:schema="CountPlanMain1FormAllSchemas" |
|||
:is-col="true" |
|||
style="margin-top:20px" |
|||
|
|||
@opensearchTable="opensearchTable1" |
|||
@hiddenFilterButton="hiddenSearchTableFilterButton" |
|||
@changeDialogWidth="changeDialogWidth" |
|||
@clearSearchInput="clearSearchInput" |
|||
@onChange="onChange" |
|||
@onBlur="onBlur" |
|||
@onEnter="onEnter" |
|||
/> |
|||
</div> |
|||
<template #footer> |
|||
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" /> |
|||
</template> |
|||
|
|||
</Dialog> |
|||
<SearchTable ref="searchTableRef" :showSearchTableQueryFields="showSearchTableQueryFields" @searchTableSuccess="searchTableSuccess" /> |
|||
<SearchTable ref="searchTableRef1" :showSearchTableQueryFields="showSearchTableQueryFields" @searchTableSuccess="searchTableSuccess1" /> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { SearchTable } from '@/components/SearchTable' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import ButtonBase from '@/components/XButton/src/ButtonBase.vue' |
|||
import TableForm from '@/components/TableForm/src/TableForm.vue' |
|||
import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue' |
|||
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|||
import { debounce } from 'lodash-es' |
|||
|
|||
const props = defineProps({ |
|||
// 显示窗口宽度设置 |
|||
basicFormWidth: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
// 是否显示TableForm 新增/删除按钮 |
|||
isShowButton: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
// 是否显示删除按钮--多选 |
|||
isShowReduceButtonSelection:{ |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
// 是否显示tableForm 删除按钮 |
|||
isShowReduceButton: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
// 校验rules |
|||
rules: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 表单,列表 相关信息 |
|||
formAllSchemas: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 列表 相关信息 |
|||
tableAllSchemas: { |
|||
type: Array, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 列表数据 |
|||
tableData: { |
|||
type: Array, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
tableFormRules: { |
|||
type: Array, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 查询参数 |
|||
// searchTableParams: { |
|||
// type: Array, |
|||
// required: false, |
|||
// default: null |
|||
// }, |
|||
// API——Vo |
|||
apiVo: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// API——创建 |
|||
apiCreate: { |
|||
type: Function, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// API——编辑 |
|||
apiUpdate: { |
|||
type: Function, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 是否是业务表单(区分是不显示tableForm) |
|||
isBusiness: { |
|||
type: Boolean, |
|||
required: true, |
|||
default: true |
|||
}, |
|||
// 表单form |
|||
form: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 详情数据 |
|||
detailData: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// // 主表参数 |
|||
// masterParmas: { |
|||
// type: Object, |
|||
// required: false, |
|||
// default: null |
|||
// }, |
|||
// 来源 countPlan盘点计划进入 |
|||
fromeWhere: { |
|||
type: String, |
|||
required: false, |
|||
default: '' |
|||
}, |
|||
// 盘点范围类型 |
|||
countScopeType: { |
|||
type: Array, |
|||
required: false, |
|||
default: null |
|||
}, |
|||
// 是否从详情进入 |
|||
isDetail: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
//盘点详情子表新增的时候判断盘点范围值显示输入框还是下拉框 |
|||
formTypeDetail: { |
|||
type: String, |
|||
required: false, |
|||
default: 'InputString' |
|||
}, |
|||
//盘点详情子表新增的时候判断盘点范围值的下拉列表 |
|||
countPlanAllList: { |
|||
type: Array, |
|||
required: false, |
|||
default: null |
|||
}, |
|||
// 窗体底部按钮 显示or隐藏:保存,关闭 |
|||
isShowFooterButtton: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: true |
|||
}, |
|||
// 明细数据长度校验 |
|||
tableFormDataLength: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: true |
|||
}, |
|||
// 底部按钮集合 |
|||
footButttondata: { |
|||
type: Array, |
|||
required: false, |
|||
default: null |
|||
}, |
|||
//是否直接展示搜索表单 |
|||
isOpenSearchTable:{ |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
|
|||
fieldTableColumn:{ |
|||
type: String, |
|||
required: false, |
|||
default: '' |
|||
}, |
|||
//表单中展示的数据,需要用searchTable中字段计算 |
|||
/***[{ |
|||
formField:form中对应的field, |
|||
tableField:searchtable中对应的field, |
|||
}]*/ |
|||
sumFormDataField:{ |
|||
type: Array, |
|||
required: false, |
|||
default: null |
|||
}, |
|||
sumFormDataByForm:{ |
|||
type:Function, |
|||
required: false, |
|||
default: null |
|||
}, |
|||
sumFormDataByTableCustom:{ |
|||
type:Function, |
|||
required: false, |
|||
default: null |
|||
}, |
|||
showSearchTableQueryFields:{ |
|||
type: Array, |
|||
required: false, |
|||
default: [] |
|||
}, |
|||
// 表单,列表 相关信息 |
|||
CountPlanMain1FormAllSchemas: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
} |
|||
}) |
|||
|
|||
const { t } = useI18n() // 国际化 |
|||
const message = useMessage() // 消息弹窗 |
|||
const dialogWidth = ref() |
|||
if (props.basicFormWidth) { |
|||
dialogWidth.value = props.basicFormWidth + '%' |
|||
} else { |
|||
dialogWidth.value = props.isBusiness ? '60%' : '40%' |
|||
} |
|||
|
|||
const dialogVisible = ref(false) // 弹窗的是否展示 |
|||
const dialogTitle = ref('') // 弹窗的标题 |
|||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
|||
const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
|||
|
|||
const formRef = ref() // 表单 Ref |
|||
const formRef1 = ref() // 表单 Ref |
|||
const formSchema = ref(props.formAllSchemas?.formSchema) |
|||
const CountPlanMain1FormAllSchemas = ref(props.CountPlanMain1FormAllSchemas?.formSchema) |
|||
const tableAllSchemas = ref(props.tableAllSchemas) |
|||
const tableFormRules = ref(props.tableFormRules) |
|||
console.log(111,formSchema) |
|||
|
|||
// 列表-按钮 |
|||
// const buttondata = [ |
|||
// defaultButtons.mainListEditBtn(null), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn(null) |
|||
// ] |
|||
// // 列表-操作按钮事件 |
|||
// const buttonTableClick = async (val, row) => { |
|||
// if (val == 'edit') { |
|||
|
|||
// } else if (val == 'delete') { |
|||
|
|||
// } else { |
|||
// } |
|||
// } |
|||
|
|||
/** 弹层操作 */ |
|||
// formField form表单中的字段 |
|||
// searchField 查询列表中的字段 |
|||
// type 发起事件位置 type=tableForm 是明细中发起的 否则 为主表发起的 |
|||
// searchCondition 查询条件 |
|||
const searchTableRef = ref() |
|||
const searchTableRef1 = ref() |
|||
const opensearchTable = ( |
|||
formField, |
|||
searchField, |
|||
searchTitle, |
|||
searchAllSchemas, |
|||
searchPage, |
|||
searchCondition, |
|||
multiple, |
|||
type, |
|||
row, |
|||
isConcatDetailSchemas=false, |
|||
searchDetailSchemas: any |
|||
) => { |
|||
const _searchCondition = {} |
|||
// 判断查询条件中,是否存在指向主表的数据 |
|||
if (searchCondition && searchCondition.length > 0) { |
|||
// 转换筛选条件所需 |
|||
let filters: any[] = [] |
|||
for (var i=0; i< searchCondition.length; i++ ) { |
|||
// searchCondition.forEach((item) => { |
|||
// 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取 |
|||
if (searchCondition[i].isMainValue) { |
|||
_searchCondition[searchCondition[i].key] = formRef.value.formModel[searchCondition[i].value] |
|||
? formRef.value.formModel[searchCondition[i].value] |
|||
: props.detailData |
|||
? props.detailData[searchCondition[i].value] |
|||
: row |
|||
? row[searchCondition[i].value] |
|||
: '' |
|||
// 是否含有空参数情况 |
|||
let isNull = false |
|||
if (_searchCondition[searchCondition[i].key] == '' || _searchCondition[searchCondition[i].key] == undefined) { |
|||
isNull = true |
|||
} |
|||
if (isNull) { |
|||
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') |
|||
return |
|||
} |
|||
}else if(searchCondition[i].isTableRowValue){ |
|||
if(searchCondition[i].required){ |
|||
if (row[searchCondition[i].value] == '' ||row[searchCondition[i].value] == undefined) { |
|||
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') |
|||
return |
|||
} |
|||
} |
|||
row[searchCondition[i].value] |
|||
//查询当前table表数据的值 |
|||
_searchCondition[searchCondition[i].key] = row[searchCondition[i].value] |
|||
} else { |
|||
// 扩展 转换为筛选条件进行查询 |
|||
if (searchCondition[i].isSearch) { |
|||
if (searchCondition[i].isFormModel) { |
|||
//用formModel中的值 |
|||
if(searchCondition[i].required){ |
|||
if (formRef.value.formModel[searchCondition[i].value] == '' ||formRef.value.formModel[searchCondition[i].value] == undefined) { |
|||
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') |
|||
return |
|||
} |
|||
} |
|||
filters.push({ |
|||
action: searchCondition[i].action, |
|||
column: searchCondition[i].key, |
|||
value: formRef.value.formModel[searchCondition[i].value] |
|||
}) |
|||
}else{ |
|||
filters.push({ |
|||
action: searchCondition[i].action, |
|||
column: searchCondition[i].key, |
|||
value: searchCondition[i].value |
|||
}) |
|||
} |
|||
|
|||
} else { |
|||
_searchCondition[searchCondition[i].key] = searchCondition[i].value |
|||
} |
|||
} |
|||
} |
|||
if (filters.length > 0) { |
|||
_searchCondition.isSearch = true |
|||
_searchCondition.filters = filters |
|||
} |
|||
} |
|||
const _searchTableTitle = searchTitle |
|||
const _searchTableAllSchemas = searchAllSchemas |
|||
const _searchTablePage = searchPage |
|||
searchTableRef.value.open( |
|||
_searchTableTitle, |
|||
_searchTableAllSchemas, |
|||
_searchTablePage, |
|||
formField, |
|||
searchField, |
|||
multiple, |
|||
type, |
|||
row, |
|||
_searchCondition, |
|||
undefined, |
|||
isConcatDetailSchemas, |
|||
searchDetailSchemas |
|||
) |
|||
} |
|||
const opensearchTable1 = ( |
|||
formField, |
|||
searchField, |
|||
searchTitle, |
|||
searchAllSchemas, |
|||
searchPage, |
|||
searchCondition, |
|||
multiple, |
|||
type, |
|||
row, |
|||
isConcatDetailSchemas=false, |
|||
searchDetailSchemas: any |
|||
) => { |
|||
console.log(formField,searchField,searchTitle,searchAllSchemas,searchPage) |
|||
const _searchCondition = {} |
|||
// 判断查询条件中,是否存在指向主表的数据 |
|||
if (searchCondition && searchCondition.length > 0) { |
|||
// 转换筛选条件所需 |
|||
let filters: any[] = [] |
|||
for (var i=0; i< searchCondition.length; i++ ) { |
|||
// searchCondition.forEach((item) => { |
|||
// 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取 |
|||
if (searchCondition[i].isMainValue) { |
|||
_searchCondition[searchCondition[i].key] = formRef1.value.formModel[searchCondition[i].value] |
|||
? formRef1.value.formModel[searchCondition[i].value] |
|||
: props.detailData |
|||
? props.detailData[searchCondition[i].value] |
|||
: row |
|||
? row[searchCondition[i].value] |
|||
: '' |
|||
// 是否含有空参数情况 |
|||
let isNull = false |
|||
if (_searchCondition[searchCondition[i].key] == '' || _searchCondition[searchCondition[i].key] == undefined) { |
|||
isNull = true |
|||
} |
|||
if (isNull) { |
|||
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') |
|||
return |
|||
} |
|||
}else if(searchCondition[i].isTableRowValue){ |
|||
if(searchCondition[i].required){ |
|||
if (row[searchCondition[i].value] == '' ||row[searchCondition[i].value] == undefined) { |
|||
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') |
|||
return |
|||
} |
|||
} |
|||
row[searchCondition[i].value] |
|||
//查询当前table表数据的值 |
|||
_searchCondition[searchCondition[i].key] = row[searchCondition[i].value] |
|||
} else { |
|||
// 扩展 转换为筛选条件进行查询 |
|||
if (searchCondition[i].isSearch) { |
|||
if (searchCondition[i].isFormModel) { |
|||
//用formModel中的值 |
|||
if(searchCondition[i].required){ |
|||
if (formRef1.value.formModel[searchCondition[i].value] == '' ||formRef1.value.formModel[searchCondition[i].value] == undefined) { |
|||
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') |
|||
return |
|||
} |
|||
} |
|||
filters.push({ |
|||
action: searchCondition[i].action, |
|||
column: searchCondition[i].key, |
|||
value: formRef1.value.formModel[searchCondition[i].value] |
|||
}) |
|||
}else{ |
|||
filters.push({ |
|||
action: searchCondition[i].action, |
|||
column: searchCondition[i].key, |
|||
value: searchCondition[i].value |
|||
}) |
|||
} |
|||
|
|||
} else { |
|||
_searchCondition[searchCondition[i].key] = searchCondition[i].value |
|||
} |
|||
} |
|||
} |
|||
if (filters.length > 0) { |
|||
_searchCondition.isSearch = true |
|||
_searchCondition.filters = filters |
|||
} |
|||
} |
|||
const _searchTableTitle = searchTitle |
|||
const _searchTableAllSchemas = searchAllSchemas |
|||
const _searchTablePage = searchPage |
|||
searchTableRef1.value.open( |
|||
_searchTableTitle, |
|||
_searchTableAllSchemas, |
|||
_searchTablePage, |
|||
formField, |
|||
searchField, |
|||
multiple, |
|||
type, |
|||
row, |
|||
_searchCondition, |
|||
undefined, |
|||
isConcatDetailSchemas, |
|||
searchDetailSchemas |
|||
) |
|||
} |
|||
|
|||
//修改 searchTable 弹窗宽度 |
|||
const changeDialogWidth = (width)=>{ |
|||
searchTableRef.value.changeDialogWidth(width) |
|||
} |
|||
const hiddenSearchTableFilterButton = ()=>{ |
|||
searchTableRef.value.hiddenFilterButton() |
|||
} |
|||
const clearSearchInput = (field)=>{ |
|||
emit('clearSearchInput',field) |
|||
} |
|||
const sumFormDataByTable = () => { |
|||
if(props.sumFormDataField){ |
|||
const sumObject = {} |
|||
props.sumFormDataField.forEach(sumItem=>{ |
|||
sumObject[sumItem?.formField]= props.tableData.reduce((prev, item) => prev + item[sumItem?.tableField],0) |
|||
}) |
|||
nextTick(()=>{ |
|||
formRef.value.setValues(sumObject) |
|||
}) |
|||
} |
|||
} |
|||
watch(()=>props.tableData,() => { |
|||
sumFormDataByTable() |
|||
if(props?.sumFormDataByTableCustom&&unref(formRef)?.formModel&&props.tableData){ |
|||
props?.sumFormDataByTableCustom(formRef,unref(formRef)?.formModel,props.tableData) |
|||
} |
|||
|
|||
},{ |
|||
deep:true |
|||
}) |
|||
watch(()=>unref(formRef)?.formModel,() => { |
|||
if(props?.sumFormDataByForm&&unref(formRef)?.formModel){ |
|||
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel) |
|||
} |
|||
},{ |
|||
deep:true |
|||
}) |
|||
|
|||
// 弹层确定返回所选数据 |
|||
// val : 弹层列表row 数据 |
|||
const searchTableSuccess = (formField, searchField, val, type, row) => { |
|||
emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|||
} |
|||
const searchTableSuccess1 = (formField, searchField, val, type, row) => { |
|||
emit('searchTableSuccess', formField, searchField, val, formRef1.value, type, row) |
|||
} |
|||
/** 打开弹窗 */ |
|||
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any, alltitleName?: any) => { |
|||
dialogVisible.value = true |
|||
if(alltitleName){ |
|||
dialogTitle.value = alltitleName |
|||
}else if (titleName) { |
|||
dialogTitle.value = t('action.' + titleName) |
|||
} else { |
|||
dialogTitle.value = t('action.' + type) |
|||
} |
|||
formType.value = type |
|||
resetForm() |
|||
// 修改时,设置数据 |
|||
// 如果是从主表的详情页面进图添加子表,需要添加masterId,number参数 |
|||
if (masterParmas) { |
|||
if (!row) { |
|||
row = { |
|||
masterId: masterParmas.masterId, |
|||
number: masterParmas.number |
|||
} |
|||
} |
|||
} |
|||
if (row?.id || row?.masterId) { |
|||
formLoading.value = true |
|||
try { |
|||
nextTick(() => { |
|||
formRef.value.setValues(row) |
|||
}) |
|||
} finally { |
|||
formLoading.value = false |
|||
} |
|||
}else{ |
|||
if(row){ |
|||
nextTick(() => { |
|||
formRef.value.setValues(row) |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
// 添加数据 |
|||
const handleAddTable = () => { |
|||
if(props.isOpenSearchTable){ |
|||
const tableFormKeys = {} |
|||
tableAllSchemas.value.tableFormColumns.forEach(item => { |
|||
tableFormKeys[item.field] = item.default ? item.default : '' |
|||
}) |
|||
if(props.fieldTableColumn!=''){ |
|||
inpuFocus(tableAllSchemas.value.tableFormColumns.find(item=>item.field==props.fieldTableColumn),tableFormKeys,0) |
|||
} |
|||
}else{ |
|||
emit('handleAddTable') |
|||
} |
|||
|
|||
} |
|||
|
|||
/** 弹窗按钮 */ |
|||
let Butttondata:any = [] |
|||
if (props.isShowFooterButtton) { |
|||
Butttondata = [ |
|||
defaultButtons.formSaveBtn(null), // 保存 |
|||
defaultButtons.formCloseBtn(null) // 关闭 |
|||
] |
|||
} |
|||
if (props.footButttondata) { |
|||
Butttondata = props.footButttondata |
|||
} |
|||
|
|||
/** 按钮事件 */ |
|||
const buttonBaseClick = (val) => { |
|||
// 扩展 按钮事件回调 |
|||
if (props.footButttondata) { |
|||
emit('footButtonClick',val) |
|||
} |
|||
// 保存 |
|||
else if (val == 'save') { |
|||
submitForm() |
|||
} |
|||
// 关闭 |
|||
else if (val == 'close') { |
|||
dialogVisible.value = false |
|||
} |
|||
} |
|||
|
|||
/** 提交表单 */ |
|||
// const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 |
|||
|
|||
const tableFormRef = ref() |
|||
const submitForm = async () => { |
|||
const elForm = unref(formRef)?.getElFormRef() |
|||
// 校验表单 |
|||
if (!elForm) return |
|||
const valid = await elForm.validate() |
|||
if (!valid) return |
|||
// 针对主子表 明细校验 |
|||
if (props.isBusiness) { |
|||
formLoading.value = true |
|||
if (formType.value == 'create') { |
|||
const validateForm = await tableFormRef.value.validateForm() |
|||
if (!validateForm && props.tableFormDataLength) { |
|||
if (props.tableData.length == 0) { |
|||
message.warning('请填写明细信息!') |
|||
formLoading.value = false |
|||
return |
|||
} |
|||
formLoading.value = false |
|||
return |
|||
} |
|||
// 主子表——提交请求 |
|||
try { |
|||
const data = unref(formRef)?.formModel |
|||
emit('submitForm', formType.value, data) |
|||
} finally { |
|||
formLoading.value = false |
|||
} |
|||
} else { |
|||
// 编辑 |
|||
try { |
|||
const data = unref(formRef)?.formModel |
|||
emit('submitForm', formType.value, data) |
|||
} finally { |
|||
formLoading.value = false |
|||
} |
|||
} |
|||
} else { |
|||
// 基础数据单表——提交请求 |
|||
formLoading.value = true |
|||
try { |
|||
const data = unref(formRef)?.formModel |
|||
emit('success', formType.value, data) |
|||
} finally { |
|||
formLoading.value = false |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** 重置表单 */ |
|||
const resetForm = () => { |
|||
unref(formRef)?.resetFields() |
|||
} |
|||
|
|||
// 传递给父类 |
|||
const emit = defineEmits([ |
|||
'success', |
|||
'tableSelectionChange', |
|||
'tableSelectionDelete', |
|||
'tableFormSelectOnBlur', |
|||
'extendedButtonsClick', |
|||
'formSelectChange', |
|||
'formSelectvVisibleChange', |
|||
'tableSortChange', |
|||
'selectCallback', |
|||
'handleTableSelect', |
|||
'handleDeleteTable', |
|||
'handleAddTable', |
|||
'inpuFocus', |
|||
'searchTableSuccess', |
|||
'opensearchTable', |
|||
'submitForm', |
|||
'selectChange', |
|||
'selectChangeDetail', |
|||
'tableFormChange', |
|||
'buttonOperationClick', |
|||
'inputStringBlur', |
|||
'onChange', |
|||
'onBlur', |
|||
'onEnter', |
|||
'inputNumberChange', |
|||
'formFormDateChange', |
|||
'footButtonClick', |
|||
'clearSearchInput', |
|||
'clearInput', |
|||
'inputFocusPlan' |
|||
]) |
|||
//普通下拉改变事件 |
|||
const formSelectChange = (field, val, row) => { |
|||
emit('formSelectChange', field, val, row) |
|||
} |
|||
// 日期改变事件 |
|||
const formFormDateChange = (field, val,row, index) => { |
|||
emit('formFormDateChange', field, val,row, index) |
|||
} |
|||
const formSelectvVisibleChange = (field, val, row) => { |
|||
emit('formSelectvVisibleChange', field, val, row) |
|||
} |
|||
// 点击selection框 |
|||
const tableSelectionChange = (val) => { |
|||
emit('tableSelectionChange', val) |
|||
} |
|||
const tableSelectionDelete = (val) => { |
|||
emit('tableSelectionDelete', val) |
|||
} |
|||
// tableform select bulr |
|||
const tableFormSelectOnBlur = (field, val, row, index) => { |
|||
emit('tableFormSelectOnBlur', field, val, row, index) |
|||
} |
|||
// 列表排序 |
|||
const tableSortChange = (column, prop, order) => { |
|||
emit('tableSortChange', column, prop, order) |
|||
} |
|||
|
|||
// 数字输入-改变事件 |
|||
const inputNumberChange = (field, index, row, val) => { |
|||
emit('inputNumberChange', field, index, row, val) |
|||
} |
|||
//下拉框回显方法 |
|||
// const showSelect = (val, statusID) => { |
|||
// return getDictForStatusID(val, statusID) |
|||
// } |
|||
|
|||
// 行点击 |
|||
const handleTableSelect = (row, column, event) => { |
|||
emit('handleTableSelect', row, column, event) |
|||
} |
|||
|
|||
// 删除数据 |
|||
const handleDeleteTable = (row, index) => { |
|||
emit('handleDeleteTable', row, index,formRef.value) |
|||
} |
|||
const inputFocusPlan = (row)=>{ |
|||
emit('inputFocusPlan', row) |
|||
} |
|||
|
|||
|
|||
// 输入框聚焦 |
|||
const inpuFocus = (headerItem, row) => { |
|||
console.log(headerItem, row) |
|||
emit('inpuFocus', headerItem, row) |
|||
|
|||
opensearchTable( |
|||
headerItem.field, |
|||
headerItem.tableForm.searchField, |
|||
row?.searchTable?.searchTitle, |
|||
row?.searchTable?.searchAllSchemas, |
|||
row?.searchTable?.searchPage, |
|||
headerItem.tableForm.searchCondition, |
|||
headerItem.tableForm.multiple, |
|||
'tableForm', |
|||
row, |
|||
headerItem.tableForm?.isConcatDetailSchemas, |
|||
headerItem.tableForm?.searchDetailSchemas |
|||
) |
|||
} |
|||
const clearInput = (field, row, index) => { |
|||
emit('clearInput',field, row, index) |
|||
} |
|||
/** |
|||
* 监听改变事件 |
|||
* @param field 当前操作字段 |
|||
* @param cur 改变后值 |
|||
*/ |
|||
const onChange = (field, cur) => { |
|||
emit('onChange', field, cur, formRef) |
|||
} |
|||
|
|||
/** |
|||
* 监听失焦事件 |
|||
* @param field 当前操作字段 |
|||
* @param e |
|||
*/ |
|||
const onBlur = (field, e) => { |
|||
emit('onBlur', field, e) |
|||
} |
|||
/** |
|||
* 回车事件 |
|||
* @param field 当前操作字段 |
|||
* @param e |
|||
*/ |
|||
const onEnter = (field,value, e) => { |
|||
emit('onEnter', field,value, e) |
|||
} |
|||
|
|||
// 修改盘点类型 |
|||
const selectChange = (field, val) => { |
|||
emit('selectChange', field, val) |
|||
} |
|||
// 修改盘点范围类型 |
|||
const selectChangeDetail = (field, val,formSchema) => { |
|||
formSchema.value = '' |
|||
emit('selectChangeDetail', field, val) |
|||
} |
|||
|
|||
|
|||
const tableFormChange = (field, val, row) => { |
|||
emit('tableFormChange', field, val, row) |
|||
} |
|||
|
|||
const buttonOperationClick = (row, label, index)=> { |
|||
emit("buttonOperationClick", row, label, index); |
|||
} |
|||
|
|||
const inputStringBlur = (headerItem, row, index)=> { |
|||
emit("inputStringBlur", headerItem, row, index); |
|||
} |
|||
defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading ,handleAddTable,changeDialogWidth}) // 提供 open 方法,用于打开弹窗 |
|||
|
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.table { |
|||
border: 1px solid #dedede; |
|||
border-radius: 8px; |
|||
padding: 10px; |
|||
width: calc(100% - 32px); |
|||
display: flex; |
|||
} |
|||
::v-deep(.el-table__body) { |
|||
padding: 10px 0px; |
|||
} |
|||
::v-deep(.el-table--default .el-table__cell) { |
|||
padding: 2px 0px; |
|||
border: none; |
|||
} |
|||
|
|||
::v-deep(.el-table td.el-table__cell .el-form-item__content) { |
|||
display: flex !important; |
|||
align-items: center !important; |
|||
justify-content: center !important; |
|||
} |
|||
::v-deep(.el-table td.el-table__cell div) { |
|||
overflow: visible; |
|||
} |
|||
|
|||
::v-deep(.el-icon) { |
|||
display: block; |
|||
}button |
|||
.button { |
|||
> div { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
cursor: pointer; |
|||
|
|||
> div { |
|||
margin-left: 6px; |
|||
text-decoration: underline; |
|||
color: #409eff; |
|||
} |
|||
} |
|||
} |
|||
</style> |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue