chenfang 11 months ago
parent
commit
7bfef0c942
  1. 32
      src/api/wms/transferreceiptRequestMain/index.ts
  2. 2
      src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue
  3. 2
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  4. 6
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/index.vue
  5. 95
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue

32
src/api/wms/transferreceiptRequestMain/index.ts

@ -67,4 +67,34 @@ export const exportTransferreceiptRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transferreceipt-request-main/get-import-template' })
}
}
// 关闭-调拨入库申请
export const closeTransferreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/transferreceipt-request-main/close?id=` + id })
}
// 重新添加-调拨入库申请
export const reAddTransferreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/transferreceipt-request-main/reAdd?id=` + id })
}
// 提交审批-调拨入库申请
export const submitTransferreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/transferreceipt-request-main/submit?id=` + id })
}
// 审批驳回-调拨入库申请
export const refusedTransferreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/transferreceipt-request-main/refused?id=` + id })
}
// 审批通过-调拨入库申请
export const agreeTransferreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/transferreceipt-request-main/agree?id=` + id })
}
// 处理-调拨入库申请
export const handleTransferreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/transferreceipt-request-main/handle?id=` + id })
}

2
src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue

@ -178,7 +178,7 @@ const butttondata = (row) => {
return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-job-main:close'}), //
//defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}

2
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue

@ -204,7 +204,7 @@ const butttondata = (row) => {
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferissue-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferissue-request-main:agree'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:transferissue-request-main:handle'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:transferissue-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-request-main:update'}), //
]
}

6
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/index.vue

@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}

95
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue

@ -84,6 +84,11 @@ import * as TransferreceiptRequestMainApi from '@/api/wms/transferreceiptRequest
import * as TransferreceiptRequestDetailApi from '@/api/wms/transferreceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import {
closeTransferissueRequestMain,
closeTransferreceiptRequestMain, submitTransferreceiptRequestMain
} from "@/api/wms/transferreceiptRequestMain";
//
defineOptions({ name: 'TransferreceiptRequestMain' })
@ -148,8 +153,8 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:transferreceipt-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:transferreceipt-request-main:import'}), //
// defaultButtons.defaultAddBtn({hasPermi:'wms:transferreceipt-request-main:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:transferreceipt-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:transferreceipt-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -192,37 +197,105 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:transferreceipt-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:transferreceipt-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:transferreceipt-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:transferreceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferreceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferreceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferreceipt-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:transferreceipt-request-main:handle'}), //
// defaultButtons.mainListEditBtn({hasPermi:'wms:transferreceipt-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:transferreceipt-request-main:delete'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
}else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await TransferreceiptRequestMainApi.handleTransferreceiptRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await TransferreceiptRequestMainApi.agreeTransferreceiptRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await TransferreceiptRequestMainApi.refusedTransferreceiptRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await TransferreceiptRequestMainApi.submitTransferreceiptRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await TransferreceiptRequestMainApi.reAddTransferreceiptRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await TransferreceiptRequestMainApi.closeTransferreceiptRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {

Loading…
Cancel
Save