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
31 KiB
1 lines
31 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a6e05ad4"],{"2c06":function(t,e,r){},"53fa":function(t,e,r){"use strict";r("2c06")},b982:function(t,e,r){"use strict";r.r(e);var a=r("2f62"),i=r("c4ad"),n=r("b0e7"),o=r("5334"),s=r("b7be"),l=r("c4c8"),c=r("a069"),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(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */p=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",l=n.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 n=e&&e.prototype instanceof y?e:y,o=Object.create(n.prototype),s=new j(a||[]);return i(o,"_invoke",{value:$(t,r,s)}),o}function m(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var f="suspendedStart",h="suspendedYield",g="executing",v="completed",b={};function y(){}function _(){}function w(){}var x={};c(x,o,(function(){return this}));var C=Object.getPrototypeOf,V=C&&C(C(D([])));V&&V!==r&&a.call(V,o)&&(x=V);var k=w.prototype=y.prototype=Object.create(x);function P(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(i,n,o,s){var l=m(t[i],t,n);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,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(u).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(l.arg)}var n;i(this,"_invoke",{value:function(t,a){function i(){return new e((function(e,i){r(t,a,e,i)}))}return n=n?n.then(i,i):i()}})}function $(e,r,a){var i=f;return function(n,o){if(i===g)throw Error("Generator is already running");if(i===v){if("throw"===n)throw o;return{value:t,done:!0}}for(a.method=n,a.arg=o;;){var s=a.delegate;if(s){var l=I(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===f)throw i=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i=g;var c=m(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 I(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,I(e,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),b;var n=m(i,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,b;var o=n.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):o:(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=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 n.next=n}}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(O.prototype),c(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,a,i,n){void 0===n&&(n=Promise);var o=new O(u(t,r,a,i),n);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},P(k),c(k,l,"Generator"),c(k,o,(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=D,j.prototype={constructor:j,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(L),!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 n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.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 n=i;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var o=n?n.completion:{};return o.type=t,o.arg=e,n?(this.method="next",this.next=n.finallyLoc,b):this.complete(o)},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),L(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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,a){return this.delegate={iterator:D(e),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=t),b}},e}function m(t,e,r,a,i,n,o){try{var s=t[n](o),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(a,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(a,i){var n=t.apply(e,r);function o(t){m(n,a,i,o,s,"next",t)}function s(t){m(n,a,i,o,s,"throw",t)}o(void 0)}))}}function h(t){return function(t){if(Array.isArray(t))return g(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 g(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)?g(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 g(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 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:"storeBargainCreate",components:{goodsList:i.default,uploadPictures:n.a,WangEditor:c.a,freightTemplate:o.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:[],unitNameList:[],formValidate:{is_support_refund:0,product_type:0,freight:1,delivery_type:[],images:[],info:"",title:"",store_name:"",image:"",unit_name:"",price:0,min_price:0,bargain_max_price:10,bargain_min_price:.01,cost:0,bargain_num:1,people_num:2,stock:1,sales:0,sort:0,num:1,give_integral:0,postage:0,is_postage:0,is_hot:0,status:0,section_time:[],description:"",rule:"",id:0,product_id:0,temp_id:"",attrs:[],items:[]},rule:"",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"}],store_name:[{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"}],min_price:[{required:!0,type:"number",message:"请输入最低购买价",trigger:"blur"}],cost:[{required:!0,type:"number",message:"请输入成本价",trigger:"blur"}],bargain_num:[{required:!0,type:"number",message:"请输入帮砍次数",trigger:"blur"}],people_num:[{required:!0,type:"number",message:"请输入砍价人数",trigger:"blur"}],stock:[{required:!0,type:"number",message:"请输入库存",trigger:"blur"}],num:[{required:!0,type:"number",message:"请输入单次允许购买数量",trigger:"blur"}]},currentid:"",picTit:"",tableIndex:0,copy:0}},computed:b(b({},Object(a.e)("admin/layout",["isMobile","menuCollapse"])),{},{labelWidth:function(){return this.isMobile?void 0:135},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){"0"!==this.$route.params.id&&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(l.lb)()).then((function(){return t.getAllUnit()}))},getAllUnit:function(){var t=this;Object(l.C)().then((function(e){t.unitNameList=e.data})).catch((function(e){t.$Message.error(e.msg)}))},getEditorContent:function(t){this.formValidate.description=t},getEditorContent2:function(t){this.formValidate.rule=t},productAttrs:function(t){var e=this,r=this;Object(s.sb)(t.id,2).then((function(t){var a=t.data.info,i={title:"选择",key:"chose",width:60,align:"center",render:function(t,r){var a=r.index,i=!1;i=e.currentid===a;var n=e;return t("div",[t("Radio",{props:{value:i},on:{"on-change":function(){n.currentid=a;var t=[];t.push(r.row),n.formValidate.attrs=t}}})])}};r.columns=a.header,r.columns.unshift(i),r.specsData=a.attrs,r.formValidate.items=a.items})).catch((function(t){r.$Message.error(t.msg)}))},productGetTemplate:function(t){var e=this;Object(l.Q)({id:t}).then((function(t){e.templateList=t.data}))},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,store_name:t.store_name,image:t.image,unit_name:t.unit_name,price:0,min_price:0,bargain_max_price:10,bargain_min_price:.01,cost:t.cost,bargain_num:1,people_num:2,stock:t.stock,sales:t.sales,sort:t.sort,num:1,give_integral:t.give_integral,postage:t.postage,is_postage:t.is_postage,is_hot:t.is_hot,status:0,section_time:[],description:t.description,rule:"",id:0,product_id:t.id,temp_id:t.temp_id,freight:1,delivery_type:[]},e.description=t.description,e.rule=t.rule,e.productGetTemplate(t.id),e.productAttrs(t)}),500)},cancel:function(){this.modals=!1},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=h(this.formValidate.images),a=r.indexOf(this.dragging),i=r.indexOf(e);r.splice.apply(r,[i,0].concat(h(r.splice(a,1)))),this.formValidate.images=r}},onchangeTime:function(t){this.formValidate.section_time=t},getInfo:function(){var t=this;this.spinShow=!0,Object(s.k)(this.$route.params.id).then(function(){var e=f(p().mark((function e(r){var a,i,n,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=t,i=r.data.info,t.formValidate=i,t.description=i.description,t.rule=i.rule,t.formValidate.rule=null===i.rule?"":i.rule,t.$set(t.formValidate,"items",i.attrs.items),t.columns=i.attrs.header,n={title:"选择",key:"chose",width:60,align:"center",render:function(e,r){var a=r.index,i=!1;i=t.currentid===a;var n=t;return e("div",[e("Radio",{props:{value:i},on:{"on-change":function(){n.currentid=a;var t=[];t.push(r.row),n.formValidate.attrs=t}}})])}},a.columns.unshift(n),t.specsData=i.attrs.value,o=[],i.attrs.value.forEach((function(t,e){t.opt&&(o.push(t),a.$set(a,"currentid",e),a.$set(a.formValidate,"attrs",o))})),t.spinShow=!1;case 14: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;3===this.current?(this.rule=this.formValidate.rule,this.$refs[t].validate((function(t){if(!t)return!1;if(""===e.currentid)return e.$Message.error("请选择属性规格");var r=e.specsData[e.currentid],a=e.formValidate.attrs[0];if(a.price=r.price,a.min_price=r.min_price,a.quota=r.quota,e.formValidate.attrs[0].quota<=0)return e.$Message.error("砍价限量必须大于0");1==e.copy&&(e.formValidate.copy=1),e.formValidate.id=e.$route.params.id||0,e.submitOpen=!0,e.formValidate.product_type||(e.formValidate.is_support_refund=1),Object(s.j)(e.formValidate).then(function(){var t=f(p().mark((function t(r){return p().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_bargain/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)}))}))):2===this.current?(this.description=this.formValidate.description,this.rule=this.formValidate.rule,this.current+=1):1===this.current?this.$refs[t].validate((function(t){return t?1==e.formValidate.people_num?e.$Message.error("砍价人数必须大于1"):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("请选择配送方式"):e.$Message.warning("请完善商品信息")})):this.formValidate.image?this.current+=1:this.$Message.warning("请选择商品")},step:function(){this.current--},getContent:function(t){this.formValidate.description=t},getRole:function(t){this.formValidate.rule=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.specsData[this.tableIndex].pic=t.att_dir,this.formValidate.attrs[0].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,this.$refs.goodslist.getList(),this.$refs.goodslist.goodsCategory()},validate:function(t,e,r){!1===e&&this.$Message.error(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("53fa"),r("2877")),x=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_bargain/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:"修改商品详情"}}),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:{rules:t.ruleValidate,model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},on:{"on-validate":t.validate},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{directives:[{name:"show",rawName:"v-show",value:0===t.current,expression:"current === 0"}],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",{staticClass:"iconfonts",attrs:{type:"ios-camera-outline",size:"26"}})],1)])]),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",{staticClass:"iconfonts",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:"people_num","label-for":"people_num"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW40",attrs:{placeholder:"请输入砍价人数","element-id":"people_num",min:1,precision:0},model:{value:t.formValidate.people_num,callback:function(e){t.$set(t.formValidate,"people_num",e)},expression:"formValidate.people_num"}}),e("span",{staticClass:"ml10"},[t._v("人")])],1),e("div",{staticClass:"tips"},[t._v("需要多少人砍价成功")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"帮砍次数:",prop:"bargain_num","label-for":"bargain_num"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW40",attrs:{placeholder:"请输入帮砍次数","element-id":"bargain_num",min:1,precision:0},model:{value:t.formValidate.bargain_num,callback:function(e){t.$set(t.formValidate,"bargain_num",e)},expression:"formValidate.bargain_num"}}),e("span",{staticClass:"ml10"},[t._v("次")])],1),e("div",{staticClass:"tips"},[t._v("单个商品用户可以帮砍的次数,例:次数设置为1,甲和乙同时将商品A的砍价链接发给丙,丙只能帮甲或乙其中一个人砍价")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"购买数量限制:",prop:"num"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"perW40",attrs:{placeholder:"购买数量限制",precision:0,min:1},model:{value:t.formValidate.num,callback:function(e){t.$set(t.formValidate,"num",e)},expression:"formValidate.num"}})],1),e("div",{staticClass:"tips"},[t._v("单个活动每个用户发起砍价次数限制")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"规格选择:"}},[e("Table",{attrs:{data:t.specsData,columns:t.columns,border:""},scopedSlots:t._u([{key:"pic",fn:function(r){r.row;var a=r.index;return[e("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","danTable",a)}}},[t.specsData[a].pic?e("div",{staticClass:"pictrue pictrueTab"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.specsData[a].pic,expression:"specsData[index].pic"}]})]):e("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[e("Icon",{staticClass:"iconfonts",attrs:{type:"ios-camera-outline",size:"21"}})],1)])]}},{key:"price",fn:function(r){r.row;var a=r.index;return[e("InputNumber",{staticClass:"priceBox",attrs:{min:0,"active-change":""},model:{value:t.specsData[a].price,callback:function(e){t.$set(t.specsData[a],"price",e)},expression:"specsData[index].price"}})]}},{key:"min_price",fn:function(r){r.row;var a=r.index;return[e("InputNumber",{staticClass:"priceBox",attrs:{min:0,"active-change":""},model:{value:t.specsData[a].min_price,callback:function(e){t.$set(t.specsData[a],"min_price",e)},expression:"specsData[index].min_price"}})]}},{key:"quota",fn:function(r){r.row;var a=r.index;return[e("InputNumber",{staticClass:"priceBox",attrs:{min:1,"active-change":""},model:{value:t.specsData[a].quota,callback:function(e){t.$set(t.specsData[a],"quota",e)},expression:"specsData[index].quota"}})]}}])})],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:"status","label-for":"status"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[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),2===t.current?e("div",[e("FormItem",{attrs:{label:"内容:"}},[e("WangEditor",{key:1,staticStyle:{width:"90%"},attrs:{content:t.description},on:{editorContent:t.getEditorContent}})],1)],1):t._e(),3===t.current?e("div",[e("FormItem",{attrs:{label:"规则:"}},[e("WangEditor",{key:2,staticStyle:{width:"90%"},attrs:{content:t.rule},on:{editorContent:t.getEditorContent2}})],1)],1):t._e(),t.spinShow?e("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)],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&&"0"!==t.$route.params.id&&1===t.current},on:{click:t.step}},[t._v("上一步")]),e("Button",{staticClass:"submission",attrs:{type:"primary",disabled:t.submitOpen&&3===t.current},domProps:{textContent:t._s(3===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"}},[e("goods-list",{ref:"goodslist",attrs:{goodsType:1},on:{getProductId:t.getProductId}})],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,"3ab90178",null);e.default=x.exports}}]); |