徐总多门店
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 lines
33 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c69fe70a"],{"1eff":function(t,e,r){},"28bd":function(t,e,r){"use strict";r.r(e);var a=r("2f62"),i=r("c4ad"),o=r("a069"),n=r("b0e7"),s=r("5334"),l=r("b7be"),c=r("c4c8"),u=r("d708");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 p(t){return function(t){if(Array.isArray(t))return m(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 m(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)?m(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 m(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}function f(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},n=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,a){var o=e&&e.prototype instanceof y?e:y,n=Object.create(o.prototype),s=new L(a||[]);return i(n,"_invoke",{value:O(t,r,s)}),n}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var m="suspendedStart",h="suspendedYield",g="executing",v="completed",b={};function y(){}function _(){}function w(){}var V={};c(V,n,(function(){return this}));var C=Object.getPrototypeOf,x=C&&C(C(j([])));x&&x!==r&&a.call(x,n)&&(V=x);var k=w.prototype=y.prototype=Object.create(V);function P(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function r(i,o,n,s){var l=p(t[i],t,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==d(u)&&a.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,n,s)}),(function(t){r("throw",t,n,s)})):e.resolve(u).then((function(t){c.value=t,n(c)}),(function(t){return r("throw",t,n,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(t,a){function i(){return new e((function(e,i){r(t,a,e,i)}))}return o=o?o.then(i,i):i()}})}function O(e,r,a){var i=m;return function(o,n){if(i===g)throw Error("Generator is already running");if(i===v){if("throw"===o)throw n;return{value:t,done:!0}}for(a.method=o,a.arg=n;;){var s=a.delegate;if(s){var l=$(s,a);if(l){if(l===b)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(i===m)throw i=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i=g;var c=p(e,r,a);if("normal"===c.type){if(i=a.done?v:h,c.arg===b)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(i=v,a.method="throw",a.arg=c.arg)}}}function $(e,r){var a=r.method,i=e.iterator[a];if(i===t)return r.delegate=null,"throw"===a&&e.iterator.return&&(r.method="return",r.arg=t,$(e,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),b;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var n=o.arg;return n?n.done?(r[e.resultName]=n.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):n:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[n];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(a.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(d(e)+" is not iterable")}return _.prototype=w,i(k,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:_,configurable:!0}),_.displayName=c(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,c(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},P(I.prototype),c(I.prototype,s,(function(){return this})),e.AsyncIterator=I,e.async=function(t,r,a,i,o){void 0===o&&(o=Promise);var n=new I(u(t,r,a,i),o);return e.isGeneratorFunction(r)?n:n.next().then((function(t){return t.done?t.value:n.next()}))},P(k),c(k,l,"Generator"),c(k,n,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var a in e)r.push(a);return r.reverse(),function t(){for(;r.length;){var a=r.pop();if(a in e)return t.value=a,t.done=!1,t}return t.done=!0,t}},e.values=j,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(a,i){return s.type="throw",s.arg=e,r.next=a,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o],s=n.completion;if("root"===n.tryLoc)return i("end");if(n.tryLoc<=this.prev){var l=a.call(n,"catchLoc"),c=a.call(n,"finallyLoc");if(l&&c){if(this.prev<n.catchLoc)return i(n.catchLoc,!0);if(this.prev<n.finallyLoc)return i(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return i(n.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return i(n.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&a.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var n=o?o.completion:{};return n.type=t,n.arg=e,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(n)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var a=r.completion;if("throw"===a.type){var i=a.arg;N(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,a){return this.delegate={iterator:j(e),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=t),b}},e}function h(t,e,r,a,i,o,n){try{var s=t[o](n),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(a,i)}function g(t){return function(){var e=this,r=arguments;return new Promise((function(a,i){var o=t.apply(e,r);function n(t){h(o,a,i,n,s,"next",t)}function s(t){h(o,a,i,n,s,"throw",t)}n(void 0)}))}}function v(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 b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function y(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=d(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,e||"default");if("object"!=d(a))return a;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:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var _={name:"storeCombinationCreate",components:{goodsList:i.default,uploadPictures:n.a,WangEditor:o.a,freightTemplate:s.a},data:function(){return{roterPre:u.a.roterPre,template:!1,submitOpen:!1,spinShow:!1,isChoice:"",current:0,modalPic:!1,grid:{xl:12,lg:20,md:24,sm:24,xs:24},grid2:{xl:8,lg:8,md:12,sm:24,xs:24},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},modals:!1,modal_loading:!1,images:[],templateList:[],columns:[],specsData:[],picTit:"",tableIndex:0,unitNameList:[],formValidate:{is_support_refund:0,product_type:0,freight:1,delivery_type:[],images:[],info:"",title:"",image:"",unit_name:"",price:0,effective_time:24,stock:1,sales:0,sort:0,postage:0,is_postage:0,is_host:0,is_show:0,section_time:[],description:"",id:0,product_id:0,people:2,once_num:1,num:1,temp_id:"",attrs:[],items:[],virtual:100,peopleNum:0},description:"",ruleValidate:{image:[{required:!0,message:"请选择主图",trigger:"change"}],images:[{required:!0,type:"array",message:"请选择主图",trigger:"change"},{type:"array",min:1,message:"Choose two hobbies at best",trigger:"change"}],title:[{required:!0,message:"请输入拼团名称",trigger:"blur"}],info:[{required:!0,message:"请输入拼团简介",trigger:"blur"}],section_time:[{required:!0,type:"array",message:"请选择活动时间",trigger:"change"}],unit_name:[{required:!0,message:"请输入单位",trigger:"change"}],price:[{required:!0,type:"number",message:"请输入拼团价",trigger:"blur"}],cost:[{required:!0,type:"number",message:"请输入成本价",trigger:"blur"}],stock:[{required:!0,type:"number",message:"请输入库存",trigger:"blur"}],give_integral:[{required:!0,type:"number",message:"请输入赠送积分",trigger:"blur"}],effective_time:[{required:!0,type:"number",message:"请输入拼团时效",trigger:"blur"}],people:[{required:!0,type:"number",message:"请输入拼团人数",trigger:"blur"}],num:[{required:!0,type:"number",message:"请输入购买数量限制",trigger:"blur"}],once_num:[{required:!0,type:"number",message:"请输入单次购买数量限制",trigger:"blur"}],virtual:[{required:!0,type:"number",message:"请输入虚拟成团比例",trigger:"blur"}]},copy:0}},watch:{"formValidate.peopleNum":function(t){}},computed:b(b({},Object(a.e)("admin/layout",["isMobile","menuCollapse"])),{},{labelWidth:function(){return this.isMobile?void 0:155},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.$route.params.id&&(this.copy=this.$route.params.copy,this.current=1,this.getInfo()),this.getAllUnit()},methods:{changeTemplate:function(t){this.template=t},addTemp:function(){this.$refs.templates.isTemplate=!0},addUnit:function(){var t=this;this.$modalForm(Object(c.lb)()).then((function(){return t.getAllUnit()}))},getAllUnit:function(){var t=this;Object(c.C)().then((function(e){t.unitNameList=e.data})).catch((function(e){t.$Message.error(e.msg)}))},getEditorContent:function(t){this.description=t},peopleChange:function(t){t<2&&(this.formValidate.people=2,this.$set(this.formValidate,"people",2))},peopleNumchange:function(t){0!=t&&(this.formValidate.virtual=Math.floor((this.formValidate.people-t)/this.formValidate.people*100))},productAttrs:function(t){var e=this;Object(l.sb)(t.id,3).then((function(t){var r=t.data.info;e.specsData=r.attrs,e.specsData.forEach((function(t,r){e.$set(e.specsData[r],"id",r)})),e.formValidate.items=r.items,e.columns=r.header,e.columns.unshift({type:"selection",width:60,align:"center"}),e.inputChange(r)})).catch((function(t){e.$Message.error(t.msg)}))},inputChange:function(t){var e=this,r=[];t.header.forEach((function(t,e){1===t.type&&r.push({index:e,key:t.key,title:t.title})})),r.forEach((function(t,r){var a=t.title,i=t.key,o={title:a,key:i,align:"center",minWidth:100,render:function(t,r){return t("div",[t("InputNumber",{props:{min:0,value:"price"===i?r.row.price:r.row.quota},on:{"on-change":function(t){"price"===i?r.row.price=t:r.row.quota=t,e.specsData[r.index]=r.row,e.formValidate.attrs&&e.formValidate.attrs.length&&e.formValidate.attrs.forEach((function(t,a){t.id===r.row.id&&e.formValidate.attrs.splice(a,1,r.row)}))}}})])}};e.columns.splice(t.index,1,o)}))},changeCheckbox:function(t){this.formValidate.attrs=t},productGetTemplate:function(t){var e=this;Object(c.Q)({id:t}).then((function(t){e.templateList=t.data}))},validate:function(t,e,r){!1===e&&this.$Message.error(r)},getProductId:function(t){var e=this;this.modal_loading=!1,this.modals=!1,setTimeout((function(){e.formValidate={is_support_refund:t.is_support_refund,product_type:t.product_type,images:t.slider_image,info:t.store_info,title:t.store_name,image:t.image,unit_name:t.unit_name,price:0,effective_time:24,stock:t.stock,sales:t.sales,sort:t.sort,postage:t.postage,is_postage:t.is_postage,is_host:t.is_hot,is_show:0,section_time:[],description:t.description,id:0,people:2,num:1,once_num:1,product_id:t.id,temp_id:t.temp_id,virtual:100,peopleNum:0,freight:1,delivery_type:[]},e.productGetTemplate(t.id),e.productAttrs(t)}),500)},cancel:function(){this.modals=!1},onchangeTime:function(t){this.formValidate.section_time=t},getInfo:function(){var t=this;this.spinShow=!0,Object(l.r)(this.$route.params.id).then(function(){var e=g(f().mark((function e(r){var a,i,o,n,s,l;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(l in a=t,i=r.data.info,o={type:"selection",width:60,align:"center"},t.formValidate=i,t.description=i.description,100!==parseInt(t.formValidate.virtual)?t.formValidate.peopleNum=Math.floor(t.formValidate.people-t.formValidate.virtual/100*t.formValidate.people):t.formValidate.peopleNum=0,t.$set(t.formValidate,"items",i.attrs.items),t.columns=i.attrs.header,t.columns.unshift(o),t.specsData=i.attrs.value,a.specsData.forEach((function(t,e){a.$set(a.specsData[e],"id",e)})),n=i.attrs,s=[],i.attrs.value)i.attrs.value[l]._checked&&s.push(i.attrs.value[l]);a.formValidate.attrs=s,a.inputChange(n),t.spinShow=!1;case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))},next:function(t){var e=this,r=this;2===this.current?(this.formValidate.description=this.description,this.$refs[t].validate((function(t){if(!t)return!1;1==e.copy&&(e.formValidate.copy=1),e.formValidate.id=Number(e.$route.params.id)||0,e.submitOpen=!0,e.formValidate.product_type||(e.formValidate.is_support_refund=1),Object(l.q)(e.formValidate).then(function(){var t=g(f().mark((function t(r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.submitOpen=!1,e.$Message.success(r.msg),setTimeout((function(){e.$router.push({path:"".concat(e.roterPre,"/marketing/store_combination/index")})}),500);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.submitOpen=!1,e.$Message.error(t.msg)}))}))):1===this.current?this.$refs[t].validate((function(t){if(!t)return e.$Message.warning("请完善商品信息");if(r.formValidate.people<2)return r.$Message.error("拼团人数必须大于2");if(r.formValidate.num<0)return r.$Message.error("购买数量限制必须大于0");if(r.formValidate.once_num<0)return r.$Message.error("单次购买数量限制必须大于0");if(!r.formValidate.attrs)return r.$Message.error("请选择属性规格");for(var a in r.formValidate.attrs)if(r.formValidate.attrs[a].quota<=0)return r.$Message.error("拼团限量必须大于0");return 0!=e.formValidate.product_type||e.formValidate.delivery_type.length?0==e.formValidate.product_type&&2==e.formValidate.freight&&e.formValidate.postage<=0?e.$Message.warning("物流设置-固定邮费不能为0"):0!=e.formValidate.product_type||3!=e.formValidate.freight||e.formValidate.temp_id?void(e.current+=1):e.$Message.warning("物流设置-运费模板不能为空"):e.$Message.warning("请选择配送方式")})):this.formValidate.image?this.current+=1:this.$Message.warning("请选择商品")},step:function(){this.current--},getContent:function(t){this.formValidate.description=t},modalPicTap:function(t,e,r){this.modalPic=!0,this.isChoice="dan"===t?"单选":"多选",this.picTit=e,this.tableIndex=r},getPic:function(t){switch(this.picTit){case"danFrom":this.formValidate.image=t.att_dir;break;default:this.formValidate.attrs&&this.formValidate.attrs.length&&this.$set(this.specsData[this.tableIndex],"_checked",!0),this.specsData[this.tableIndex].pic=t.att_dir}this.modalPic=!1},getPicD:function(t){var e=this;this.images=t,this.images.map((function(t){e.formValidate.images.push(t.att_dir),e.formValidate.images=e.formValidate.images.splice(0,10)})),this.modalPic=!1},handleRemove:function(t){this.images.splice(t,1),this.formValidate.images.splice(t,1)},changeGoods:function(){this.modals=!0},handleDragStart:function(t,e){this.dragging=e},handleDragEnd:function(t,e){this.dragging=null},handleDragOver:function(t){t.dataTransfer.dropEffect="move"},handleDragEnter:function(t,e){if(t.dataTransfer.effectAllowed="move",e!==this.dragging){var r=p(this.formValidate.images),a=r.indexOf(this.dragging),i=r.indexOf(e);r.splice.apply(r,[i,0].concat(p(r.splice(a,1)))),this.formValidate.images=r}},addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var r=new window.UE.ui.Dialog({iframeUrl:"/admin/widget.images/index.html?fodder=dialog",editor:t,name:e,title:"上传图片",cssRules:"width:1200px;height:500px;padding:20px;"});return this.dialog=r,new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;",onclick:function(){r.render(),r.open()}})}),37)}}},w=(r("4b6b"),r("2877")),V=Object(w.a)(_,(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/store_combination/index")}}},[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(t.$route.params.id?"编辑拼团商品":"添加拼团商品")}})],1)])],1),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Row",{staticClass:"mt30 acea-row row-middle row-center",attrs:{type:"flex"}},[e("Col",{attrs:{span:"20"}},[e("Steps",{attrs:{current:t.current}},[e("Step",{attrs:{title:"选择拼团商品"}}),e("Step",{attrs:{title:"填写基础信息"}}),e("Step",{attrs:{title:"修改商品详情"}})],1)],1),e("Col",{attrs:{span:"23"}},[e("Col",{attrs:{span:"24"}},[e("div",{staticClass:"lines mt25"})]),e("Form",{ref:"formValidate",staticClass:"form mt30",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[0===t.current?e("FormItem",{attrs:{label:"选择商品:",prop:"image_input"}},[e("div",{staticClass:"picBox",on:{click:t.changeGoods}},[t.formValidate.image?e("div",{staticClass:"pictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formValidate.image,expression:"formValidate.image"}]})]):e("div",{staticClass:"upLoad acea-row row-center-wrapper"},[e("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)])]):t._e(),e("Row",{directives:[{name:"show",rawName:"v-show",value:1===t.current,expression:"current === 1"}],attrs:{type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"拼团活动名称:",prop:"title","label-for":"title"}},[e("Input",{staticClass:"perW40",attrs:{placeholder:"请输入拼团活动名称","element-id":"title"},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"拼团活动简介:",prop:"info","label-for":"info"}},[e("Input",{staticClass:"perW40",attrs:{placeholder:"请输入拼团活动简介",type:"textarea",rows:4,"element-id":"info"},model:{value:t.formValidate.info,callback:function(e){t.$set(t.formValidate,"info",e)},expression:"formValidate.info"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"单位:",prop:"unit_name","label-for":"unit_name"}},[e("Select",{staticClass:"perW40",attrs:{clearable:"",placeholder:"请输入单位"},model:{value:t.formValidate.unit_name,callback:function(e){t.$set(t.formValidate,"unit_name",e)},expression:"formValidate.unit_name"}},t._l(t.unitNameList,(function(r,a){return e("Option",{key:a,attrs:{value:r.name}},[t._v(t._s(r.name))])})),1),e("span",{staticClass:"addClass",on:{click:t.addUnit}},[t._v("新增单位")])],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{prop:"images"}},[e("div",{staticClass:"custom-label",attrs:{slot:"label"},slot:"label"},[e("div",[e("div",[t._v("商品轮播图")])]),e("div",[t._v(":")])]),e("div",{staticClass:"acea-row"},[t._l(t.formValidate.images,(function(r,a){return e("div",{key:a,staticClass:"pictrue",attrs:{draggable:"true"},on:{dragstart:function(e){return t.handleDragStart(e,r)},dragover:function(e){return e.preventDefault(),t.handleDragOver(e,r)},dragenter:function(e){return t.handleDragEnter(e,r)},dragend:function(e){return t.handleDragEnd(e,r)}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r,expression:"item"}]}),e("Button",{staticClass:"btndel",attrs:{shape:"circle",icon:"md-close"},nativeOn:{click:function(e){return t.handleRemove(a)}}})],1)})),t.formValidate.images.length<10?e("div",{staticClass:"upLoad acea-row row-center-wrapper",on:{click:function(e){return t.modalPicTap("duo")}}},[e("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1):t._e()],2),e("div",{staticClass:"tips"},[t._v(" 建议尺寸:800 * 800px,可拖拽改变图片顺序,默认首张图为主图,最多上传10张")])])],1),e("Col",{attrs:{span:"24"}},[e("div",{staticClass:"lines"})]),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动时间:",prop:"section_time"}},[e("div",{staticClass:"acea-row row-middle"},[e("DatePicker",{staticClass:"perW40",attrs:{editable:!1,type:"datetimerange",format:"yyyy-MM-dd HH:mm",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),e("div",{staticClass:"tips"},[t._v("设置活动开启结束时间,用户可以在设置时间内发起参与拼团")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"拼团时效:",prop:"effective_time"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW40",attrs:{min:1,precision:0,placeholder:"请输入拼团时效","element-id":"effective_time"},model:{value:t.formValidate.effective_time,callback:function(e){t.$set(t.formValidate,"effective_time",e)},expression:"formValidate.effective_time"}}),e("span",{staticClass:"ml10"},[t._v("小时")])],1),e("div",{staticClass:"tips"},[t._v("用户发起拼团后开始计时,需在设置时间内邀请到规定好友人数参团,超过时效时间,则系统判定拼团失败,自动发起退款")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"拼团人次:",prop:"people"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW40",attrs:{min:2,placeholder:"请输入拼团人次",precision:0,"element-id":"people"},on:{"on-change":t.peopleChange},model:{value:t.formValidate.people,callback:function(e){t.$set(t.formValidate,"people",e)},expression:"formValidate.people"}}),e("span",{staticClass:"ml10"},[t._v("次")])],1),e("div",{staticClass:"tips"},[t._v("单次拼团需要参与的用户数")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"总购买数量限制:",prop:"num"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW40",attrs:{min:1,placeholder:"请输入总数量限制",precision:0,"element-id":"num"},model:{value:t.formValidate.num,callback:function(e){t.$set(t.formValidate,"num",e)},expression:"formValidate.num"}}),e("span",{staticClass:"ml10"},[t._v("个")])],1),e("div",{staticClass:"tips"},[t._v("该商品活动期间内,用户可购买的最大数量。例如设置为4,表示本次活动有效期内,每个用户最多可购买4件")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"单次购买数量限制:",prop:"once_num"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW40",attrs:{min:1,placeholder:"请输入单次购买数量限制",precision:0,"element-id":"once_num"},model:{value:t.formValidate.once_num,callback:function(e){t.$set(t.formValidate,"once_num",e)},expression:"formValidate.once_num"}}),e("span",{staticClass:"ml10"},[t._v("个")])],1),e("div",{staticClass:"tips"},[t._v("用户参与拼团时,一次购买最大数量限制。例如设置为2,表示每次参与拼团时,用户一次购买数量最大可选择2个")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"补齐人数:"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW40",attrs:{placeholder:"请输入补齐人数",min:0,max:t.formValidate.people-1,precision:0},on:{"on-change":t.peopleNumchange},model:{value:t.formValidate.peopleNum,callback:function(e){t.$set(t.formValidate,"peopleNum",e)},expression:"formValidate.peopleNum"}}),e("span",{staticClass:"ml10"},[t._v("人")])],1),e("div",{staticClass:"tips"},[t._v("\n 当用户参与拼团后,成团时效内未成团情况下,设置补齐人数可虚拟成团。例如:成团人数为10人,补齐人数为4人,真实用户需要参与6人成团才可以在最后未成团时自动补齐虚拟人员\n ")])])],1),e("Col",{directives:[{name:"show",rawName:"v-show"}],attrs:{span:"24"}},[e("FormItem",{attrs:{label:"虚拟成团比例(%):",prop:"virtual"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW40",attrs:{min:0,disabled:"",placeholder:"请输入虚拟成团比例",precision:0,max:100,"element-id":"virtual",formatter:function(t){return"".concat(t,"%")},parser:function(t){return t.replace("%","")}},model:{value:t.formValidate.virtual,callback:function(e){t.$set(t.formValidate,"virtual",e)},expression:"formValidate.virtual"}})],1),e("div",{staticClass:"tips"},[t._v("拼团结束前若用户发起的活动未成团,并且现有人数比例大于设置比例,自动补齐人数,拼团成功。100%为不自动补齐")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"规格选择:"}},[e("Table",{attrs:{data:t.specsData,columns:t.columns,border:""},on:{"on-selection-change":t.changeCheckbox},scopedSlots:t._u([{key:"pic",fn:function(r){var a=r.row,i=r.index;return[e("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","danTable",i)}}},[a.pic?e("div",{staticClass:"pictrue pictrueTab"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a.pic,expression:"row.pic"}]})]):e("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[e("Icon",{staticClass:"iconfont",attrs:{type:"ios-camera-outline",size:"21"}})],1)])]}}])})],1)],1),e("Col",{attrs:{span:"24"}},[e("div",{staticClass:"lines"})]),0==t.formValidate.product_type?e("Col",[e("FormItem",{attrs:{label:"配送方式:"}},[e("CheckboxGroup",{model:{value:t.formValidate.delivery_type,callback:function(e){t.$set(t.formValidate,"delivery_type",e)},expression:"formValidate.delivery_type"}},[e("Checkbox",{attrs:{label:"1"}},[t._v("快递")]),e("Checkbox",{attrs:{label:"3"}},[t._v("门店配送")]),e("Checkbox",{attrs:{label:"2"}},[t._v("到店自提")])],1)],1)],1):t._e(),0==t.formValidate.product_type?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"运费设置:"}},[e("RadioGroup",{model:{value:t.formValidate.freight,callback:function(e){t.$set(t.formValidate,"freight",e)},expression:"formValidate.freight"}},[e("Radio",{attrs:{label:1}},[t._v("包邮")]),e("Radio",{attrs:{label:2}},[t._v("固定邮费")]),e("Radio",{attrs:{label:3}},[t._v("运费模板")])],1)],1)],1):t._e(),2==t.formValidate.freight&&0==t.formValidate.product_type?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"",prop:"freight"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW20 maxW",attrs:{min:0,placeholder:"请输入金额"},model:{value:t.formValidate.postage,callback:function(e){t.$set(t.formValidate,"postage",e)},expression:"formValidate.postage"}}),e("span",{staticClass:"ml10"},[t._v("元")])],1)])],1):t._e(),3==t.formValidate.freight&&0==t.formValidate.product_type?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"",prop:""}},[e("div",{staticClass:"acea-row"},[e("Select",{staticClass:"perW20 maxW",attrs:{clearable:""},model:{value:t.formValidate.temp_id,callback:function(e){t.$set(t.formValidate,"temp_id",e)},expression:"formValidate.temp_id"}},t._l(t.templateList,(function(r,a){return e("Option",{key:a,attrs:{value:r.id}},[t._v(t._s(r.name))])})),1),e("Button",{staticClass:"ml15",on:{click:t.addTemp}},[t._v("添加运费模板")])],1)])],1):t._e(),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"排序:"}},[e("InputNumber",{staticClass:"perW20 maxW",attrs:{placeholder:"请输入排序","element-id":"sort",precision:0,min:0},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动状态:",props:"is_show","label-for":"is_show"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.is_show,callback:function(e){t.$set(t.formValidate,"is_show",e)},expression:"formValidate.is_show"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"热门推荐:",props:"is_hot","label-for":"is_hot"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.is_host,callback:function(e){t.$set(t.formValidate,"is_host",e)},expression:"formValidate.is_host"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),t.formValidate.product_type?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"支持退款:",props:"status","label-for":"status"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.is_support_refund,callback:function(e){t.$set(t.formValidate,"is_support_refund",e)},expression:"formValidate.is_support_refund"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1):t._e()],1),e("Row",{directives:[{name:"show",rawName:"v-show",value:2===t.current,expression:"current === 2"}]},[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"内容:"}},[e("WangEditor",{staticStyle:{width:"90%"},attrs:{content:t.formValidate.description},on:{editorContent:t.getEditorContent}})],1)],1)],1)],1),t.spinShow?e("Spin",{attrs:{size:"large",fix:""}}):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",[e("Button",{directives:[{name:"show",rawName:"v-show",value:0!==t.current,expression:"current !== 0"}],staticClass:"submission mr15",attrs:{disabled:t.$route.params.id&&1===t.current},on:{click:t.step}},[t._v("上一步")]),e("Button",{staticClass:"submission",attrs:{type:"primary",disabled:t.submitOpen&&2===t.current},domProps:{textContent:t._s(2===t.current?"提交":"下一步")},on:{click:function(e){return t.next("formValidate")}}})],1)],1)],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:{goodsType:1},on:{getProductId:t.getProductId}}):t._e()],1),e("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传商品图","mask-closable":!1,"z-index":1},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?e("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic,getPicD:t.getPicD}}):t._e()],1),e("freightTemplate",{ref:"templates",attrs:{template:t.template},on:{changeTemplate:t.changeTemplate}})],1)}),[],!1,null,"706f7a50",null);e.default=V.exports},"4b6b":function(t,e,r){"use strict";r("1eff")}}]);