Procházet zdrojové kódy

2025年初运营活动

chenlei před 1 rokem
rodič
revize
d910c62069

+ 2 - 2
src/App.vue

@@ -30,9 +30,9 @@ onLaunch(async () => {
   await webapi.strategy
     .get_by_Name<null, SystemConfig对象>({
       // 三个开关轮换用
-      // name: 'fake_switch',
+      name: 'fake_switch',
       // name: 'examine_switch',
-      name: 'examine_switch1',
+      // name: 'examine_switch1',
     })
     .then((res) => {
       // 开关打开时 设置场景值

+ 4 - 0
src/pages.json

@@ -31,6 +31,10 @@
       "type": "page"
     },
     {
+      "path": "pages/activity/2025start",
+      "type": "page"
+    },
+    {
       "path": "pages/cards/detail",
       "type": "page"
     },

+ 83 - 0
src/pages/activity/2025start.vue

@@ -0,0 +1,83 @@
+<template>
+  <ay-container v-show="store.webapi.strategy.get_by_Name.success">
+    <div v-if="data.activity2025.open">
+      <div class="whitespace-pre-wrap mb-spac" v-html="data.activity2025.desc"></div>
+      <div class="flex justify-between font-bold mb-spac row">
+        <div>排名</div>
+        <div>驾驶员信息</div>
+        <div>累计加气量</div>
+      </div>
+      <div
+        class="center justify-between s-fz row item-row"
+        :class="{ even: i % 2 === 0 }"
+        v-for="(dr, i) in data.driverRank"
+        :key="i"
+      >
+        <div>{{ dr.rank }}</div>
+        <div>{{ dr.driverName }}</div>
+        <div>{{ dr.gasQty }}</div>
+      </div>
+    </div>
+    <div v-else class="font-bold text-center">活动已结束</div>
+  </ay-container>
+</template>
+
+<script lang="ts" setup>
+const methods = {}
+const data = ay.initData({
+  /** 2025年初运营活动信息 */
+  activity2025: { open: 0 } as { open: number; title: string; bannerImg: string; desc: string },
+  driverRank: [] as DriverRankVO[],
+})
+
+ay.entrance((args) => {
+  // #ifdef MP
+  uni.showShareMenu({
+    // path: config.pages.activity_2025start._url,
+    withShareTicket: true,
+    menus: ['shareAppMessage', 'shareTimeline'],
+  })
+  // #endif
+  webapi.strategy
+    .get_by_Name<null, SystemConfig对象>({
+      //
+      name: 'activity2025',
+    })
+    .then((res) => {
+      if (res?.value) {
+        try {
+          data.activity2025 = JSON.parse(res.value)
+          uni.setNavigationBarTitle({ title: data.activity2025.title })
+        } catch (e) {}
+      }
+    })
+
+  webapi.settle.driver_rank<null, DriverRankVO[]>().then((res) => {
+    data.driverRank = res
+  })
+})
+</script>
+<style lang="scss" scoped>
+.row {
+  & > div,
+  > view {
+    // margin-bottom: $p-spac;
+    text-align: center;
+  }
+  & > div:first-child,
+  > view:first-child {
+    width: 15%;
+  }
+  & > div:last-child,
+  > view:last-child {
+    width: 25%;
+  }
+}
+.item-row {
+  min-height: 80rpx;
+  background-color: #0084f433;
+  &.even {
+    background-color: #ec808d1a;
+  }
+}
+</style>

+ 31 - 2
src/pages/index/index.vue

@@ -100,6 +100,14 @@
         <div>{{ m.name }}</div>
       </div>
     </div>
+    <div v-if="data.activity2025.open">
+      <image
+        class="mt-spacm2 banner"
+        :src="data.activity2025.bannerImg"
+        mode="scaleToFill"
+        @click="methods.goActivity"
+      />
+    </div>
     <div class="chuck list-app">
       <ay-sticky :top="topHeightPX" relativeTo="#stations" targetSelector="#stationTop">
         <div
@@ -217,6 +225,8 @@ const data = ay.initData({
   firstUnload: true,
   /** 存在未支付完成订单 */
   hasnopayfordriver: true,
+  /** 2025年初运营活动信息 */
+  activity2025: {} as { open: number; title: string; bannerImg: string; desc: string },
   invite: {} as 预添加司机详情,
   truckInfo: [] as PersonDriver对象[],
   accountInfo: {} as IAccountInfo,
@@ -259,7 +269,7 @@ const data = ay.initData({
     stickyed: false,
     cityList: [] /** 附近加气站列表 */,
     curCity: staticData.defCity,
-    listApp: [],
+    listApp: [] as GasstationVO[],
     indexedListShow: false,
   },
   hiddenDoor: [],
@@ -292,6 +302,9 @@ const methods = ay.initMethods(
         data.hiddenDoor.push(0)
       }
     },
+    goActivity() {
+      ay.goPage(config.pages.activity_2025start, { params: data.activity2025 })
+    },
     phone(num) {
       uni.makePhoneCall({
         phoneNumber: num,
@@ -651,7 +664,18 @@ ay.entrance(
       methods.getTruckInfo()
     }
     if (args.loadType === enums.LoadType.onLoad) {
-      // data.title = store.curPage?.pageConfig?.title
+      webapi.strategy
+        .get_by_Name<null, SystemConfig对象>({
+          //
+          name: 'activity2025',
+        })
+        .then((res) => {
+          if (res?.value) {
+            try {
+              data.activity2025 = JSON.parse(res.value)
+            } catch (e) {}
+          }
+        })
       // #ifdef MP
       // 用户是否授权了获取地理位置
       await uni
@@ -789,4 +813,9 @@ $bgc: rgba($p-color, 0.4);
   width: 50rpx;
   height: 50rpx;
 }
+.banner {
+  width: 100%;
+  height: 180rpx;
+  border-radius: $p-spacd2;
+}
 </style>

+ 8 - 0
src/types/schemas/settle.d.ts

@@ -339,6 +339,14 @@ interface DownLoadParam {
   /** 组织id */
   orgId?: number
 }
+interface DriverRankVO {
+  /** 司机信息 */
+  driverName?: string
+  /** 累计加气量 */
+  gasQty?: number
+  /** 排名 */
+  rank?: number
+}
 interface ExcelExportParam {
   /** undefined */
   datas?: AnyObject

+ 9 - 1
src/types/schemas/strategy.d.ts

@@ -5446,8 +5446,10 @@ interface 订单列表返回实体类 {
   allQty?: number
   /** 加气总量(吨) */
   allQtyTon?: number
-  /** 站实时清分总额(元) */
+  /** 站结算清分总额(元) */
   allSplit?: number
+  /** 站标准清分总额(元) */
+  allStandardSplit?: number
   /** 加气总额(元) */
   allValue?: number
   /** 加气总额(万元) */
@@ -5464,6 +5466,8 @@ interface 订单列表返回实体类 {
   gwaySpecial?: number
   /** 分页信息 */
   page?: IPage<订单详情>
+  /** 站优惠总额(元) */
+  stationPrefer?: number
 }
 interface 订单导出参数 {
   /** 导出列的字段 */
@@ -5752,6 +5756,10 @@ interface 通用id参数 {
   /** 通用id参数 */
   id?: string
 }
+interface 通用字符串单参数_参数类 {
+  /** 城市 */
+  city?: string
+}
 interface 预警提醒 物流公司信息 {
   /** 物流公司id */
   orgId?: number

+ 15 - 15
src/utils/config/interFaces/index.ts

@@ -1,30 +1,30 @@
-import websocket from './websocket'
-import message from './message'
 import account from './account'
-import tms from './tms'
-import user from './user'
-import settle from './settle'
+import websocket from './websocket'
 import pay from './pay'
+import tms from './tms'
 import allinpay from './allinpay'
+import message from './message'
+import user from './user'
 import strategy from './strategy'
+import settle from './settle'
 
 export default {
-  /** websocket打印中心 */
-  websocket,
-  /** 消息中心 */
-  message,
   /** 账户中心 */
   account,
-  /** 运力中心 */
-  tms,
-  /** 用户中心 */
-  user,
-  /** 结算中心 */
-  settle,
+  /** websocket打印中心 */
+  websocket,
   /** 支付中心 */
   pay,
+  /** 运力中心 */
+  tms,
   /** 通联支付 */
   allinpay,
+  /** 消息中心 */
+  message,
+  /** 用户中心 */
+  user,
   /** 运营策略中心 */
   strategy,
+  /** 结算中心 */
+  settle,
 }

+ 6 - 0
src/utils/config/interFaces/pay.ts

@@ -257,6 +257,12 @@ export default {
     reqType: {} as 通用id参数,
     resType: {} as Array<GctOrderAttach对象>,
   },
+  /** 修改加气订单价格信息 */
+  ch_order_createdate: {
+    realUrl: '/pay/handle/ch_order_createdate',
+    reqType: {} as GasOrder对象,
+    resType: {} as any,
+  },
   /** 请求绑定银行卡 */
   bind_bankCard: {
     realUrl: '/pay/member/bind_bankCard',

+ 6 - 0
src/utils/config/interFaces/settle.ts

@@ -683,6 +683,12 @@ export default {
 
     resType: {} as any,
   },
+  /** 获取某个时间段驾驶员加气排名 */
+  driver_rank: {
+    realUrl: '/settle/statistics/driver_rank',
+
+    resType: {} as DriverRankVO,
+  },
   /** 查询加气站库存数据汇总(多天数据) */
   find_Gasstation_stock_sum: {
     realUrl: '/settle/statistics/find_Gasstation_stock_sum',

+ 22 - 4
src/utils/config/interFaces/strategy.ts

@@ -1034,6 +1034,12 @@ export default {
     reqType: {} as GwayGaspriceLog对象,
     resType: {} as any,
   },
+  /** 根据创建订单日期重新计算gasOrder价格 */
+  recalculate: {
+    realUrl: '/strategy/handle/recalculate',
+    reqType: {} as GasOrder对象,
+    resType: {} as GasOrder对象,
+  },
   /** 设置出港价 */
   set_harbour_price: {
     realUrl: '/strategy/harbour_price/set_harbour_price',
@@ -2204,12 +2210,24 @@ export default {
     reqType: {} as ReleaseManage对象,
     resType: {} as any,
   },
+  /** 获取城市的经纬度范围 */
+  get_city_region: {
+    realUrl: '/strategy/station_map/get_city_region',
+    reqType: {} as 通用字符串单参数_参数类,
+    resType: {} as Array<string>,
+  },
   /** 按条件获取站信息列表 */
   list_59: {
     realUrl: '/strategy/station_map/list',
     reqType: {} as StationMap对象,
     resType: {} as Array<StationMap对象>,
   },
+  /** 更改站信息 */
+  update_25: {
+    realUrl: '/strategy/station_map/update',
+    reqType: {} as StationMap对象,
+    resType: {} as boolean,
+  },
   /** 添加库存变动日志 */
   add_33: {
     realUrl: '/strategy/stock_log/add',
@@ -2337,7 +2355,7 @@ export default {
     resType: {} as any,
   },
   /** 修改system_config_log */
-  update_25: {
+  update_26: {
     realUrl: '/strategy/system_config_log/update',
     reqType: {} as SystemConfigLog对象,
     resType: {} as any,
@@ -2367,7 +2385,7 @@ export default {
     resType: {} as any,
   },
   /** 修改tag */
-  update_26: {
+  update_27: {
     realUrl: '/strategy/tag/update',
     reqType: {} as Tag对象,
     resType: {} as any,
@@ -2868,7 +2886,7 @@ export default {
     resType: {} as any,
   },
   /** 修改truck_com_contract */
-  update_27: {
+  update_28: {
     realUrl: '/strategy/truck_com_contract/update',
     reqType: {} as TruckComContract对象,
     resType: {} as any,
@@ -2964,7 +2982,7 @@ export default {
     resType: {} as any,
   },
   /** 修改truck_driver_log */
-  update_28: {
+  update_29: {
     realUrl: '/strategy/truck_driver_log/update',
     reqType: {} as TruckDriverLog对象,
     resType: {} as any,

+ 7 - 0
src/utils/config/pages.ts

@@ -147,5 +147,12 @@ export default {
     title: '购车优惠卡',
     identity: true,
     isPager: false
+  } as ayPage,
+  activity_2025start: {
+    _url: '/pages/activity/2025start',
+    _type: 'page',
+    title: '',
+    identity: false,
+    isPager: false
   } as ayPage
 }