534d92360353795c35bf4ba95c551c090f605668.svn-base 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <div>
  3. <div class="abstract">
  4. <div class="abstract-title pdg20">取款</div>
  5. <div class="abstract-date pdg20 row item-center">
  6. <div class="row item-center">
  7. <p style="color:#666;">开始日期</p>
  8. <input type="date" :max="newTime" v-model="startTime">
  9. </div>
  10. <div class="row item-center" style="margin:0 .2rem;">
  11. <p style="color:#666;">结束日期</p>
  12. <input type="date" :max="newTime" v-model="endTime" :min="startTime">
  13. </div>
  14. <button @click="ajaxclick()">查询</button>
  15. </div>
  16. <div class="abstract-options row allAlignment">
  17. <div class="row">
  18. <div class="row center" @click="options(3)" :class="optionsActive==3?'active':''">过去30天</div>
  19. <div class="row center" @click="options(2)" :class="optionsActive==2?'active':''">昨日</div>
  20. <div class="row center" @click="options(1)" :class="optionsActive==1?'active':''">今日</div>
  21. </div>
  22. </div>
  23. <div class="abstract-box scroll">
  24. <yd-infinitescroll :callback="loadList" ref="infinitescrollDemo">
  25. <yd-list theme="5" slot="list">
  26. <yd-list-item>
  27. <yd-list-other slot="other">
  28. <div
  29. v-for="(item,index) in list" :key="index"
  30. style="border-left:.01rem solid #ccc;border-top:.01rem solid #ccc;border-right:.01rem solid #ccc;"
  31. >
  32. <div class="title row item-center allAlignment">
  33. <p style="width:8%">编号</p>
  34. <p style="width:12%">操作时间</p>
  35. <p style="width:12%">通过时间</p>
  36. <p style="width:12%">打款时间</p>
  37. <p style="width:12%">银行卡号</p>
  38. <p style="width:12%">银行信息</p>
  39. <p style="width:12%">金额</p>
  40. <p style="width:12%">资金剩余</p>
  41. <p style="width:8%">审核</p>
  42. </div>
  43. <ul class="list row allAlignment" style="width:100%;">
  44. <li style="width:8%">{{index+1}}</li>
  45. <li style="width:12%">{{item.apply_time}}</li>
  46. <li style="width:12%">{{item.pass_time}}</li>
  47. <li style="width:12%">{{item.give_time}}</li>
  48. <li style="width:12%">{{item.bank_no}}</li>
  49. <li style="width:12%">{{item.bank_info}}</li>
  50. <li style="width:12%">{{item.money}}</li>
  51. <li style="width:12%">{{item.money_cash}}</li>
  52. <li style="width:8%" :style="item.status==0?'color:#ccc':item.status==1?'color:#4caf50':'color:red'">{{item.status==0?'待审核':item.status==1?'通过':'未通过'}}</li>
  53. </ul>
  54. </div>
  55. </yd-list-other>
  56. </yd-list-item>
  57. </yd-list>
  58. </yd-infinitescroll>
  59. </div>
  60. </div>
  61. </div>
  62. </template>
  63. <script>
  64. export default {
  65. name: "withdrawals",
  66. data() {
  67. return {
  68. optionsActive: 3,
  69. startTime: "",
  70. newTime: "",
  71. endTime: "",
  72. page: 1,
  73. pageSize: 10,
  74. list: ""
  75. };
  76. },
  77. methods: {
  78. ajaxclick(){
  79. this.list='';
  80. this.page=1;
  81. this.loadList()
  82. },
  83. options(num) {
  84. let date = new Date();
  85. this.optionsActive = num;
  86. if (this.optionsActive == 1) {
  87. this.startTime = `${date.getFullYear()}-${
  88. date.getMonth() + 1 < 10
  89. ? "0" + (date.getMonth() + 1)
  90. : date.getMonth() + 1
  91. }-${
  92. date.getDate() < 10 ? "0" + date.getDate() : date.getDate()
  93. }`;
  94. this.endTime = `${date.getFullYear()}-${
  95. date.getMonth() + 1 < 10
  96. ? "0" + (date.getMonth() + 1)
  97. : date.getMonth() + 1
  98. }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
  99. this.page = 1;
  100. this.list = "";
  101. this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.reInit");
  102. this.loadList();
  103. } else if (this.optionsActive == 2) {
  104. this.startTime = `${date.getFullYear()}-${
  105. date.getMonth() + 1 < 10
  106. ? "0" + (date.getMonth() + 1)
  107. : date.getMonth() + 1
  108. }-${
  109. date.getDate() - 1 < 10
  110. ? "0" + (date.getDate() - 1)
  111. : date.getDate() - 1
  112. }`;
  113. this.endTime = `${date.getFullYear()}-${
  114. date.getMonth() + 1 < 10
  115. ? "0" + (date.getMonth() + 1)
  116. : date.getMonth() + 1
  117. }-${
  118. date.getDate() - 1 < 10
  119. ? "0" + (date.getDate() - 1)
  120. : date.getDate() - 1
  121. }`;
  122. this.page = 1;
  123. this.list = "";
  124. this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.reInit");
  125. this.loadList();
  126. } else {
  127. this.startTime = `${date.getFullYear()}-${
  128. date.getMonth() < 10 ? "0" + date.getMonth() : date.getMonth()
  129. }-${
  130. date.getDate() < 10 ? "0" + date.getDate() : date.getDate()
  131. }`;
  132. this.endTime = `${date.getFullYear()}-${
  133. date.getMonth() + 1 < 10
  134. ? "0" + (date.getMonth() + 1)
  135. : date.getMonth() + 1
  136. }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
  137. this.page = 1;
  138. this.list = "";
  139. this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.reInit");
  140. this.loadList();
  141. }
  142. },
  143. date_fun() {
  144. let date = new Date();
  145. let date1 = new Date(date);
  146. this.newTime = `${date1.getFullYear()}-${
  147. date1.getMonth() + 1 < 10
  148. ? "0" + (date1.getMonth() + 1)
  149. : date1.getMonth() + 1
  150. }-${date1.getDate() < 10 ? "0" + date1.getDate() : date1.getDate()}`;
  151. date1.setMonth(date.getMonth() - 3);
  152. this.startTime = `${date1.getFullYear()}-${
  153. date1.getMonth() + 1 < 10
  154. ? "0" + (date1.getMonth() + 1)
  155. : date1.getMonth() + 1
  156. }-${date1.getDate() < 10 ? "0" + date1.getDate() : date1.getDate()}`;
  157. this.endTime = `${date1.getFullYear()}-${
  158. date1.getMonth() + 1 < 10
  159. ? "0" + (date1.getMonth() + 1)
  160. : date1.getMonth() + 1
  161. }-${date1.getDate() < 10 ? "0" + date1.getDate() : date1.getDate()}`;
  162. date1.setMonth(date.getMonth() - 3);
  163. },
  164. loadList() {
  165. this.$http
  166. .post(this.$ports.login.withdrawalsRecord, {
  167. token: localStorage.getItem("token"),
  168. startTime: this.startTime + " 00:00:00",
  169. endTime: this.endTime + " 23:59:00",
  170. currentPage: this.page,
  171. pageSize: 10
  172. })
  173. .then(res => {
  174. // console.log(res);
  175. if (res) {
  176. res.data.data.list.forEach((e, index) => {
  177. if (e.status == 0) {
  178. res.data.data.list.splice(index, 1);
  179. }
  180. });
  181. this.list = [...this.list, ...res.data.data.list];
  182. }
  183. if (this.pageSize > res.data.data.list.length) {
  184. /* 所有数据加载完毕 */
  185. this.$refs.infinitescrollDemo.$emit(
  186. "ydui.infinitescroll.loadedDone"
  187. );
  188. return;
  189. } else {
  190. /* 单次请求数据完毕 */
  191. this.$refs.infinitescrollDemo.$emit(
  192. "ydui.infinitescroll.finishLoad"
  193. );
  194. this.page++;
  195. }
  196. });
  197. }
  198. },
  199. created() {
  200. this.date_fun();
  201. },
  202. mounted() {
  203. this.options(3)
  204. }
  205. };
  206. </script>
  207. <style scoped>
  208. div /deep/ .yd-list-theme5 .yd-list-item .yd-list-mes {
  209. padding: 0;
  210. }
  211. div /deep/ .yd-list-theme5 .yd-list-item .yd-list-other {
  212. padding: 0;
  213. }
  214. div /deep/ .yd-list-other {
  215. display: block;
  216. }
  217. .yd-list-theme5 .yd-list-item {
  218. padding: 0;
  219. }
  220. div /deep/ .yd-list-img {
  221. display: none;
  222. }
  223. div /deep/ .yd-list-loading {
  224. display: none;
  225. }
  226. .pdg20 {
  227. padding: 0 0.2rem;
  228. }
  229. .abstract-title {
  230. font-size: 0.18rem;
  231. color: #fff;
  232. height: 0.5rem;
  233. background: #999;
  234. line-height: 0.5rem;
  235. }
  236. .abstract-date {
  237. height: 0.8rem;
  238. font-size: 0.14rem;
  239. }
  240. input {
  241. width: 1.7rem;
  242. height: 0.4rem;
  243. font-size: 0.14rem;
  244. color: #666;
  245. border: 0.01rem solid #ddd;
  246. border-radius: 0.05rem;
  247. margin-left: 0.1rem;
  248. cursor: pointer;
  249. }
  250. input[type="date"]::-webkit-inner-spin-button {
  251. visibility: hidden;
  252. }
  253. input[type="date"]::-webkit-clear-button {
  254. display: none;
  255. }
  256. input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  257. background-color: #eee;
  258. }
  259. input[type="date"]::-webkit-datetime-edit {
  260. /* content: '起始时间'; */
  261. padding-left: 0.1rem;
  262. }
  263. button {
  264. background: #999;
  265. border: none;
  266. width: 0.6rem;
  267. height: 0.4rem;
  268. border-radius: 0.05rem;
  269. color: #fff;
  270. margin-left: 0.2rem;
  271. cursor: pointer;
  272. }
  273. .abstract-options {
  274. height: 0.4rem;
  275. border-bottom: 0.01rem solid #999;
  276. }
  277. .abstract-options > div > div {
  278. width: 1rem;
  279. height: 0.4rem;
  280. color: #fff;
  281. background: #ccc;
  282. margin-left: 0.01rem;
  283. border-radius: 5px 5px 0px 0px;
  284. cursor: pointer;
  285. }
  286. .abstract-options div.active {
  287. background: #666;
  288. }
  289. .abstract-box {
  290. min-height: 2.8rem;
  291. max-height: 6.6rem;
  292. overflow-x: hidden;
  293. overflow-y: auto;
  294. }
  295. .abstract-box > div {
  296. margin-top: 0.2rem;
  297. }
  298. .abstract-box .title {
  299. height: 0.4rem;
  300. background: #ddd;
  301. color: #333;
  302. }
  303. .abstract-box .title p {
  304. text-align: center;
  305. }
  306. .abstract-box .title div {
  307. width: 50%;
  308. text-align: center;
  309. line-height: 0.4rem;
  310. }
  311. .abstract-box .list li {
  312. width: 50%;
  313. height: 0.4rem;
  314. background: #fff;
  315. display: flex;
  316. justify-content: center;
  317. align-items: center;
  318. flex-wrap: wrap;
  319. font-size: 0.14rem;
  320. border-top: 0.01rem solid #ccc;
  321. border-left: 0.01rem solid #ccc;
  322. border-bottom: 0.01rem solid #ccc;
  323. }
  324. .abstract-box .list li:nth-child(1) {
  325. border-left: none;
  326. }
  327. </style>