fix: 将日计划追加入口移至管理页面

This commit is contained in:
zhouz
2026-08-14 17:01:02 +08:00
parent 8c61bb93e7
commit 480ab45913
2 changed files with 12 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ import StartOrder from './modules/start-order.vue';
const SOURCE_MANUAL = 2;
const ORDER_NOT_STARTED = 0;
const ORDER_IN_PROGRESS = 1;
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: Form,
@@ -57,6 +58,10 @@ function handleCancel(row: LmsDailyPlanApi.DailyPlan) {
operationModalApi.setData({ row, type: 'cancelOrder' }).open();
}
function handleAppend(row: LmsDailyPlanApi.DailyPlan) {
operationModalApi.setData({ row, type: 'append' }).open();
}
const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: useGridFormSchema(),
@@ -136,6 +141,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
ifShow: row.orderStatus === ORDER_NOT_STARTED,
onClick: handleStart.bind(null, row),
},
{
label: '追加数量',
type: 'link',
auth: ['lms:daily-plan:start'],
ifShow: row.orderStatus === ORDER_IN_PROGRESS,
onClick: handleAppend.bind(null, row),
},
{
label: '取消订单',
type: 'link',

View File

@@ -254,7 +254,6 @@ onMounted(loadStrategies);
<TableAction
:actions="[
{ label: '详情', type: 'link', auth: ['lms:daily-plan:query'], onClick: handleDetail.bind(null, row) },
{ label: '追加', type: 'link', auth: ['lms:daily-plan:start'], ifShow: row.orderStatus === ORDER_IN_PROGRESS, onClick: handleOperation.bind(null, row, 'append') },
{ label: '开始备货', type: 'link', auth: ['lms:daily-plan:operate'], ifShow: activeWorkType === '1' && row.orderStatus === ORDER_IN_PROGRESS && row.stockingStatus === WORK_NOT_STARTED, onClick: handleStartWork.bind(null, row, 'stocking') },
{ label: '取消备货', type: 'link', danger: true, auth: ['lms:daily-plan:operate'], ifShow: activeWorkType === '1' && row.orderStatus === ORDER_IN_PROGRESS && isCancelableWorkStatus(row.stockingStatus), onClick: handleOperation.bind(null, row, 'cancelStocking') },
{ label: '恢复备货', type: 'link', auth: ['lms:daily-plan:operate'], ifShow: activeWorkType === '1' && row.orderStatus === ORDER_IN_PROGRESS && row.stockingStatus === WORK_CANCELED, onClick: handleOperation.bind(null, row, 'restoreStocking') },