monthAccountsDetails_body.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. <!DOCTYPE html>
  2. <html class="">
  3. <!--STATUS OK-->
  4. <head>
  5. <meta name="referrer" content="always" />
  6. <meta charset='utf-8' />
  7. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="x-dns-prefetch-control" content="on">
  9. <meta name="description" content="">
  10. <meta name="format-detection" content="telephone=no" />
  11. <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
  12. <link rel="stylesheet" type="text/css" href="css/iconfont.css">
  13. <link rel="stylesheet" type="text/css" href="css/main.css" />
  14. <script src="js/vue.js"></script>
  15. <script src="js/vant-ui.js"></script>
  16. <script src="js/main.js"></script>
  17. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  18. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  19. <title>月度结算</title>
  20. </head>
  21. <style>
  22. .chukujilu {
  23. background-color: #fff !important;
  24. }
  25. .chukujilu .chukuTimer {
  26. background-color: #00a0ea !important;
  27. color: #fff !important;
  28. }
  29. .mescroll{
  30. position: relative;
  31. /*height: 73%;/*如设置bottom:50px,则需height:auto才能生效*/*/
  32. }
  33. /*车主订单详情*/
  34. .monthAccounts{
  35. background-color: #fff !important;
  36. font-size: .32rem;
  37. }
  38. .info-container{
  39. flex-wrap: wrap;
  40. }
  41. .info-cel{
  42. flex-grow: 0;
  43. padding: 0 .24rem;
  44. margin-bottom: .26rem;
  45. }
  46. .perc100{
  47. width: 100%;
  48. }
  49. .perc80{
  50. width: 80%
  51. }
  52. .perc60{
  53. width: 60%
  54. }
  55. .perc50{
  56. width: 50%;
  57. }
  58. .perc40{
  59. width: 40%;
  60. }
  61. .perc20{
  62. width: 20%;
  63. }
  64. .info-column{
  65. display: inline-block;
  66. }
  67. .info-line{
  68. width: 100%;
  69. border-bottom: 6px solid #F5F5F5;
  70. margin: .16rem 0 .36rem 0;
  71. }
  72. .white-text{
  73. color: #ffffff;
  74. }
  75. .black-text{
  76. color: #333333
  77. }
  78. .blue-text{
  79. color: #159BF7;
  80. }
  81. .base-wrap{
  82. padding: .26rem;
  83. background: #159BF7;
  84. align-items: center;
  85. border-bottom: .87rem solid #159BF7;
  86. border-bottom-left-radius: 12%;
  87. border-bottom-right-radius: 12%;
  88. }
  89. .strong-title{
  90. font-size: .38rem;
  91. line-height: .46rem;
  92. }
  93. .progress-container{
  94. margin: .08rem 0;
  95. }
  96. .msg-text{
  97. font-size: .18rem;
  98. }
  99. .avatar-container{
  100. justify-content: flex-end;;
  101. }
  102. .avatar-container img{
  103. width: 1.6rem;
  104. height: 1.6rem;
  105. background: #F7F7F7;
  106. border-radius: 0.8rem;
  107. }
  108. .section{
  109. border-radius: .12rem;
  110. box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.1);
  111. background: #ffffff;
  112. width: 7.02rem;
  113. margin: 0 auto .26rem auto;
  114. z-index: 200;
  115. }
  116. .section.first{
  117. margin-top: -.8rem;
  118. }
  119. .section-title{
  120. padding: .26rem;
  121. border-bottom: 1px solid #E6E6E6;
  122. }
  123. .section-title span{
  124. padding: 0 .26rem;
  125. border-left: 4px solid #159BF7;
  126. line-height: .34rem;
  127. font-size: .28rem;
  128. font-weight: 600;
  129. }
  130. .section-content{
  131. justify-content: space-around;
  132. padding-bottom: .26rem;
  133. }
  134. .section-content-item{
  135. padding-top: .26rem;
  136. }
  137. .item-number{
  138. font-size: .32rem;
  139. width: 1.02rem;
  140. height: 1.02rem;
  141. border-radius: 50%;
  142. background: #F7F7F7;
  143. margin-bottom: .08rem;
  144. align-items: center;
  145. justify-content: center;
  146. }
  147. .item-number span{
  148. font-size: .22rem;
  149. }
  150. .item-text{
  151. font-size: .22rem;
  152. color: #999999;
  153. text-align: center;
  154. }
  155. </style>
  156. <body>
  157. <!-- v-cloak -->
  158. <div id="app" v-cloak>
  159. <div class="pageView monthAccounts col filterpage">
  160. <div class="mescroll-touch-y mescroll" id="mescroll">
  161. <div class=" info-container">
  162. <div class="base-wrap flex white-text">
  163. <div class="perc60">
  164. <div class="strong-title">{{agentInfo.storeName}}</div>
  165. <!-- <div class="progress-container"><van-progress :percentage="50" stroke-width="16"/></div>
  166. <div class="msg-text">本月扫码入库量打败了全国50%的用户</div> -->
  167. </div>
  168. <div class="perc40 avatar-container flex"><img :src="agentInfo.storeImageUrl"></div>
  169. </div>
  170. <div class="section first">
  171. <div class="section-title black-text"><span>销量统计</span></div>
  172. <div class="section-content flex">
  173. <div class="section-content-item">
  174. <div class="item-number blue-text flex">{{monthInfo.inbound?monthInfo.inbound:0}}<span>条</span></div>
  175. <div class="item-text">入库量</div>
  176. </div>
  177. <div class="section-content-item">
  178. <div class="item-number blue-text flex">{{monthInfo.outbound?monthInfo.outbound:0}}<span>条</span></div>
  179. <div class="item-text">出库量</div>
  180. </div>
  181. </div>
  182. </div>
  183. <div class="section">
  184. <div class="section-title black-text"><span>返利情况</span></div>
  185. <div class="section-content flex">
  186. <div class="section-content-item">
  187. <div class="item-number blue-text flex">{{monthInfo.earlyrebate?monthInfo.earlyrebate:0}}<span>元</span></div>
  188. <div class="item-text">期初返利</div>
  189. </div>
  190. <div class="section-content-item">
  191. <div class="item-number blue-text flex">{{monthInfo.monthrebate?monthInfo.monthrebate:0}}<span>元</span></div>
  192. <div class="item-text">本月返利</div>
  193. </div>
  194. <div class="section-content-item">
  195. <div class="item-number blue-text flex">{{monthInfo.consumedrebate?monthInfo.consumedrebate:0}}<span>元</span></div>
  196. <div class="item-text">已核销返利</div>
  197. </div>
  198. <div class="section-content-item">
  199. <div class="item-number blue-text flex">{{monthInfo.remainrebate?monthInfo.remainrebate:0}}<span>元</span></div>
  200. <div class="item-text">返利余额</div>
  201. </div>
  202. </div>
  203. </div>
  204. <div class="section">
  205. <div class="section-title black-text"><span>积分情况</span></div>
  206. <div class="section-content flex">
  207. <div class="section-content-item">
  208. <div class="item-number blue-text flex">{{monthInfo.earlypoint?monthInfo.earlypoint:0}}</div>
  209. <div class="item-text">期初返利</div>
  210. </div>
  211. <div class="section-content-item">
  212. <div class="item-number blue-text flex">{{monthInfo.monthpoint?monthInfo.monthpoint:0}}</div>
  213. <div class="item-text">本月积分</div>
  214. </div>
  215. <div class="section-content-item">
  216. <div class="item-number blue-text flex">{{monthInfo.consumedpoint?monthInfo.consumedpoint:0}}</div>
  217. <div class="item-text">已使用积分</div>
  218. </div>
  219. <div class="section-content-item">
  220. <div class="item-number blue-text flex">{{monthInfo.remainpoint?monthInfo.remainpoint:0}}</div>
  221. <div class="item-text">剩余积分</div>
  222. </div>
  223. </div>
  224. </div>
  225. <div class="section">
  226. <div class="section-title black-text"><span>轮胎保情况</span></div>
  227. <div class="section-content flex">
  228. <div class="section-content-item">
  229. <div class="item-number blue-text flex">{{monthInfo.registtire?monthInfo.registtire:0}}<span>条</span></div>
  230. <div class="item-text">注册轮胎保</div>
  231. </div>
  232. <div class="section-content-item">
  233. <div class="item-number blue-text flex">{{monthInfo.claimtire?monthInfo.claimtire:0}}<span>条</span></div>
  234. <div class="item-text">理赔轮胎保</div>
  235. </div>
  236. </div>
  237. </div>
  238. <div style="margin: 16px;" v-if="nowMonth.month&&nowMonth.status==0">
  239. <van-button round block type="info" native-type="submit" v-if="" @click="handleConfirm">确认</van-button>
  240. </div>
  241. </div>
  242. </div>
  243. </div>
  244. </div>
  245. </body>
  246. <script type="text/javascript" src="../script/aui-scroll.js"></script>
  247. <script type="text/javascript" src="../script/api.js"></script>
  248. <script type="text/javascript" src="../script/httpRequest.js"></script>
  249. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  250. <script type="text/javascript">
  251. apiready = function() {
  252. new Vue({
  253. el: '#app',
  254. data: {
  255. agentInfo: {},
  256. nowYear: 0,
  257. nowMonth: {
  258. month: 0,
  259. status: 0,
  260. },
  261. storeId: "",
  262. monthInfo: {
  263. "id": null,
  264. "storeid": null,
  265. "inbound": 0,
  266. "outbound": 0,
  267. "earlyrebate": 0,
  268. "monthrebate": 30,
  269. "consumedrebate": null,
  270. "remainrebate": 0,
  271. "earlypoint": 0,
  272. "monthpoint": 0,
  273. "consumedpoint": null,
  274. "remainpoint": 0,
  275. "registtire": 0,
  276. "claimtire": 0,
  277. "month": null
  278. }
  279. },
  280. watch: {
  281. keyword: function(nw, od) {
  282. this.current = 1;
  283. }
  284. },
  285. methods: {
  286. // 打开新页面
  287. openWin: function (src) {
  288. var dateParams = {
  289. paramsY: this.nowYear,
  290. paramsM: this.nowMonth
  291. };
  292. this.goWin(src, src + '_win.html', dateParams);
  293. },
  294. getAgentInfo: function (mescroll) {
  295. var _this = this,
  296. url = "getAgentInfoU",
  297. data = {
  298. "loginId": this.userId,
  299. "appVersion": parseFloat(api.appVersion),
  300. "mobileSystem": api.systemType,
  301. "type": 'body',
  302. "url": 'json'
  303. }
  304. if (this.userId == null) { // 个人不存在
  305. $api.clearStorage();
  306. _this.goWin("login", "login.html", "");
  307. }
  308. this.$postuser(url, data, function (ret) {
  309. if (ret.code == 0) {
  310. $api.setStorage("status",ret.data.status);
  311. if(ret.data.status==5){
  312. api.alert({
  313. title: '系统提示',
  314. msg: '门店账号无效!',
  315. }, function (ret, err) {
  316. if (ret) {
  317. $api.clearStorage();
  318. _this.goWin("login", "login.html", "");
  319. }
  320. });
  321. }
  322. _this.agentInfo = ret.data;
  323. }
  324. });
  325. },
  326. handleInit: function(){
  327. var monthStr = this.nowYear+"."+this.nowMonth.month+".1"+"-"+ this.nowYear+"."+this.nowMonth.month+"."+this.formatMonthLastDay(this.nowYear+"-"+this.nowMonth.month)
  328. var data = {
  329. "storeId": parseInt(this.storeId),
  330. "month": monthStr,
  331. "url": "json",
  332. "type": "body"
  333. },
  334. _this = this,
  335. url = "getMonthDetail";
  336. var paramStr = "storeId="+parseInt(this.storeId)+"&month="+monthStr;
  337. this.$getOption(url, paramStr, function(ret) {
  338. if(ret.code==0||ret.code=="0"){
  339. _this.monthInfo = ret.monthInfo;
  340. }else{
  341. api.toast({
  342. msg: ret.msg,
  343. duration: 2000,
  344. location: 'center'
  345. });
  346. }
  347. })
  348. },
  349. handleConfirm: function(){
  350. var data = {
  351. "storeid": parseInt(this.storeId),
  352. "year": this.nowYear,
  353. "month": this.nowMonth.month,
  354. "url": "json",
  355. "type": "body"
  356. },
  357. _this = this,
  358. url = "confirmMonthDetail";
  359. // var paramStr = "storeId="+parseInt(this.storeId)+"&month="+monthStr;
  360. this.$post(url, data, function(ret) {
  361. if(ret.code==0||ret.code=="0"){
  362. api.toast({
  363. msg: _this.nowYear+"年"+_this.nowMonth.month+"月月度结算明细 完成确认!",
  364. duration: 2000,
  365. location: 'center'
  366. });
  367. api.sendEvent({
  368. name: 'refreshMonth',
  369. extra: {}
  370. });
  371. api.closeWin({});
  372. }else{
  373. api.toast({
  374. msg: ret.msg,
  375. duration: 2000,
  376. location: 'center'
  377. });
  378. }
  379. })
  380. }
  381. },
  382. filters: {
  383. },
  384. mounted: function() {
  385. if (typeof api.pageParam.paramsY != 'undefined' && api.pageParam.paramsY != [] && api.pageParam.paramsY != null) {
  386. this.nowYear = api.pageParam.paramsY;
  387. }else{
  388. api.toast({
  389. msg: "年份获取异常",
  390. duration: 2000,
  391. location: 'center'
  392. });
  393. };
  394. if (typeof api.pageParam.paramsM != 'Object' && api.pageParam.paramsM != {} && api.pageParam.paramsM != null) {
  395. this.nowMonth = api.pageParam.paramsM;
  396. }else{
  397. api.toast({
  398. msg: "月份获取异常",
  399. duration: 2000,
  400. location: 'center'
  401. });
  402. };
  403. this.userId = $api.getStorage('loginid');
  404. this.storeId = $api.getStorage('userid')
  405. this.handleInit();
  406. this.getAgentInfo();
  407. }
  408. })
  409. }
  410. </script>
  411. </html>