| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-56c3ee8b"],{"08fb":function(a,e,t){"use strict";t.r(e);var r=function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("div",{staticClass:"box"},[t("div",{directives:[{name:"show",rawName:"v-show",value:a.yes,expression:"yes"}],staticClass:"null-page"}),t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[t("span",[a._v("编辑账户")])]),t("div",{directives:[{name:"loading",rawName:"v-loading",value:a.loading,expression:"loading"}]},[t("el-form",{ref:"ruleForm",attrs:{model:a.formData,rules:a.rules,"label-width":"80px"}},[t("el-form-item",{attrs:{label:"姓名",prop:"realname"}},[t("el-input",{staticClass:"ns-len-input",attrs:{placeholder:"请输入真实姓名"},model:{value:a.formData.realname,callback:function(e){a.$set(a.formData,"realname",e)},expression:"formData.realname"}})],1),t("el-form-item",{attrs:{label:"手机",prop:"mobile"}},[t("el-input",{staticClass:"ns-len-input",attrs:{autocomplete:"off",placeholder:"请输入手机号",maxlength:"11"},model:{value:a.formData.mobile,callback:function(e){a.$set(a.formData,"mobile",e)},expression:"formData.mobile"}})],1),t("el-form-item",{attrs:{label:"账号类型",prop:"withdraw_type"}},[t("el-select",{attrs:{placeholder:"请选择账号类型"},model:{value:a.formData.withdraw_type,callback:function(e){a.$set(a.formData,"withdraw_type",e)},expression:"formData.withdraw_type"}},a._l(a.transferType,(function(a,e){return t("el-option",{key:e,attrs:{label:a,value:e,disabled:"wechatpay"==e}})})),1)],1),"bank"==a.formData.withdraw_type?t("el-form-item",{attrs:{label:"银行名称",prop:"branch_bank_name"}},[t("el-input",{staticClass:"ns-len-input",attrs:{autocomplete:"off",placeholder:"请输入银行名称",maxlength:"50"},model:{value:a.formData.branch_bank_name,callback:function(e){a.$set(a.formData,"branch_bank_name",e)},expression:"formData.branch_bank_name"}})],1):a._e(),"wechatpay"!=a.formData.withdraw_type&&a.formData.withdraw_type?t("el-form-item",{attrs:{label:"提现账号",prop:"bank_account"}},[t("el-input",{staticClass:"ns-len-input",attrs:{autocomplete:"off",placeholder:"请输入提现账号",maxlength:"30"},model:{value:a.formData.bank_account,callback:function(e){a.$set(a.formData,"bank_account",e)},expression:"formData.bank_account"}})],1):a._e(),t("el-form-item",[t("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return a.saveAccount("ruleForm")}}},[a._v("保存")])],1)],1)],1)])],1)},n=[],o=t("69f9"),i={name:"account_edit",components:{},data:function(){var a=function(a,e,t){if(!e)return t(new Error("手机号不能为空"));var r=/^1[3|4|5|6|7|8|9][0-9]{9}$/;r.test(e)?t():t(new Error("请输入正确的手机号"))};return{formData:{id:"",realname:"",mobile:"",withdraw_type:"",bank_account:"",branch_bank_name:""},flag:!1,payList:[],loading:!0,index:0,transferType:[],rules:{realname:[{required:!0,message:"请输入真实姓名",trigger:"blur"}],mobile:[{required:!0,validator:a,trigger:"blur"}],withdraw_type:[{required:!0,message:"请选择账号类型",trigger:"change"}],branch_bank_name:[{required:!0,message:"请输入银行名称",trigger:"blur"}],bank_account:[{required:!0,message:"请输入提现账号",trigger:"blur"}]},yes:!0}},created:function(){this.formData.id=this.$route.query.id,this.getTransferType(),this.formData.id&&this.getAccountDetail(this.formData.id)},mounted:function(){var a=this;setTimeout((function(){a.yes=!1}),300)},methods:{getTransferType:function(){var a=this;Object(o["o"])().then((function(e){a.transferType=e.data,a.formData.id||(a.loading=!1)})).catch((function(e){a.formData.id||(a.loading=!1)}))},getAccountDetail:function(a){var e=this;Object(o["b"])({id:this.formData.id}).then((function(a){0==a.code&&a.data&&(e.formData.realname=a.data.realname,e.formData.mobile=a.data.mobile,e.formData.bank_account=a.data.bank_account,e.formData.branch_bank_name=a.data.branch_bank_name,e.formData.withdraw_type=a.data.withdraw_type),e.loading=!1})).catch((function(a){e.loading=!1}))},saveAccount:function(a){var e=this;this.$refs[a].validate((function(a){if(!a)return!1;var t={id:e.formData.id,realname:e.formData.realname,mobile:e.formData.mobile,withdraw_type:e.formData.withdraw_type,bank_account:e.formData.bank_account,branch_bank_name:e.formData.branch_bank_name,url:"add"};e.formData.id&&(t.url="edit"),e.flag||(e.flag=!0,Object(o["l"])(t).then((function(a){0==a.code?e.$router.push({path:"/member/account_list"}):(e.flag=!1,e.$message({message:a.message,type:"warning"}))})).catch((function(a){e.flag=!1,e.$message.error(a.message)})))}))}}},l=i,s=(t("6351"),t("2877")),c=Object(s["a"])(l,r,n,!1,null,"7566ee57",null);e["default"]=c.exports},6351:function(a,e,t){"use strict";var r=t("ae50"),n=t.n(r);n.a},ae50:function(a,e,t){}}]);
- //# sourceMappingURL=chunk-56c3ee8b.8322f3fc.js.map
|