Browse Source

备件入库导出

master_hella_20240701
zhang_li 5 months ago
parent
commit
9998932c41
  1. 19
      src/api/eam/sparePartsInLocationMain/index.ts
  2. 2
      src/views/eam/sparepartsinlocation/index.vue
  3. 68
      src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

19
src/api/eam/sparePartsInLocationMain/index.ts

@ -23,7 +23,7 @@ export interface SparePartsInLocationMainVO {
concurrencyStamp: number concurrencyStamp: number
} }
// 查询备件领用出库记录主列表 // 查询备件库记录主列表
export const getSparePartsInLocationMainPage = async (params) => { export const getSparePartsInLocationMainPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
@ -34,29 +34,34 @@ export const getSparePartsInLocationMainPage = async (params) => {
} }
} }
// 查询备件领用出库记录主详情 // 查询备件库记录主详情
export const getSparePartsInLocationMain = async (id: number) => { export const getSparePartsInLocationMain = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-in-location-main/get?id=` + id }) return await request.get({ url: `/eam/spare-parts-in-location-main/get?id=` + id })
} }
// 新增备件领用出库记录主 // 新增备件库记录主
export const createSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => { export const createSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => {
return await request.post({ url: `/eam/spare-parts-in-location-main/create`, data }) return await request.post({ url: `/eam/spare-parts-in-location-main/create`, data })
} }
// 修改备件领用出库记录主 // 修改备件库记录主
export const updateSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => { export const updateSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => {
return await request.put({ url: `/eam/spare-parts-in-location-main/update`, data }) return await request.put({ url: `/eam/spare-parts-in-location-main/update`, data })
} }
// 删除备件领用出库记录主 // 删除备件库记录主
export const deleteSparePartsInLocationMain = async (id: number) => { export const deleteSparePartsInLocationMain = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-in-location-main/delete?id=` + id }) return await request.delete({ url: `/eam/spare-parts-in-location-main/delete?id=` + id })
} }
// 导出备件领用出库记录主 Excel // 导出备件库记录主 Excel
export const exportSparePartsInLocationMain = async (params) => { 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 })
}
} }
// 下载用户导入模板 // 下载用户导入模板

2
src/views/eam/sparepartsinlocation/index.vue

@ -170,7 +170,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn(null), // defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn(null), // // defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //

68
src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

@ -30,14 +30,14 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '编号', label: '编号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: true,
isForm: false, isForm: false,
}, },
{ {
label: '入库主题', label: '入库主题',
field: 'theme', field: 'theme',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: true,
}, },
{ {
label: '流程状态', label: '流程状态',
@ -162,40 +162,6 @@ export const SparePartsInLocationDetailRules = reactive({
}) })
export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
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: '库位编号', label: '库位编号',
field: 'locationCode', field: 'locationCode',
@ -219,19 +185,19 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm: { tableForm: {
isInpuFocusShow: true, // isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号', // 输入框占位文本 // searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段 // searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题 // searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 // searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [ // searchCondition: [
{ // {
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
} // }
] // ]
} }
}, },
{ {
@ -245,7 +211,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm:{ tableForm:{
disabled: true // disabled: true
} }
}, },
{ {
@ -261,7 +227,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm:{ tableForm:{
disabled: true // disabled: true
} }
}, },
{ {

Loading…
Cancel
Save