(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-251f4f74"],{"5c16":function(e,t,a){"use strict";a("9ce2")},6337:function(e,t,a){"use strict";a("9914")},"63cc":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return s}));var o=a("b775"),r={add:"/coupon/add",detail:"/Coupon/detail",update:"/coupon/update"};function n(e){return Object(o["b"])({url:r.add,method:"post",data:e})}function i(e){return Object(o["b"])({url:r.detail,method:"get",params:e})}function s(e){return Object(o["b"])({url:r.update,method:"post",data:e})}},9914:function(e,t,a){},"9ce2":function(e,t,a){},d130:function(e,t,a){"use strict";a.d(t,"n",(function(){return n})),a.d(t,"g",(function(){return i})),a.d(t,"m",(function(){return s})),a.d(t,"f",(function(){return l})),a.d(t,"d",(function(){return c})),a.d(t,"e",(function(){return d})),a.d(t,"r",(function(){return u})),a.d(t,"s",(function(){return p})),a.d(t,"t",(function(){return m})),a.d(t,"q",(function(){return h})),a.d(t,"a",(function(){return g})),a.d(t,"h",(function(){return f})),a.d(t,"c",(function(){return b})),a.d(t,"p",(function(){return v})),a.d(t,"i",(function(){return _})),a.d(t,"k",(function(){return C})),a.d(t,"j",(function(){return y})),a.d(t,"l",(function(){return w})),a.d(t,"o",(function(){return x})),a.d(t,"b",(function(){return T}));var o=a("b775"),r={list:"/card.riceCard/list",frozen:"/coupon/frozen",detail:"/card.riceCard/detail",createcoupon:"/coupon/createcoupon",addcard:"/coupon/addcard",cashDetail:"/card.riceCard/cashDetail",cardlist:"/coupon/cardlist",skulist:"/goods/skulist",sms:"/home/sms",state:"/card.riceCard/state",skuPickerList:"/goods/skuPickerList",addCash:"/card.riceCard/addCash",editCash:"/card.riceCard/editCash",addExchange:"/card.RiceCard/addExchange",editExchange:"/card.RiceCard/editExchange",selectList:"/card.RiceCard/selectList",entityCardCodes:"/card.RealRiceCard/genCardCodes",entityList:"/card.RealRiceCard/list",entityDetail:"/card.RealRiceCard/listDetail",freezeCard:"/card.RealRiceCard/freezeCard",redeemCodesExport:"/card.RealRiceCard/redeemCodesExport",addEntityCash:"/card.riceCard/addEntityCash"};function n(e){return Object(o["b"])({url:r.list,method:"get",params:e})}function i(e){return Object(o["b"])({url:r.detail,method:"get",params:e})}function s(e){return Object(o["b"])({url:r.frozen,method:"post",data:e})}function l(e){return Object(o["b"])({url:r.createcoupon,method:"post",data:e})}function c(e){return Object(o["b"])({url:r.addcard,method:"post",data:e})}function d(e){return Object(o["b"])({url:r.cashDetail,method:"get",params:e})}function u(e){return Object(o["b"])({url:r.skulist,method:"get",params:e})}function p(e){return Object(o["b"])({url:r.sms,method:"post",data:e})}function m(e){return Object(o["b"])({url:r.state,method:"post",data:e})}function h(e){return Object(o["b"])({url:r.skuPickerList,method:"get",params:e})}function g(e){return Object(o["b"])({url:r.addCash,method:"post",data:e})}function f(e){return Object(o["b"])({url:r.editCash,method:"post",data:e})}function b(e){return Object(o["b"])({url:r.addExchange,method:"post",data:e})}function v(e){return Object(o["b"])({url:r.selectList,method:"get",params:e})}function _(e){return Object(o["b"])({url:r.entityCardCodes,method:"post",data:e})}function C(e){return Object(o["b"])({url:r.entityList,method:"get",params:e})}function y(e){return Object(o["b"])({url:r.entityDetail,method:"get",params:e})}function w(e){return Object(o["b"])({url:r.freezeCard,method:"get",params:e})}function x(e){return Object(o["b"])({url:r.redeemCodesExport,method:"post",data:e})}function T(e){return Object(o["b"])({url:r.addEntityCash,method:"post",data:e})}},ed86:function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v("优惠券基本信息")]),a("a-spin",{attrs:{spinning:e.isLoading}},[a("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[a("div",{staticClass:"tabs-content"},[a("div",{staticClass:"tab-pane"},[a("a-form-item",{attrs:{label:"优惠券名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["couponName",{initialValue:e.detail.name,rules:[{required:!0,message:"请输入优惠券名称"}]}],expression:"[\n 'couponName',\n { initialValue: detail.name, rules: [{ required: true, message: '请输入优惠券名称' }] },\n ]"}],staticClass:"aInput",attrs:{placeholder:"请输入优惠券名称",maxLength:12},on:{change:function(e){e.target.value=e.target.value.replace(/\s+/g,"")}}}),a("span",{staticClass:"radioBotTool"},[e._v("注:0~12个字")])],1),a("a-form-item",{attrs:{label:"副标题",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["couponSubTitle",{initialValue:e.detail.subtitle,rules:[{required:!0,message:"请输入副标题"}]}],expression:"[\n 'couponSubTitle',\n { initialValue: detail.subtitle, rules: [{ required: true, message: '请输入副标题' }] },\n ]"}],staticClass:"aInput",attrs:{placeholder:"请输入副标题",maxLength:30},on:{change:function(e){e.target.value=e.target.value.replace(/\s+/g,"")}}}),a("span",{staticClass:"radioBotTool"},[e._v("注:30个字内")])],1),a("a-form-item",{attrs:{label:"优惠券说明",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["couponExplain",{initialValue:e.detail.describe,rules:[{required:!0,message:"请输入优惠券说明"}]}],expression:"[\n 'couponExplain',\n { initialValue: detail.describe, rules: [{ required: true, message: '请输入优惠券说明' }] },\n ]"}],staticClass:"aInput",attrs:{maxLength:20,placeholder:"请输入优惠券说明"},on:{change:function(e){e.target.value=e.target.value.replace(/\s+/g,"")}}}),a("span",{staticClass:"radioBotTool"},[e._v("注:20个字内")])],1),a("a-form-item",{attrs:{label:"会员券类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["couponType",{initialValue:e.couponType,rules:[{required:!0}]}],expression:"['couponType', { initialValue: couponType, rules: [{ required: true }] }]"}],staticClass:"radioGroup",on:{change:e.changecouponType}},[a("a-radio",{attrs:{value:90}},[e._v("会员专享券")]),a("a-radio",{attrs:{value:100}},[e._v("生日礼券")])],1)],1),a("a-form-item",{attrs:{label:"优惠券使用条件",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("span",[e._v("订单满")]),a("a-form-item",{staticClass:"inputFItem",attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["achieveMoney",{initialValue:e.detail.min_price,rules:[{required:!0,message:"请输入"}]}],expression:"[\n 'achieveMoney',\n { initialValue: detail.min_price, rules: [{ required: true, message: '请输入' }] },\n ]"}],staticClass:"typeInput",attrs:{placeholder:"输入",precision:2,min:0}})],1),a("span",[e._v("元")]),a("span",[e._v(",可减")]),a("a-form-item",{staticClass:"inputFItem",attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["reduceMoney",{initialValue:e.detail.reduce_price?parseInt(e.detail.reduce_price):"",rules:[{required:!0,message:"请输入"}]}],expression:"[\n 'reduceMoney',\n {\n initialValue: detail.reduce_price ? parseInt(detail.reduce_price) : '',\n rules: [{ required: true, message: '请输入' }],\n },\n ]"}],staticClass:"typeInput",attrs:{placeholder:"输入"},on:{change:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}})],1),a("span",[e._v("元")])],1),a("a-form-item",{attrs:{label:"使用有效期",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("span",[e._v("领取后")]),a("a-form-item",{staticClass:"inputFItem",attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["validTimeDay",{initialValue:e.detail.expire_day,rules:[{required:!0,message:"输入天数"}]}],expression:"[\n 'validTimeDay',\n {\n initialValue: detail.expire_day,\n rules: [{ required: true, message: '输入天数' }],\n },\n ]"}],staticClass:"typeInput",attrs:{placeholder:"输入天数"},on:{change:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}})],1),a("span",[e._v("天有效")])],1),a("a-form-item",{attrs:{label:"发券数量限制",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["couponNumberType",{initialValue:e.couponNumberType,rules:[{required:!0}]}],expression:"['couponNumberType', { initialValue: couponNumberType, rules: [{ required: true }] }]"}],staticClass:"radioGroup",on:{change:e.changeType}},[a("a-radio",{attrs:{value:20}},[a("span",{staticClass:"radioTitle"},[e._v("不限数量")])]),a("a-radio",{attrs:{value:10}},[a("span",{staticClass:"radioTitle"},[e._v("总量")]),a("a-form-item",{staticClass:"inputFItem",attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["couponTotalNumber",{initialValue:e.detail.total_num,rules:[{required:10==e.couponNumberType,message:"请输入数量限制"}]}],expression:"[\n 'couponTotalNumber',\n {\n initialValue: detail.total_num,\n rules: [{ required: couponNumberType == 10, message: '请输入数量限制' }],\n },\n ]"}],staticClass:"typeInput",attrs:{placeholder:"输入数字",disabled:20==e.couponNumberType},on:{change:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}})],1),a("span",[e._v("张")])],1)],1)],1),a("a-form-item",{attrs:{label:"商品范围",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("div",{staticClass:"setGoods"},[a("a-button",{attrs:{type:"primary"},on:{click:e.showSettingGoods}},[e._v("选择除外商品")])],1),a("div",{staticClass:"goodsBox"},[a("a-table",{attrs:{rowKey:"goods_sku_no",columns:e.goodsColumns,dataSource:e.goodsData,pagination:!1,bordered:""},scopedSlots:e._u([{key:"goods_price",fn:function(t){return a("span",{},[a("p",[e._v("¥"+e._s(t))])])}},{key:"action",fn:function(t,o,r){return a("span",{},[a("a-button",{attrs:{type:"danger"},on:{click:function(t){return e.deleteGoods(r)}}},[e._v("删除")])],1)}}])})],1)]),a("div",{staticClass:"card-title"},[e._v("优惠券推广信息")]),a("a-form-item",{attrs:{label:"券领取方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[90==e.couponType?a("a-radio-group",{on:{change:e.changeReceiveType},model:{value:e.receive_type,callback:function(t){e.receive_type=t},expression:"receive_type"}},[a("a-radio",{attrs:{value:10}},[e._v("月度福利配置发放")]),a("a-radio",{attrs:{value:20}},[e._v("开会员定向发放(用户开通会员后给用户发放)")])],1):e._e(),100==e.couponType?a("a-radio-group",{on:{change:e.changeReceiveType},model:{value:e.receive_type,callback:function(t){e.receive_type=t},expression:"receive_type"}},[a("a-radio",{attrs:{value:10}},[e._v("线上发券")])],1):e._e()],1),a("a-form-item",{attrs:{label:"领取数量限制",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{staticClass:"radioGroup",on:{change:e.changeLimit},model:{value:e.receiveNumberType,callback:function(t){e.receiveNumberType=t},expression:"receiveNumberType"}},[90==e.couponType&&10==e.receive_type?a("a-radio",{attrs:{value:10,disabled:100==e.couponType}},[a("span",{staticClass:"radioTitle"},[e._v("每人每自然月限领1张")])]):e._e(),100==e.couponType?a("a-radio",{attrs:{value:20,disabled:90==e.couponType}},[a("span",{staticClass:"radioTitle"},[e._v("每人每自然年限领1张")])]):e._e(),90==e.couponType&&20==e.receive_type?a("div",{staticStyle:{display:"inline-block"}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["limit_receive_cnt",{initialValue:e.detail.limit_receive_cnt,rules:[{required:!0,message:"请输入数量"}]}],expression:"[\n 'limit_receive_cnt',\n { initialValue: detail.limit_receive_cnt, rules: [{ required: true, message: '请输入数量' }] },\n ]"}],staticStyle:{width:"200px"},attrs:{placeholder:"请输入数量"},on:{change:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}}),a("span",[e._v(" 张 (每开通一次会员发放的张数)")])],1):e._e()],1)],1),a("a-form-item",{attrs:{label:"推广时间",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[90==e.couponType?a("a-range-picker",{attrs:{placeholder:["开始时间","结束时间"],format:"YYYY-MM","disabled-date":e.disabledMonth,mode:e.mode},on:{panelChange:e.handlePanelChange},model:{value:e.collectionMonth,callback:function(t){e.collectionMonth=t},expression:"collectionMonth"}}):a("a-range-picker",{attrs:{placeholder:["开始时间","结束时间"],format:"YYYY","disabled-date":e.disabledYear,mode:e.mode2},on:{panelChange:e.handlePanelChangeYear},model:{value:e.collectionYear,callback:function(t){e.collectionYear=t},expression:"collectionYear"}})],1),a("a-form-item",{attrs:{label:"券发放对象",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("p",[e._v("元生昌付费会员")])])],1)]),a("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[a("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交审核")]),a("a-button",{staticClass:"close",attrs:{type:"close",loading:e.isBtnLoading},on:{click:e.close}},[e._v("关闭")])],1)],1)],1),a("SettingGoods",{ref:"SettingGoods",on:{handleSubmit:e.handleSettingGoods}})],1)},r=[],n=(a("d3b7"),a("159b"),a("a434"),a("a9e3"),a("63cc")),i=a("2af9"),s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{title:e.modalTitle,visible:e.visible,"confirm-loading":e.confirmLoading},on:{cancel:e.handleCancel,ok:e.handleOk}},[a("div",{staticClass:"formBox"},[a("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[a("a-form-item",[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_name"],expression:"['goods_name']"}],attrs:{placeholder:"请输入商品名称/商品ID","allow-clear":""}})],1),a("a-form-item",{staticClass:"search-btn"},[a("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),a("s-table",{ref:"table",attrs:{scroll:{y:"420px",scrollToFirstRowOnChange:!0},rowKey:"id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15,"row-selection":{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange,getCheckboxProps:e.getCheckboxProps}},scopedSlots:e._u([{key:"sort",fn:function(t,o,r){return a("span",{},[a("p",[e._v(e._s(r+1))])])}},{key:"goods_props",fn:function(t,o){return a("span",{},[20==o.goods.spec_type&&t?a("p",e._l(t,(function(t,o){return a("span",{key:o},[e._v(e._s(t.value.name))])})),0):10==o.goods.spec_type&&o.specs?a("p",[e._v(e._s(o.specs))]):a("p",[e._v("--")])])}},{key:"goods_price",fn:function(t){return a("span",{},[a("p",[e._v("¥"+e._s(t))])])}}])}),"goodsChange"==e.type?a("p",[e._v("注:如勾选指定商品,表示该米卡仅可兑换指定商品")]):e._e()],1)},l=[],c=a("5530"),d=a("d130"),u=(a("d084"),a("8ded")),p=a.n(u),m=[{title:"序号",dataIndex:"sort",width:"50px",scopedSlots:{customRender:"sort"}},{title:"商品ID",width:"100px",dataIndex:"goods_id"},{title:"商品SKU",width:"150px",dataIndex:"goods_sku_no"},{title:"商品名称",dataIndex:"goods.goods_name",width:"300px",ellipsis:!0},{title:"商品规格",dataIndex:"goods_props",width:"200px",ellipsis:!0,scopedSlots:{customRender:"goods_props"}},{title:"售价",width:"150px",dataIndex:"goods_price",scopedSlots:{customRender:"goods_price"}}],h={components:{STable:i["c"]},data:function(){var e=this;return{modalTitle:"",visible:!1,confirmLoading:!1,searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:m,selectedRowKeys:[],selectList:[],goodsData:[],type:"",loadData:function(t){return e.queryParam.goods_type=40,d["q"](Object(c["a"])(Object(c["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{open:function(e,t){this.type=t,this.modalTitle="设置除外商品",this.visible=!0,this.selectedRowKeys=[],e&&(this.goodsData=e),this.$refs.table&&this.handleRefresh(!0)},getCheckboxProps:function(e){return e.defaultDisabled=!1,this.goodsData&&this.goodsData.length>0&&this.goodsData.forEach((function(t,a){e.goods_sku_no==t.goods_sku_no&&(e.defaultDisabled=!0)})),{props:{disabled:e.defaultDisabled}}},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(c["a"])(Object(c["a"])({},t.queryParam),a),t.handleRefresh(!0))}))},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)},handleOk:function(){0!=this.selectedRowKeys.length?(p.a.set("selectList",this.selectList),this.$message.success("选择商品成功",1.5),this.handleCancel(),this.$emit("handleSubmit")):this.$message.error("请先选择商品",1.5)},handleCancel:function(){this.visible=!1,this.searchForm.resetFields(),this.queryParam={},this.handleRefresh()},onSelectChange:function(e,t){var a=[];this.selectedRowKeys=e,e&&e.length>0&&t.forEach((function(e){var t=null;t=20==e.goods.spec_type&&e.goods_props?e.goods_props:10==e.goods.spec_type&&e.specs?e.specs:null,a.push({goods_id:e.goods_id,goods_name:e.goods.goods_name,goods_price:e.goods_price,goods_sku_id:e.goods_sku_id,goods_sku_no:e.goods_sku_no,goods_props:t})})),this.selectList=a}}},g=h,f=(a("5c16"),a("2877")),b=Object(f["a"])(g,s,l,!1,null,"f114821e",null),v=b.exports,_=a("c1df"),C=a.n(_),y=[{title:"商品ID",width:"80px",dataIndex:"goods_id"},{title:"商品SKU",width:"150px",dataIndex:"goods_sku_no"},{title:"商品名称",width:"300px",ellipsis:!0,dataIndex:"goods_name"},{title:"售价",width:"150px",dataIndex:"goods_price",scopedSlots:{customRender:"goods_price"}},{title:"操作",width:"100px",dataIndex:"action",scopedSlots:{customRender:"action"}}],w={components:{SelectImage:i["d"],InputNumberGroup:i["b"],SelectRegion:i["e"],SettingGoods:v},data:function(){return{couponId:"",couponType:90,couponNumberType:20,receiveNumberType:10,receive_type:10,goodsData:[],plainOptions:[{label:"满就送活动",value:"2"},{label:"满件送活动",value:"3"}],checkboxValue:["1","2","3"],goodsColumns:y,detail:{},editState:null,labelCol:{span:3},wrapperCol:{span:15},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),mode:["month","month"],mode2:["year","year"],collectionMonth:[],collectionYear:[]}},created:function(){this.couponId=this.$route.query.id||"";var e=this.$route.query.editState||null;!e||1!=e&&2!=e||(this.getCouponDetail(),this.editState=e,1==e&&(this.$route.meta.title="编辑满减券"),2==e&&(this.$route.meta.title="复制优惠券"))},methods:{moment:C.a,getCouponDetail:function(){var e=this;this.isLoading=!0,n["b"]({coupon_id:this.couponId}).then((function(t){var a=t.data||{},o=a.detail;e.detail=o,e.goodsData=o.goodsExcept||[],e.couponType=o.coupon_type||90,e.couponNumberType=o.limit_total_type||10,e.receiveNumberType=o.limit_receive_type||10,e.receive_type=o.receive_type||10,e.checkboxValue=o.overlay_discount||[],90==o.coupon_type?e.collectionMonth=[C()(o.start_time,"YYYY-MM-DD HH:mm:ss"),C()(o.end_time,"YYYY-MM-DD HH:mm:ss")]:e.collectionYear=[C()(o.start_time,"YYYY-MM-DD HH:mm:ss"),C()(o.end_time,"YYYY-MM-DD HH:mm:ss")]})).finally((function(){e.isLoading=!1}))},showSettingGoods:function(){this.goodsData?this.$refs.SettingGoods.open(this.goodsData):this.$refs.SettingGoods.open()},handleSettingGoods:function(){var e=this,t=p.a.get("selectList");t.forEach((function(t){e.goodsData.push({goods_id:t.goods_id,goods_name:t.goods_name,goods_price:t.goods_price,goods_sku_id:t.goods_sku_id,goods_sku_no:t.goods_sku_no})}))},deleteGoods:function(e){var t=this;this.$confirm({title:"提示",content:"确认删除吗?",okText:"确定",cancelText:"取消",onOk:function(){t.goodsData.splice(e,1)}})},timeFormate:function(e){var t=new Date(e).getFullYear(),a=new Date(e).getMonth()+1<10?"0"+(new Date(e).getMonth()+1):new Date(e).getMonth()+1;return t+"-"+a},timeFormateYear:function(e){return new Date(e).getFullYear()},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){var o={name:a.couponName,subtitle:a.couponSubTitle,describe:a.couponExplain,coupon_type:a.couponType,limit_receive_type:t.receiveNumberType,overlay_discount:t.checkboxValue,receive_type:t.receive_type};if(Number(a.achieveMoney)c)return void t.$message.error("推广开始时间不能大于结束时间",1.5);o.start_time=String(l),o.end_time=String(c)}return!e&&(t.editState?1==t.editState?(o.coupon_id=t.couponId,t.updateCoupon(o),!0):2!=t.editState||(t.addCoupon(o),!0):(t.addCoupon(o),!0))}t.$message.error("领取数量最少一张",1.5)}}))},addCoupon:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,n["a"]({form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1e3)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))},updateCoupon:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,n["c"]({form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1e3)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))},close:function(){this.$router.go(-1)},disabledMonth:function(e){return e&&e