徐总多门店
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.

1 line
15 KiB

3 months ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-fed6b6e0"],{"084c":function(t,e,a){},"5b50":function(t,e,a){"use strict";a.r(e);var i=a("d708"),r=a("2f62"),o=a("b0e7"),s=a("f1c7"),n=a("c4ad"),l=a("c4c8"),c=a("b7be");function d(t){return(d="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 u(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function m(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?u(Object(a),!0).forEach((function(e){f(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):u(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function f(t,e,a){return(e=function(t){var e=function(t,e){if("object"!=d(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,e||"default");if("object"!=d(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==d(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var p={components:{uploadPictures:o.a,storeLabelList:s.a,goodsList:n.default},computed:m(m({},Object(r.e)("admin/layout",["isMobile","menuCollapse"])),{},{startPickOptions:function(){var t=this;return{disabledDate:function(e){return t.endTime?e.getTime()>new Date(t.endTime).getTime():""}}},endPickOptions:function(){var t=this;return{disabledDate:function(e){return t.startTime?e.getTime()<new Date(t.startTime).getTime():""}}}}),data:function(){return{roterPre:i.a.roterPre,baseURL:i.a.apiBaseURL.replace(/adminapi/,""),currentTab:"1",startTime:"",endTime:"",formValidate:{name:"",section_time:[],image:"",status:1,product_partake_type:"1",product_id:[],brand_id:[],store_label_id:[]},modalPic:!1,gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},brandData:[],props:{emitPath:!1,multiple:!0},storeLabelShow:!1,storeDataLabel:[],ruleValidate:{name:[{required:!0,message:"请输入活动名称",trigger:"blur"}],image:[{required:!0,message:"请上传活动图",trigger:"change"}]},disabledDate:function(t){return t&&t.valueOf()<Date.now()-864e5},columns:[{title:"商品信息",slot:"goodInfo",align:"left",minWidth:300},{title:"商品分类",key:"cate_name",align:"left",minWidth:250},{title:"售价",key:"price",align:"left",minWidth:80},{title:"库存",key:"stock",align:"left",minWidth:80},{title:"操作",slot:"action",align:"center",minWidth:50}],tableData:[],modals:!1}},mounted:function(){this.setCopyrightShow({value:!1}),0!=this.$route.params.id&&this.getInfo()},destroyed:function(){this.setCopyrightShow({value:!0})},methods:m(m({},Object(r.d)("admin/layout",["setCopyrightShow"])),{},{getInfo:function(){var t=this;Object(c.e)(this.$route.params.id).then((function(e){t.formValidate=e.data.info,t.startTime=e.data.info.start_time,t.endTime=e.data.info.stop_time,t.formValidate.product_partake_type=e.data.info.product_partake_type.toString(),t.tableData=e.data.info.products,t.storeDataLabel=e.data.info.store_label_id,4==e.data.info.product_partake_type&&t.getBrandList()})).catch((function(e){t.$Message.error(e.msg)}))},closeLabel:function(t){var e=this.storeDataLabel.indexOf(this.storeDataLabel.filter((function(e){return e.id==t.id}))[0]);this.storeDataLabel.splice(e,1)},goodTap:function(t){4==t&&this.getBrandList()},getBrandList:function(){var t=this;Object(l.f)().then((function(e){t.brandData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},del:function(t){this.tableData.splice(t,1)},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:functio