meber.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  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. <title></title>
  18. <style media="screen">
  19. .anniu {
  20. display: flex;
  21. }
  22. .anniu>input {
  23. width: 100%;
  24. height: .86rem;
  25. background: rgba(0, 160, 234, 1);
  26. border-radius: 5rem;
  27. color: #fff;
  28. font-size: .31rem;
  29. margin-top: .5rem;
  30. }
  31. .vanui-btn {
  32. display: flex;
  33. justify-content: space-around;
  34. }
  35. .vanui-title {
  36. font-size: 0.36rem;
  37. background-color: #0096df;
  38. color: #fff;
  39. width: 100%;
  40. text-align: center;
  41. padding: 0.2rem;
  42. }
  43. .vanui-input {
  44. margin: 0.1rem;
  45. border: 1px solid#ccc;
  46. width: 95%;
  47. height: 0.8rem;
  48. border-radius: 5px;
  49. padding: 0.1rem 0.2rem;
  50. font-size: 0.3rem;
  51. }
  52. .vanui-btnitem {
  53. color: #fff;
  54. font-size: 0.3rem;
  55. border-radius: 5px;
  56. color: #fff;
  57. margin-top: 0.1rem;
  58. padding: 0.2rem 0.3rem;
  59. }
  60. .vanui-done {
  61. background-color: #0096df;
  62. }
  63. .hxCode {
  64. text-align: center;
  65. font-size: 0.3rem;
  66. font-weight: bold;
  67. padding: 0.2rem;
  68. }
  69. .line1 {
  70. width: 100px !important;
  71. overflow: hidden !important;
  72. text-overflow: ellipsis !important;
  73. white-space: nowrap;
  74. }
  75. #mescroll {
  76. overflow-y: scroll !important;
  77. }
  78. .onloginBtns {
  79. width: 6.78rem;
  80. height: 0.76rem;
  81. border-radius: 0.38rem;
  82. background: #00a0ea;
  83. color: #fff;
  84. margin-top: 0.3rem;
  85. font-size: 0.24rem;
  86. }
  87. </style>
  88. </head>
  89. <body>
  90. <div id="app">
  91. <!-- 输入金额 -->
  92. <van-popup v-model="show" style="width:80%;padding-bottom : 0.2rem">
  93. <div class="vanui-title">生成核销码</div>
  94. <input v-show="hxCode == ''" type="number" class="vanui-input" placeholder="请输入核销金额(单位:元)"
  95. v-model="amount" />
  96. <div class="hxCode"> {{hxCode}}</div>
  97. <div class="vanui-btn" v-show="hxCode == ''">
  98. <div class="vanui-btnitem vanui-done" type="primary" v-on:click="getHxCode">确定</div>
  99. <div class="vanui-btnitem" style="background-color: #f00;" v-on:click="show = !show">取消</div>
  100. </div>
  101. </van-popup>
  102. <!-- end -->
  103. <div class="view flex col">
  104. <div class="page router fx1" id="mescroll">
  105. <div class="meberHeader" style="min-height: 3.95rem">
  106. <div class="flex jlr" style="padding-top: 1rem;">
  107. <div class="userTouxiang flex col a-center jlr">
  108. <div class="image">
  109. <img :src="agentInfo.storeImageUrl" style="border-radius:50%" />
  110. </div>
  111. <p style="font-size:0.2rem">
  112. 联系人:{{ agentInfo.contactName }}
  113. </p>
  114. </div>
  115. <div class="shopInfo">
  116. <div class="flex a-center" style="font-size: .34rem;">{{ agentInfo.storeName }}
  117. <!-- <div class="edit"></div> -->
  118. </div>
  119. <div class="tag" style="font-size:0.2rem">
  120. <p style=" display: inline-block;white-space: nowrap; max-width: 4rem; overflow: hidden;text-overflow:ellipsis;">
  121. {{ agentInfo.addressInfo }}
  122. </p>
  123. </div>
  124. </div>
  125. <div class="ewm flex j-center" v-on:click="lookAgentQrcode">
  126. <b></b>
  127. </div>
  128. </div>
  129. <div class="meberHeaderBottom flex a-center j-center">
  130. <div class="item flex a-center j-center">
  131. 区域:{{ agentInfo.district }}
  132. </div><span></span>
  133. <div class="item flex a-center j-center " style="text-align: center;" v-on:click="lookBrandInfo">
  134. <p class="line1">{{ agentInfo.bizStoreBrandDto | getBrand }}</p>
  135. </div><span></span>
  136. <div class="item flex a-center j-center">
  137. 签约任务:{{ agentInfo.numTask }}
  138. </div>
  139. </div>
  140. </div>
  141. <div class="fanliBar">
  142. <!-- <div class="fanliBar-title">我的钱包</div> -->
  143. <div class=" flex a-center">
  144. <div class="item">
  145. <div class="flex a-end" v-on:click="inFanli">
  146. <h4>{{ agentInfo.avail }}</h4>
  147. <em>RMB</em>
  148. </div>
  149. <div class="item-bar-text">我的返利</div>
  150. </div>
  151. <div class="item">
  152. <div class="flex a-end">
  153. <h4>{{ agentInfo.accountfrozen}}</h4>
  154. <em>RMB</em>
  155. </div>
  156. <div class="item-bar-text">冻结返利</div>
  157. </div>
  158. <!-- <div class="fgx"></div> -->
  159. <div class="item">
  160. <div class="flex a-end">
  161. <h4>{{ agentInfo.stayCancel }}</h4>
  162. <em>RMB</em>
  163. </div>
  164. <div class="item-bar-text">待核销</div>
  165. </div>
  166. <div class="item">
  167. <div class="flex a-end">
  168. <h4>{{agentInfo.storeTotalIntegral | fortatterNum }}</h4>
  169. <em style="white-space:nowrap;">{{agentInfo.storeTotalIntegral | unitNum}}个</em>
  170. </div>
  171. <div class="item-bar-text">可用积分</div>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="meberMenu">
  176. <div class="meberMenu-title">我的服务</div>
  177. <div class="meberMenu-container">
  178. <div class="item flex col a-center j-center" v-on:click="openWin('intoNode')">
  179. <b class="i1"></b>
  180. <h4>入库明细</h4>
  181. </div>
  182. <div class="item flex col a-center j-center" v-on:click="openWin('gotoNode')">
  183. <b class="i2"></b>
  184. <h4>出库明细</h4>
  185. </div>
  186. <div class="item flex col a-center j-center" v-on:click="openWin('backMoneyList')">
  187. <b class="i3"></b>
  188. <h4>返利明细</h4>
  189. </div>
  190. <div class="item flex col a-center j-center" v-on:click="openWin('intoStore')">
  191. <b class="i4"></b>
  192. <h4>任务统计</h4>
  193. </div>
  194. <div class="item flex col a-center j-center" v-on:click="openWin('lipeiList')">
  195. <b class="i5"></b>
  196. <h4>赔付记录</h4>
  197. </div>
  198. <div class="item flex col a-center j-center" v-on:click="openWin('orderList')">
  199. <b class="i6"></b>
  200. <h4>门店订单</h4>
  201. </div>
  202. <div class="item flex col a-center j-center" v-on:click="openWin('couponList')">
  203. <b class="i7"></b>
  204. <h4>我的优惠券</h4>
  205. </div>
  206. <div class="item flex col a-center j-center" v-on:click="openWin('supplier')">
  207. <b class="i8"></b>
  208. <h4>我的供应商</h4>
  209. </div>
  210. </div>
  211. </div>
  212. <div class="meberList">
  213. <!-- 20201023微信车主下单 -->
  214. <!-- <div class="item flex a-center jlr" v-on:click="openWin('tireOrder')">
  215. <h4>车主订单</h4>
  216. <div class="flex a-center rightIcons">
  217. <i class="iconfont icon-right"></i>
  218. </div>
  219. </div> -->
  220. <!-- <div class="item flex a-center jlr" v-on:click="openWin('monthAccounts')">
  221. <h4>月度结算</h4>
  222. <div class="flex a-center rightIcons">
  223. <i class="iconfont icon-right"></i>
  224. </div>
  225. </div> -->
  226. <div class="item flex a-center jlr" v-on:click="openWin('backMoney')">
  227. <h4>核销管理</h4>
  228. <div class="flex a-center rightIcons">
  229. <i class="iconfont icon-right"></i>
  230. </div>
  231. </div>
  232. <div class="item flex a-center jlr" v-on:click="inaddress">
  233. <h4>收货地址管理</h4>
  234. <div class="flex a-center rightIcons">
  235. <i class="iconfont icon-right"></i>
  236. </div>
  237. </div>
  238. <div class="item flex a-center jlr" v-on:click="insignAddress" v-if="agentInfo.signUptomodify==0">
  239. <h4>签约任务及地址修改</h4>
  240. <div class="flex a-center rightIcons">
  241. <i class="iconfont icon-right"></i>
  242. </div>
  243. </div>
  244. <div class="item flex a-center jlr" v-on:click="lookPdf(0)">
  245. <h4>用户协议</h4>
  246. <div class="flex a-center rightIcons">
  247. <i class="iconfont icon-right"></i>
  248. </div>
  249. </div>
  250. <div class="item flex a-center jlr" v-on:click="lookPdf(1)">
  251. <h4>隐私协议</h4>
  252. <div class="flex a-center rightIcons">
  253. <i class="iconfont icon-right"></i>
  254. </div>
  255. </div>
  256. <div class="item flex a-center jlr" v-on:click="checkVersion">
  257. <h4>版本检测</h4>
  258. <div class="flex a-center rightIcons" style="color:#f00">
  259. {{ version }}
  260. </div>
  261. </div>
  262. <!--<div class="item flex a-center jlr">
  263. <h4>设置</h4>
  264. <div class="flex a-center rightIcons">
  265. <i class="iconfont icon-right"></i>
  266. </div>
  267. </div> -->
  268. </div>
  269. <div style="display:flex;justify-content:center;margin-bottom:.2rem">
  270. <div class="onloginBtns flex a-center j-center" v-on:click="logout()">
  271. 注销登录
  272. </div>
  273. </div>
  274. <!-- <div class="anniu">
  275. <input type="button" value="注销登录" v-on:click="logout()">
  276. </div> -->
  277. </div>
  278. <!-- <van-tabbar v-model="active" fixed active-color="#0083ca" inactive-color="#808080" ref="footer" class="tabbar_footer">
  279. <van-tabbar-item v-for="(item,index) in icon" :key="index" replace :to="item.path">
  280. <span>{{item.label}}</span>
  281. <template #icon="props">
  282. <img :src="props.active ? item.active : item.inactive" />
  283. </template>
  284. </van-tabbar-item>
  285. </van-tabbar>-->
  286. </div>
  287. </div>
  288. </body>
  289. </html>
  290. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  291. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  292. <script type="text/javascript" src="../script/api.js"></script>
  293. <script type="text/javascript" src="../script/httpRequest.js"></script>
  294. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  295. <script type="text/javascript">
  296. apiready = function () {
  297. new Vue({
  298. el: '#app',
  299. data: {
  300. active: 3,
  301. footerHeight: 0,
  302. icon: [{
  303. label: '首页',
  304. path: '/',
  305. active: "./img/images/tabar_home_active.png",
  306. inactive: "./img/images/tabar_home_inactive.png"
  307. }, {
  308. label: '发现',
  309. path: '/discover',
  310. active: './img/images/faxian.png',
  311. inactive: './img/images/faxian.png'
  312. }, {
  313. label: '消息',
  314. path: '/information',
  315. active: './img/images/xiaoxi.png',
  316. inactive: './img/images/xiaoxi.png'
  317. }, {
  318. label: '我的',
  319. path: '/meber',
  320. active: './img/images/wode_active.png',
  321. inactive: './img/images/wode.png'
  322. }],
  323. agentInfo: {},
  324. imageBrowse: '',
  325. show: false,
  326. amount: '',
  327. hxCode: '',
  328. storeId: '',
  329. pdfReader: '',
  330. ptfurl0: 'widget://res/xy.pdf',
  331. ptfurl1: 'widget://res/zc.pdf',
  332. storePhone: '',
  333. objIcon: ''
  334. },
  335. computed: {
  336. version: function () {
  337. return this.getVersion();
  338. }
  339. },
  340. watch: {
  341. show: function (nw, ow) {
  342. if (nw == false) {
  343. this.amount = '';
  344. this.hxCode = '';
  345. }
  346. }
  347. },
  348. filters: {
  349. fortatterNum: function (val) {
  350. var value = 0;
  351. if (val != null && parseInt(val) >= 10000 && parseInt(val) < 100000000) {
  352. value = (parseFloat(val) / 10000).toFixed(2)
  353. } else if (val != null && parseInt(val) >= 100000000) {
  354. value = (parseFloat(val) / 100000000).toFixed(2)
  355. } else {
  356. value = val
  357. }
  358. return value;
  359. },
  360. unitNum: function (val) {
  361. var value = '';
  362. if (val != null && parseInt(val) >= 10000 && parseInt(val) < 100000000) {
  363. value = "万"
  364. } else if (val != null && parseInt(val) >= 100000000) {
  365. value = "亿"
  366. } else {
  367. value = ''
  368. }
  369. return value;
  370. },
  371. getBrand: function (val) {
  372. var brandStr = "";
  373. if (val != null) {
  374. val.map(function (v, i) {
  375. brandStr = brandStr + ' | ' + v.brandName
  376. })
  377. return brandStr.substring(3, brandStr.length);
  378. } else {
  379. return "";
  380. }
  381. }
  382. },
  383. mounted: function () {
  384. this.init();
  385. // this.footerHeight = this.$refs['footer'].$el.offsetHeight
  386. },
  387. methods: {
  388. init: function () {
  389. this.pdfReader = api.require('pdfReader');
  390. this.imageBrowse = api.require("imageBrowser");
  391. this.userId = $api.getStorage('loginid');
  392. this.storeId = $api.getStorage('userid');
  393. this.objIcon = api.require('IconSwitch');
  394. this.getAgentInfo();
  395. var _this = this;
  396. this.addEvent("refushMeber", function () {
  397. _this.userId = $api.getStorage('loginid');
  398. _this.storeId = $api.getStorage('userid');
  399. _this.getAgentInfo();
  400. })
  401. if (api.systemType == 'ios') {
  402. this.addEvent("getIcon", function () {
  403. setTimeout(function () {
  404. _this.getIcon()
  405. }, 2000);
  406. })
  407. }
  408. // 开启下拉刷新
  409. // this.configDownAndPull("mescroll", function(mescroll) {
  410. // _this.getAgentInfo(mescroll);
  411. // }, function() {
  412. //
  413. // }, false);
  414. },
  415. /**
  416. * 查看二维码
  417. */
  418. inFanli: function (){
  419. var _this=this
  420. if(this.agentInfo.status==3){
  421. api.alert({
  422. title: '系统提示',
  423. msg: '门店已冻结,请找相关业务经理解冻!',
  424. }, function (ret, err) {
  425. });
  426. _this.show = false;
  427. return;
  428. }
  429. this.show=true
  430. },
  431. lookAgentQrcode: function () {
  432. var qrCode = [this.agentInfo.qrbarcodeSrc];
  433. this.imageBrowse.openImages({
  434. imageUrls: qrCode
  435. })
  436. },
  437. /**
  438. * 获取门店详情
  439. */
  440. getAgentInfo: function (mescroll) {
  441. var _this = this,
  442. url = "getAgentInfoU",
  443. data = {
  444. "loginId": this.userId,
  445. "appVersion": parseFloat(api.appVersion),
  446. "mobileSystem": api.systemType,
  447. "type": 'body',
  448. "url": 'json'
  449. }
  450. if (this.userId == null) { // 个人不存在
  451. $api.clearStorage();
  452. _this.goWin("login", "login.html");
  453. }
  454. this.$postuser(url, data, function (ret) {
  455. if (ret.code == 0) {
  456. $api.setStorage("status",ret.data.status);
  457. if(ret.data.status==5){
  458. api.alert({
  459. title: '系统提示',
  460. msg: '门店账号无效!',
  461. }, function (ret, err) {
  462. if (ret) {
  463. $api.clearStorage();
  464. _this.goWin("login", "login.html");
  465. }
  466. });
  467. }
  468. _this.agentInfo = ret.data;
  469. if (_this.agentInfo.saveAppMessage != 1) {
  470. _this.inMobileMessage();
  471. }
  472. $api.setStorage("storeName", ret.data.storeName);
  473. if (mescroll) {
  474. mescroll.endSuccess()
  475. }
  476. }
  477. });
  478. },
  479. inMobileMessage: function () {
  480. var data = {
  481. "storePhone": this.agentInfo.storePhone,
  482. "storeId": this.storeId,
  483. "mobileSystem": api.systemType,
  484. "systemVersion": api.systemVersion,
  485. "appVersion": parseFloat(api.appVersion),
  486. "mobileModel": api.deviceModel,
  487. "deviceName": api.deviceName,
  488. "url": "json",
  489. "type": "body",
  490. },
  491. url = "MobileMessage",
  492. _this = this;
  493. this.$post(url, data, function (ret) {
  494. })
  495. },
  496. // 打开新页面
  497. openWin: function (src) {
  498. this.goWin(src, src + '_win.html');
  499. },
  500. logout: function () {
  501. $api.clearStorage($api.getStorage);
  502. this.goWin("login", "login.html");
  503. },
  504. // 查看品牌
  505. lookBrandInfo: function () {
  506. var brandStr = "";
  507. if (this.agentInfo.bizStoreBrandDto != null) {
  508. this.agentInfo.bizStoreBrandDto.map(function (v, i) {
  509. brandStr = brandStr + ' | ' + v.brandName
  510. })
  511. api.toast({
  512. msg: brandStr.substring(3, brandStr.length)
  513. })
  514. } else {
  515. return "";
  516. }
  517. },
  518. // 点击生成金额
  519. getHxCode: function () {
  520. if (this.amount > this.agentInfo.avail) {
  521. api.toast({
  522. msg: "填写金额不能大于可用返利金额"
  523. });
  524. return;
  525. }
  526. if (this.amount == "" || this.amount < 0 || this.amount.indexOf('.') >= 0) {
  527. api.toast({
  528. msg: "请完善正确核销金额"
  529. });
  530. return;
  531. }
  532. var data = {
  533. "storeId": this.storeId,
  534. "amount": this.amount,
  535. "url": "json",
  536. "type": "body",
  537. },
  538. url = "getHxCodeU",
  539. _this = this;
  540. this.$post(url, data, function (ret) {
  541. if (ret.code == 0) {
  542. api.toast({
  543. msg: '生成核销码成功',
  544. });
  545. setTimeout(function () {
  546. _this.show = false;
  547. _this.getAgentInfo();
  548. // _this.hxCode = ret.data.couponCode;
  549. _this.goWin('backMoney', 'backMoney_win.html');
  550. }, 200);
  551. }
  552. })
  553. },
  554. // 检查版本更新
  555. checkVersion: function () {
  556. var _this = this;
  557. this.ifHasPrme('storage', function (ret) {
  558. if (ret == true) {
  559. _this.getNewVersionUrl(function () {
  560. });
  561. }
  562. })
  563. },
  564. // 查看pdf
  565. lookPdf: function (index) {
  566. this.pdfReader.open({
  567. path: index == 0 ? this.ptfurl0 : this.ptfurl1,
  568. hidden: {
  569. print: true,
  570. export: true,
  571. bookmark: true,
  572. email: true
  573. },
  574. backBtn: {
  575. size: { //JSON对象;左上角按钮的大小配置
  576. w: 20, //数字类型;左上角按钮的宽;默认:60
  577. h: 20 //数字类型;左上角按钮的高;默认:40
  578. },
  579. title: { //JSON对象;按钮标题配置
  580. text: "返回", //字符串类型;标题文本;默认:‘’
  581. },
  582. corner: 5 //数字类型;左上角按钮圆角大小;默认值:5.0
  583. }
  584. });
  585. },
  586. insignAddress: function () {
  587. if(this.agentInfo.status==3){
  588. api.alert({
  589. title: '系统提示',
  590. msg: '门店已冻结,请找相关业务经理解冻!',
  591. }, function (ret, err) {
  592. });
  593. return;
  594. }
  595. this.goWin('sign_address', 'sign_address.html', {
  596. addressModify: this.agentInfo.addressModify,
  597. contractTask: this.agentInfo.contractTask
  598. });
  599. },
  600. inaddress: function () {
  601. if(this.agentInfo.status==3){
  602. api.alert({
  603. title: '系统提示',
  604. msg: '门店已冻结,请找相关业务经理解冻!',
  605. }, function (ret, err) {
  606. });
  607. return;
  608. }
  609. this.goWin('address', 'address_win.html');
  610. },
  611. //IOS获取动态ICON
  612. getIcon: function () {
  613. if (api.systemType == 'ios') {
  614. if (this.agentInfo.bizStoreBrandDto[0].brandName == 'SAILUN') {
  615. this.objIcon.change({ name: 'SAILUN', }, function (ret, err) { });
  616. } else if (this.agentInfo.bizStoreBrandDto[0].brandName == 'BLACKHAWK') {
  617. this.objIcon.change({ name: 'HEIYING', }, function (ret, err) { });
  618. } else if (this.agentInfo.bizStoreBrandDto[0].brandName == 'ROVELO') {
  619. this.objIcon.change({ name: 'RUIKETU', }, function (ret, err) { });
  620. } else if (this.agentInfo.bizStoreBrandDto[0].brandName == 'ROADX') {
  621. this.objIcon.change({ name: 'LUJI', }, function (ret, err) { });
  622. } else if (this.agentInfo.bizStoreBrandDto[0].brandName == 'JINYU') {
  623. this.objIcon.change({ name: 'JINYU', }, function (ret, err) { });
  624. } else if (this.agentInfo.bizStoreBrandDto[0].brandName == 'BLACKLION') {
  625. this.objIcon.change({ name: 'HEISHI', }, function (ret, err) { });
  626. } else {
  627. this.objIcon.change({ name: 'SHOP', }, function (ret, err) { });
  628. }
  629. }
  630. }
  631. }
  632. })
  633. }
  634. </script>