Browse Source

库存初始化

master
hongxi.lian 1 year ago
parent
commit
10f640f15b
  1. 28
      src/api/wms/inventoryinitRequestMain/index.ts
  2. 5
      src/api/wms/scrapRequestMain/index.ts
  3. 5
      src/api/wms/unplannedissueRequestMain/index.ts
  4. 7
      src/api/wms/unplannedreceiptRequestMain/index.ts
  5. 94
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue
  6. 2
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  7. 2
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  8. 2
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

28
src/api/wms/inventoryinitRequestMain/index.ts

@ -44,6 +44,29 @@ export const createInventoryinitRequestMain = async (data: InventoryinitRequestM
export const updateInventoryinitRequestMain = async (data: InventoryinitRequestMainVO) => { export const updateInventoryinitRequestMain = async (data: InventoryinitRequestMainVO) => {
return await request.put({ url: `/wms/inventoryinit-request-main/update`, data }) return await request.put({ url: `/wms/inventoryinit-request-main/update`, data })
} }
// 关闭库存初始化申请主 Excel
export const closeInventoryinitRequestMain = async (id) => {
return await request.put({ url: `/wms/inventoryinit-request-main/close?id=` + id })
}
// 重新添加库存初始化申请主 Excel
export const reAddInventoryinitRequestMain = async (id) => {
return await request.put({ url: `/wms/inventoryinit-request-main/reAdd?id=` + id })
}
// 审批驳回库存初始化申请主 Excel
export const refusedInventoryinitRequestMain = async (id) => {
return await request.put({ url: `/wms/inventoryinit-request-main/refused?id=` + id })
}
// 审批通过库存初始化申请主 Excel
export const agreeInventoryinitRequestMain = async (id) => {
return await request.put({ url: `/wms/inventoryinit-request-main/agree?id=` + id })
}
// 提交库存初始化申请主 Excel
export const submitInventoryinitRequestMain = async (id) => {
return await request.put({ url: `/wms/inventoryinit-request-main/submit?id=` + id })
}
// 删除库存初始化申请主 // 删除库存初始化申请主
export const deleteInventoryinitRequestMain = async (id: number) => { export const deleteInventoryinitRequestMain = async (id: number) => {
@ -59,3 +82,8 @@ export const exportInventoryinitRequestMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/inventoryinit-request-main/get-import-template' }) return request.download({ url: '/wms/inventoryinit-request-main/get-import-template' })
} }
// 处理采购收货申请主 Excel
export const handleInventoryinitRequestMain = async (id) => {
return await request.put({ url: `/wms/inventoryinit-request-main/handle?id=` + id })
}

5
src/api/wms/scrapRequestMain/index.ts

@ -54,8 +54,13 @@ export const deleteScrapRequestMain = async (id: number) => {
// 导出报废出库申请主 Excel // 导出报废出库申请主 Excel
export const exportScrapRequestMain = async (params) => { export const exportScrapRequestMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/scrap-request-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/scrap-request-main/export-excel`, params }) return await request.download({ url: `/wms/scrap-request-main/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

5
src/api/wms/unplannedissueRequestMain/index.ts

@ -55,8 +55,13 @@ export const deleteUnplannedissueRequestMain = async (id: number) => {
// 导出计划外出库申请主 Excel // 导出计划外出库申请主 Excel
export const exportUnplannedissueRequestMain = async (params) => { export const exportUnplannedissueRequestMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/unplannedissue-request-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/unplannedissue-request-main/export-excel`, params }) return await request.download({ url: `/wms/unplannedissue-request-main/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

7
src/api/wms/unplannedreceiptRequestMain/index.ts

@ -54,8 +54,15 @@ export const deleteUnplannedreceiptRequestMain = async (id: number) => {
// 导出计划外入库申请主 Excel // 导出计划外入库申请主 Excel
export const exportUnplannedreceiptRequestMain = async (params) => { export const exportUnplannedreceiptRequestMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/unplannedreceipt-request-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/unplannedreceipt-request-main/export-excel`, params }) return await request.download({ url: `/wms/unplannedreceipt-request-main/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

94
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue

@ -179,30 +179,31 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventoryinit-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:inventoryinit-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventoryinit-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventoryinit-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventoryinit-request-main:agree'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:inventoryinit-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventoryinit-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventoryinit-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventoryinit-request-main:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventoryinit-request-main:delete'}), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭') handleClose(row.id)
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加') handleReAdd(row.id)
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批') handleSubmit(row.id)
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回') handleRefused(row.id)
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过') handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
@ -210,6 +211,73 @@ const buttonTableClick = async (val, row) => {
} }
} }
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await InventoryinitRequestMainApi.closeInventoryinitRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await InventoryinitRequestMainApi.reAddInventoryinitRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await InventoryinitRequestMainApi.submitInventoryinitRequestMain(id)
message.success(t('common.updateSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await InventoryinitRequestMainApi.agreeInventoryinitRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await InventoryinitRequestMainApi.handleInventoryinitRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await InventoryinitRequestMainApi.refusedInventoryinitRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {

2
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -250,7 +250,7 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await ScrapRequestMainApi.exportScrapRequestMain(setSearchParams) const data = await ScrapRequestMainApi.exportScrapRequestMain(tableObject.params)
download.excel(data, '报废出库申请主.xlsx') download.excel(data, '报废出库申请主.xlsx')
} catch { } catch {
} finally { } finally {

2
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

@ -254,7 +254,7 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await UnplannedissueRequestMainApi.exportUnplannedissueRequestMain(setSearchParams) const data = await UnplannedissueRequestMainApi.exportUnplannedissueRequestMain(tableObject.params)
download.excel(data, '计划外出库申请主.xlsx') download.excel(data, '计划外出库申请主.xlsx')
} catch { } catch {
} finally { } finally {

2
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -262,7 +262,7 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await UnplannedreceiptRequestMainApi.exportUnplannedreceiptRequestMain(setSearchParams) const data = await UnplannedreceiptRequestMainApi.exportUnplannedreceiptRequestMain(tableObject.params)
download.excel(data, '计划外入库申请主.xlsx') download.excel(data, '计划外入库申请主.xlsx')
} catch { } catch {
} finally { } finally {

Loading…
Cancel
Save