| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7e7a1160"],{"6b02":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"tabs"},[a("div"),a("div",{staticClass:"tabs_btn"},[a("el-button",{staticClass:"greenbg",on:{click:function(t){return e.add()}}},[e._v("新增")]),a("el-button",{staticClass:"greenbg",on:{click:function(t){return e.refresh()}}},[e._v("刷新")])],1)]),a("div",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,border:"","cell-style":{textAlign:"center"},"header-cell-style":{textAlign:"center"}}},[a("el-table-column",{attrs:{prop:"id",label:"ID"}}),a("el-table-column",{attrs:{prop:"name",label:"名称"}}),a("el-table-column",{attrs:{prop:"currency",label:"法币"}}),a("el-table-column",{attrs:{prop:"mode",label:"模式"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(1==t.row.mode?"三方支付":2==t.row.mode?"代收代付":""))])])]}}])}),a("el-table-column",{attrs:{prop:"type",label:"通道类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(1==t.row.type?"只支持充值":2==t.row.type?"只支持提现":3==t.row.type?"支持充值和提现":""))])])]}}])}),a("el-table-column",{attrs:{prop:"recharge_fee",label:"购买手续费(%)"}}),a("el-table-column",{attrs:{prop:"withdrawal_fee",label:"提现手续费(%)"}}),a("el-table-column",{attrs:{label:"充值金额限制"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v("最大:"+e._s(t.row.max_recharge))]),a("p",[e._v("最小:"+e._s(t.row.min_recharge))])])]}}])}),a("el-table-column",{attrs:{label:"提现金额限制"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v("最大:"+e._s(t.row.max_withdrawal))]),a("p",[e._v("最小:"+e._s(t.row.min_withdrawal))])])]}}])}),a("el-table-column",{attrs:{prop:"remark",label:"备注"}}),a("el-table-column",{attrs:{prop:"status",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s("0"==t.row.status?"禁用":"1"==t.row.status?"启用":"禁用"))])])]}}])}),a("el-table-column",{attrs:{prop:"updated_by",label:"更新人"}}),a("el-table-column",{attrs:{label:"时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v("创建时间:"+e._s(e.timestampToDatetime(t.row.created_at)))]),a("p",[e._v("更新时间:"+e._s(e.timestampToDatetime(t.row.updated_at)))])])]}}])}),a("el-table-column",{attrs:{prop:"closing_at",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"greenbg",on:{click:function(a){return e.edit(t.row)}}},[e._v("编辑")]),a("el-button",{attrs:{type:"danger"},on:{click:function(a){return e.delClick(t.row)}}},[e._v("删除")])]}}])})],1)],1),a("el-dialog",{attrs:{title:"编辑",visible:e.editPopup,width:"60%","before-close":e.editClose},on:{"update:visible":function(t){e.editPopup=t}}},[a("div",[a("p",[e._v("通道名称")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.name,callback:function(t){e.$set(e.data,"name",t)},expression:"data.name"}}),a("p",[e._v("通道代码")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.code,callback:function(t){e.$set(e.data,"code",t)},expression:"data.code"}}),a("p",[e._v("通道类型")]),a("el-select",{attrs:{clearable:"",placeholder:"请选择类型"},model:{value:e.data.type,callback:function(t){e.$set(e.data,"type",t)},expression:"data.type"}},e._l(e.type,(function(e){return a("el-option",{key:e.id,attrs:{label:e.text,value:e.id}})})),1),a("p",[e._v("模式")]),a("el-select",{attrs:{clearable:"",placeholder:"请选择模式"},model:{value:e.data.mode,callback:function(t){e.$set(e.data,"mode",t)},expression:"data.mode"}},e._l(e.mode,(function(e){return a("el-option",{key:e.id,attrs:{label:e.text,value:e.id}})})),1),a("p",[e._v("法币")]),a("el-select",{attrs:{clearable:"",placeholder:"请选择币种"},model:{value:e.data.currency,callback:function(t){e.$set(e.data,"currency",t)},expression:"data.currency"}},e._l(e.coinList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.currency,value:e.currency}})})),1),a("p",[e._v("商户ID")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.merchent_id,callback:function(t){e.$set(e.data,"merchent_id",t)},expression:"data.merchent_id"}}),a("p",[e._v("充值手续费(%)")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.recharge_fee,callback:function(t){e.$set(e.data,"recharge_fee",t)},expression:"data.recharge_fee"}}),a("p",[e._v("提现手续费(%)")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.withdrawal_fee,callback:function(t){e.$set(e.data,"withdrawal_fee",t)},expression:"data.withdrawal_fee"}}),a("p",[e._v("充值最大金额")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.max_recharge,callback:function(t){e.$set(e.data,"max_recharge",t)},expression:"data.max_recharge"}}),a("p",[e._v("充值最小金额")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.min_recharge,callback:function(t){e.$set(e.data,"min_recharge",t)},expression:"data.min_recharge"}}),a("p",[e._v("提现最大金额")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.max_withdrawal,callback:function(t){e.$set(e.data,"max_withdrawal",t)},expression:"data.max_withdrawal"}}),a("p",[e._v("提现最小金额")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.min_withdrawal,callback:function(t){e.$set(e.data,"min_withdrawal",t)},expression:"data.min_withdrawal"}}),a("p",[e._v("备注")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.remark,callback:function(t){e.$set(e.data,"remark",t)},expression:"data.remark"}}),a("p",[e._v("参数1")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.value1,callback:function(t){e.$set(e.data,"value1",t)},expression:"data.value1"}}),a("p",[e._v("参数2")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.value2,callback:function(t){e.$set(e.data,"value2",t)},expression:"data.value2"}}),a("p",[e._v("参数3")]),a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.data.value3,callback:function(t){e.$set(e.data,"value3",t)},expression:"data.value3"}}),a("p",[e._v("状态")]),a("el-switch",{attrs:{"active-text":"开启","inactive-text":"关闭"},model:{value:e.data.status,callback:function(t){e.$set(e.data,"status",t)},expression:"data.status"}})],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.editPopup=!1}}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.editSubmit}},[e._v("确认")])],1)]),a("Paginate",{attrs:{page:e.params.page,total:e.total},on:{currentChange:e.handleCurrentChange,sizeChange:e.handleSizeChange}})],1)},r=[],l=a("b0bd"),i=a("0238"),s=a("c466"),c={name:"fabi",components:{Paginate:i["a"]},data:function(){return{tableData:[],loading:!1,coinList:[],mode:[{id:"1",text:"三方支付"},{id:"2",text:"代收代付"}],type:[{id:"1",text:"只支持充值"},{id:"2",text:"只支持提现"},{id:"3",text:"支持充值和提现"}],params:{page:1,page_size:this.$store.state.attr.pageSize},data:{mode:"1",currency:"",code:"",name:"",type:"",merchent_id:"",withdrawal_fee:0,recharge_fee:0,min_recharge:0,max_recharge:0,min_withdrawal:0,max_withdrawal:0,remark:"",value1:"",value2:"",value3:"",status:!1},total:0,addOrEdit:1,editPopup:!1}},computed:{},watch:{},mounted:function(){this.finstall(),this.getCurrency()},methods:{getCurrency:function(){var e=this;Object(l["e"])().then((function(t){e.coinList=t.data}))},finstall:function(){var e=this,t={page:this.cal.accSub(this.params.page,1),page_size:this.params.page_size};Object(l["k"])(t).then((function(t){200===t.code?(e.total=parseInt(t.data.listTotalCount),e.tableData=t.data.list):e.$message.error(t.message),e.loading=!1}))},refresh:function(){this.tableData=[],this.finstall(),this.getCurrency()},add:function(){this.data={mode:"1",currency:"",code:"",name:"",type:"",merchent_id:"",withdrawal_fee:0,recharge_fee:0,min_recharge:0,max_recharge:0,min_withdrawal:0,max_withdrawal:0,remark:"",value1:"",value2:"",value3:"",status:!1},this.addOrEdit=1,this.editPopup=!0},edit:function(e){this.data=e,"0"==e.status?this.data.status=!1:this.data.status=!0,this.addOrEdit=2,this.editPopup=!0},editSubmit:function(){var e=this,t=this.data;t.status?t.status="1":t.status="0",1==this.addOrEdit?Object(l["h"])(t,t).then((function(t){e.$message({type:"success",message:t.message}),e.refresh(),e.editClose()})).catch((function(){e.$message({type:"info",message:result.message})})):Object(l["j"])(t,t).then((function(t){e.$message({type:"success",message:t.message}),e.refresh(),e.editClose()})).catch((function(){e.$message({type:"info",message:result.message})}))},editClose:function(){this.data={mode:"1",currency:"",code:"",name:"",type:"",merchent_id:"",withdrawal_fee:0,recharge_fee:0,min_recharge:0,max_recharge:0,min_withdrawal:0,max_withdrawal:0,remark:"",value1:"",value2:"",value3:"",status:!1},this.editPopup=!1},delClick:function(e){var t=this;this.$confirm("确定删除此通道?","注意",{confirmButtonText:"确定删除",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:e.id};Object(l["i"])(a,a).then((function(e){t.$message({type:"success",message:e.message}),t.refresh()})).catch((function(){t.$message({type:"info",message:result.message})}))})).catch((function(){}))},timestampToDatetime:function(e){return Object(s["a"])(e,!0)},handleCurrentChange:function(e){this.params.page=e,this.finstall()},handleSizeChange:function(e,t){this.params.page_size=e,this.finstall()}},beforeCreate:function(){},created:function(){},beforeMount:function(){},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},o=c,u=(a("7bfc"),a("2877")),d=Object(u["a"])(o,n,r,!1,null,"0771abde",null);t["default"]=d.exports},"7bfc":function(e,t,a){"use strict";var n=a("7fc8"),r=a.n(n);r.a},"7fc8":function(e,t,a){},b0bd:function(e,t,a){"use strict";a.d(t,"e",(function(){return r})),a.d(t,"f",(function(){return l})),a.d(t,"g",(function(){return i})),a.d(t,"l",(function(){return s})),a.d(t,"a",(function(){return c})),a.d(t,"k",(function(){return o})),a.d(t,"h",(function(){return u})),a.d(t,"j",(function(){return d})),a.d(t,"i",(function(){return p})),a.d(t,"d",(function(){return f})),a.d(t,"c",(function(){return m})),a.d(t,"b",(function(){return h}));var n=a("b775");function r(){return Object(n["b"])({url:"/fabi/index",method:"get"})}function l(e){return Object(n["b"])({url:"/fabi/recharge",method:"get",params:e})}function i(e){return Object(n["b"])({url:"/fabi/withdraw",method:"get",params:e})}function s(e,t){return Object(n["b"])({url:"/fabi/withdraw-update",method:"put",params:e,data:t})}function c(e,t){return Object(n["b"])({url:"/fabi/update",method:"put",params:e,data:t})}function o(e){return Object(n["b"])({url:"/gate/index",method:"get",params:e})}function u(e,t){return Object(n["b"])({url:"/gate/create",method:"post",params:e,data:t})}function d(e,t){return Object(n["b"])({url:"/gate/update",method:"put",params:e,data:t})}function p(e,t){return Object(n["b"])({url:"/gate/delete",method:"delete",params:e,data:t})}function f(e){return Object(n["b"])({url:"/fabi/bank",method:"get",params:e})}function m(e){return Object(n["b"])({url:"/fabi/confirm",method:"post",data:e})}function h(e){return Object(n["b"])({url:"/fabi/cancel",method:"post",data:e})}}}]);
|