(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f2c64ea8"],{"1fad":function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a-card",{attrs:{bordered:!1}},[n("a-row",{staticClass:"row-item-search"},[n("a-form",{staticClass:"search-form",attrs:{form:t.searchForm,layout:"inline"},on:{submit:t.handleSearch}},[n("a-form-item",{attrs:{label:"优惠券名称/ID"}},[n("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],staticClass:"inputW150",attrs:{placeholder:"优惠券名称/ID"}})],1),n("a-form-item",{attrs:{label:"会员券类型"}},[n("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["coupon_type"],expression:"['coupon_type']"}],staticStyle:{width:"100%"},attrs:{placeholder:"全部",allowClear:!0}},[n("a-select-option",{attrs:{value:-1}},[t._v("全部")]),n("a-select-option",{attrs:{value:90}},[t._v("会员专享券")]),n("a-select-option",{attrs:{value:100}},[t._v("生日礼券")])],1)],1),n("a-form-item",{attrs:{label:"创建时间"}},[n("a-range-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["createTime"],expression:"['createTime']"}],staticClass:"inputW240",attrs:{format:"YYYY-MM-DD"}})],1),n("a-form-item",[n("a-button",{staticClass:"search-btn",attrs:{type:"primary",icon:"search","html-type":"submit"}},[t._v("搜索")]),n("a-button",{staticClass:"search-btn",on:{click:t.reloadList}},[t._v("重置")])],1)],1)],1),n("div",{staticClass:"poster"},[1===t.isSuper||"activity-zy-audit"===t.role?n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:t.addPoster}},[t._v("新建会员券")]):t._e(),n("a-button",{staticClass:"search-btn",on:{click:t.receivingRecord}},[t._v("优惠券领取记录")])],1),n("s-table",{ref:"table",staticClass:"tableBox",attrs:{rowKey:"coupon_id",loading:t.isLoading,columns:t.columns,data:t.loadData,pageSize:15,bordered:""},scopedSlots:t._u([{key:"name",fn:function(e,o){return n("span",{},[n("p",{staticClass:"c-p",on:{click:function(e){return t.toMarketInfo(o)}}},[t._v(t._s(e))])])}},{key:"coupon_type",fn:function(e){return n("span",{},[n("p",[t._v(" "+t._s(90==e?"会员专享券":"生日礼券")+" ")])])}},{key:"reduce_price",fn:function(e){return n("span",{},[n("p",[t._v(t._s(e))])])}},{key:"getTerm",fn:function(e,o){return n("span",{},[n("p",[t._v("满"+t._s(o.min_price)+"元减"+t._s(o.reduce_price)+"元")])])}},{key:"expire_day",fn:function(e){return n("span",{},[n("p",[t._v("领取后"+t._s(e)+"天")])])}},{key:"open_status",fn:function(e,o){return n("span",{},[10===o.audit_status&&e&&e.value?n("p",[t._v(t._s(1==e.value?"生效中":"已失效"))]):n("p",[t._v("--")])])}},{key:"total_num",fn:function(e,o){return n("span",{},[10==o.limit_total_type?n("p",[t._v(t._s("总量"+e+"张"))]):n("p",[t._v("不限数量")])])}},{key:"limit_receive_cnt",fn:function(e,o){return n("span",{},[90==o.coupon_type&&10==o.receive_type?n("p",[t._v("每人每自然月限领1张")]):t._e(),90==o.coupon_type&&20==o.receive_type?n("p",[t._v("开会员定向发放"+t._s(o.limit_receive_cnt)+"张")]):t._e(),100==o.coupon_type?n("p",[t._v("每人每自然年限领1张")]):t._e()])}},{key:"create_time",fn:function(e){return n("span",{},[n("p",e?{domProps:{innerHTML:t._s(t.$options.filters.splitTime(e))}}:[t._v("--")])])}},{key:"audit_status",fn:function(e,o){return n("span",{},[n("p",{class:[0==e?"audit_status_red":10==e?"audit_status_black":"c-p"],on:{click:function(e){return t.showRefuse(o)}}},[t._v(" "+t._s(0==e?"待审核":10==e?"审核通过":"已拒绝")+" ")])])}},{key:"action",fn:function(e,o){return n("div",{staticClass:"actions"},[1!==t.isSuper&&"activity-zg-audit"!==t.role||10!=o.audit_status||1!=o.status?t._e():n("a",{on:{click:function(e){return t.handleOpen(o)}}},[t._v("作废")]),1!==t.isSuper&&"activity-zy-audit"!==t.role||20!=o.audit_status?t._e():n("a",{on:{click:function(e){return t.handleEdit(o)}}},[t._v("重新编辑")]),1!==t.isSuper&&"activity-zg-audit"!==t.role||0!=o.audit_status?t._e():n("a",{on:{click:function(e){return t.handleRwview(o)}}},[t._v("审核")]),n("a",{on:{click:function(e){return t.handleRwview(o)}}},[t._v("查看详情")])])}}])},[n("span",{attrs:{slot:"send_type"},slot:"send_type"},[n("p",[t._v("会员")])])]),n("a-modal",{attrs:{title:t.openTitle,visible:t.openVisible},on:{cancel:t.openCancel,ok:t.openOk}},[n("p",[t._v(t._s(t.openContent))])]),n("a-modal",{attrs:{title:"审核不通过的原因:",visible:t.refuseVisible,footer:null},on:{cancel:t.refuseCancel}},t._l(t.record.refuse,(function(e,o){return n("div",{key:o,staticClass:"single"},[n("p",[t._v(t._s(e.refuse_desc))]),n("p",{staticClass:"user"},[t._v(t._s(e.audit_time)+" 审核 "+t._s(e.audit_user))])])})),0)],1)},s=[],i=n("5530"),a=(n("d3b7"),n("159b"),n("3042")),r=n("2af9"),c=[{title:"券ID",dataIndex:"coupon_id"},{title:"优惠券名称",dataIndex:"name",scopedSlots:{customRender:"name"}},{title:"会员券类型",dataIndex:"coupon_type",scopedSlots:{customRender:"coupon_type"}},{title:"面额",dataIndex:"reduce_price",scopedSlots:{customRender:"reduce_price"}},{title:"使用条件",scopedSlots:{customRender:"getTerm"}},{title:"使用有效期",dataIndex:"expire_day",scopedSlots:{customRender:"expire_day"}},{title:"券状态",dataIndex:"open_status",scopedSlots:{customRender:"open_status"}},{title:"发放对象",dataIndex:"send_type",scopedSlots:{customRender:"send_type"}},{title:"发券数量",dataIndex:"total_num",scopedSlots:{customRender:"total_num"}},{title:"领取数量",dataIndex:"limit_receive_cnt",scopedSlots:{customRender:"limit_receive_cnt"}},{title:"创建人",dataIndex:"create_user"},{title:"创建时间",dataIndex:"create_time",scopedSlots:{customRender:"create_time"}},{title:"审核状态",dataIndex:"audit_status",scopedSlots:{customRender:"audit_status"}},{title:"操作",scopedSlots:{customRender:"action"}}],u={components:{STable:r["c"]},data:function(){var t=this;return{searchForm:this.$form.createForm(this),isLoading:!1,queryParam:{},columns:c,openTitle:"",openContent:"",okText:"",openVisible:!1,refuseVisible:!1,record:{},isSuper:1,role:"",loadData:function(e){return t.queryParam.show_type=2,a["f"](Object(i["a"])(Object(i["a"])({},e),t.queryParam)).then((function(t){return t.data.list}))}}},created:function(){var t=this;if(this.$store.getters.roles){this.isSuper=this.$store.getters.roles.isSuper;var e=this.$store.getters.roles.permissions;e.forEach((function(e){"/memberCenter/coupon/index"==e.permissionId&&e.actionEntitySet&&e.actionEntitySet.length>0&&(t.role=e.actionEntitySet[0].action)}))}},methods:{addPoster:function(){this.$router.push("/memberCenter/coupon/create")},toMarketInfo:function(t){this.$router.push({path:"./detail",query:{id:t.coupon_id}})},handleSearch:function(t){var e=this;t.preventDefault(),this.searchForm.validateFields((function(t,n){t||(e.queryParam=Object(i["a"])(Object(i["a"])({},e.queryParam),n),e.handleRefresh(!0))}))},reloadList:function(){this.searchForm.resetFields(),this.queryParam={},this.handleRefresh(!0)},handleRefresh:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(t)},handleOpen:function(t){this.openVisible=!0,this.record=t,0==t.status?(this.openTitle="确认要启用该优惠券吗?",this.openContent=""):(this.openTitle="确认要作废该优惠券吗?",this.openContent="作废后用户将不再继续领取优惠券,已领取的用户不影响使用~")},openOk:function(){var t=this;this.isLoading=!0;var e=1==this.record.status?0:1;a["e"]({coupon_id:this.record.coupon_id,form:{status:e}}).then((function(e){t.$message.success(e.message,1.5),t.openVisible=!1,t.handleRefresh()})).finally((function(e){t.isLoading=!1}))},openCancel:function(){this.openVisible=!1},handleEdit:function(t){this.$router.push({path:"./create",query:{editState:1,id:t.coupon_id}})},handleRwview:function(t){this.$router.push({path:"./detail",query:{source:1,id:t.coupon_id}})},showRefuse:function(t){this.record=t,20===t.audit_status&&(this.refuseVisible=!0)},refuseCancel:function(){this.refuseVisible=!1},receivingRecord:function(){this.$router.push({path:"./receivingRecord"})}}},d=u,p=(n("ec41"),n("2877")),l=Object(p["a"])(d,o,s,!1,null,"69835692",null);e["default"]=l.exports},3042:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return r})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return p})),n.d(e,"e",(function(){return l})),n.d(e,"h",(function(){return _}));var o=n("b775"),s={couponCodesList:"/Coupon/couponCodesList",codesDetail:"/Coupon/codesDetail",redeemCodesExport:"/Coupon/redeemCodesExport",couponlist:"/coupon/couponlist",genCouponCodes:"/Coupon/genCouponCodes",couponStatistics:"/Coupon/couponStatistics",couponStatisticsDetail:"/Coupon/couponStatisticsDetail",couponStatus:"/Coupon/status",memberCouponStatistics:"/coupon/memberCouponStatistics"};function i(t){return Object(o["b"])({url:s.couponCodesList,method:"get",params:t})}function a(t){return Object(o["b"])({url:s.codesDetail,method:"get",params:t})}function r(t){return Object(o["b"])({url:s.redeemCodesExport,method:"post",data:t})}function c(t){return Object(o["b"])({url:s.couponlist,method:"get",params:t})}function u(t){return Object(o["b"])({url:s.genCouponCodes,method:"post",data:t})}function d(t){return Object(o["b"])({url:s.couponStatistics,method:"get",params:t})}function p(t){return Object(o["b"])({url:s.couponStatisticsDetail,method:"get",params:t})}function l(t){return Object(o["b"])({url:s.couponStatus,method:"post",data:t})}function _(t){return Object(o["b"])({url:s.memberCouponStatistics,method:"get",params:t})}},8161:function(t,e,n){},ec41:function(t,e,n){"use strict";n("8161")}}]);