1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59176e6e"],{"0a7d":function(e,t,l){"use strict";l.d(t,"a",(function(){return r})),l.d(t,"i",(function(){return n})),l.d(t,"g",(function(){return o})),l.d(t,"c",(function(){return i})),l.d(t,"h",(function(){return u})),l.d(t,"d",(function(){return s})),l.d(t,"e",(function(){return c})),l.d(t,"f",(function(){return f})),l.d(t,"b",(function(){return v})),l.d(t,"j",(function(){return p}));var a=l("829b"),r=(l("4328"),function(e){return Object(a["a"])({url:"/api-web/sysCoupon/add",data:e,method:"post",requestType:"form"})}),n=function(e){return Object(a["a"])({url:"/api-web/sysCoupon/updateCoupon",data:e,method:"post",requestType:"form"})},o=function(e){return Object(a["a"])({url:"/api-web/sysCoupon/queryPage",data:e,params:e,method:"get"})},i=function(e){return Object(a["a"])({url:"/api-web/sysCoupon/delete",data:e,method:"post",requestType:"form"})},u=function(e){return Object(a["a"])({url:"/api-web/sysCouponCode/queryPage",data:e,params:e,method:"get"})},s=function(e){return Object(a["a"])({url:"/api-web/sysCouponIssue/issueCoupon",data:e,method:"post"})},c=function(e){return Object(a["a"])({url:"/api-web/sysCouponIssue/queryIssueRecord",data:e,method:"post"})},f=function(e){return Object(a["a"])({url:"/api-web/sysCouponIssue/queryIssueDetail",data:e,method:"post"})},v=function(e){return Object(a["a"])({url:"/api-web/sysCouponIssue/checkRevoke",data:e,method:"post"})},p=function(e){return Object(a["a"])({url:"/api-web/sysCouponIssue/revokeCoupon",data:e,method:"post"})}},"92e3":function(e,t,l){"use strict";l.d(t,"u",(function(){return u})),l.d(t,"F",(function(){return s})),l.d(t,"s",(function(){return c})),l.d(t,"c",(function(){return f})),l.d(t,"C",(function(){return v})),l.d(t,"S",(function(){return p})),l.d(t,"R",(function(){return d})),l.d(t,"d",(function(){return b})),l.d(t,"J",(function(){return m})),l.d(t,"w",(function(){return h})),l.d(t,"U",(function(){return T})),l.d(t,"t",(function(){return E})),l.d(t,"o",(function(){return y})),l.d(t,"T",(function(){return O})),l.d(t,"M",(function(){return I})),l.d(t,"W",(function(){return C})),l.d(t,"X",(function(){return R})),l.d(t,"L",(function(){return S})),l.d(t,"P",(function(){return g})),l.d(t,"A",(function(){return N})),l.d(t,"l",(function(){return _})),l.d(t,"Q",(function(){return w})),l.d(t,"V",(function(){return A})),l.d(t,"G",(function(){return x})),l.d(t,"m",(function(){return D})),l.d(t,"v",(function(){return L})),l.d(t,"K",(function(){return k})),l.d(t,"f",(function(){return M})),l.d(t,"e",(function(){return j})),l.d(t,"I",(function(){return U})),l.d(t,"H",(function(){return G})),l.d(t,"O",(function(){return P})),l.d(t,"E",(function(){return H})),l.d(t,"a",(function(){return $})),l.d(t,"x",(function(){return Y})),l.d(t,"p",(function(){return V})),l.d(t,"n",(function(){return q})),l.d(t,"q",(function(){return B})),l.d(t,"g",(function(){return F})),l.d(t,"D",(function(){return J})),l.d(t,"r",(function(){return X})),l.d(t,"B",(function(){return K})),l.d(t,"z",(function(){return W})),l.d(t,"y",(function(){return z})),l.d(t,"h",(function(){return Q})),l.d(t,"k",(function(){return Z})),l.d(t,"i",(function(){return ee})),l.d(t,"j",(function(){return te})),l.d(t,"N",(function(){return le})),l.d(t,"b",(function(){return re}));var a=l("b85c"),r=l("3835"),n=l("267e"),o=sessionStorage.getItem("tenantConfig");o=o?JSON.parse(o):{};var i=o.tenantId,u=null,s=null;1==i?(s=[{label:"声部课",value:"SINGLE"},{label:"合奏课",value:"MIX"},{label:"基础技能课",value:"HIGH"},{label:"线上基础技能课",value:"HIGH_ONLINE"},{label:"乐团网管课",value:"MUSIC_NETWORK"},{label:"集训声部课",value:"TRAINING_SINGLE"},{label:"集训合奏课",value:"TRAINING_MIX"},{label:"课堂课",value:"CLASSROOM"},{label:"综合课",value:"COMPREHENSIVE"}],u=[{label:"声部课",value:"SINGLE"},{label:"合奏课",value:"MIX"},{label:"基础技能课",value:"HIGH"},{label:"线上基础技能课",value:"HIGH_ONLINE"},{label:"vip课",value:"VIP"},{label:"试听课",value:"DEMO"},{label:"综合课",value:"COMPREHENSIVE"},{label:"网管课",value:"PRACTICE"},{label:"乐团网管课",value:"MUSIC_NETWORK"},{label:"启蒙课",value:"ENLIGHTENMENT"},{label:"集训声部课",value:"TRAINING_SINGLE"},{label:"集训合奏课",value:"TRAINING_MIX"},{label:"课堂课",value:"CLASSROOM"},{label:"对外课",value:"COMM"}]):(s=[{label:"声部课",value:"SINGLE"},{label:"合奏课",value:"MIX"},{label:"基础技能课",value:"HIGH"},{label:"集训声部课",value:"TRAINING_SINGLE"},{label:"集训合奏课",value:"TRAINING_MIX"},{label:"课堂课",value:"CLASSROOM"},{label:"综合课",value:"COMPREHENSIVE"}],u=[{label:"声部课",value:"SINGLE"},{label:"合奏课",value:"MIX"},{label:"vip课",value:"VIP"},{label:"试听课",value:"DEMO"},{label:"综合课",value:"COMPREHENSIVE"},{label:"网管课",value:"PRACTICE"},{label:"启蒙课",value:"ENLIGHTENMENT"},{label:"集训声部课",value:"TRAINING_SINGLE"},{label:"集训合奏课",value:"TRAINING_MIX"},{label:"课堂课",value:"CLASSROOM"},{label:"对外课",value:"COMM"}]);var c=[{label:"乐团课",value:"MUSIC"},{label:"VIP课",value:"VIP"},{label:"网管课",value:"PRACTICE"}],f=[{label:"正常签到",value:1},{label:"异常签到",value:0}],v=[{label:"兼职",value:"PART_TIME"},{label:"全职",value:"FULL_TIME"},{label:"劳务",value:"LABOUR"}],p=[{label:"正常",value:"0"},{label:"冻结",value:"1"},{label:"锁定",value:"9"}],d=[{value:"NORMAL",label:"正常"},{value:"TRUANT",label:"旷课"},{value:"LEAVE",label:"请假"}],b=[].concat(d,[{value:"QUIT_SCHOOL",label:"休学"},{value:"DROP_OUT",label:"退学"},{value:"LATE",label:"迟到"}]),m=[{value:"APPLY",label:"报名"},{value:"RENEW",label:"续费"},{value:"MEMBER",label:"会员购买"},{value:"SMALL_CLASS_TO_BUY",label:"VIP购买"},{value:"SPORADIC",label:"零星收费"},{value:"LUCK",label:"福袋活动"},{value:"DEGREE_REGISTRATION",label:"考级报名"},{value:"DOUBLE_ELEVEN2020",label:"2020双十一活动"},{value:"DOUBLE_ELEVEN2021",label:"2021双十一活动"},{value:"DEGREE",label:"儿童节活动"},{value:"PRACTICE_GROUP_BUY",label:"网管课"},{value:"PRACTICE_GROUP_RENEW",label:"网管课续费"},{value:"REPAIR",label:"乐器维修"},{value:"OUTORDER",label:"外部收入"},{value:"GOODS_SELL",label:"商品销售"},{value:"SUBJECT_CHANGE",label:"声部更换"},{value:"MAINTENANCE",label:"乐器保养"},{value:"ADD_STUDENT",label:"乐团报名"},{value:"REPLACEMENT",label:"乐器置换"},{value:"SCHOOL",label:"学校订单"},{value:"PERSONAL",label:"个人订单"},{value:"OTHER",label:"其他"},{value:"ACTIVITY",label:"活动购买"},{value:"LIVE_BUY",label:"直播购物"}],h=[{value:"ING",label:"交易中"},{value:"SUCCESS",label:"成功交易"},{value:"FAILED",label:"交易失败"},{value:"CLOSE",label:"交易关闭"}],T=[{value:"0",text:"未开始"},{value:"1",text:"报名中"},{value:"5",text:"报名结束"},{value:"2",text:"进行中"},{value:"4",text:"已结束"},{value:"3",text:"取消"},{value:"6",text:"暂停"}],E=[{value:"NOT_START",label:"未开始"},{value:"UNDERWAY",label:"进行中"},{value:"OVER",label:"已结束"}],y=[{value:"NORMAL",label:"进行中"},{value:"FINISH",label:"结束"},{value:"CANCEL",label:"关闭"},{value:"LOCK",label:"锁定"}],O=[{value:"RECHARGE",label:"充值"},{value:"CONSUME",label:"建课"},{value:"RETURN",label:"退课"},{value:"MANUAL_ADD",label:"系统充值"},{value:"MANUAL_SUB",label:"系统扣除"}],I=[{value:"FREE",label:"免费"},{value:"CHARGE",label:"收费"},{value:"TRIAL",label:"试听课"},{value:"CARE_PACKAGE",label:"关心包"},{value:"COME_ON_PACKAGE",label:"加油包"}],C=[{value:"课程推荐",label:"课程推荐",children:[{value:"新课推荐",label:"新课推荐"},{value:"续费提醒",label:"续费提醒"}]},{value:"常规回访",label:"常规回访",children:[{value:"课后及训练回访",label:"课后及训练回访"},{value:"练习及乐团表现",label:"练习及乐团表现"}]},{value:"其它",label:"其它",children:[{value:"其它",label:"其它"}]}],R=[{value:"课程推荐",label:"课程推荐",children:[{value:"新课推荐",label:"新课推荐"},{value:"续费提醒",label:"续费提醒"}]},{value:"常规回访",label:"常规回访",children:[{value:"课后及训练回访",label:"课后及训练回访"},{value:"练习及乐团表现",label:"练习及乐团表现"},{label:"考勤申诉",value:"考勤申诉"},{value:"异常请假回访",label:"异常请假回访"}]},{value:"小课回访",label:"小课回访",children:[{value:"VIP课回访",label:"VIP课回访"},{value:"乐理课回访",label:"乐理课回访"},{value:"网管课回访",label:"网管课回访"}]},{value:"云教练",label:"云教练",children:[{value:"体验回访",label:"体验回访"}]},{value:"其它",label:"其它",children:[{value:"其它",label:"其它"},{value:"会员续费",label:"会员续费"}]}],S=[{value:"YQPAY",label:"双乾"},{value:"BALANCE",label:"余额"},{value:"ADAPAY",label:"汇付"}],g=[{value:"INSTRUMENT",label:"乐器销售"},{value:"ACCESSORIES",label:"配件销售"},{value:"SCHOOL_BUY",label:"学校采购"},{value:"OTHER",label:"其它"}],N=[{value:"INSTRUMENT",label:"乐器"},{value:"ACCESSORIES",label:"辅件"},{value:"TEACHING",label:"教材"},{value:"STAFF",label:"教谱"},{value:"OTHER",label:"其它"}],_=[{value:"1",label:"一年级"},{value:"2",label:"二年级"},{value:"3",label:"三年级"},{value:"4",label:"四年级"},{value:"5",label:"五年级"},{value:"6",label:"六年级"},{value:"7",label:"初一"},{value:"8",label:"初二"},{value:"9",label:"初三"},{value:"10",label:"高一"},{value:"11",label:"高二"},{value:"12",label:"高三"}],w=[{value:"INTERNAL",label:"内部"},{value:"EXTERNAL",label:"外部"},{value:"ALL",label:"全部"}],A=[{label:"不限制",value:"1"},{label:"线上不可调为线下",value:"0"},{label:"线下不可调为线上",value:"2"},{label:"线上线下不可互调",value:"3"}],x=ae(n["musicGroupType"]),D=ae(n["classTime"]),L=ae(n["courseViewType"]),k=ae(n["payOrderType"]),M=ae(n["auditType"]),j=ae(n["auditPaymentType"]),U=ae(n["orderServerType"]),G=ae(n["orderAuditType"]),P=ae(n["rewardModeType"]),H=ae(n["musicClassType"]),$=ae(n["ProbationPeriodStatus"]),Y=ae(n["downListType"]),V=ae(n["conclusion"]),q=ae(n["clientType"]),B=ae(n["couponType"]),F=ae(n["backType"]),J=ae(n["memberEnum"]),X=ae(n["coupontypeDetail"]),K=ae(n["issue"]),W=ae(n["feedbackType"]),z=ae(n["feedbackTypeDesc"]),Q=ae(n["campState"]),Z=ae(n["catgGoupType"]),ee=ae(n["catRole"]),te=ae(n["catType"]),le=ae(n["quiteReason"]);function ae(e){var t=[];for(var l in e)t.push({label:e[l],value:l});return t}var re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["value","label"],l=Object(r["a"])(t,2),n=l[0],o=l[1],i={};if(e&&e.length){var u,s=Object(a["a"])(e);try{for(s.s();!(u=s.n()).done;){var c=u.value;i[c[n]]=c[o]}}catch(f){s.e(f)}finally{s.f()}}return i}},dfce:function(e,t,l){},eaf4:function(e,t,l){"use strict";l.r(t);var a=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"m-container"},[l("h2",[l("el-page-header",{attrs:{content:e.title},on:{back:e.onCancel}})],1),e._v(" "),l("div",{staticClass:"m-core"},[l("el-form",{ref:"form",staticClass:"form",attrs:{model:e.form}},[l("el-row",[l("el-col",{staticStyle:{width:"500px"}},[l("el-form-item",{attrs:{label:"优惠券名称",prop:"name",rules:[{required:!0,message:"请输入优惠卷名称"}]}},[l("el-input",{attrs:{disabled:e.isDisabled,placeholder:"请输入优惠卷名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{staticStyle:{width:"500px"}},[l("el-form-item",{attrs:{label:"可用分部",prop:"organId",rules:[{required:!0,message:"请选择可用分部"}]}},[l("br"),e._v(" "),l("select-all",{staticClass:"multiple",staticStyle:{width:"100% !important"},attrs:{filterable:"",multiple:"",clearable:"",placeholder:"请选择分部"},model:{value:e.form.organId,callback:function(t){e.$set(e.form,"organId","string"===typeof t?t.trim():t)},expression:"form.organId"}},e._l(e.selects.branchs,(function(e,t){return l("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{staticStyle:{width:"500px"}},[l("el-form-item",{attrs:{label:"描述",prop:"description",rules:[{required:!0,message:"请输入优惠卷描述"}]}},[l("el-input",{attrs:{disabled:e.isDisabled,maxlength:"20",type:"textarea",rows:3,"show-word-limit":"",placeholder:"请输入优惠券描述,该描述会在优惠券上展示"},model:{value:e.form.description,callback:function(t){e.$set(e.form,"description",t)},expression:"form.description"}})],1)],1)],1),e._v(" "),l("el-row",{attrs:{gutter:20}},[l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{label:"领券方式",prop:"issuanceType",rules:[{required:!0,message:"领券方式"}]}},[l("el-select",{staticStyle:{width:"355px !important"},attrs:{disabled:e.isDisabled,placeholder:"领券方式",filterable:"",clearable:""},model:{value:e.form.issuanceType,callback:function(t){e.$set(e.form,"issuanceType","string"===typeof t?t.trim():t)},expression:"form.issuanceType"}},[l("el-option",{attrs:{value:0,label:"学员主动领取"}}),e._v(" "),l("el-option",{attrs:{value:1,label:"后台手动发放"}})],1)],1)],1),e._v(" "),l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{label:"优惠券类型",prop:"typeDetail",rules:[{required:!0,message:"请选择优惠券类型"}]}},[l("el-select",{staticStyle:{width:"355px !important"},attrs:{disabled:e.isDisabled,placeholder:"请选择优惠券类型",filterable:"",clearable:""},model:{value:e.form.typeDetail,callback:function(t){e.$set(e.form,"typeDetail","string"===typeof t?t.trim():t)},expression:"form.typeDetail"}},e._l(e.coupontypeDetail,(function(e){return l("el-option",{key:e.value,attrs:{value:e.value,label:e.label}})})),1)],1)],1)],1),e._v(" "),l("el-row",{attrs:{gutter:20}},["FULL_REDUCTION"==e.form.type?l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{label:"满减金额",prop:"fullAmount",rules:[{required:!0,message:"请输入满减金额"}]}},[l("el-input",{attrs:{placeholder:"请输入满减金额",disabled:e.isDisabled},model:{value:e.form.fullAmount,callback:function(t){e.$set(e.form,"fullAmount",t)},expression:"form.fullAmount"}},[l("template",{slot:"append"},[e._v("元")])],2)],1)],1):e._e(),e._v(" "),"FULL_REDUCTION"==e.form.type?l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{label:"面值",prop:"faceValue",rules:[{required:!0,message:"请输入面值"}]}},[l("el-input",{attrs:{placeholder:"请输入面值",disabled:e.isDisabled},model:{value:e.form.faceValue,callback:function(t){e.$set(e.form,"faceValue",t)},expression:"form.faceValue"}},[l("template",{slot:"append"},[e._v("元")])],2)],1)],1):e._e(),e._v(" "),"DISCOUNT"==e.form.type?l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{label:"折扣",prop:"faceValue",rules:[{required:!0,message:"请输入折扣"}]}},[l("el-input",{attrs:{placeholder:"请输入折扣",disabled:e.isDisabled},model:{value:e.form.faceValue,callback:function(t){e.$set(e.form,"faceValue",t)},expression:"form.faceValue"}},[l("template",{slot:"append"},[e._v("%")])],2)],1)],1):e._e()],1),e._v(" "),l("el-row",{attrs:{gutter:20}},[l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{label:"有效期类型",prop:"effectiveType",rules:[{required:!0,message:"请选择有效期类型"}]}},[l("el-select",{staticStyle:{width:"355px !important"},attrs:{placeholder:"优惠券类型",filterable:"",clearable:"",disabled:e.isDisabled},on:{change:e.changeEffectiveType},model:{value:e.form.effectiveType,callback:function(t){e.$set(e.form,"effectiveType","string"===typeof t?t.trim():t)},expression:"form.effectiveType"}},[l("el-option",{attrs:{label:"固定有效期天数",value:"DAYS"}}),e._v(" "),l("el-option",{attrs:{label:"固定时间段",value:"TIME_BUCKET"}})],1)],1)],1),e._v(" "),"DAYS"==e.form.effectiveType?l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{prop:"deadline",rules:[{required:!0,message:"请输入有效期天数"}]}},[l("span",{staticStyle:{color:"#606266"}},[l("span",{staticStyle:{color:"#f56c6c"}},[e._v("*")]),e._v("有效期天数\n "),l("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[l("div",{attrs:{slot:"content"},slot:"content"},[e._v("自领取之日起多少天有效")]),e._v(" "),l("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c"}})])],1),e._v(" "),l("el-input",{attrs:{placeholder:"请输入有效期天数",disabled:e.isDisabled},model:{value:e.form.deadline,callback:function(t){e.$set(e.form,"deadline",t)},expression:"form.deadline"}},[l("template",{slot:"append"},[e._v("天")])],2)],1)],1):e._e(),e._v(" "),"TIME_BUCKET"==e.form.effectiveType?l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{prop:"effectiveTime",rules:[{required:!0,message:"请选择有效期"}]}},[l("span",{staticStyle:{color:"#606266"}},[l("span",{staticStyle:{color:"#f56c6c"}},[e._v("*")]),e._v("有效期\n "),l("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[l("div",{attrs:{slot:"content"},slot:"content"},[e._v("优惠券可使用时间段")]),e._v(" "),l("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c"}})])],1),e._v(" "),l("el-date-picker",{staticStyle:{width:"100%"},attrs:{"picker-options":{firstDayOfWeek:1},type:"datetimerange","default-time":["00:00:00","23:59:59"],"range-separator":"-","start-placeholder":"活动开始日期","end-placeholder":"活动结束日期",disabled:e.isDisabled},model:{value:e.form.effectiveTime,callback:function(t){e.$set(e.form,"effectiveTime",t)},expression:"form.effectiveTime"}})],1)],1):e._e()],1),e._v(" "),l("el-row",{attrs:{gutter:20}},[l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{label:"库存总量",prop:"stockCount",rules:[{required:!0,message:"请输入库存总量"}]}},[l("el-input",{attrs:{disabled:-1==e.form.stockCount,placeholder:"请输入库存总量"},model:{value:e.form.stockCount,callback:function(t){e.$set(e.form,"stockCount",t)},expression:"form.stockCount"}},[l("template",{slot:"append"},[e._v("张")])],2),e._v(" "),l("el-checkbox",{attrs:{"true-label":-1,"false-label":""},on:{change:function(t){e.checkNo(t,"stockCount")}},model:{value:e.form.stockCount,callback:function(t){e.$set(e.form,"stockCount",t)},expression:"form.stockCount"}},[e._v("不限制")])],1)],1),e._v(" "),l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{prop:"limitExchangeNum",rules:[{required:!0,message:"请输入领取上限"},{pattern:/^[1-9][0-9]?$/,message:"请输入1-99的正整数",trigger:"blur"}]}},[l("span",{staticStyle:{color:"#606266"}},[l("span",{staticStyle:{color:"#f56c6c"}},[e._v("*")]),e._v(" 领取上限\n "),l("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[l("div",{attrs:{slot:"content"},slot:"content"},[e._v("用户可领取最大张数")]),e._v(" "),l("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c"}})])],1),e._v(" "),l("el-input",{attrs:{disabled:e.isDisabled,placeholder:"请输入领取上限"},model:{value:e.form.limitExchangeNum,callback:function(t){e.$set(e.form,"limitExchangeNum",t)},expression:"form.limitExchangeNum"}},[l("template",{slot:"append"},[e._v("张")])],2)],1)],1)],1),e._v(" "),l("el-row",{attrs:{gutter:20}},[l("el-col",{staticStyle:{width:"395px"}},[l("el-form-item",{attrs:{label:"领取时间",prop:"getTime",rules:[{required:!0,message:"请输入领取时间"}]}},[l("el-date-picker",{staticStyle:{width:"100%"},attrs:{"picker-options":{firstDayOfWeek:1},type:"datetimerange","default-time":["00:00:00","23:59:59"],"range-separator":"-","start-placeholder":"活动开始日期","end-placeholder":"活动结束日期"},model:{value:e.form.getTime,callback:function(t){e.$set(e.form,"getTime",t)},expression:"form.getTime"}})],1)],1)],1),e._v(" "),l("el-form-item",[e.activeRow?l("el-button",{attrs:{type:"primary"},on:{click:e.resetCoupon}},[e._v("保存")]):l("el-button",{attrs:{type:"primary"},on:{click:e.addCoupon}},[e._v("提交")]),e._v(" "),l("el-button",{attrs:{type:"danger"},on:{click:e.resetForm}},[e._v("重置")])],1)],1)],1)])},r=[],n=l("15fd"),o=(l("96cf"),l("1da1")),i=(l("7f7f"),l("5530")),u=(l("c5f6"),l("28a5"),l("0a7d")),s=l("92e3"),c=l("ed08"),f={data:function(){return{couponTypeList:s["q"],coupontypeDetail:s["r"],form:{name:"",description:"",type:"FULL_REDUCTION",faceValue:"",fullAmount:"",effectiveType:"",effectiveTime:[],stockCount:"",warningStockNum:"",limitExchangeNum:"",getTime:[],organId:[]},activeRow:null,isDisabled:!1,title:"新增优惠券",warningStockNum:""}},mounted:function(){if(this.$store.dispatch("setBranchs"),this.$route.query.row){var e;this.activeRow=JSON.parse(this.$route.query.row);var t="";this.activeRow.useCondition&&JSON.parse(this.activeRow.useCondition)&&JSON.parse(this.activeRow.useCondition).organId&&(t=JSON.parse(this.activeRow.useCondition).organId);var l=[];t&&(l=t.split(",").map((function(e){return Number(e)}))||[]),this.form=Object(i["a"])(Object(i["a"])({},this.activeRow),{},{organId:l}),this.form.type="FULL_REDUCTION";var a=this.activeRow.effectiveStartTime,r=this.activeRow.effectiveExpireTime,n=this.activeRow.startDate,o=this.activeRow.endDate;this.$set(this.form,"effectiveTime",[a,r]),this.$set(this.form,"getTime",[n,o]),this.title=this.activeRow.name,(null===(e=this.activeRow)||void 0===e?void 0:e.consumeNum)>0&&(this.isDisabled=!0)}},methods:{changeType:function(e){this.form.faceValue="",this.form.fullAmount=""},changeEffectiveType:function(){this.$set(this.form,"effectiveTime",[]),this.$set(this.form,"deadline",null)},onCancel:function(){this.$router.push("/couponManager")},resetForm:function(){if(this.$refs.form.resetFields(),this.activeRow){var e=JSON.parse(this.activeRow.useCondition),t=[];e&&(t=e.split(",")||[]),this.form=Object(i["a"])(Object(i["a"])({},this.activeRow),{},{organId:t});var l=this.activeRow.effectiveStartTime,a=this.activeRow.effectiveExpireTime,r=this.activeRow.startDate,n=this.activeRow.endDate;this.$set(this.form,"effectiveTime",[l,a]),this.$set(this.form,"getTime",[r,n])}},addCoupon:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$refs.form.validate(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(l){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:l&&t.$confirm("您确定新增优惠券?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(regeneratorRuntime.mark((function e(){var l,a,r,o,s,f;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,l=t.form,a=l.effectiveTime,r=l.getTime,o=Object(n["a"])(l,["effectiveTime","getTime"]),s=JSON.stringify({organId:t.form.organId.join(",")}),f=Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},o),Object(c["a"])(a,["effectiveStartTime","effectiveExpireTime"],"YYYY-MM-DD HH:mm:ss")),Object(c["a"])(r,["startDate","endDate"],"YYYY-MM-DD HH:mm:ss")),{},{useCondition:s}),e.next=6,Object(u["a"])(f);case 6:e.sent,t.$message.success("新增成功"),t.onCancel(),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](0),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))).catch((function(){}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),resetCoupon:function(){var e=this;this.$refs.form.validate(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(l){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:l&&e.$confirm("您确定修改优惠券?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(regeneratorRuntime.mark((function t(){var l,a,r,o,s,f;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,l=e.form,a=l.effectiveTime,r=l.getTime,o=Object(n["a"])(l,["effectiveTime","getTime"]),s=JSON.stringify({organId:e.form.organId.join(",")}),f=Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},o),Object(c["a"])(a,["effectiveStartTime","effectiveExpireTime"],"YYYY-MM-DD HH:mm:ss")),Object(c["a"])(r,["startDate","endDate"],"YYYY-MM-DD HH:mm:ss")),{},{useCondition:s}),t.next=6,Object(u["i"])(f);case 6:t.sent,e.$message.success("修改成功"),e.onCancel(),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](0),console.log(t.t0);case 14:case"end":return t.stop()}}),t,null,[[0,11]])})))).catch((function(){}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},checkNo:function(e,t){this.form[t]=e||null}}},v=f,p=(l("f14f"),l("2877")),d=Object(p["a"])(v,a,r,!1,null,"49288060",null);t["default"]=d.exports},ed08:function(e,t,l){"use strict";l.d(t,"b",(function(){return o})),l.d(t,"a",(function(){return i}));var a=l("ade3"),r=(l("c5f6"),l("28a5"),l("a481"),l("6b54"),l("53ca"),l("5a0c")),n=l.n(r);var o=function(e){var t=[];for(var l in e)if(e.hasOwnProperty(l)){var a=e[l],r=l.toLocaleUpperCase();t.push({label:a,value:"TRUE"===r||"FALSE"===r?"TRUE"===r:l})}return t},i=function(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";return e&&e.length?(t={},Object(a["a"])(t,l[0]||"start",n()(e[0]).isValid()?n()(e[0]).format(r):""),Object(a["a"])(t,l[1]||"end",n()(e[1]).isValid()?n()(e[1]).format(r):""),t):{}}},f14f:function(e,t,l){"use strict";l("dfce")}}]);
|