diff --git a/src/api/wms/containerRecordMain/index.ts b/src/api/wms/containerRecordMain/index.ts index 044e9d8ba..3fe4f2c53 100644 --- a/src/api/wms/containerRecordMain/index.ts +++ b/src/api/wms/containerRecordMain/index.ts @@ -58,7 +58,8 @@ export const exportContainerRecordMain = async (params) => { } // 导出器具管理初始化记录主 Excel -export const exportContainerInitRecordMain = async (params) => { +export const exportContainerInitialRecordMain = async (params) => { + params.businessType = 'InitialContainerManage' if (params.isSearch) { delete params.isSearch const data = { ...params } @@ -68,6 +69,66 @@ export const exportContainerInitRecordMain = async (params) => { } } +// 导出器具管理创建记录主 Excel +export const exportContainerCreateRecordMain = async (params) => { + params.businessType = 'CreateContainerManage' + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.downloadPost({ url: '/wms/container-record-main/export-excel-init-senior', data }) + } else { + return await request.download({ url: `/wms/container-record-main/export-excel-init`, params }) + } +} + +// 导出器具管理返回记录主 Excel +export const exportContainerReturnRecordMain = async (params) => { + params.businessType = 'CreateContainerManage' +if (params.isSearch) { +delete params.isSearch +const data = { ...params } +return await request.downloadPost({ url: '/wms/container-record-main/export-excel-senior', data }) +} else { +return await request.download({ url: `/wms/container-record-main/export-excel`, params }) +} +} + +// 导出器具管理移动记录主 Excel +export const exportContainerMoveRecordMain = async (params) => { + params.businessType = 'MoveContainerManage' +if (params.isSearch) { +delete params.isSearch +const data = { ...params } +return await request.downloadPost({ url: '/wms/container-record-main/export-excel-senior', data }) +} else { +return await request.download({ url: `/wms/container-record-main/export-excel`, params }) +} +} + +// 导出器具管理报废记录主 Excel +export const exportContainerScrapRecordMain = async (params) => { + params.businessType = 'ScrapContainerManage' +if (params.isSearch) { +delete params.isSearch +const data = { ...params } +return await request.downloadPost({ url: '/wms/container-record-main/export-excel-scrap-senior', data }) +} else { +return await request.download({ url: `/wms/container-record-main/export-excel-scrap`, params }) +} +} + +// 导出器具管理发运记录主 Excel +export const exportContainerDeliverRecordMain = async (params) => { + params.businessType = 'DeliverContainerManage' +if (params.isSearch) { +delete params.isSearch +const data = { ...params } +return await request.downloadPost({ url: '/wms/container-record-main/export-excel-init-senior', data }) +} else { +return await request.download({ url: `/wms/container-record-main/export-excel-init`, params }) +} +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/container-record-main/get-import-template' }) diff --git a/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/createContainerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/createContainerRecordMain.data.ts index fced84e20..8c168ccb5 100644 --- a/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/createContainerRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/createContainerRecordMain.data.ts @@ -232,11 +232,11 @@ export const ContainerRecordDetail = useCrudSchemas(reactive([ field: 'containerNumber', sort: 'custom' }, - { - label: '来源库位代码', - field: 'fromLocationCode', - sort: 'custom', - }, + // { + // label: '来源库位代码', + // field: 'fromLocationCode', + // sort: 'custom', + // }, { label: '目标库位代码', field: 'toLocationCode', diff --git a/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/index.vue index 571136246..5d482ed10 100644 --- a/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/index.vue @@ -141,7 +141,7 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) + const data = await ContainerRecordMainApi.exportContainerCreateRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { diff --git a/src/views/wms/inventoryjobManage/containermanage/deliverContainerRecordMain/deliverContainerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/deliverContainerRecordMain/deliverContainerRecordMain.data.ts index 8b65a711b..ab4b00f7d 100644 --- a/src/views/wms/inventoryjobManage/containermanage/deliverContainerRecordMain/deliverContainerRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/deliverContainerRecordMain/deliverContainerRecordMain.data.ts @@ -39,7 +39,7 @@ export const ContainerRecordMain = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, dictClass: 'string', - isSearch: true, + isSearch: false, isTable: true, table: { width: 120 diff --git a/src/views/wms/inventoryjobManage/containermanage/deliverContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/deliverContainerRecordMain/index.vue index 75f0171f2..96e5efbe4 100644 --- a/src/views/wms/inventoryjobManage/containermanage/deliverContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/deliverContainerRecordMain/index.vue @@ -1,7 +1,11 @@ - - - - - item.field != "fromLocationCode") -// ContainerRecordDetailAllSchemas.value.tableMainColumns = array -// tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetailAllSchemas.value.tableMainColumns] -// } -// else { -// ContainerRecordDetail.allSchemas.tableMainColumns =JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas.tableMainColumns)) -// tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetail.allSchemas.tableMainColumns] -// } - +tableObject.params = { + type:'DELIVER' +} +importFileName.value = '器具发运记录' // 字段设置 更新主列表字段 @@ -135,26 +101,11 @@ const HeadButttondata = [ defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 - // { - // label: '自定义扩展按钮', - // name: 'zdy', - // hide: false, - // type: 'primary', - // icon: 'Select', - // color: '' - // }, ] -const searchList = (model)=>{ - model.type = searchType.value - setSearchParams(model) -} - // 头部按钮事件 const buttonBaseClick = (val, item) => { - if (val == 'add') { // 新增 - openForm('create') - } else if (val == 'export') { // 导出 + if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { @@ -169,28 +120,6 @@ const buttonBaseClick = (val, item) => { console.log('其他按钮', item) } } - -// 列表-操作按钮 -const butttondata = (row,$index) => { -const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 - if(findIndex>-1&&findIndex<$index){ - return [] - } - return [ - // defaultButtons.mainListEditBtn({hasPermi:`wms:{routeName.value}:update`}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:`wms:{routeName.value}:delete`}), // 删除 - ] -} - -// 列表-操作按钮事件 -const buttonTableClick = async (val, row) => { - if (val == 'edit') { // 编辑 - openForm('update', row) - } else if (val == 'delete') { // 删除 - handleDelete(row.id) - } -} - // 获取部门 用于详情 部门回显 const { wsCache } = useCache() /** 详情操作 */ @@ -201,24 +130,8 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue,"recordContainerMain") } -/** 添加/修改操作 */ -const basicFormRef = ref() -const openForm = (type: string, row?: any) => { - basicFormRef.value.open(type, row) -} -/** 删除按钮操作 */ -const handleDelete = async (id: number) => { - try { - // 删除的二次确认 - await message.delConfirm() - // 发起删除 - await ContainerRecordMainApi.deleteContainerRecordMain(id) - message.success(t('common.delSuccess')) - // 刷新列表 - buttonBaseClick('refresh',null) - } catch {} -} + /** 导出按钮操作 */ const handleExport = async () => { @@ -228,13 +141,8 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - if(businessType.value = 'InitialContainerManage'){ - const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - }else { - const data = await ContainerRecordMainApi.exportContainerRecordMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - } + const data = await ContainerRecordMainApi.exportContainerDeliverRecordMain(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { loadDone() @@ -246,7 +154,7 @@ const searchFormClick = (searchData) => { const cmd = { 'column':'type', 'action':'==', - 'value': 'CREATE' + 'value':'DELIVER' } if (!Array.isArray(searchData.filters)) { searchData.filters = []; diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/index.vue index c8a01b99a..d4250529d 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/index.vue @@ -141,7 +141,7 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) + const data = await ContainerRecordMainApi.exportContainerInitialRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/initialContainerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/initialContainerRecordMain.data.ts index 3cdb48b7e..2e7b5acec 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/initialContainerRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/initialContainerRecordMain.data.ts @@ -224,11 +224,11 @@ export const ContainerRecordDetail = useCrudSchemas(reactive([ field: 'containerNumber', sort: 'custom' }, - { - label: '来源库位代码', - field: 'fromLocationCode', - sort: 'custom', - }, + // { + // label: '来源库位代码', + // field: 'fromLocationCode', + // sort: 'custom', + // }, { label: '目标库位代码', field: 'toLocationCode', diff --git a/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/index.vue index 922e87f07..8148eb19d 100644 --- a/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/index.vue @@ -141,7 +141,7 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) + const data = await ContainerRecordMainApi.exportContainerMoveRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { diff --git a/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/index.vue index 8513b0510..ab0bb9633 100644 --- a/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/index.vue @@ -141,7 +141,7 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) + const data = await ContainerRecordMainApi.exportContainerReturnRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/index.vue index 8602f94c8..f890fbc6a 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/index.vue @@ -140,7 +140,7 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) + const data = await ContainerRecordMainApi.exportContainerScrapRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/scrapContainerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/scrapContainerRecordMain.data.ts index b1c978291..581cb1d1f 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/scrapContainerRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/scrapContainerRecordMain.data.ts @@ -228,13 +228,13 @@ export const ContainerRecordDetail = useCrudSchemas(reactive([ field: 'fromLocationCode', sort: 'custom', }, + // { + // label: '目标库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // }, { - label: '目标库位代码', - field: 'toLocationCode', - sort: 'custom', - }, - { - label: '到数量', + label: '数量', field: 'toQty', sort: 'custom', },