product-myperformance.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>产品中心-我的业绩-创业帮</title>
  6. <meta name="keywords" content="产品中心-我的业绩-创业帮">
  7. <meta name="description" content="产品中心-我的业绩-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="产品中心-我的业绩-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. <style>
  17. .screenroll::-webkit-scrollbar {
  18. display: none;
  19. }
  20. .van-pull-refresh{
  21. height:calc(100vh - 2.3rem);
  22. }
  23. .bycloud{
  24. margin-left:0 !important;
  25. }
  26. .detailinfo{
  27. justify-content:space-between !important;
  28. }
  29. /*.mtr{
  30. text-align:right;
  31. }
  32. */
  33. .jcsb div{
  34. flex:1;
  35. }
  36. </style>
  37. </head>
  38. <body class="bgc-back pb0 ovh">
  39. <div class="iphonetitle"> </div>
  40. <div id="app" v-cloak>
  41. <van-nav-bar class="camp_title user_title_normal f16" title="我的业绩" @click-left="goback" v-if="toptitleisshow" left-arrow v-cloak>
  42. <template #left>
  43. <van-icon name="arrow-left" color="#333" size="20"></van-icon>
  44. </template>
  45. </van-nav-bar>
  46. <div class="screenroll">
  47. <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
  48. <div class="performance_toppanel ovh">
  49. <div class="title df mt8 c333">
  50. <div class="time" @click="showDate = true"><span>{{nowdate}}</span>
  51. <van-icon name="arrow"> </van-icon>
  52. </div>
  53. <div class="f12">本月业绩每日上午统一更新(不含当日)</div>
  54. </div>
  55. </div>
  56. <div class="performance_panel bgcfff">
  57. <div class="title df">
  58. <div class="f14 c333 b">个人交易</div>
  59. <div class="pic" @click="trendpic('个人交易')"><span class="f12">趋势图</span>
  60. <van-icon class="f12" name="arrow"> </van-icon>
  61. </div>
  62. </div>
  63. <div class="maininfo">
  64. <div class="amount df" @click="gopersonalachievement">
  65. <div class="echarts" ref="echartpersonal" style="pointer-events: none;"></div>
  66. <div class="data">
  67. <div class="f14 c999">总交易额(元)
  68. <van-icon name="arrow"> </van-icon>
  69. </div>
  70. <div class="money"> {{abs(personelinfo.TotalAmount)}}</div>
  71. </div>
  72. </div>
  73. <div class="detailinfo df">
  74. <div class="bycard">
  75. <div class="f12 c999"> <span class="roll dib"></span><span>POS贷记卡交易额(元)</span></div>
  76. <div class="f14 c666 money">{{abs(personelinfo.TotalPosAmount)}}</div>
  77. </div>
  78. <div class="bycloud">
  79. <div class="f12 c999"> <span class="roll dib"></span><span>云闪付小额交易额(元)</span></div>
  80. <div class="f14 c666 money mtr">{{abs(personelinfo.TotalCloudPayAmount)}}</div>
  81. </div>
  82. </div>
  83. <div class="detailinfo df">
  84. <div class="bycard">
  85. <div class="f12 c999"> <span class="roll green dib"></span><span>码牌活动交易额(元)</span></div>
  86. <div class="f14 c666 money">{{abs(personelinfo.TotalActiveAmount)}}</div>
  87. </div>
  88. <div class="bycloud">
  89. <div class="f12 c999"> <span class="roll blue dib"></span><span>POS借记卡交易额(元)</span></div>
  90. <div class="f14 c666 money mtr">{{abs(personelinfo.TotalUnActiveAmount)}}</div>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="user df jcsb rel" @click="mymerchant">
  95. <div class="bycard">
  96. <div class="f12 c999"> <span>累计总创客(人)</span></div>
  97. <div class="f14 c666 all">{{personelinfo.TotalUser}}</div>
  98. </div>
  99. <div class="bycloud ml60">
  100. <div class="f12 c999"> <span>新增创客(人)</span></div>
  101. <div class="f14 c666 all mtr add">+{{personelinfo.AddUser}}</div>
  102. <div class="abs righticon">
  103. <van-icon name="arrow"> </van-icon>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="user df rel jcsb" @click="gopersonalactive">
  108. <div class="bycard">
  109. <div class="f12 c999"> <span>累计激活POS机商户(户)</span></div>
  110. <div class="f14 c666 all">{{personelinfo.TotalPosMerchant}}</div>
  111. </div>
  112. <div class="bycloud ml60">
  113. <div class="f12 c999"> <span>累计激活码牌商户(户)</span></div>
  114. <div class="c666 mtr f14">{{personelinfo.TotalActMerchant}}</div>
  115. <div class="abs righticon">
  116. <van-icon name="arrow"></van-icon>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="user df rel jcsb">
  121. <div class="bycard">
  122. <div class="f12 c999"> <span>支付宝总订单数</span></div>
  123. <div class="f14 c666 all">{{personelinfo.TotalAlipayOrder}}</div>
  124. </div>
  125. <div class="bycloud ml60">
  126. <div class="f12 c999"> <span>微信总订单数</span></div>
  127. <div class="c666 f14 mtr">{{personelinfo.TotalWeChatOrder}}</div>
  128. <div class="abs righticon"></div>
  129. </div>
  130. </div>
  131. </div>
  132. <div class="performance_panel bgcfff teampanel">
  133. <div class="title df">
  134. <div class="f14 c333 b">计奖交易</div>
  135. <div class="pic" @click="trendpic('计奖交易')"> <span class="f12">趋势图</span>
  136. <van-icon class="f12" name="arrow"> </van-icon>
  137. </div>
  138. </div>
  139. <div class="maininfo">
  140. <div class="amount df" @click="goteamachievement">
  141. <div class="echarts" ref="echartpersonal2team" style="pointer-events: none;"></div>
  142. <div class="data">
  143. <div class="f14 c999">总交易额(元)
  144. <van-icon name="arrow"> </van-icon>
  145. </div>
  146. <div class="money">{{abs(teaminfo.TotalAmount)}}</div>
  147. </div>
  148. </div>
  149. <div class="detailinfo df">
  150. <div class="bycard">
  151. <div class="f12 c999"> <span class="roll dib"></span><span>POS贷记卡交易额(元)</span></div>
  152. <div class="f14 c666 money">{{abs(teaminfo.TotalPosAmount)}}</div>
  153. </div>
  154. <div class="bycloud">
  155. <div class="f12 c999"> <span class="roll dib"></span><span>云闪付小额交易额(元)</span></div>
  156. <div class="f14 c666 money mtr">{{abs(teaminfo.TotalCloudPayAmount)}}</div>
  157. </div>
  158. </div>
  159. <div class="detailinfo df">
  160. <div class="bycard">
  161. <div class="f12 c999"> <span class="roll dib green"></span><span>码牌活动交易额(元)</span></div>
  162. <div class="f14 c666 money">{{abs(teaminfo.TotalActiveAmount)}}</div>
  163. </div>
  164. <div class="bycloud">
  165. <div class="f12 c999"> <span class="roll dib blue"></span><span>POS借记卡交易额(元)</span></div>
  166. <div class="f14 c666 money mtr">{{abs(teaminfo.TotalUnActiveAmount)}}</div>
  167. </div>
  168. </div>
  169. </div>
  170. <div class="user df rel jcsb">
  171. <div class="bycard">
  172. <div class="f12 c999"> <span>累计总创客(人)</span></div>
  173. <div class="f14 c666 all">{{teaminfo.TotalUser}}</div>
  174. </div>
  175. <div class="bycloud ml60">
  176. <div class="f12 c999"> <span>新增创客(人)</span></div>
  177. <div class="f14 c666 all mtr add">+{{teaminfo.AddUser}}</div>
  178. </div>
  179. </div>
  180. <div class="user df rel jcsb" @click="goteamactive">
  181. <div class="bycard">
  182. <div class="f12 c999"> <span>累计激活POS机商户(户)</span></div>
  183. <div class="f14 c666 all">{{teaminfo.TotalPosMerchant}}</div>
  184. </div>
  185. <div class="bycloud ml60">
  186. <div class="f12 c999"> <span>累计激活码牌商户(户)</span></div>
  187. <div class="c666 f14 mtr">{{teaminfo.TotalActMerchant}}</div>
  188. <div class="abs righticon">
  189. <van-icon name="arrow"></van-icon>
  190. </div>
  191. </div>
  192. </div>
  193. <div class="user df rel jcsb">
  194. <div class="bycard">
  195. <div class="f12 c999"> <span>支付宝总订单数</span></div>
  196. <div class="f14 c666 all">{{teaminfo.TotalAlipayOrder}}</div>
  197. </div>
  198. <div class="bycloud ml60">
  199. <div class="f12 c999"> <span>微信总订单数</span></div>
  200. <div class="c666 f14 mtr">{{teaminfo.TotalWeChatOrder}}</div>
  201. <div class="abs righticon"></div>
  202. </div>
  203. </div>
  204. </div>
  205. </van-pull-refresh>
  206. </div>
  207. <van-popup class="product_mymerchant_transaction" v-model="showDate" position="bottom" :style="{ height: '50%' }" v-cloak>
  208. <van-datetime-picker v-model="currentDate" type="year-month" :min-date="minDate" :max-date="maxDate" :formatter="formatter" @cancel="showDate = false" @confirm="onConfirmDate"></van-datetime-picker>
  209. </van-popup>
  210. </div>
  211. <script src="./static/js/echarts.min.js"></script>
  212. <script src="./static/js/klm-vv.min.js"></script>
  213. <script src="./static/js/appfunc.min.js"></script>
  214. <script src="./static/js/klm-axios-config.js"></script>
  215. <script src="./static/js/publicfn.js"></script>
  216. <script>
  217. function OnStart(){
  218. PublicLib.SetStatusBarStyle({type:'light', isShow:1});
  219. };
  220. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  221. // 可以通过下面的方式手动注册
  222. Vue.use(vant.Lazyload);
  223. //--- PublicLib.SetStatusBarStyle({type:'light', isShow:1});
  224. // 在 #app 标签下渲染一个按钮组件
  225. let app = new Vue({
  226. el: '#app',
  227. data() {
  228. return {
  229. refreshing: false,
  230. toptitleisshow:true,
  231. ecgart1: [
  232. { value: 0, name: '暂时没有数据' },
  233. ],
  234. personelinfo:{
  235. TotalAmount:0,
  236. TotalPosAmount:0,
  237. TotalCloudPayAmount:0,
  238. TotalActiveAmount:0,
  239. TotalUnActiveAmount:0,
  240. },
  241. teaminfo:{
  242. TotalAmount:0,
  243. TotalPosAmount:0,
  244. TotalCloudPayAmount:0,
  245. TotalActiveAmount:0,
  246. TotalUnActiveAmount:0,
  247. },
  248. ecgart2team: [
  249. //- 默认空数据
  250. { value: 0, name: '暂时没有数据' },
  251. ],
  252. showDate: false,
  253. currentDate: new Date(),
  254. minDate: new Date(new Date().getFullYear(),(new Date().getMonth() - 5)),
  255. maxDate: new Date(),
  256. nowdate: '',
  257. };
  258. },
  259. created(){
  260. this.onConfirmDate();
  261. },
  262. methods: {
  263. onRefresh() {
  264. // 清空列表数据
  265. this.onConfirmDate();
  266. },
  267. formatter(type, val) {
  268. if (type === 'year') {
  269. return `${val}年`;
  270. } else if (type === 'month') {
  271. return `${val}月`;
  272. } else if (type === 'day') {
  273. return `${val}日`;
  274. }
  275. return val;
  276. },
  277. onConfirmDate() {
  278. this.showDate = false;
  279. this.nowdate = this.currentDate.getFullYear() + '-' + (this.currentDate.getMonth() + 1);
  280. this.getperformanceinfo();
  281. this.getteaminfo();
  282. },
  283. onConformateDate(){
  284. return fillzero(formatDate(this.currentDate.getFullYear(),this.currentDate.getMonth() + 1));
  285. },
  286. echartpersonal(){
  287. var myChart = echarts.init(this.$refs.echartpersonal);
  288. const option = {
  289. tooltip: {
  290. show:false,
  291. trigger: 'item'
  292. },
  293. legend: {
  294. show:false,
  295. top: 'center',
  296. left: 'center'
  297. },
  298. color:['#EDE9E9','#FF574D','#FFD320','#189754','#4380F3'],
  299. series: [
  300. {
  301. type: 'pie',
  302. radius: ['60%', '100%'],
  303. avoidLabelOverlap: false,
  304. label: {
  305. show: false,
  306. position: 'center'
  307. },
  308. emphasis: {
  309. label: {
  310. show: false,
  311. }
  312. },
  313. labelLine: {
  314. show: false
  315. },
  316. data:this.ecgart1
  317. }
  318. ]
  319. };
  320. myChart.setOption(option);
  321. },
  322. echartpersonal2team(){
  323. var myChart = echarts.init(this.$refs.echartpersonal2team);
  324. const option = {
  325. tooltip: {
  326. show:false,
  327. trigger: 'item'
  328. },
  329. legend: {
  330. show:false,
  331. top: 'center',
  332. left: 'center'
  333. },
  334. color:['#EDE9E9','#FF574D','#FFD320','#189754','#4380F3'],
  335. series: [
  336. {
  337. type: 'pie',
  338. radius: ['60%', '100%'],
  339. avoidLabelOverlap: false,
  340. label: {
  341. show: false,
  342. position: 'center'
  343. },
  344. emphasis: {
  345. label: {
  346. show: false,
  347. }
  348. },
  349. labelLine: {
  350. show: false
  351. },
  352. data:this.ecgart2team
  353. }
  354. ]
  355. };
  356. myChart.setOption(option);
  357. },
  358. //- 获取个人交易
  359. async getperformanceinfo(){
  360. //- PublicLib.ShowLoading({Message:''});
  361. const UserId = PublicLib.getCookieInfo('userId');
  362. const res = await getRequest('api/v1/usertradedaysummary/personalperformance?t='+Math.random(6),JSON.stringify({TradeMonth:this.onConformateDate(),UserId}));
  363. if(res.status !== '1')return tips('个人交易获取失败!');
  364. //- PublicLib.HideLoading();
  365. res.data.TotalAmount = res.data.TotalAmount.toFixed(2);
  366. res.data.TotalPosAmount = res.data.TotalPosAmount.toFixed(2);
  367. res.data.TotalCloudPayAmount = res.data.TotalCloudPayAmount.toFixed(2);
  368. res.data.TotalActiveAmount = res.data.TotalActiveAmount.toFixed(2);
  369. res.data.TotalUnActiveAmount = res.data.TotalUnActiveAmount.toFixed(2);
  370. this.personelinfo = res.data;
  371. if(res.data.TotalAmount === '0.00') {
  372. return this.echartpersonal();
  373. };
  374. this.ecgart1 = [
  375. {value:0,name:'空'},
  376. {value:res.data.TotalPosAmount,name:'POS机刷卡交易额'},
  377. {value:res.data.TotalCloudPayAmount,name:'云闪付小额交易额'},
  378. {value:res.data.TotalActiveAmount,name:'码牌活动交易'},
  379. {value:res.data.TotalUnActiveAmount,name:'码牌非活动交易'}
  380. ];
  381. this.echartpersonal();
  382. },
  383. //- 获取计奖交易
  384. async getteaminfo(){
  385. const UserId = PublicLib.getCookieInfo('userId');
  386. const res = await getRequest('api/v1/usertradedaysummary/teamperformance?t='+Math.random(6),JSON.stringify({TradeMonth:this.onConformateDate(),UserId}));
  387. if(res.status !== '1')return tips('计奖交易获取失败!');
  388. res.data.TotalAmount = res.data.TotalAmount.toFixed(2);
  389. res.data.TotalPosAmount = res.data.TotalPosAmount.toFixed(2);
  390. res.data.TotalCloudPayAmount = res.data.TotalCloudPayAmount.toFixed(2);
  391. res.data.TotalActiveAmount = res.data.TotalActiveAmount.toFixed(2);
  392. res.data.TotalUnActiveAmount = res.data.TotalUnActiveAmount.toFixed(2);
  393. this.teaminfo = res.data;
  394. this.refreshing = false;
  395. if(res.data.TotalAmount === '0.00') {
  396. return this.echartpersonal2team();
  397. };
  398. this.ecgart2team = [
  399. {value:0,name:'空'},
  400. {value:res.data.TotalPosAmount,name:'POS机刷卡交易额'},
  401. {value:res.data.TotalCloudPayAmount,name:'云闪付小额交易额'},
  402. {value:res.data.TotalActiveAmount,name:'码牌活动交易'},
  403. {value:res.data.TotalUnActiveAmount,name:'码牌非活动交易'}
  404. ];
  405. this.echartpersonal2team();
  406. },
  407. trendpic(val){
  408. PublicLib.putCookieInfo('trendtype', val);
  409. PublicLib.Goto({Url:'product-trendchart'});
  410. },
  411. gopersonalactive(){
  412. PublicLib.Goto({Url:'merchant-personal-active'});
  413. },
  414. mymerchant(){
  415. PublicLib.Goto({Url:'creater-list'});
  416. },
  417. goback(){
  418. PublicLib.GoBack({Level:1});
  419. },
  420. gopersonalachievement(){
  421. PublicLib.Goto({Url:'personal-achievement'});
  422. },
  423. goteamachievement(){
  424. PublicLib.Goto({Url:'team-achievement'});
  425. },
  426. goteamactive(){
  427. PublicLib.Goto({Url:'merchant-active'});
  428. }
  429. }
  430. });
  431. </script>
  432. </body>
  433. </html>