(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a2fb4f6a"],{"28bd":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"i-layout-page-header header_top"},[a("div",{staticClass:"i-layout-page-header fl_header"},[a("router-link",{attrs:{to:{path:"/admin/marketing/store_combination/index"}}},[a("Button",{attrs:{icon:"ios-arrow-back",size:"small",type:"text"}},[e._v("返回")])],1),a("Divider",{attrs:{type:"vertical"}}),a("span",{staticClass:"ivu-page-header-title mr20",staticStyle:{padding:"0"},domProps:{textContent:e._s(e.$route.params.id?"编辑拼团商品":"添加拼团商品")}})],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:e.current}},[a("Step",{attrs:{title:"选择拼团商品"}}),a("Step",{attrs:{title:"填写基础信息"}}),a("Step",{attrs:{title:"修改商品详情"}})],1)],1),a("Col",{attrs:{span:"23"}},[a("Form",{ref:"formValidate",staticClass:"form mt30",attrs:{model:e.formValidate,rules:e.ruleValidate,"label-width":e.labelWidth,"label-position":e.labelPosition},on:{"on-validate":e.validate},nativeOn:{submit:function(e){e.preventDefault()}}},[0===e.current?a("FormItem",{attrs:{label:"选择商品:",prop:"image_input"}},[a("div",{staticClass:"picBox",on:{click:e.changeGoods}},[e.formValidate.image?a("div",{staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.formValidate.image,expression:"formValidate.image"}]})]):a("div",{staticClass:"upLoad acea-row row-center-wrapper"},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)])]):e._e(),a("Row",{directives:[{name:"show",rawName:"v-show",value:1===e.current,expression:"current === 1"}],attrs:{type:"flex"}},[a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品主图:",prop:"image"}},[a("div",{staticClass:"picBox",on:{click:function(t){return e.modalPicTap("dan","danFrom")}}},[e.formValidate.image?a("div",{staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.formValidate.image,expression:"formValidate.image"}]})]):a("div",{staticClass:"upLoad acea-row row-center-wrapper"},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品轮播图:",prop:"images"}},[a("div",{staticClass:"acea-row"},[e._l(e.formValidate.images,(function(t,i){return a("div",{key:i,staticClass:"pictrue",attrs:{draggable:"true"},on:{dragstart:function(a){return e.handleDragStart(a,t)},dragover:function(a){return a.preventDefault(),e.handleDragOver(a,t)},dragenter:function(a){return e.handleDragEnter(a,t)},dragend:function(a){return e.handleDragEnd(a,t)}}},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t,expression:"item"}]}),a("Button",{staticClass:"btndel",attrs:{shape:"circle",icon:"md-close"},nativeOn:{click:function(t){return e.handleRemove(i)}}})],1)})),e.formValidate.images.length<10?a("div",{staticClass:"upLoad acea-row row-center-wrapper",on:{click:function(t){return e.modalPicTap("duo")}}},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1):e._e()],2)])],1),a("Col",{attrs:{span:"24"}},[a("Col",e._b({},"Col",e.grid,!1),[a("FormItem",{attrs:{label:"拼团名称:",prop:"title","label-for":"title"}},[a("Input",{attrs:{placeholder:"请输入拼团名称","element-id":"title"},model:{value:e.formValidate.title,callback:function(t){e.$set(e.formValidate,"title",t)},expression:"formValidate.title"}})],1)],1)],1),a("Col",{attrs:{span:"24"}},[a("Col",e._b({},"Col",e.grid,!1),[a("FormItem",{attrs:{label:"拼团简介:",prop:"info","label-for":"info"}},[a("Input",{attrs:{placeholder:"请输入拼团简介",type:"textarea",rows:4,"element-id":"info"},model:{value:e.formValidate.info,callback:function(t){e.$set(e.formValidate,"info",t)},expression:"formValidate.info"}})],1)],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"拼团时间:",prop:"section_time"}},[a("div",{staticClass:"acea-row row-middle"},[a("DatePicker",{staticClass:"perW30",attrs:{editable:!1,type:"datetimerange",format:"yyyy-MM-dd HH:mm",placeholder:"请选择活动时间",value:e.formValidate.section_time},on:{"on-change":e.onchangeTime},model:{value:e.formValidate.section_time,callback:function(t){e.$set(e.formValidate,"section_time",t)},expression:"formValidate.section_time"}}),a("div",{staticClass:"ml10 grey"},[e._v("\n 设置活动开启结束时间,用户可以在设置时间内发起参与拼团\n ")])],1)])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"物流方式:",prop:"logistics"}},[a("CheckboxGroup",{model:{value:e.formValidate.logistics,callback:function(t){e.$set(e.formValidate,"logistics",t)},expression:"formValidate.logistics"}},[a("Checkbox",{attrs:{label:"1",disabled:""}},[e._v("快递")]),a("Checkbox",{attrs:{label:"2"}},[e._v("到店核销")])],1)],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"运费设置:",prop:1!=e.formValidate.freight?"freight":""}},[a("RadioGroup",{model:{value:e.formValidate.freight,callback:function(t){e.$set(e.formValidate,"freight",t)},expression:"formValidate.freight"}},[a("Radio",{attrs:{label:2}},[e._v("固定邮费")]),a("Radio",{attrs:{label:3}},[e._v("运费模板")])],1)],1)],1),3!=e.formValidate.freight&&1!=e.formValidate.freight?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:""}},[a("div",{staticClass:"acea-row"},[a("InputNumber",{staticClass:"perW20 maxW",attrs:{min:"0.01",placeholder:"请输入金额"},model:{value:e.formValidate.postage,callback:function(t){e.$set(e.formValidate,"postage",t)},expression:"formValidate.postage"}})],1)])],1):e._e(),3==e.formValidate.freight?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",prop:"temp_id"}},[a("div",{staticClass:"acea-row"},[a("Select",{staticClass:"perW20 maxW",attrs:{clearable:"",placeholder:"请选择运费模板"},model:{value:e.formValidate.temp_id,callback:function(t){e.$set(e.formValidate,"temp_id",t)},expression:"formValidate.temp_id"}},e._l(e.templateList,(function(t,i){return a("Option",{key:i,attrs:{value:t.id}},[e._v(e._s(t.name))])})),1),a("span",{staticClass:"addfont",on:{click:e.freight}},[e._v("新增运费模板")])],1)])],1):e._e(),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"拼团时效(单位 小时):",prop:"effective_time"}},[a("div",{staticClass:"acea-row row-middle"},[a("InputNumber",{staticClass:"perW20",attrs:{placeholder:"请输入拼团时效(单位 小时)","element-id":"effective_time"},model:{value:e.formValidate.effective_time,callback:function(t){e.$set(e.formValidate,"effective_time",t)},expression:"formValidate.effective_time"}}),a("div",{staticClass:"ml10 grey"},[e._v("\n 用户发起拼团后开始计时,需在设置时间内邀请到规定好友人数参团,超过时效时间,则系统判定拼团失败,自动发起退款\n ")])],1)])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"拼团人数:",prop:"people"}},[a("div",{staticClass:"acea-row row-middle"},[a("InputNumber",{staticClass:"perW20",attrs:{min:2,placeholder:"请输入拼团人数",precision:0,"element-id":"people"},model:{value:e.formValidate.people,callback:function(t){e.$set(e.formValidate,"people",t)},expression:"formValidate.people"}}),a("div",{staticClass:"ml10 grey"},[e._v("单次拼团需要参与的用户数")])],1)])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"虚拟成团补齐人数:",prop:"virtualPeople"}},[a("div",{staticClass:"acea-row row-middle"},[a("InputNumber",{staticClass:"perW20",attrs:{placeholder:"设置虚拟成团的补齐人数",precision:0,"element-id":"virtualPeople"},model:{value:e.formValidate.virtualPeople,callback:function(t){e.$set(e.formValidate,"virtualPeople",t)},expression:"formValidate.virtualPeople"}}),a("div",{staticClass:"ml10 grey"},[e._v("\n 设置虚拟成团的补齐人数,如:5人团设置补齐2人,当团队成员大于等于3人时,拼团结束时自动补齐剩余最多2个位置,不开启虚拟成团请设置为0\n ")])],1)])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"总购买数量限制:",prop:"num"}},[a("div",{staticClass:"acea-row row-middle"},[a("InputNumber",{staticClass:"perW20",attrs:{min:1,placeholder:"请输入总数量限制",precision:0,"element-id":"num"},model:{value:e.formValidate.num,callback:function(t){e.$set(e.formValidate,"num",t)},expression:"formValidate.num"}}),a("div",{staticClass:"ml10 grey"},[e._v("\n 该商品活动期间内,用户可购买的最大数量。例如设置为4,表示本次活动有效期内,每个用户最多可购买4件\n ")])],1)])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"单次购买数量限制:",prop:"once_num"}},[a("div",{staticClass:"acea-row row-middle"},[a("InputNumber",{staticClass:"perW20",attrs:{min:1,placeholder:"请输入单次购买数量限制",precision:0,"element-id":"once_num"},model:{value:e.formValidate.once_num,callback:function(t){e.$set(e.formValidate,"once_num",t)},expression:"formValidate.once_num"}}),a("div",{staticClass:"ml10 grey"},[e._v("\n 用户参与拼团时,一次购买最大数量限制。例如设置为2,表示每次参与拼团时,用户一次购买数量最大可选择2个\n ")])],1)])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"单位:",prop:"unit_name","label-for":"unit_name"}},[a("Input",{staticClass:"perW20",attrs:{placeholder:"请输入单位","element-id":"unit_name"},model:{value:e.formValidate.unit_name,callback:function(t){e.$set(e.formValidate,"unit_name",t)},expression:"formValidate.unit_name"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"排序:"}},[a("InputNumber",{staticClass:"perW10",attrs:{placeholder:"请输入排序","element-id":"sort",precision:0},model:{value:e.formValidate.sort,callback:function(t){e.$set(e.formValidate,"sort",t)},expression:"formValidate.sort"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"热门推荐:",props:"is_hot","label-for":"is_hot"}},[a("RadioGroup",{attrs:{"element-id":"is_hot"},model:{value:e.formValidate.is_host,callback:function(t){e.$set(e.formValidate,"is_host",t)},expression:"formValidate.is_host"}},[a("Radio",{staticClass:"radio",attrs:{label:1}},[e._v("开启")]),a("Radio",{attrs:{label:0}},[e._v("关闭")])],1)],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"活动状态:",props:"is_show","label-for":"is_show"}},[a("RadioGroup",{attrs:{"element-id":"status"},model:{value:e.formValidate.is_show,callback:function(t){e.$set(e.formValidate,"is_show",t)},expression:"formValidate.is_show"}},[a("Radio",{staticClass:"radio",attrs:{label:1}},[e._v("开启")]),a("Radio",{attrs:{label:0}},[e._v("关闭")])],1)],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"规格选择:"}},[a("Table",{attrs:{data:e.specsData,columns:e.columns,border:""},on:{"on-selection-change":e.changeCheckbox},scopedSlots:e._u([{key:"price",fn:function(t){var i=t.row,r=t.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0,precision:2,"active-change":!1},on:{"on-change":function(t){e.changePrice(t,r)}},model:{value:i.price,callback:function(t){e.$set(i,"price",t)},expression:"row.price"}})]}},{key:"pic",fn:function(t){var i=t.row,r=t.index;return[a("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(t){return e.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",{attrs:{type:"ios-camera-outline",size:"21"}})],1)])]}}])})],1)],1)],1),a("Row",{directives:[{name:"show",rawName:"v-show",value:2===e.current,expression:"current === 2"}]},[a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"内容:"}},[a("WangEditor",{staticStyle:{width:"90%"},attrs:{content:e.formValidate.description},on:{editorContent:e.getEditorContent}})],1)],1)],1),a("FormItem",[a("Button",{directives:[{name:"show",rawName:"v-show",value:0!==e.current,expression:"current !== 0"}],staticClass:"submission mr15",attrs:{disabled:e.$route.params.id&&1===e.current},on:{click:e.step}},[e._v("上一步")]),a("Button",{staticClass:"submission",attrs:{type:"primary",disabled:e.submitOpen&&2===e.current},domProps:{textContent:e._s(2===e.current?"提交":"下一步")},on:{click:function(t){return e.next("formValidate")}}})],1)],1),e.spinShow?a("Spin",{attrs:{size:"large",fix:""}}):e._e()],1)],1)],1),a("Modal",{staticClass:"paymentFooter",attrs:{title:"商品列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":e.cancel},model:{value:e.modals,callback:function(t){e.modals=t},expression:"modals"}},[a("goods-list",{ref:"goodslist",on:{getProductId:e.getProductId}})],1),a("Modal",{attrs:{width:"950px",scrollable:"","footer-hide":"",closable:"",title:"上传商品图","mask-closable":!1,"z-index":888},model:{value:e.modalPic,callback:function(t){e.modalPic=t},expression:"modalPic"}},[e.modalPic?a("uploadPictures",{attrs:{isChoice:e.isChoice,gridBtn:e.gridBtn,gridPic:e.gridPic},on:{getPic:e.getPic,getPicD:e.getPicD}}):e._e()],1),a("freight-template",{ref:"template",on:{addSuccess:e.productGetTemplate}})],1)},r=[],s=(a("8e6e"),a("456d"),a("75fc")),o=(a("c5f6"),a("7f7f"),a("96cf"),a("3b8d")),n=(a("55dd"),a("ac6a"),a("bd86")),l=a("2f62"),c=a("c4ad"),d=a("ef0d"),m=a("a069"),u=a("b0e7"),p=a("b7be"),f=a("c4c8"),g=a("5334");function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function b(e){for(var t=1;tt.formValidate.attrs[i]["stock"])return t.$Message.error("拼团限量不能超过规格库存")}t.current+=1})):this.formValidate.image?this.current+=1:this.$Message.warning("请选择商品")},step:function(){this.current--},getContent:function(e){this.formValidate.description=e},modalPicTap:function(e,t,a){this.modalPic=!0,this.isChoice="dan"===e?"单选":"多选",this.picTit=t,this.tableIndex=a},getPic:function(e){switch(this.picTit){case"danFrom":this.formValidate.image=e.att_dir;break;default:this.formValidate.attrs&&this.formValidate.attrs.length&&this.$set(this.specsData[this.tableIndex],"_checked",!0),this.specsData[this.tableIndex].pic=e.att_dir}this.modalPic=!1},getPicD:function(e){var t=this;this.images=e,this.images.map((function(e){t.formValidate.images.push(e.att_dir),t.formValidate.images=t.formValidate.images.splice(0,10)})),this.modalPic=!1},handleRemove:function(e){this.images.splice(e,1),this.formValidate.images.splice(e,1)},changeGoods:function(){this.modals=!0,this.$refs.goodslist.formValidate.is_virtual=0,this.$refs.goodslist.getList(),this.$refs.goodslist.goodsCategory()},handleDragStart:function(e,t){this.dragging=t},handleDragEnd:function(e,t){this.dragging=null},handleDragOver:function(e){e.dataTransfer.dropEffect="move"},handleDragEnter:function(e,t){if(e.dataTransfer.effectAllowed="move",t!==this.dragging){var a=Object(s["a"])(this.formValidate.images),i=a.indexOf(this.dragging),r=a.indexOf(t);a.splice.apply(a,[r,0].concat(Object(s["a"])(a.splice(i,1)))),this.formValidate.images=a}}}},_=v,w=(a("6888"),a("2877")),V=Object(w["a"])(_,i,r,!1,null,"0fdf0fee",null);t["default"]=V.exports},6888:function(e,t,a){"use strict";var i=a("6d95"),r=a.n(i);r.a},"6d95":function(e,t,a){},ef0d:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("vue-ueditor-wrap",{staticStyle:{width:"90%"},attrs:{config:e.myConfig},on:{beforeInit:e.addCustomDialog},model:{value:e.contents,callback:function(t){e.contents=t},expression:"contents"}})],1)},r=[],s=a("6625"),o=a.n(s),n={name:"index",components:{VueUeditorWrap:o.a},props:{content:""},watch:{content:{handler:function(e){},deep:!0}},data:function(){return{contents:this.content,myConfig:{autoHeightEnabled:!1,initialFrameHeight:200,initialFrameWidth:"100%",UEDITOR_HOME_URL:"/admin/UEditor/",serverUrl:""}}},methods:{addCustomDialog:function(e){window.UE.registerUI("test-dialog",(function(e,t){var a=new window.UE.ui.Dialog({iframeUrl:"/admin/widget.images/index.html?fodder=dialog",editor:e,name:t,title:"上传图片",cssRules:"width:960px;height:550px;padding:20px;"});this.dialog=a;var i=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()}});return i}),37,e)}},created:function(){}},l=n,c=a("2877"),d=Object(c["a"])(l,i,r,!1,null,"2b6750ca",null);t["a"]=d.exports}}]);