(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6f075f66"],{"6cbc":function(e,t,a){},cd9c:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"container_box"},[a("el-card",{staticClass:"box-card mb20"},[a("div",{staticClass:"acea-row row-center row-middle"},[a("div",{staticClass:"pointer",on:{click:function(t){return e.back()}}},[a("i",{staticClass:"el-icon-arrow-left"}),e._v(" "),a("span",{staticClass:"pl10"},[e._v("返回")])]),e._v(" "),a("div",{staticClass:"f-s-18 f-w-500 ml32 add_title"},[e._v("\n "+e._s(e.isEdit&&!e.isCopy?"编辑优惠券":e.isCopy?"复制优惠券":"添加优惠券")+"\n ")])])]),e._v(" "),a("el-card",{attrs:{"body-style":{padding:"0 20px 20px"}}},[e.tabList.length>0?a("el-tabs",{model:{value:e.currentTab,callback:function(t){e.currentTab=t},expression:"currentTab"}},e._l(e.tabList,(function(e,t){return a("el-tab-pane",{key:t,attrs:{name:e.value,label:e.title}})})),1):e._e(),e._v(" "),a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"formValidate",staticClass:"formValidate",attrs:{rules:e.ruleValidate,model:e.formValidate,"label-width":"150px"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{directives:[{name:"show",rawName:"v-show",value:"1"===e.currentTab,expression:"currentTab === '1'"}]},[a("el-form-item",{attrs:{label:"优惠券名称:",prop:"name"}},[a("el-input",{staticClass:"selWidth",attrs:{size:"small",placeholder:"请输入优惠券名称",maxlength:"20"},model:{value:e.formValidate.name,callback:function(t){e.$set(e.formValidate,"name",t)},expression:"formValidate.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"优惠券面值(元):",prop:"money"}},[a("el-input-number",{staticClass:"selWidthNum",attrs:{type:"number",size:"small",disabled:e.isEdit&&!e.isCopy,max:9999,step:1,"step-strictly":"",placeholder:"请输入优惠券面值"},model:{value:e.formValidate.money,callback:function(t){e.$set(e.formValidate,"money",t)},expression:"formValidate.money"}},[a("span",{staticClass:"suffix_text",attrs:{slot:"suffix"},slot:"suffix"},[e._v("元")])])],1),e._v(" "),a("el-form-item",{attrs:{label:"使用门槛(元):",prop:"minPrice"}},[a("el-input-number",{staticClass:"selWidthNum",attrs:{size:"small",disabled:e.isEdit&&!e.isCopy,max:999999,step:1,"step-strictly":"",placeholder:"请输入使用门槛"},model:{value:e.formValidate.minPrice,callback:function(t){e.$set(e.formValidate,"minPrice",t)},expression:"formValidate.minPrice"}},[a("span",{staticClass:"suffix_text",attrs:{slot:"suffix"},slot:"suffix"},[e._v("元")])]),e._v(" "),a("p",{staticClass:"desc mt10"},[e._v("填写优惠券的最低消费金额,使用门槛为0时指无门槛")])],1),e._v(" "),a("el-form-item",{attrs:{label:"领取方式:",prop:"receiveType"}},[a("el-radio-group",{attrs:{disabled:e.isEdit&&!e.isCopy},model:{value:e.formValidate.receiveType,callback:function(t){e.$set(e.formValidate,"receiveType",t)},expression:"formValidate.receiveType"}},[a("el-radio",{attrs:{label:1}},[e._v("手动领取")]),e._v(" "),a("el-radio",{attrs:{label:3}},[e._v("平台自动发放")])],1),e._v(" "),a("p",{staticClass:"desc mt10"},[e._v("\n 1. 用户手动领取指用户需要在移动端的领券中心领取优惠券;"),a("br"),e._v("\n 2. 平台自动发放指其他营销活动可选择此类型优惠券,用户满足活动条件后直接提示发放 ;\n ")])],1),e._v(" "),1===e.formValidate.receiveType?a("el-form-item",{attrs:{label:"领取时间:",prop:"isTimeReceive"}},[a("el-radio-group",{attrs:{disabled:e.isEdit&&!e.isCopy},model:{value:e.formValidate.isTimeReceive,callback:function(t){e.$set(e.formValidate,"isTimeReceive",t)},expression:"formValidate.isTimeReceive"}},[a("el-radio",{attrs:{label:!0}},[e._v("时间段")]),e._v(" "),a("el-radio",{attrs:{label:!1}},[e._v("不限时")])],1)],1):e._e(),e._v(" "),e.formValidate.isTimeReceive&&1===e.formValidate.receiveType?a("el-form-item",{attrs:{prop:"collectionTime"}},[a("el-date-picker",{staticClass:"selWidth",attrs:{size:"small",type:"datetimerange","value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss","default-time":["00:00:00","23:59:59"],"start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":e.pickerOptionsForEditCoupon,align:"right"},on:{change:e.onchangeTime2},model:{value:e.formValidate.collectionTime,callback:function(t){e.$set(e.formValidate,"collectionTime",t)},expression:"formValidate.collectionTime"}}),e._v(" "),a("p",{staticClass:"desc mt10"},[e._v("优惠券可以在此时间范围之内领取")])],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"使用有效期:",prop:"isFixedTime"}},[a("el-radio-group",{model:{value:e.formValidate.isFixedTime,callback:function(t){e.$set(e.formValidate,"isFixedTime",t)},expression:"formValidate.isFixedTime"}},[a("el-radio",{attrs:{label:!1}},[e._v("天数")]),e._v(" "),a("el-radio",{attrs:{label:!0}},[e._v("时间段")])],1),e._v(" "),a("p",{staticClass:"desc mt10"},[e._v("\n "+e._s(!e.isEdit||e.isCopy?"":"优惠券编辑后,之前已经领取的优惠券使用有效期不会改变")+"\n ")])],1),e._v(" "),e.formValidate.isFixedTime?e._e():a("el-form-item",{attrs:{prop:"day"}},[a("el-input-number",{staticClass:"selWidthNum",attrs:{size:"small",placeholder:"请输入天数",max:999,step:1,"step-strictly":""},model:{value:e.formValidate.day,callback:function(t){e.$set(e.formValidate,"day",t)},expression:"formValidate.day"}},[a("span",{staticClass:"suffix_text",attrs:{slot:"suffix"},slot:"suffix"},[e._v("天")])]),e._v(" "),a("p",{staticClass:"desc mt10"},[e._v("领取之后多少天之后失效,失效的优惠券将不能使用")])],1),e._v(" "),e.formValidate.isFixedTime?a("el-form-item",{attrs:{prop:"validityTime"}},[a("el-date-picker",{staticClass:"selWidth",attrs:{size:"small",type:"datetimerange","value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss","default-time":["00:00:00","23:59:59"],"start-placeholder":"开始日期","end-placeholder":"结束日期",align:"right","picker-options":e.pickerOptionsForEditCoupon},on:{change:e.onchangeTime},model:{value:e.formValidate.validityTime,callback:function(t){e.$set(e.formValidate,"validityTime",t)},expression:"formValidate.validityTime"}})],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:!e.isEdit||e.isCopy?"发布数量(张):":"增加发布数量(张):",prop:"isLimited"}},[a("el-radio-group",{attrs:{disabled:e.isEdit&&!e.isCopy},model:{value:e.formValidate.isLimited,callback:function(t){e.$set(e.formValidate,"isLimited",t)},expression:"formValidate.isLimited"}},[a("el-radio",{attrs:{label:!0}},[e._v("限量")]),e._v(" "),a("el-radio",{attrs:{label:!1}},[e._v("不限量")])],1)],1),e._v(" "),e.formValidate.isLimited?a("el-form-item",{attrs:{prop:"total"}},[!e.isEdit||e.isCopy?a("el-input-number",{staticClass:"selWidthNum",attrs:{size:"small",placeholder:"请输入优惠券数量",max:999999,step:1,"step-strictly":""},model:{value:e.formValidate.total,callback:function(t){e.$set(e.formValidate,"total",t)},expression:"formValidate.total"}},[a("span",{staticClass:"suffix_text",attrs:{slot:"suffix"},slot:"suffix"},[e._v("张")])]):a("el-input-number",{staticClass:"selWidthNum",attrs:{size:"small",placeholder:"请输入优惠券数量",max:999999,step:1,"step-strictly":""},model:{value:e.formValidate.num,callback:function(t){e.$set(e.formValidate,"num",t)},expression:"formValidate.num"}},[a("span",{staticClass:"suffix_text",attrs:{slot:"suffix"},slot:"suffix"},[e._v("张")])]),e._v(" "),a("p",{staticClass:"desc mt10"},[e._v("\n "+e._s(!e.isEdit||e.isCopy?"填写优惠券的发放数量":"编辑时,填写优惠券增加的数量;例如:新增时填写2张优惠券,编辑时填写1,则编辑后总共发布3张优惠券")+"\n ")])],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"重复领取:",prop:"isRepeated"}},[a("el-radio-group",{model:{value:e.formValidate.isRepeated,callback:function(t){e.$set(e.formValidate,"isRepeated",t)},expression:"formValidate.isRepeated"}},[a("el-radio",{attrs:{label:!1}},[e._v("不可重复")]),e._v(" "),a("el-radio",{attrs:{label:!0}},[e._v("可重复")])],1),e._v(" "),1===e.formValidate.receiveType?a("p",{staticClass:"desc mt10"},[e._v("\n 可重复领取,若用户领取该优惠券且使用过后,可以再次领取;"),a("br"),e._v("\n 不可重复领取,若用户领取该优惠券无论是否使用,都不可再次领取\n ")]):a("p",{staticClass:"desc mt10"},[e._v("\n 可重复领取,若多个营销活动赠送同一优惠券,一个用户可领取多张;"),a("br"),e._v("\n 不可重复领取,若多个营销活动赠送同一优惠券,一个用户只能领取1张\n ")])],1),e._v(" "),a("el-form-item",{attrs:{label:"是否开启:"}},[a("el-switch",{attrs:{width:56,disabled:e.isEdit&&!e.isCopy,"active-text":"开启","inactive-text":"关闭"},model:{value:e.formValidate.status,callback:function(t){e.$set(e.formValidate,"status",t)},expression:"formValidate.status"}})],1)],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:"2"===e.currentTab,expression:"currentTab === '2'"}]},[a("el-form-item",{attrs:{"label-width":"0"}},[a("el-radio-group",{attrs:{disabled:e.isEdit&&!e.isCopy},model:{value:e.formValidate.category,callback:function(t){e.$set(e.formValidate,"category",t)},expression:"formValidate.category"}},[a("el-radio",{attrs:{label:3}},[e._v("通用")]),e._v(" "),a("el-radio",{attrs:{label:4}},[e._v("品类")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("商品")]),e._v(" "),a("el-radio",{attrs:{label:5}},[e._v("品牌")]),e._v(" "),a("el-radio",{attrs:{label:6}},[e._v("跨店")])],1)],1),e._v(" "),4==e.formValidate.category?a("el-form-item",{attrs:{label:"选择分类:",span:24,"label-width":"80px"}},[a("el-cascader",{ref:"cascader",staticClass:"selWidth",attrs:{clearable:"",options:e.adminProductClassify,props:e.categoryProps},model:{value:e.linkedData,callback:function(t){e.linkedData=t},expression:"linkedData"}})],1):e._e(),e._v(" "),2==e.formValidate.category?a("el-form-item",{attrs:{"label-width":"0"}},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.addGoods}},[e._v("添加商品")]),e._v(" "),a("el-button",{attrs:{size:"small",disabled:!e.multipleSelection.length},on:{click:e.batchDel}},[e._v("批量删除")])],1):e._e(),e._v(" "),2==e.formValidate.category?a("el-form-item",{attrs:{"label-width":"0"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],ref:"tableList",staticStyle:{width:"100%"},attrs:{data:e.tableData.data,size:"mini"},on:{"selection-change":e.handleSelectionChange,"select-all":e.selectAll,select:e.selectOne}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{prop:"id",label:"ID",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{attrs:{src:e.row.image,"preview-src-list":[e.row.image]}})],1)]}}],null,!1,1825039654)}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":!0,prop:"name",label:"商品名称","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"售价","min-width":"90"}}),e._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"70"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"140",fixed:"right",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.handleDelete(t.$index,t.row)}}},[e._v("删除")])]}}],null,!1,1945863928)})],1)],1):e._e(),e._v(" "),5==e.formValidate.category?a("el-form-item",{attrs:{label:"选择品牌:",span:24,"label-width":"100px",prop:"proBrandList"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",loading:e.loading,remote:"",placeholder:"请选择品牌"},model:{value:e.proBrandList,callback:function(t){e.proBrandList=t},expression:"proBrandList"}},e._l(e.productBrand,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id,disabled:!e.isShow}})})),1)],1):e._e(),e._v(" "),6==e.formValidate.category?a("el-form-item",{attrs:{label:"选择商户:",span:24,"label-width":"100px",prop:"merIds"}},[a("merchant-name",{attrs:{multiple:!0,merIdChecked:e.merIds},on:{getMerId:e.getMerId}})],1):e._e()],1)])],1)],1),e._v(" "),a("el-card",{staticClass:"fixed-card box-card",attrs:{"dis-hover":""}},[a("div",{staticClass:"acea-row row-center-wrapper"},[a("el-button",{directives:[{name:"show",rawName:"v-show",value:"1"===e.currentTab,expression:"currentTab === '1'"},{name:"debounceClick",rawName:"v-debounceClick",value:function(){e.submitForm("formValidate")},expression:"\n () => {\n submitForm('formValidate');\n }\n "}],attrs:{type:"primary",size:"small"}},[e._v("下一步")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"2"===e.currentTab,expression:"currentTab === '2'"}],attrs:{type:"primary",size:"small"},on:{click:function(t){e.currentTab="1"}}},[e._v("上一步")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"2"===e.currentTab&&e.checkPermi(["platform:coupon:add","platform:coupon:update"]),expression:"currentTab === '2' && checkPermi(['platform:coupon:add', 'platform:coupon:update'])"},{name:"debounceClick",rawName:"v-debounceClick",value:function(){e.save("formValidate")},expression:"\n () => {\n save('formValidate');\n }\n "}],attrs:{type:"primary",size:"small"}},[e._v("保存")])],1)])],1)},r=[],l=a("b7be"),s=a("2f62"),o=a("e350"),n=a("2c2c");function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function c(e){return f(e)||u(e)||v(e)||m()}function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e){if(Array.isArray(e))return b(e)}function p(e,t){var a="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=v(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,s=!0,o=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){o=!0,l=e},f:function(){try{s||null==a.return||a.return()}finally{if(o)throw l}}}}function v(e,t){if(e){if("string"===typeof e)return b(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a