Browse Source

计划外出库开发完成

master
zhaoxuebing 11 months ago
parent
commit
d1ef7259d0
  1. 30
      src/api/wms/unplannedissueRequestMain/index.ts
  2. 6
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue
  3. 84
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

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

@ -67,3 +67,33 @@ export const exportUnplannedissueRequestMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-request-main/get-import-template' }) return request.download({ url: '/wms/unplannedissue-request-main/get-import-template' })
} }
// 关闭-计划外出库申请
export const closeUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/close?id=` + id })
}
// 重新添加-计划外出库申请
export const reAddUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/reAdd?id=` + id })
}
// 提交审批-计划外出库申请
export const submitUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/submit?id=` + id })
}
// 审批驳回-计划外出库申请
export const refusedUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/refused?id=` + id })
}
// 审批通过-计划外出库申请
export const agreeUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/agree?id=` + id })
}
// 处理-计划外出库申请
export const handleUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/handle?id=` + id })
}

6
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue

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

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

@ -82,6 +82,7 @@ import { UnplannedissueRequestMain,UnplannedissueRequestMainRules,Unplannedissue
import * as UnplannedissueRequestMainApi from '@/api/wms/unplannedissueRequestMain' import * as UnplannedissueRequestMainApi from '@/api/wms/unplannedissueRequestMain'
import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequestDetail' import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as TransferissueRequestMainApi from "@/api/wms/transferissueRequestMain";
// //
defineOptions({ name: 'UnplannedissueRequestMain' }) defineOptions({ name: 'UnplannedissueRequestMain' })
@ -190,13 +191,14 @@ 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']),hasPermi:'wms:unplannedissue-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedissue-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedissue-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedissue-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedissue-request-main:agree'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:unplannedissue-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedissue-request-main:handle'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedissue-request-main:delete'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedissue-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedissue-request-main:delete'}), //
] ]
} }
@ -206,14 +208,21 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭') console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加') console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批') console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回') console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过') 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') { //
@ -221,6 +230,67 @@ const buttonTableClick = async (val, row) => {
} }
} }
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await UnplannedissueRequestMainApi.handleUnplannedissueRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await UnplannedissueRequestMainApi.agreeUnplannedissueRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await UnplannedissueRequestMainApi.refusedUnplannedissueRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await UnplannedissueRequestMainApi.submitUnplannedissueRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await UnplannedissueRequestMainApi.closeUnplannedissueRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await UnplannedissueRequestMainApi.reAddUnplannedissueRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {

Loading…
Cancel
Save