zx/public/mer/js/chunk-02936cc9.06e5afd6.js

1 line
48 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-02936cc9"],{"0928":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("el-steps",{attrs:{active:t.currentTab,"align-center":"","finish-status":"success"}},[a("el-step",{attrs:{title:"选择拼团商品"}}),t._v(" "),a("el-step",{attrs:{title:"填写基础信息"}}),t._v(" "),a("el-step",{attrs:{title:"修改商品详情"}})],1)],1),t._v(" "),a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.fullscreenLoading,expression:"fullscreenLoading"}],ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":"160px"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("div",{directives:[{name:"show",rawName:"v-show",value:0===t.currentTab,expression:"currentTab === 0"}],staticStyle:{overflow:"hidden"}},[a("el-row",{attrs:{gutter:24}},[a("el-col",t._b({},"el-col",t.grid2,!1),[a("el-form-item",{attrs:{label:"选择商品:",prop:"image"}},[a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.add()}}},[t.formValidate.image?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.formValidate.image}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])])],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:1===t.currentTab,expression:"currentTab === 1"}]},[a("el-row",{attrs:{gutter:24}},[a("el-col",t._b({},"el-col",t.grid2,!1),[a("el-form-item",{attrs:{label:"商品主图:",prop:"image"}},[a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("1")}}},[t.formValidate.image?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.formValidate.image}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])])],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品轮播图:",prop:"slider_image"}},[a("div",{staticClass:"acea-row"},[t._l(t.formValidate.slider_image,(function(e,i){return a("div",{key:i,staticClass:"pictrue",attrs:{draggable:"false"},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",{attrs:{src:e}}),t._v(" "),a("i",{staticClass:"el-icon-error btndel",on:{click:function(e){return t.handleRemove(i)}}})])})),t._v(" "),t.formValidate.slider_image.length<10?a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("2")}}},[a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])]):t._e()],2)])],1),t._v(" "),a("el-col",{staticClass:"sp100"},[a("el-form-item",{attrs:{label:"拼团名称:",prop:"store_name"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入商品名称"},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1)],1)],1),t._v(" "),a("el-row",{attrs:{gutter:24}},[a("el-col",{staticClass:"sp100"},[a("el-form-item",{attrs:{label:"拼团简介:",prop:"store_info"}},[a("el-input",{attrs:{size:"small",type:"textarea",rows:3,placeholder:"请输入秒杀活动简介"},model:{value:t.formValidate.store_info,callback:function(e){t.$set(t.formValidate,"store_info",e)},expression:"formValidate.store_info"}})],1)],1)],1),t._v(" "),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"拼团时间:",required:""}},[a("el-date-picker",{attrs:{type:"datetimerange",size:"small","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",align:"right"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}}),t._v(" "),a("span",{staticClass:"item_desc"},[t._v("设置活动开启结束时间,用户可以在设置时间内发起参与拼团")])],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"送货方式:",prop:"delivery_way"}},[a("div",{staticClass:"acea-row"},[a("el-checkbox-group",{model:{value:t.formValidate.delivery_way,callback:function(e){t.$set(t.formValidate,"delivery_way",e)},expression:"formValidate.delivery_way"}},t._l(t.deliveryList,(function(e){return a("el-checkbox",{key:e.value,attrs:{label:e.value}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)])],1),t._v(" "),(2==t.formValidate.delivery_way.length||1==t.formValidate.delivery_way.length&&2==t.formValidate.delivery_way[0])&&0==t.formValidate.type?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"是否包邮:"}},[a("el-radio-group",{model:{value:t.formValidate.delivery_free,callback:function(e){t.$set(t.formValidate,"delivery_free",e)},expression:"formValidate.delivery_free"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[t._v("否")]),t._v(" "),a("el-radio",{attrs:{label:1}},[t._v("是")])],1)],1)],1):t._e(),t._v(" "),0==t.formValidate.delivery_free&&(2==t.formValidate.delivery_way.length||1==t.formValidate.delivery_way.length&&2==t.formValidate.delivery_way[0])&&0==t.formValidate.type?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"运费模板:",prop:"temp_id"}},[a("div",{staticClass:"acea-row"},[a("el-select",{staticClass:"selWidthd mr20",attrs:{size:"small",placeholder:"请选择"},model:{value:t.formValidate.temp_id,callback:function(e){t.$set(t.formValidate,"temp_id",e)},expression:"formValidate.temp_id"}},t._l(t.shippingList,(function(t){return a("el-option",{key:t.shipping_template_id,attrs:{label:t.name,value:t.shipping_template_id}})})),1),t._v(" "),a("el-button",{staticClass:"mr15",attrs:{size:"small"},on:{click:t.addTem}},[t._v("添加运费模板")])],1)])],1):t._e(),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"平台保障服务:"}},[a("div",{staticClass:"acea-row"},[a("el-select",{staticClass:"selWidthd mr20",attrs:{size:"small",placeholder:"请选择",clearable:""},model:{value:t.formValidate.guarantee_template_id,callback:function(e){t.$set(t.formValidate,"guarantee_template_id",e)},expression:"formValidate.guarantee_template_id"}},t._l(t.guaranteeList,(function(t){return a("el-option",{key:t.guarantee_template_id,attrs:{label:t.template_name,value:t.guarantee_template_id}})})),1),t._v(" "),a("el-button",{staticClass:"mr15",attrs:{size:"small"},on:{click:t.addServiceTem}},[t._v("添加服务说明模板")])],1)])],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"拼团时效(单位:小时)",prop:"time"}},[a("el-input-number",{staticClass:"mr10",attrs:{size:"small",min:1,placeholder:"请输入时效"},model:{value:t.formValidate.time,callback:function(e){t.$set(t.formValidate,"time",e)},expression:"formValidate.time"}}),t._v(" "),a("span",{staticClass:"item_desc"},[t._v("用户发起拼团后开始计时,需在设置时间内邀请到规定好友人数参团,超过时效时间,则系统判定拼团失败,自动发起退款")])],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"拼团人数:",prop:"buying_count_num"}},[a("el-input-number",{staticClass:"mr10",attrs:{size:"small",min:2,placeholder:"请输入人数"},on:{change:t.calFictiCount},model:{value:t.formValidate.buying_count_num,callback:function(e){t.$set(t.formValidate,"buying_count_num",e)},expression:"formValidate.buying_count_num"}}),t._v(" "),a("span",{staticClass:"item_desc"},[t._v("单次拼团需要参与的用户数")])],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"活动期间限购件数:",prop:"pay_count"}},[a("el-input-number",{staticClass:"mr10",attrs:{size:"small",min:1,placeholder:"请输入数量"},model:{value:t.formValidate.pay_count,callback:function(e){t.$set(t.formValidate,"pay_count",e)},expression:"formValidate.pay_count"}}),t._v(" "),a("span",{staticClass:"item_desc"},[t._v("该商品活动期间内用户可购买的最大数量。例如设置为4表示本地活动有效期内每个用户最多可购买4件")])],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"单次限购件数:",prop:"once_pay_count"}},[a("el-input-number",{staticClass:"mr10",attrs:{size:"small",min:1,max:t.formValidate.pay_count,placeholder:"请输入数量"},model:{value:t.formValidate.once_pay_count,callback:function(e){t.$set(t.formValidate,"once_pay_count",e)},expression:"formValidate.once_pay_count"}}),t._v(" "),a("span",{staticClass:"item_desc"},[t._v("用户参与拼团时一次购买最大数量限制。例如设置为2表示每次参与拼团时用户一次购买数量最大可选择2个")])],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"单位:",prop:"unit_name"}},[a("el-input",{staticStyle:{width:"250px"},attrs:{size:"small",placeholder:"请输入单位"},model:{value:t.formValidate.unit_name,callback:function(e){t.$set(t.formValidate,"unit_name",e)},expression:"formValidate.unit_name"}})],1)],1)],1),t._v(" "),1==t.combinationData.ficti_status?a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"虚拟成团:"}},[a("el-switch",{attrs:{width:55,"active-text":"开启","inactive-text":"关闭"},model:{value:t.formValidate.ficti_status,callback:function(e){t.$set(t.formValidate,"ficti_status",e)},expression:"formValidate.ficti_status"}})],1)],1)],1):t._e(),t._v(" "),1==t.combinationData.ficti_status?a("el-row",{attrs:{gutter:24}},[1==t.formValidate.ficti_status?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"虚拟成团补齐人数:",prop:"ficti_num"}},[a("el-input-number",{staticClass:"mr10",attrs:{size:"small",min:0,max:t.max_ficti_num,placeholder:"请输入数量"},model:{value:t.formValidate.ficti_num,callback:function(e){t.$set(t.formValidate,"ficti_num",e)},expression:"formValidate.ficti_num"}}),t._v(" "),a("span",{staticClass:"item_desc"},[t._v("拼团时效到时,系统自动补齐的最大拼团人数,平台规定虚拟成团最大比例为"+t._s(100-t.combinationData.group_buying_rate)+"%")])],1)],1):t._e()],1):t._e(),t._v(" "),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"排序:",prop:"sort"}},[a("el-input-number",{attrs:{size:"small",min:0,placeholder:"请输入排序数值"},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"显示状态:"}},[a("el-radio-group",{model:{value:t.formValidate.is_show,callback:function(e){t.$set(t.formValidate,"is_show",e)},expression:"formValidate.is_show"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[t._v("关闭")]),t._v(" "),a("el-radio",{attrs:{label:1}},[t._v("开启")])],1)],1)],1)],1),t._v(" "),t.formData.length>0&&1===t.currentTab&&t.formValidate.mer_form_id?a("el-row",{attrs:{gutter:24}},[a("el-col",[a("el-form-item",{attrs:{label:"关联系统表单:"}},[a("span",{staticClass:"explanation"},[t._v("如需改活动商品系统表单,请前往对应普通商品>编辑>修改系统表单即可实现")])])],1),t._v(" "),a("el-col",{attrs:{span:16}},[a("el-form-item",[a("div",{staticStyle:{width:"350px"}},[a("iframe",{ref:"iframe",staticClass:"iframe-box",staticStyle:{"min-height":"300px"},attrs:{id:"iframe",src:t.formUrl,frameborder:"0"}})])])],1)],1):t._e(),t._v(" "),a("el-row",[1===t.formValidate.spec_type&&t.formValidate.attr.length>0?a("el-col",{staticClass:"noForm",attrs:{span:24}},[a("el-form-item",{attrs:{label:"批量设置:"}},[a("el-table",{staticClass:"disabledTable",attrs:{data:t.oneFormBatch,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"商品规格","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"acea-row row-between-wrapper",staticStyle:{cursor:"pointer"},on:{click:t.batchAttr}},[a("div",{staticStyle:{width:"45px"}},[t._v(t._s(t.oneFormBatch[0]["attr"]))]),t._v(" "),a("i",{staticClass:"el-icon-arrow-down"})])]}}],null,!1,552951624)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"upLoadPicBox",attrs:{title:"750*750px"},on:{click:function(e){return t.modalPicTap("1","pi")}}},[e.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,772438934)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"市场价","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",disabled:""},model:{value:e.row["price"],callback:function(a){t.$set(e.row,"price",a)},expression:"scope.row['price']"}})]}}],null,!1,1139524039)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"拼团价","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",min:0,max:e.row["price"]},model:{value:e.row["active_price"],callback:function(a){t.$set(e.row,"active_price",a)},expression:"scope.row['active_price']"}})]}}],null,!1,1029251897)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"成本价","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",disabled:""},model:{value:e.row["cost"],callback:function(a){t.$set(e.row,"cost",a)},expression:"scope.row['cost']"}})]}}],null,!1,2910179585)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"库存","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",disabled:""},model:{value:e.row["old_stock"],callback:function(a){t.$set(e.row,"old_stock",a)},expression:"scope.row['old_stock']"}})]}}],null,!1,1008804210)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"限量","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",max:e.row["old_stock"],min:0},model:{value:e.row["stock"],callback:function(a){t.$set(e.row,"stock",t._n(a))},expression:"scope.row['stock']"}})]}}],null,!1,3705608482)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"商品编号","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"text",disabled:""},model:{value:e.row["bar_code"],callback:function(a){t.$set(e.row,"bar_code",a)},expression:"scope.row['bar_code']"}})]}}],null,!1,4143355351)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"重量KG","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",disabled:""},model:{value:e.row["weight"],callback:function(a){t.$set(e.row,"weight",a)},expression:"scope.row['weight']"}})]}}],null,!1,886269866)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"体积","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",disabled:""},model:{value:e.row["volume"],callback:function(a){t.$set(e.row,"volume",a)},expression:"scope.row['volume']"}})]}}],null,!1,1416808322)}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"80"}},[[a("el-button",{staticClass:"submission",attrs:{type:"text",size:"small"},on:{click:t.batchAdd}},[t._v("批量添加")])]],2)],1)],1)],1):t._e()],1),t._v(" "),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[0===t.formValidate.spec_type?a("el-form-item",{attrs:{label:"规格列表:"}},[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.OneattrValue,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("1","dan","pi")}}},[t.formValidate.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,1357914119)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"市场价","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["price"]))])]}}],null,!1,1703924291)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"拼团价","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",min:0,max:e.row["price"]},on:{blur:function(a){return t.limitPrice(e.row)}},model:{value:e.row["active_price"],callback:function(a){t.$set(e.row,"active_price",a)},expression:"scope.row['active_price']"}})]}}],null,!1,3925656555)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"成本价","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["cost"]))])]}}],null,!1,4236060069)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"库存","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["old_stock"]))])]}}],null,!1,1655454038)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"限量","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",max:e.row["old_stock"],min:0},on:{change:function(a){return t.limitInventory(e.row)}},model:{value:e.row["stock"],callback:function(a){t.$set(e.row,"stock",t._n(a))},expression:"scope.row['stock']"}})]}}],null,!1,571010168)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"商品编号","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["bar_code"]))])]}}],null,!1,2057585133)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"重量KG","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["weight"]))])]}}],null,!1,1649766542)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"体积","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["volume"]))])]}}],null,!1,2118841126)})],1)],1):t._e()],1)],1),t._v(" "),a("el-row",{attrs:{gutter:24}},[1===t.formValidate.spec_type?a("el-form-item",{attrs:{label:"规格列表:"}},[a("el-table",{ref:"multipleSelection",attrs:{data:t.ManyAttrValue,size:"small","tooltip-effect":"dark","row-key":function(t){return t.id}},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{align:"center",type:"selection","reserve-selection":!0,"min-width":"50"}}),t._v(" "),t.manyTabDate?t._l(t.manyTabDate,(function(e,i){return a("el-table-column",{key:i,attrs:{align:"center",label:t.manyTabTit[i].title,"min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",class:e.row.select?"selectOn":"",domProps:{textContent:t._s(e.row[i])}})]}}],null,!0)})})):t._e(),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"upLoadPicBox",on:{click:function(a){return t.modalPicTap("1","duo",e.$index)}}},[e.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,3478746955)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"市场价","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["price"]))])]}}],null,!1,1703924291)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"拼团价","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",min:0,max:e.row["price"]},on:{blur:function(a){return t.limitPrice(e.row)}},model:{value:e.row["active_price"],callback:function(a){t.$set(e.row,"active_price",a)},expression:"scope.row['active_price']"}})]}}],null,!1,3925656555)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"成本价","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["cost"]))])]}}],null,!1,4236060069)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"库存","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["old_stock"]))])]}}],null,!1,1655454038)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"限量","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small",type:"number",min:0,max:e.row["old_stock"]},on:{change:function(a){return t.limitInventory(e.row)}},model:{value:e.row["stock"],callback:function(a){t.$set(e.row,"stock",t._n(a))},expression:"scope.row['stock']"}})]}}],null,!1,190592248)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"商品编号","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["bar_code"]))])]}}],null,!1,2057585133)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"重量KG","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["weight"]))])]}}],null,!1,1649766542)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"体积","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["volume"]))])]}}],null,!1,2118841126)})],2)],1):t._e()],1)],1),t._v(" "),a("el-row",{directives:[{name:"show",rawName:"v-show",value:2===t.currentTab,expression:"currentTab === 2"}]},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品详情:"}},[a("ueditorFrom",{attrs:{content:t.formValidate.content},model:{value:t.formValidate.content,callback:function(e){t.$set(t.formValidate,"content",e)},expression:"formValidate.content"}})],1)],1)],1),t._v(" "),a("el-form-item",{staticStyle:{"margin-top":"30px"}},[a("el-button",{directives:[{name:"show",rawName:"v-show",value:t.currentTab>0,expression:"currentTab>0"}],staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:t.handleSubmitUp}},[t._v("上一步")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:0==t.currentTab,expression:"currentTab == 0"}],staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleSubmitNest1("formValidate")}}},[t._v("下一步")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:1==t.currentTab,expression:"currentTab == 1"}],staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleSubmitNest2("formValidate")}}},[t._v("下一步")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:2===t.currentTab,expression:"currentTab===2"}],staticClass:"submission",attrs:{loading:t.loading,type:"primary",size:"small"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:2===t.currentTab,expression:"currentTab===2"}],staticClass:"submission",attrs:{loading:t.loading,type:"primary",size:"small"},on:{click:t.handlePreview}},[t._v("预览")])],1)],1)],1),t._v(" "),a("goods-list",{ref:"goodsList",on:{getProduct:t.getProduct}}),t._v(" "),t.attrShow?a("el-dialog",{attrs:{visible:t.attrShow,title:"请选择商品规格",width:"320px"},on:{"update:visible":function(e){t.attrShow=e}}},[t.attrShow?a("attr-list",{attrs:{attrs:t.attrsList},on:{activeData:t.activeAttr,close:t.labelAttr,subAttrs:t.subAttrs}}):t._e()],1):t._e(),t._v(" "),a("guarantee-service",{ref:"serviceGuarantee",on:{"get-list":t.getGuaranteeList}}),t._v(" "),t.previewVisible?a("div",[a("div",{staticClass:"bg",on:{click:function(e){e.stopPropagation(),t.previewVisible=!1}}}),t._v(" "),t.previewVisible?a("preview-box",{ref:"previewBox",attrs:{"product-type":4,"preview-key":t.previewKey}}):t._e()],1):t._e(),t._v(" "),a("templatesFrom",{ref:"templateForm",on:{getList:t.getShippingList}})],1)},r=[],l=a("75fc"),n=a("c80c"),s=(a("c5f6"),a("96cf"),a("3b8d")),o=(a("8615"),a("55dd"),a("28a5"),a("7f7f"),a("ac6a"),a("2d63")),c=a("ef0d"),u=a("6625"),m=a.n(u),d=a("7719"),f=a("ae43"),p=a("8c98"),_=a("54b0"),g=a("7acc"),h=a("bbcc"),b=a("c4c8"),v=a("b7be"),y=a("83d6"),w={product_id:"",image:"",slider_image:[],store_name:"",store_info:"",start_time:"",end_time:"",time:1,is_show:1,keyword:"",brand_id:"",cate_id:"",mer_cate_id:[],pay_count:1,unit_name:"",sort:0,is_good:0,temp_id:"",guarantee_template_id:"",buying_count_num:2,ficti_status:!0,ficti_num:1,once_pay_count:1,delivery_way:[],mer_labels:[],delivery_free:0,attrValue:[{image:"",price:null,active_price:null,cost:null,ot_price:null,old_stock:null,stock:null,bar_code:"",weight:null,volume:null}],attr:[],extension_type:0,content:"",spec_type:0,is_gift_bag:0},V=[{name:"店铺推荐",value:"is_good"}],k={name:"CombinationProductAdd",components:{ueditorFrom:c["a"],goodsList:d["a"],VueUeditorWrap:m.a,guaranteeService:f["a"],previewBox:p["a"],attrList:g["a"],templatesFrom:_["a"]},data:function(){return{pickerOptions:{disabledDate:function(t){return t.getTime()>Date.now()}},timeVal:"",max_ficti_num:0,dialogVisible:!1,product_id:"",multipleSelection:[],optionsCate:{value:"store_category_id",label:"cate_name",children:"children",emitPath:!1},roterPre:y["roterPre"],selectRule:"",checkboxGroup:[],recommend:V,tabs:[],fullscreenLoading:!1,props:{emitPath:!1},propsMer:{emitPath:!1,multiple:!0},active:0,OneattrValue:[Object.assign({},w.attrValue[0])],ManyAttrValue:[Object.assign({},w.attrValue[0])],ruleList:[],merCateList:[],categoryList:[],shippingList:[],guaranteeList:[],deliveryList:[],labelList:[],BrandList:[],formValidate:Object.assign({},w),maxStock:"",addNum:0,singleSpecification:{},multipleSpecifications:[],formDynamics:{template_name:"",template_value:[]},manyTabTit:{},manyTabDate:{},grid2:{lg:10,md:12,sm:24,xs:24},formDynamic:{attrsName:"",attrsVal:""},isBtn:!1,manyFormValidate:[],images:[],currentTab:0,isChoice:"",combinationData:{ficti_status:0,group_buying_rate:""},grid:{xl:8,lg:8,md:12,sm:24,xs:24},loading:!1,ruleValidate:{store_name:[{required:!0,message:"请输入商品名称",trigger:"blur"}],timeVal:[{required:!0,message:"请选择拼团活动日期",trigger:"blur"}],time:[{required:!0,message:"请输入拼团时效",trigger:"blur"}],buying_count_num:[{required:!0,message:"请输入拼团人数",trigger:"blur"}],pay_count:[{required:!0,message:"请输入限购量",trigger:"blur"}],sort:[{required:!0,message:"请输入排序数值",trigger:"blur"}],once_pay_count:[{required:!0,message:"请输入单人单次限购数量",trigger:"blur"}],unit_name:[{required:!0,message:"请输入单位",trigger:"blur"}],store_info:[{required:!0,message:"请输入拼团活动简介",trigger:"blur"}],temp_id:[{required:!0,message:"请选择运费模板",trigger:"change"}],ficti_num:[{required:!0,message:"请输入虚拟成团补齐人数",trigger:"blur"}],image:[{required:!0,message:"请上传商品图",trigger:"change"}],slider_image:[{required:!0,message:"请上传商品轮播图",type:"array",trigger:"change"}],delivery_way:[{required:!0,message:"请选择送货方式",trigger:"change"}]},attrInfo:{},keyNum:0,extensionStatus:0,isNew:!1,previewVisible:!1,previewKey:"",deliveryType:[],attrs:[],attrsList:[],activeAtter:[],attrShow:!1,formData:[],formUrl:"",baseURL:h["a"].httpUrl||"http://localhost:8080",formList:[]}},computed:{attrValue:function(){var t=Object.assign({},w.attrValue[0]);return delete t.image,t},oneFormBatch:function(){var t=[Object.assign({},w.attrValue[0])];return t[0]["attr"]="全部",delete t[0].bar_code,t}},watch:{"formValidate.attr":{handler:function(t){1===this.formValidate.spec_type&&this.watCh(t)},immediate:!1,deep:!0},"formValidate.buying_count_num":{handler:function(t,e){t&&1==this.formValidate.ficti_status&&(this.max_ficti_num=Math.round((1-this.combinationData.group_buying_rate/100)*this.formValidate.buying_count_num),this.formValidate.ficti_num=this.max_ficti_num)},immediate:!1,deep:!0}},created:function(){this.tempRoute=Object.assign({},this.$route),this.$route.params.id&&1===this.formValidate.spec_type&&this.$watch("formValidate.attr",this.watCh)},mounted:function(){var t=this;this.formValidate.slider_image=[],this.getCombinationData(),this.$route.params.id?(this.setTagsViewTitle(),this.getInfo(this.$route.params.id),this.currentTab=1):(this.formValidate.attr.map((function(e){t.$set(e,"inputVisible",!1)})),this.productCon()),this.getCategorySelect(),this.getCategoryList(),this.getBrandListApi(),this.getShippingList(),this.getGuaranteeList(),this.getLabelLst(),this.$store.dispatch("settings/setEdit",!0)},methods:{getLabelLst:function(){var t=this;Object(b["A"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},productCon:function(){var t=this;Object(b["db"])().then((function(e){t.deliveryType=e.data.delivery_way.map(String);var a=0==t.formValidate.type?"快递配送":"虚拟发货";2==t.deliveryType.length?2==t.formValidate.type?t.deliveryList=[{value:"2",name:a}]:t.deliveryList=[{value:"1",name:"到店自提"},{value:"2",name:a}]:1==t.deliveryType.length&&"1"==t.deliveryType[0]&&2!=t.formValidate.type?t.deliveryList=[{value:"1",name:"到店自提"}]:(t.deliveryList=[{value:"2",name:a}],t.formValidate.delivery_way=["2"])})).catch((function(e){t.$message.error(e.message)}))},getCombinationData:function(){var t=this;Object(v["r"])().then((function(e){t.combinationData=e.data})).catch((function(e){t.$message.error(e.message)}))},calFictiCount:function(){this.max_ficti_num=Math.round((1-this.combinationData.group_buying_rate/100)*this.formValidate.buying_count_num),this.isNew=!0,this.formValidate.ficti_num=this.max_ficti_num},limitInventory:function(t){t.stock-t.old_stock>0&&(this.$message.warning("限量不能大于库存!"),t.stock=t.old_stock)},limitPrice:function(t){t.active_price-t.price>0&&(t.active_price=t.price)},add:function(){this.$refs.goodsList.dialogVisible=!0},getProduct:function(t){this.formValidate.image=t.src,this.product_id=t.id},handleSelectionChange:function(t){this.multipleSelection=t},onchangeTime:function(t){this.timeVal=t,console.log(this.moment(t[0]).format("YYYY-MM-DD HH:mm:ss")),this.formValidate.start_time=t?this.moment(t[0]).format("YYYY-MM-DD HH:mm:ss"):"",this.formValidate.end_time=t?this.moment(t[1]).format("YYYY-MM-DD HH:mm:ss"):""},setTagsViewTitle:function(){var t="编辑商品",e=Object.assign({},this.tempRoute,{title:"".concat(t,"-").concat(this.$route.params.id)});this.$store.dispatch("tagsView/updateVisitedView",e)},batchAttr:function(){this.attrShow=!0},activeAttr:function(t){this.attrsList=t},labelAttr:function(){this.attrShow=!1},getAttr:function(){this.oneFormBatch[0].attr="全部";var t=this.attrs;t.map((function(t){t.details=[],t.detail.map((function(e){t.details.push({name:e,select:!1})}))})),this.attrsList=t},doCombination:function(t){var e=t.length-1,a=[],i=[];return r(t,0);function r(t,l){var n,s=Object(o["a"])(t[l]);try{for(s.s();!(n=s.n()).done;){var c=n.value;a[l]=c,l<e?r(t,l+1):i.push(a.join(","));var u=a;a=[];for(var m=0,d=u;m<d.length;m++){var f=d[m];a.push(f)}}}catch(p){s.e(p)}finally{s.f()}return i}},subAttrs:function(t){var e=[];this.attrsList.forEach((function(t,a){var i=[];t.details.forEach((function(t){t.select&&i.push(t.name)})),i.length&&e.push(i)}));var a=[];e.length&&(a=this.doCombination(e)),this.attrShow=!1,this.activeAtter=e,this.oneFormBatch[0].attr=a.length?a.join(";"):"全部";var i=this.ManyAttrValue;i.forEach((function(t){t.select=!1,a.length?a.forEach((function(e){t.sku.split("").length,e.split("").length,t.sku==e&&(t.select=!0)})):t.select=!0})),this.$nextTick((function(){this.$set(this,"ManyAttrValue",i)})),console.log(this.ManyAttrValue)},watCh:function(t){var e=this,a={},i={};this.formValidate.attr.forEach((function(t,e){a["value"+e]={title:t.value},i["value"+e]=""})),this.ManyAttrValue.forEach((function(t,a){var i=Object.values(t.detail).sort().join("/");e.attrInfo[i]&&(e.ManyAttrValue[a]=e.attrInfo[i])})),this.attrInfo={},this.ManyAttrValue.forEach((function(t){e.attrInfo[Object.values(t.detail).sort().join("/")]=t})),this.manyTabTit=a,this.manyTabDate=i},addTem:function(){this.$refs.templateForm.dialogVisible=!0,this.$refs.templateForm.resetData()},addServiceTem:function(){this.$refs.serviceGuarantee.add()},getCategorySelect:function(){var t=this;Object(b["u"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategoryList:function(){var t=this;Object(b["t"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getBrandListApi:function(){var t=this;Object(b["s"])().then((function(e){t.BrandList=e.data})).catch((function(e){t.$message.error(e.message)}))},productGetRule:function(){var t=this;Object(b["Jb"])().then((function(e){t.ruleList=e.data}))},getShippingList:function(){var t=this;Object(b["xb"])().then((function(e){t.shippingList=e.data}))},getGuaranteeList:function(){var t=this;Object(b["G"])().then((function(e){t.guaranteeList=e.data}))},batchAdd:function(){var t,e=Object(o["a"])(this.ManyAttrValue);try{for(e.s();!(t=e.n()).done;){var a=t.value;a.select&&(""!=this.oneFormBatch[0].attr&&this.$set(a,"attr",this.oneFormBatch[0].attr),""!=this.oneFormBatch[0].image&&this.$set(a,"image",this.oneFormBatch[0].image),null!=this.oneFormBatch[0].active_price&&""!=this.oneFormBatch[0].active_price&&this.$set(a,"active_price",this.oneFormBatch[0].active_price),null!=this.oneFormBatch[0].stock&&""!=this.oneFormBatch[0].stock&&this.$set(a,"stock",this.oneFormBatch[0].stock))}}catch(i){e.e(i)}finally{e.f()}},getInfo:function(t){var e=this;this.fullscreenLoading=!0,this.$route.params.id?Object(v["u"])(t).then(function(){var t=Object(s["a"])(Object(n["a"])().mark((function t(a){var i,r;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=a.data,e.attrs=i.product.attr||[],e.formValidate={type:i.type,product_id:i.product_group_id,image:i.product.image,slider_image:i.product.slider_image,store_name:i.product.store_name,store_info:i.product.store_info,unit_name:i.product.unit_name,mer_form_id:i.product.mer_form_id,time:i.time,buying_count_num:i.buying_count_num,guarantee_template_id:i.product.guarantee_template_id,ficti_status:!!i.ficti_status,start_time:i.start_time?i.start_time:"",end_time:i.end_time?i.end_time:"",brand_id:i.product.brand_id,cate_id:i.cate_id?i.cate_id:"",mer_cate_id:i.mer_cate_id,pay_count:i.pay_count,once_pay_count:i.once_pay_count,sort:i.product.sort,is_good:i.product.is_good,temp_id:i.product.temp_id,is_show:i.is_show,attr:i.product.attr,extension_type:i.extension_type,content:i.product.content.content,spec_type:i.product.spec_type,is_gift_bag:i.product.is_gift_bag,ficti_num:i.ficti_num,delivery_way:i.product.delivery_way&&i.product.delivery_way.length?i.product.delivery_way.map(String):e.deliveryType,delivery_free:i.product.delivery_free?i.product.delivery_free:0,mer_labels:i.mer_labels&&i.mer_labels.length?i.mer_labels.map(Number):[]},1===e.combinationData.ficti_status&&(e.max_ficti_num=Math.round((1-e.combinationData.group_buying_rate/100)*i.buying_count_num)),0===e.formValidate.spec_type?(e.OneattrValue=i.product.attrValue,e.OneattrValue.forEach((function(t,a){e.attrInfo[Object.values(t.detail).sort().join("/")]=t,e.$set(e.OneattrValue[a],"active_price",t._sku?t._sku.active_price:t.price),e.$set(e.OneattrValue[a],"stock",t._sku?t._sku.stock:t.old_stock)})),e.singleSpecification=JSON.parse(JSON.stringify(i.product.attrValue)),e.formValidate.attrValue=e.OneattrValue):(i.product.attrValue.forEach((function(t){t.select=!0})),r=[],e.ManyAttrValue=i.product.attrValue,e.ManyAttrValue.forEach((function(t,a){e.attrInfo[Object.values(t.detail).sort().join("/")]=t,e.$set(e.ManyAttrValue[a],"active_price",t._sku?t._sku.active_price:t.price),e.$set(e.ManyAttrValue[a],"stock",t._sku?t._sku.stock:t.old_stock),t._sku&&(e.multipleSpecifications=JSON.parse(JSON.stringify(i.product.attrValue)),r.push(t))})),e.multipleSpecifications=JSON.parse(JSON.stringify(r)),e.$nextTick((function(){r.forEach((function(t){e.$refs.multipleSelection.toggleRowSelection(t,!0)}))})),e.formValidate.attrValue=e.multipleSelection),e.fullscreenLoading=!1,e.timeVal=[new Date(e.formValidate.start_time),new Date(e.formValidate.end_time)],e.$store.dispatch("settings/setEdit",!0),i.product.mer_form_id&&(e.getFormList(),e.getFormInfo()),e.getAttr(),e.productCon();case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.$message.error(t.message)})):Object(b["jb"])(t).then(function(){var t=Object(s["a"])(Object(n["a"])().mark((function t(a){var i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=a.data,e.attrs=i.attr||[],e.formValidate={type:i.type,product_id:i.product_id,image:i.image,slider_image:i.slider_image,store_name:i.store_name,store_info:i.store_info,unit_name:i.unit_name,time:1,buying_count_num:2,ficti_status:!0,start_time:"",end_time:"",brand_id:i.brand_id,cate_id:i.cate_id,mer_cate_id:i.mer_cate_id,mer_form_id:i.mer_form_id,pay_count:1,once_pay_count:1,sort:i.sort?i.sort:0,is_good:i.is_good,temp_id:i.temp_id,is_show:i.is_show,attr:i.attr,extension_type:i.extension_type,content:i.content,spec_type:i.spec_type,is_gift_bag:i.is_gift_bag,ficti_num:1===e.combinationData.ficti_status?Math.round(1-e.combinationData.group_buying_rate/100):"",delivery_way:i.delivery_way&&i.delivery_way.length?i.delivery_way.map(String):e.deliveryType,delivery_free:i.delivery_free?i.delivery_free:0,mer_labels:i.mer_labels&&i.mer_labels.length?i.mer_labels.map(Number):[]},1===e.combinationData.ficti_status&&(e.max_ficti_num=Math.round(1*(1-e.combinationData.group_buying_rate/100))),e.timeVal=[],0===e.formValidate.spec_type?(e.OneattrValue=i.attrValue,e.OneattrValue.forEach((function(t,a){e.$set(e.OneattrValue[a],"active_price",e.OneattrValue[a].price)})),e.singleSpecification=JSON.parse(JSON.stringify(i.attrValue)),e.formValidate.attrValue=e.OneattrValue):(i.attrValue.forEach((function(t){t.select=!0})),e.ManyAttrValue=i.attrValue,e.multipleSpecifications=JSON.parse(JSON.stringify(i.attrValue)),e.ManyAttrValue.forEach((function(t,a){e.attrInfo[Object.values(t.detail).sort().join("/")]=t,e.$set(e.ManyAttrValue[a],"active_price",e.ManyAttrValue[a].price)})),e.multipleSelection=i.attrValue,e.$nextTick((function(){i.attrValue.forEach((function(t){e.$refs.multipleSelection.toggleRowSelection(t,!0)}))}))),i.mer_form_id&&(e.getFormList(),e.getFormInfo()),1===e.formValidate.is_good&&e.checkboxGroup.push("is_good"),e.fullscreenLoading=!1,e.getAttr(),e.productCon();case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.$message.error(t.message)}))},getFormList:function(){var t=this;Object(b["k"])().then((function(e){t.formList=e.data})).catch((function(e){t.$message.error(e.message)}))},getFormInfo:function(){var t=this;Object(b["j"])(this.formValidate.mer_form_id).then((function(e){t.formData=e.data;var a=1e3*(new Date).getTime(),i="".concat(t.baseURL,"/pages/admin/system_form/index?inner_frame=1&time=").concat(a,"&form_id=").concat(t.formValidate.mer_form_id);t.formUrl=i})).catch((function(e){t.$message.error(e.message)}))},handleRemove:function(t){this.formValidate.slider_image.splice(t,1)},modalPicTap:function(t,e,a){var i=this,r=[];this.$modalUpload((function(l){"1"!==t||e||(i.formValidate.image=l[0],i.OneattrValue[0].image=l[0]),"2"!==t||e||l.map((function(t){r.push(t.attachment_src),i.formValidate.slider_image.push(t),i.formValidate.slider_image.length>10&&(i.formValidate.slider_image.length=10)})),"1"===t&&"dan"===e&&(i.OneattrValue[0].image=l[0]),"1"===t&&"duo"===e&&(i.ManyAttrValue[a].image=l[0]),"1"===t&&"pi"===e&&(i.oneFormBatch[0].image=l[0])}),t)},handleSubmitUp:function(){this.currentTab--<0&&(this.currentTab=0)},handleSubmitNest1:function(t){this.formValidate.image?(this.currentTab++,this.$route.params.id||this.getInfo(this.product_id)):this.$message.warning("请选择商品!")},handleSubmitNest2:function(t){var e=this;1===this.formValidate.spec_type?this.formValidate.attrValue=this.multipleSelection:this.formValidate.attrValue=this.OneattrValue,console.log(this.formValidate),this.$refs[t].validate((function(t){if(t){if(!e.formValidate.store_name||!e.formValidate.store_info||!e.formValidate.image||!e.formValidate.slider_image)return void e.$message.warning("请填写完整拼团商品信息!");if(!e.formValidate.start_time||!e.formValidate.end_time)return void e.$message.warning("请选择拼团时间!");if(!e.formValidate.attrValue||0===e.formValidate.attrValue.length)return void e.$message.warning("请选择商品规格!");e.currentTab++}}))},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(a){a?(e.$store.dispatch("settings/setEdit",!1),e.fullscreenLoading=!0,e.loading=!0,console.log(e.formValidate),e.$route.params.id?(console.log(e.ManyAttrValue),Object(v["x"])(e.$route.params.id,e.formValidate).then(function(){var a=Object(s["a"])(Object(n["a"])().mark((function a(i){return Object(n["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.fullscreenLoading=!1,e.$message.success(i.message),e.$router.push({path:e.roterPre+"/marketing/combination/combination_goods"}),e.$refs[t].resetFields(),e.formValidate.slider_image=[],e.loading=!1;case 6:case"end":return a.stop()}}),a)})));return function(t){return a.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.loading=!1,e.$message.error(t.message)}))):Object(v["q"])(e.formValidate).then(function(){var a=Object(s["a"])(Object(n["a"])().mark((function a(i){return Object(n["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.fullscreenLoading=!1,e.$message.success(i.message),e.$router.push({path:e.roterPre+"/marketing/combination/combination_goods"}),e.$refs[t].resetFields(),e.formValidate.slider_image=[],e.loading=!1;case 6:case"end":return a.stop()}}),a)})));return function(t){return a.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.loading=!1,e.$message.error(t.message)}))):e.formValidate.store_name&&e.formValidate.store_info&&e.formValidate.image&&e.formValidate.slider_image||e.$message.warning("请填写完整商品信息!")}))},handlePreview:function(){var t=this;Object(b["C"])(this.formValidate).then(function(){var e=Object(s["a"])(Object(n["a"])().mark((function e(a){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.previewVisible=!0,t.previewKey=a.data.preview_key;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))},validate:function(t,e,a){!1===e&&this.$message.warning(a)},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=Object(l["a"])(this.formValidate.slider_image),i=a.indexOf(this.dragging),r=a.indexOf(e);a.splice.apply(a,[r,0].concat(Object(l["a"])(a.splice(i,1)))),this.formValidate.slider_image=a}}}},x=k,C=(a("74de"),a("2877")),S=Object(C["a"])(x,i,r,!1,null,"691b653a",null);e["default"]=S.exports},"47de":function(t,e,a){"use strict";a("fdbc")},"504c":function(t,e,a){var i=a("9e1e"),r=a("0d58"),l=a("6821"),n=a("52a7").f;t.exports=function(t){return function(e){var a,s=l(e),o=r(s),c=o.length,u=0,m=[];while(c>u)a=o[u++],i&&!n.call(s,a)||m.push(t?[a,s[a]]:s[a]);return m}}},"74de":function(t,e,a){"use strict";a("8c9d")},7719:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.dialogVisible?a("el-dialog",{attrs:{title:"商品信息",visible:t.dialogVisible,width:"900px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticClass:"divBox"},[a("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small",inline:"","label-width":"85px"}},[a("el-form-item",{attrs:{label:"商品分类:"}},[a("el-select",{staticClass:"dialogWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList()}},model:{value:t.tableFrom.mer_cate_id,callback:function(e){t.$set(t.tableFrom,"mer_cate_id",e)},expression:"tableFrom.mer_cate_id"}},t._l(t.merCateList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"商品搜索:"}},[a("el-input",{staticClass:"dialogWidth",attrs:{placeholder:"请输入商品名称,关键字,产品编号",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(e)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.getList}},[t._v("查询")])],1)],1)],1),t._v(" "),t.resellShow?a("div",{staticClass:"mb10"},[t.resellShow?a("el-alert",{attrs:{title:"注:添加为预售商品后,原普通商品会下架;如该商品已开启其它营销活动,请勿选择!",type:"warning","show-icon":""}}):t._e()],1):t._e(),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{width:"55"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-radio",{attrs:{label:e.row.product_id},nativeOn:{change:function(a){return t.getTemplateRow(e.row)}},model:{value:t.templateRadio,callback:function(e){t.templateRadio=e},expression:"templateRadio"}},[t._v(" ")])]}}],null,!1,3465899556)}),t._v(" "),a("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"70"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}],null,!1,2331550732)}),t._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"230"}}),t._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"70"}})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)]):t._e()},r=[],l=a("c4c8"),n=a("83d6"),s={name:"GoodsList",props:{resellShow:{type:Boolean,default:!1},isSeckill:{type:Boolean,default:!1}},data:function(){return{dialogVisible:!1,templateRadio:0,merCateList:[],roterPre:n["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:6,cate_id:"",store_name:"",keyword:"",is_gift_bag:0,status:1,is_ficti:this.isSeckill?"":0,is_action:this.isSeckill?"":1},multipleSelection:{},checked:[]}},mounted:function(){var t=this;this.getList(),this.getCategorySelect(),window.addEventListener("unload",(function(e){return t.unloadHandler(e)}))},methods:{getTemplateRow:function(t){this.multipleSelection={src:t.image,id:t.product_id},this.dialogVisible=!1,this.$emit("getProduct",this.multipleSelection)},getCategorySelect:function(){var t=this;Object(l["u"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getList:function(){var t=this;this.listLoading=!0,Object(l["B"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()}}},o=s,c=(a("47de"),a("2877")),u=Object(c["a"])(o,i,r,!1,null,"7117c50c",null);e["a"]=u.exports},8615:function(t,e,a){var i=a("5ca1"),r=a("504c")(!1);i(i.S,"Object",{values:function(t){return r(t)}})},"8c9d":function(t,e,a){},fdbc:function(t,e,a){}}]);