warehouse-management-record.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. </head>
  17. <body class="bgc-back merchant_personal_active pb0 ovh">
  18. <div class="iphonetitle"> </div>
  19. <div class="merchant_achievement" id="app" v-cloak>
  20. <van-nav-bar class="camp_title user_title_normal titlef16 left_icon_cfff" left-arrow title="激活详情" v-if="toptitleisshow" @click-left="goback" @click-right="mymerchant">
  21. <template #left>
  22. <van-icon name="arrow-left" color="#333"></van-icon>
  23. </template>
  24. <template #right>
  25. <div class="c333 f12">我的商户</div>
  26. </template>
  27. </van-nav-bar>
  28. <div class="merchant_achievement_topblock"></div>
  29. <van-tabs class="toptab" v-model="active" animated swipeable @change="changetab" title-active-color="#FF5A32" title-inactive-color="#333" line-width="32" line-height="2">
  30. <van-tab>
  31. <template #title>
  32. <div @click="choosetime"><span>{{nowdate}}</span>
  33. <van-icon name="arrow"></van-icon>
  34. </div>
  35. </template>
  36. <van-row class="main ovh rel" v-if="active === 0">
  37. <van-col class="infobox infobox_personal merchant_active">
  38. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height: 100%!important; min-height:70vh">
  39. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  40. <div class="panel bgcfff" v-for="obj in activeinfo">
  41. <div class="toppanel df">
  42. <div class="block"></div>
  43. <div class="f14 c333 b">{{obj.Date}}</div>
  44. </div>
  45. <div class="mainpanel">
  46. <div class="title df c333 f16 flexsb">
  47. <div>总激活</div>
  48. <div>{{obj.ActTotal}}户</div>
  49. </div>
  50. <div class="df c666 f12 flexsb" v-for="item in obj.TypeList">
  51. <div class="type">{{item.Brand}}</div>
  52. <div class="num_personal df cm"><span>{{item.Count}}户</span></div>
  53. </div>
  54. </div>
  55. </div>
  56. </van-list>
  57. </van-pull-refresh>
  58. </van-col>
  59. </van-row>
  60. </van-tab>
  61. <van-tab>
  62. <template #title><span>近半年</span></template>
  63. <van-row class="main rel" v-if="active === 1">
  64. <van-col class="infobox infobox_personal">
  65. <div class="panel bgcfff" v-for="obj in activeinfo">
  66. <div class="toppanel df">
  67. <div class="block"></div>
  68. <div class="f14 c333 b">{{obj.TradeMonth}}</div>
  69. </div>
  70. <div class="mainpanel">
  71. <div class="title df c333 f16 flexsb">
  72. <div>总激活</div>
  73. <div>{{obj.ActTotal}}户</div>
  74. </div>
  75. <div class="df c666 f12 flexsb" v-for="item in obj.TypeList">
  76. <div class="type">{{item.Brand}}</div>
  77. <div class="num_personal df cm"><span>{{item.Count}}户</span></div>
  78. </div>
  79. </div>
  80. </div>
  81. </van-col>
  82. </van-row>
  83. </van-tab>
  84. </van-tabs>
  85. <van-popup class="product_mymerchant_transaction" v-model="showDate" position="bottom" :style="{ height: '50%' }" v-cloak>
  86. <van-datetime-picker v-model="currentDate" type="year-month" title="选择年月" :min-date="minDate" :max-date="maxDate" @cancel="showDate = false" :formatter="formatter" @confirm="onConfirmDate"></van-datetime-picker>
  87. </van-popup>
  88. </div>
  89. <script src="./static/js/klm-vv.min.js"></script>
  90. <script src="./static/js/appfunc.min.js"></script>
  91. <script src="./static/js/klm-axios-config.js"></script>
  92. <script src="./static/js/publicfn.js"></script>
  93. <script>
  94. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  95. // 可以通过下面的方式手动注册
  96. Vue.use(vant.Lazyload);
  97. //--- PublicLib.SetStatusBarStyle({type:'light', isShow:1});
  98. // 在 #app 标签下渲染一个按钮组件
  99. let app = new Vue({
  100. el: '#app',
  101. data() {
  102. return {
  103. toptitleisshow:true,
  104. active:1,
  105. loading: false,
  106. finished: false,
  107. refreshing: false,
  108. activeinfo:[
  109. ],
  110. showDate: false,
  111. minDate: new Date(2020, 0, 1),
  112. maxDate: new Date(),
  113. currentDate: new Date(),
  114. nowdate:'',
  115. pageinfo:{
  116. PageSize:20,
  117. PageNum:1
  118. },
  119. ismonth:false,
  120. };
  121. },
  122. created() {
  123. this.nowdate = this.currentDate.getFullYear() + '-' + (this.currentDate.getMonth() + 1);
  124. this.gethalfyearinfo();
  125. },
  126. methods: {
  127. onLoad() {
  128. if (this.refreshing) {
  129. this.activeinfo = [];
  130. this.refreshing = false;
  131. this.pageinfo.PageNum = 0;
  132. }
  133. this.pageinfo.PageNum++;
  134. this.getmonthinfo();
  135. },
  136. onRefresh() {
  137. // 清空列表数据
  138. this.finished = false;
  139. // 重新加载数据
  140. // 将 loading 设置为 true,表示处于加载状态
  141. this.loading = true;
  142. this.onLoad();
  143. },
  144. changetab(){
  145. if(this.active === 0 && !this.ismonth) {
  146. this.activeinfo = []
  147. this.getmonthinfo();
  148. this.ismonth = true;
  149. }
  150. if(this.active === 1){
  151. this.activeinfo = []
  152. this.gethalfyearinfo();
  153. this.ismonth = false;
  154. };
  155. },
  156. choosetime(){
  157. if(this.active !== 0) return;
  158. this.showDate = true;
  159. },
  160. formatter(type, val) {
  161. if (type === 'year') {
  162. return `${val}年`;
  163. } else if (type === 'month') {
  164. return `${val}月`;
  165. } else if (type === 'day') {
  166. return `${val}日`;
  167. };
  168. return val;
  169. },
  170. onConformateDate(){
  171. return formatDate(this.currentDate.getFullYear(),this.currentDate.getMonth() + 1);
  172. },
  173. onConfirmDate() {
  174. this.activeinfo = [];
  175. this.showDate = false;
  176. this.nowdate = this.currentDate.getFullYear() + '-' + (this.currentDate.getMonth() + 1);
  177. this.getmonthinfo();
  178. },
  179. async getmonthinfo(){
  180. //- PublicLib.ShowLoading({Message:''});
  181. const UserId = PublicLib.getCookieInfo('userId');
  182. const res = await getRequest('/api/v1/pos/ActiveReward/ActMerchantForMonth?t='+Math.random(6),JSON.stringify({...this.pageinfo,TradeMonth:this.onConformateDate(),UserId}));
  183. if(res.status !== '1')return tips('月个人交易获取失败!');
  184. //- PublicLib.HideLoading();
  185. if(res.data.length < this.pageinfo.PageSize - 1) {
  186. this.finished = true;
  187. };
  188. this.activeinfo.push(...res.data);
  189. this.loading = false;
  190. },
  191. async gethalfyearinfo(){
  192. //- PublicLib.ShowLoading({Message:''});
  193. const UserId = PublicLib.getCookieInfo('userId');
  194. const res = await getRequest('/api/v1/pos/ActiveReward/ActMerchantForHalfYear?t='+Math.random(6),JSON.stringify({...this.pageinfo,UserId}));
  195. if(res.status !== '1')return tips('半年个人交易获取失败!');
  196. //- PublicLib.HideLoading();
  197. this.activeinfo = res.data;
  198. },
  199. goback(){
  200. PublicLib.GoBack({Level:1});
  201. },
  202. mymerchant(){
  203. PublicLib.Goto({Url:'merchant-list'});
  204. },
  205. detail(id){
  206. PublicLib.putCookieInfo('producttypeId', id);
  207. PublicLib.Goto({Url:'merchant-personal-detail'});
  208. }
  209. }
  210. });
  211. </script>
  212. </body>
  213. </html>