59.a197a7d04a3aaa57af07.js 9.4 KB

12
  1. webpackJsonp([59],{"6mhr":function(t,e){},DrKd:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("3KG0"),i={name:"order",filters:{formatDate:function(t){t*=1e3;var e=new Date(t);return Object(s.a)(e,"yyyy-MM-dd hh:mm")}},data:function(){return{tabData:"futures",tabIndex:0,tabs:[{text:"合约",id:"futures"},{text:"期权",id:"option"},{text:"足球",id:"soccer"}],choiceFlag:!1,username:"",dateShowStart:!1,dateShowEnd:!1,minDateStart:new Date("2020/1/1"),maxDateStart:new Date,minDateEnd:new Date,maxDateEnd:new Date,currentDateStart:new Date,currentDateEnd:new Date,dateTimeStart:"开始时间",dateTimeEnd:"结束时间",orderStats:[{id:999,text:"全部"},{id:1,text:"持仓"},{id:2,text:"平仓"}],futuresStats:[{id:999,text:"全部"},{id:1,text:"持仓"},{id:2,text:"平仓"}],optionStats:[{id:999,text:"全部"},{id:0,text:"未结算"},{id:1,text:"已结算"}],soccerStats:[{id:999,text:"全部"},{id:0,text:"未结算"},{id:1,text:"已结算"}],orderStatsId:999,orderStatsIndex:0,orderStatsShow:!1,loading:!0,finished:!1,offset:15,page:0,page_size:10,orderList:[]}},mounted:function(){this.getlist()},activated:function(){document.documentElement.scrollTop=0},methods:{tabClick:function(t,e){this.tabIndex!=e&&(this.tabIndex=e,this.tabData=t,this.page=0,this.orderList=[],this.finished=!1,"futures"==t&&(this.orderStats=this.futuresStats),"option"==t&&(this.orderStats=this.optionStats),"soccer"==t&&(this.orderStats=this.soccerStats),this.getlist())},filterClick:function(){this.choiceFlag=!0},choiceClose:function(){this.choiceFlag=!1},dateChangeStart:function(){this.dateShowStart=!1,this.dateTimeStart=this.dateFilter(this.currentDateStart),this.minDateEnd=this.currentDateStart},dateChangeEnd:function(){this.dateShowEnd=!1,this.dateTimeEnd=this.dateFilter(this.currentDateEnd)},dateFilter:function(t){var e=new Date(t);return e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate()},orderStatsClick:function(t,e){this.orderStatsId=t,this.orderStatsIndex=e,this.orderStatsShow=!1},reset:function(){this.username="",this.dateShowStart=!1,this.dateShowEnd=!1,this.minDateStart=new Date("2020/1/1"),this.maxDateStart=new Date,this.minDateEnd=new Date,this.maxDateEnd=new Date,this.currentDateStart=new Date,this.currentDateEnd=new Date,this.dateTimeStart="开始时间",this.dateTimeEnd="结束时间",this.orderStatsId=999,this.orderStatsShow=!1},filter:function(){this.loading=!0,this.finished=!1,this.page=0,this.orderList=[],this.getlist(),this.choiceClose()},getlist:function(){var t=this,e=this;this.$nextTick(function(){var a={type:t.tabData,username:t.username,page_page:t.page_page,page:t.page};999!=t.orderStatsId&&(a.status=t.orderStatsId),"开始时间"!=t.dateTimeStart&&"结束时间"!=t.dateTimeEnd&&(a.start_date=t.dateTimeStart,a.end_date=t.dateTimeEnd),t.$api.recruitment.getRecruitmentOrder(a).then(function(a){a.data.list.length>0?(a.data.list.forEach(function(t){e.orderStats.forEach(function(e){t.status==e.id&&(t.statusText=e.text)})}),t.orderList=t.orderList.concat(a.data.list)):t.finished=!0,t.loading=!1})})},onLoad:function(){var t=this;this.finished||(this.page=this.page+1,setTimeout(function(){t.getlist()},300))}}},n={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"order"},[s("app-nav",{attrs:{back:!0}},[s("span",[t._v(t._s(t.$t("订单记录")))]),t._v(" "),s("template",{attrs:{slot:"recharge"},slot:"recharge"},[s("div",[s("img",{staticStyle:{width:"0.40rem",height:"0.42rem"},attrs:{src:a("nYtz"),alt:""},on:{click:t.filterClick}})])])],2),t._v(" "),s("div",{staticClass:"order_tabs"},t._l(t.tabs,function(e,a){return s("span",{key:a,class:e.id===t.tabData?"order_tabs_T":"order_tabs_F",on:{click:function(s){t.tabClick(e.id,a)}}},[t._v("\n "+t._s(t.$t(e.text))+"\n ")])})),t._v(" "),s("van-list",{attrs:{finished:t.finished,"loading-text":t.$t("加载中"),"finished-text":t.$t("没有更多了"),offset:t.offset},on:{load:t.onLoad},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[s("div",{staticClass:"order_list"},t._l(t.orderList,function(e,a){return s("div",{key:a,staticClass:"order_list_data"},[s("div",{staticClass:"order_list_data_info"},[s("div",{staticClass:"order_list_data_info_title"},[s("span",[t._v(t._s(t.$t(t.tabs[t.tabIndex].text)))]),t._v(" "),s("span",{staticClass:"order_list_data_info_title_s"},[t._v(t._s(e.username))])]),t._v(" "),s("div",{staticClass:"order_list_data_info_d"},[s("div",[s("span",[t._v(t._s(t.$t("投注金额"))+":")]),t._v(" "),s("span",{staticClass:"order_list_data_info_d_s"},[t._v(t._s(e.amount))])]),t._v(" "),s("div",{staticClass:"order_list_data_info_d_r"},[s("span",[t._v(t._s(t.$t("盈利方"))+":")]),t._v(" "),s("span",{staticClass:"order_list_data_info_d_s"},[t._v("\n "+t._s(Number(e.profit_and_loss)>0?t.$t("客户"):0==Number(e.profit_and_loss)?t.$t("平局"):t.$t("平台"))+"\n ")])]),t._v(" "),s("div",[s("span",[t._v(t._s(t.$t("输赢"))+":")]),t._v(" "),s("span",{staticClass:"order_list_data_info_d_s"},[t._v(t._s(e.profit_and_loss))])]),t._v(" "),s("div",{staticClass:"order_list_data_info_d_r"},[s("span",[t._v(t._s(t.$t("状态"))+":")]),t._v(" "),s("span",{staticClass:"order_list_data_info_d_s"},[t._v(t._s(t.$t(e.statusText)))])])])]),t._v(" "),s("div",{staticClass:"order_list_data_btn"},[s("span",[t._v(t._s(t.$t("下单时间"))+":"+t._s(t._f("formatDate")(e.created_at)))]),t._v(" "),s("span",{staticClass:"order_list_data_btn_b",on:{click:function(a){t.$router.push("/recruitment/orderInfo?id="+e.ordernum+"&type="+t.tabData)}}},[t._v("\n "+t._s(t.$t("详情"))+"\n ")])])])}))]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.choiceFlag,expression:"choiceFlag"}],staticClass:"choiceType",on:{click:t.choiceClose}},[s("div",{staticClass:"choiceType_m"},[s("div",{staticClass:"choiceType_m_select"},[s("span",[t._v(t._s(t.$t("下单时间")))]),t._v(" "),s("div",{staticClass:"choiceType_m_select_i"},[s("p",{staticClass:"choiceType_m_select_i_in2",on:{click:function(e){e.stopPropagation(),e.preventDefault(),t.dateShowStart=!0}}},[t._v("\n "+t._s(t.$t(t.dateTimeStart))+"\n ")]),t._v(" "),s("span",{staticClass:"choiceType_m_select_i_h"},[t._v("-")]),t._v(" "),s("p",{staticClass:"choiceType_m_select_i_in2",on:{click:function(e){e.stopPropagation(),e.preventDefault(),t.dateShowEnd=!0}}},[t._v("\n "+t._s(t.$t(t.dateTimeEnd))+"\n ")])])]),t._v(" "),s("div",{staticClass:"choiceType_m_select"},[s("span",[t._v(t._s(t.$t("下级账户")))]),t._v(" "),s("div",{staticClass:"choiceType_m_select_i"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.username,expression:"username"}],staticClass:"choiceType_m_select_i_in",attrs:{type:"text",placeholder:t.$t("请输入")},domProps:{value:t.username},on:{click:function(t){t.stopPropagation(),t.preventDefault()},input:function(e){e.target.composing||(t.username=e.target.value)}}})])]),t._v(" "),s("div",{staticClass:"choiceType_m_select"},[s("span",[t._v(t._s(t.$t("状态")))]),t._v(" "),s("div",{staticClass:"choiceType_m_select_i",on:{click:function(e){e.stopPropagation(),e.preventDefault(),t.orderStatsShow=!0}}},[s("span",{staticClass:"choiceType_m_select_i_s"},[t._v(t._s(t.$t(t.orderStats[t.orderStatsIndex].text)))]),t._v(" "),s("img",{attrs:{src:a("YT4P"),alt:""}})])]),t._v(" "),s("div",{staticClass:"choiceType_m_btn"},[s("span",{staticClass:"choiceType_m_btn_b1",on:{click:function(e){e.stopPropagation(),e.preventDefault(),t.reset(e)}}},[t._v(t._s(t.$t("重置")))]),t._v(" "),s("span",{staticClass:"choiceType_m_btn_b2",on:{click:function(e){e.stopPropagation(),e.preventDefault(),t.filter(e)}}},[t._v(t._s(t.$t("筛选")))])])])]),t._v(" "),s("van-popup",{staticClass:"popup",attrs:{position:"bottom"},model:{value:t.dateShowStart,callback:function(e){t.dateShowStart=e},expression:"dateShowStart"}},[s("van-datetime-picker",{attrs:{type:"date","confirm-button-text":t.$t("确定"),"cancel-button-text":t.$t("取消"),"min-date":t.minDateStart,"max-date":t.maxDateStart},on:{confirm:function(e){t.dateChangeStart()},cancel:function(e){t.dateShowStart=!1}},model:{value:t.currentDateStart,callback:function(e){t.currentDateStart=e},expression:"currentDateStart"}})],1),t._v(" "),s("van-popup",{staticClass:"popup",attrs:{position:"bottom"},model:{value:t.dateShowEnd,callback:function(e){t.dateShowEnd=e},expression:"dateShowEnd"}},[s("van-datetime-picker",{attrs:{type:"date","confirm-button-text":t.$t("确定"),"cancel-button-text":t.$t("取消"),"min-date":t.minDateEnd,"max-date":t.maxDateEnd},on:{confirm:function(e){t.dateChangeEnd()},cancel:function(e){t.dateShowEnd=!1}},model:{value:t.currentDateEnd,callback:function(e){t.currentDateEnd=e},expression:"currentDateEnd"}})],1),t._v(" "),s("van-popup",{staticClass:"popup",attrs:{position:"bottom"},model:{value:t.orderStatsShow,callback:function(e){t.orderStatsShow=e},expression:"orderStatsShow"}},[s("div",{staticClass:"popup_close",on:{click:function(e){t.orderStatsShow=!1}}},[s("img",{staticStyle:{width:"0.3rem",height:"0.3rem"},attrs:{src:a("qsVC"),alt:""}})]),t._v(" "),s("p",{staticClass:"popup_title"},[t._v(t._s(t.$t("状态")))]),t._v(" "),s("div",{staticClass:"popup_content"},t._l(t.orderStats,function(e,a){return s("p",{key:a,on:{click:function(s){t.orderStatsClick(e.id,a)}}},[t._v(t._s(t.$t(e.text))+"\n ")])}))])],1)},staticRenderFns:[]};var o=a("VU/8")(i,n,!1,function(t){a("6mhr")},"data-v-4a0c272c",null);e.default=o.exports}});
  2. //# sourceMappingURL=59.a197a7d04a3aaa57af07.js.map