| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1a6ec6f0"],{"115c":function(t,e,a){"use strict";a.d(e,"h",(function(){return n})),a.d(e,"j",(function(){return o})),a.d(e,"i",(function(){return r})),a.d(e,"k",(function(){return s})),a.d(e,"l",(function(){return l})),a.d(e,"g",(function(){return c})),a.d(e,"c",(function(){return u})),a.d(e,"f",(function(){return d})),a.d(e,"e",(function(){return p})),a.d(e,"d",(function(){return f})),a.d(e,"m",(function(){return _})),a.d(e,"a",(function(){return m})),a.d(e,"b",(function(){return h}));var i=a("b775");function n(t){return Object(i["b"])({url:"/sport/index",method:"get",params:t})}function o(t,e){return Object(i["b"])({url:"/sport/update",method:"put",params:t,data:e})}function r(t){return Object(i["b"])({url:"/sport/refresh",method:"get",params:t})}function s(t){return Object(i["b"])({url:"/sport/settlement",method:"post",data:t})}function l(t){return Object(i["b"])({url:"/sport/resettlement",method:"post",data:t})}function c(t){return Object(i["b"])({url:"/sport-league/index",method:"get",params:t})}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"json";return Object(i["b"])({url:"/sport-order/index",method:"get",responseType:e,params:t})}function d(t){return Object(i["b"])({url:"/sport-task-order/index",method:"get",params:t})}function p(t){return Object(i["b"])({url:"/sport-task-member/index",method:"get",params:t})}function f(t){return Object(i["b"])({url:"/sport-task/index",method:"get",params:t})}function _(t,e){return Object(i["b"])({url:"/sport-task/update",method:"PATCH",params:t,data:e})}function m(t){return Object(i["b"])({url:"/sport-task/create",method:"POST",data:t})}function h(t){return Object(i["b"])({url:"/sport-task/delete",method:"DELETE",params:t})}},7122:function(t,e,a){"use strict";var i=a("912e"),n=a.n(i);n.a},"912e":function(t,e,a){},"93a6":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"presentForm"},[a("div",{staticClass:"leftFrom"},[a("el-form",{ref:"params",staticClass:"formList",attrs:{model:t.params,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"赛程期号"}},[a("el-input",{attrs:{placeholder:"请输入期号",onkeyup:"this.value=this.value.replace(/[, ]/g,'')"},model:{value:t.params.data_id,callback:function(e){t.$set(t.params,"data_id","string"===typeof e?e.trim():e)},expression:"params.data_id"}})],1),a("el-form-item",{attrs:{label:"联赛"}},[a("el-input",{attrs:{placeholder:"请输入联赛名"},model:{value:t.params.league,callback:function(e){t.$set(t.params,"league","string"===typeof e?e.trim():e)},expression:"params.league"}})],1),a("el-form-item",{attrs:{label:"是否滚球"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.params.is_roll,callback:function(e){t.$set(t.params,"is_roll",e)},expression:"params.is_roll"}},t._l(t.options,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"请选择时间"}},[a("el-date-picker",{attrs:{type:"datetimerange","value-format":"timestamp","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["00:00:00","23:59:59"]},on:{change:t.changeTime},model:{value:t.timeData,callback:function(e){t.timeData=e},expression:"timeData"}})],1)],1)],1),a("div",{staticClass:"inquire"},[a("el-button",{staticClass:"demand",attrs:{type:"primary"},on:{click:t.inquire}},[t._v("查询")])],1)]),a("div",{staticClass:"tabs"},[a("div"),a("div",{staticClass:"tabs_btn"},[a("el-button",{staticClass:"greenbg",on:{click:function(e){return t.refresh()}}},[t._v("刷新")])],1)]),a("div",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.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:"data_id",label:"期号"}}),a("el-table-column",{attrs:{prop:"league",label:"联赛"}}),a("el-table-column",{attrs:{prop:"game_time",label:"比赛时间"}}),a("el-table-column",{attrs:{prop:"home_team",label:"主队名"}}),a("el-table-column",{attrs:{prop:"guest_team",label:"客队名"}}),a("el-table-column",{attrs:{label:"比分"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("p",[t._v("半场比分:"+t._s(e.row.half_score))]),a("p",[t._v("全场比分:"+t._s(e.row.score))])]}}])}),a("el-table-column",{attrs:{prop:"state",label:"赛程状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(" "+t._s(0==e.row.state?"未开始":1==e.row.state?"进行中":2==e.row.state?"已结束":3==e.row.state?"延期":"取消")+" ")])]}}])}),a("el-table-column",{attrs:{prop:"status",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{staticStyle:{height:"60px"},attrs:{"active-text":"上架","inactive-text":"下架"},on:{change:function(a){return t.statusChange(e.row.status,e.row.id)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),a("el-table-column",{attrs:{prop:"is_roll",label:"是否滚球"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{staticStyle:{height:"60px"},attrs:{"active-text":"开启","inactive-text":"关闭"},on:{change:function(a){return t.rollChange(e.row.is_roll,e.row.id)}},model:{value:e.row.is_roll,callback:function(a){t.$set(e.row,"is_roll",a)},expression:"scope.row.is_roll"}})]}}])}),a("el-table-column",{attrs:{label:"让球"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{staticStyle:{height:"60px"},attrs:{"active-text":"开启","inactive-text":"关闭"},on:{change:function(a){return t.wfChange(e.row.is_handicap,e.row.id,"is_handicap")}},model:{value:e.row.is_handicap,callback:function(a){t.$set(e.row,"is_handicap",a)},expression:"scope.row.is_handicap"}})]}}])}),a("el-table-column",{attrs:{label:"大小球"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{staticStyle:{height:"60px"},attrs:{"active-text":"开启","inactive-text":"关闭"},on:{change:function(a){return t.wfChange(e.row.is_over_under,e.row.id,"is_over_under")}},model:{value:e.row.is_over_under,callback:function(a){t.$set(e.row,"is_over_under",a)},expression:"scope.row.is_over_under"}})]}}])}),a("el-table-column",{attrs:{label:"独赢"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{staticStyle:{height:"60px"},attrs:{"active-text":"开启","inactive-text":"关闭"},on:{change:function(a){return t.wfChange(e.row.is_duying,e.row.id,"is_duying")}},model:{value:e.row.is_duying,callback:function(a){t.$set(e.row,"is_duying",a)},expression:"scope.row.is_duying"}})]}}])}),a("el-table-column",{attrs:{label:"波胆"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{staticStyle:{height:"60px"},attrs:{"active-text":"开启","inactive-text":"关闭"},on:{change:function(a){return t.wfChange(e.row.is_correct_core,e.row.id,"is_correct_core")}},model:{value:e.row.is_correct_core,callback:function(a){t.$set(e.row,"is_correct_core",a)},expression:"scope.row.is_correct_core"}})]}}])}),a("el-table-column",{attrs:{label:"单双"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{staticStyle:{height:"60px"},attrs:{"active-text":"开启","inactive-text":"关闭"},on:{change:function(a){return t.wfChange(e.row.is_odd_even,e.row.id,"is_odd_even")}},model:{value:e.row.is_odd_even,callback:function(a){t.$set(e.row,"is_odd_even",a)},expression:"scope.row.is_odd_even"}})]}}])}),a("el-table-column",{attrs:{label:"总进球"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{staticStyle:{height:"60px"},attrs:{"active-text":"开启","inactive-text":"关闭"},on:{change:function(a){return t.wfChange(e.row.is_total_goal,e.row.id,"is_total_goal")}},model:{value:e.row.is_total_goal,callback:function(a){t.$set(e.row,"is_total_goal",a)},expression:"scope.row.is_total_goal"}})]}}])}),a("el-table-column",{attrs:{label:"总开关"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{staticStyle:{height:"60px"},attrs:{"active-text":"开启","inactive-text":"关闭"},on:{change:function(a){return t.wfChange(e.row.is_locked,e.row.id,"is_locked")}},model:{value:e.row.is_locked,callback:function(a){t.$set(e.row,"is_locked",a)},expression:"scope.row.is_locked"}})]}}])}),a("el-table-column",{attrs:{prop:"closing_at",label:"时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("p",[t._v("更新时间:"+t._s(t.timestampToDatetime(e.row.updated_at)))]),a("p",[t._v("创建时间:"+t._s(t.timestampToDatetime(e.row.created_at)))])])]}}])}),a("el-table-column",{attrs:{prop:"closing_at",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{staticClass:"greenbg",on:{click:function(a){return t.edit(e.row)}}},[t._v("编辑")]),2==e.row.state?a("el-button",{staticClass:"greenbg",on:{click:function(a){return t.settlement(e.row)}}},[t._v("结算")]):t._e(),2==e.row.state?a("el-button",{staticClass:"greenbg",on:{click:function(a){return t.again(e.row)}}},[t._v("重新结算")]):t._e(),a("el-button",{staticClass:"greenbg",on:{click:function(a){return t.refreshOdds(e.row)}}},[t._v("刷新赔率")])]}}])})],1),a("Paginate",{attrs:{page:t.params.page,total:t.total},on:{currentChange:t.handleCurrentChange,sizeChange:t.handleSizeChange}})],1),a("el-dialog",{attrs:{title:"编辑",visible:t.editPopup,width:"60%","before-close":t.editClose},on:{"update:visible":function(e){t.editPopup=e}}},[a("div",[a("p",[t._v("赛事:"+t._s(t.editInfo.league))]),a("p",[t._v("比赛:"+t._s(t.editInfo.home_team)+" VS "+t._s(t.editInfo.guest_team))]),a("p",[t._v("比赛时间:"+t._s(t.editInfo.game_time))]),a("div",[t._v(" 比赛状态: "),a("el-select",{attrs:{clearable:"",placeholder:"比赛状态"},model:{value:t.editInfo.state,callback:function(e){t.$set(t.editInfo,"state",e)},expression:"editInfo.state"}},t._l(t.stateArr,(function(t){return a("el-option",{key:t.id,attrs:{label:t.text,value:t.id}})})),1)],1),a("p",[t._v("半场比分: "),a("el-input",{staticStyle:{"margin-top":"10px"},attrs:{placeholder:"请输入半场比分,如:1-1",onkeyup:"this.value=this.value.replace(/[, ]/g,'')"},model:{value:t.editInfo.half_score,callback:function(e){t.$set(t.editInfo,"half_score","string"===typeof e?e.trim():e)},expression:"editInfo.half_score"}})],1),a("p",[t._v("全场比分: "),a("el-input",{staticStyle:{"margin-top":"10px"},attrs:{placeholder:"请输入全场比分,如:1-1",onkeyup:"this.value=this.value.replace(/[, ]/g,'')"},model:{value:t.editInfo.score,callback:function(e){t.$set(t.editInfo,"score","string"===typeof e?e.trim():e)},expression:"editInfo.score"}})],1),a("p",[t._v("让球限额: "),a("el-input",{staticStyle:{"margin-top":"10px"},attrs:{placeholder:"请输入让球限额,如:5-1000",onkeyup:"this.value=this.value.replace(/[, ]/g,'')"},model:{value:t.editInfo.handicap_limit,callback:function(e){t.$set(t.editInfo,"handicap_limit","string"===typeof e?e.trim():e)},expression:"editInfo.handicap_limit"}})],1),a("p",[t._v("大小球限额: "),a("el-input",{staticStyle:{"margin-top":"10px"},attrs:{placeholder:"请输入大小球限额,如:5-1000",onkeyup:"this.value=this.value.replace(/[, ]/g,'')"},model:{value:t.editInfo.over_under_limit,callback:function(e){t.$set(t.editInfo,"over_under_limit","string"===typeof e?e.trim():e)},expression:"editInfo.over_under_limit"}})],1),a("p",[t._v("单双限额: "),a("el-input",{staticStyle:{"margin-top":"10px"},attrs:{placeholder:"请输入单双限额,如:5-1000",onkeyup:"this.value=this.value.replace(/[, ]/g,'')"},model:{value:t.editInfo.odd_even_limit,callback:function(e){t.$set(t.editInfo,"odd_even_limit","string"===typeof e?e.trim():e)},expression:"editInfo.odd_even_limit"}})],1),a("p",[t._v("波胆限额: "),a("el-input",{staticStyle:{"margin-top":"10px"},attrs:{placeholder:"请输入波胆限额,如:5-1000",onkeyup:"this.value=this.value.replace(/[, ]/g,'')"},model:{value:t.editInfo.correct_core_limit,callback:function(e){t.$set(t.editInfo,"correct_core_limit","string"===typeof e?e.trim():e)},expression:"editInfo.correct_core_limit"}})],1),a("p",[t._v("总进球限额: "),a("el-input",{staticStyle:{"margin-top":"10px"},attrs:{placeholder:"请输入总进球限额,如:5-1000",onkeyup:"this.value=this.value.replace(/[, ]/g,'')"},model:{value:t.editInfo.total_goal_limit,callback:function(e){t.$set(t.editInfo,"total_goal_limit","string"===typeof e?e.trim():e)},expression:"editInfo.total_goal_limit"}})],1),a("p",[t._v("独赢限额: "),a("el-input",{staticStyle:{"margin-top":"10px"},attrs:{placeholder:"请输入独赢限额,如:5-1000",onkeyup:"this.value=this.value.replace(/[, ]/g,'')"},model:{value:t.editInfo.duying_limit,callback:function(e){t.$set(t.editInfo,"duying_limit","string"===typeof e?e.trim():e)},expression:"editInfo.duying_limit"}})],1)]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.editPopup=!1}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.editSubmit}},[t._v("确认")])],1)])],1)},n=[],o=(a("d81d"),a("ade3")),r=a("115c"),s=a("0238"),l=a("c466"),c={name:"schedule",components:{Paginate:s["a"]},data:function(){return{options:[{label:"是",value:1},{label:"不是",value:0}],pickerOptions:{disabledDate:function(t){return t.getTime()<Date.now()-864e5}},params:{page:1,page_page:this.$store.state.attr.pageSize,data_id:"",league:"",is_roll:"",created_at_start:"",created_at_end:""},timeData:[],leagueList:[],tableData:[],editInfo:{},stateArr:[{id:"0",text:"未开始"},{id:"1",text:"进行中"},{id:"2",text:"已结束"},{id:"3",text:"延期"},{id:"4",text:"取消"}],editPopup:!1,loading:!1,total:0}},computed:{},watch:{},mounted:function(){this.finstall(),this.install()},methods:{finstall:function(){var t=this,e={page:0,page_page:9999};Object(r["g"])(e).then((function(e){t.leagueList=e.data.list}))},install:function(){var t=this,e={page:this.cal.accSub(this.params.page,1),page_page:this.params.page_page,is_roll:this.params.is_roll,data_id:this.params.data_id,league:this.params.league,created_at_start:this.params.created_at_start,created_at_end:this.params.created_at_end};Object(r["h"])(e).then((function(e){200===e.code?(t.total=parseInt(e.data.listTotalCount),t.tableData=e.data.list.map((function(t){return t.status="1"===t.status,t.is_roll="1"===t.is_roll,t.is_handicap="1"===t.is_handicap,t.is_over_under="1"===t.is_over_under,t.is_duying="1"===t.is_duying,t.is_correct_core="1"===t.is_correct_core,t.is_odd_even="1"===t.is_odd_even,t.is_total_goal="1"===t.is_total_goal,t.is_locked="1"===t.is_locked,t}))):t.$message.error(e.message),t.loading=!1}))},refresh:function(){this.tableData=[],this.params.page=1,this.install()},inquire:function(){this.params.page=1,this.install()},statusChange:function(t,e){var a=this;t=!0===t?1:0;var i={id:e,status:t},n={id:e,status:t};Object(r["j"])(i,n).then((function(t){200===t.code||a.$message.error(t.message)}))},rollChange:function(t,e){var a=this;t=!0===t?1:0;var i={id:e,is_roll:t},n={id:e,is_roll:t};Object(r["j"])(i,n).then((function(t){200===t.code||a.$message.error(t.message)}))},wfChange:function(t,e,a){var i=this;t=!0===t?1:0;var n=Object(o["a"])({id:e},a,t),s=Object(o["a"])({id:e},a,t);Object(r["j"])(n,s).then((function(t){200===t.code||i.$message.error(t.message)}))},settlement:function(t){var e=this,a={data_id:t.data_id};this.$confirm("是否结算?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["k"])(a).then((function(t){200===t.code?e.$message(t.message):e.$message.error(t.message)}))}))},again:function(t){var e=this,a={data_id:t.data_id};this.$confirm("重新结算会把用户奖金全部扣除,如果用户已经消费掉,则余额扣除到0为止。扣除完毕后系统会再次重新结算订单,请谨慎操作!","重新结算",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["l"])(a).then((function(t){200===t.code?e.$message(t.message):e.$message.error(t.message)}))}))},refreshOdds:function(t){var e=this,a={data_id:t.data_id};Object(r["i"])(a).then((function(t){200===t.code?e.$message(t.message):e.$message.error(t.message)}))},edit:function(t){this.editInfo=JSON.parse(JSON.stringify(t)),this.editPopup=!0},editSubmit:function(){var t=this,e={id:this.editInfo.id,state:this.editInfo.state,half_score:this.editInfo.half_score,score:this.editInfo.score,handicap_limit:this.editInfo.handicap_limit,over_under_limit:this.editInfo.over_under_limit,duying_limit:this.editInfo.duying_limit,correct_core_limit:this.editInfo.correct_core_limit,odd_even_limit:this.editInfo.odd_even_limit,total_goal_limit:this.editInfo.total_goal_limit};Object(r["j"])(e,e).then((function(e){200===e.code?(t.$message.success("编辑成功"),t.editClose(),t.refresh()):t.$message.error(e.message)}))},editClose:function(){this.editInfo={},this.editPopup=!1},changeTime:function(t){t?(this.params.created_at_start=t[0]/1e3,this.params.created_at_end=t[1]/1e3):(this.params.created_at_start="",this.params.created_at_end="")},handleCurrentChange:function(t){this.params.page=t,this.install()},handleSizeChange:function(t,e){this.params.page_page=t,this.install()},timestampToDatetime:function(t){return Object(l["a"])(t,!0)}},beforeCreate:function(){},created:function(){},beforeMount:function(){},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},u=c,d=(a("7122"),a("2877")),p=Object(d["a"])(u,i,n,!1,null,"f9f12a82",null);e["default"]=p.exports}}]);
|