webpackJsonp([13],{Fijd:function(a,t){},Ua1R:function(a,t){},dZ7a:function(a,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("vGYV"),r=e("SQ4B"),i=e("qI5z"),s={name:"BankCard",props:["bankCardVOList"],data:function(){return{untieBankCard:!1,nowCard:{},user:{}}},methods:{setUserInfo:function(){this.user=Object(n.J)("user")&&Object(n.J)("user").userVO},requestUntieBankCard:function(a){this.untieBankCard=!0,this.nowCard=a},handleUntieBankCard:function(){var a=this;r.a.delete("/api/personal/deletebankcard/"+this.nowCard.id+"/"+this.user.id,{}).then(function(t){a.$emit("loadData"),a.untieBankCard=!1,Object(i.a)("success","解绑成功")}).catch(function(a){Object(i.a)("error",a.data)})}},mounted:function(){this.setUserInfo()}},d={render:function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",[e("el-row",{attrs:{gutter:15}},a._l(a.bankCardVOList,function(t){return e("el-col",{key:t.id,attrs:{span:8}},[e("div",{staticClass:"bank-card"},[e("div",{staticClass:"bank-card-title",staticStyle:{padding:"10px",height:"43px"}},[e("img",{staticClass:"bank-card-logo",attrs:{src:t.logoUrl}}),a._v(" "),e("span",{staticStyle:{"font-size":"16px","font-weight":"bold","line-height":"43px"}},[a._v(a._s(t.name))]),a._v(" "),e("el-button",{staticClass:"pull-right",attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(e){return a.requestUntieBankCard(t)}}},[a._v("解绑\n ")])],1),a._v(" "),e("div",{staticClass:"bank-card-detail-wrapper"},[e("div",{staticClass:"bank-card-detail"},[e("div",{staticClass:"bank-card-detail-info"},[a._v(a._s(t.user))]),a._v(" "),e("div",{staticClass:"bank-card-detail-info"},[a._v(a._s(t.number))])])])])])}),1),a._v(" "),e("el-dialog",{attrs:{title:"提示",visible:a.untieBankCard,width:"30%"},on:{"update:visible":function(t){a.untieBankCard=t}}},[e("span",[a._v("确定解绑 "),e("span",{staticStyle:{"font-weight":"bold","font-size":"18px"}},[a._v(a._s(a.nowCard.name))]),a._v(",卡号为:"),e("span",{staticStyle:{"font-weight":"bold","font-size":"18px"}},[a._v(a._s(a.nowCard.number))]),a._v(" 的银行卡吗?")]),a._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(t){a.untieBankCard=!1}}},[a._v("取 消")]),a._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:a.handleUntieBankCard}},[a._v("确 定")])],1)])],1)},staticRenderFns:[]};var o={name:"MyBankCard",components:{BankCard:e("VU/8")(s,d,!1,function(a){e("Ua1R")},"data-v-3aad3c1b",null).exports},data:function(){return{addBankCard:!1,UntieBankCard:!1,form:{name:"",number:"",institution:"",date:"",isPublic:""},bankCardForm:{user:"",number:"",name:""},user:{},bankCardVOList:[],bankCardType:[],rules:{user:[{required:!0,message:"持卡人不可为空",trigger:"blur"}],number:[{required:!0,message:"卡号不可为空",trigger:"blur"}],name:[{required:!0,message:"银行类型不可为空",trigger:"blur"}]}}},methods:{loadData:function(){var a=this;r.a.get("/api/personal/displaybankcard/"+this.user.id).then(function(t){a.bankCardVOList=t.bankCardVOList})},setUserInfo:function(){this.user=Object(n.J)("user")&&Object(n.J)("user").userVO},handleAddBankCard:function(){var a=this;this.$refs.bankCardForm.validate(function(t){t&&r.a.post("/api/personal/addbankcard/"+a.user.id,a.bankCardForm).then(function(t){Object(i.a)("success","添加成功"),a.addBankCard=!1,a.bankCardForm.user="",a.bankCardForm.number="",a.bankCardForm.name="",a.loadData()}).catch(function(a){Object(i.a)("error",a.data)})})},getBankType:function(){var a=this;r.a.get("/api/personal/banktype").then(function(t){a.bankCardType=t.bankLogoVOList})}},mounted:function(){this.setUserInfo(),this.loadData(),this.getBankType()}},l={render:function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",[e("div",{staticClass:"right-qualification"},[e("div",{staticClass:"right-qualification-title"},[e("span",{staticStyle:{"font-size":"18px","font-weight":"bold"}},[a._v("我的银行卡")]),a._v(" "),e("el-button",{staticClass:"pull-right",attrs:{type:"primary",size:"mini"},on:{click:function(t){a.addBankCard=!0}}},[a._v("添加")])],1),a._v(" "),e("div",{staticStyle:{"margin-bottom":"15px"}},[e("BankCard",{attrs:{bankCardVOList:a.bankCardVOList},on:{loadData:a.loadData}})],1)]),a._v(" "),e("el-dialog",{attrs:{title:"新增银行卡",visible:a.addBankCard,width:"30%"},on:{"update:visible":function(t){a.addBankCard=t}}},[e("el-form",{ref:"bankCardForm",attrs:{rules:a.rules,model:a.bankCardForm,"label-width":"80px"}},[e("el-form-item",{attrs:{label:"持卡人",prop:"user"}},[e("el-input",{model:{value:a.bankCardForm.user,callback:function(t){a.$set(a.bankCardForm,"user",t)},expression:"bankCardForm.user"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"卡号",prop:"number"}},[e("el-input",{model:{value:a.bankCardForm.number,callback:function(t){a.$set(a.bankCardForm,"number",t)},expression:"bankCardForm.number"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"银行类型",prop:"name"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择银行卡种类"},model:{value:a.bankCardForm.name,callback:function(t){a.$set(a.bankCardForm,"name",t)},expression:"bankCardForm.name"}},a._l(a.bankCardType,function(a){return e("el-option",{key:a.id,attrs:{label:a.name,value:a.name}})}),1)],1)],1),a._v(" "),e("div",[a._v("\n 银行卡绑定成功后,您将享受以下服务:\n ")]),a._v(" "),e("div",[a._v("①可以申请平台的收益")]),a._v(" "),e("div",[a._v("②可以申请平台的收益")]),a._v(" "),e("div",[a._v("③可以申请平台的收益")]),a._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(t){a.addBankCard=!1}}},[a._v("取 消")]),a._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:a.handleAddBankCard}},[a._v("确认添加")])],1)],1)],1)},staticRenderFns:[]};var u=e("VU/8")(o,l,!1,function(a){e("Fijd")},"data-v-2c02f1a4",null);t.default=u.exports}});