feat(sdy): 更新经销商订单模型和导入功能
- 将 orderId 字段更改为 orderNo,类型从 number 改为 string - 更新经销商资本模型中的 describe 字段为 comments- 在 shopDealerOrder 模型中添加 settledPrice 和 payPrice 字段 - 修改导入接口 URL,使用 MODULES_API_URL 前缀- 在用户验证页面添加权限控制 - 移除订单状态和结算状态的搜索选项 - 添加新的经销商订单编辑组件和相关功能 - 创建新的经销商订单管理页面,包含完整的CRUD操作- 添加批量删除和订单结算功能- 更新表格列配置,展示更多订单详情信息
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
</a>
|
||||
<template v-if="record.isSettled === 0 && record.isInvalid === 0">
|
||||
<a-divider type="vertical"/>
|
||||
<a @click="settleOrder(record)" class="ele-text-success">
|
||||
<a @click="openEdit(record)" class="ele-text-success">
|
||||
<DollarOutlined/>
|
||||
结算
|
||||
</a>
|
||||
@@ -107,7 +107,12 @@ import type {
|
||||
import Search from './components/search.vue';
|
||||
import {getPageTitle} from '@/utils/common';
|
||||
import ShopDealerOrderEdit from './components/shopDealerOrderEdit.vue';
|
||||
import {pageShopDealerOrder, removeShopDealerOrder, removeBatchShopDealerOrder, exportShopDealerOrder} from '@/api/shop/shopDealerOrder';
|
||||
import {
|
||||
pageShopDealerOrder,
|
||||
removeShopDealerOrder,
|
||||
removeBatchShopDealerOrder,
|
||||
exportShopDealerOrder
|
||||
} from '@/api/shop/shopDealerOrder';
|
||||
import type {ShopDealerOrder, ShopDealerOrderParam} from '@/api/shop/shopDealerOrder/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -119,8 +124,6 @@ const selection = ref<ShopDealerOrder[]>([]);
|
||||
const current = ref<ShopDealerOrder | null>(null);
|
||||
// 是否显示编辑弹窗
|
||||
const showEdit = ref(false);
|
||||
// 是否显示批量移动弹窗
|
||||
const showMove = ref(false);
|
||||
// 加载状态
|
||||
const loading = ref(true);
|
||||
|
||||
@@ -139,7 +142,7 @@ const datasource: DatasourceFunction = ({
|
||||
where.status = filters.status;
|
||||
}
|
||||
// 保存当前搜索条件用于导出
|
||||
currentWhere.value = { ...where };
|
||||
currentWhere.value = {...where};
|
||||
return pageShopDealerOrder({
|
||||
...where,
|
||||
...orders,
|
||||
@@ -301,31 +304,6 @@ const viewDetail = (row: ShopDealerOrder) => {
|
||||
});
|
||||
};
|
||||
|
||||
/* 结算单个订单 */
|
||||
const settleOrder = (row: ShopDealerOrder) => {
|
||||
const totalCommission = (parseFloat(row.firstMoney || '0') +
|
||||
parseFloat(row.secondMoney || '0') +
|
||||
parseFloat(row.thirdMoney || '0')).toFixed(2);
|
||||
|
||||
Modal.confirm({
|
||||
title: '确认结算',
|
||||
content: `确定要结算此订单的佣金吗?总佣金金额:¥${totalCommission}`,
|
||||
icon: createVNode(DollarOutlined),
|
||||
okText: '确认结算',
|
||||
okType: 'primary',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
const hide = message.loading('正在结算...', 0);
|
||||
// 这里调用结算API
|
||||
setTimeout(() => {
|
||||
hide();
|
||||
message.success('结算成功');
|
||||
reload();
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* 标记订单失效 */
|
||||
const invalidateOrder = (row: ShopDealerOrder) => {
|
||||
const hide = message.loading('正在处理...', 0);
|
||||
@@ -505,4 +483,4 @@ export default {
|
||||
:deep(.ant-tag) {
|
||||
margin: 2px 4px 2px 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user