diff --git a/src/api/shop/shopDealerCapital/model/index.ts b/src/api/shop/shopDealerCapital/model/index.ts
index b62e6e5..bc9bd11 100644
--- a/src/api/shop/shopDealerCapital/model/index.ts
+++ b/src/api/shop/shopDealerCapital/model/index.ts
@@ -8,6 +8,8 @@ export interface ShopDealerCapital {
id?: number;
// 分销商用户ID
userId?: number;
+ // 分销商昵称
+ nickName?: string;
// 订单ID
orderId?: number;
// 订单编号
diff --git a/src/api/shop/shopDealerOrder/model/index.ts b/src/api/shop/shopDealerOrder/model/index.ts
index e76f732..2bf954c 100644
--- a/src/api/shop/shopDealerOrder/model/index.ts
+++ b/src/api/shop/shopDealerOrder/model/index.ts
@@ -12,6 +12,8 @@ export interface ShopDealerOrder {
title?: string;
// 买家用户昵称
nickname?: string;
+ // 真实姓名
+ realName?: string;
// 订单编号
orderNo?: string;
// 订单总金额(不含运费)
diff --git a/src/api/shop/shopDealerUser/model/index.ts b/src/api/shop/shopDealerUser/model/index.ts
index d443ef2..4f57555 100644
--- a/src/api/shop/shopDealerUser/model/index.ts
+++ b/src/api/shop/shopDealerUser/model/index.ts
@@ -6,8 +6,12 @@ import type { PageParam } from '@/api';
export interface ShopDealerUser {
// 主键ID
id?: number;
+ // 类型 0经销商 1企业 2集团
+ type?: number;
// 自增ID
userId?: number;
+ // 头像
+ avatar?: string;
// 姓名
realName?: string;
// 手机号
diff --git a/src/api/shop/shopGoods/model/index.ts b/src/api/shop/shopGoods/model/index.ts
index 493295d..3b8f926 100644
--- a/src/api/shop/shopGoods/model/index.ts
+++ b/src/api/shop/shopGoods/model/index.ts
@@ -94,7 +94,7 @@ export interface ShopGoods {
supplierMerchantId?: number;
supplierName?: string;
// 状态(0:未上架,1:上架)
- isShow?: number;
+ isShow?: boolean;
// 状态, 0上架 1待上架 2待审核 3审核不通过
status?: number;
// 备注
@@ -124,6 +124,19 @@ export interface ShopGoods {
canUseDate?: string;
ensureTag?: string;
expiredDay?: number;
+
+ // --- 分销/佣金(新字段,后端保持 snake_case)---
+ // 是否开启分销佣金:0关闭 1开启
+ isOpenCommission?: number;
+ // 分佣类型:10固定金额 20百分比
+ commissionType?: number;
+ // 一级/二级/三级分销佣金(单位以服务端为准)
+ firstMoney?: number;
+ secondMoney?: number;
+ thirdMoney?: number;
+ // 一级/二级分红(单位以服务端为准)
+ firstDividend?: number;
+ secondDividend?: number;
}
export interface BathSet {
diff --git a/src/views/glt/shopDealerApply/components/search.vue b/src/views/glt/shopDealerApply/components/search.vue
new file mode 100644
index 0000000..054a3a1
--- /dev/null
+++ b/src/views/glt/shopDealerApply/components/search.vue
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 跟进中
+ 已签约
+ 已取消
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+ 重置
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerApply/components/shopDealerApplyEdit.vue b/src/views/glt/shopDealerApply/components/shopDealerApplyEdit.vue
new file mode 100644
index 0000000..777e3b3
--- /dev/null
+++ b/src/views/glt/shopDealerApply/components/shopDealerApplyEdit.vue
@@ -0,0 +1,645 @@
+
+
+
+
+
+
+ 客户信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 报备人信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 审核状态
+
+
+
+
+
+
+
+ 跟进中
+ 正在跟进中
+
+
+ 已签约
+ 客户已签约
+
+
+ 已取消
+ 客户已取消
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 跟进情况
+
+
+
+
+
+ 历史跟进记录
+
+
+
+
跟进 #{{ historyRecords.length - index }}
+ {{
+ record.createTime
+ }}
+
删除
+
+
+ {{ record.content }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerApply/index.vue b/src/views/glt/shopDealerApply/index.vue
new file mode 100644
index 0000000..5eaa246
--- /dev/null
+++ b/src/views/glt/shopDealerApply/index.vue
@@ -0,0 +1,458 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+ 跟进中
+ 已签约
+ 已取消
+
+
+
+ {{ record.dealerName }}
+ 联系人:{{ record.realName }}
+ 联系电话:{{ record.mobile }}
+ 户号:{{ record.dealerCode }}
+
+
+
+ {{ record.nickName }}
+ {{ record.phone }}
+ {{ record.rate }}
+
+
+ {{ record.comments }}
+ {{
+ record.updateTime
+ }}
+
+
+
+ {{ record.createTime }}
+ 保护期:7天
+
+
+
+
+
+ 编辑
+
+
+
+
+
+ 已签约
+
+
+
+
+ 驳回
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerApplyRs/components/search.vue b/src/views/glt/shopDealerApplyRs/components/search.vue
new file mode 100644
index 0000000..5adc9bb
--- /dev/null
+++ b/src/views/glt/shopDealerApplyRs/components/search.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 需要审核
+ 免审核
+
+
+
+
+
+ 待审核
+ 审核通过
+ 审核驳回
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerUser/components/Import.vue b/src/views/glt/shopDealerApplyRs/components/shop-dealer-apply-import.vue
similarity index 64%
rename from src/views/shop/shopDealerUser/components/Import.vue
rename to src/views/glt/shopDealerApplyRs/components/shop-dealer-apply-import.vue
index 1679e73..32c2917 100644
--- a/src/views/shop/shopDealerUser/components/Import.vue
+++ b/src/views/glt/shopDealerApplyRs/components/shop-dealer-apply-import.vue
@@ -1,9 +1,9 @@
-
+
@@ -21,20 +21,13 @@
- 只能上传xls、xlsx文件,导入模板和导出模板格式一致
-
-
-
-
-
-
1. 请按照导出的Excel格式准备数据
-
2. 必填字段:用户ID、姓名、手机号
-
3. 佣金字段请填写数字,不要包含货币符号
-
4. 状态字段:正常 或 已删除
-
5. 推荐人ID必须是已存在的用户ID
-
-
-
+
只能上传xls、xlsx文件,
+
+ 下载导入模板
+
@@ -43,7 +36,7 @@
import { ref } from 'vue';
import { message } from 'ant-design-vue/es';
import { CloudUploadOutlined } from '@ant-design/icons-vue';
- import { importShopDealerUsers } from '@/api/shop/shopDealerUser';
+ import { importShopDealerApplies } from '@/api/shop/shopDealerApply';
const emit = defineEmits<{
(e: 'done'): void;
@@ -74,7 +67,7 @@
return false;
}
loading.value = true;
- importShopDealerUsers(file)
+ importShopDealerApplies(file)
.then((msg) => {
loading.value = false;
message.success(msg);
@@ -93,14 +86,3 @@
emit('update:visible', value);
};
-
-
diff --git a/src/views/glt/shopDealerApplyRs/components/shopDealerApplyEdit.vue b/src/views/glt/shopDealerApplyRs/components/shopDealerApplyEdit.vue
new file mode 100644
index 0000000..33ce93a
--- /dev/null
+++ b/src/views/glt/shopDealerApplyRs/components/shopDealerApplyEdit.vue
@@ -0,0 +1,298 @@
+
+
+
+
+
+
+
+
+
+
+ 未入市
+ 未入市
+
+
+ 已入市
+ 已入市
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerApplyRs/index.vue b/src/views/glt/shopDealerApplyRs/index.vue
new file mode 100644
index 0000000..43ef48e
--- /dev/null
+++ b/src/views/glt/shopDealerApplyRs/index.vue
@@ -0,0 +1,301 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+
+
+ 添加
+
+
+
+
+
+ 导入
+
+
+
+
+
+
+
+
+
+
+
+
+ 已入市
+ 未入市
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerCapital/components/search.vue b/src/views/glt/shopDealerCapital/components/search.vue
new file mode 100644
index 0000000..ad1a2c6
--- /dev/null
+++ b/src/views/glt/shopDealerCapital/components/search.vue
@@ -0,0 +1,117 @@
+
+
+
+
+ 导出xls
+
+
+
+
diff --git a/src/views/glt/shopDealerCapital/components/shopDealerCapitalEdit.vue b/src/views/glt/shopDealerCapital/components/shopDealerCapitalEdit.vue
new file mode 100644
index 0000000..35917d9
--- /dev/null
+++ b/src/views/glt/shopDealerCapital/components/shopDealerCapitalEdit.vue
@@ -0,0 +1,406 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 资金流动信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 元
+
+
+
+
+
+
+
+
+
+
+
+ 关联信息
+
+
+
+
+
+ 转账相关操作需要填写对方用户ID
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerCapital/index.vue b/src/views/glt/shopDealerCapital/index.vue
new file mode 100644
index 0000000..e73f34a
--- /dev/null
+++ b/src/views/glt/shopDealerCapital/index.vue
@@ -0,0 +1,295 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+
+
+
+ 显示
+ 隐藏
+
+
+
+ 修改
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerOrder/components/Import.vue b/src/views/glt/shopDealerOrder/components/Import.vue
new file mode 100644
index 0000000..867c61c
--- /dev/null
+++ b/src/views/glt/shopDealerOrder/components/Import.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerOrder/components/search.vue b/src/views/glt/shopDealerOrder/components/search.vue
new file mode 100644
index 0000000..355d4c3
--- /dev/null
+++ b/src/views/glt/shopDealerOrder/components/search.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
+ 批量删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 导入数据
+
+
+
+
+
+ 批量结算
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerOrder/components/shopDealerOrderEdit.vue b/src/views/glt/shopDealerOrder/components/shopDealerOrderEdit.vue
new file mode 100644
index 0000000..46b49bf
--- /dev/null
+++ b/src/views/glt/shopDealerOrder/components/shopDealerOrderEdit.vue
@@ -0,0 +1,363 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+
+
+ {{ form.title }}
+
+
+
+
+ {{ form.orderNo }}
+
+
+
+
+ {{ parseFloat(form.orderPrice || 0).toFixed(2) }}
+
+
+
+
+ {{ parseFloat(form.degreePrice || 0).toFixed(2) }}
+
+
+
+
+ {{ form.rate }}
+
+
+
+
+ {{ form.price }}
+
+
+
+
+ {{ parseFloat(form.settledPrice || 0).toFixed(2) }}
+
+
+
+
+ {{ parseFloat(form.payPrice || 0).toFixed(2) }}
+
+
+
+ 开发调试
+
+
业务员({{ form.userId }}):{{ form.nickname }}
+
一级分销商({{ form.firstUserId }}):{{
+ form.firstNickname
+ }},一级佣金30%:{{ form.firstMoney }}
+
二级分销商({{ form.secondUserId }}):{{
+ form.secondNickname
+ }},二级佣金10%:{{ form.secondMoney }}
+
三级分销商({{ form.thirdUserId }}):{{
+ form.thirdNickname
+ }},三级佣金60%:{{ form.thirdMoney }}
+
+
+
+ 收益计算
+
+
+
+
+
+ 一级佣金30%
+
+
+
+
+ {{ form.firstUserId }}
+
+
+ {{ form.firstNickname }}
+
+
+
+
+ {{ '30%' }}
+
+
+ {{ form.firstMoney }}
+
+
+
+
+
+
+
+
+ 二级佣金10%
+
+
+
+
+ {{ form.secondUserId }}
+
+
+ {{ form.secondNickname }}
+
+
+
+ 10%
+
+ {{ form.secondMoney }}
+
+
+
+
+
+
+
+
+ 三级佣金60%
+
+
+
+
+ {{ form.thirdUserId }}
+
+
+ {{ form.thirdNickname }}
+
+
+
+
+ {{ '60%' }}
+
+
+ {{ form.thirdMoney }}
+
+
+
+
+
+
+ {{ form.settleTime }}
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerOrder/index.vue b/src/views/glt/shopDealerOrder/index.vue
new file mode 100644
index 0000000..481e06e
--- /dev/null
+++ b/src/views/glt/shopDealerOrder/index.vue
@@ -0,0 +1,448 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+ {{ record.title }}
+ 用户ID:{{ record.userId }}
+
+
+
+ {{ record.orderPrice.toFixed(2) }}
+
+
+
+ {{ record.degreePrice.toFixed(2) }}
+
+
+
+ {{ record.price }}
+
+
+
+ {{ record.settledPrice.toFixed(2) }}
+
+
+
+ {{ record.payPrice.toFixed(2) }}
+
+
+
+
+
+
一级
+ 用户{{ record.firstUserId }} - ¥{{
+ parseFloat(record.firstMoney || '0').toFixed(2)
+ }}
+
+
+
二级
+ 用户{{ record.secondUserId }} - ¥{{
+ parseFloat(record.secondMoney || '0').toFixed(2)
+ }}
+
+
+
三级
+ 用户{{ record.thirdUserId }} - ¥{{
+ parseFloat(record.thirdMoney || '0').toFixed(2)
+ }}
+
+
+
+
+
+ 已签约
+ 未签约
+
+
+
+ 未结算
+ 已结算
+
+
+
+
+
+ {{ record.createTime }}
+
+
+ {{ record.settleTime }}
+
+
+
+
+
+
+ 结算
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerOrder2/components/Import.vue b/src/views/glt/shopDealerOrder2/components/Import.vue
new file mode 100644
index 0000000..073da9f
--- /dev/null
+++ b/src/views/glt/shopDealerOrder2/components/Import.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerOrder2/components/search.vue b/src/views/glt/shopDealerOrder2/components/search.vue
new file mode 100644
index 0000000..74cd0e5
--- /dev/null
+++ b/src/views/glt/shopDealerOrder2/components/search.vue
@@ -0,0 +1,143 @@
+
+
+
+
+ 导出xls
+
+
+
+
diff --git a/src/views/glt/shopDealerOrder2/components/shopDealerOrderEdit.vue b/src/views/glt/shopDealerOrder2/components/shopDealerOrderEdit.vue
new file mode 100644
index 0000000..fe3f924
--- /dev/null
+++ b/src/views/glt/shopDealerOrder2/components/shopDealerOrderEdit.vue
@@ -0,0 +1,333 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+
+
+ {{ form.orderNo }}
+
+
+
+
+ {{ parseFloat(form.payPrice || 0).toFixed(2) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 收益计算
+
+
+
+
+
+ 一级佣金10%
+
+
+
+
+ {{ form.firstUserId }}
+
+
+ {{ form.firstNickname }}
+
+
+
+
+ {{ '10%' }}
+
+
+ {{ form.firstMoney }}
+
+
+
+
+
+
+
+
+ 二级佣金10%
+
+
+
+
+ {{ form.secondUserId }}
+
+
+ {{ form.secondNickname }}
+
+
+
+ 10%
+
+ {{ form.secondMoney }}
+
+
+
+
+
+
+
+
+ 三级佣金60%
+
+
+
+
+ {{ form.thirdUserId }}
+
+
+ {{ form.thirdNickname }}
+
+
+
+
+ {{ '60%' }}
+
+
+ {{ form.thirdMoney }}
+
+
+
+
+
+
+ {{ form.settleTime }}
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerOrder2/index.vue b/src/views/glt/shopDealerOrder2/index.vue
new file mode 100644
index 0000000..ca4422b
--- /dev/null
+++ b/src/views/glt/shopDealerOrder2/index.vue
@@ -0,0 +1,500 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+ {{ record.title }}
+ {{ record.nickname }}({{ record.userId }})
+
+
+
+ {{ parseFloat(record.orderPrice).toFixed(2) }}
+
+
+
+ {{ record.degreePrice.toFixed(2) }}
+
+
+
+ {{ record.price || 0 }}
+
+
+
+ {{ record.settledPrice.toFixed(2) }}
+
+
+
+ {{ record.payPrice.toFixed(2) }}
+
+
+
+ {{ record.firstMoney }}
+ {{ record.firstNickname || '-' }}
+
+
+
+ {{ record.secondMoney }}
+ {{ record.secondNickname || '-' }}
+
+
+
+ {{ record.thirdNickname || '-' }} {{ record.thirdMoney }}
+
+
+
+
+
+
+
+
+
一级
+ 用户{{ record.firstUserId }} - ¥{{
+ parseFloat(record.firstMoney || '0').toFixed(2)
+ }}
+
+
+
二级
+ 用户{{ record.secondUserId }} - ¥{{
+ parseFloat(record.secondMoney || '0').toFixed(2)
+ }}
+
+
+
三级
+ 用户{{ record.thirdUserId }} - ¥{{
+ parseFloat(record.thirdMoney || '0').toFixed(2)
+ }}
+
+
+
+
+
+ 已签约
+ 未签约
+
+
+
+ 未结算
+ 已结算
+
+
+
+
+
+ {{ record.createTime }}
+
+
+ {{ record.settleTime }}
+
+
+
+
+
+
+
+ 结算
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerReferee/components/RefereeTree.vue b/src/views/glt/shopDealerReferee/components/RefereeTree.vue
new file mode 100644
index 0000000..45a0f6c
--- /dev/null
+++ b/src/views/glt/shopDealerReferee/components/RefereeTree.vue
@@ -0,0 +1,204 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerReferee/components/search.vue b/src/views/glt/shopDealerReferee/components/search.vue
new file mode 100644
index 0000000..b237175
--- /dev/null
+++ b/src/views/glt/shopDealerReferee/components/search.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+ 重置
+
+
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerReferee/components/shopDealerRefereeEdit.vue b/src/views/glt/shopDealerReferee/components/shopDealerRefereeEdit.vue
new file mode 100644
index 0000000..0fe37c5
--- /dev/null
+++ b/src/views/glt/shopDealerReferee/components/shopDealerRefereeEdit.vue
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerReferee/index.vue b/src/views/glt/shopDealerReferee/index.vue
new file mode 100644
index 0000000..4f72029
--- /dev/null
+++ b/src/views/glt/shopDealerReferee/index.vue
@@ -0,0 +1,563 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+
+
{{ record.dealerName }}({{ record.dealerId }})
+
+
+
+
+
+
+
+
+
+
+
+
{{ record.nickname }}({{ record.userId }})
+
+
+
+
+
+
+ {{ getLevelText(record.level || 0) }}
+
+
+
+
+
+ 查看关系链
+
+
+
+
+
+
+ 编辑
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerUser/components/search.vue b/src/views/glt/shopDealerUser/components/search.vue
new file mode 100644
index 0000000..5adc9bb
--- /dev/null
+++ b/src/views/glt/shopDealerUser/components/search.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 需要审核
+ 免审核
+
+
+
+
+
+ 待审核
+ 审核通过
+ 审核驳回
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerUser/components/shopDealerApplyEdit.vue b/src/views/glt/shopDealerUser/components/shopDealerApplyEdit.vue
similarity index 100%
rename from src/views/shop/shopDealerUser/components/shopDealerApplyEdit.vue
rename to src/views/glt/shopDealerUser/components/shopDealerApplyEdit.vue
diff --git a/src/views/glt/shopDealerUser/index.vue b/src/views/glt/shopDealerUser/index.vue
new file mode 100644
index 0000000..65bdd6f
--- /dev/null
+++ b/src/views/glt/shopDealerUser/index.vue
@@ -0,0 +1,517 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+ 待审核
+ 已通过
+ 已驳回
+
+
+
+
+ 编辑
+
+
+
+
+
+ 通过
+
+
+
+
+ 驳回
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerWithdraw/components/Import.vue b/src/views/glt/shopDealerWithdraw/components/Import.vue
new file mode 100644
index 0000000..867c61c
--- /dev/null
+++ b/src/views/glt/shopDealerWithdraw/components/Import.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerWithdraw/components/search.vue b/src/views/glt/shopDealerWithdraw/components/search.vue
new file mode 100644
index 0000000..472b7dc
--- /dev/null
+++ b/src/views/glt/shopDealerWithdraw/components/search.vue
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+ 批量删除
+
+
+
+
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue b/src/views/glt/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue
new file mode 100644
index 0000000..8721290
--- /dev/null
+++ b/src/views/glt/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue
@@ -0,0 +1,697 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+
+ {{ form.comments }}
+
+
+
+
+
+
+ 收款信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ form.bankName }}
+
+
+ {{ form.bankAccount }}
+
+
+ {{ form.bankCard }}
+
+
+
+
+
+
+
+ 审核信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/glt/shopDealerWithdraw/index.vue b/src/views/glt/shopDealerWithdraw/index.vue
new file mode 100644
index 0000000..2999e31
--- /dev/null
+++ b/src/views/glt/shopDealerWithdraw/index.vue
@@ -0,0 +1,464 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+ 待审核
+ 审核通过
+ 已驳回
+ 已打款
+
+
+
+
+
+ {{ record.realName || '未实名认证' }}
+ {{ record.phone }}
+
+
+
+
+
+
+ 微信
+ {{ record.wechatName }}
+ {{ record.wechatName }}
+
+
+
+
+ 支付宝
+ {{ record.alipayName }}
+ {{ record.alipayAccount }}
+
+
+
+
+ 银行卡
+ {{ record.bankName }}
+ {{ record.bankAccount }}
+ {{ record.bankCard }}
+
+
+
+
+
+ 驳回原因:{{ record.rejectReason }}
+
+
+
+
+
+
+
+ {{ record.createTime }}
+ {{
+ record.auditTime
+ }}
+
+
+
+
+
+
+ 编辑
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerApplyRs/components/search.vue b/src/views/shop/shopDealerApplyRs/components/search.vue
new file mode 100644
index 0000000..5adc9bb
--- /dev/null
+++ b/src/views/shop/shopDealerApplyRs/components/search.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 需要审核
+ 免审核
+
+
+
+
+
+ 待审核
+ 审核通过
+ 审核驳回
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerApplyRs/components/shop-dealer-apply-import.vue b/src/views/shop/shopDealerApplyRs/components/shop-dealer-apply-import.vue
new file mode 100644
index 0000000..32c2917
--- /dev/null
+++ b/src/views/shop/shopDealerApplyRs/components/shop-dealer-apply-import.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+
+
+
只能上传xls、xlsx文件,
+
+ 下载导入模板
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerApplyRs/components/shopDealerApplyEdit.vue b/src/views/shop/shopDealerApplyRs/components/shopDealerApplyEdit.vue
new file mode 100644
index 0000000..33ce93a
--- /dev/null
+++ b/src/views/shop/shopDealerApplyRs/components/shopDealerApplyEdit.vue
@@ -0,0 +1,298 @@
+
+
+
+
+
+
+
+
+
+
+ 未入市
+ 未入市
+
+
+ 已入市
+ 已入市
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerApplyRs/index.vue b/src/views/shop/shopDealerApplyRs/index.vue
new file mode 100644
index 0000000..43ef48e
--- /dev/null
+++ b/src/views/shop/shopDealerApplyRs/index.vue
@@ -0,0 +1,301 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+
+
+ 添加
+
+
+
+
+
+ 导入
+
+
+
+
+
+
+
+
+
+
+
+
+ 已入市
+ 未入市
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerCapital/components/search.vue b/src/views/shop/shopDealerCapital/components/search.vue
index 82fea9d..218dfcd 100644
--- a/src/views/shop/shopDealerCapital/components/search.vue
+++ b/src/views/shop/shopDealerCapital/components/search.vue
@@ -1,19 +1,28 @@
-
-
-
-
- 添加
-
+
+ 导出xls
diff --git a/src/views/shop/shopDealerOrder/components/shopDealerOrderEdit.vue b/src/views/shop/shopDealerOrder/components/shopDealerOrderEdit.vue
index 46b49bf..5267361 100644
--- a/src/views/shop/shopDealerOrder/components/shopDealerOrderEdit.vue
+++ b/src/views/shop/shopDealerOrder/components/shopDealerOrderEdit.vue
@@ -24,66 +24,36 @@
-
-
- {{ form.title }}
-
-
{{ form.orderNo }}
-
- {{ parseFloat(form.orderPrice || 0).toFixed(2) }}
-
-
-
-
- {{ parseFloat(form.degreePrice || 0).toFixed(2) }}
-
-
-
-
- {{ form.rate }}
-
-
-
-
- {{ form.price }}
-
-
-
-
- {{ parseFloat(form.settledPrice || 0).toFixed(2) }}
-
-
-
-
+
{{ parseFloat(form.payPrice || 0).toFixed(2) }}
-
开发调试
-
-
业务员({{ form.userId }}):{{ form.nickname }}
-
一级分销商({{ form.firstUserId }}):{{
- form.firstNickname
- }},一级佣金30%:{{ form.firstMoney }}
-
二级分销商({{ form.secondUserId }}):{{
- form.secondNickname
- }},二级佣金10%:{{ form.secondMoney }}
-
三级分销商({{ form.thirdUserId }}):{{
- form.thirdNickname
- }},三级佣金60%:{{ form.thirdMoney }}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
收益计算
@@ -92,7 +62,7 @@
- 一级佣金30%
+ 一级佣金10%
@@ -105,7 +75,7 @@
- {{ '30%' }}
+ {{ '10%' }}
{{ form.firstMoney }}
@@ -179,7 +149,7 @@
import { assignObject } from 'ele-admin-pro';
import { ShopDealerOrder } from '@/api/shop/shopDealerOrder/model';
import { FormInstance } from 'ant-design-vue/es/form';
- import { updateSdyDealerOrder } from '@/api/sdy/sdyDealerOrder';
+ import { updateShopDealerOrder } from '@/api/shop/shopDealerOrder';
// 是否是修改
const isUpdate = ref(false);
@@ -275,7 +245,7 @@
...form,
isSettled: 1
};
- updateSdyDealerOrder(formData)
+ updateShopDealerOrder(formData)
.then((msg) => {
loading.value = false;
message.success(msg);
diff --git a/src/views/shop/shopDealerOrder/index.vue b/src/views/shop/shopDealerOrder/index.vue
index 481e06e..c44b4da 100644
--- a/src/views/shop/shopDealerOrder/index.vue
+++ b/src/views/shop/shopDealerOrder/index.vue
@@ -7,28 +7,24 @@
:columns="columns"
:datasource="datasource"
:customRow="customRow"
- v-model:selection="selection"
tool-class="ele-toolbar-form"
class="sys-org-table"
>
{{ record.title }}
- 用户ID:{{ record.userId }}
+ {{ record.nickname }}({{ record.userId }})
- {{ record.orderPrice.toFixed(2) }}
+ {{ parseFloat(record.orderPrice).toFixed(2) }}
@@ -36,7 +32,7 @@
- {{ record.price }}
+ {{ record.price || 0 }}
@@ -47,6 +43,30 @@
{{ record.payPrice.toFixed(2) }}
+
+ {{ record.firstMoney }}
+ {{ record.firstNickname || '-' }}
+
+
+
+ {{ record.secondMoney }}
+ {{ record.secondNickname || '-' }}
+
+
+
+ {{ record.firstDividend }}
+ {{ record.firstDividendUserName || '-' }}
+
+
+
+ {{ record.secondDividend }}
+ {{ record.secondDividendUserName || '-' }}
+
+
@@ -93,9 +113,22 @@
- 结算
+
+ 结算
+
+
+
+
+
+
+
+
+
+
+
+
import { createVNode, ref } from 'vue';
import { message, Modal } from 'ant-design-vue';
- import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
+ import {
+ ExclamationCircleOutlined,
+ DollarOutlined
+ } from '@ant-design/icons-vue';
import type { EleProTable } from 'ele-admin-pro';
import type {
DatasourceFunction,
@@ -139,7 +175,9 @@
ShopDealerOrder,
ShopDealerOrderParam
} from '@/api/shop/shopDealerOrder/model';
- import { exportSdyDealerOrder } from '@/api/sdy/sdyDealerOrder';
+ import {
+ updateShopDealerOrder
+ } from '@/api/shop/shopDealerOrder';
// 表格实例
const tableRef = ref | null>(null);
@@ -153,9 +191,6 @@
// 加载状态
const loading = ref(true);
- // 当前搜索条件
- const currentWhere = ref({});
-
// 表格数据源
const datasource: DatasourceFunction = ({
page,
@@ -167,11 +202,8 @@
if (filters) {
where.status = filters.status;
}
- // 保存当前搜索条件用于导出
- currentWhere.value = { ...where };
- // 未结算订单
- where.isSettled = 0;
- where.myOrder = 1;
+ // 已结算订单
+ where.isSettled = 1;
return pageShopDealerOrder({
...where,
...orders,
@@ -182,88 +214,77 @@
// 表格列配置
const columns = ref([
+ {
+ key: 'index',
+ width: 48,
+ align: 'center',
+ fixed: 'left',
+ hideInSetting: true,
+ customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
+ },
{
title: '订单编号',
dataIndex: 'orderNo',
- key: 'orderNo'
+ key: 'orderNo',
+ align: 'center',
+ width: 200
},
{
- title: '客户名称',
+ title: '买家',
dataIndex: 'title',
- key: 'title',
- width: 220
+ key: 'title'
},
{
- title: '结算电量',
+ title: '订单金额',
dataIndex: 'orderPrice',
key: 'orderPrice',
align: 'center'
},
{
- title: '换算成度',
- dataIndex: 'degreePrice',
- key: 'degreePrice',
+ title: '一级佣金',
+ dataIndex: 'firstNickname',
+ key: 'firstNickname',
align: 'center'
},
{
- title: '结算单价',
- dataIndex: 'price',
- key: 'price',
+ title: '二级佣金',
+ dataIndex: 'secondNickname',
+ key: 'secondNickname',
align: 'center'
},
{
- title: '结算金额',
- dataIndex: 'settledPrice',
- key: 'settledPrice',
+ title: '一级门店分红',
+ dataIndex: 'firstDividendUserName',
+ key: 'firstDividendUserName',
align: 'center'
},
{
- title: '税费',
- dataIndex: 'rate',
- key: 'rate',
+ title: '二级门店分红',
+ dataIndex: 'secondDividendUserName',
+ key: 'secondDividendUserName',
align: 'center'
},
- {
- title: '实发金额',
- dataIndex: 'payPrice',
- key: 'payPrice',
- align: 'center'
- },
- {
- title: '签约状态',
- dataIndex: 'isInvalid',
- key: 'isInvalid',
- align: 'center',
- width: 100
- },
- {
- title: '月份',
- dataIndex: 'month',
- key: 'month',
- align: 'center',
- width: 100
- },
{
title: '结算状态',
dataIndex: 'isSettled',
key: 'isSettled',
- align: 'center',
- width: 100
+ align: 'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
- align: 'center'
- },
- {
- title: '操作',
- key: 'action',
- width: 180,
- fixed: 'right',
align: 'center',
- hideInSetting: true
+ width: 180
}
+ // {
+ // title: '操作',
+ // key: 'action',
+ // width: 180,
+ // fixed: 'right',
+ // align: 'center',
+ // hideInSetting: true
+ // }
]);
/* 搜索 */
@@ -272,6 +293,37 @@
tableRef?.value?.reload({ where: where });
};
+ /* 结算单个订单 */
+ 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
+ updateShopDealerOrder({
+ ...row,
+ isSettled: 1
+ });
+ setTimeout(() => {
+ hide();
+ message.success('结算成功');
+ reload();
+ }, 1000);
+ }
+ });
+ };
+
/* 批量结算 */
const batchSettle = () => {
if (!selection.value.length) {
@@ -318,16 +370,10 @@
});
};
- /* 导出数据 */
- const handleExport = () => {
- // 调用导出API,传入当前搜索条件
- exportSdyDealerOrder(currentWhere.value);
- };
-
/* 打开编辑弹窗 */
const openEdit = (row?: ShopDealerOrder) => {
current.value = row ?? null;
- showEdit.value = true;
+ // showEdit.value = true;
};
/* 删除单个 */
diff --git a/src/views/shop/shopDealerOrder2/components/Import.vue b/src/views/shop/shopDealerOrder2/components/Import.vue
new file mode 100644
index 0000000..cc7cdef
--- /dev/null
+++ b/src/views/shop/shopDealerOrder2/components/Import.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerOrder2/components/search.vue b/src/views/shop/shopDealerOrder2/components/search.vue
new file mode 100644
index 0000000..a47cc62
--- /dev/null
+++ b/src/views/shop/shopDealerOrder2/components/search.vue
@@ -0,0 +1,144 @@
+
+
+
+
+ 导出xls
+
+
+
+
diff --git a/src/views/shop/shopDealerOrder2/components/shopDealerOrderEdit.vue b/src/views/shop/shopDealerOrder2/components/shopDealerOrderEdit.vue
new file mode 100644
index 0000000..c8b72aa
--- /dev/null
+++ b/src/views/shop/shopDealerOrder2/components/shopDealerOrderEdit.vue
@@ -0,0 +1,352 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+
+
+ {{ form.title }}
+
+
+
+
+ {{ form.orderNo }}
+
+
+
+
+ {{ parseFloat(form.orderPrice || 0).toFixed(2) }}
+
+
+
+
+ {{ parseFloat(form.degreePrice || 0).toFixed(2) }}
+
+
+
+
+ {{ form.rate }}
+
+
+
+
+ {{ form.price }}
+
+
+
+
+ {{ parseFloat(form.settledPrice || 0).toFixed(2) }}
+
+
+
+
+ {{ parseFloat(form.payPrice || 0).toFixed(2) }}
+
+
+
+ 开发调试
+
+
业务员({{ form.userId }}):{{ form.nickname }}
+
一级分销商({{ form.firstUserId }}):{{ form.firstNickname }},一级佣金30%:{{ form.firstMoney }}
+
二级分销商({{ form.secondUserId }}):{{ form.secondNickname }},二级佣金10%:{{ form.secondMoney }}
+
三级分销商({{ form.thirdUserId }}):{{ form.thirdNickname }},三级佣金60%:{{ form.thirdMoney }}
+
+
+
+ 收益计算
+
+
+
+
+
+ 一级佣金30%
+
+
+
+
+ {{ form.firstUserId }}
+
+
+ {{ form.firstNickname }}
+
+
+
+
+ {{ '30%' }}
+
+
+ {{ form.firstMoney }}
+
+
+
+
+
+
+
+
+ 二级佣金10%
+
+
+
+
+ {{ form.secondUserId }}
+
+
+ {{ form.secondNickname }}
+
+
+
+
+ 10%
+
+
+ {{ form.secondMoney }}
+
+
+
+
+
+
+
+
+ 三级佣金60%
+
+
+
+
+ {{ form.thirdUserId }}
+
+
+ {{ form.thirdNickname }}
+
+
+
+
+ {{ '60%' }}
+
+
+ {{ form.thirdMoney }}
+
+
+
+
+
+
+ {{ form.settleTime }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerOrder2/index.vue b/src/views/shop/shopDealerOrder2/index.vue
new file mode 100644
index 0000000..c24b12c
--- /dev/null
+++ b/src/views/shop/shopDealerOrder2/index.vue
@@ -0,0 +1,481 @@
+
+ $router.go(-1)">
+
+
+
+
+
+
+
+
+ {{ record.title }}
+ 业务员:{{ record.userId }}
+
+
+
+ {{ parseFloat(record.orderPrice).toFixed(2) }}
+
+
+
+ {{ record.degreePrice.toFixed(2) }}
+
+
+
+ {{ record.price || 0 }}
+
+
+
+ {{ record.settledPrice.toFixed(2) }}
+
+
+
+ {{ record.payPrice.toFixed(2) }}
+
+
+
+
+
+
一级
+ 用户{{ record.firstUserId }} - ¥{{ parseFloat(record.firstMoney || '0').toFixed(2) }}
+
+
+
二级
+ 用户{{ record.secondUserId }} - ¥{{ parseFloat(record.secondMoney || '0').toFixed(2) }}
+
+
+
三级
+ 用户{{ record.thirdUserId }} - ¥{{ parseFloat(record.thirdMoney || '0').toFixed(2) }}
+
+
+
+
+
+ 已签约
+ 未签约
+
+
+
+ 未结算
+ 已结算
+
+
+
+
+
+ {{ record.createTime }}
+
+
+ {{ record.settleTime }}
+
+
+
+
+
+
+
+ 结算
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/shop/shopDealerUser/components/search.vue b/src/views/shop/shopDealerUser/components/search.vue
index 5adc9bb..82fea9d 100644
--- a/src/views/shop/shopDealerUser/components/search.vue
+++ b/src/views/shop/shopDealerUser/components/search.vue
@@ -1,221 +1,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 需要审核
- 免审核
-
-
-
-
-
- 待审核
- 审核通过
- 审核驳回
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
-
- 重置
-
-
-
-
-
-
-
+
+
+
+
+
+ 添加
+
+
-
-
diff --git a/src/views/shop/shopDealerUser/components/shopDealerUserEdit.vue b/src/views/shop/shopDealerUser/components/shopDealerUserEdit.vue
index 2138148..7a995b6 100644
--- a/src/views/shop/shopDealerUser/components/shopDealerUserEdit.vue
+++ b/src/views/shop/shopDealerUser/components/shopDealerUserEdit.vue
@@ -5,12 +5,9 @@
:visible="visible"
:maskClosable="false"
:maxable="maxable"
+ :confirm-loading="loading"
:title="isUpdate ? '编辑分销商用户' : '添加分销商用户'"
- :body-style="{
- paddingBottom: '28px',
- maxHeight: '70vh',
- overflowY: 'auto'
- }"
+ :body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
@ok="save"
>
@@ -18,265 +15,189 @@
ref="formRef"
:model="form"
:rules="rules"
- :label-col="{ span: 6 }"
- :wrapper-col="{ span: 18 }"
- layout="horizontal"
+ :label-col="styleResponsive ? { md: 4, sm: 5, xs: 24 } : { flex: '90px' }"
+ :wrapper-col="
+ styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' }
+ "
>
-
- 基本信息
+
+ 基础信息
+
-
-
-
+
+
-
-
+
+
+ 经销商
+ 门店
+
+
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- 佣金信息
+
+
+ 佣金信息
+
-
-
+
+
- 元
-
+ />
-
-
+
+
- 元
-
+ />
-
-
+
+
- 元
-
-
-
-
-
-
- 推荐关系
-
-
-
-
- 选择
-
-
-
- 团队信息
-
-
-
-
-
- 人
-
-
-
-
-
-
- 人
-
-
-
-
-
-
- 人
-
-
-
-
-
-
- 其他设置
-
-
-
-
-
-
- 生成
-
+ />
-
-
- 正常
- 已删除
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/src/views/shop/shopDealerUser/index.vue b/src/views/shop/shopDealerUser/index.vue
index 65bdd6f..029b225 100644
--- a/src/views/shop/shopDealerUser/index.vue
+++ b/src/views/shop/shopDealerUser/index.vue
@@ -1,118 +1,148 @@
$router.go(-1)">
-
-
-
-
-
-
-
- 待审核
- 已通过
- 已驳回
+
+
+
+
-
-
-
- 编辑
-
-
-
-
-
- 通过
-
-
-
-
- 驳回
-
-
-
-
-
- 删除
-
-
+
+
+
+
+
+ 经销商
+ 门店
+
+
+
+
+
+
+ 显示
+ 隐藏
+
+
+
+ 修改
+
+
+ 删除
+
+
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
+
diff --git a/src/views/shop/shopDealerWithdraw/components/Import.vue b/src/views/shop/shopDealerWithdraw/components/Import.vue
index 867c61c..5f99953 100644
--- a/src/views/shop/shopDealerWithdraw/components/Import.vue
+++ b/src/views/shop/shopDealerWithdraw/components/Import.vue
@@ -37,7 +37,7 @@
import { ref } from 'vue';
import { message } from 'ant-design-vue/es';
import { CloudUploadOutlined } from '@ant-design/icons-vue';
- import { importSdyDealerOrder } from '@/api/sdy/sdyDealerOrder';
+ import { importShopDealerOrder } from '@/api/shop/shopDealerOrder';
const emit = defineEmits<{
(e: 'done'): void;
@@ -68,7 +68,7 @@
return false;
}
loading.value = true;
- importSdyDealerOrder(file)
+ importShopDealerOrder(file)
.then((msg) => {
loading.value = false;
message.success(msg);
diff --git a/src/views/shop/shopGoods/components/shopGoodsEdit.vue b/src/views/shop/shopGoods/components/shopGoodsEdit.vue
index 19e9b9c..ff67464 100644
--- a/src/views/shop/shopGoods/components/shopGoodsEdit.vue
+++ b/src/views/shop/shopGoods/components/shopGoodsEdit.vue
@@ -24,17 +24,9 @@
>
-
- {{ form.goodsId }}
-
-
-
-
+
+
+
+
+
+
-
-
- 上架
- 下架
+
+
+ 上架
+ 下架
+
+
+
+
+
+ 💡 提示:工具栏"图片"按钮从图片库选择,"上传"按钮快速上传图片;"视频"按钮从视频库选择,"上传视频"按钮快速上传视频;"一键排版"按钮自动优化文章格式;"首行缩进"按钮切换段落缩进
+
+
+
+
+
+
+
+
+
+
+ 💡 提示:支持Markdown语法,可以使用工具栏按钮从文件库选择图片/视频,也可以直接拖拽上传文件
+
+
+
@@ -326,57 +377,6 @@
-
-
-
-
-
- 💡 提示:工具栏"图片"按钮从图片库选择,"上传"按钮快速上传图片;"视频"按钮从视频库选择,"上传视频"按钮快速上传视频;"一键排版"按钮自动优化文章格式;"首行缩进"按钮切换段落缩进
-
-
-
-
-
-
-
-
-
-
- 💡 提示:支持Markdown语法,可以使用工具栏按钮从文件库选择图片/视频,也可以直接拖拽上传文件
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 分销设置
+
-
-
-
+
+
+ 固定金额
+ 百分比
+
+
+
+
- {{ item.roleName }}
- 元
-
-
-
+ {{
+ form.commissionType === 20 ? '%' : '元'
+ }}
+
+
+
+
+
+ {{
+ form.commissionType === 20 ? '%' : '元'
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ form.commissionType === 20 ? '%' : '元'
+ }}
+
+
+
+
+
+ {{
+ form.commissionType === 20 ? '%' : '元'
+ }}
+
+
+
+
@@ -505,15 +627,6 @@
/>
-
-
-
@@ -988,6 +1101,14 @@ const form = reactive
({
categoryName: undefined,
specs: 0,
commissionRole: 0,
+ // 分销佣金(新字段,后端保持 snake_case)
+ isOpenCommission: 0,
+ commissionType: 10,
+ firstMoney: 0,
+ secondMoney: 0,
+ thirdMoney: 0,
+ firstDividend: 0,
+ secondDividend: 0,
position: undefined,
price: undefined,
originPrice: undefined,
@@ -1710,6 +1831,33 @@ const onPaste = (e) => {
const {resetFields} = useForm(form, rules);
+const COMMISSION_PERCENT_FIELDS = [
+ 'firstMoney',
+ 'secondMoney',
+ 'thirdMoney',
+ 'firstDividend',
+ 'secondDividend'
+] as const;
+
+type CommissionPercentField = (typeof COMMISSION_PERCENT_FIELDS)[number];
+
+const toDbPercent = (val: unknown) => {
+ if (val === null || val === undefined) return val as any;
+ const num = Number(val);
+ if (!Number.isFinite(num)) return val as any;
+ return num / 100;
+};
+
+// Back-end stores percent as a fraction (e.g. 0.1 = 10%); UI inputs percent (e.g. 10 = 10%).
+const toUiPercent = (val: unknown) => {
+ if (val === null || val === undefined) return val as any;
+ const num = Number(val);
+ if (!Number.isFinite(num)) return val as any;
+ // If historical data is already stored as 0~1, convert to 0~100 for display.
+ if (num <= 1) return Number((num * 100).toFixed(2));
+ return num;
+};
+
/* 保存编辑 */
const save = () => {
if (!formRef.value) {
@@ -1724,6 +1872,26 @@ const save = () => {
if (ensureTag.value.length) form.ensureTag = ensureTag.value.join();
if (canUseDate.value.length) form.canUseDate = canUseDate.value.join();
+ // 分销关闭时,避免把历史值一并保存到后端
+ if (form.isOpenCommission !== 1) {
+ form.commissionType = 10;
+ form.firstMoney = 0;
+ form.secondMoney = 0;
+ form.thirdMoney = 0;
+ form.firstDividend = 0;
+ form.secondDividend = 0;
+ }
+ if (form.isOpenCommission === 1 && form.commissionType === 20) {
+ // UI 输入:0~100;保存到后端:0~1(例如 10% => 0.1)
+ const invalidPercent = COMMISSION_PERCENT_FIELDS.some((k) => {
+ const v = (form as any)[k] ?? 0;
+ return v < 0 || v > 100;
+ });
+ if (invalidPercent) {
+ return message.error('佣金百分比需在 0~100 之间');
+ }
+ }
+
// if (form.dealerGift && !form.dealerGiftNum) return message.error('请输入经销商赠品数量');
if (form.commissionRole === 1) {
for (let i = 0; i < form.goodsRoleCommission.length; i++) {
@@ -1750,6 +1918,14 @@ const save = () => {
if (isUpdate.value) {
formData.type = props.data.type;
}
+ if (formData.isOpenCommission === 1 && formData.commissionType === 20) {
+ // Convert percent fields for persistence: 10 => 0.1
+ COMMISSION_PERCENT_FIELDS.forEach((k) => {
+ (formData as any)[k as CommissionPercentField] = toDbPercent(
+ (formData as any)[k]
+ );
+ });
+ }
const saveOrUpdate = isUpdate.value ? updateShopGoods : addShopGoods;
saveOrUpdate(formData)
.then((msg) => {
@@ -1875,6 +2051,17 @@ watch(
ensureTagItem.value = '';
if (props.data) {
assignObject(form, props.data);
+ if (form.commissionType === undefined || form.commissionType === null) {
+ form.commissionType = 10;
+ }
+ if (form.isOpenCommission === 1 && form.commissionType === 20) {
+ // Convert historical DB values (0~1) to UI percent (0~100).
+ COMMISSION_PERCENT_FIELDS.forEach((k) => {
+ (form as any)[k as CommissionPercentField] = toUiPercent(
+ (form as any)[k]
+ );
+ });
+ }
if (props.data.image) {
images.value.push({
uid: uuid(),
diff --git a/src/views/shop/shopGoods/index.vue b/src/views/shop/shopGoods/index.vue
index 7c6a302..6a3a268 100644
--- a/src/views/shop/shopGoods/index.vue
+++ b/src/views/shop/shopGoods/index.vue
@@ -49,7 +49,7 @@
- 出售中
+ 已上架
待上架
待审核
审核不通过
diff --git a/src/views/shop/shopOrder/components/deliveryModal.vue b/src/views/shop/shopOrder/components/deliveryModal.vue
index 43fc9ee..e918e9e 100644
--- a/src/views/shop/shopOrder/components/deliveryModal.vue
+++ b/src/views/shop/shopOrder/components/deliveryModal.vue
@@ -3,7 +3,7 @@
toDateString(text)
},
{
title: '操作',
key: 'action',
- width: 280,
+ width: 220,
fixed: 'right',
align: 'center',
hideInSetting: true