diff --git a/src/api/wms/customerreceiptRequestMain/index.ts b/src/api/wms/customerreceiptRequestMain/index.ts index 71944e655..0704cd06d 100644 --- a/src/api/wms/customerreceiptRequestMain/index.ts +++ b/src/api/wms/customerreceiptRequestMain/index.ts @@ -1,8 +1,8 @@ import request from '@/config/axios' export interface CustomerreceiptRequestMainVO { - deliverRequestNumber: string - deliverPlanNumber: string + customerreceiptRequestNumber: string + customerreceiptPlanNumber: string customerCode: string customerDockCode: string carrierCode: string @@ -65,4 +65,34 @@ export const deleteCustomerreceiptRequestMain = async (id: number) => { // 导出客户收货申请主 Excel export const exportCustomerreceiptRequestMain = async (params) => { return await request.download({ url: `/wms/customerreceipt-request-main/export-excel`, params }) +} + +// 关闭 +export const close = (id) => { + return request.put({ url: '/wms/customerreceipt-request-main/close?id=' + id }) +} + +// 重新添加 +export const reAdd = (id) => { + return request.put({ url: '/wms/customerreceipt-request-main/reAdd?id=' + id }) +} + +// 提交审批 +export const submit = (id) => { + return request.put({ url: '/wms/customerreceipt-request-main/submit?id=' + id }) +} + +// 驳回 +export const refused = (id) => { + return request.put({ url: '/wms/customerreceipt-request-main/refused?id=' + id }) +} + +// 审批通过 +export const agree = (id) => { + return request.put({ url: '/wms/customerreceipt-request-main/agree?id=' + id }) +} + +// 处理 +export const handle = (id) => { + return request.put({ url: '/wms/customerreceipt-request-main/handle?id=' + id }) } \ No newline at end of file diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue index 9c3a59af3..afde0dc20 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue @@ -184,7 +184,7 @@ const isShowMainButton = (row,val) => { const butttondata = (row) => { return [ defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:customerreceipt-request-main:close'}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:customerreceipt-request-main:reAdd'}), //重新添加 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:customerreceipt-request-main:reAdd'}), //重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customerreceipt-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customerreceipt-request-main:refused'}), // 驳回 defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customerreceipt-request-main:agree'}), // 审批通过 @@ -198,15 +198,53 @@ const butttondata = (row) => { // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainClose') { // 关闭 - console.log('列表-操作按钮事件-关闭') + await message.confirm('确认要关闭吗?') + CustomerreceiptRequestMainApi.close(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainReAdd') { // 重新添加 - console.log('列表-操作按钮事件-重新添加') + await message.confirm('确认要重新添加吗?') + CustomerreceiptRequestMainApi.reAdd(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainSubmit') { // 提交审批 - console.log('列表-操作按钮事件-提交审批') + await message.confirm('确认要重新添加吗?') + CustomerreceiptRequestMainApi.submit(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainTurnDown') { // 驳回 - console.log('列表-操作按钮事件-驳回') + await message.confirm('确认要重新添加吗?') + CustomerreceiptRequestMainApi.refused(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainApprove') { // 审批通过 - console.log('列表-操作按钮事件-审批通过') + await message.confirm('确认要审批通过吗?') + CustomerreceiptRequestMainApi.agree(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) + } else if (val == 'mainHandle') { // 处理 + await message.confirm('确认要 处理吗?') + CustomerreceiptRequestMainApi.handle(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'edit') { // 编辑 openForm('update', row) } else if (val == 'delete') { // 删除 diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue index 11a7bee1d..6b49cb703 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue @@ -174,10 +174,10 @@ 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.mainListJobExeBtn({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'])}), // 执行 ] } diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue index a300a7250..28a65ce3e 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue @@ -198,7 +198,7 @@ const isShowMainButton = (row,val) => { const butttondata = (row) => { return [ defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:customersettle-request-main:close'}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:customersettle-request-main:reAdd'}), //重新添加 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:customersettle-request-main:reAdd'}), //重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customersettle-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customersettle-request-main:refused'}), // 驳回 defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customersettle-request-main:agree'}), // 审批通过 diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue index e2c62302d..544dfd1f4 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue @@ -174,10 +174,10 @@ 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.mainListJobExeBtn({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'])}), // 执行 ] }