Преглед изворни кода

```
feat(operationsManage): 调整广告和横幅信息权限前缀

- 将 advertising 模块的权限前缀从 "system:advertising" 调整为 "business:advertising"
- 将 banner-info 模块的权限前缀从 "system:banner-info" 调整为 "business:banner-info"
- 将 discounts-activity 模块的权限前缀从 "operationsManage:discounts-activity" 调整为 "business:discounts-activity"
- 将 promotion-coupon-template 模块的权限前缀从 "business:promotion-coupon-template" 调整为 "business:coupon-template"

feat(orderManage): 调整订单管理模块权限前缀并添加时间范围搜索

- 将 charge-order-info 模块的权限前缀从 "orderManage:charge-order-info" 调整为 "business:charge-order-info"
- 将 user-order-info 模块的权限前缀从 "orderManage:user-order-info" 调整为 "business:user-order-info"
- 为 user-order-info 模块添加创建时间范围搜索功能
- 优化 user-order-info 列表查询接口的时间参数处理逻辑

refactor(userManage): 调整用户反馈模块权限前缀和API调用方式

- 将 user-feedback 模块的权限前缀从 "system:user-feedback" 调整为 "business:user-feedback"
- 修改 UserFeedbackAPI.update 方法的参数传递方式
- 移除未使用的 SingleImageUpload 组件导入
```

zouzexu пре 5 дана
родитељ
комит
126c4234d6

+ 2 - 3
src/api/userManage/user-feedback-api.ts

@@ -40,12 +40,11 @@ const UserFeedbackAPI = {
   /**
    * 更新用户反馈
    *
-   * @param id 用户反馈ID
    * @param data 用户反馈表单数据
    */
-  update(id: string, reply: string, data: UserFeedbackForm) {
+  update(data: UserFeedbackForm) {
     return request({
-      url: `${USERFEEDBACK_BASE_URL}/${id}/${reply}`,
+      url: `${USERFEEDBACK_BASE_URL}/reply`,
       method: "put",
       data,
     });

+ 4 - 4
src/views/operationsManage/advertising/index.vue

@@ -89,7 +89,7 @@ onMounted(() => {
 
 // 搜索配置
 const searchConfig: ISearchConfig = reactive({
-  permPrefix: "system:advertising",
+  permPrefix: "business:advertising",
   formItems: [
     {
       type: "input",
@@ -107,7 +107,7 @@ const searchConfig: ISearchConfig = reactive({
 // 列表配置
 const contentConfig: IContentConfig<AdvertisingPageQuery> = reactive({
   // 权限前缀
-  permPrefix: "system:advertising",
+  permPrefix: "business:advertising",
   table: {
     border: true,
     highlightCurrentRow: true,
@@ -177,7 +177,7 @@ const contentConfig: IContentConfig<AdvertisingPageQuery> = reactive({
 // 新增配置
 const addModalConfig: IModalConfig<AdvertisingForm> = reactive({
   // 权限前缀
-  permPrefix: "system:advertising",
+  permPrefix: "business:advertising",
   // 主键
   pk: "id",
   // 弹窗配置
@@ -259,7 +259,7 @@ const addModalConfig: IModalConfig<AdvertisingForm> = reactive({
 
 // 编辑配置
 const editModalConfig: IModalConfig<AdvertisingForm> = reactive({
-  permPrefix: "system:advertising",
+  permPrefix: "business:advertising",
   component: "drawer",
   drawer: {
     title: "编辑",

+ 4 - 4
src/views/operationsManage/banner-info/index.vue

@@ -102,7 +102,7 @@ const {
 
 // 搜索配置
 const searchConfig: ISearchConfig = reactive({
-  permPrefix: "system:banner-info",
+  permPrefix: "business:banner-info",
   formItems: [
     {
       type: "select",
@@ -125,7 +125,7 @@ const searchConfig: ISearchConfig = reactive({
 // 列表配置
 const contentConfig: IContentConfig<BannerInfoPageQuery> = reactive({
   // 权限前缀
-  permPrefix: "system:banner-info",
+  permPrefix: "business:banner-info",
   table: {
     border: true,
     highlightCurrentRow: true,
@@ -235,7 +235,7 @@ const contentConfig: IContentConfig<BannerInfoPageQuery> = reactive({
 // 新增配置
 const addModalConfig: IModalConfig<BannerInfoForm> = reactive({
   // 权限前缀
-  permPrefix: "system:banner-info",
+  permPrefix: "business:banner-info",
   // 主键
   pk: "id",
   // 弹窗配置
@@ -341,7 +341,7 @@ const addModalConfig: IModalConfig<BannerInfoForm> = reactive({
 
 // 编辑配置
 const editModalConfig: IModalConfig<BannerInfoForm> = reactive({
-  permPrefix: "system:banner-info",
+  permPrefix: "business:banner-info",
   component: "drawer",
   drawer: {
     title: "编辑",

+ 2 - 2
src/views/operationsManage/discounts-activity/index.vue

@@ -196,7 +196,7 @@ const contentConfig: IContentConfig<DiscountsActivityPageQuery> = reactive({
 // 新增配置
 const addModalConfig: IModalConfig<DiscountsActivityForm> = reactive({
   // 权限前缀
-  permPrefix: "operationsManage:discounts-activity",
+  permPrefix: "business:discounts-activity",
   // 主键
   pk: "id",
   // 弹窗配置
@@ -273,7 +273,7 @@ const addModalConfig: IModalConfig<DiscountsActivityForm> = reactive({
 
 // 编辑配置
 const editModalConfig: IModalConfig<DiscountsActivityForm> = reactive({
-  permPrefix: "operationsManage:discounts-activity",
+  permPrefix: "business:discounts-activity",
   component: "drawer",
   drawer: {
     title: "编辑",

+ 4 - 4
src/views/operationsManage/promotion-coupon-template/index.vue

@@ -71,7 +71,7 @@ const {
 
 // 搜索配置
 const searchConfig: ISearchConfig = reactive({
-  permPrefix: "business:promotion-coupon-template",
+  permPrefix: "business:coupon-template",
   formItems: [
     {
       type: "input",
@@ -122,7 +122,7 @@ const searchConfig: ISearchConfig = reactive({
 // 列表配置
 const contentConfig: IContentConfig<PromotionCouponTemplatePageQuery> = reactive({
   // 权限前缀
-  permPrefix: "business:promotion-coupon-template",
+  permPrefix: "business:coupon-template",
   table: {
     border: true,
     highlightCurrentRow: true,
@@ -236,7 +236,7 @@ const contentConfig: IContentConfig<PromotionCouponTemplatePageQuery> = reactive
 // 新增配置
 const addModalConfig: IModalConfig<PromotionCouponTemplateForm> = reactive({
   // 权限前缀
-  permPrefix: "business:promotion-coupon-template",
+  permPrefix: "business:coupon-template",
   // 主键
   pk: "id",
   // 弹窗配置
@@ -364,7 +364,7 @@ const addModalConfig: IModalConfig<PromotionCouponTemplateForm> = reactive({
 
 // 编辑配置
 const editModalConfig: IModalConfig<PromotionCouponTemplateForm> = reactive({
-  permPrefix: "business:promotion-coupon-template",
+  permPrefix: "business:coupon-template",
   component: "drawer",
   drawer: {
     title: "编辑",

+ 4 - 4
src/views/orderManage/charge-order-info/index.vue

@@ -124,7 +124,7 @@ const {
 
 // 搜索配置
 const searchConfig: ISearchConfig = reactive({
-  permPrefix: "orderManage:charge-order-info",
+  permPrefix: "business:charge-order-info",
   formItems: [
     {
       type: "custom",
@@ -206,7 +206,7 @@ const searchConfig: ISearchConfig = reactive({
 // 列表配置
 const contentConfig: IContentConfig<ChargeOrderInfoPageQuery> = reactive({
   // 权限前缀
-  permPrefix: "orderManage:charge-order-info",
+  permPrefix: "business:charge-order-info",
   table: {
     border: true,
     highlightCurrentRow: true,
@@ -315,7 +315,7 @@ const contentConfig: IContentConfig<ChargeOrderInfoPageQuery> = reactive({
 // 新增配置
 const addModalConfig: IModalConfig<ChargeOrderInfoForm> = reactive({
   // 权限前缀
-  permPrefix: "orderManage:charge-order-info",
+  permPrefix: "business:charge-order-info",
   // 主键
   pk: "id",
   // 弹窗配置
@@ -640,7 +640,7 @@ const addModalConfig: IModalConfig<ChargeOrderInfoForm> = reactive({
 
 // 编辑配置
 const editModalConfig: IModalConfig<ChargeOrderInfoForm> = reactive({
-  permPrefix: "orderManage:charge-order-info",
+  permPrefix: "business:charge-order-info",
   component: "drawer",
   drawer: {
     title: "编辑",

+ 31 - 5
src/views/orderManage/user-order-info/index.vue

@@ -58,6 +58,8 @@
 </template>
 
 <script setup lang="ts">
+import PromotionCouponTemplateAPI from "@/api/operationsManage/promotion-coupon-template-api";
+
 defineOptions({ name: "UserOrderInfo" });
 
 import UserOrderInfoAPI, {
@@ -85,7 +87,7 @@ const {
 
 // 搜索配置
 const searchConfig: ISearchConfig = reactive({
-  permPrefix: "orderManage:user-order-info",
+  permPrefix: "business:user-order-info",
   formItems: [
     {
       type: "custom",
@@ -118,13 +120,26 @@ const searchConfig: ISearchConfig = reactive({
         style: { width: "200px" },
       },
     },
+    {
+      type: "date-picker",
+      label: "创建时间",
+      prop: "createTime",
+      attrs: {
+        type: "daterange",
+        "range-separator": "~",
+        "start-placeholder": "开始时间",
+        "end-placeholder": "截止时间",
+        "value-format": "YYYY-MM-DD",
+        style: { width: "240px" },
+      },
+    },
   ],
 });
 
 // 列表配置
 const contentConfig: IContentConfig<UserOrderInfoPageQuery> = reactive({
   // 权限前缀
-  permPrefix: "orderManage:user-order-info",
+  permPrefix: "business:user-order-info",
   table: {
     border: true,
     highlightCurrentRow: true,
@@ -132,7 +147,18 @@ const contentConfig: IContentConfig<UserOrderInfoPageQuery> = reactive({
   // 主键
   pk: "id",
   // 列表查询接口
-  indexAction: UserOrderInfoAPI.getPage,
+  indexAction: (params: any) => {
+    // 处理创建时间范围参数
+    if ("createTime" in params) {
+      const createTime = params.createTime as string[];
+      if (createTime?.length > 1) {
+        params.startTime = createTime[0] + " 00:00:00";
+        params.endTime = createTime[1] + " 23:59:59";
+      }
+      delete params.createTime;
+    }
+    return UserOrderInfoAPI.getPage(params);
+  },
   // 删除接口
   deleteAction: UserOrderInfoAPI.deleteByIds,
   // 数据解析函数
@@ -183,7 +209,7 @@ const contentConfig: IContentConfig<UserOrderInfoPageQuery> = reactive({
 // 新增配置
 const addModalConfig: IModalConfig<UserOrderInfoForm> = reactive({
   // 权限前缀
-  permPrefix: "orderManage:user-order-info",
+  permPrefix: "business:user-order-info",
   // 主键
   pk: "id",
   // 弹窗配置
@@ -304,7 +330,7 @@ const addModalConfig: IModalConfig<UserOrderInfoForm> = reactive({
 
 // 编辑配置
 const editModalConfig: IModalConfig<UserOrderInfoForm> = reactive({
-  permPrefix: "orderManage:user-order-info",
+  permPrefix: "business:user-order-info",
   component: "drawer",
   drawer: {
     title: "编辑",

+ 9 - 6
src/views/userManage/user-feedback/index.vue

@@ -47,7 +47,6 @@
 </template>
 
 <script setup lang="ts">
-import SingleImageUpload from "@/components/Upload/SingleImageUpload.vue";
 import MultiImageDisplay from "./components/MultiImageDisplay.vue";
 
 defineOptions({ name: "UserFeedback" });
@@ -77,7 +76,7 @@ const {
 
 // 搜索配置
 const searchConfig: ISearchConfig = reactive({
-  permPrefix: "system:user-feedback",
+  permPrefix: "business:user-feedback",
   formItems: [
     {
       type: "select",
@@ -117,7 +116,7 @@ const searchConfig: ISearchConfig = reactive({
 // 列表配置
 const contentConfig: IContentConfig<UserFeedbackPageQuery> = reactive({
   // 权限前缀
-  permPrefix: "system:user-feedback",
+  permPrefix: "business:user-feedback",
   table: {
     border: true,
     highlightCurrentRow: true,
@@ -195,7 +194,7 @@ const contentConfig: IContentConfig<UserFeedbackPageQuery> = reactive({
 // 新增配置
 const addModalConfig: IModalConfig<UserFeedbackForm> = reactive({
   // 权限前缀
-  permPrefix: "system:user-feedback",
+  permPrefix: "business:user-feedback",
   // 主键
   pk: "id",
   // 弹窗配置
@@ -260,7 +259,7 @@ const addModalConfig: IModalConfig<UserFeedbackForm> = reactive({
 
 // 编辑配置
 const editModalConfig: IModalConfig<UserFeedbackForm> = reactive({
-  permPrefix: "system:user-feedback",
+  permPrefix: "business:user-feedback",
   component: "drawer",
   drawer: {
     title: "编辑",
@@ -268,7 +267,11 @@ const editModalConfig: IModalConfig<UserFeedbackForm> = reactive({
   },
   pk: "id",
   formAction(data: any) {
-    return UserFeedbackAPI.update(data.id as string, data.reply as string, data);
+    const fromData = {
+      id: data.id,
+      reply: data.reply,
+    };
+    return UserFeedbackAPI.update(fromData);
   },
   formItems: addModalConfig.formItems, // 复用新增的表单项
 });