徐总多门店
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-c15f8a2a.9ef84737.js

1 line
53 KiB

4 months ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c15f8a2a"],{"082a":function(t,e,a){"use strict";a.r(e);var r=a("2f62"),n=a("b7be"),i=a("c24f"),o=a("c4c8"),s=a("5671"),c=a("f1c7"),l=a("0f0e"),u=a("c4ad"),d=a("e449"),f=a("d708");function m(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function h(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?m(a,!0).forEach((function(e){p(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):m(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function p(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var b={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({},Object(r.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({},Object(r.d)("admin/layout",["setCopyrightShow"]),{delte:function(t){var e=this;this.storesList.forEach((function(a,r){t.id==a.id&&e.storesList.splice(r,1)}))},addStore:function(){this.storeModals=!0},cancelStore:function(){this.storeModals=!1},getStoreId:function(t){this.storeModals=!1;var e=this.storesList.concat(t),a=this.unique(e);this.storesList=a},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(o.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.sto