1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-cc8ca0aa"],{"1a3f":function(t,e,a){},"28bd":function(t,e,a){"use strict";a.r(e);var i=a("a34a"),r=a.n(i),s=a("2f62"),o=a("c4ad"),n=a("a069"),l=a("b0e7"),c=a("5334"),d=a("b7be"),m=a("c4c8"),p=a("d708");function u(t){return function(t){if(Array.isArray(t)){for(var e=0,a=new Array(t.length);e<t.length;e++)a[e]=t[e];return a}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function f(t,e,a,i,r,s,o){try{var n=t[s](o),l=n.value}catch(t){return void a(t)}n.done?e(l):Promise.resolve(l).then(i,r)}function g(t){return function(){var e=this,a=arguments;return new Promise((function(i,r){var s=t.apply(e,a);function o(t){f(s,i,r,o,n,"next",t)}function n(t){f(s,i,r,o,n,"throw",t)}o(void 0)}))}}function h(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 v(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:"storeCombinationCreate",components:{goodsList:o.default,uploadPictures:l.a,WangEditor:n.a,freightTemplate:c.a},data:function(){return{roterPre:p.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:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?h(a,!0).forEach((function(e){v(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):h(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(s.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(m.eb)()).then((function(){return t.getAllUnit()}))},getAllUnit:function(){var t=this;Object(m.z)().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(d.mb)(t.id,3).then((function(t){var a=t.data.info;e.specsData=a.attrs,e.specsData.forEach((function(t,a){e.$set(e.specsData[a],"id",a)})),e.formValidate.items=a.items,e.columns=a.header,e.columns.unshift({type:"selection",width:60,align:"center"}),e.inputChange(a)})).catch((function(t){e.$Message.error(t.msg)}))},inputChange:function(t){var e=this,a=[];t.header.forEach((function(t,e){1===t.type&&a.push({index:e,key:t.key,title:t.title})})),a.forEach((function(t,a){var i=t.title,r=t.key,s={title:i,key:r,align:"center",minWidth:100,render:function(t,a){return t("div",[t("InputNumber",{props:{min:0,value:"price"===r?a.row.price:a.row.quota},on:{"on-change":function(t){"price"===r?a.row.price=t:a.row.quota=t,e.specsData[a.index]=a.row,e.formValidate.attrs&&e.formValidate.attrs.length&&e.formValidate.attrs.forEach((function(t,i){t.id===a.row.id&&e.formValidate.attrs.splice(i,1,a.row)}))}}})])}};e.columns.splice(t.index,1,s)}))},changeCheckbox:function(t){this.formValidate.attrs=t},productGetTemplate:function(t){var e=this;Object(m.N)({id:t}).then((function(t){e.templateList=t.data}))},validate:function(t,e,a){!1===e&&this.$Message.error(a)},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(d.p)(this.$route.params.id).then(function(){var e=g(r.a.mark((function e(a){var i,s,o,n,l,c;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(c in i=t,s=a.data.info,o={type:"selection",width:60,align:"center"},t.formValidate=s,t.description=s.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",s.attrs.items),t.columns=s.attrs.header,t.columns.unshift(o),t.specsData=s.attrs.value,i.specsData.forEach((function(t,e){i.$set(i.specsData[e],"id",e)})),n=s.attrs,l=[],s.attrs.value)s.attrs.value[c]._checked&&l.push(s.attrs.value[c]);i.formValidate.attrs=l,i.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,a=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(d.o)(e.formValidate).then(function(){var t=g(r.a.mark((function t(a){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.submitOpen=!1,e.$Message.success(a.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(a.formValidate.people<2)return a.$Message.error("拼团人数必须大于2");if(a.formValidate.num<0)return a.$Message.error("购买数量限制必须大于0");if(a.formValidate.once_num<0)return a.$Message.error("单次购买数量限制必须大于0");if(!a.formValidate.attrs)return a.$Message.error("请选择属性规格");for(var i in a.formValidate.attrs)if(a.formValidate.attrs[i].quota<=0)return a.$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,a){this.modalPic=!0,this.isChoice="dan"===t?"单选":"多选",this.picTit=e,this.tableIndex=a},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 a=u(this.formValidate.images),i=a.indexOf(this.dragging),r=a.indexOf(e);a.splice.apply(a,[r,0].concat(u(a.splice(i,1)))),this.formValidate.images=a}},addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var a=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=a,new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;",onclick:function(){a.render(),a.open()}})}),37)}}},_=(a("5042"),a("2877")),V=Object(_.a)(b,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"form-submit"},[a("div",{staticClass:"i-layout-page-header"},[a("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[a("div",{attrs:{slot:"title"},slot:"title"},[a("router-link",{attrs:{to:{path:t.roterPre+"/marketing/store_combination/index"}}},[a("div",{staticClass:"font-sm after-line"},[a("span",{staticClass:"iconfont iconfanhui"}),a("span",{staticClass:"pl10"},[t._v("返回")])])]),a("span",{staticClass:"mr20 ml16",domProps:{textContent:t._s(t.$route.params.id?"编辑拼团商品":"添加拼团商品")}})],1)])],1),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Row",{staticClass:"mt30 acea-row row-middle row-center",attrs:{type:"flex"}},[a("Col",{attrs:{span:"20"}},[a("Steps",{attrs:{current:t.current}},[a("Step",{attrs:{title:"选择拼团商品"}}),a("Step",{attrs:{title:"填写基础信息"}}),a("Step",{attrs:{title:"修改商品详情"}})],1)],1),a("Col",{attrs:{span:"23"}},[a("Col",{attrs:{span:"24"}},[a("div",{staticClass:"lines mt25"})]),a("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?a("FormItem",{attrs:{label:"选择商品:",prop:"image_input"}},[a("div",{staticClass:"picBox",on:{click:t.changeGoods}},[t.formValidate.image?a("div",{staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formValidate.image,expression:"formValidate.image"}]})]):a("div",{staticClass:"upLoad acea-row row-center-wrapper"},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)])]):t._e(),a("Row",{directives:[{name:"show",rawName:"v-show",value:1===t.current,expression:"current === 1"}],attrs:{type:"flex"}},[a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"拼团活动名称:",prop:"title","label-for":"title"}},[a("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),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"拼团活动简介:",prop:"info","label-for":"info"}},[a("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),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"单位:",prop:"unit_name","label-for":"unit_name"}},[a("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(e,i){return a("Option",{key:i,attrs:{value:e.name}},[t._v(t._s(e.name))])})),1),a("span",{staticClass:"addClass",on:{click:t.addUnit}},[t._v("新增单位")])],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{prop:"images"}},[a("div",{staticClass:"custom-label",attrs:{slot:"label"},slot:"label"},[a("div",[a("div",[t._v("商品轮播图")])]),a("div",[t._v(":")])]),a("div",{staticClass:"acea-row"},[t._l(t.formValidate.images,(function(e,i){return a("div",{key:i,staticClass:"pictrue",attrs:{draggable:"true"},on:{dragstart:function(a){return t.handleDragStart(a,e)},dragover:function(a){return a.preventDefault(),t.handleDragOver(a,e)},dragenter:function(a){return t.handleDragEnter(a,e)},dragend:function(a){return t.handleDragEnd(a,e)}}},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e,expression:"item"}]}),a("Button",{staticClass:"btndel",attrs:{shape:"circle",icon:"md-close"},nativeOn:{click:function(e){return t.handleRemove(i)}}})],1)})),t.formValidate.images.length<10?a("div",{staticClass:"upLoad acea-row row-center-wrapper",on:{click:function(e){return t.modalPicTap("duo")}}},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1):t._e()],2),a("div",{staticClass:"tips"},[t._v(" 建议尺寸:800 * 800px,可拖拽改变图片顺序,默认首张图为主图,最多上传10张")])])],1),a("Col",{attrs:{span:"24"}},[a("div",{staticClass:"lines"})]),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"活动时间:",prop:"section_time"}},[a("div",{staticClass:"acea-row row-middle"},[a("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),a("div",{staticClass:"tips"},[t._v("设置活动开启结束时间,用户可以在设置时间内发起参与拼团")])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"拼团时效:",prop:"effective_time"}},[a("div",{staticClass:"acea-row row-middle"},[a("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"}}),a("span",{staticClass:"ml10"},[t._v("小时")])],1),a("div",{staticClass:"tips"},[t._v("用户发起拼团后开始计时,需在设置时间内邀请到规定好友人数参团,超过时效时间,则系统判定拼团失败,自动发起退款")])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"拼团人次:",prop:"people"}},[a("div",{staticClass:"acea-row row-middle"},[a("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"}}),a("span",{staticClass:"ml10"},[t._v("次")])],1),a("div",{staticClass:"tips"},[t._v("单次拼团需要参与的用户数")])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"总购买数量限制:",prop:"num"}},[a("div",{staticClass:"acea-row row-middle"},[a("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"}}),a("span",{staticClass:"ml10"},[t._v("个")])],1),a("div",{staticClass:"tips"},[t._v("该商品活动期间内,用户可购买的最大数量。例如设置为4,表示本次活动有效期内,每个用户最多可购买4件")])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"单次购买数量限制:",prop:"once_num"}},[a("div",{staticClass:"acea-row row-middle"},[a("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"}}),a("span",{staticClass:"ml10"},[t._v("个")])],1),a("div",{staticClass:"tips"},[t._v("用户参与拼团时,一次购买最大数量限制。例如设置为2,表示每次参与拼团时,用户一次购买数量最大可选择2个")])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"补齐人数:"}},[a("div",{staticClass:"acea-row row-middle"},[a("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"}}),a("span",{staticClass:"ml10"},[t._v("人")])],1),a("div",{staticClass:"tips"},[t._v("\n 当用户参与拼团后,成团时效内未成团情况下,设置补齐人数可虚拟成团。例如:成团人数为10人,补齐人数为4人,真实用户需要参与6人成团才可以在最后未成团时自动补齐虚拟人员\n ")])])],1),a("Col",{directives:[{name:"show",rawName:"v-show"}],attrs:{span:"24"}},[a("FormItem",{attrs:{label:"虚拟成团比例(%):",prop:"virtual"}},[a("div",{staticClass:"acea-row row-middle"},[a("InputNumber",{staticClass:"perW40",attrs:{min:0,disabled:"",placeholder:"请输入虚拟成团比例",precision:0,max:100,"element-id":"virtual",formatter:function(t){return 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),a("div",{staticClass:"tips"},[t._v("拼团结束前若用户发起的活动未成团,并且现有人数比例大于设置比例,自动补齐人数,拼团成功。100%为不自动补齐")])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"规格选择:"}},[a("Table",{attrs:{data:t.specsData,columns:t.columns,border:""},on:{"on-selection-change":t.changeCheckbox},scopedSlots:t._u([{key:"pic",fn:function(e){var i=e.row,r=e.index;return[a("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","danTable",r)}}},[i.pic?a("div",{staticClass:"pictrue pictrueTab"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:i.pic,expression:"row.pic"}]})]):a("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[a("Icon",{staticClass:"iconfont",attrs:{type:"ios-camera-outline",size:"21"}})],1)])]}}])})],1)],1),a("Col",{attrs:{span:"24"}},[a("div",{staticClass:"lines"})]),0==t.formValidate.product_type?a("Col",[a("FormItem",{attrs:{label:"配送方式:"}},[a("CheckboxGroup",{model:{value:t.formValidate.delivery_type,callback:function(e){t.$set(t.formValidate,"delivery_type",e)},expression:"formValidate.delivery_type"}},[a("Checkbox",{attrs:{label:"1"}},[t._v("快递")]),a("Checkbox",{attrs:{label:"3"}},[t._v("门店配送")]),a("Checkbox",{attrs:{label:"2"}},[t._v("到店自提")])],1)],1)],1):t._e(),0==t.formValidate.product_type?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"运费设置:"}},[a("RadioGroup",{model:{value:t.formValidate.freight,callback:function(e){t.$set(t.formValidate,"freight",e)},expression:"formValidate.freight"}},[a("Radio",{attrs:{label:1}},[t._v("包邮")]),a("Radio",{attrs:{label:2}},[t._v("固定邮费")]),a("Radio",{attrs:{label:3}},[t._v("运费模板")])],1)],1)],1):t._e(),2==t.formValidate.freight&&0==t.formValidate.product_type?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",prop:"freight"}},[a("div",{staticClass:"acea-row row-middle"},[a("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"}}),a("span",{staticClass:"ml10"},[t._v("元")])],1)])],1):t._e(),3==t.formValidate.freight&&0==t.formValidate.product_type?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",prop:""}},[a("div",{staticClass:"acea-row"},[a("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(e,i){return a("Option",{key:i,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1),a("Button",{staticClass:"ml15",on:{click:t.addTemp}},[t._v("添加运费模板")])],1)])],1):t._e(),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"排序:"}},[a("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),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"活动状态:",props:"is_show","label-for":"is_show"}},[a("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"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"热门推荐:",props:"is_hot","label-for":"is_hot"}},[a("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"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),t.formValidate.product_type?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"支持退款:",props:"status","label-for":"status"}},[a("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"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1):t._e()],1),a("Row",{directives:[{name:"show",rawName:"v-show",value:2===t.current,expression:"current === 2"}]},[a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"内容:"}},[a("WangEditor",{staticStyle:{width:"90%"},attrs:{content:t.formValidate.description},on:{editorContent:t.getEditorContent}})],1)],1)],1)],1),t.spinShow?a("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)],1)],1),a("Card",{staticClass:"fixed-card",style:{left:t.menuCollapse?t.isMobile?"0":"80px":"200px"},attrs:{bordered:!1,"dis-hover":""}},[a("Form",[a("FormItem",[a("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("上一步")]),a("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),a("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?a("goods-list",{ref:"goodslist",attrs:{goodsType:1},on:{getProductId:t.getProductId}}):t._e()],1),a("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?a("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic,getPicD:t.getPicD}}):t._e()],1),a("freightTemplate",{ref:"templates",attrs:{template:t.template},on:{changeTemplate:t.changeTemplate}})],1)}),[],!1,null,"bd6cd7b4",null);e.default=V.exports},5042:function(t,e,a){"use strict";var i=a("1a3f");a.n(i).a}}]);
|