(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-731db9f4"],{"0588":function(t,e,n){},"0842":function(t,e,n){"use strict";var a=n("fae5");n.n(a).a},"38de":function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n("d225"),o=n("b0b4"),i=n("65e9"),c=function(){function t(){Object(a.a)(this,t),this.CmsApi="/cms/api"}return Object(o.a)(t,[{key:"UpperContent",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/CrmContentmain/UpperContent"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"RemoveContent",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/CrmContentmain/RemoveContent"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"CreateContent",value:function(t){var e=this;return new Promise((function(n,a){i.a.post("".concat(e.CmsApi,"/CrmContentmain/CreateContent"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"EditContent",value:function(t){var e=this;return new Promise((function(n,a){i.a.post("".concat(e.CmsApi,"/CrmContentmain/EditContent"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetContentdetail",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/CrmContentmain/GetContentdetail"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetShopList",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/SCommodity/GetShopList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"SmallProgramQR",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/Platform/SmallProgramQR"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"Search",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/CrmContentmain/Search"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetUserComplabel",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/Complabel/GetUserComplabel"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"SearchFeedback",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/Feedback/SearchList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"SearchSmartRole",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/Platform/SmartRole"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetSendWechatLogList",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/ContentTask/GetSendWechatLogList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetContentTaskList",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/ContentTask/GetContentTaskList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"Review",value:function(t){var e=this;return new Promise((function(n,a){i.a.post("".concat(e.CmsApi,"/ContentTask/Review"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"SaveFeadBack",value:function(t){var e=this;return new Promise((function(n,a){i.a.post("".concat(e.CmsApi,"/Feedback/Config"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"QiNiuToken",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/Platform/QiNiuToken"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetCategoryListTypes",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/CategoryLabel/GetCategoryList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetLabelList",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/CategoryLabel/GetLabelList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"getProduct",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/CrmContentmain/GetCommodityList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"MarketingConfig",value:function(t){var e=this;return new Promise((function(n,a){i.a.post("".concat(e.CmsApi,"/MarketingConfig/Config"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetMCouponRuleDetail",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/MarketingConfig/GetMCouponRuleDetail"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"MarketingFee",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/MarketingConfig/UsableMarketingFee"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetMarketingList",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/MarketingConfig/GetMarketingList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"ModifyCouponRuleStatus",value:function(t){var e=this;return new Promise((function(n,a){i.a.post("".concat(e.CmsApi,"/MarketingConfig/ModifyCouponRuleStatus"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"ModifyMCouponRule",value:function(t){var e=this;return new Promise((function(n,a){i.a.post("".concat(e.CmsApi,"/MarketingConfig/ModifyMCouponRule"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"GetMCouponRuleLogList",value:function(t){var e=this;return new Promise((function(n,a){i.a.get("".concat(e.CmsApi,"/MarketingConfig/GetMCouponRuleLogList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}},{key:"CMSMCouponList",value:function(t){var e=this;return new Promise((function(n,a){i.a.post("".concat(e.CmsApi,"/MCoupon/CMSMCouponList"),t).then((function(t){n(t)})).catch((function(t){a(t)}))}))}}]),t}()},"60d8":function(t,e,n){"use strict";var a=n("a477");n.n(a).a},a477:function(t,e,n){},b0cf:function(t,e,n){"use strict";var a=n("0588");n.n(a).a},c674:function(t,e,n){"use strict";n.r(e),n("8e6e"),n("456d"),n("34ef"),n("28a5"),n("ac6a"),n("386d");var a=n("bd86"),o=n("38de"),i=n("24dd");function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}var r=new o.a,s={name:"tab1",props:["price"],data:function(){return{wrapperCol:{span:17},labelCol:{span:6},searchFlag:{},status:[{title:"未开始",color:"#07C160",btnText:"停止"},{title:"进行中",color:"#FA8C15",btnText:"停止"},{title:"已结束",color:"#919191",btnText:""},{title:"已停止",color:"#FF3D3D",btnText:"继续"}],searchForm:{couponRuleKeyword:"",couponRuleType:"",couponRuleStatus:"",CouponRuleCode:""},qractive:0,columns:[{title:"活动名称",dataIndex:"mCouponActiveName",width:110},{title:"营销编码",dataIndex:"mRuleCode",width:60},{title:"活动类型",dataIndex:"activeType",width:60,scopedSlots:{customRender:"activeType"}},{title:"活动目的",dataIndex:"aimType",width:70,scopedSlots:{customRender:"aimType"}},{title:"活动状态",dataIndex:"counponState",width:60,scopedSlots:{customRender:"counponState"}},{title:"活动有效期",dataIndex:"counponEndTime",width:115,scopedSlots:{customRender:"date"}},{title:"发布时间",dataIndex:"publishTime",width:100},{slots:{title:"customTitle"},dataIndex:"surplusMarketFund",width:80,scopedSlots:{customRender:"surplusMarketFund"}},{title:"已领取",dataIndex:"receivedNum",width:75},{title:"已使用",dataIndex:"usedNum",width:75},{title:"操作",dataIndex:"counponState",width:140,scopedSlots:{customRender:"action"}}],locale:{emptyText:"暂无数据"},tabList:[],pageOpation:{total:0,option:["15","30","45"],pageSize:15,current:0},visible:!1,visible2:!1,modalType:"",queryLiList:[{label:"活动名称"},{label:"活动目的"},{label:"已用活动资金（元）"},{label:"活动资金（元）"},{label:"资金可使用时间段"},{label:"资金方"},{label:"优惠券类型"}],queryTabData:[],recordTabData:[],queryPage:{total:0,option:["15","30","45"],pageSize:15,current:0},queryColumns:[{title:"商家名称",scopedSlots:{customRender:"shopName"}},{title:"归属菜市场",scopedSlots:{customRender:"action"}}],recordColumns:[{title:"操作人",dataIndex:"creator"},{title:"操作时间",dataIndex:"createTime"},{title:"操作内容",dataIndex:"actionTypeStr"},{title:"备注",dataIndex:"record"}],shopmCouponList:[],qrCodeSrc:"",spin:!1}},methods:{getData:function(){var t=this;this.$nextTick((function(){t.pageOpation.current||(t.pageOpation.current=1),r.GetMarketingList(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){Object(a.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({compId:t.$store.state.employee.company.compId,pageIndex:t.pageOpation.current,pageSize:t.pageOpation.pageSize},t.searchFlag)).then((function(e){console.log(e),t.tabList=e.value,t.pageOpation.total=e.totalNum}))}))},search:function(){this.searchFlag=JSON.parse(JSON.stringify(this.searchForm)),this.pageOpation.current=1,this.getData()},resize:function(){for(var t in this.searchForm)this.searchForm[t]="";this.search()},onShowSizeChange:function(t,e){this.pageOpation.pageSize=e,this.getData()},querySizeChange:function(t,e){console.log(e),this.queryPage.pageSize=e,this.initTabData()},recordSizeChange:function(t){this.recordPage.pageSize=t},ModifyCouponRuleStatus:function(t,e){var n,a,o,i,c=this;if(e||0===e||(n=2,a="释放后，活动剩余未使用资金返回公共资金池，此操作不影响已领取用户正常使用，确定释放此活动吗？",o="释放",i="此活动剩余资金已释放"),e<2&&(n=3,a="此操作不影响已领取用户正常使用，你确定停止发放此优惠券吗？",o="停止",i="此活动已停止"),3==e)return n=1,void r.ModifyCouponRuleStatus({id:t,enumCouponRuleStatus:n,Operator:this.$store.state.employee.employee.normalizedUserName}).then((function(t){t&&(c.$message.success("此活动已继续执行"),c.getData())})).catch((function(t){c.$message.error(t.message)}));this.$confirm({title:o,content:a,onOk:function(){r.ModifyCouponRuleStatus({id:t,enumCouponRuleStatus:n,Operator:c.$store.state.employee.employee.normalizedUserName}).then((function(t){t&&(c.$message.success(i),c.getData())}))}})},queryById:function(t,e){var n=this;this.visible=!0,this.qrCodeSrc="",this.modalType=e,this.qeuryData=t,"活动查询"==e?r.GetMCouponRuleDetail({id:t.id}).then((function(t){console.log(t),n.queryLiList[0].val=t.couponRuleName,n.queryLiList[1].val=0==t.aimType?"提升营业额":1==t.aimType?"拉新":"",n.queryLiList[2].val=t.usedMarketingFee,n.queryLiList[3].val=t.marketingFee,n.queryLiList[4].val=t.startTime+" ~ "+t.endTime,n.queryLiList[5].val=1==t.sponsorType?"平台":2==t.sponsorType?"商家":"",n.queryLiList[6].val=1==t.activeType?"单商户券":"多商户券",n.shopmCouponList=t.shopmCouponList,n.queryPage.total=t.shopmCouponList.length,n.queryPage.current=1,0==t.activeType&&(n.locale.emptyText="全场商户",n.shopmCouponList=[],n.queryPage.total=0),n.initTabData()})):(this.shopmCouponList=[],r.GetMCouponRuleLogList({ruleId:t.id}).then((function(t){n.queryPage.current=1,n.shopmCouponList=t.value,n.queryPage.total=t.value.length,n.initTabData()})))},initTabData:function(){var t=this;this.queryTabData=[];var e=-1;this.shopmCouponList.forEach((function(n,a){a%t.queryPage.pageSize==0&&(t.queryTabData.push([]),e++),"活动查询"==t.modalType?t.queryTabData[e].push(n.shopName):t.queryTabData[e].push(n)}))},cancel:function(){this.visible=!1,this.queryPage={total:0,option:["15","30","45"],pageSize:15,current:1},this.queryTabData=[],this.recordTabData=[]},base64ToBlob:function(t){for(var e=t.split(";base64,"),n=e[0].split(":")[1],a=window.atob(e[1]),o=a.length,i=new Uint8Array(o),c=0;c<o;++c)i[c]=a.charCodeAt(c);return new Blob([i],{type:n})},saveImg:function(){var t=document.createElement("a"),e=this.base64ToBlob(this.qrCodeSrc);document.createEvent("HTMLEvents").initEvent("click",!0,!0),t.download="".concat(this.queryLiList[0].val,".png"),t.href=URL.createObjectURL(e),t.click()},getCode:function(t){var e=this,n="rcode="+t,a=new i.a;this.spin=!0,a.SmallQR({scene:n,page:"pages/discountCoupon/discountCoupon"}).then((function(t){e.qrCodeSrc=t.value,e.spin=!1})).catch((function(t){e.spin=!1}))}}},l=(n("0842"),n("2877")),u=Object(l.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"search-form"},[n("a-form",{staticClass:"ant-advanced-search-form",attrs:{form:t.form,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[n("a-row",{attrs:{gutter:24}},[n("a-col",{attrs:{span:6}},[n("a-form-item",{attrs:{label:"活动名称"}},[n("a-input",{attrs:{"allow-clear":""},model:{value:t.searchForm.couponRuleKeyword,callback:function(e){t.$set(t.searchForm,"couponRuleKeyword",e)},expression:"searchForm.couponRuleKeyword"}})],1)],1),n("a-col",{attrs:{span:6}},[n("a-form-item",{attrs:{label:"营销编码"}},[n("a-input",{attrs:{"allow-clear":""},model:{value:t.searchForm.CouponRuleCode,callback:function(e){t.$set(t.searchForm,"CouponRuleCode",e)},expression:"searchForm.CouponRuleCode"}})],1)],1),n("a-col",{attrs:{span:6}},[n("a-form-item",{attrs:{label:"活动类型"}},[n("a-select",{attrs:{"allow-clear":""},model:{value:t.searchForm.couponRuleType,callback:function(e){t.$set(t.searchForm,"couponRuleType",e)},expression:"searchForm.couponRuleType"}},[n("a-select-option",{key:"1"},[t._v("单商户券")]),n("a-select-option",{key:"2"},[t._v("多商户券")])],1)],1)],1),n("a-col",{attrs:{span:6}},[n("a-form-item",{attrs:{label:"活动状态"}},[n("a-select",{attrs:{"allow-clear":""},model:{value:t.searchForm.couponRuleStatus,callback:function(e){t.$set(t.searchForm,"couponRuleStatus",e)},expression:"searchForm.couponRuleStatus"}},[n("a-select-option",{key:"0"},[t._v("未开始")]),n("a-select-option",{key:"1"},[t._v("进行中")]),n("a-select-option",{key:"2"},[t._v("已结束")]),n("a-select-option",{key:"3"},[t._v("已停止")])],1)],1)],1)],1)],1)],1),n("div",{staticStyle:{display:"flex","line-height":"32px","padding-left":"20px"}},[n("h2",{staticStyle:{"font-size":"14px"}},[t._v("当前可用营销资金：")]),n("span",{staticStyle:{display:"table-cell","vertical-align":"bottom"}},[n("span",{staticStyle:{color:"#FF3D3D"}},[t._v("￥")]),n("span",{staticStyle:{"font-size":"22px",color:"#FF3D3D"}},[t._v(t._s(t.price))])]),n("a-button",{staticStyle:{margin:"0 10px"},attrs:{value:"large"},on:{click:function(e){return t.$emit("getPrice","当前可用资金已刷新")}}},[t._v("刷新")]),n("a-button",{attrs:{icon:"plus",type:"primary"},on:{click:function(e){return t.$router.push("MarketSetting")}}},[t._v("创建营销活动")]),n("div",{staticStyle:{flex:"1","text-align":"right"}},[n("a-button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("查询")]),n("a-button",{staticStyle:{margin:"0 20px 0 10px"},on:{click:t.resize}},[t._v("重置")])],1)],1),n("a-table",{attrs:{columns:t.columns,"data-source":t.tabList,pagination:!1,scroll:{y:450}},scopedSlots:t._u([{key:"activeType",fn:function(e){return n("span",{},[t._v(t._s(1==e?"单商户券":"多商户券"))])}},{key:"aimType",fn:function(e){return n("span",{},[t._v(t._s(1==e?"拉新":"提升营业额"))])}},{key:"counponState",fn:function(e){return n("span",{staticStyle:{display:"flex","line-height":"13.6px"}},[n("span",{staticStyle:{"font-size":"24px"},style:{color:t.status[e].color}},[t._v("• ")]),n("span",{style:{color:2==e?t.status[e].title:""}},[t._v(t._s(t.status[e].title))])])}},{key:"date",fn:function(e,a){return n("span",{},[t._v(t._s(a.counponStartTime)+" ~ "+t._s(a.counponEndTime))])}},{key:"surplusMarketFund",fn:function(e,a){return n("span",{},[0==a.couponType?n("span",[t._v("--")]):n("span",[t._v(t._s(a.discountAmtSum)+"/"+t._s(a.marketFund))])])}},{key:"action",fn:function(e,a){return n("div",{staticStyle:{display:"flex"}},[n("a-popover",[n("template",{slot:"content"},[n("div",{staticClass:"tips-content"},[n("div",{staticClass:"left-content"},[n("div",{on:{click:function(e){return t.getCode(a.mRuleCode)}}})]),n("div",{staticClass:"right-content"})])]),n("a-button",{staticStyle:{flex:"1"},attrs:{type:"link",icon:"qrcode"},on:{click:function(e){return t.getCode(t.scope.row)}}})],2),n("a-button",{staticStyle:{flex:"1"},attrs:{type:"link",disabled:3!=e},on:{click:function(e){return t.ModifyCouponRuleStatus(a.id)}}},[t._v("释放")]),""!==t.status[e].btnText?n("a-button",{class:{"color-red":1==e},staticStyle:{flex:"1"},attrs:{type:"link"},on:{click:function(n){return t.ModifyCouponRuleStatus(a.id,e)}}},[t._v(t._s(t.status[e].btnText)+" ")]):n("div",{staticStyle:{flex:"1",padding:"0 12px"}},[t._v("        ")]),n("a-popover",[n("template",{slot:"content"},[n("a-button",{attrs:{type:"link"},on:{click:function(e){return t.queryById(a,"活动查询")}}},[t._v("查询")]),n("a-button",{attrs:{type:"link"},on:{click:function(e){return t.queryById(a,"操作日志")}}},[t._v("日志")]),n("a-button",{attrs:{type:"link",disabled:3!=e||0==a.couponType},on:{click:function(e){return t.$router.push("MarketSetting?id="+a.id)}}},[t._v("编辑")])],1),n("a-button",{staticStyle:{flex:"1"},attrs:{icon:"ellipsis",type:"link"}})],2)],1)}}])},[n("span",{attrs:{slot:"customTitle"},slot:"customTitle"},[t._v("剩余资金(元)\n      "),n("a-tooltip",{attrs:{placement:"top"}},[n("template",{slot:"title"},[n("span",[t._v("已用资金/券总营销资金")])]),n("a-icon",{staticStyle:{"font-size":"13px",position:"relative",top:"1px"},attrs:{type:"question-circle"}})],2)],1)]),n("a-pagination",{staticStyle:{"text-align":"right"},attrs:{"default-current":1,"page-size-options":t.pageOpation.option,"show-total":function(t){return"共 "+t+" 条"},total:t.pageOpation.total,"show-size-changer":"","page-size":t.pageOpation.pageSize},on:{showSizeChange:t.onShowSizeChange,change:t.getData},scopedSlots:t._u([{key:"buildOptionText",fn:function(e){return[n("span",[t._v(t._s(e.value)+"条/页")])]}}]),model:{value:t.pageOpation.current,callback:function(e){t.$set(t.pageOpation,"current",e)},expression:"pageOpation.current"}}),n("a-modal",{attrs:{visible:t.visible,title:t.modalType,width:980,footer:null},on:{cancel:t.cancel}},["活动查询"==t.modalType?n("div",{staticClass:"query"},[n("ul",t._l(t.queryLiList,(function(e,a){return n("li",{key:a},[n("div",[t._v(t._s(e.label)+"：")]),n("div",[t._v(" "+t._s(e.val))])])})),0),n("a-table",{attrs:{columns:t.queryColumns,"data-source":t.queryTabData[t.queryPage.current-1],pagination:!1,scroll:{y:298},locale:t.locale},scopedSlots:t._u([{key:"shopName",fn:function(e,a){return n("span",{},[t._v(t._s(a))])}},{key:"action",fn:function(e){return n("span",{},[t._v(t._s(t.$store.state.employee.company.compName))])}}],null,!1,584787751)})],1):n("div",{staticClass:"record"},[n("a-table",{attrs:{columns:t.recordColumns,"data-source":t.queryTabData[t.queryPage.current-1],pagination:!1,scroll:{y:298},locale:t.locale}})],1),n("a-pagination",{staticStyle:{"text-align":"right"},attrs:{"page-size-options":t.queryPage.option,total:t.queryPage.total,"show-size-changer":"","page-size":t.queryPage.pageSize,"show-total":function(t){return"共 "+t+" 条"}},on:{showSizeChange:t.querySizeChange},scopedSlots:t._u([{key:"buildOptionText",fn:function(e){return[n("span",[t._v(t._s(e.value)+"条/页")])]}}]),model:{value:t.queryPage.current,callback:function(e){t.$set(t.queryPage,"current",e)},expression:"queryPage.current"}})],1)],1)}),[],!1,null,"ce6ebd42",null).exports;function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}var m=new o.a,f={name:"tab1",props:["price"],data:function(){return{select1:"用户昵称",select2:"活动名称",wrapperCol:{span:17},labelCol:{span:6},wrapperCol2:{span:24},labelCol2:{span:0},searchFlag:{},status:[{title:"未使用",color:"#07C160"},{title:"已使用",color:"#FA8C15"},{title:"已过期",color:"#FA8C15"},{title:"锁定",color:"#919191"},{title:"删除",color:"#FF3D3D"}],searchForm:{mCouponCode:void 0,mCouponName:void 0,couponKind:void 0,state:void 0,unionId:void 0,nickName:void 0},stateList:["未核销","已核销","已过期","已锁定"],columns:[{title:"用户昵称",dataIndex:"nickName",width:70},{title:"手机号",dataIndex:"mobile",width:70},{title:"活动名称",dataIndex:"mCouponName",width:140},{title:"营销编码",dataIndex:"mCouponCode",width:60},{title:"活动类型",dataIndex:"couponKind",width:70,scopedSlots:{customRender:"activeType"}},{title:"券状态",dataIndex:"state",width:46,scopedSlots:{customRender:"state"}},{title:"券有效期",dataIndex:"publishTime",width:150,scopedSlots:{customRender:"date"}},{title:"操作时间",dataIndex:"createTime",width:100}],tabList:[],pageOpation:{total:0,option:["15","30","45"],pageSize:15,current:0}}},methods:{getData:function(){var t=this;this.pageOpation.current||(this.pageOpation.current=1),this.$nextTick((function(){m.CMSMCouponList(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){Object(a.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({compId:t.$store.state.employee.company.compId,pageIndex:t.pageOpation.current,pageSize:t.pageOpation.pageSize},t.searchFlag)).then((function(e){console.log(e),t.tabList=e.value,t.pageOpation.total=e.totalNum})).catch((function(e){t.$message.error("查询失败")}))}))},search:function(){this.searchFlag=JSON.parse(JSON.stringify(this.searchForm)),"用户昵称"==this.select1?this.searchForm.mobile=null:this.searchForm.nickName=null,"活动名称"==this.select2?this.searchForm.mCouponCode=null:this.searchForm.mCouponName=null,this.pageOpation.current=1,this.getData()},resize:function(){for(var t in this.searchForm)this.searchForm[t]=void 0;this.search()},onShowSizeChange:function(t,e){this.pageOpation.pageSize=e,this.getData()},recordSizeChange:function(t){this.recordPage.pageSize=t},ModifyCouponRuleStatus:function(t,e){var n;e||0===e||(n=2),e<2&&(n=3),3==e&&(n=1),m.ModifyCouponRuleStatus({id:t,status:n}).then((function(t){console.log(t)}))}}},h=(n("60d8"),Object(l.a)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"search-form"},[n("a-form",{staticClass:"ant-advanced-search-form",attrs:{form:t.form,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[n("a-row",{attrs:{gutter:24}},[n("a-col",{attrs:{span:6}},[n("a-form-item",{staticStyle:{"margin-left":"20px"},attrs:{"label-col":t.labelCol2,"wrapper-col":t.wrapperCol2}},[n("a-input-group",{attrs:{compact:""}},[n("a-select",{model:{value:t.select1,callback:function(e){t.select1=e},expression:"select1"}},[n("a-select-option",{attrs:{value:"用户昵称"}},[t._v("用户昵称")]),n("a-select-option",{attrs:{value:"手机号"}},[t._v("手机号")])],1),"用户昵称"==t.select1?n("a-input",{attrs:{"allow-clear":""},model:{value:t.searchForm.nickName,callback:function(e){t.$set(t.searchForm,"nickName",e)},expression:"searchForm.nickName"}}):n("a-input",{attrs:{"allow-clear":""},model:{value:t.searchForm.mobile,callback:function(e){t.$set(t.searchForm,"mobile",e)},expression:"searchForm.mobile"}})],1)],1)],1),n("a-col",{attrs:{span:6}},[n("a-form-item",{staticStyle:{"margin-left":"20px"},attrs:{"label-col":t.labelCol2,"wrapper-col":t.wrapperCol2}},[n("a-input-group",{attrs:{compact:""}},[n("a-select",{model:{value:t.select2,callback:function(e){t.select2=e},expression:"select2"}},[n("a-select-option",{attrs:{value:"活动名称"}},[t._v("活动名称")]),n("a-select-option",{attrs:{value:"营销编码"}},[t._v("营销编码")])],1),"活动名称"==t.select2?n("a-input",{attrs:{"allow-clear":""},model:{value:t.searchForm.mCouponName,callback:function(e){t.$set(t.searchForm,"mCouponName",e)},expression:"searchForm.mCouponName"}}):n("a-input",{attrs:{"allow-clear":""},model:{value:t.searchForm.mCouponCode,callback:function(e){t.$set(t.searchForm,"mCouponCode",e)},expression:"searchForm.mCouponCode"}})],1)],1)],1),n("a-col",{attrs:{span:6}},[n("a-form-item",{attrs:{label:"活动类型"}},[n("a-select",{attrs:{"allow-clear":""},model:{value:t.searchForm.couponKind,callback:function(e){t.$set(t.searchForm,"couponKind",e)},expression:"searchForm.couponKind"}},[n("a-select-option",{key:1},[t._v("单商户券")]),n("a-select-option",{key:2},[t._v("多商户券")])],1)],1)],1),n("a-col",{attrs:{span:6}},[n("a-form-item",{attrs:{label:"券状态"}},[n("a-select",{attrs:{"allow-clear":""},model:{value:t.searchForm.state,callback:function(e){t.$set(t.searchForm,"state",e)},expression:"searchForm.state"}},[n("a-select-option",{key:"0"},[t._v("未核销")]),n("a-select-option",{key:"1"},[t._v("已核销")]),n("a-select-option",{key:"2"},[t._v("已过期")]),n("a-select-option",{key:"3"},[t._v("已锁定")])],1)],1)],1)],1)],1)],1),n("div",{staticStyle:{display:"flex","line-height":"32px","padding-left":"20px"}},[n("h2",{staticStyle:{"font-size":"14px"}},[t._v("当前可用营销资金：")]),n("span",{staticStyle:{display:"table-cell","vertical-align":"bottom"}},[n("span",{staticStyle:{color:"#FF3D3D"}},[t._v("￥")]),n("span",{staticStyle:{"font-size":"22px",color:"#FF3D3D"}},[t._v(t._s(t.price))])]),n("a-button",{staticStyle:{margin:"0 10px"},attrs:{value:"large"},on:{click:function(e){return t.$emit("getPrice","当前可用资金已刷新")}}},[t._v("刷新")]),n("a-button",{attrs:{icon:"plus",type:"primary"},on:{click:function(e){return t.$router.push("MarketSetting")}}},[t._v("创建营销活动")]),n("div",{staticStyle:{flex:"1","text-align":"right"}},[n("a-button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("查询")]),n("a-button",{staticStyle:{margin:"0 20px 0 10px"},on:{click:t.resize}},[t._v("重置")])],1)],1),n("a-table",{attrs:{columns:t.columns,"data-source":t.tabList,pagination:!1,scroll:{y:450}},scopedSlots:t._u([{key:"activeType",fn:function(e){return n("span",{},[t._v(t._s(1==e?"单商户券":"多商户券"))])}},{key:"counponState",fn:function(e){return n("span",{staticStyle:{display:"flex","line-height":"13.6px"}},[n("span",{staticStyle:{"font-size":"24px"},style:{color:t.status[e].color}},[t._v("• ")]),n("span",{style:{color:2==e?t.status[e].title:""}},[t._v(t._s(t.status[e].title))])])}},{key:"state",fn:function(e){return n("span",{},[t._v(t._s(t.stateList[e]))])}},{key:"date",fn:function(e,a){return n("span",{},[t._v(t._s(a.startTime)+" ~ "+t._s(a.endTime))])}},{key:"action",fn:function(t,e){return n("div",{staticStyle:{display:"flex"}})}}])}),n("a-pagination",{staticStyle:{"text-align":"right"},attrs:{"page-size-options":t.pageOpation.option,total:t.pageOpation.total,"show-size-changer":"","page-size":t.pageOpation.pageSize,"show-total":function(t){return"共 "+t+" 条"}},on:{showSizeChange:t.onShowSizeChange,change:t.getData},scopedSlots:t._u([{key:"buildOptionText",fn:function(e){return["50"!==e.value?n("span",[t._v(t._s(e.value)+"条/页")]):t._e()]}}]),model:{value:t.pageOpation.current,callback:function(e){t.$set(t.pageOpation,"current",e)},expression:"pageOpation.current"}})],1)}),[],!1,null,"c4450f98",null).exports),d=new o.a,g={name:"marketing",data:function(){return{flag:1,price:0}},methods:{tabChange:function(){var t=this;1==this.flag&&(this.$nextTick((function(){t.$refs.tab2.getData()})),this.flag=0)},getPrice:function(t){var e=this;d.MarketingFee({compId:this.$store.state.employee.company.compId}).then((function(n){e.price=n.usableMarketingFee,console.log(t),"string"==typeof t&&e.$message.success(t)}))}},mounted:function(){this.getPrice(),this.$refs.tab1.getData()},components:{tab1:u,tab2:h}},y=(n("b0cf"),Object(l.a)(g,(function(){var t=this.$createElement,e=this._self._c||t;return e("a-tabs",{attrs:{"default-active-key":"1"},on:{change:this.tabChange}},[e("a-tab-pane",{key:"1",attrs:{tab:"活动查询"}},[e("tab1",{ref:"tab1",attrs:{price:this.price},on:{getPrice:this.getPrice}})],1),e("a-tab-pane",{key:"2",attrs:{tab:"用户查询"}},[e("tab2",{ref:"tab2",attrs:{price:this.price},on:{getPrice:this.getPrice}})],1)],1)}),[],!1,null,"7c97d3f0",null));e.default=y.exports},fae5:function(t,e,n){}}]);