webpackJsonp([35],{"5pqF":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a,o=n("WZYV"),i=(a=o)&&a.__esModule?a:{default:a};e.default={data:function(){return{tabs:1,sele:[],select_val:0,list:[],money:"",profile:{},num:""}},components:{Foot:i.default},methods:{checktab:function(t){this.tabs=t},loadmore:function(){this.$router.push("/pdrlist")},getall:function(){var t=this;t.list=[],t.$post("/apiv1/index/getTransCate").then(function(e){1==e.code&&(t.sele=e.msg.select_list,t.money=e.msg.pdr_money)}),t.$post("/apiv1/index/profile").then(function(e){1==e.code&&(t.profile=e.msg)}),t.$post("/apiv1/index/getOtherPayOutOrder").then(function(e){1==e.code&&(t.list=e.msg)})},jiaoyi:function(){var t=this;""==t.num?t.$msg(1==t.tabs?"请输入买入数量":"请输入卖出数量"):layer.open({content:1==t.tabs?"您确定要买入吗？":"您确定要卖出吗？",btn:["确定","取消"],yes:function(e){layer.close(e),t.$post("/apiv1/index/buyOrderOutOrInto",{type:t.tabs,interval_id:t.sele[t.select_val].id,num:t.num,real_price:t.num*t.money}).then(function(e){t.$msg(e.msg),1==e.code&&(t.num="",2==t.tabs&&t.$router.replace("/"))})}})},buy:function(t){var e=this;layer.open({content:"您确定要买入吗？",btn:["确定","取消"],yes:function(n){layer.close(n),e.$post("/apiv1/index/buyOrderOutOrInto",{type:1,interval_id:t.interval_id,num:t.num,real_price:t.real_price,orderid:t.id}).then(function(t){e.$msg(t.msg),1==t.code&&e.$router.push("/jiaoyizhong?id="+t.data.orderid)})}})}},created:function(){this.getall()},destroyed:function(){}}},Rw1c:function(t,e,n){"use strict";var a={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"content"},[n("Foot",{attrs:{status:2}}),t._v(" "),n("div",{staticClass:"nav"},[n("div",{class:1==t.tabs?"nav_check":"nav_no",on:{click:function(e){return t.checktab(1)}}},[t._v("买入")]),t._v(" "),n("div",{class:2==t.tabs?"nav_check":"nav_no",on:{click:function(e){return t.checktab(2)}}},[t._v("卖出")])]),t._v(" "),n("div",{staticClass:"main"},[n("div",{staticClass:"box"},[n("p",{domProps:{innerHTML:t._s(1==t.tabs?"买入区间":"卖出区间")}}),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.select_val,expression:"select_val"}],attrs:{name:"",id:""},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.select_val=e.target.multiple?n:n[0]}}},t._l(t.sele,function(e,a){return n("option",{domProps:{value:a}},[t._v(t._s(e.title))])}),0)]),t._v(" "),n("div",{staticClass:"box1"},[n("p",[t._v("OPF价格")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.money,expression:"money"}],attrs:{type:"text",readonly:""},domProps:{value:t.money},on:{input:function(e){e.target.composing||(t.money=e.target.value)}}}),t._v(" "),n("span",[t._v("元")])]),t._v(" "),n("div",{staticClass:"box"},[n("p",{domProps:{innerHTML:t._s(1==t.tabs?"买入数量":"卖出数量")}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.num,expression:"num"}],attrs:{type:"number"},domProps:{value:t.num},on:{input:function(e){e.target.composing||(t.num=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"box1"},[n("p",[t._v("当前总价")]),t._v(" "),n("input",{attrs:{type:"text",readonly:""},domProps:{value:t.jiequ(t.num*t.money)}}),t._v(" "),n("span",[t._v("元")])]),t._v(" "),n("div",{staticClass:"box1"},[n("p",[t._v("可用OPF")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:1*t.profile.account_money,expression:"profile.account_money*1"}],attrs:{type:"text",readonly:""},domProps:{value:1*t.profile.account_money},on:{input:function(e){e.target.composing||t.$set(t.profile,"account_money*1",e.target.value)}}}),t._v(" "),n("span",[t._v("OPF")])]),t._v(" "),n("div",{staticClass:"box2",domProps:{innerHTML:t._s(1==t.tabs?"买入":"卖出")},on:{click:t.jiaoyi}})]),t._v(" "),1==t.tabs?n("div",{staticClass:"show"},[n("p",[t._v("交易状态")]),t._v(" "),n("p",{on:{click:function(e){return t.loadmore()}}},[t._v("查看全部")])]):t._e(),t._v(" "),t._l(t.list,function(e){return 1==t.tabs?n("div",{staticClass:"list"},[n("div",{staticClass:"mairu"}),t._v(" "),n("div",[t._v(t._s(e.title))]),t._v(" "),n("div",[t._v("数量："+t._s(e.num))]),t._v(" "),1==e.status?n("div",[t._v("待匹配")]):t._e(),t._v(" "),n("div",{on:{click:function(n){return t.buy(e)}}},[t._v("买入")])]):t._e()})],2)},staticRenderFns:[]};e.a=a},cekk:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("5pqF"),o=n.n(a);for(var i in a)"default"!==i&&function(t){n.d(e,t,function(){return a[t]})}(i);var s=n("Rw1c");var r=function(t){n("idyF")},c=n("C7Lr")(o.a,s.a,!1,r,"data-v-24876cd0",null);e.default=c.exports},idyF:function(t,e){}});
//# sourceMappingURL=35.d6a8ae8041d073d3f9c8.js.map