徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jiuhaoshenghuo/public/view_admin/js/chunk-ef5bdba6.743d262d.js

1 lines
55 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-ef5bdba6"],{"082a":function(t,e,r){"use strict";r.r(e);var a=r("2f62"),n=r("b7be"),o=r("c24f"),i=r("c4c8"),s=r("5671"),c=r("f1c7"),l=r("0f0e"),u=r("c4ad"),d=r("e449"),f=r("d708");function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){b(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function b(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=m(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,e||"default");if("object"!=m(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==m(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v={name:"addPiecesDiscount",components:{userLabel:l.a,goodsList:u.default,couponList:d.a,storeLabelList:c.a,storeList:s.a},data:function(){return{storesList:[],storeModals:!1,roterPre:f.a.roterPre,storeDataLabel:[],storeLabelShow:!1,props:{emitPath:!1,multiple:!0},brandData:[],goodsType:0,grid:{xl:7,lg:7,md:12,sm:24,xs:24},modals:!1,tableData:[],headTab:[{name:"基础设置",type:"1"},{name:"添加商品",type:"2"},{name:"适用门店",type:"3"}],discountType:[{name:"满N元",title:"例:满100元减10元",id:1},{name:"满N件",title:"例:满3件减10元",id:2}],activityType:[{name:"优惠券",type:"5"},{name:"第N件N折",type:"2"},{name:"限时折扣",type:"1"}],currentTab:"1",dataLabel:[],labelShow:!1,formValidate:{applicable_type:1,name:"",section_time:[],is_label:0,label_id:[],is_overlay:"0",overlay:[],product_partake_type:1,product_id:[],threshold_type:1,promotions_cate:"1",promotions:[],brand_id:[],store_label_id:[]},promotionsData:[{threshold:0,discount_type:1,discount:1,money:0}],indexCoupon:0,indexGoods:0,ruleValidate:{name:[{required:!0,message:"请输入活动名称",trigger:"blur"}],section_time:[{required:!0,type:"array",message:"请选择活动时间",trigger:"change"}],promotions_cate:[{required:!0,message:"请设置满送方式",trigger:"change"}],is_overlay:[{required:!0,message:"请设置优惠叠加",trigger:"change"}]}}},computed:h(h({},Object(a.e)("admin/layout",["isMobile","menuCollapse"])),{},{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"},labelBottom:function(){return this.isMobile?void 0:15}}),created:function(){},mounted:function(){this.setCopyrightShow({value:!1}),0!=this.$route.params.id&&this.getDiscountInfo()},destroyed:function(){this.setCopyrightShow({value:!0})},methods:h(h({},Object(a.d)("admin/layout",["setCopyrightShow"])),{},{delte:function(t){var e=this;this.storesList.forEach((function(r,a){t.id==r.id&&e.storesList.splice(a,1)}))},addStore:function(){this.storeModals=!0},cancelStore:function(){this.storeModals=!1},getStoreId:function(t){this.storeModals=!1;var e=this.storesList.concat(t),r=this.unique(e);this.storesList=r},closeStoreLabel:function(t){var e=this.storeDataLabel.indexOf(this.storeDataLabel.filter((function(e){return e.id==t.id}))[0]);this.storeDataLabel.splice(e,1)},openStoreLabel:function(){this.storeLabelShow=!0,this.$refs.storeLabel.storeLabel(JSON.parse(JSON.stringify(this.storeDataLabel)))},activeStoreData:function(t){this.storeLabelShow=!1,this.storeDataLabel=t},storeLabelClose:function(){this.storeLabelShow=!1},goodTap:function(t){4==t&&this.getBrandList()},getBrandList:function(){var t=this;Object(i.f)().then((function(e){t.brandData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},changeFull:function(){this.promotionsData=[],this.addLevel()},addLevel:function(){this.promotionsData.push({threshold:0,discount_type:1,discount:1,money:0})},discountTypeTap:function(t){this.formValidate.threshold_type=t.id,2==t.id&&this.promotionsData.forEach((function(t){t.threshold=0}))},getDiscountInfo:function(){var t=this;Object(n.D)(this.$route.params.id).then((function(e){t.formValidate=e.data.info,t.storesList=e.data.info.stores||[],t.formValidate.is_overlay=t.formValidate.is_overlay.toString(),t.formValidate.promotions_cate=t.formValidate.promotions_cate.toString(),t.tableData=e.data.info.products,t.dataLabel=e.data.info.label_id,t.storeDataLabel=e.data.info.store_label_id,4==e.data.info.product_partake_type&&t.getBrandList();var r=e.data.info.promotions;r.forEach((function(t){1==t.discount_type?(t.money=t.discount,t.discount=1):t.money=0})),t.promotionsData=r})).catch((function(e){t.$Message.error(e.msg)}))},del:function(t){var e=this;this.tableData.forEach((function(r,a){if(t.id==r.id)return e.tableData.splice(a,1);r.attrValue.forEach((function(n,o){if(t.id==n.id)return 1==r.attrValue.length?e.tableData.splice(a,1):r.attrValue.splice(o,1)}))}))},addLabel:function(){this.$modalForm(Object(o.S)(0)).then((function(){}))},addGoods:function(){this.modals=!0},cancel:function(){this.modals=!1},unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},getProductId:function(t){this.modals=!1;var e=this.tableData.concat(t),r=this.unique(e);r.forEach((function(t){t.attrValue.forEach((function(e){e.cate_name=t.cate_name,e.store_label=t.store_label}))})),this.tableData=r},onchangeTime:function(t){this.formValidate.section_time=t},closeLabel:function(t){var e=this.dataLabel.indexOf(this.dataLabel.filter((function(e){return e.id==t.id}))[0]);this.dataLabel.splice(e,1)},activeData:function(t){this.labelShow=!1,this.dataLabel=t},openLabel:function(t){this.labelShow=!0,this.$refs.userLabel.userLabel(JSON.parse(JSON.stringify(this.dataLabel)))},labelClose:function(){this.labelShow=!1},delGrade:function(t){this.promotionsData.splice(t,1)},upTab:function(){1==this.currentTab&&0!=this.formValidate.product_type?this.currentTab=(Number(this.currentTab)-2).toString():this.currentTab=(Number(this.currentTab)-1).toString()},downTab:function(t){var e=this;this.$refs[t].validate((function(t){if(t){if(e.formValidate.is_label&&!e.dataLabel.length)return e.$Message.warning("请选择用户关联标签");if(parseInt(e.formValidate.is_overlay)&&!e.formValidate.overlay.length)return e.$Message.warning("请选择叠加的营销活动");if(""==e.formValidate.section_time[0])return e.$Message.warning("请选择活动时间");e.currentTab=(Number(e.currentTab)+1).toString()}else e.$Message.warning("请完善数据")}))},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(t){if(e.formValidate.is_label&&!e.dataLabel.length)return e.$Message.warning("请选择用户关联标签");if(parseInt(e.formValidate.is_overlay)&&!e.formValidate.overlay.length)return e.$Message.warning("请选择叠加的营销活动");if(""==e.formValidate.section_time[0])return e.$Message.warning("请选择活动时间");if(4==e.formValidate.product_partake_type&&!e.formValidate.brand_id.length)return e.$Message.error("请添加指定品牌");if(5==e.formValidate.product_partake_type){var r=[];if(e.storeDataLabel.forEach((function(t){r.push(t.id)})),!r.length)return e.$Message.error("请添加指定标签");e.formValidate.store_label_id=r}var a=[];if(e.promotionsData.forEach((function(t){if(null==t.threshold||0==t.threshold)return e.flag=!1,e.$Message.warning("请填写优惠门槛");if(2==t.discount_type&&(null==t.discount||0==t.discount))return e.flag=!1,e.$Message.warning("请填写优惠内容");if(1==t.discount_type&&(null==t.money||0==t.money))return e.flag=!1,e.$Message.warning("请填写优惠内容");e.flag=!0;var r={threshold:t.threshold,discount:1==t.discount_type?t.money:t.discount,discount_type:t.discount_type};a.push(r)})),!e.flag)return;var o=[];e.dataLabel.forEach((function(t){o.push(t.id)})),0==e.formValidate.is_label?e.formValidate.label_id=[]:e.formValidate.label_id=o;var i=[];if(e.tableData.forEach((function(t){var e={product_id:t.id,unique:[]};t.attrValue.length&&t.attrValue.forEach((function(t){e.unique.push(t.unique)})),i.push(e)})),2==e.formValidate.product_partake_type&&!i.length)return e.$Message.error("请添加商品");e.formValidate.promotions=a,e.formValidate.product_id=i;var s=[];if(e.storesList.forEach((function(t){s.push(t.id)})),2==e.formValidate.applicable_type&&!s.length)return e.$Message.warning("请添加适用门店");e.formValidate.applicable_store_id=s,Object(n.wb)(3,e.$route.params.id,e.formValidate).then((function(t){e.$router.push({path:"".concat(e.roterPre,"/marketing/discount/full_discount")}),e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))}else e.$Message.warning("请完善数据")}))}})},g=(r("8cb3"),r("2877")),_=Object(g.a)(v,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-submit"},[e("div",{staticClass:"i-layout-page-header"},[e("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("router-link",{attrs:{to:{path:"".concat(t.roterPre,"/marketing/discount/full_discount")}}},[e("div",{staticClass:"font-sm after-line"},[e("span",{staticClass:"iconfont iconfanhui"}),e("span",{staticClass:"pl10"},[t._v("返回")])])]),e("span",{staticClass:"mr20 ml16",domProps:{textContent:t._s("0"!==t.$route.params.id?"编辑满减满折":"添加满减满折")}})],1)])],1),e("Card",{staticClass:"ivu-mt mb79 mh",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"new_tab"},[e("Tabs",{model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},t._l(t.headTab,(function(t,r){return e("TabPane",{key:r,attrs:{label:t.name,name:t.type}})})),1)],1),e("Form",{ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{directives:[{name:"show",rawName:"v-show",value:"1"===t.currentTab,expression:"currentTab === '1'"}],attrs:{gutter:24,type:"flex"}},[e("FormItem",{attrs:{label:"条件类型:",props:"coupon_type"}},t._l(t.discountType,(function(r,a){return e("div",{key:a,staticClass:"productType",class:t.formValidate.threshold_type==r.id?"on":"",on:{click:function(e){return t.discountTypeTap(r)}}},[e("div",{staticClass:"name",class:t.formValidate.threshold_type==r.id?"on":""},[t._v(t._s(r.name))]),e("div",{staticClass:"title"},[t._v("("+t._s(r.title)+")")]),t.formValidate.threshold_type==r.id?e("div",{staticClass:"jiao"}):t._e(),t.formValidate.threshold_type==r.id?e("div",{staticClass:"iconfont iconduihao"}):t._e()])})),0),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动名称:",prop:"name"}},[e("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入活动名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动时间:",prop:"section_time"}},[e("div",{staticClass:"acea-row row-middle"},[e("DatePicker",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{editable:!1,type:"daterange",format:"yyyy-MM-dd",placeholder:"请选择活动时间",value:t.formValidate.section_time},on:{"on-change":t.onchangeTime},model:{value:t.formValidate.section_time,callback:function(e){t.$set(t.formValidate,"section_time",e)},expression:"formValidate.section_time"}})],1)])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"关联标签:"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.is_label,callback:function(e){t.$set(t.formValidate,"is_label",e)},expression:"formValidate.is_label"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),t.formValidate.is_label?e("div",{staticClass:"acea-row row-middle mt10"},[e("div",{staticClass:"labelInput acea-row row-between-wrapper",on:{click:t.openLabel}},[e("div",{staticStyle:{width:"90%"}},[t.dataLabel.length?e("div",t._l(t.dataLabel,(function(r,a){return e("Tag",{attrs:{closable:""},on:{"on-close":function(e){return t.closeLabel(r)}}},[t._v(t._s(r.label_name))])})),1):e("span",{staticClass:"span"},[t._v("选择用户关联标签")])]),e("div",{staticClass:"iconfont iconxiayi"})]),e("span",{staticClass:"addClass",on:{click:t.addLabel}},[t._v("新增标签")])]):t._e()],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{staticStyle:{"margin-bottom":"0"},attrs:{label:"优惠内容:",prop:"promotions_cate"}},[e("RadioGroup",{attrs:{vertical:""},on:{"on-change":t.changeFull},model:{value:t.formValidate.promotions_cate,callback:function(e){t.$set(t.formValidate,"promotions_cate",e)},expression:"formValidate.promotions_cate"}},[e("Radio",{attrs:{label:"1"}},[e("Icon",{attrs:{type:"social-apple"}}),e("span",[t._v("阶梯满减满折")])],1),e("Radio",{attrs:{label:"2"}},[e("Icon",{attrs:{type:"social-android"}}),e("span",[t._v("循环满减满折")])],1)],1)],1),e("FormItem",{attrs:{label:""}},[e("div",{staticClass:"list"},t._l(t.promotionsData,(function(r,a){return e("div",{key:a,staticClass:"item"},[1==t.formValidate.promotions_cate?e("div",{staticClass:"title acea-row row-between-wrapper"},[e("span",[t._v(t._s(a+1)+"级优惠")]),a?e("span",{staticClass:"del",on:{click:function(e){return t.delGrade(a)}}},[t._v("删除")]):t._e()]):t._e(),e("FormItem",{attrs:{label:"优惠门槛:",prop:"threshold"}},[e("span",{staticClass:"mr10"},[2==t.formValidate.promotions_cate?e("span",[t._v("每")]):t._e(),t._v("满")]),1==t.formValidate.threshold_type?e("InputNumber",{staticClass:"width23",attrs:{max:999999,min:0},model:{value:r.threshold,callback:function(e){t.$set(r,"threshold",e)},expression:"item.threshold"}}):e("InputNumber",{staticClass:"width23",attrs:{max:999999,min:0,precision:0},model:{value:r.threshold,callback:function(e){t.$set(r,"threshold",e)},expression:"item.threshold"}}),e("span",{staticClass:"ml10"},[t._v(t._s(1==t.formValidate.threshold_type?"元":"件"))])],1),e("FormItem",{attrs:{label:"优惠内容:",prop:"discount"}},[e("RadioGroup",{attrs:{vertical:""},model:{value:r.discount_type,callback:function(e){t.$set(r,"discount_type",e)},expression:"item.discount_type"}},[e("Radio",{attrs:{label:1}},[e("span",{staticClass:"mr10"},[t._v("减")]),e("InputNumber",{staticClass:"width23",attrs:{max:999999,min:0},model:{value:r.money,callback:function(e){t.$set(r,"money",e)},expression:"item.money"}}),e("span",{staticClass:"ml10"},[t._v("元")])],1),1==t.formValidate.promotions_cate?e("Radio",{attrs:{label:2}},[e("span",{staticClass:"mr10"},[t._v("打")]),e("InputNumber",{staticClass:"width23",attrs:{max:100,min:1,precision:0},model:{value:r.discount,callback:function(e){t.$set(r,"discount",e)},expression:"item.discount"}}),e("span",{staticClass:"ml10"},[t._v("%")])],1):t._e()],1)],1)],1)})),0),1==t.formValidate.promotions_cate?e("Button",{attrs:{type:"primary"},on:{click:t.addLevel}},[t._v("添加优惠层级")]):t._e()],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"优惠叠加:",prop:"is_overlay"}},[e("RadioGroup",{attrs:{vertical:""},model:{value:t.formValidate.is_overlay,callback:function(e){t.$set(t.formValidate,"is_overlay",e)},expression:"formValidate.is_overlay"}},[e("Radio",{attrs:{label:"0"}},[e("Icon",{attrs:{type:"social-apple"}}),e("span",[t._v("不叠加其他营销活动")])],1),e("Radio",{attrs:{label:"1"}},[e("Icon",{attrs:{type:"social-android"}}),e("span",[t._v("叠加其他营销活动")])],1)],1),1==t.formValidate.is_overlay?e("CheckboxGroup",{staticClass:"checkAlls",attrs:{size:"small"},model:{value:t.formValidate.overlay,callback:function(e){t.$set(t.formValidate,"overlay",e)},expression:"formValidate.overlay"}},t._l(t.activityType,(function(r,a){return e("Checkbox",{attrs:{label:r.type}},[t._v(t._s(r.name))])})),1):t._e()],1)],1)],1),e("div",{directives:[{name:"show",rawName:"v-show",value:"2"===t.currentTab,expression:"currentTab === '2'"}]},[e("Row",{staticClass:"mb20",attrs:{gutter:24,type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("RadioGroup",{on:{"on-change":t.goodTap},model:{value:t.formValidate.product_partake_type,callback:function(e){t.$set(t.formValidate,"product_partake_type",e)},expression:"formValidate.product_partake_type"}},[e("Radio",{attrs:{label:1}},[t._v("全部商品参与")]),e("Radio",{attrs:{label:2}},[t._v("指定商品参与")]),e("Radio",{attrs:{label:4}},[t._v("指定品牌参与")]),e("Radio",{attrs:{label:5}},[t._v("指定商品标签参与")])],1)],1),2==t.formValidate.product_partake_type?e("Col",{staticClass:"mt20",attrs:{span:"24"}},[e("Button",{attrs:{type:"primary"},on:{click:t.addGoods}},[t._v("添加商品")])],1):t._e()],1),2==t.formValidate.product_partake_type?e("div",{staticClass:"vxeTable"},[e("vxe-table",{ref:"xTree",attrs:{border:"inner","column-config":{resizable:!0},"row-id":"id","tree-config":{children:"attrValue",reserve:!0},data:t.tableData}},[e("vxe-column",{attrs:{field:"info",title:"商品信息","tree-node":"","min-width":"300"},scopedSlots:t._u([{key:"default",fn:function(r){var a=r.row;return[e("div",{staticClass:"imgPic acea-row row-middle"},[e("viewer",[e("div",{staticClass:"pictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a.image,expression:"row.image"}]})])]),e("div",{staticClass:"info"},[e("Tooltip",{attrs:{"max-width":"200",placement:"bottom",transfer:""}},[e("span",{staticClass:"line2"},[t._v(t._s(a.store_name)+t._s(a.suk))]),e("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(a.store_name)+t._s(a.suk))])])],1)],1)]}}],null,!1,1988674042)}),e("vxe-column",{attrs:{field:"cate_name",title:"商品分类","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(r){var a=r.row;return[e("Tooltip",{attrs:{"max-width":"200",placement:"bottom"}},[e("span",{staticClass:"line2"},[t._v(t._s(a.cate_name))]),e("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(a.cate_name))])])]}}],null,!1,3349410013)}),e("vxe-column",{attrs:{field:"store_label",title:"商品标签","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(r){var a=r.row;return[e("Tooltip",{attrs:{"max-width":"500",placement:"bottom"}},[e("span",{staticClass:"line2"},[t._v(t._s(a.store_label))]),e("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(a.store_label))])])]}}],null,!1,1664260762)}),e("vxe-column",{attrs:{field:"price",title:"售价","min-width":"80"}}),e("vxe-column",{attrs:{field:"cost",title:"成本价","min-width":"80"}}),e("vxe-column",{attrs:{field:"stock",title:"库存","min-width":"80"}}),e("vxe-column",{attrs:{field:"date",title:"操作","min-width":"150",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(r){var a=r.row;return[e("a",{on:{click:function(e){return t.del(a)}}},[t._v("删除")])]}}],null,!1,1383043590)})],1)],1):t._e(),4==t.formValidate.product_partake_type?e("FormItem",{attrs:{label:"选择品牌:",required:""}},[e("el-cascader",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请选择商品品牌",size:"mini",options:t.brandData,props:t.props,filterable:"",clearable:""},model:{value:t.formValidate.brand_id,callback:function(e){t.$set(t.formValidate,"brand_id",e)},expression:"formValidate.brand_id"}})],1):t._e(),5==t.formValidate.product_partake_type?e("FormItem",{attrs:{label:"选择标签:",required:""}},[e("div",{staticClass:"labelInput acea-row row-between-wrapper",on:{click:t.openStoreLabel}},[e("div",{staticStyle:{width:"90%"}},[t.storeDataLabel.length?e("div",t._l(t.storeDataLabel,(function(r){return e("Tag",{key:r.id,attrs:{closable:""},on:{"on-close":function(e){return t.closeStoreLabel(r)}}},[t._v(t._s(r.label_name))])})),1):e("span",{staticClass:"span"},[t._v("请选择")])]),e("div",{staticClass:"iconfont iconxiayi"})])]):t._e()],1),e("div",{directives:[{name:"show",rawName:"v-show",value:"3"===t.currentTab,expression:"currentTab === '3'"}]},[e("Row",{staticClass:"mb20",attrs:{gutter:24,type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("RadioGroup",{model:{value:t.formValidate.applicable_type,callback:function(e){t.$set(t.formValidate,"applicable_type",e)},expression:"formValidate.applicable_type"}},[e("Radio",{attrs:{label:1}},[t._v("全部门店")]),e("Radio",{attrs:{label:2}},[t._v("部分门店")]),e("Radio",{attrs:{label:0}},[t._v("仅平台适用")])],1),e("div",{staticClass:"tips"},[t._v("可选择活动在哪些门店使用,选择“仅平台适用“则购买门店商品不享受活动")])],1),2==t.formValidate.applicable_type?e("Col",{staticClass:"mt20",attrs:{span:"24"}},[e("Button",{attrs:{type:"primary"},on:{click:t.addStore}},[t._v("添加门店")])],1):t._e()],1),2==t.formValidate.applicable_type?e("div",{staticClass:"vxeTable"},[e("vxe-table",{ref:"xTree",attrs:{border:"inner","row-id":"id",data:t.storesList}},[e("vxe-column",{attrs:{field:"id",title:"ID","min-width":"60"}}),e("vxe-column",{attrs:{field:"info",title:"门店图片","tree-node":"","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){var r=t.row;return[e("div",{staticClass:"imgPic acea-row row-middle"},[e("viewer",[e("div",{staticClass:"pictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.image,expression:"row.image"}]})])])],1)]}}],null,!1,3598873617)}),e("vxe-column",{attrs:{field:"cate_name",title:"门店分类","min-width":"80"}}),e("vxe-column",{attrs:{field:"name",title:"门店名称","min-width":"80"}}),e("vxe-column",{attrs:{field:"phone",title:"联系电话","min-width":"90"}}),e("vxe-column",{attrs:{field:"address",title:"门店地址","min-width":"150"}}),e("vxe-column",{attrs:{field:"day_time",title:"营业时间","min-width":"120"}}),e("vxe-column",{attrs:{field:"status_name",title:"营业状态","min-width":"80"}}),e("vxe-column",{attrs:{field:"date",title:"操作","min-width":"100",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(r){var a=r.row;return[e("a",{on:{click:function(e){return t.delte(a)}}},[t._v("删除")])]}}],null,!1,3111734551)})],1)],1):t._e()],1)],1)],1),e("Card",{staticClass:"fixed-card",style:{left:"".concat(t.menuCollapse?t.isMobile?"0":"80px":"200px")},attrs:{bordered:!1,"dis-hover":""}},[e("Form",[e("FormItem",["1"!==t.currentTab?e("Button",{staticStyle:{"margin-right":"10px"},on:{click:t.upTab}},[t._v("上一步")]):t._e(),"3"!==t.currentTab?e("Button",{staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.downTab("formValidate")}}},[t._v("下一步")]):e("Button",{staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("保存并发布")])],1)],1)],1),e("Modal",{attrs:{scrollable:"",title:"选择用户标签",closable:!0,width:"540","footer-hide":!0,"mask-closable":!1},model:{value:t.labelShow,callback:function(e){t.labelShow=e},expression:"labelShow"}},[e("userLabel",{ref:"userLabel",on:{activeData:t.activeData,close:t.labelClose}})],1),e("Modal",{attrs:{scrollable:"",title:"选择商品标签",closable:!0,width:"540","footer-hide":!0,"mask-closable":!1},model:{value:t.storeLabelShow,callback:function(e){t.storeLabelShow=e},expression:"storeLabelShow"}},[e("storeLabelList",{ref:"storeLabel",on:{activeData:t.activeStoreData,close:t.storeLabelClose}})],1),e("Modal",{staticClass:"paymentFooter",attrs:{title:"商品列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":t.cancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[t.modals?e("goods-list",{ref:"goodslist",attrs:{ischeckbox:!0,isdiy:!0},on:{getProductId:t.getProductId}}):t._e()],1),e("Modal",{attrs:{title:"门店列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":t.cancelStore},model:{value:t.storeModals,callback:function(e){t.storeModals=e},expression:"storeModals"}},[t.storeModals?e("store-list",{ref:"storelist",on:{getStoreId:t.getStoreId}}):t._e()],1)],1)}),[],!1,null,"49af3fe8",null);e.default=_.exports},"084c":function(t,e,r){},"0f0e":function(t,e,r){"use strict";var a=r("c4c8"),n={name:"userLabel",props:{},data:function(){return{labelList:[],dataLabel:[],isUser:!1}},mounted:function(){},methods:{inArray:function(t,e){for(var r in e)if(e[r].id===t)return!0;return!1},userLabel:function(t){var e=this;this.dataLabel=t,Object(a.ob)().then((function(t){t.data.map((function(t){t.children&&t.children.length&&(e.isUser=!0,t.children.map((function(t){e.inArray(t.id,e.dataLabel)?t.disabled=!0:t.disabled=!1})))})),e.labelList=t.data})).catch((function(t){e.$Message.error(t.msg)}))},selectLabel:function(t){if(t.disabled){var e=this.dataLabel.indexOf(this.dataLabel.filter((function(e){return e.id===t.id}))[0]);this.dataLabel.splice(e,1),t.disabled=!1}else this.dataLabel.push({label_name:t.label_name,id:t.id,tag_id:t.tag_id}),t.disabled=!0},subBtn:function(){this.$emit("activeData",JSON.parse(JSON.stringify(this.dataLabel)))},cancel:function(){this.$emit("close")}}},o=(r("a405"),r("2877")),i=Object(o.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"label-wrapper"},[e("div",{staticClass:"list-box"},[t._l(t.labelList,(function(r,a){return t.isUser?e("div",{key:a,staticClass:"label-box"},[r.children&&r.children.length?e("div",{staticClass:"title"},[t._v("\n "+t._s(r.label_name)+"\n ")]):t._e(),r.children&&r.children.length?e("div",{staticClass:"list"},t._l(r.children,(function(r,a){return e("div",{key:a,staticClass:"label-item",class:{on:r.disabled},on:{click:function(e){return t.selectLabel(r)}}},[t._v("\n "+t._s(r.label_name)+"\n ")])})),0):t._e()]):t._e()})),t.isUser?t._e():e("div",[t._v("暂无标签")])],2),e("div",{staticClass:"footer"},[e("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:t.subBtn}},[t._v("确定")]),e("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.cancel}},[t._v("取消")])],1)])}),[],!1,null,"ea2c8f16",null);e.a=i.exports},3715:function(t,e,r){},5671:function(t,e,r){"use strict";var a=r("2f62"),n=r("73f5");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,e||"default");if("object"!=o(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var l={name:"index",data:function(){return{selectEquips:[],selectEquipsIds:[],modal_loading:!1,treeSelect:[],formValidate:{page:1,limit:10,cate_id:[],name:""},total:0,loading:!1,grid:{xl:10,lg:10,md:12,sm:24,xs:24},tableList:[],columns:[{type:"selection",width:60,align:"center"},{title:"ID",key:"id",width:60},{title:"门店图片",slot:"image",minWidth:80},{title:"门店名称",key:"name",minWidth:80},{title:"门店分类",key:"cate_name",minWidth:80},{title:"联系电话",key:"phone",minWidth:90},{title:"门店地址",key:"address",ellipsis:!0,minWidth:150},{title:"营业时间",key:"day_time",minWidth:120},{title:"营业状态",key:"status_name",minWidth:80}]}},computed:s(s({},Object(a.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){},mounted:function(){this.getList(),this.goodsCategory()},methods:{sortData:function(){var t=this;this.selectEquipsIds.length&&this.tableList.forEach((function(e){t.selectEquipsIds.includes(e.id)&&(e._checked=!0)}))},TableSelectRow:function(t,e){this.selectEquipsIds.includes(e.id)||(this.selectEquipsIds.push(e.id),this.selectEquips.push(e))},TableSelectCancelRow:function(t,e){var r=this.selectEquipsIds.indexOf(e.id);-1!=r&&(this.selectEquipsIds.splice(r,1),this.selectEquips.splice(r,1))},selectAll:function(){for(var t=this.tableList.length-1;t>=0;t--)this.TableSelectRow(null,this.tableList[t])},cancelAll:function(){for(var t=this.tableList.length-1;t>=0;t--)this.TableSelectCancelRow(null,this.tableList[t])},handleSelectAll:function(){this.$refs.table.selectAll(!1)},pageChange:function(t){this.formValidate.page=t,this.getList()},goodsCategory:function(){var t=this;Object(n.a)(1).then((function(e){t.treeSelect=e.data})).catch((function(e){t.$Message.error(e.msg)}))},getList:function(){var t=this;this.loading=!0,Object(n.O)(this.formValidate).then((function(e){t.tableList=e.data.list,t.total=e.data.count,t.sortData(),t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},ok:function(){var t=[];this.selectEquips.forEach((function(e){var r={image:e.image,product_id:e.id,store_name:e.store_name,temp_id:e.temp_id};t.push(r)})),t.length>0?this.$emit("getStoreId",this.selectEquips):this.$Message.warning("请先选择商品")},userSearchs:function(){this.formValidate.page=1,this.getList()}}},u=(r("9a36"),r("2877")),d=Object(u.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"goodList"},[e("Form",{ref:"formValidate",staticClass:"tabform",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""}},[e("FormItem",{attrs:{label:"门店分类:","label-for":"pid"}},[e("Cascader",{staticClass:"input-add",attrs:{data:t.treeSelect,placeholder:"请选择门店分类","change-on-select":"",filterable:""},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1),e("FormItem",{attrs:{label:"门店搜索:","label-for":"name"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入门店名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}}),e("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("搜索")])],1)],1),e("Table",{ref:"table",staticClass:"mr-20",attrs:{"no-data-text":"暂无数据","no-filtered-data-text":"暂无筛选结果",columns:t.columns,data:t.tableList,loading:t.loading,height:"350"},on:{"on-select-all":t.selectAll,"on-select-all-cancel":t.cancelAll,"on-select":t.TableSelectRow,"on-select-cancel":t.TableSelectCancelRow},scopedSlots:t._u([{key:"image",fn:function(t){var r=t.row;return[e("viewer",[e("div",{staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.image,expression:"row.image"}]})])])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1),e("div",{staticClass:"footer",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary",size:"large",loading:t.modal_loading,long:""},on:{click:t.ok}},[t._v("提交")])],1)],1)}),[],!1,null,"7dca7c24",null);e.a=d.exports},"61f7":function(t,e,r){"use strict";function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var a in r)if(new RegExp("(".concat(a,")")).test(e)){var n=r[a]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?n:c(n))}return e}function c(t){return("00"+t).substr(t.length)}r.d(e,"a",(function(){return s})),r.d(e,"c",(function(){return d})),r.d(e,"b",(function(){return f}));var l={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},u=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function d(t){return o({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function f(t){return m.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}u(d,"请输入%s"),u(f,"%s格式不正确");var m=Object.keys(l).reduce((function(t,e){return t[e]=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n="range"===e?{min:t[0],max:t[1]}:i({},e,t);return o(o({message:r.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},n),a)},u(t[e],l[e]),t}),{})},"73f5":function(t,e,r){"use strict";r.d(e,"D",(function(){return n})),r.d(e,"u",(function(){return o})),r.d(e,"q",(function(){return i})),r.d(e,"t",(function(){return s})),r.d(e,"v",(function(){return c})),r.d(e,"x",(function(){return l})),r.d(e,"j",(function(){return u})),r.d(e,"i",(function(){return d})),r.d(e,"U",(function(){return f})),r.d(e,"h",(function(){return m})),r.d(e,"z",(function(){return p})),r.d(e,"y",(function(){return h})),r.d(e,"A",(function(){return b})),r.d(e,"w",(function(){return v})),r.d(e,"m",(function(){return g})),r.d(e,"B",(function(){return _})),r.d(e,"s",(function(){return y})),r.d(e,"L",(function(){return w})),r.d(e,"M",(function(){return O})),r.d(e,"J",(function(){return j})),r.d(e,"K",(function(){return k})),r.d(e,"g",(function(){return C})),r.d(e,"G",(function(){return x})),r.d(e,"H",(function(){return L})),r.d(e,"I",(function(){return S})),r.d(e,"T",(function(){return V})),r.d(e,"O",(function(){return T})),r.d(e,"N",(function(){return $})),r.d(e,"e",(function(){return D})),r.d(e,"S",(function(){return I})),r.d(e,"o",(function(){return P})),r.d(e,"P",(function(){return M})),r.d(e,"Q",(function(){return E})),r.d(e,"R",(function(){return N})),r.d(e,"n",(function(){return R})),r.d(e,"r",(function(){return F})),r.d(e,"E",(function(){return q})),r.d(e,"p",(function(){return A})),r.d(e,"C",(function(){return B})),r.d(e,"f",(function(){return W})),r.d(e,"F",(function(){return z})),r.d(e,"b",(function(){return G})),r.d(e,"d",(function(){return U})),r.d(e,"c",(function(){return J})),r.d(e,"a",(function(){return H})),r.d(e,"k",(function(){return K})),r.d(e,"l",(function(){return Q}));var a=r("b6bd");function n(t){return Object(a.a)({url:"merchant/store_list",method:"get",params:t})}function o(t){return Object(a.a)({url:"store/order/list",method:"get",params:t})}function i(t){return Object(a.a)({url:"store/order/chart",method:"get",params:t})}function s(t){return Object(a.a)({url:"store/order/header",method:"get"})}function c(t){return Object(a.a)({url:"store/recharge",method:"get",params:t})}function l(t){return Object(a.a)({url:"store/vip_order",method:"get",params:t})}function u(t){return Object(a.a)({url:"store/order/edit/".concat(t),method:"get"})}function d(t){return Object(a.a)({url:"store/order/distribution/".concat(t),method:"get"})}function f(t){return Object(a.a)({url:"store/order/write_update/".concat(t),method:"put"})}function m(t){return Object(a.a)({url:"store/order/info/".concat(t),method:"get"})}function p(t){return Object(a.a)({url:"order/remark/".concat(t.id),method:"put",data:t.remark})}function h(t){return Object(a.a)({url:"store/recharge/remark/".concat(t.id),method:"put",data:t.remark})}function b(t){return Object(a.a)({url:"store/vip/remark/".concat(t.id),method:"put",data:t.remark})}function v(t){return Object(a.a)({url:"store/refund/list",method:"get",params:t})}function g(t){return Object(a.a)({url:"/order/no_refund/".concat(t),method:"get"})}function _(t){return Object(a.a)({url:"/order/refund_integral/".concat(t),method:"get"})}function y(t,e){return Object(a.a)({url:"store/order/export/".concat(e),method:"post",data:t})}function w(t){return Object(a.a)({url:"store/finance_flow/list",method:"get",params:t})}function O(t,e){return Object(a.a)({url:"store/finance_flow/mark/".concat(t),method:"put",params:e})}function j(t){return Object(a.a)({url:"store/finance_flow/fund_record",method:"get",params:t})}function k(t){return Object(a.a)({url:"store/finance_flow/fund_record_info",method:"get",params:t})}function C(t){return Object(a.a)({url:"/export/storeFinanceRecord",method:"get",params:t})}function x(t){return Object(a.a)({url:"/store/extract/list",method:"get",params:t})}function L(t,e){return Object(a.a)({url:"store/extract/mark/".concat(t),method:"post",data:e})}function S(t,e){return Object(a.a)({url:"store/extract/verify/".concat(t),method:"post",data:e})}function V(t){return Object(a.a)({url:"store/extract/transfer/".concat(t),method:"get"})}function T(t){return Object(a.a)({url:"store/store",method:"get",params:t})}function $(t){return Object(a.a)({url:"store/store/get_info/".concat(t),method:"get"})}function D(t){return Object(a.a)({url:"city",method:"get",params:t})}function I(t,e){return Object(a.a)({url:"store/store/".concat(t),method:"post",data:e})}function P(){return Object(a.a)({url:"store/store/address",method:"get"})}function M(t){return Object(a.a)({url:"store/store/login/".concat(t),method:"get"})}function E(t,e){return Object(a.a)({url:"store/store/set_show/".concat(t,"/").concat(e),method:"put"})}function N(t){return Object(a.a)({url:"store/share/order",method:"post",params:t})}function R(t){return Object(a.a)({url:"store/home/header",method:"get",params:t})}function F(t){return Object(a.a)({url:"store/home/orderChart",method:"get",params:t})}function q(t){return Object(a.a)({url:"store/home/store",method:"get",params:t})}function A(t){return Object(a.a)({url:"store/home/operate",method:"get",params:t})}function B(t){return Object(a.a)({url:"store/store/reset_admin/".concat(t),method:"get"})}function W(t,e,r){return Object(a.a)({url:"export/storeFlowExport?store_id=".concat(t,"&keyword=").concat(e,"&data=").concat(r),method:"get"})}function z(t){return Object(a.a)({url:"/store/category",params:t,method:"get"})}function G(t){return Object(a.a)({url:"/store/category/create/".concat(t),method:"get"})}function U(t){return Object(a.a)({url:"/store/category/tree/".concat(t),method:"get"})}function J(t){return Object(a.a)({url:"/store/category/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function H(t){return Object(a.a)({url:"store/category/cascader_list/".concat(t),method:"get"})}function K(t){return Object(a.a)({url:"/store/refund/detail/".concat(t),method:"get"})}function Q(t){return Object(a.a)({url:"/store/refund/refund/".concat(t),method:"get"})}},"8c9d":function(t,e,r){"use strict";r("084c")},"8cb3":function(t,e,r){"use strict";r("9815")},9815:function(t,e,r){},"9a36":function(t,e,r){"use strict";r("3715")},a405:function(t,e,r){"use strict";r("d5fd")},c24f:function(t,e,r){"use strict";r.d(e,"X",(function(){return n})),r.d(e,"N",(function(){return o})),r.d(e,"M",(function(){return i})),r.d(e,"k",(function(){return s})),r.d(e,"r",(function(){return c})),r.d(e,"d",(function(){return l})),r.d(e,"h",(function(){return u})),r.d(e,"g",(function(){return d})),r.d(e,"q",(function(){return f})),r.d(e,"s",(function(){return m})),r.d(e,"J",(function(){return p})),r.d(e,"P",(function(){return h})),r.d(e,"L",(function(){return b})),r.d(e,"K",(function(){return v})),r.d(e,"f",(function(){return g})),r.d(e,"e",(function(){return _})),r.d(e,"n",(function(){return y})),r.d(e,"R",(function(){return w})),r.d(e,"p",(function(){return O})),r.d(e,"Q",(function(){return j})),r.d(e,"cb",(function(){return k})),r.d(e,"U",(function(){return C})),r.d(e,"S",(function(){return x})),r.d(e,"T",(function(){return L})),r.d(e,"W",(function(){return S})),r.d(e,"V",(function(){return V})),r.d(e,"Y",(function(){return T})),r.d(e,"v",(function(){return $})),r.d(e,"w",(function(){return D})),r.d(e,"Z",(function(){return I})),r.d(e,"i",(function(){return P})),r.d(e,"bb",(function(){return M})),r.d(e,"C",(function(){return E})),r.d(e,"db",(function(){return N})),r.d(e,"m",(function(){return R})),r.d(e,"ab",(function(){return F})),r.d(e,"F",(function(){return q})),r.d(e,"B",(function(){return A})),r.d(e,"A",(function(){return B})),r.d(e,"z",(function(){return W})),r.d(e,"D",(function(){return z})),r.d(e,"y",(function(){return G})),r.d(e,"x",(function(){return U})),r.d(e,"u",(function(){return J})),r.d(e,"t",(function(){return H})),r.d(e,"o",(function(){return K})),r.d(e,"l",(function(){return Q})),r.d(e,"G",(function(){return Y})),r.d(e,"I",(function(){return X})),r.d(e,"eb",(function(){return Z})),r.d(e,"O",(function(){return tt})),r.d(e,"E",(function(){return et})),r.d(e,"b",(function(){return rt})),r.d(e,"a",(function(){return at})),r.d(e,"fb",(function(){return nt})),r.d(e,"j",(function(){return ot})),r.d(e,"c",(function(){return it})),r.d(e,"H",(function(){return st}));var a=r("b6bd");function n(t){return Object(a.a)({url:"user/user",method:"get",params:t})}function o(t){return Object(a.a)({url:"setting/config/user/".concat(t),method:"get"})}function i(t,e){return Object(a.a)({url:"setting/config/user/".concat(t),method:"post",data:e})}function s(t){return Object(a.a)({url:"user/user/".concat(t,"/edit"),method:"get"})}function c(t){return Object(a.a)({url:"user/set_status/".concat(t.status,"/").concat(t.id),method:"put"})}function l(t){return Object(a.a)({url:"marketing/coupon/grant",method:"get",params:t})}function u(t){return Object(a.a)({url:"user/edit_other/".concat(t),method:"get"})}function d(t){return Object(a.a)({url:"user/user/".concat(t),method:"get"})}function f(t){return Object(a.a)({url:"user/one_info/".concat(t.id),method:"get",params:t.datas})}function m(t){return Object(a.a)({url:"user/user_level/vip_list",method:"get",params:t})}function p(t){return Object(a.a)({url:"user/user_level/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function h(t,e){return Object(a.a)({url:"user/user_level/task/".concat(t),method:"get",params:e})}function b(t){return Object(a.a)({url:"user/user_level/set_task_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function v(t){return Object(a.a)({url:"user/user_level/set_task_must/".concat(t.id,"/").concat(t.is_must),method:"PUT"})}function g(t){return Object(a.a)({url:"/user/user_level/create_task",method:"get",params:t})}function _(t){return Object(a.a)({url:"user/user_level/create",method:"get",params:t})}function y(t){return Object(a.a)({url:"user/give_level/".concat(t),method:"get"})}function w(t){return Object(a.a)({url:"user/user_group/list",method:"get",params:t})}function O(t){return Object(a.a)({url:"user/user_group/add/".concat(t),method:"get"})}function j(t){return Object(a.a)({url:"setting/update_admin",method:"PUT",data:t})}function k(t){return Object(a.a)({url:"user/set_group",method:"post",data:t})}function C(t){return Object(a.a)({url:"user/user_label",method:"get",params:t})}function x(t,e){return Object(a.a)({url:"user/user_label/add/".concat(t),method:"get",params:e})}function L(t){return Object(a.a)({url:"user/user_label_cate/all",method:"get",params:t})}function S(t){return Object(a.a)({url:"user/user_label_cate/".concat(t,"/edit"),method:"get"})}function V(t){return Object(a.a)({url:"user/user_label_cate/create",method:"get"})}function T(t){return Object(a.a)({url:"/user/member_batch/index",method:"get",params:t})}function $(t,e){return Object(a.a)({url:"/user/member_batch/save/".concat(t),method:"post",data:e})}function D(t,e){return Object(a.a)({url:"/user/member_batch/set_value/".concat(t),method:"get",params:e})}function I(t,e){return Object(a.a)({url:"/user/member_card/index/".concat(t),method:"get",params:e})}function P(t,e){return Object(a.a)({url:"/export/memberCard/".concat(t),method:"get",params:e})}function M(){return Object(a.a)({url:"/user/member/ship",method:"get"})}function E(t,e){return Object(a.a)({url:"/user/member_ship/save/".concat(t),method:"post",data:e})}function N(){return Object(a.a)({url:"/user/user/syncUsers",method:"get"})}function R(){return Object(a.a)({url:"/user/user/create",method:"get"})}function F(){return Object(a.a)({url:"/user/member_scan",method:"get"})}function q(t,e){return Object(a.a)({url:"user/label/".concat(t),method:"post",data:e})}function A(t){return Object(a.a)({url:"user/member_right/save/".concat(t.id),method:"post",data:t})}function B(){return Object(a.a)({url:"user/member/right",method:"get"})}function W(t){return Object(a.a)({url:"/user/member/record",method:"get",params:t})}function z(){return Object(a.a)({url:"user/member/ship_select",method:"get"})}function G(t){return Object(a.a)({url:"user/member_card/set_status",method:"get",params:t})}function U(t){return Object(a.a)({url:"user/member_ship/set_ship_status",method:"get",params:t})}function J(t,e){return Object(a.a)({url:"user/member_agreement/save/".concat(t),method:"post",data:e})}function H(){return Object(a.a)({url:"user/member/agreement",method:"get"})}function K(t){return Object(a.a)({url:"user/give_level_time/".concat(t),method:"get"})}function Q(t){return Object(a.a)({url:"user/label/".concat(t),method:"get"})}function Y(t){return Object(a.a)({url:"user/save_set_label",method:"put",data:t})}function X(t){return Object(a.a)({url:"setting/info",method:"get"})}function Z(t){return Object(a.a)({url:"user/visit_list/".concat(t.id),method:"get",params:t.datas})}function tt(t){return Object(a.a)({url:"user/spread_list/".concat(t.id),method:"get",params:t.datas})}function et(t){return Object(a.a)({url:"user/user/".concat(t.uid),method:"put",data:t})}function rt(t,e){return Object(a.a)({url:"agent/set_agent_agreement/".concat(t),method:"post",data:e})}function at(){return Object(a.a)({url:"agent/get_agent_agreement",method:"get"})}function nt(){return Object(a.a)({url:"user/synchro/work/label",method:"get"})}function ot(t){return Object(a.a)({url:"user/user/extend_info/".concat(t),method:"get"})}function it(t){return Object(a.a)({url:"user/batch_process",method:"post",data:t})}function st(t,e){return Object(a.a)({url:"/user/member/save/content/".concat(t),method:"post",data:e})}},d5fd:function(t,e,r){},e449:function(t,e,r){"use strict";var a=r("b7be"),n=r("61f7");function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t)||function(){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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}var s={name:"index",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(n.a)(e,"yyyy-MM-dd hh:mm")}}},props:{couponids:{type:Array},updateIds:{type:Array},updateName:{type:Array},luckDraw:{type:Boolean,default:!1},discount:{type:Boolean,default:!1}},data:function(){return{currentid:0,productRow:{},isTemplate:!1,loading:!1,tableFrom:{receive_type:3,type:"send",page:1,limit:10},total:0,ids:[],texts:[],columns:[{title:"ID",key:"id",width:60},{title:"优惠券名称",key:"title",minWidth:150},{title:"适用类型",slot:"type",minWidth:80},{title:"面值",slot:"coupon_price",minWidth:100},{title:"最低消费额",key:"use_min_price",minWidth:100},{title:"发布数量",slot:"count",minWidth:120},{title:"有效期限",slot:"start_time",minWidth:120},{title:"状态",slot:"status",minWidth:80}],couponList:[],selectedIds:new Set,selectedNames:new Set,couponVal:[]}},mounted:function(){},watch:{updateIds:function(t){this.selectedIds=new Set(t)},updateName:function(t){this.selectedNames=new Set(t)}},created:function(){var t=this,e={width:60,align:"center",render:function(e,r){var a=r.row.id,n=!1;n=t.currentid===a;var o=t;return e("div",[e("Radio",{props:{value:n},on:{"on-change":function(){o.currentid=a,t.productRow=r.row}}})])}};this.luckDraw?this.columns.unshift(e):this.columns.unshift({type:"selection",width:60,align:"center"})},methods:{unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},changeCheckbox:function(t){this.couponVal=t},handleSelectAll:function(t){var e=this;if(!this.discount){if(0===t.length){var r=this;r.$refs.table.data.forEach((function(t){if(r.selectedIds.has(t.id)){r.selectedIds.delete(t.id);var e=r.unique(Array.from(r.selectedNames));r.unique(Array.from(r.selectedNames)).forEach((function(r,a){r.id===t.id&&e.splice(a,1)})),r.selectedNames=new Set(e)}}))}else t.forEach((function(t){e.selectedIds.add(t.id),e.selectedNames.add({id:t.id,title:t.title})}));this.$nextTick((function(){e.setChecked()}))}},handleSelectRow:function(t,e){var r=this;this.discount||(this.selectedIds.add(e.id),this.selectedNames.add({id:e.id,title:e.title}),this.$nextTick((function(){r.setChecked()})))},handleCancelRow:function(t,e){var r=this;if(!this.discount){this.selectedIds.delete(e.id);var a=Array.from(this.selectedNames);Array.from(this.selectedNames).forEach((function(t,r){t.id===e.id&&a.splice(r,1)})),this.selectedNames=new Set(a),this.$nextTick((function(){r.setChecked()}))}},setChecked:function(){this.ids=o(this.selectedIds),this.texts=o(this.selectedNames);var t=this.$refs.table.objData;for(var e in t)this.selectedIds.has(t[e].id)&&(t[e]._isChecked=!0)},cancel:function(){this.isTemplate=!1,this.luckDraw&&(this.currentid=0)},tableList:function(){var t=this;this.loading=!0,Object(a.tb)(this.tableFrom).then((function(e){var r=e.data;t.couponList=r.list,t.discount||t.$nextTick((function(){t.setChecked()})),t.total=r.count,t.loading=!1}))},ok:function(){this.luckDraw?(this.$emit("getCouponId",this.productRow),this.currentid=0):this.discount?this.$emit("getCouponList",this.couponVal):this.$emit("nameId",this.ids,this.texts)},receivePageChange:function(t){this.tableFrom.page=t,this.tableList()}}},c=r("2877"),l=Object(c.a)(s,(function(){var t=this,e=t._self._c;return e("div",[e("Modal",{attrs:{title:"优惠券列表",width:"60%"},on:{"on-ok":t.ok,"on-cancel":t.cancel},model:{value:t.isTemplate,callback:function(e){t.isTemplate=e},expression:"isTemplate"}},[e("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns,data:t.couponList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},on:{"on-select":t.handleSelectRow,"on-select-cancel":t.handleCancelRow,"on-select-all":t.handleSelectAll,"on-select-all-cancel":t.handleSelectAll,"on-selection-change":t.changeCheckbox},scopedSlots:t._u([{key:"coupon_price",fn:function(r){var a=r.row;return[1==a.coupon_type?e("span",[t._v(t._s(a.coupon_price)+"元")]):t._e(),2==a.coupon_type?e("span",[t._v(t._s(parseFloat(a.coupon_price)/10)+"折("+t._s(a.coupon_price.toString().split(".")[0])+"%)")]):t._e()]}},{key:"count",fn:function(r){var a=r.row;return r.index,[a.is_permanent?e("span",[t._v("不限量")]):e("div",[e("span",{staticClass:"fa"},[t._v("发布:"+t._s(a.total_count))]),e("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(a.remain_count))])])]}},{key:"start_time",fn:function(r){var a=r.row;return r.index,[a.start_time?e("div",[t._v("\n "+t._s(t._f("formatDate")(a.start_time))+" - "+t._s(t._f("formatDate")(a.end_time))+"\n ")]):e("span",[t._v("不限时")])]}},{key:"type",fn:function(r){var a=r.row;return[1===a.type?e("span",[t._v("品类券")]):2===a.type?e("span",[t._v("商品券")]):3===a.type?e("span",[t._v("会员券")]):e("span",[t._v("通用券")])]}},{key:"status",fn:function(r){var a=r.row;return r.index,[e("Tag",{directives:[{name:"show",rawName:"v-show",value:1===a.status,expression:"row.status===1"}],attrs:{color:"blue"}},[t._v("正常")]),e("Tag",{directives:[{name:"show",rawName:"v-show",value:0===a.status,expression:"row.status===0"}],attrs:{color:"gold"}},[t._v("未开启")]),e("Tag",{directives:[{name:"show",rawName:"v-show",value:-1===a.status,expression:"row.status=== -1"}],attrs:{color:"red"}},[t._v("已失效")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.tableFrom.limit},on:{"on-change":t.receivePageChange}})],1)],1)],1)}),[],!1,null,"65e1da4a",null);e.a=l.exports},f1c7:function(t,e,r){"use strict";var a=r("c4c8"),n={name:"storeLabelList",props:{},data:function(){return{labelList:[],dataLabel:[],isStore:!1}},mounted:function(){},methods:{inArray:function(t,e){for(var r in e)if(e[r].id===t)return!0;return!1},storeLabel:function(t){var e=this;this.dataLabel=t,Object(a.jb)().then((function(t){t.data.map((function(t){t.children&&t.children.length&&(e.isStore=!0,t.children.map((function(t){e.inArray(t.id,e.dataLabel)?t.disabled=!0:t.disabled=!1})))})),e.labelList=t.data})).catch((function(t){e.$Message.error(t.msg)}))},selectLabel:function(t){if(t.disabled){var e=this.dataLabel.indexOf(this.dataLabel.filter((function(e){return e.id===t.id}))[0]);this.dataLabel.splice(e,1),t.disabled=!1}else this.dataLabel.push({label_name:t.label_name,id:t.id}),t.disabled=!0},subBtn:function(){this.$emit("activeData",JSON.parse(JSON.stringify(this.dataLabel)))},cancel:function(){this.$emit("close")}}},o=(r("8c9d"),r("2877")),i=Object(o.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"label-wrapper"},[e("div",{staticClass:"list-box"},[t._l(t.labelList,(function(r,a){return t.isStore?e("div",{key:a,staticClass:"label-box"},[r.children&&r.children.length?e("div",{staticClass:"title"},[t._v(t._s(r.label_name))]):t._e(),r.children&&r.children.length?e("div",{staticClass:"list"},t._l(r.children,(function(r,a){return e("div",{key:a,staticClass:"label-item",class:{on:r.disabled},on:{click:function(e){return t.selectLabel(r)}}},[t._v(t._s(r.label_name))])})),0):t._e()]):t._e()})),t.isStore?t._e():e("div",[t._v("暂无标签")])],2),e("div",{staticClass:"footer"},[e("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:t.subBtn}},[t._v("确定")]),e("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.cancel}},[t._v("取消")])],1)])}),[],!1,null,"96f98f60",null);e.a=i.exports}}]);