feat(wls): 发货通知/销售出库列表增加「提交」按钮
问题:发货通知的「提交」按钮只在编辑弹窗左下角,列表里没有,
用户找不到,导致状态一直是草稿(0),而「生成出库单」按钮要求
状态=待出库(3),所以按钮不出现,流程卡住。
销售出库同理(提交后才能拣货)。
改动:
- 发货通知列表行操作增加「提交」(草稿状态显示),提交后状态
0(草稿) → 3(待出库),「生成出库单」按钮随即出现
- 销售出库列表行操作增加「提交」(草稿状态显示),提交后状态
0(草稿) → 2(待拣货),「拣货」按钮随即出现
已验证:发货通知提交后 status 0→3 并成功生成出库单;
出库单提交后 status 0→2(待拣货)。
| | |
| | | deleteProductSales, |
| | | exportProductSales, |
| | | getProductSalesPage, |
| | | submitProductSales, |
| | | } from '#/api/mes/wm/productsales'; |
| | | import { $t } from '#/locales'; |
| | | |
| | |
| | | /** 编辑销售出库单 */ |
| | | function handleEdit(row: MesWmProductSalesApi.ProductSales) { |
| | | formModalApi.setData({ formType: 'update', id: row.id }).open(); |
| | | } |
| | | |
| | | /** 提交销售出库单(草稿 → 待拣货) */ |
| | | async function handleSubmitSales(row: MesWmProductSalesApi.ProductSales) { |
| | | const hideLoading = message.loading({ |
| | | content: '正在提交...', |
| | | duration: 0, |
| | | }); |
| | | try { |
| | | await submitProductSales(row.id!); |
| | | message.success('提交成功,可以拣货了'); |
| | | handleRefresh(); |
| | | } finally { |
| | | hideLoading(); |
| | | } |
| | | } |
| | | |
| | | /** 执行拣货 */ |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: '提交', |
| | | type: 'link', |
| | | icon: 'ant-design:check-circle-outlined', |
| | | auth: ['mes:wm-product-sales:submit'], |
| | | ifShow: row.status === MesWmProductSalesStatusEnum.PREPARE, |
| | | popConfirm: { |
| | | title: '确认提交该销售出库单?提交后才能拣货。', |
| | | confirm: handleSubmitSales.bind(null, row), |
| | | }, |
| | | }, |
| | | { |
| | | label: '拣货', |
| | | type: 'link', |
| | | auth: ['mes:wm-product-sales:stock'], |
| | |
| | | generateFromSaleOrder, |
| | | generateProductSales, |
| | | getSalesNoticePage, |
| | | submitSalesNotice, |
| | | } from '#/api/mes/wm/salesnotice'; |
| | | import { $t } from '#/locales'; |
| | | import SaleOrderSelectDialog from '#/views/erp/sale/order/components/select-dialog.vue'; |
| | |
| | | }); |
| | | } catch (e) { |
| | | console.error(e); |
| | | } |
| | | } |
| | | |
| | | /** 提交发货通知单(草稿 → 待出库) */ |
| | | async function handleSubmitNotice(row: MesWmSalesNoticeApi.SalesNotice) { |
| | | const hideLoading = message.loading({ |
| | | content: '正在提交...', |
| | | duration: 0, |
| | | }); |
| | | try { |
| | | await submitSalesNotice(row.id!); |
| | | message.success('提交成功,可以生成出库单了'); |
| | | handleRefresh(); |
| | | } finally { |
| | | hideLoading(); |
| | | } |
| | | } |
| | | |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: '提交', |
| | | type: 'link', |
| | | icon: 'ant-design:check-circle-outlined', |
| | | auth: ['mes:wm-sales-notice:update'], |
| | | ifShow: row.status === MesWmSalesNoticeStatusEnum.PREPARE, |
| | | popConfirm: { |
| | | title: '确认提交该发货通知单?提交后才能生成出库单。', |
| | | confirm: handleSubmitNotice.bind(null, row), |
| | | }, |
| | | }, |
| | | { |
| | | label: '生成出库单', |
| | | type: 'link', |
| | | icon: 'ant-design:file-protect-outlined', |