"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[32796],{32796:function(e,t,a){a.r(t),a.d(t,{default:function(){return s}});var r=function(){var e=this,t=e._self._c;return t("el-card",[t("el-form",{attrs:{model:e.formData,inline:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.fetchDataSource(1)}}},[t("el-form-item",{attrs:{label:"权益主标题："}},[t("el-input",{attrs:{placeholder:"请输入权益主标题"},model:{value:e.formData.title,callback:function(t){e.$set(e.formData,"title",t)},expression:"formData.title"}})],1),t("el-form-item",{attrs:{label:"权益种类："}},[t("el-select",{attrs:{clearable:"",placeholder:"请选择权益种类"},model:{value:e.formData.type,callback:function(t){e.$set(e.formData,"type",t)},expression:"formData.type"}},e._l(["优惠券权益","积分权益"],(function(e,a){return t("el-option",{key:a,attrs:{label:e,value:a+1}})})),1)],1),t("el-form-item",{attrs:{label:"发放时间："}},[t("el-date-picker",{attrs:{type:"daterange","value-format":"yyyy-MM-dd","start-placeholder":"开始时间","end-placeholder":"结束时间",clearable:""},model:{value:e.date,callback:function(t){e.date=t},expression:"date"}})],1),t("el-form-item",{attrs:{label:"领取用户ID："}},[t("el-input",{attrs:{placeholder:"请输入领取用户ID"},model:{value:e.formData.toUserId,callback:function(t){e.$set(e.formData,"toUserId",t)},expression:"formData.toUserId"}})],1),t("el-form-item",{attrs:{label:"关联奖励ID："}},[t("el-input",{attrs:{placeholder:"请输入关联奖励ID"},model:{value:e.formData.relateRewardPoolId,callback:function(t){e.$set(e.formData,"relateRewardPoolId",t)},expression:"formData.relateRewardPoolId"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.fetchDataSource(1)}}},[e._v("搜索")]),t("el-button",{attrs:{type:"warning"},on:{click:e.onReset}},[e._v("重置")])],1)],1),t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.dataSource.records,"row-key":"id",border:""}},e._l(e.columns,(function(a){return t("el-table-column",e._b({key:a.prop,attrs:{"header-align":"center",align:"center"}},"el-table-column",a,!1))})),1),t("div",{staticClass:"g-pagination-container"},[t("el-pagination",{attrs:{"current-page":e.dataSource.pageNow,"page-sizes":[20,50,100],"page-size":e.dataSource.pageSize,layout:"sizes, prev, pager, next, jumper",background:"",total:e.dataSource.rowCount},on:{"size-change":function(t){return e.fetchDataSource(null,t)},"current-change":function(t){return e.fetchDataSource(t)}}})],1)],1)},o=[],n=a(84638),l={data(){const e=this.$createElement;return{loading:!1,formData:{},dataSource:{pageSize:20,pageNow:1,records:[],rowCount:0},columns:[{prop:"issuanceTime",label:"发放时间"},{prop:"title",label:"权益主标题&ID",formatter:t=>[e("div",{},`ID:${t.benefitsId}`),e("div",{},`标题：${t.title}`)]},{prop:"subTitle",label:"权益副标题"},{prop:"type",label:"权益种类",formatter:e=>["优惠券","积分"][e.type-1]},{prop:"content",label:"权益内容"},{prop:"relateRewardPoolId",label:"关联奖池ID"},{prop:"relateRewardPoolName",label:"关联奖池"},{prop:"toUserId",label:"领取用户id"}]}},computed:{date:{get:function(){const{issuanceStartTime:e,issuanceEndTime:t}=this.formData;return e?[e,t]:[]},set:function(e){const[t,a]=e||[];this.formData={...this.formData,issuanceStartTime:t?`${t} 00:00:00`:"",issuanceEndTime:a?`${a} 23:59:59`:""}}}},mounted(){this.fetchDataSource(1)},methods:{onReset(){this.formData={},this.fetchDataSource(1)},fetchDataSource(e,t){this.loading=!0,(0,n.o_)({...this.formData,pageNow:e||this.dataSource.pageNow,pageSize:t||this.dataSource.pageSize}).then((e=>{e&&(this.dataSource={...e,records:e.records||[]})})).finally((()=>{this.loading=!1}))}}},i=l,c=a(81656),u=(0,c.A)(i,r,o,!1,null,null,null),s=u.exports},84638:function(e,t,a){a.d(t,{B$:function(){return u},Th:function(){return c},cV:function(){return l},dZ:function(){return n},o_:function(){return i}});var r=a(7896);const o="/playing";async function n(e){return(0,r.Ay)(`${o}/benefits/addOrUpdate`,{method:"POST",data:e})}async function l(e){return(0,r.Ay)(`${o}/benefits/list`,{method:"POST",data:e})}async function i(e){return(0,r.Ay)(`${o}/benefits/queryIssuanceRecord`,{method:"POST",data:e})}async function c(e){return(0,r.Ay)(`${o}/benefits/queryOperationLog`,{method:"POST",data:e})}async function u(e){return(0,r.Ay)(`${o}/benefits/updateStatus`,{method:"POST",data:e})}}}]);