From a96820c47c0d0bce72ed2c2e19ecd12e68646029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=AE=E5=BB=BA?= <450837357@qq.com> Date: Thu, 22 May 2025 14:40:03 +0800 Subject: [PATCH] first --- src/hooks/common/useBtn.tsx | 1 - src/service/api/wms/MYWMS.d.ts | 2 + src/service/api/wms/recpt.ts | 3 + src/views/sale/saleOrder/index.vue | 38 +++- src/views/storage/rawProduceIn/index.vue | 265 ++++++++++++++++++++++- 5 files changed, 302 insertions(+), 7 deletions(-) diff --git a/src/hooks/common/useBtn.tsx b/src/hooks/common/useBtn.tsx index 5c31e46..f3703f7 100644 --- a/src/hooks/common/useBtn.tsx +++ b/src/hooks/common/useBtn.tsx @@ -235,7 +235,6 @@ export function useDelBtn( size={size} onClick={throttle(delDialog, 500)} class="mr-5px" - v-permission={permission} > {value} diff --git a/src/service/api/wms/MYWMS.d.ts b/src/service/api/wms/MYWMS.d.ts index a36cee6..37ff2b0 100644 --- a/src/service/api/wms/MYWMS.d.ts +++ b/src/service/api/wms/MYWMS.d.ts @@ -172,6 +172,8 @@ declare namespace wms { salseBy?: string | null; // 业务员 salseByNick?: string | null; // 业务员名称 + checkedBy?: string; // 审批人 + checkedTime?: number; // 审批时间 } } namespace recptLineRawType { diff --git a/src/service/api/wms/recpt.ts b/src/service/api/wms/recpt.ts index 71df9cf..bc5857a 100644 --- a/src/service/api/wms/recpt.ts +++ b/src/service/api/wms/recpt.ts @@ -26,6 +26,9 @@ export function getWmsItemRecpt(id: string | number) { export function addWmsItemRecpt(data: any) { return request.post(`${prefix}add`, data); } +export function approveWmsItemRecpt(data: any) { + return request.post(`${prefix}approve`, data); +} // 编辑 export function editWmsItemRecpt(data: any) { diff --git a/src/views/sale/saleOrder/index.vue b/src/views/sale/saleOrder/index.vue index ebd62e1..fc687ff 100644 --- a/src/views/sale/saleOrder/index.vue +++ b/src/views/sale/saleOrder/index.vue @@ -557,6 +557,9 @@ const columns: Ref> = ref([ '2': { label: '已排产', type: 'success' }, '3': { label: '生产中', type: 'warning' }, '4': { label: '已完成', type: 'success' }, + '5': { label: '已完成', type: 'success' }, + '8': { label: '申请发货中', type: 'primary' }, + '9': { label: '已发货', type: 'success' }, '6': { label: '已驳回', type: 'error' } }; const { label, type } = statusMap[row.status || '0']; @@ -644,6 +647,13 @@ const columns: Ref> = ref([ }, 'small') ) } + + if(row.status === '4' || row.status === '5'){ + actions.push( + handleSend(row)}>申请发货 + + ) + } // 编辑和删除按钮 actions.push( useDelBtn(() => { @@ -734,6 +744,33 @@ const workorderHandleCancel = () => { workorderFlag.value = false; addWorkorderForm.value.orderId = null; }; + +function handleSend(row){ + return dialog.warning({ + title: '提示', + content:"申请后需仓管审核后发货,确认申请发货?", + style: { + borderRadius: '10px' + }, + positiveText: '确定', + negativeText: '取消', + maskClosable: false, + onClose: () => { + console.log(1); + }, + onPositiveClick: () => { + editSaleOrder({id: row.id, status: '8'}).then((res: any) => { + if (res.code === 200) { + message.success('申请成功'); + init(); + } + }); + }, + onNegativeClick: () => { + console.log(1); + } + }); +} function handleInfo(row) { if (row.status !== '0') { message.warning('请先完成订单审批'); @@ -942,7 +979,6 @@ onMounted(() => {