wzh 4 meses atrás
pai
commit
ce4f030ae8

+ 3 - 3
components/cjx/tabbar_hexiao_jxs.vue

@@ -1,16 +1,16 @@
 <template>
   <view class="tabbar-container">
-    <view class="tabbar-item" @click="navigate('/pages/cjx/hexiao/jxs/index', 0)">
+    <view class="tabbar-item" @click="navigate('/pages/hexiao/jxs/index', 0)">
       <uni-icons type="home-filled" :color="current === 0 ? activeColor : inactiveColor" size="26"></uni-icons>
       <view class="text" :style="{ color: current === 0 ? activeColor : inactiveColor }">首页</view>
     </view>
 
-    <view class="tabbar-item" @click="navigate('/pages/cjx/hexiao/jxs/order', 1)">
+    <view class="tabbar-item" @click="navigate('/pages/hexiao/jxs/order', 1)">
       <uni-icons type="shop" :color="current === 1 ? activeColor : inactiveColor" size="26"></uni-icons>
       <view class="text" :style="{ color: current === 1 ? activeColor : inactiveColor }">订单</view>
     </view>
 
-    <view class="tabbar-item" @click="navigate('/pages/cjx/hexiao/jxs/my', 2)">
+    <view class="tabbar-item" @click="navigate('/pages/hexiao/jxs/my', 2)">
       <uni-icons type="person" :color="current === 2 ? activeColor : inactiveColor" size="26"></uni-icons>
       <view class="text" :style="{ color: current === 2 ? activeColor : inactiveColor }">我的</view>
     </view>

+ 3 - 3
components/cjx/tabbar_hexiao_ywy.vue

@@ -1,16 +1,16 @@
 <template>
   <view class="tabbar-container">
-    <view class="tabbar-item" @click="navigate('/pages/cjx/hexiao/ywy/index', 0)">
+    <view class="tabbar-item" @click="navigate('/pages/hexiao/ywy/index', 0)">
       <uni-icons type="home-filled" :color="current === 0 ? activeColor : inactiveColor" size="26"></uni-icons>
       <view class="text" :style="{ color: current === 0 ? activeColor : inactiveColor }">首页</view>
     </view>
 
-    <view class="tabbar-item" @click="navigate('/pages/cjx/hexiao/ywy/retail', 1)">
+    <view class="tabbar-item" @click="navigate('/pages/hexiao/ywy/retail', 1)">
       <uni-icons type="shop" :color="current === 1 ? activeColor : inactiveColor" size="26"></uni-icons>
       <view class="text" :style="{ color: current === 1 ? activeColor : inactiveColor }">门店</view>
     </view>
 
-    <view class="tabbar-item" @click="navigate('/pages/cjx/hexiao/ywy/my', 2)">
+    <view class="tabbar-item" @click="navigate('/pages/hexiao/ywy/my', 2)">
       <uni-icons type="person" :color="current === 2 ? activeColor : inactiveColor" size="26"></uni-icons>
       <view class="text" :style="{ color: current === 2 ? activeColor : inactiveColor }">我的</view>
     </view>

+ 203 - 180
pages.json

@@ -55,153 +55,6 @@
 					"navigationStyle": "custom"
 				}
 			},
-
-			{
-				"path" : "hexiao/ywy/index",
-				"style" :
-				{
-					"navigationBarTitleText" : "首页",
-					"navigationStyle": "custom"
-				}
-			},
-			{
-				"path" : "hexiao/ywy/retail",
-				"style" :
-				{
-					"navigationBarTitleText" : "门店",
-					"enablePullDownRefresh" : false
-				}
-
-			},
-			{
-				"path" : "hexiao/ywy/my",
-				"style" :
-				{
-					"navigationBarTitleText" : "我的",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/ywy/scan_code",
-				"style" :
-				{
-					"navigationBarTitleText" : "上货扫描",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/ywy/add_retail",
-				"style" :
-				{
-					"navigationBarTitleText" : "门店信息",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/ywy/add_goods_record",
-				"style" :
-				{
-					"navigationBarTitleText" : "上货记录",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/jxs/index",
-				"style" :
-				{
-					"navigationBarTitleText" : "",
-					"navigationStyle": "custom"
-				}
-			},{
-				"path" : "hexiao/jxs/my",
-				"style" :
-				{
-					"navigationBarTitleText" : "我的",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/jxs/ywy_list",
-				"style" :
-				{
-					"navigationBarTitleText" : "业务员管理",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/jxs/hexiao_record",
-				"style" :
-				{
-					"navigationBarTitleText" : "核销记录",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/jxs/hexiao_detail",
-				"style" :
-				{
-					"navigationBarTitleText" : "核销详情",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/jxs/add_ywy",
-				"style" :
-				{
-					"navigationBarTitleText" : "业务员信息",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/login",
-				"style" :
-				{
-					"navigationBarTitleText" : "",
-					"navigationStyle": "custom"
-
-				}
-			},
-
-			{
-				"path" : "xiaoshou/index",
-				"style" :
-				{
-					"navigationBarTitleText" : "",
-					"navigationStyle": "custom"
-				}
-			},
-			{
-				"path" : "hexiao/ywy/add_patrol",
-				"style" :
-				{
-					"navigationBarTitleText" : "巡店记录",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/ywy/patrol_record",
-				"style" :
-				{
-					"navigationBarTitleText" : "巡店记录",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/ywy/hexiao_record",
-				"style" :
-				{
-					"navigationBarTitleText" : "",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/ywy/hexiao_detail",
-				"style" :
-				{
-					"navigationBarTitleText" : "核销详情",
-					"enablePullDownRefresh" : false
-				}
-			},
 			{
 				"path" : "index/claim",
 				"style" :
@@ -233,47 +86,22 @@
 					"navigationBarTitleText" : "溯源信息",
 					"navigationStyle": "custom"
 				}
-			},
-			{
-				"path" : "hexiao/jxs/order",
-				"style" :
-				{
-					"navigationBarTitleText" : "订单",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/jxs/add_order",
-				"style" :
-				{
-					"navigationBarTitleText" : "添加订单",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/jxs/order_detail",
-				"style" :
-				{
-					"navigationBarTitleText" : "订单详情",
-					"enablePullDownRefresh" : false
-				}
-			},
-			{
-				"path" : "hexiao/score_list",
+			},{
+				"path" : "shop/score_list",
 				"style" :
 				{
 					"navigationBarTitleText" : "积分明细",
 					"enablePullDownRefresh" : false
 				}
-			},
-			{
-				"path" : "hexiao/ywy/patrol_detail",
-				"style" : 
+			},{
+				"path" : "shop/shop",
+				"style" :
 				{
-					"navigationBarTitleText" : "巡店详情",
+					"navigationBarTitleText" : "积分商城",
 					"enablePullDownRefresh" : false
 				}
 			}
+
 		]
 	}, {
 		"root": "pages/lgz",
@@ -381,7 +209,202 @@
 				}
 			}
 		]
-	}],
+	}
+
+	,{
+			"root": "pages/hexiao",
+			"pages": [
+
+		{
+			"path" : "ywy/index",
+			"style" :
+			{
+				"navigationBarTitleText" : "首页",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path" : "ywy/retail",
+			"style" :
+			{
+				"navigationBarTitleText" : "门店",
+				"enablePullDownRefresh" : false
+			}
+
+		},
+		{
+			"path" : "ywy/my",
+			"style" :
+			{
+				"navigationBarTitleText" : "我的",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "ywy/scan_code",
+			"style" :
+			{
+				"navigationBarTitleText" : "上货扫描",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "ywy/add_retail",
+			"style" :
+			{
+				"navigationBarTitleText" : "门店信息",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "ywy/add_goods_record",
+			"style" :
+			{
+				"navigationBarTitleText" : "上货记录",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "jxs/index",
+			"style" :
+			{
+				"navigationBarTitleText" : "",
+				"navigationStyle": "custom"
+			}
+		},{
+			"path" : "jxs/my",
+			"style" :
+			{
+				"navigationBarTitleText" : "我的",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "jxs/ywy_list",
+			"style" :
+			{
+				"navigationBarTitleText" : "业务员管理",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "jxs/hexiao_record",
+			"style" :
+			{
+				"navigationBarTitleText" : "核销记录",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "jxs/hexiao_detail",
+			"style" :
+			{
+				"navigationBarTitleText" : "核销详情",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "jxs/add_ywy",
+			"style" :
+			{
+				"navigationBarTitleText" : "业务员信息",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "login",
+			"style" :
+			{
+				"navigationBarTitleText" : "",
+				"navigationStyle": "custom"
+
+			}
+		},
+
+		{
+			"path" : "xiaoshou/index",
+			"style" :
+			{
+				"navigationBarTitleText" : "",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path" : "ywy/add_patrol",
+			"style" :
+			{
+				"navigationBarTitleText" : "巡店记录",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "ywy/patrol_record",
+			"style" :
+			{
+				"navigationBarTitleText" : "巡店记录",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "ywy/hexiao_record",
+			"style" :
+			{
+				"navigationBarTitleText" : "",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "ywy/hexiao_detail",
+			"style" :
+			{
+				"navigationBarTitleText" : "核销详情",
+				"enablePullDownRefresh" : false
+			}
+		},
+				{
+					"path" : "jxs/order",
+					"style" :
+					{
+						"navigationBarTitleText" : "订单",
+						"enablePullDownRefresh" : false
+					}
+				},
+				{
+					"path" : "jxs/add_order",
+					"style" :
+					{
+						"navigationBarTitleText" : "添加订单",
+						"enablePullDownRefresh" : false
+					}
+				},
+				{
+					"path" : "jxs/order_detail",
+					"style" :
+					{
+						"navigationBarTitleText" : "订单详情",
+						"enablePullDownRefresh" : false
+					}
+				},
+				{
+					"path" : "ywy/patrol_detail",
+					"style" :
+					{
+						"navigationBarTitleText" : "巡店详情",
+						"enablePullDownRefresh" : false
+					}
+				}
+			,
+				{
+					"path" : "ywy/add_goods_detail",
+					"style" :
+					{
+						"navigationBarTitleText" : "上货详情",
+						"enablePullDownRefresh" : false
+					}
+				}
+	]
+		}
+	],
 
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

pages/cjx/hexiao/score_list.vue → pages/cjx/shop/score_list.vue


pages/cjx/hexiao/jxs/add_order.vue → pages/hexiao/jxs/add_order.vue


pages/cjx/hexiao/jxs/add_ywy.vue → pages/hexiao/jxs/add_ywy.vue


pages/cjx/hexiao/jxs/hexiao_detail.vue → pages/hexiao/jxs/hexiao_detail.vue


pages/cjx/hexiao/jxs/hexiao_record.vue → pages/hexiao/jxs/hexiao_record.vue


+ 8 - 8
pages/cjx/hexiao/jxs/index.vue

@@ -64,8 +64,8 @@
 
 <script>
 import CustomTabbar from '@/components/cjx/tabbar_hexiao_jxs.vue';
-import {getAdminInfo} from "../../../../utils/auth";
-import {getAdminUserInfo} from "../../../../api/hexiao";
+import {getAdminInfo} from "@/utils/auth";
+import {getAdminUserInfo} from "@/api/hexiao";
 import SelectStoreDrawer from '@/components/cjx/select-store-drawer.vue';
 
 export default {
@@ -102,12 +102,12 @@ export default {
   methods: {
     // 监听从抽屉组件传来的 select 事件
     openXS(){
-      uni.navigateTo({ url: '/pages/cjx/xiaoshou/index?type=3' });
+      uni.navigateTo({ url: '/pages/hexiao/xiaoshou/index?type=3' });
     },
     onStoreSelect(store) {
       console.log('在首页接收到选中的门店:', store);
       this.selectedStore = store;
-      uni.navigateTo({ url: '/pages/cjx/hexiao/scan_code?storeId='+store.id });
+      uni.navigateTo({ url: '/pages/hexiao/scan_code?storeId='+store.id });
     },
     // 格式化数字,添加千位分隔符
     formatNumber(num) {
@@ -133,17 +133,17 @@ export default {
       console.log('准备跳转到:', page);
       // uni.navigateTo({ url: `/pages/${page}/${page}` });
       if("ywyList" === page){
-        uni.navigateTo({ url: `/pages/cjx/hexiao/jxs/ywy_list` });
+        uni.navigateTo({ url: `/pages/hexiao/jxs/ywy_list` });
         return;
       }
       if("patrolRecords" === page){
-        uni.navigateTo({ url: `/pages/cjx/hexiao/jxs/hexiao_record` });
+        uni.navigateTo({ url: `/pages/hexiao/jxs/hexiao_record` });
         return;
       }
       if("stockRecords" === page){
-        uni.navigateTo({ url: `/pages/cjx/hexiao/ywy/add_goods_record` });
+        uni.navigateTo({ url: `/pages/hexiao/ywy/add_goods_record` });
       }else if("pointsStats" === page){
-        uni.navigateTo({ url: `/pages/cjx/hexiao/score_list` });
+        uni.navigateTo({ url: `/pages/cjx/shop/score_list` });
       }else{
         this.build();
       }

+ 2 - 2
pages/cjx/hexiao/jxs/my.vue

@@ -61,8 +61,8 @@
 
 <script>
 import CustomTabbar from '@/components/cjx/tabbar_hexiao_jxs.vue';
-import {clearAdminToken, getAdminInfo} from "../../../../utils/auth";
-import {getAdminUserInfo} from "../../../../api/hexiao";
+import {clearAdminToken, getAdminInfo} from "@/utils/auth";
+import {getAdminUserInfo} from "@/api/hexiao";
 
 export default {
   components: {

pages/cjx/hexiao/jxs/order.vue → pages/hexiao/jxs/order.vue


pages/cjx/hexiao/jxs/order_detail.vue → pages/hexiao/jxs/order_detail.vue


+ 6 - 6
pages/cjx/hexiao/jxs/ywy_list.vue

@@ -81,7 +81,7 @@
 </template>
 
 <script>
-import {ywyList,delYwy} from "../../../../api/hexiao";
+ import {ywyList,delYwy} from "@/api/hexiao";
 
 export default {
   data() {
@@ -155,18 +155,18 @@ export default {
       });
     },
     goToStores(id) {
-      uni.navigateTo({ url: '/pages/cjx/hexiao/ywy/retail?id='+id });
+      uni.navigateTo({ url: '/pages/hexiao/ywy/retail?id='+id });
 
     },
     viewSalesData(id) {
       console.log('查看销售数据 ID:', id);
-      uni.navigateTo({ url: '/pages/cjx/xiaoshou/index?type=2&ywyId='+id });
+      uni.navigateTo({ url: '/pages/hexiao/xiaoshou/index?type=2&ywyId='+id });
     },
     editSalesperson(id) {
-      uni.navigateTo({ url: '/pages/cjx/hexiao/jxs/add_ywy?id='+id });
+      uni.navigateTo({ url: '/pages/hexiao/jxs/add_ywy?id='+id });
       console.log('编辑业务员 ID:', id); },
     viewPatrolRecords(id) {
-      uni.navigateTo({ url: '/pages/cjx/hexiao/ywy/patrol_record?id='+id });
+      uni.navigateTo({ url: '/pages/hexiao/ywy/patrol_record?id='+id });
 
     },
     deleteSalesperson(id) {
@@ -187,7 +187,7 @@ export default {
     },
     addNewSalesperson() {
       console.log('跳转到新增业务员页面');
-      uni.navigateTo({ url: '/pages/cjx/hexiao/jxs/add_ywy' });
+      uni.navigateTo({ url: '/pages/hexiao/jxs/add_ywy' });
     }
   }
 }

+ 6 - 6
pages/cjx/hexiao/login.vue

@@ -1,11 +1,11 @@
 <template>
   <view class="page-container">
     <view class="welcome-title">
-      超吉炫,欢迎您!
+      智能营销系统,欢迎您!
     </view>
 
     <view class="main-card">
-      <image class="logo" :src="imgurl+'/cjx/hexiao/lobin_lobin.png'" mode="aspectFit"></image>
+<!--      <image class="logo" :src="imgurl+'/cjx/hexiao/lobin_lobin.png'" mode="aspectFit"></image>-->
 
       <view class="user-type-selector">
         <view
@@ -57,7 +57,7 @@
 <script>
 // 1. 导入你的API方法
 import { getVerificationCode, login } from '@/api/hexiao.js';
-import {getAdminInfo, getAdminToken, setAdminInfo, setAdminToken} from "../../../utils/auth";
+import {getAdminInfo, getAdminToken, setAdminInfo, setAdminToken} from "@/utils/auth";
 
 export default {
   data() {
@@ -90,12 +90,12 @@ export default {
 
       let info = getAdminInfo()
       let userType = info.roleType;
-      let pageUrl = '/pages/cjx/hexiao/ywy/index';
+      let pageUrl = '/pages/hexiao/ywy/index';
       if(userType === 1){
-        pageUrl = '/pages/cjx/hexiao/jxs/index';
+        pageUrl = '/pages/hexiao/jxs/index';
       }
       if(userType === 2){
-         pageUrl = '/pages/cjx/hexiao/ywy/index';
+         pageUrl = '/pages/hexiao/ywy/index';
       }
       uni.reLaunch({
         url: pageUrl

+ 572 - 0
pages/hexiao/xiaoshou/index.vue

@@ -0,0 +1,572 @@
+<template>
+  <view class="container">
+    <view class="title">
+      <view class="title-text">{{title}}</view>
+    </view>
+    <view class="header">
+      <view class="query">
+        <u-row customStyle="margin-bottom: 10px" gutter="20">
+          <u-col span="9">
+            <u--input
+                @focus="timeShow = true"
+                v-model="startTimeXd"
+                placeholder="开始日期 ~ 结束日期"
+                prefixIcon="calendar"
+                prefixIconStyle="font-size: 22px;color: #909399"
+            ></u--input>
+          </u-col>
+          <u-col span="3">
+            <view class="query-btn" @click="timeShow = !timeShow">
+              <view class="query-btn-icon">
+              </view>
+              <view class="query-btn-text">筛选</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="filter">
+        <view class="item-one">
+          <view class="type-icon-hexiao"></view>
+          <view class="type-data">
+            <view class="number">{{hexiaoNumber}}</view>
+            <view class="text">核销</view>
+          </view>
+        </view>
+        <view class="item-one"  v-if="type === 2">
+          <view class="type-icon-xundian"></view>
+          <view class="type-data">
+            <view class="number">{{ xundianNumber}}</view>
+            <view class="text">巡店</view>
+          </view>
+        </view>
+        <view class="item-one" v-if="type !== 3">
+          <view class="type-icon-shanghuo"></view>
+          <view class="type-data">
+            <view class="number">{{ shangHuoNumber}}</view>
+            <view class="text">上货</view>
+          </view>
+        </view>
+        <view class="item-one" v-if="type === 3">
+          <view class="type-icon-xiadan"></view>
+          <view class="type-data">
+            <view class="number">{{xiaDanNumber}}</view>
+            <view class="text">下单</view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="content">
+      <view class="t-one">
+        <view class="t-text">核销和上货趋势统计</view>
+        <view class="charts-box">
+          <qiun-data-charts
+              type="line"
+              :opts="opts"
+              :chartData="chartData"
+          />
+        </view>
+      </view>
+      <view class="t-one" v-show=" type == 2">
+        <view class="t-text">巡店统计</view>
+        <view class="charts-box">
+          <qiun-data-charts
+              type="column"
+              :opts="opts"
+              :chartData="chartDataXd"
+          />
+        </view>
+      </view>
+
+    </view>
+    <u-popup :show="show" mode="bottom"  @close="show = false" >
+      <view class="popup-content">
+        <view class="popup-text">筛选</view>
+        <u-row customStyle="margin-bottom: 10px">
+          <u-col span="3">
+            <view class="explain">选择日期</view>
+          </u-col>
+          <u-col span="9">
+            <u--input
+                v-model="startTimeXd"
+                placeholder="开始日期 ~ 结束日期"
+                prefixIcon="calendar"
+                prefixIconStyle="font-size: 22px;color: #909399"
+                @focus="timeShow = true"
+            ></u--input>
+          </u-col>
+        </u-row>
+        <u-row customStyle="margin-bottom: 10px">
+          <u-col span="3">
+            <view class="explain">门店名称</view>
+          </u-col>
+          <u-col span="9">
+            <u--input
+                placeholder="请输入内容"
+                border="surround"
+            ></u--input>
+          </u-col>
+        </u-row>
+        <u-row customStyle="margin-bottom: 10px">
+          <u-col span="3">
+            <view class="explain">业务员</view>
+          </u-col>
+          <u-col span="9">
+            <u--input
+                placeholder="请输入内容"
+                border="surround"
+            ></u--input>
+          </u-col>
+        </u-row>
+        <u-row customStyle="margin-bottom: 10px">
+          <u-col span="3">
+            <view class="explain">订单编号</view>
+          </u-col>
+          <u-col span="9">
+            <u--input
+                placeholder="请输入内容"
+                border="surround"
+            ></u--input>
+          </u-col>
+        </u-row>
+        <view class="popup-btn">
+          <u-button  class="popup-btn-one">搜索</u-button>
+          <u-button  class="popup-btn-one" type="primary">重置</u-button>
+        </view>
+      </view>
+
+    </u-popup>
+    <u-calendar :minDate="minDate"  :monthNumber="6"  :show="timeShow" :mode="mode" @confirm="confirm" @close="timeShow = false"></u-calendar>
+
+  </view>
+
+</template>
+
+<script>
+import {getSalesTotal,getSalesTrend,getSalesmanSalesTotal,getSalesmanSalesTrend,getSalesmanVisitTrend,getStoreSalesSummary,getStoreSalesTrend} from "../../../api/hexiao";
+export default {
+  data() {
+    return {
+      storeId: 0,
+	    ywyId:0,
+      minDate: new Date(new Date().setMonth(new Date().getMonth() - 2)),
+      maxDate: new Date(),
+      hexiaoNumber: 0,
+      xundianNumber: 0,
+      shangHuoNumber: 0,
+      xiaDanNumber: 0,
+      type: 1,
+      title: '',
+      startTime: '',
+      endTime: '',
+      startTimeXd: '',
+      timeShow: false,
+      mode: 'range',
+      show: false,
+      chartDataXd: {},
+      chartData: {},
+      //您可以通过修改 config-ucharts.js 文件中下标为 ['line'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
+      opts: {
+        height: 210,
+        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
+        padding: [15,10,0,15],
+        enableScroll: false,
+        legend: {},
+        xAxis: {
+          disableGrid: true
+        },
+        yAxis: {
+          gridType: "dash",
+          dashLength: 2
+        },
+        extra: {
+          line: {
+            type: "straight",
+            width: 2,
+            activeType: "hollow"
+          }
+        }
+      }
+    };
+  },
+  onLoad: function(options) {
+    //门店
+    if (options.type == 1){
+      this.title = '门店销售数据';
+      this.type = 1;
+      this.storeId = options.storeId;
+      this.initMenDian();
+    }
+    //业务员
+    if (options.type == 2){
+      this.title = '业务员销售数据';
+      this.type = 2;
+      this.ywyId = options.ywyId;
+      console.log(this.type);
+      this.initYWY();
+    }
+    //经销商
+    if (options.type == 3){
+      this.title = '经销商销售数据';
+      this.type = 3;
+      this.initJXS();
+    }
+  },
+  onReady() {
+  },
+  methods: {
+    initMenDian() {
+      let  that = this;
+      getStoreSalesSummary(this.startTime,this.endTime,this.storeId).then(res => {
+        if (res.code === 0){
+          that.hexiaoNumber = res.data.verificationTotal;
+          that.shangHuoNumber = res.data.activateTotal;
+        }
+      }).catch(err => {
+      });
+      getStoreSalesTrend(this.startTime,this.endTime,this.storeId).then(resData => {
+        if (resData.code === 0){
+          let apiResponse = resData.data;
+          // 提取日期列表并排序
+          let categories = apiResponse.map(item => {
+            // 从日期中提取月日,例如 "2025-08-01" -> "08-01" -> "8/1" 或者只显示日 "1"
+            return item.date.split("-")[2]; // 这里提取日期中的日部分
+          });
+
+          // 排序日期列表
+          categories.sort((a, b) => {
+            return a.localeCompare(b);
+          })
+
+          // 按日期排序数据
+          let sortedData = apiResponse.sort((a, b) => new Date(a.date) - new Date(b.date));
+
+          // 提取核销数据和上货数据
+          let verificationData = sortedData.map(item => item.verificationCount);
+          let activateData = sortedData.map(item => item.activateCount);
+          // 构造图表需要的格式
+          let resTb = {
+            categories: categories,
+            series: [
+              {
+                name: "核销",
+                data: verificationData
+              },
+              {
+                name: "上货",
+                data: activateData
+              }
+            ]
+          };
+          this.chartData = JSON.parse(JSON.stringify(resTb));
+        }
+      })
+
+    },
+    initYWY() {
+        let  that = this;
+        getSalesmanSalesTotal(this.startTime,this.endTime,this.ywyId).then(res => {
+          if (res.code === 0){
+            console.log(res.data);
+            that.hexiaoNumber = res.data.verificationTotal;
+            that.xundianNumber = res.data.visitTotal;
+            that.shangHuoNumber = res.data.activateTotal;
+          }
+        }).catch(err => {
+
+        });
+        getSalesmanSalesTrend(this.startTime,this.endTime,this.ywyId).then(res => {
+           if (res.code === 0){
+             console.log(res.data);
+             let apiResponse = res.data;
+             // 提取日期列表并排序
+             let categories = apiResponse.map(item => {
+               // 从日期中提取月日,例如 "2025-08-01" -> "08-01" -> "8/1" 或者只显示日 "1"
+               return item.date.split("-")[2]; // 这里提取日期中的日部分
+             });
+
+             // 排序日期
+             categories.sort((a, b) => parseInt(a) - parseInt(b));
+
+             // 按日期排序数据
+             let sortedData = apiResponse.sort((a, b) => new Date(a.date) - new Date(b.date));
+
+             // 提取核销数据和上货数据
+             let verificationData = sortedData.map(item => item.verificationCount);
+             let activateData = sortedData.map(item => item.activateCount);
+
+             // 构造图表需要的格式
+             let resTb = {
+               categories: categories,
+               series: [
+                 {
+                   name: "核销",
+                   data: verificationData
+                 },
+                 {
+                   name: "上货",
+                   data: activateData
+                 }
+               ]
+             };
+
+             this.chartData = JSON.parse(JSON.stringify(resTb));
+          }
+        }).catch(err => {
+
+        });
+      getSalesmanVisitTrend(this.startTime,this.endTime,this.ywyId).then(res => {
+        if (res.code === 0){
+          // 处理巡店趋势数据
+          let apiResponse = res.data;
+
+          // 提取日期列表(这里提取日部分)
+          let categories = apiResponse.map(item => {
+            return item.date.split("-")[2]; // 提取日期中的日部分
+          });
+
+          // 按日期排序数据
+          let sortedData = apiResponse.sort((a, b) => new Date(a.date) - new Date(b.date));
+
+          // 提取巡店数据
+          let visitData = sortedData.map(item => item.visitCount || 0);
+
+          // 构造图表需要的格式(与selectedCode中格式一致)
+          let resFormat = {
+            categories: categories,
+            series: [
+              {
+                name: "巡店",
+                data: visitData
+              }
+            ]
+          };
+
+          this.chartDataXd = JSON.parse(JSON.stringify(resFormat));
+        }
+      }).catch(err => {
+        console.error(err);
+      });
+
+    },
+    initJXS() {
+      getSalesTotal(this.startTime,this.endTime).then(res => {
+            if (res.code === 0){
+              this.hexiaoNumber = res.data.orderTotal;
+              this.xiaDanNumber = res.data.verificationTotal;
+            }
+      }).catch(err => {
+
+      });
+      getSalesTrend(this.startTime,this.endTime).then(data => {
+          if (data.code === 0){
+            let apiResponse = data.data;
+            // 提取日期列表并排序
+            let categories = apiResponse.map(item => {
+              // 从日期中提取月日,例如 "2025-08-01" -> "08-01" -> "8/1" 或者只显示日 "1"
+              return item.date.split("-")[2];
+            })
+            categories.sort((a, b) => parseInt(a) - parseInt(b));
+            // 按日期排序数据
+            let sortedData = apiResponse.sort((a, b) => new Date(a.date) - new Date(b.date));
+            let verificationData = sortedData.map(item => item.verificationCount);
+            let orderCountData = sortedData.map(item => item.orderCount);
+            let res = {
+              categories: categories,
+              series: [
+                {
+                  name: "核销",
+                  data: verificationData
+                },
+                {
+                  name: "下单",
+                  data: orderCountData
+                }
+              ]
+            };
+            this.chartData = JSON.parse(JSON.stringify(res));
+          }
+      })
+
+    },
+    confirm(e) {
+      this.startTime = e[0];
+      this.endTime = e[e.length -1];
+      this.startTimeXd = e[0]+' ~ '+e[e.length -1];
+      this.timeShow = false;
+      if (this.type == 1){
+        this.initMenDian();
+      }
+      if (this.type == 2){
+        this.initYWY();
+      }
+      if (this.type == 3){
+        this.initJXS();
+      }
+    },
+  }
+};
+</script>
+
+<style scoped>
+.container {
+  background-image: url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/bgi_2.png");
+  background-size: 100% 100%;
+  background-position: center;
+  background-repeat: no-repeat;
+  height: 100vh;
+  padding: 0px 10px;
+}
+.title-text{
+  font-weight: bold;
+  font-size: 18px;
+  color: #102A3C;
+  text-align: center;
+  height: 12vh;
+  line-height: 16vh;
+}
+  /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
+  .charts-box {
+    width: 100%;
+    height: 210px;
+  }
+  .query-btn {
+    background-color: #409eff;
+    color: #fff;
+    padding: 20rpx;
+    border-radius: 10rpx;
+    height: 34rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .query-btn-icon {
+    height: 32rpx;
+    width: 32rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/queryIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .query-btn-text {
+    font-weight: 400;
+    font-size: 30rpx;
+    color: #F5F5F5;
+  }
+  .filter{
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    height: 160rpx;
+    background: #FFFFFF;
+    box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(168,168,168,0.22);
+    border-radius: 12rpx;
+    border: 2px solid #FFFFFF;
+  }
+  .item-one{
+    display: flex;
+
+  }
+  .type-icon-hexiao {
+    height: 80rpx;
+    width: 80rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/hexiaoIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .type-icon-xundian {
+    height: 80rpx;
+    width: 80rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/xundianIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .type-icon-shanghuo {
+    height: 80rpx;
+    width: 80rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/shanghuoIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .type-icon-xiadan {
+    height: 80rpx;
+    width: 80rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/xiadanIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .number{
+    font-weight: bold;
+    font-size: 30rpx;
+    color: #3B3638;
+  }
+  .text{
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #84868A;
+  }
+  .type-data{
+    margin-left: 10rpx;
+  }
+  .t-one{
+    margin-top: 10px;
+    background-color: #fff;
+  }
+  .t-text {
+    position: relative;
+    padding-left: 10px; /* 为竖杠留出空间 */
+    font-size: 30rpx; /* 根据需要调整字体大小 */
+    color: #3B3638; /* 标题颜色 */
+    font-weight: bold;
+  }
+
+  .t-text::before {
+    content: ''; /* 必须设置 content 属性 */
+    position: absolute;
+    left: 0;
+    top: 50%;
+    transform: translateY(-50%); /* 垂直居中 */
+    width: 4px; /* 竖杠宽度 */
+    height: 16px; /* 竖杠高度 */
+    background-color: #1890FF; /* 蓝色 */
+  }
+  ::v-deep .u-input{
+    background-color: #fff;
+  }
+  .popup-content{
+    height: 45vh;
+    padding: 10px;
+  }
+  .popup-text{
+    font-family: PingFang SC;
+    font-weight: bold;
+    font-size: 36rpx;
+    color: #1C1E1D;
+    text-align: center;
+    margin-bottom: 10px;
+  }
+  .popup-btn{
+    display: flex;
+    justify-content: space-around;
+  }
+  .popup-btn-one{
+    width: 275rpx;
+    height: 70rpx;
+    background: linear-gradient(0deg, #6FA4FE, #488CFF);
+    box-shadow: 0rpx 9rpx 16rpx 0rpx rgba(153,153,153,0.35);
+    border-radius: 35rpx;
+  }
+  .explain{
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #3B3638;
+  }
+</style>

+ 5 - 14
pages/cjx/hexiao/ywy/add_goods_detail.vue

@@ -7,16 +7,7 @@
       </view>
       <view class="info-row">
         <text class="info-label">上传时间</text>
-        <text class="info-value">{{ detail.uploadTime }}</text>
-      </view>
-      <view class="info-row" v-if="detail.status == 1 || detail.status == 2">
-        <text class="info-label">申请时间</text>
-        <text class="info-value">{{ detail.applyTime }}</text>
-      </view>
-
-      <view class="info-row" v-if=" detail.status == 2">
-        <text class="info-label">审核时间</text>
-        <text class="info-value">{{ detail.writeOffTime }}</text>
+        <text class="info-value">{{ detail.activeTime }}</text>
       </view>
 
 
@@ -34,12 +25,12 @@
     </view>
 
     <scroll-view class="details-list" scroll-y="true" @scrolltolower="loadMore">
-      <view v-if="detail.items.length === 0 && loadStatus !== 'loading'" class="empty-tip">
+      <view v-if="detail.queryActiveRecordDetailVos.length === 0 && loadStatus !== 'loading'" class="empty-tip">
         暂无明细记录
       </view>
-      <view v-for="(item, index) in detail.items" :key="index" class="detail-item-card">
+      <view v-for="(item, index) in detail.queryActiveRecordDetailVos" :key="index" class="detail-item-card">
         <text class="item-name">{{ item.productName }}</text>
-        <text class="item-code">扫码编号:{{ item.qrCodeNum }}</text>
+        <text class="item-code">扫码编号:{{ item.qrcodeNum }}</text>
       </view>
       <uni-load-more :status="loadStatus"></uni-load-more>
     </scroll-view>
@@ -67,7 +58,7 @@ export default {
       pagination: { page: 1, limit: 15 },
       loadStatus: 'more', // 'more', 'loading', 'noMore'
       isLoading: false,
-      detail:{totals:[]}
+      detail:{queryActiveRecordDetailVos:[],totals:[]}
     };
   },
   onLoad(opt) {

+ 1 - 1
pages/cjx/hexiao/ywy/add_goods_record.vue

@@ -146,7 +146,7 @@ export default {
   },
   methods: {
     detail(id){
-      uni.navigateTo({ url: `/pages/cjx/hexiao/ywy/add_goods_detail?id=`+id });
+      uni.navigateTo({ url: `/pages/hexiao/ywy/add_goods_detail?id=`+id });
     },
     confirm(e) {
       this.startTime = e[0];

pages/cjx/hexiao/ywy/add_patrol.vue → pages/hexiao/ywy/add_patrol.vue


pages/cjx/hexiao/ywy/add_retail.vue → pages/hexiao/ywy/add_retail.vue


pages/cjx/hexiao/ywy/hexiao_detail.vue → pages/hexiao/ywy/hexiao_detail.vue


+ 1 - 1
pages/cjx/hexiao/ywy/hexiao_record.vue

@@ -201,7 +201,7 @@ export default {
 
     },
     detail(id){
-      uni.navigateTo({ url: `/pages/cjx/hexiao/ywy/hexiao_detail?id=`+id });
+      uni.navigateTo({ url: `/pages/hexiao/ywy/hexiao_detail?id=`+id });
     },
     loadMore() {
       this.fetchRecords();

+ 9 - 9
pages/cjx/hexiao/ywy/index.vue

@@ -77,8 +77,8 @@
 
 <script>
 import CustomTabbar from '@/components/cjx/tabbar_hexiao_ywy.vue';
-import {getAdminInfo} from "../../../../utils/auth";
-import {getAdminUserInfo} from "../../../../api/hexiao";
+import {getAdminInfo} from "@/utils/auth";
+import {getAdminUserInfo} from "@/api/hexiao";
 import SelectStoreDrawer from '@/components/cjx/select-store-drawer.vue';
 
 export default {
@@ -93,7 +93,7 @@ export default {
       imgurl:"https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu",
       userInfo: {
         name: '',
-        role: '超吉炫'
+        role: ''
       },
       stats: {
         storeCount: 0,
@@ -118,7 +118,7 @@ export default {
     onStoreSelect(store) {
       console.log('在首页接收到选中的门店:', store);
       this.selectedStore = store;
-      uni.navigateTo({ url: '/pages/cjx/hexiao/ywy/scan_code?type='+this.showDrawer+'&storeId='+store.id });
+      uni.navigateTo({ url: '/pages/hexiao/ywy/scan_code?type='+this.showDrawer+'&storeId='+store.id });
     },
     // 格式化数字,添加千位分隔符
     formatNumber(num) {
@@ -145,17 +145,17 @@ export default {
       // uni.navigateTo({ url: `/pages/${page}/${page}` });
 
       if("stockRecords" === page){
-        uni.navigateTo({ url: `/pages/cjx/hexiao/ywy/add_goods_record` });
+        uni.navigateTo({ url: `/pages/hexiao/ywy/add_goods_record` });
       }
       else if("verifyRecords" === page){
-        uni.navigateTo({ url: `/pages/cjx/hexiao/ywy/hexiao_record` });
+        uni.navigateTo({ url: `/pages/hexiao/ywy/hexiao_record` });
       }else if("patrolRecords" === page){
-        uni.navigateTo({ url: `/pages/cjx/hexiao/ywy/patrol_record` });
+        uni.navigateTo({ url: `/pages/hexiao/ywy/patrol_record` });
       }else if("pointsStats" === page){
-        uni.navigateTo({ url: `/pages/cjx/hexiao/score_list?score=`+this.stats.pointsCount });
+        uni.navigateTo({ url: `/pages/cjx/shop/score_list?score=`+this.stats.pointsCount });
       }
       else if("storeStats" === page){
-        uni.redirectTo({ url: `/pages/cjx/hexiao/ywy/retail` });
+        uni.redirectTo({ url: `/pages/hexiao/ywy/retail` });
       }
       else{
         this.build();

+ 3 - 3
pages/cjx/hexiao/ywy/my.vue

@@ -61,8 +61,8 @@
 
 <script>
 import CustomTabbar from '@/components/cjx/tabbar_hexiao_ywy.vue';
-import {clearAdminToken, getAdminInfo} from "../../../../utils/auth";
-import {getAdminUserInfo} from "../../../../api/hexiao";
+import {clearAdminToken, getAdminInfo} from "@/utils/auth";
+ import {getAdminUserInfo} from "@/api/hexiao";
 
 export default {
   components: {
@@ -144,7 +144,7 @@ export default {
             clearAdminToken();
             // 跳转到登录页
             uni.reLaunch({
-              url: '/pages/cjx/hexiao/login' // 请替换为您的登录页路径
+              url: '/pages/hexiao/login' // 请替换为您的登录页路径
             });
           }
         }

pages/cjx/hexiao/ywy/patrol_detail.vue → pages/hexiao/ywy/patrol_detail.vue


+ 1 - 1
pages/cjx/hexiao/ywy/patrol_record.vue

@@ -133,7 +133,7 @@ export default {
   },
   methods: {
     detail(id){
-      uni.navigateTo({ url: `/pages/cjx/hexiao/ywy/patrol_detail?id=`+id });
+      uni.navigateTo({ url: `/pages/hexiao/ywy/patrol_detail?id=`+id });
 
     },
     // 核心:获取记录列表数据

+ 5 - 5
pages/cjx/hexiao/ywy/retail.vue

@@ -73,7 +73,7 @@
 <script>
 // 您自定义tabBar的路径,请确保正确
 import CustomTabbar from '@/components/cjx/tabbar_hexiao_ywy.vue';
-import {getStoreList,removeRetail} from "../../../../api/hexiao";
+import {getStoreList,removeRetail} from "@/api/hexiao";
 export default {
   components: {
     CustomTabbar
@@ -137,12 +137,12 @@ export default {
         this.fetchStoreList(true);
     },
     viewDetails(id) {
-      uni.navigateTo({ url: '/pages/cjx/hexiao/ywy/add_retail?edit=0&id='+id });
+      uni.navigateTo({ url: '/pages/hexiao/ywy/add_retail?edit=0&id='+id });
       console.log('查看详情 ID:', id);
       },
-    editStore(id) {    uni.navigateTo({ url: '/pages/cjx/hexiao/ywy/add_retail?edit=1&id='+id });},
+    editStore(id) {    uni.navigateTo({ url: '/pages/hexiao/ywy/add_retail?edit=1&id='+id });},
     patrolStore(id) {
-      uni.navigateTo({ url: '/pages/cjx/hexiao/ywy/add_patrol?edit=1&id='+id });
+      uni.navigateTo({ url: '/pages/hexiao/ywy/add_patrol?edit=1&id='+id });
     },
     deleteStore(id) {
       let self = this;
@@ -164,7 +164,7 @@ export default {
       this.fetchStoreList(true);
     },
     addNewStore() {
-      uni.navigateTo({ url: `/pages/cjx/hexiao/ywy/add_retail?edit=1` });
+      uni.navigateTo({ url: `/pages/hexiao/ywy/add_retail?edit=1` });
      }
   }
 }

pages/cjx/hexiao/ywy/scan_code.vue → pages/hexiao/ywy/scan_code.vue