chunk-fb5a2db0.cc4233bd.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fb5a2db0"],{"0b80":function(e,t,a){"use strict";a("b53a")},"2e16":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"new-app-container layout-vertical"},[a("YMTableSearch",{attrs:{loading:e.loading,"search-form":e.searchForm},on:{onValueChange:e.onValueChange,submit:e.onSubmit}}),a("YMTable",{ref:"table",attrs:{apis:e.apis,columns:e.columns,"custom-style":{height:"calc(100vh - 200px)"},index:!0,"rows-actions":e.rowsActions,selection:!1,"show-summary":!1,"table-key":1,"table-options":e.tableOptions},scopedSlots:e._u([{key:"game_info",fn:function(t){var r=t.row;return[r?a("div",{staticStyle:{"line-height":"1.5","font-size":"12px",height:"70px",display:"flex","flex-direction":"column","justify-content":"center"}},[a("div",[e._v(e._s(r.detail?r.detail.game_time:"--"))]),a("div",{staticStyle:{"font-weight":"bold",color:"#303133"}},[e._v(" "+e._s(r.home_team||"--")+" vs "+e._s(r.guest_team||"--")+" ")]),a("div",{staticStyle:{opacity:"0",height:"0px"}},[e._v("1")]),r.detail&&r.detail.fixture_status?a("div",[e._v(" 赛况: "),r.detail&&r.detail.fixture_status?a("span",[e._v(e._s(r.detail&&r.detail.fixture_status?r.detail.fixture_status.long:"--"))]):e._e(),r.detail&&r.detail.fixture_status?a("span",[e._v(" ("+e._s(r.detail&&r.detail.fixture_status?r.detail.fixture_status.seconds:"--")+") ")]):e._e()]):e._e(),a("div",[r.detail&&r.detail.half_score?a("span",[e._v("半场: "+e._s(r.detail?r.detail.half_score:"--"))]):e._e(),r.detail&&r.detail.score&&r.detail.half_score?a("span",[e._v(" / ")]):e._e(),r.detail&&r.detail.score?a("span",[e._v(" 全场: "+e._s(r.detail?r.detail.score:"--")+" ")]):e._e()])]):e._e()]}},{key:"odd_name",fn:function(t){var r=t.row;return[r?a("div",{staticStyle:{"line-height":"1.5","font-size":"12px",height:"70px"}},[a("div",{staticStyle:{"font-weight":"bold",color:"#303133"}},[e._v(e._s(r.odd_name||"--"))]),a("div",[e._v("玩法: "+e._s(r.odd_value||"--"))]),a("div",{staticStyle:{opacity:"0",height:"0px"}},[e._v("1")]),a("div",[e._v("盘口: "+e._s(r.handicap||"--"))]),a("div",[e._v("赔率: "+e._s(r.odd||"--"))])]):e._e()]}}])}),a("el-dialog",{attrs:{visible:e.debitDialogVisible,title:"扣款操作",width:"450px"},on:{"update:visible":function(t){e.debitDialogVisible=t},close:e.resetDebitForm}},[a("el-form",{ref:"debitForm",attrs:{model:e.debitForm,rules:e.debitRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"扣款金额",prop:"amount"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{min:.01,precision:2,placeholder:"请输入扣款金额"},model:{value:e.debitForm.amount,callback:function(t){e.$set(e.debitForm,"amount",t)},expression:"debitForm.amount"}})],1),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{rows:3,placeholder:"请输入备注信息(选填)",type:"textarea"},model:{value:e.debitForm.remark,callback:function(t){e.$set(e.debitForm,"remark",t)},expression:"debitForm.remark"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.debitDialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{loading:e.loading,type:"primary"},on:{click:e.submitDebitOrder}},[e._v("确 定")])],1)],1),a("el-dialog",{attrs:{visible:e.rechargeDialogVisible,title:"充值操作",width:"450px"},on:{"update:visible":function(t){e.rechargeDialogVisible=t},close:e.resetRechargeForm}},[a("el-form",{ref:"rechargeForm",attrs:{model:e.rechargeForm,rules:e.rechargeRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"充值金额",prop:"amount"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{min:.01,precision:2,placeholder:"请输入充值金额"},model:{value:e.rechargeForm.amount,callback:function(t){e.$set(e.rechargeForm,"amount",t)},expression:"rechargeForm.amount"}})],1),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{rows:3,placeholder:"请输入备注信息(选填)",type:"textarea"},model:{value:e.rechargeForm.remark,callback:function(t){e.$set(e.rechargeForm,"remark",t)},expression:"rechargeForm.remark"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.rechargeDialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{loading:e.loading,type:"primary"},on:{click:e.submitRechargeOrder}},[e._v("确 定")])],1)],1)],1)},o=[],l=a("8802"),i=a("41cd1"),s=(a("b15b"),a("b138"),a("7e1e")),n={data:function(){var e=this;return{loading:!1,queryData:{},searchForm:[{label:"ID",type:"input",prop:"id",clearable:!0},{label:"订单号",prop:"order_id",type:"input"},{label:"会员昵称",type:"input",prop:"first_name",clearable:!0},{label:"会员ID",prop:"member_id",type:"input",clearable:!0},{label:"赛事ID",prop:"issue",type:"input"},{label:"支付状态",prop:"pay_status",type:"select",options:[{label:"待付款",value:0},{label:"已支付",value:1}]},{label:"订单状态",prop:"status",type:"select",options:[{label:"已取消",value:-1},{label:"下注中",value:0},{label:"下注成功",value:1}]},{label:"中奖状态",prop:"is_win",type:"select",options:[{label:"未中奖",value:0},{label:"已中奖",value:1},{label:"和局",value:2}]},{label:"结算状态",prop:"settlement_status",type:"select",options:[{label:"未结算",value:0},{label:"已结算",value:1},{label:"已取消",value:2}]},{label:"退款状态",prop:"return_status",type:"select",options:[{label:"未退款",value:0},{label:"申请中",value:1},{label:"已同意",value:2},{label:"已驳回",value:3}]}],apis:{list:{url:"order/list",dataParam:"data.data",resultParam:"data",init:!1}},tableOptions:{add:{show:!1}},columns:[{label:"ID",prop:"id"},{label:"订单号",prop:"order_id",width:190,link:!0,click:function(t){e.$router.push({name:"orderDetail",query:{order_id:t.order_id}})}},{label:"会员ID",prop:"member_id",width:120},{label:"会员昵称",prop:"first_name",width:150},{label:"赛事ID",prop:"issue",width:120},{label:"赛事信息",prop:"game_info",width:220,slot:!0,className:"custom-game-col"},{label:"滚球",prop:"is_roll",width:80,html:!0,method:function(e){var t=1===e.is_roll,a=t?"#E6A23C":"#909399",r=t?"滚球":"非滚球";return'<span style="color: '.concat(a,'">').concat(r,"</span>")}},{label:"玩法",prop:"odd_name",width:180,slot:!0},{label:"订单状态",prop:"status",width:90,html:!0,method:function(e){var t={0:{text:"下注中",color:"#909399"},1:{text:"下注成功",color:"#67C23A"},2:{text:"已退款",color:"#E6A23C"},"-1":{text:"已取消",color:"#F56C6C"}},a=t[e.status];return a?'<span style="color: '.concat(a.color,'">').concat(a.text,"</span>"):"--"}},{label:"下注失败的原因",prop:"failure"},{label:"下注金额(RMB)",prop:"amount",width:100},{label:"派奖金额(RMB)",prop:"win_amount",width:100},{label:"盈亏金额(RMB)",prop:"profit_and_loss",width:100},{label:"中奖状态",prop:"is_win",width:90,html:!0,method:function(e){var t={0:{text:"未中奖",color:"#909399"},1:{text:"已中奖",color:"#67C23A"},2:{text:"和局",color:"#E6A23C"}},a=t[e.is_win];return a?'<span style="color: '.concat(a.color,'">').concat(a.text,"</span>"):"--"}},{label:"结算状态",prop:"settlement_status",width:90,html:!0,method:function(e){var t={0:{text:"未结算",color:"#909399"},1:{text:"已结算",color:"#67C23A"},2:{text:"已取消",color:"#F56C6C"}},a=t[e.settlement_status];return a?'<span style="color: '.concat(a.color,'">').concat(a.text,"</span>"):"--"}},{label:"支付状态",prop:"pay_status",width:90,html:!0,method:function(e){var t=1===e.pay_status,a=t?"#67C23A":"#909399",r=t?"已支付":"待付款";return'<span style="color: '.concat(a,'">').concat(r,"</span>")}},{label:"支付时间",prop:"pay_time",width:160},{label:"退款状态",prop:"return_status",width:100,html:!0,method:function(e){var t={0:{text:"未退款",color:"#909399"},1:{text:"退款申请中",color:"#E6A23C"},2:{text:"退款已同意",color:"#67C23A"},3:{text:"退款已驳回",color:"#F56C6C"}},a=t[e.return_status];return a?'<span style="color: '.concat(a.color,'">').concat(a.text,"</span>"):"--"}},{label:"备注",prop:"remark"},{label:"退款申请时间",prop:"return_apply_time",width:160},{label:"退款处理时间",prop:"return_operation_time",width:160},{label:"创建时间",prop:"create_time",width:160}],rowsActions:[{key:"refund",label:"退款",disabled:function(e){var t=1===e.pay_status&&0===e.settlement_status&&1===e.status&&0===e.return_status;return!t},method:function(t){e.handleRefund(t)}},{key:"topUp",label:"充值",disabled:function(e){var t=1===e.pay_status;return!t},method:function(t){e.handleWalletOrderRecharging(t)}},{key:"deduction",label:"扣款",disabled:function(e){var t=1===e.pay_status;return!t},method:function(t){e.handleWalletOrderDebiting(t)}}],debitDialogVisible:!1,debitForm:{amount:void 0,remark:"",order_id:"",order_type:"sport"},debitRules:{amount:[{required:!0,message:"请输入扣款金额",trigger:"blur"}]},rechargeDialogVisible:!1,rechargeForm:{amount:void 0,remark:"",order_id:"",order_type:"sport"},rechargeRules:{amount:[{required:!0,message:"请输入充值金额",trigger:"blur"}]}}},mounted:function(){this.onSubmit()},methods:{onValueChange:function(e){},onSubmit:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.queryData=e,this.$refs.table.getList(e)},handleRefund:function(e){var t=this;this.$confirm("确定要对订单号 ".concat(e.order_id," 进行退款操作吗?"),"退款确认",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(i["a"])(Object(l["a"])().m((function a(){var r,o;return Object(l["a"])().w((function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,t.loading=!0,a.n=1,Object(s["T"])({id:[e.id]});case 1:r=a.v,0===r.code?(t.$message.success("退款成功"),t.onSubmit(t.queryData)):t.$message.error(r.msg||"退款失败"),a.n=3;break;case 2:a.p=2,o=a.v,console.error(o),t.$message.error("退款请求异常");case 3:return a.p=3,t.loading=!1,a.f(3);case 4:return a.a(2)}}),a,null,[[0,2,3,4]])})))).catch((function(){}))},handleWalletOrderDebiting:function(e){this.debitForm={amount:void 0,remark:"",order_id:e.id,order_type:"sport"},this.debitDialogVisible=!0},submitDebitOrder:function(){var e=this;this.$refs.debitForm.validate(function(){var t=Object(i["a"])(Object(l["a"])().m((function t(a){var r,o;return Object(l["a"])().w((function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=6;break}return t.p=1,e.loading=!0,t.n=2,Object(s["Fb"])(e.debitForm);case 2:r=t.v,0===r.code||r.success?(e.$message.success("扣款成功"),e.debitDialogVisible=!1,e.onSubmit(e.queryData)):e.$message.error(r.msg||"扣款失败"),t.n=4;break;case 3:t.p=3,o=t.v,console.error(o),e.$message.error("扣款请求异常");case 4:return t.p=4,e.loading=!1,t.f(4);case 5:t.n=7;break;case 6:return t.a(2,!1);case 7:return t.a(2)}}),t,null,[[1,3,4,5]])})));return function(e){return t.apply(this,arguments)}}())},resetDebitForm:function(){this.$refs.debitForm&&this.$refs.debitForm.resetFields()},handleWalletOrderRecharging:function(e){this.rechargeForm={amount:void 0,remark:"",order_id:e.id,order_type:"sport"},this.rechargeDialogVisible=!0},submitRechargeOrder:function(){var e=this;this.$refs.rechargeForm.validate(function(){var t=Object(i["a"])(Object(l["a"])().m((function t(a){var r,o;return Object(l["a"])().w((function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=6;break}return t.p=1,e.loading=!0,t.n=2,Object(s["Gb"])(e.rechargeForm);case 2:r=t.v,0===r.code||r.success?(e.$message.success("充值成功"),e.rechargeDialogVisible=!1,e.onSubmit(e.queryData)):e.$message.error(r.msg||"充值失败"),t.n=4;break;case 3:t.p=3,o=t.v,console.error(o),e.$message.error("充值请求异常");case 4:return t.p=4,e.loading=!1,t.f(4);case 5:t.n=7;break;case 6:return t.a(2,!1);case 7:return t.a(2)}}),t,null,[[1,3,4,5]])})));return function(e){return t.apply(this,arguments)}}())},resetRechargeForm:function(){this.$refs.rechargeForm&&this.$refs.rechargeForm.resetFields()}}},c=n,u=(a("0b80"),a("1805")),d=Object(u["a"])(c,r,o,!1,null,"35191656",null);t["default"]=d.exports},b53a:function(e,t,a){}}]);