From 9998932c4174e10f08219b0908766a5269673489 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 11 Jun 2024 15:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=B6=E5=85=A5=E5=BA=93=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/sparePartsInLocationMain/index.ts | 19 ++++-- src/views/eam/sparepartsinlocation/index.vue | 2 +- .../sparePartsInLocationMain.data.ts | 68 +++++-------------- 3 files changed, 30 insertions(+), 59 deletions(-) diff --git a/src/api/eam/sparePartsInLocationMain/index.ts b/src/api/eam/sparePartsInLocationMain/index.ts index 100f8fdb9..528bbb907 100644 --- a/src/api/eam/sparePartsInLocationMain/index.ts +++ b/src/api/eam/sparePartsInLocationMain/index.ts @@ -23,7 +23,7 @@ export interface SparePartsInLocationMainVO { concurrencyStamp: number } -// 查询备件领用出库记录主列表 +// 查询备件入库记录主列表 export const getSparePartsInLocationMainPage = async (params) => { if (params.isSearch) { delete params.isSearch @@ -34,29 +34,34 @@ export const getSparePartsInLocationMainPage = async (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 +// 导出备件入库记录主 Excel export const exportSparePartsInLocationMain = async (params) => { - return await request.download({ url: `/eam/spare-parts-in-location-main/export-excel`, 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 }) + } } // 下载用户导入模板 diff --git a/src/views/eam/sparepartsinlocation/index.vue b/src/views/eam/sparepartsinlocation/index.vue index f739ba809..1ad5d3387 100644 --- a/src/views/eam/sparepartsinlocation/index.vue +++ b/src/views/eam/sparepartsinlocation/index.vue @@ -170,7 +170,7 @@ const { getList, setSearchParams } = tableMethods const HeadButttondata = [ defaultButtons.defaultAddBtn(null), // 新增 // defaultButtons.defaultImportBtn(null), // 导入 - // defaultButtons.defaultExportBtn(null), // 导出 + defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 diff --git a/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts b/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts index 5908cfbd3..865f8cf1e 100644 --- a/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts +++ b/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts @@ -30,14 +30,14 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive([ label: '编号', field: 'number', sort: 'custom', - isSearch: false, + isSearch: true, isForm: false, }, { label: '入库主题', field: 'theme', sort: 'custom', - isSearch: false, + isSearch: true, }, { label: '流程状态', @@ -162,40 +162,6 @@ export const SparePartsInLocationDetailRules = reactive({ }) export const SparePartsInLocationDetail = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - isTableForm:false - }, - { - label: '单号', - field: 'number', - sort: 'custom', - - isSearch: false, - isTable: false, - isForm: false, - isTableForm:false - }, - { - label: '主表ID', - field: 'masterId', - sort: 'custom', - form: { - component: 'InputNumber', - value: 0 - }, - isSearch: false, - isTable: false, - isForm: false, - isTableForm:false - }, { label: '库位编号', field: 'locationCode', @@ -219,19 +185,19 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive( } }, tableForm: { - isInpuFocusShow: true, - searchListPlaceholder: '请选择备件编号', // 输入框占位文本 - searchField: 'itemNumber', // 查询弹窗赋值字段 - searchTitle: '备件信息', // 查询弹窗标题 - searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 - searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - } - ] + // isInpuFocusShow: true, + // searchListPlaceholder: '请选择备件编号', // 输入框占位文本 + // searchField: 'itemNumber', // 查询弹窗赋值字段 + // searchTitle: '备件信息', // 查询弹窗标题 + // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + // searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + // searchCondition: [ + // { + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // } + // ] } }, { @@ -245,7 +211,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive( } }, tableForm:{ - disabled: true + // disabled: true } }, { @@ -261,7 +227,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive( } }, tableForm:{ - disabled: true + // disabled: true } }, {