50415648361d3ba4761d44b119fb32492add528a.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. <template>
  2. <div>
  3. <div class="abstract">
  4. <div class="abstract-title pdg20">串式注单</div>
  5. <div class="abstract-date pdg20 row item-cenrte">
  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. <div class="row item-center" style="margin:0.2rem;">
  15. <p style="color:#666;">注单状态</p>
  16. <select v-model="status" class="select_class">
  17. <option value=0 style="height: 0.4rem">全部</option>
  18. <option value=1>未结算</option>
  19. <option value=2>已结算</option>
  20. <option value=-1>无效</option>
  21. </select>
  22. </div>
  23. <button @click="ajaxclick()" style="margin-top:0.2rem">查询</button>
  24. </div>
  25. <div class="abstract-options row allAlignment">
  26. <div class="row">
  27. <div class="row center" @click="options(3)" :class="optionsActive==3?'active':''">过去30天</div>
  28. <div class="row center" @click="options(2)" :class="optionsActive==2?'active':''">昨日</div>
  29. <div class="row center" @click="options(1)" :class="optionsActive==1?'active':''">今日</div>
  30. </div>
  31. </div>
  32. <div class="abstract-box scroll">
  33. <yd-infinitescroll :callback="loadList" ref="infinitescrollDemo">
  34. <yd-list theme="5" slot="list">
  35. <yd-list-item>
  36. <yd-list-other slot="other">
  37. <div
  38. v-for="(item,index) in list"
  39. :key="index"
  40. style="border-left:.01rem solid #ccc;border-top:.01rem solid #ccc;border-right:.01rem solid #ccc;"
  41. >
  42. <div style="width:100%;height:.6rem;background:#ccc;color:#f76649;border-bottom:.01rem solid #bbb;padding:0 .2rem" class="row center allAlignment">
  43. <p style="color:#777;">{{"时间:"+item.money_time}}</p>
  44. <p style="color:#333;">{{item.batch_id}}</p>
  45. <p>投注额:{{item.money}}元</p>
  46. <p>预期中奖金额:{{item.prize_money}}元</p>
  47. <p :style="item.game_status==0?'color:#aaa;':item.game_status==1&&item.game_status==3?'color:#296':'color:red;'">赢/输:{{item.game_status==0?'审核中':item.game_status==1?'赢':item.game_status==2?'输':'平'}}</p>
  48. </div>
  49. <div v-for="(items,i) in item.money_buy" :key="i">
  50. <div class="title row item-center allAlignment">
  51. <p style="width:12%">编号</p>
  52. <p style="width:12%">类别</p>
  53. <p style="width:20%">订单详情</p>
  54. <p style="width:12%">投注类别</p>
  55. <p style="width:22%">比赛</p>
  56. <p style="width:12%">赛果</p>
  57. <p style="width:10%">赢 / 输</p>
  58. </div>
  59. <ul class="list row">
  60. <li style="width:12%">{{i+1}}</li>
  61. <li style="width:12%">{{$public.getGameType(items.game_code)}}</li>
  62. <li style="width:20%">
  63. <p>{{item.money_time}}</p>
  64. <p>{{item.order_id}}</p>
  65. </li>
  66. <li style="width:12%"><p style="width:100%;text-align: center;">{{items.odds_name}}</p><p style="width:100%;text-align: center;">{{items.condition}}@{{items.odds}}</p></li>
  67. <li style="width:22%">
  68. <p style="width:100%;text-align:center;">{{items.home_team}}</p>
  69. <p>vs</p>
  70. <p style="width:100%;text-align:center;">{{items.guest_team}}</p>
  71. </li>
  72. <li style="width:12%">{{items.matchresult?items.matchresult:'--'}}</li>
  73. <li style="width:10%">{{items.status==0?'--':items.status==1?'赢':'输'}}</li>
  74. </ul>
  75. </div>
  76. </div>
  77. </yd-list-other>
  78. </yd-list-item>
  79. </yd-list>
  80. </yd-infinitescroll>
  81. </div>
  82. </div>
  83. </div>
  84. </template>
  85. <script>
  86. export default {
  87. name: "unitary",
  88. data() {
  89. return {
  90. optionsActive: 3,
  91. startTime: "",
  92. newTime: "",
  93. endTime: "",
  94. page: 1,
  95. pageSize: 10,
  96. list: "",
  97. status: 0,
  98. statusType: [
  99. {label: '全部', value: ''},
  100. {label: '已结算', value: 1},
  101. {label: '未结算', value: 2},
  102. {label: '已失效', value: 3},
  103. ]
  104. };
  105. },
  106. methods: {
  107. ajaxclick(){
  108. // this.list='';
  109. // this.page=1;
  110. // this.loadList()
  111. this.list = ''
  112. this.page = 1
  113. this.options(this.optionActive);
  114. },
  115. options(num) {
  116. let date = new Date();
  117. this.optionsActive = num;
  118. if (this.optionsActive == 1) {
  119. this.startTime = `${date.getFullYear()}-${
  120. date.getMonth() + 1 < 10
  121. ? "0" + (date.getMonth() + 1)
  122. : date.getMonth() + 1
  123. }-${
  124. date.getDate() < 10 ? "0" + date.getDate() : date.getDate()
  125. }`;
  126. this.endTime = `${date.getFullYear()}-${
  127. date.getMonth() + 1 < 10
  128. ? "0" + (date.getMonth() + 1)
  129. : date.getMonth() + 1
  130. }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
  131. this.page = 1;
  132. this.list = "";
  133. this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.reInit");
  134. this.loadList();
  135. } else if (this.optionsActive == 2) {
  136. this.startTime = `${date.getFullYear()}-${
  137. date.getMonth() + 1 < 10
  138. ? "0" + (date.getMonth() + 1)
  139. : date.getMonth() + 1
  140. }-${
  141. date.getDate() - 1 < 10
  142. ? "0" + (date.getDate() - 1)
  143. : date.getDate() - 1
  144. }`;
  145. this.endTime = `${date.getFullYear()}-${
  146. date.getMonth() + 1 < 10
  147. ? "0" + (date.getMonth() + 1)
  148. : date.getMonth() + 1
  149. }-${
  150. date.getDate() - 1 < 10
  151. ? "0" + (date.getDate() - 1)
  152. : date.getDate() - 1
  153. }`;
  154. this.page = 1;
  155. this.list = "";
  156. this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.reInit");
  157. this.loadList();
  158. } else {
  159. this.startTime = `${date.getFullYear()}-${
  160. date.getMonth() < 10 ? "0" + date.getMonth() : date.getMonth()
  161. }-${
  162. date.getDate() < 10 ? "0" + date.getDate() : date.getDate()
  163. }`;
  164. this.endTime = `${date.getFullYear()}-${
  165. date.getMonth() + 1 < 10
  166. ? "0" + (date.getMonth() + 1)
  167. : date.getMonth() + 1
  168. }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
  169. this.page = 1;
  170. this.list = "";
  171. this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.reInit");
  172. this.loadList();
  173. }
  174. },
  175. date_fun() {
  176. let date = new Date();
  177. let date1 = new Date(date);
  178. this.newTime = `${date1.getFullYear()}-${
  179. date1.getMonth() + 1 < 10
  180. ? "0" + (date1.getMonth() + 1)
  181. : date1.getMonth() + 1
  182. }-${date1.getDate() < 10 ? "0" + date1.getDate() : date1.getDate()}`;
  183. date1.setMonth(date.getMonth() - 3);
  184. this.startTime = `${date1.getFullYear()}-${
  185. date1.getMonth() + 1 < 10
  186. ? "0" + (date1.getMonth() + 1)
  187. : date1.getMonth() + 1
  188. }-${date1.getDate() < 10 ? "0" + date1.getDate() : date1.getDate()}`;
  189. this.endTime = `${date1.getFullYear()}-${
  190. date1.getMonth() + 1 < 10
  191. ? "0" + (date1.getMonth() + 1)
  192. : date1.getMonth() + 1
  193. }-${date1.getDate() < 10 ? "0" + date1.getDate() : date1.getDate()}`;
  194. date1.setMonth(date.getMonth() - 3);
  195. },
  196. loadList() {
  197. console.log('status', this.status)
  198. this.$http
  199. .post(this.$ports.login.bettingRecord, {
  200. token: localStorage.getItem("token"),
  201. startTime: this.startTime + " 00:00:00",
  202. endTime: this.endTime + " 23:59:59",
  203. type: 2,
  204. currentPage: this.page,
  205. pageSize: 10,
  206. set_status: this.status
  207. })
  208. .then(res => {
  209. // console.log(res,'res');
  210. this.list = [...this.list, ...res.data.data.list];
  211. console.log(this.list,'我的返回')
  212. if (this.pageSize > res.data.data.list.length) {
  213. /* 所有数据加载完毕 */
  214. this.$refs.infinitescrollDemo.$emit(
  215. "ydui.infinitescroll.loadedDone"
  216. );
  217. return;
  218. } else {
  219. /* 单次请求数据完毕 */
  220. this.$refs.infinitescrollDemo.$emit(
  221. "ydui.infinitescroll.finishLoad"
  222. );
  223. this.page++;
  224. }
  225. });
  226. }
  227. },
  228. created() {
  229. this.date_fun();
  230. },
  231. mounted() {
  232. this.options(3);
  233. }
  234. };
  235. </script>
  236. <style scoped>
  237. div /deep/ .yd-list-theme5 .yd-list-item .yd-list-mes {
  238. padding: 0;
  239. }
  240. div /deep/ .yd-list-theme5 .yd-list-item .yd-list-other {
  241. padding: 0;
  242. }
  243. div /deep/ .yd-list-other {
  244. display: block;
  245. }
  246. .yd-list-theme5 .yd-list-item {
  247. padding: 0;
  248. }
  249. div /deep/ .yd-list-img {
  250. display: none;
  251. }
  252. div /deep/ .yd-list-loading {
  253. display: none;
  254. }
  255. .pdg20 {
  256. padding: 0 0.2rem;
  257. }
  258. .abstract-title {
  259. font-size: 0.18rem;
  260. color: #fff;
  261. height: 0.5rem;
  262. background: #999;
  263. line-height: 0.5rem;
  264. }
  265. .abstract-date {
  266. height: 0.8rem;
  267. font-size: 0.14rem;
  268. }
  269. input {
  270. width: 1.7rem;
  271. height: 0.4rem;
  272. font-size: 0.14rem;
  273. color: #666;
  274. border: 0.01rem solid #ddd;
  275. border-radius: 0.05rem;
  276. margin-left: 0.1rem;
  277. cursor: pointer;
  278. }
  279. input[type="date"]::-webkit-inner-spin-button {
  280. visibility: hidden;
  281. }
  282. input[type="date"]::-webkit-clear-button {
  283. display: none;
  284. }
  285. input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  286. background-color: #eee;
  287. }
  288. input[type="date"]::-webkit-datetime-edit {
  289. /* content: '起始时间'; */
  290. padding-left: 0.1rem;
  291. }
  292. button {
  293. background: #999;
  294. border: none;
  295. width: 0.6rem;
  296. height: 0.4rem;
  297. border-radius: 0.05rem;
  298. color: #fff;
  299. margin-left: 0.2rem;
  300. cursor: pointer;
  301. }
  302. .abstract-options {
  303. height: 0.4rem;
  304. border-bottom: 0.01rem solid #999;
  305. }
  306. .abstract-options > div > div {
  307. width: 1rem;
  308. height: 0.4rem;
  309. color: #fff;
  310. background: #ccc;
  311. margin-left: 0.01rem;
  312. border-radius: 5px 5px 0px 0px;
  313. cursor: pointer;
  314. }
  315. .abstract-options div.active {
  316. background: #666;
  317. }
  318. .abstract-box {
  319. min-height: 2.8rem;
  320. max-height: 6.6rem;
  321. overflow-x: hidden;
  322. overflow-y: auto;
  323. }
  324. .abstract-box > div {
  325. margin-top: 0.2rem;
  326. }
  327. .abstract-box .title {
  328. height: 0.4rem;
  329. background: #ddd;
  330. color: #333;
  331. }
  332. .abstract-box .title p {
  333. text-align: center;
  334. }
  335. .abstract-box .title div {
  336. width: 50%;
  337. text-align: center;
  338. line-height: 0.4rem;
  339. }
  340. .abstract-box .list li {
  341. width: 50%;
  342. height: 1.1rem;
  343. background: #fff;
  344. display: flex;
  345. justify-content: center;
  346. align-items: center;
  347. flex-wrap: wrap;
  348. font-size: 0.14rem;
  349. border-top: 0.01rem solid #ccc;
  350. border-left: 0.01rem solid #ccc;
  351. border-bottom: 0.01rem solid #ccc;
  352. }
  353. .abstract-box .list li:nth-child(1) {
  354. border-left: none;
  355. }
  356. .select_class {
  357. width: 1.7rem;
  358. height: 0.4rem;
  359. font-size: 0.14rem;
  360. color: #666;
  361. border: 0.01rem solid #ddd;
  362. border-radius: 0.05rem;
  363. margin-left: 0.1rem;
  364. padding-left: 0.1rem;
  365. cursor: pointer;
  366. }
  367. </style>