backList_body.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <title>订单内容</title>
  8. <link rel="stylesheet" type="text/css" href="../../../../../css/api.css" />
  9. <link rel="stylesheet" type="text/css" href="../../../../../css/css/style1.css" />
  10. <script type="text/javascript" src="../../../../../script/js/auto-size.js"></script>
  11. <style>
  12. ul {
  13. -webkit-margin-before: 1em;
  14. -webkit-margin-after: 1em;
  15. -webkit-margin-start: 0px;
  16. -webkit-margin-end: 0px;
  17. -webkit-padding-start: 0px;
  18. }
  19. p {
  20. display: block;
  21. -webkit-margin-before: 0em;
  22. -webkit-margin-after: 0em;
  23. -webkit-margin-start: 0px;
  24. -webkit-margin-end: 0px;
  25. }
  26. li {
  27. list-style-type: none;
  28. }
  29. .empty {
  30. width: 96%;
  31. height: auto;
  32. /*background: rgba(255, 255, 255, 1);*/
  33. box-shadow: 0px 6px 24px 0px rgba(0, 0, 0, 0.1);
  34. border-radius: 20px;
  35. margin: 0 auto;
  36. margin-top: .2rem;
  37. }
  38. .empty>div:nth-child(1) {
  39. width: 92%;
  40. margin: 0 auto;
  41. padding-top: .5rem;
  42. }
  43. .empty>div:nth-child(1)>div:nth-child(1) {
  44. width: .2rem;
  45. height: .8rem;
  46. background: rgba(246, 207, 25, 1);
  47. float: left;
  48. margin-left: -.41rem;
  49. }
  50. .empty>div:nth-child(1)>div:nth-child(2) {
  51. font-size: .42rem
  52. }
  53. .empty>div:nth-child(1)>div:nth-child(3) {
  54. float: right;
  55. padding: 0 0.3rem;
  56. height: .8rem;
  57. background: rgba(246, 207, 25, 1);
  58. border-radius: 20px 0px 0px 20px;
  59. margin-top: -.7rem;
  60. margin-right: -.41rem;
  61. text-align: center;
  62. line-height: .8rem;
  63. color: #fff;
  64. }
  65. .empty>div:nth-child(2) {
  66. width: 92%;
  67. margin: 0 auto;
  68. padding-top: .2rem;
  69. border-top: .02rem solid #E7E8EA;
  70. margin-top: .6rem;
  71. }
  72. .empty>div:nth-child(2)>p {
  73. font-size: .48rem;
  74. margin-bottom: .2rem;
  75. }
  76. .empty>div:nth-child(2)>ul>li {
  77. font-size: .42rem;
  78. }
  79. .empty>div:nth-child(2)>ul>li:nth-child(1) {
  80. float: left;
  81. }
  82. .empty>div:nth-child(2)>ul>li:nth-child(2) {
  83. float: right;
  84. }
  85. .empty>div:nth-child(2)>ul>li:nth-child(3) {
  86. padding-top: 1rem;
  87. }
  88. .empty>div:nth-child(3) {
  89. width: 92%;
  90. margin: 0 auto;
  91. margin-top: .2rem;
  92. border-top: .02rem solid #E7E8EA;
  93. padding-top: .4rem;
  94. border-bottom: 1px solid #c8cdd0;
  95. }
  96. .empty>div:nth-child(3) {
  97. display: flex;
  98. justify-content: space-between;
  99. padding-bottom: .2rem;
  100. }
  101. .empty>div:nth-child(4) {
  102. display: flex;
  103. justify-content: space-between;
  104. padding-bottom: .2rem;
  105. width: 92%;
  106. margin: 0 auto;
  107. margin-top: .2rem;
  108. border-top: .02rem solid #E7E8EA;
  109. padding-top: .4rem;
  110. }
  111. .empty>div:nth-child(3)>div:nth-child(1) {
  112. line-height: .9rem;
  113. color: #616266;
  114. }
  115. .empty>div:nth-child(3)>div:nth-child(2) {
  116. font-size: .56rem;
  117. color: #303133;
  118. }
  119. .auditBtn {
  120. display: flex;
  121. margin-bottom: .1rem;
  122. }
  123. .auditBtn div:nth-child(1) {
  124. background-color: #999;
  125. color: #FFFFFF;
  126. font-size: .4rem;
  127. padding: .2rem .3rem;
  128. border-radius: .2rem;
  129. }
  130. .auditBtn div:nth-child(2) {
  131. background-color: #0096df;
  132. color: #FFFFFF;
  133. font-size: .4rem;
  134. padding: .2rem .3rem;
  135. border-radius: .2rem;
  136. margin-left: .2rem;
  137. }
  138. </style>
  139. </head>
  140. <body>
  141. <div style="overflow-y : scroll" id="mescroll">
  142. <div class="empty pageView youhuijuan" v-for="(order,index) in list">
  143. <div>
  144. <div></div>
  145. <div>
  146. <samp>{{ $t('home.backList.money') }}:{{ order.amount }}</samp>
  147. </div>
  148. <div>
  149. <span>{{ judgeStatus(order.status, order.status) }}</span><img src="" alt="">
  150. </div>
  151. </div>
  152. <div>
  153. <p>
  154. {{ $t('home.backList.storeName') }}:{{ order.storeName }}
  155. </p>
  156. <p>
  157. {{ $t('home.backList.couponCode') }}:{{ order.couponCode }}
  158. </p>
  159. <ul>
  160. <li>
  161. {{ $t('home.backList.createTime') }}:<span>{{ order.createTime }}</span>
  162. </li>
  163. </ul>
  164. </div>
  165. <div>
  166. <div>
  167. <p>
  168. {{ $t('home.backList.status') }}:<span v-if="'0'==order.status">{{ $t('home.backList.noSubmit') }}</span>
  169. <span v-if="'1'==order.status">{{ $t('home.backList.noSubmit') }}</span>
  170. <span v-if="'2'==order.status&&'0'==order.b2bStatus">{{ $t('home.backList.reviewed') }}</span>
  171. <span v-if="'2'==order.status&&'1'==order.b2bStatus">{{ $t('home.backList.noPass') }}</span>
  172. <span v-if="'2'==order.status&&'2'==order.b2bStatus">{{ $t('home.backList.pass') }}</span>
  173. </p>
  174. </div>
  175. <div class="auditBtn" v-show="order.status == 0">
  176. <div v-on:click.stop="handleOrder(order.couponCode,1,index)">{{ $t('common.reject') }}</div>
  177. <div v-on:click.stop="handleOrder(order.couponCode,2,index)">{{ $t('common.agree') }}</div>
  178. </div>
  179. </div>
  180. </div>
  181. <div v-show="hasOther && list.length > 0" style="width: 100%;height: 1rem;;text-align : center;margin-top : 1rem">{{ $t('common.noData') }}</div>
  182. <div v-show="list.length == 0" style="text-align:center">
  183. <img src="../../../../../image/image/nodata.png" style="margin:2rem auto;width:100%;height:100%" />
  184. </div>
  185. </div>
  186. </body>
  187. <link rel="stylesheet" href="../../../../../script/mescroll/mescroll.min.css">
  188. <script type="text/javascript" src="../../../../../script/aui-scroll.js"></script>
  189. <script type="text/javascript" src="../../../../../script/mescroll/mescroll.min.js"></script>
  190. <script type="text/javascript" src="../../../../../script/vue.js"></script>
  191. <script type="text/javascript" src="../../../../../script/vue-i18n.js"></script>
  192. <script type="text/javascript" src="../../../../../script/api.js"></script>
  193. <script type="text/javascript" src="../../../../../script/httpRequest.js"></script>
  194. <script type="text/javascript" src="../../../../../script/vue_plugins.js"></script>
  195. <script type="text/javascript" src="../../../js/zh.js"></script>
  196. <script type="text/javascript" src="../../../js/en.js"></script>
  197. <script type="text/javascript">
  198. apiready = function() {
  199. let langType = $api.getStorage('lang') || 'cn'
  200. const i18n = new VueI18n({
  201. locale: langType,//设置语言
  202. messages: {
  203. en: getEn(),
  204. cn: getCn()
  205. }
  206. })
  207. new Vue({
  208. el: '#mescroll',
  209. i18n,
  210. data: {
  211. list: [],
  212. kunnr: '',
  213. current: 1,
  214. size: 10, // 订单状态 0,新创建,1已接单,2,驳回,3完成 经销商审核 0 待审核 1 同意 2 拒绝
  215. frist: 1,
  216. mescroll: '',
  217. hasOther: true,
  218. },
  219. mounted: function() {
  220. this.init();
  221. },
  222. methods: {
  223. init: function() {
  224. var _this = this;
  225. this.kunnr = $api.getStorage('kunnr');
  226. this.getOrderList();
  227. this.configHeadMotive(function() {
  228. _this.current = 1;
  229. _this.hasOther = true;
  230. _this.getOrderList();
  231. })
  232. },
  233. configs: function() {
  234. var _this = this;
  235. this.frist = 2;
  236. // this.configDownAndPull("mescroll", function(mescroll) {
  237. // _this.mescroll = mescroll;
  238. // _this.current = 1;
  239. // _this.getOrderList(mescroll);
  240. // }, function(mescroll) {
  241. // if (_this.current < _this.totalPages) {
  242. // _this.current = _this.current + 1;
  243. // _this.getOrderList(mescroll, 1);
  244. // } else {
  245. // mescroll.endSuccess(_this.size, false);
  246. // }
  247. // },false);
  248. this.configBottomRefush(function() {
  249. if (_this.current < _this.totalPages) {
  250. _this.current = _this.current + 1;
  251. _this.getOrderList(_this.mescroll, 1);
  252. } else {
  253. _this.hasOther = true;
  254. // _this.mescroll.endSuccess(_this.size, false);
  255. }
  256. })
  257. },
  258. getOrderList: function(mescroll) {
  259. var params = {
  260. kunnr: this.kunnr,
  261. size: this.size,
  262. current: this.current,
  263. url: 'json',
  264. type: 'body'
  265. },
  266. _this = this;
  267. this.$post('getCheckListU', params, function(ret) {
  268. if (ret.code == 0 || ret.code == '0') {
  269. _this.list = _this.current == 1 ? ret.data.records : _this.list.concat(ret.data.records);
  270. _this.totalPages = ret.data.pages;
  271. if (mescroll) {
  272. mescroll.endSuccess(_this.size, true);
  273. }
  274. if (_this.frist == 1) {
  275. _this.configs();
  276. }
  277. }
  278. });
  279. },
  280. // 处理订单操作handerOrderUrl
  281. handleOrder: function(code, status, index) {
  282. var data = {
  283. couponCode: code,
  284. status: status,
  285. kunnr: this.kunnr,
  286. url: 'json',
  287. type: 'body'
  288. },
  289. _this = this,
  290. url = "checkConponU";
  291. this.$post(url, data, function(res) {
  292. if (res.code == 0) {
  293. api.toast({
  294. msg: (status == 1 ? _this.$t('common.reject') : _this.$t('common.agree')) + _this.$t('common.success'),
  295. });
  296. setTimeout(function() {
  297. _this.$set(_this.list[index], "status", (status == 2 ? '2' : '1'));
  298. if(status == 2){
  299. _this.$set(_this.list[index], "b2bStatus", 0);
  300. }
  301. }, 200);
  302. }
  303. })
  304. },
  305. judgeStatus: function(auditStatus, status) {
  306. return [this.$t('home.backList.reviewed'), this.$t('home.backList.noPass'), this.$t('home.backList.pass')][status];
  307. }
  308. }
  309. })
  310. }
  311. </script>
  312. </html>