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
127 KiB
1 lines
127 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b4a05504"],{"1a4d":function(t,e,i){},5953:function(t,e,i){"use strict";var a=i("1a4d"),o=i.n(a);o.a},"5e79":function(t,e,i){"use strict";var a=i("c9cc"),o=i.n(a);o.a},"696b":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("Card",{staticClass:"ivu-mt pt10",attrs:{bordered:!1,"dis-hover":""}},[i("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition}},[i("Row",{attrs:{type:"flex",gutter:24}},[i("Col",[i("FormItem",{attrs:{label:"商品分类:",labelWidth:80,"label-for":"cate_id"}},[i("el-cascader",{staticStyle:{width:"250px"},attrs:{placeholder:"请选择商品分类",size:"mini",options:t.cateData,props:t.props,filterable:"",clearable:""},on:{change:t.search},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1)],1),i("Col",[i("FormItem",{attrs:{label:"商品展示:",labelWidth:80,"label-for":"show_type"}},[i("Select",{staticStyle:{width:"250px"},attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.search},model:{value:t.formValidate.show_type,callback:function(e){t.$set(t.formValidate,"show_type",e)},expression:"formValidate.show_type"}},[i("Option",{attrs:{value:"0"}},[t._v("全部")]),i("Option",{attrs:{value:"1"}},[t._v("移动端")]),i("Option",{attrs:{value:"2"}},[t._v("收银台")])],1)],1)],1),i("Col",[i("FormItem",{attrs:{label:"商品搜索:",labelWidth:80,"label-for":"store_name"}},[i("Input",{staticStyle:{width:"250px"},attrs:{"enter-button":"",placeholder:"请输入商品名称,关键字,ID"},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1)],1),i("Col",[i("div",{staticClass:"search",on:{click:t.search}},[t._v("搜索")])]),i("Col",[i("div",{staticClass:"reset",on:{click:t.reset}},[t._v("重置")])])],1)],1)],1),i("Card",{staticClass:"mt15 tablebox",attrs:{bordered:!1,"dis-hover":""}},[i("div",{staticClass:"product_tabs tabbox"},[i("Tabs",{on:{"on-click":t.onClickTab},model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},t._l(t.headerList,(function(t,e){return i("TabPane",{key:e,attrs:{label:t.name+"("+t.count+")",name:t.type.toString()}})})),1)],1),i("div",{staticClass:"table mt20"},[1==t.product_status?i("router-link",{attrs:{to:t.routePre+"/product/edit_product"}},[i("Button",{staticClass:"bnt",attrs:{type:"primary"}},[t._v("添加商品")])],1):t._e(),i("Tooltip",{attrs:{content:"本页至少选中一项",disabled:!!t.checkUidList.length&&0==t.isAll}},[i("Button",{directives:[{name:"show",rawName:"v-show",value:"1"===t.formValidate.type,expression:"formValidate.type === '1'"}],staticClass:"bnt ml15",attrs:{disabled:!t.checkUidList.length&&0==t.isAll},on:{click:t.onDismount}},[t._v("批量下架")])],1),i("Tooltip",{attrs:{content:"本页至少选中一项",disabled:!!t.checkUidList.length&&0==t.isAll}},[i("Button",{directives:[{name:"show",rawName:"v-show",value:"2"===t.formValidate.type,expression:"formValidate.type === '2'"}],staticClass:"bnt ml15",attrs:{disabled:!t.checkUidList.length&&0==t.isAll},on:{click:t.onShelves}},[t._v("批量上架")])],1),i("Tooltip",{attrs:{content:"本页至少选中一项",disabled:!!t.checkUidList.length&&0==t.isAll}},[i("Button",{staticClass:"bnt ml15",attrs:{disabled:!t.checkUidList.length&&0==t.isAll},on:{click:t.openBatch}},[t._v("批量设置")])],1),i("vxe-table",{ref:"xTable",staticClass:"mt25",attrs:{loading:t.loading,"row-id":"id","checkbox-config":{reserve:!0},data:t.orderList},on:{"checkbox-all":t.checkboxAll,"checkbox-change":t.checkboxItem}},[i("vxe-column",{attrs:{type:"checkbox",width:"100"},scopedSlots:t._u([{key:"header",fn:function(){return[i("div",[i("Dropdown",{attrs:{transfer:""},on:{"on-click":t.allPages},scopedSlots:t._u([{key:"list",fn:function(){return[i("DropdownMenu",[i("DropdownItem",{attrs:{name:"0"}},[t._v("当前页")]),i("DropdownItem",{attrs:{name:"1"}},[t._v("所有页")])],1)]},proxy:!0}])},[i("a",{staticClass:"acea-row row-middle",attrs:{href:"javascript:void(0)"}},[i("span",[t._v("全选("+t._s(1==t.isAll?t.total-t.checkUidList.length:t.checkUidList.length)+")")]),i("Icon",{attrs:{type:"ios-arrow-down"}})],1)])],1)]},proxy:!0}])}),i("vxe-column",{attrs:{field:"id",title:"商品ID",width:"70"}}),i("vxe-column",{attrs:{field:"image",title:"商品图",width:"70"},scopedSlots:t._u([{key:"default",fn:function(t){var e=t.row;return[i("viewer",[i("div",{staticClass:"tabBox_img"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"row.image"}]})])])]}}])}),i("vxe-column",{attrs:{field:"store_name",title:"商品名称","min-width":"250"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[i("Tooltip",{attrs:{transfer:!0,theme:"dark","max-width":"300",delay:600,content:a.store_name}},[i("div",{staticClass:"line2"},[t._v(t._s(a.store_name))])])]}}])}),i("vxe-column",{attrs:{field:"price",title:"商品售价","min-width":"90"}}),i("vxe-column",{attrs:{field:"branch_sales",title:"销量","min-width":"90"}}),i("vxe-column",{attrs:{field:"branch_stock",title:"库存","min-width":"80"}}),i("vxe-column",{attrs:{field:"sort",title:"排序","min-width":"70"}}),i("vxe-column",{attrs:{field:"state",title:"状态",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[7!=t.formValidate.type?i("i-switch",{attrs:{value:a.is_show,"true-value":1,"false-value":0,disabled:1!=a.is_verify,size:"large"},on:{"on-change":function(e){return t.changeSwitch(a)}},model:{value:a.is_show,callback:function(e){t.$set(a,"is_show",e)},expression:"row.is_show"}},[i("span",{attrs:{slot:"open"},slot:"open"},[t._v("上架")]),i("span",{attrs:{slot:"close"},slot:"close"},[t._v("下架")])]):i("div",[t._v(t._s(a.is_del?"已删除":a.is_show?"":"已下架"))])]}}])}),-1==t.formValidate.type?i("vxe-column",{attrs:{field:"refusal",title:"拒绝原因","min-width":"150"}}):t._e(),-2==t.formValidate.type?i("vxe-column",{attrs:{field:"refusal",title:"下架原因","min-width":"150"}}):t._e(),i("vxe-column",{attrs:{field:"action",title:"操作",align:"center",width:"220",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row,o=e.rowIndex;return[0==a.pid?i("a",{on:{click:function(e){return t.edit(a)}}},[t._v("编辑")]):t._e(),0==a.pid?i("Divider",{attrs:{type:"vertical"}}):t._e(),i("a",{on:{click:function(e){return t.detail(a.id)}}},[t._v("详情")]),i("Divider",{attrs:{type:"vertical"}}),i("a",{on:{click:function(e){return t.reply(a.id)}}},[t._v("查看评论")]),t.openErp?t._e():i("Divider",{attrs:{type:"vertical"}}),t.openErp?t._e():i("a",{on:{click:function(e){return t.stockControl(a)}}},[t._v("库存管理")]),0==a.pid?i("Divider",{attrs:{type:"vertical"}}):t._e(),0==a.pid?i("a",{on:{click:function(e){return t.del(a,o)}}},[t._v(t._s(a.is_del?"恢复":"删除"))]):t._e(),i("Divider",{attrs:{type:"vertical"}}),i("a",{on:{click:function(e){return t.copy(a)}}},[t._v("复制")])]}}])})],1),i("vxe-pager",{staticClass:"mt20",attrs:{border:"",size:"medium","page-size":t.formValidate.limit,"current-page":t.formValidate.page,total:t.total,layouts:["PrevPage","JumpNumber","NextPage","FullJump","Total"]},on:{"page-change":t.pageChange}})],1)]),i("stockEdit",{ref:"stock",on:{stockChange:t.stockChange}}),i("productDetails",{attrs:{visible:t.detailsVisible,"product-id":t.productId},on:{"update:visible":function(e){t.detailsVisible=e},saved:t.getList}}),i("batchSet",{ref:"batch",attrs:{checkUidList:t.checkUidList,isAll:t.isAll,formValidate:t.formValidate}})],1)},o=[],n=i("d708"),r=i("2f62"),s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"goods_detail"},[a("div",{staticClass:"goods_detail_wrapper",class:t.product?"on":"",staticStyle:{height:"640px"}},[a("HappyScroll",{attrs:{size:"5",resize:"","hide-horizontal":""}},[a("div",{staticStyle:{width:"375px"}},[a("div",{staticClass:"title-box"},[t._v("商品详情")]),a("div",{staticClass:"swiper-box"},[a("Carousel",{attrs:{autoplay:"",arrow:"never"},model:{value:t.value2,callback:function(e){t.value2=e},expression:"value2"}},t._l(t.goodsInfo.slider_image,(function(t,e){return a("CarouselItem",{key:e},[a("div",{staticClass:"demo-carousel"},[a("img",{attrs:{src:t,alt:""}})])])})),1)],1),a("div",{staticClass:"goods_info"},[a("div",{staticClass:"number-wrapper"},[a("div",{staticClass:"price"},[a("span",[t._v("¥")]),t._v(t._s(t.goodsInfo.price))]),t.goodsInfo.vip_price>0?a("div",{staticClass:"old-price"},[t._v("\n ¥"+t._s(t.goodsInfo.vip_price)+"\n "),a("img",{attrs:{src:i("a254"),alt:"",width:"28"}})]):t._e()]),a("div",{staticClass:"name"},[t._v(t._s(t.goodsInfo.store_name))]),a("div",{staticClass:"msg"},[a("div",{staticClass:"item"},[t._v("原价:¥"+t._s(t.goodsInfo.ot_price))]),a("div",{staticClass:"item"},[t._v("销量:"+t._s(t.goodsInfo.sales))]),a("div",{staticClass:"item"},[t._v("库存:"+t._s(t.goodsInfo.stock))])])]),a("div",{staticClass:"con-box"},[a("div",{staticClass:"title-box"},[t._v("商品介绍")]),a("div",{staticClass:"content",domProps:{innerHTML:t._s(t.goodsInfo.description)}})])])])],1)])},l=[],c=i("a34a"),d=i.n(c),u=i("6db4"),m=i("c4c8");function h(t,e,i,a,o,n,r){try{var s=t[n](r),l=s.value}catch(c){return void i(c)}s.done?e(l):Promise.resolve(l).then(a,o)}function p(t){return function(){var e=this,i=arguments;return new Promise((function(a,o){var n=t.apply(e,i);function r(t){h(n,a,o,r,s,"next",t)}function s(t){h(n,a,o,r,s,"throw",t)}r(void 0)}))}}var f={name:"goods_detail",props:{goodsId:{type:String|Number,default:""},product:{type:String|Number,default:""}},components:{HappyScroll:u["HappyScroll"]},data:function(){return{value2:0,goodsInfo:{}}},mounted:function(){this.getInfoApi()},methods:{getInfoApi:function(){var t=this;Object(m["u"])(this.goodsId).then(function(){var e=p(d.a.mark((function e(i){return d.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.goodsInfo=i.data.productInfo;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))}}},v=f,g=(i("5e79"),i("2877")),b=Object(g["a"])(v,s,l,!1,null,"7e60f7ad",null),y=b.exports,_=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Modal",{staticClass:"order_box",attrs:{scrollable:"",title:"库存管理",width:"800","footer-hide":""},on:{"on-cancel":t.cancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[i("Card",{staticClass:"cards",attrs:{bordered:!1,"dis-hover":""}},[t.specType?i("div",{staticClass:"batch"},[i("div",{staticClass:"name",on:{click:t.batchTap}},[t._v("批量"),i("span",{staticClass:"iconfont iconxiayi"})]),t.batchShow?i("div",{staticClass:"input acea-row row-center-wrapper"},[i("Input",{staticStyle:{width:"150px"},attrs:{type:"number"},on:{"on-change":t.inputTap},model:{value:t.batchStock,callback:function(e){t.batchStock=e},expression:"batchStock"}},[i("Select",{staticStyle:{width:"60px"},attrs:{slot:"append"},on:{"on-change":t.batchStockTap},slot:"append",model:{value:t.batchPm,callback:function(e){t.batchPm=e},expression:"batchPm"}},[i("Option",{attrs:{value:1}},[t._v("入库")]),i("Option",{attrs:{value:0}},[t._v("出库")])],1)],1)],1):t._e()]):t._e(),i("Table",{ref:"selection",attrs:{columns:t.columns,border:"",data:t.stockData,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果","max-height":"450"},scopedSlots:t._u([{key:"image",fn:function(t){var e=t.row;t.index;return[i("div",{staticClass:"product-data"},[i("img",{staticClass:"image",attrs:{src:e.image}})])]}},{key:"num",fn:function(e){var a=e.row;e.index;return[i("div",{staticClass:"acea-row row-middle"},[i("Input",{staticStyle:{width:"150px"},attrs:{type:"number"},on:{"on-change":function(e){return t.changeTap(a)}},model:{value:a.changeNum,callback:function(e){t.$set(a,"changeNum",e)},expression:"row.changeNum"}},[i("Select",{staticStyle:{width:"60px"},attrs:{slot:"append"},on:{"on-change":function(e){return t.stockTap(a)}},slot:"append",model:{value:a.pm,callback:function(e){t.$set(a,"pm",e)},expression:"row.pm"}},[i("Option",{attrs:{value:1}},[t._v("入库")]),i("Option",{attrs:{value:0}},[t._v("出库")])],1)],1),i("span",{staticClass:"ml20"},[t._v("="+t._s(a.resultNum))])],1)]}}])}),i("div",{staticClass:"footer acea-row row-right"},[i("Button",{staticClass:"mr",on:{click:t.cancel}},[t._v("取消")]),i("Button",{attrs:{type:"primary"},on:{click:t.productSaveStocks}},[t._v("提交")])],1)],1)],1)},w=[],k={name:"stockEdit",props:{},data:function(){return{id:0,specType:0,batchShow:!1,batchStock:0,batchPm:1,modals:!1,loading:!1,stockData:[],columns:[{title:"图片",slot:"image",minWidth:20},{title:"产品规格",key:"suk",minWidth:90},{title:"商品条形码",key:"bar_code",minWidth:35},{title:"商品编码",key:"code",minWidth:35},{title:"当前库存",key:"stock",minWidth:10},{title:"入/出库数量",slot:"num",minWidth:200}]}},methods:{countBatch:function(){var t=this;this.batchStock=Math.abs(this.batchStock),this.stockData.forEach((function(e){if(e.changeNum=t.batchStock,t.batchPm)e.pm=1,e.resultNum=parseInt(e.stock)+parseInt(e.changeNum);else if(e.pm=0,parseInt(e.stock)<=0)e.resultNum=0;else{var i=parseInt(e.stock)-parseInt(e.changeNum);e.resultNum=i<=0?0:i}}))},inputTap:function(){this.batchStock=this.batchStock.replace(/^\d{10}$/g,"0"),this.countBatch()},batchStockTap:function(){this.countBatch()},countStock:function(t){if(t.pm)t.resultNum=parseInt(t.stock)+parseInt(t.changeNum);else if(parseInt(t.stock)<=0)t.resultNum=0;else{var e=parseInt(t.stock)-parseInt(t.changeNum);t.resultNum=e<=0?0:e}this.stockData.forEach((function(e){t.id==e.id&&(e.changeNum=t.changeNum,e.resultNum=t.resultNum,e.pm=t.pm)}))},stockTap:function(t){this.countStock(t)},changeTap:function(t){t.changeNum=t.changeNum.replace(/^\d{10}$/g,"0"),this.countStock(t)},batchTap:function(){this.batchShow=!this.batchShow},productAttrs:function(t){var e=this;this.specType=t.spec_type,this.id=t.id,Object(m["l"])(t.id).then((function(t){var i=t.data;i.forEach((function(t){t.resultNum=t.stock,t.changeNum=0,t.pm=1})),e.stockData=i})).catch((function(t){e.$Message.error(t.msg)}))},productSaveStocks:function(){var t=this,e=[];this.stockData.forEach((function(t){var i={unique:t.unique,pm:t.pm,stock:t.changeNum};e.push(i)})),Object(m["z"])({attrs:e},this.id).then((function(e){t.$Message.success("修改成功"),t.cancel(),t.$emit("stockChange",e.data.stock)})).catch((function(e){t.$Message.error(e.msg)}))},cancel:function(){this.modals=!1,this.batchShow=!1,this.batchPm=1,this.batchStock=0}}},x=k,V=(i("db20"),Object(g["a"])(x,_,w,!1,null,"6e2ecac9",null)),C=V.exports,S=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("Drawer",{attrs:{value:t.visible,styles:{padding:"0 0 60px"},width:"1000"},on:{"on-visible-change":t.drawerChange}},[i("div",{staticClass:"drawer-main"},[i("div",{staticClass:"header"},[i("Icon",{attrs:{custom:"iconfont iconmanjianmanzhe",size:"60"}}),i("div",[i("div",{staticClass:"title"},[t._v(t._s(t.formValidate.store_name))]),i("div",[t._v("商品ID:"+t._s(t.productId))])])],1),i("Tabs",{on:{"on-click":t.onhangeTab},model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},t._l(t.headTab,(function(t,e){return i("TabPane",{key:e,attrs:{label:t.title,name:t.name}})})),1),i("Form",{ref:"formValidate",staticClass:"formValidate",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition,disabled:!!t.pid},nativeOn:{submit:function(t){t.preventDefault()}}},[i("Row",{directives:[{name:"show",rawName:"v-show",value:"1"===t.currentTab,expression:"currentTab === '1'"}],attrs:{type:"flex"}},[i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品名称:"}},[i("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品名称"},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品分类:"}},[i("el-cascader",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请选择商品分类",size:"mini",options:t.treeSelect,props:t.props,filterable:"",clearable:"",disabled:!!t.pid},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1)],1),i("Col",{staticClass:"brandName",attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品品牌:"}},[i("Cascader",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{data:t.brandData,placeholder:"请选择商品品牌","change-on-select":"",filterable:""},model:{value:t.formValidate.brand_id,callback:function(e){t.$set(t.formValidate,"brand_id",e)},expression:"formValidate.brand_id"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"单位:"}},[i("Select",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{clearable:"",filterable:"",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,a){return i("Option",{key:a,attrs:{value:e.name}},[t._v(t._s(e.name))])})),1)],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{staticClass:"labelClass",attrs:{label:"商品标签:"}},[i("div",{staticClass:"acea-row row-middle"},[i("div",{staticClass:"labelInput acea-row row-between-wrapper",on:{click:t.openStoreLabel}},[i("div",{staticStyle:{width:"90%"}},[t.storeDataLabel.length?i("div",t._l(t.storeDataLabel,(function(e){return i("Tag",{key:e.id,attrs:{closable:""},on:{"on-close":function(i){return t.closeStoreLabel(e)}}},[t._v(t._s(e.label_name))])})),1):i("span",{staticClass:"span"},[t._v("选择商品标签")])]),i("div",{staticClass:"iconfont iconxiayi"})])])])],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品编码:"}},[i("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品编码"},model:{value:t.formValidate.code,callback:function(e){t.$set(t.formValidate,"code",e)},expression:"formValidate.code"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品轮播图:"}},[i("div",{staticClass:"acea-row"},[t._l(t.formValidate.slider_image,(function(e,a){return i("div",{key:a,staticClass:"pictrue",attrs:{draggable:"true"},on:{dragstart:function(i){return t.handleDragStart(i,e)},dragover:function(i){return i.preventDefault(),t.handleDragOver(i,e)},dragenter:function(i){return t.handleDragEnter(i,e)},dragend:function(i){return t.handleDragEnd(i,e)}}},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e,expression:"item"}]}),i("Button",{staticClass:"btndel",attrs:{shape:"circle",icon:"md-close"},nativeOn:{click:function(e){return t.handleRemove(a)}}})],1)})),t.formValidate.slider_image.length<10&&!t.pid?i("div",{staticClass:"upLoad acea-row row-center-wrapper",on:{click:function(e){return t.modalPicTap("duo")}}},[i("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1):t._e(),i("Input",{staticClass:"input-display",model:{value:t.formValidate.slider_image[0],callback:function(e){t.$set(t.formValidate.slider_image,0,e)},expression:"formValidate.slider_image[0]"}})],2),i("div",{staticClass:"tips"},[t._v("\n 建议尺寸:800 *\n 800px,可拖拽改变图片顺序,默认首张图为主图,最多上传10张\n ")])])],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"添加视频:"}},[i("i-switch",{attrs:{size:"large"},model:{value:t.formValidate.video_open,callback:function(e){t.$set(t.formValidate,"video_open",e)},expression:"formValidate.video_open"}},[i("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),i("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),t.formValidate.video_open?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"视频类型:"}},[i("RadioGroup",{on:{"on-change":t.changeVideo},model:{value:t.seletVideo,callback:function(e){t.seletVideo=e},expression:"seletVideo"}},[i("Radio",{staticClass:"radio",attrs:{label:0}},[t._v("本地视频")]),i("Radio",{attrs:{label:1}},[t._v("视频链接")])],1)],1)],1):t._e(),t.formValidate.video_open?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:""}},[1!=t.seletVideo||t.formValidate.video_link?t._e():i("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入视频链接"},model:{value:t.videoLink,callback:function(e){t.videoLink=e},expression:"videoLink"}}),i("input",{ref:"refid",staticClass:"input-display",attrs:{type:"file"},on:{change:t.zh_uploadFile_change}}),0!=t.seletVideo||"1"===t.upload_type&&!t.videoLink||t.formValidate.video_link?t._e():i("div",{staticClass:"ml10 videbox",on:{click:t.zh_uploadFile}},[t._v("\n +\n ")]),1!=t.seletVideo||"1"===t.upload_type&&!t.videoLink||t.formValidate.video_link?t._e():i("Button",{staticClass:"uploadVideo",attrs:{type:"primary",icon:"ios-cloud-upload-outline"},on:{click:t.zh_uploadFile}},[t._v("确认添加")]),"1"!==t.upload_type||t.videoLink?t._e():i("Upload",{staticStyle:{display:"inline-block"},attrs:{"show-upload-list":!1,action:t.fileUrl2,"before-upload":t.videoSaveToUrl,data:t.uploadData,headers:t.header,multiple:!0}},[0!==t.seletVideo||t.formValidate.video_link?t._e():i("div",{staticClass:"videbox"},[t._v("\n +\n ")])]),t.formValidate.video_link?i("div",{staticClass:"iview-video-style"},[i("video",{staticClass:"video-style",attrs:{src:t.formValidate.video_link,controls:"controls"}},[t._v("\n 您的浏览器不支持 video 标签。\n ")]),i("div",{staticClass:"mark"}),i("Icon",{staticClass:"iconv",attrs:{type:"ios-trash-outline"},on:{click:t.delVideo}})],1):t._e(),t.upload.videoIng||t.videoIng?i("Progress",{staticClass:"progress",attrs:{percent:t.progress,"stroke-width":5}}):t._e(),i("div",{staticClass:"tips"},[t._v("建议时长:9~30秒,视频宽高比16:9")])],1)],1):t._e(),i("Col",{staticClass:"goodsShow",attrs:{span:"24"}},[i("FormItem",{attrs:{label:"上架时间:"}},[i("RadioGroup",{on:{"on-change":t.goodsOn},model:{value:t.formValidate.is_show,callback:function(e){t.$set(t.formValidate,"is_show",e)},expression:"formValidate.is_show"}},[i("Radio",{attrs:{label:1}},[i("Icon",{attrs:{type:"social-apple"}}),i("span",[t._v("立即上架")])],1),i("Radio",{attrs:{label:2}},[i("Icon",{attrs:{type:"social-android"}}),i("span",[t._v("定时上架")])],1),i("Radio",{attrs:{label:0}},[i("Icon",{attrs:{type:"social-windows"}}),i("span",[t._v("放入仓库")])],1)],1)],1)],1),2==t.formValidate.is_show?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:""}},[i("DatePicker",{staticStyle:{width:"260px"},attrs:{type:"datetime",options:t.startPickOptions,value:t.formValidate.auto_on_time,placeholder:"请选择上架时间",format:"yyyy-MM-dd HH:mm"},on:{"on-change":t.onchangeShow},model:{value:t.formValidate.auto_on_time,callback:function(e){t.$set(t.formValidate,"auto_on_time",e)},expression:"formValidate.auto_on_time"}})],1)],1):t._e(),i("Col",{staticClass:"goodsShow",attrs:{span:"24"}},[i("FormItem",{attrs:{label:"定时下架:"}},[i("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":t.goodsOff},model:{value:t.off_show,callback:function(e){t.off_show=e},expression:"off_show"}},[i("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),i("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),1==t.off_show?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:""}},[i("DatePicker",{staticStyle:{width:"260px"},attrs:{type:"datetime",options:t.endPickOptions,value:t.formValidate.auto_off_time,placeholder:"请选择下架时间",format:"yyyy-MM-dd HH:mm"},on:{"on-change":t.onchangeOff},model:{value:t.formValidate.auto_off_time,callback:function(e){t.$set(t.formValidate,"auto_off_time",e)},expression:"formValidate.auto_off_time"}}),i("div",{staticClass:"tips"},[t._v("\n 开启定时下架后,系统会在设置时间下架该商品。下架时间需晚于开售时间,商品才能定时开售。\n ")])],1)],1):t._e()],1),i("Row",{directives:[{name:"show",rawName:"v-show",value:"2"===t.currentTab,expression:"currentTab === '2'"}],attrs:{type:"flex"}},[i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品规格:",props:"spec_type"}},[i("RadioGroup",{on:{"on-change":t.changeSpec},model:{value:t.formValidate.spec_type,callback:function(e){t.$set(t.formValidate,"spec_type",e)},expression:"formValidate.spec_type"}},[i("Radio",{staticClass:"radio",attrs:{label:0}},[t._v("单规格")]),i("Radio",{attrs:{label:1}},[t._v("多规格")])],1)],1)],1),1===t.formValidate.spec_type?i("Col",{staticClass:"noForm",attrs:{span:"24"}},[i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"选择规格:"}},[i("div",{staticClass:"acea-row row-middle"},[i("Select",{staticStyle:{width:"23%"},model:{value:t.formValidate.selectRule,callback:function(e){t.$set(t.formValidate,"selectRule",e)},expression:"formValidate.selectRule"}},t._l(t.ruleList,(function(e,a){return i("Option",{key:a,attrs:{value:e.rule_name}},[t._v(t._s(e.rule_name))])})),1),i("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.confirm}},[t._v("确认")]),i("Button",{on:{click:t.addRule}},[t._v("添加规格模板")])],1)])],1),i("Col",{attrs:{span:"24"}},[0!==t.attrs.length?i("FormItem",[i("draggable",{staticClass:"dragArea list-group",attrs:{list:t.attrs,group:"peoples",handle:".move-icon",move:t.checkMove},on:{end:t.end}},t._l(t.attrs,(function(e,a){return i("div",{key:a,staticClass:"acea-row row-middle mb10"},[i("div",{staticClass:"move-icon"},[i("span",{staticClass:"iconfont icondrag2"})]),i("div",{class:t.moveIndex===a?"borderStyle":"",staticStyle:{width:"90%"}},[i("div",{staticClass:"acea-row row-middle"},[i("span",{staticClass:"mr5"},[t._v(t._s(e.value))]),i("Icon",{staticClass:"curs",attrs:{type:"ios-close-circle",size:"14"},on:{click:function(e){return t.handleRemoveRole(a)}}})],1),i("div",{staticClass:"rulesBox"},[i("draggable",{attrs:{list:e.detail,handle:".drag"}},t._l(e.detail,(function(a,o){return i("Tag",{key:o,staticClass:"mr20 drag",attrs:{type:"dot",closable:"",color:"primary",name:a},on:{"on-close":function(i){return t.handleRemove2(e.detail,o)}}},[t._v(t._s(a))])})),1),i("Input",{staticClass:"width-add",attrs:{search:"","enter-button":"添加",placeholder:"请输入属性名称"},on:{"on-search":function(i){return t.createAttr(e.detail.attrsVal,a)}},model:{value:e.detail.attrsVal,callback:function(i){t.$set(e.detail,"attrsVal",i)},expression:"item.detail.attrsVal"}})],1)])])})),0)],1):t._e()],1),t.createBnt?i("Col",{attrs:{span:"24"}},[i("FormItem",[i("Button",{staticClass:"mr15",attrs:{type:"primary",icon:"md-add"},on:{click:t.addBtn}},[t._v("添加新规格")]),i("Button",{attrs:{type:"success"},on:{click:function(e){return t.generate(1)}}},[t._v("立即生成")])],1)],1):t._e(),t.showIput?i("Col",{attrs:{span:"24"}},[i("Col",{attrs:{xl:6,lg:9,md:10,sm:24,xs:24}},[i("FormItem",{attrs:{label:"规格:"}},[i("Input",{attrs:{placeholder:"请输入规格"},model:{value:t.formDynamic.attrsName,callback:function(e){t.$set(t.formDynamic,"attrsName",e)},expression:"formDynamic.attrsName"}})],1)],1),i("Col",{attrs:{xl:6,lg:9,md:10,sm:24,xs:24}},[i("FormItem",{attrs:{label:"规格值:"}},[i("Input",{attrs:{placeholder:"请输入规格值"},model:{value:t.formDynamic.attrsVal,callback:function(e){t.$set(t.formDynamic,"attrsVal",e)},expression:"formDynamic.attrsVal"}})],1)],1),i("Col",{attrs:{xl:6,lg:5,md:10,sm:24,xs:24}},[i("FormItem",[i("Button",{staticClass:"mr15",attrs:{type:"primary"},on:{click:t.createAttrName}},[t._v("确定")]),i("Button",{on:{click:t.offAttrName}},[t._v("取消")])],1)],1)],1):t._e(),t.manyFormValidate.length&&0!==t.formValidate.header.length&&0!==t.attrs.length?i("Col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[i("Col",{attrs:{span:"24"}},[i("FormItem",{staticClass:"labeltop",attrs:{label:"批量设置:"}},[i("Table",{attrs:{data:t.oneFormBatch,columns:1==t.formValidate.product_type?t.columnsCarMy:3==t.formValidate.product_type?t.columnsFictitious:t.columns2,border:""},scopedSlots:t._u([{key:"attr",fn:function(e){e.row,e.index;return[i("div",{staticClass:"acea-row row-between-wrapper",staticStyle:{cursor:"pointer"},on:{click:t.batchAttr}},[i("div",{staticStyle:{width:"41px"}},[t._v("\n "+t._s(t.oneFormBatch[0].attr)+"\n ")]),i("span",{staticClass:"iconfont icondrop-down"})])]}},{key:"pic",fn:function(e){e.row;var a=e.index;return[i("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","duopi",a)}}},[t.oneFormBatch[0].pic?i("div",{staticClass:"pictrue pictrueTab"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.oneFormBatch[0].pic,expression:"oneFormBatch[0].pic"}]})]):i("div",{staticClass:"\n upLoad\n pictrueTab\n acea-row\n row-center-wrapper\n "},[i("Icon",{staticClass:"iosfont",attrs:{type:"ios-camera-outline",size:"26"}})],1)])]}},{key:"price",fn:function(e){e.row,e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormBatch[0].price,callback:function(e){t.$set(t.oneFormBatch[0],"price",e)},expression:"oneFormBatch[0].price"}})]}},{key:"cost",fn:function(e){e.row,e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormBatch[0].cost,callback:function(e){t.$set(t.oneFormBatch[0],"cost",e)},expression:"oneFormBatch[0].cost"}})]}},{key:"ot_price",fn:function(e){e.row,e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormBatch[0].ot_price,callback:function(e){t.$set(t.oneFormBatch[0],"ot_price",e)},expression:"oneFormBatch[0].ot_price"}})]}},{key:"stock",fn:function(e){e.row,e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0,disabled:1==t.formValidate.product_type||t.openErp},model:{value:t.oneFormBatch[0].stock,callback:function(e){t.$set(t.oneFormBatch[0],"stock",e)},expression:"oneFormBatch[0].stock"}})]}},{key:"bar_code",fn:function(e){e.row,e.index;return[i("Input",{model:{value:t.oneFormBatch[0].bar_code,callback:function(e){t.$set(t.oneFormBatch[0],"bar_code",e)},expression:"oneFormBatch[0].bar_code"}})]}},{key:"code",fn:function(e){e.row,e.index;return[i("Input",{model:{value:t.oneFormBatch[0].code,callback:function(e){t.$set(t.oneFormBatch[0],"code",e)},expression:"oneFormBatch[0].code"}})]}},{key:"weight",fn:function(e){e.row,e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{step:.1,min:0},model:{value:t.oneFormBatch[0].weight,callback:function(e){t.$set(t.oneFormBatch[0],"weight",e)},expression:"oneFormBatch[0].weight"}})]}},{key:"volume",fn:function(e){e.row,e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{step:.1,min:0},model:{value:t.oneFormBatch[0].volume,callback:function(e){t.$set(t.oneFormBatch[0],"volume",e)},expression:"oneFormBatch[0].volume"}})]}},{key:"fictitious",fn:function(e){var a=e.row;e.index;return 1==t.formValidate.product_type?[a.virtual_list||a.stock?i("span",{staticClass:"seeCatMy",on:{click:function(e){return t.seeVirtual(t.oneFormBatch[0],"oneFormBatch",0)}}},[t._v("已设置")]):i("Button",{on:{click:function(e){return t.addVirtual(0,"oneFormBatch")}}},[t._v("添加卡密")])]:void 0}},{key:"action",fn:function(e){e.row,e.index;return[i("a",{on:{click:t.batchAdd}},[t._v("批量设置")]),i("Divider",{attrs:{type:"vertical"}}),i("a",{on:{click:t.batchDel}},[t._v("清空")])]}}],null,!0)})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{staticClass:"labeltop",attrs:{label:"商品属性:"}},[i("Table",{attrs:{data:t.manyFormValidate,columns:t.formValidate.header,border:""},scopedSlots:t._u([t._l(t.attrData.length,(function(e,a){return{key:"value"+(a+1),fn:function(e){e.row;var o=e.index;return[i("div",{class:t.manyFormValidate[o].select?"selectOn":""},[t._v("\n "+t._s(t.manyFormValidate[o]["value"+(a+1)])+"\n ")])]}}})),{key:"pic",fn:function(e){e.row;var a=e.index;return[i("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","duoTable",a)}}},[t.manyFormValidate[a].pic?i("div",{staticClass:"pictrue pictrueTab"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.manyFormValidate[a].pic,expression:"manyFormValidate[index].pic"}]})]):i("div",{staticClass:"\n upLoad\n pictrueTab\n acea-row\n row-center-wrapper\n "},[i("Icon",{attrs:{type:"ios-camera-outline",size:"21"}})],1)])]}},{key:"price",fn:function(e){e.row;var a=e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[a].price,callback:function(e){t.$set(t.manyFormValidate[a],"price",e)},expression:"manyFormValidate[index].price"}})]}},{key:"cost",fn:function(e){e.row;var a=e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[a].cost,callback:function(e){t.$set(t.manyFormValidate[a],"cost",e)},expression:"manyFormValidate[index].cost"}})]}},{key:"ot_price",fn:function(e){e.row;var a=e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[a].ot_price,callback:function(e){t.$set(t.manyFormValidate[a],"ot_price",e)},expression:"manyFormValidate[index].ot_price"}})]}},{key:"stock",fn:function(e){e.row;var a=e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0,precision:0,disabled:1==t.formValidate.product_type||t.openErp},model:{value:t.manyFormValidate[a].stock,callback:function(e){t.$set(t.manyFormValidate[a],"stock",e)},expression:"manyFormValidate[index].stock"}})]}},{key:"fictitious",fn:function(e){var a=e.row,o=e.index;return 1==t.formValidate.product_type?[a.virtual_list&&a.virtual_list.length||a.stock?i("span",{staticClass:"seeCatMy",on:{click:function(e){return t.seeVirtual(a,"manyFormValidate",o)}}},[t._v("已设置")]):i("Button",{on:{click:function(e){return t.addVirtual(o,"manyFormValidate")}}},[t._v("添加卡密")])]:void 0}},{key:"bar_code",fn:function(e){e.row;var a=e.index;return[i("Input",{model:{value:t.manyFormValidate[a].bar_code,callback:function(e){t.$set(t.manyFormValidate[a],"bar_code",e)},expression:"manyFormValidate[index].bar_code"}})]}},{key:"code",fn:function(e){e.row;var a=e.index;return[i("Input",{model:{value:t.manyFormValidate[a].code,callback:function(e){t.$set(t.manyFormValidate[a],"code",e)},expression:"manyFormValidate[index].code"}})]}},{key:"weight",fn:function(e){e.row;var a=e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[a].weight,callback:function(e){t.$set(t.manyFormValidate[a],"weight",e)},expression:"manyFormValidate[index].weight"}})]}},{key:"volume",fn:function(e){e.row;var a=e.index;return[i("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[a].volume,callback:function(e){t.$set(t.manyFormValidate[a],"volume",e)},expression:"manyFormValidate[index].volume"}})]}},{key:"action",fn:function(e){e.row;var a=e.index;return[i("a",{on:{click:function(e){return t.delAttrTable(a)}}},[t._v("删除")])]}}],null,!0)})],1)],1)],1):t._e()],1):t._e(),0===t.formValidate.spec_type?i("div",{staticStyle:{width:"100%"}},[i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"图片:"}},[i("div",{staticClass:"pictrueBox",on:{click:function(e){return t.modalPicTap("dan","danTable",0)}}},[t.oneFormValidate[0].pic?i("div",{staticClass:"pictrue"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.oneFormValidate[0].pic,expression:"oneFormValidate[0].pic"}]})]):i("div",{staticClass:"upLoad acea-row row-center-wrapper"},[i("Input",{staticClass:"input-display",model:{value:t.oneFormValidate[0].pic,callback:function(e){t.$set(t.oneFormValidate[0],"pic",e)},expression:"oneFormValidate[0].pic"}}),i("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)])])],1),i("Col",{staticClass:"asterisk",attrs:{span:"24"}},[i("FormItem",{attrs:{label:"售价:"}},[i("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].price,callback:function(e){t.$set(t.oneFormValidate[0],"price",e)},expression:"oneFormValidate[0].price"}})],1)],1),i("Col",{staticClass:"asterisk",attrs:{span:"24"}},[i("FormItem",{attrs:{label:"成本价:"}},[i("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].cost,callback:function(e){t.$set(t.oneFormValidate[0],"cost",e)},expression:"oneFormValidate[0].cost"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"原价:"}},[i("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].ot_price,callback:function(e){t.$set(t.oneFormValidate[0],"ot_price",e)},expression:"oneFormValidate[0].ot_price"}})],1)],1),i("Col",{staticClass:"asterisk",attrs:{span:"24"}},[i("FormItem",{attrs:{label:"库存:"}},[i("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999,disabled:1==t.formValidate.product_type||t.openErp,precision:0},model:{value:t.oneFormValidate[0].stock,callback:function(e){t.$set(t.oneFormValidate[0],"stock",e)},expression:"oneFormValidate[0].stock"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品条形码:"}},[i("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品条形码"},model:{value:t.oneFormValidate[0].bar_code,callback:function(e){t.$set(t.oneFormValidate[0],"bar_code","string"===typeof e?e.trim():e)},expression:"oneFormValidate[0].bar_code"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品编号:"}},[i("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品编码"},model:{value:t.oneFormValidate[0].code,callback:function(e){t.$set(t.oneFormValidate[0],"code","string"===typeof e?e.trim():e)},expression:"oneFormValidate[0].code"}})],1)],1),0==t.formValidate.product_type?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"重量(KG):"}},[i("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].weight,callback:function(e){t.$set(t.oneFormValidate[0],"weight",e)},expression:"oneFormValidate[0].weight"}})],1)],1):t._e(),0==t.formValidate.product_type?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"体积(m³):"}},[i("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].volume,callback:function(e){t.$set(t.oneFormValidate[0],"volume",e)},expression:"oneFormValidate[0].volume"}})],1)],1):t._e(),1==t.formValidate.product_type?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"卡密设置:"}},[t.oneFormValidate[0].virtual_list.length||t.oneFormValidate[0].stock?i("span",{staticClass:"seeCatMy",on:{click:function(e){return t.seeVirtual(t.oneFormValidate[0],"oneFormValidate",0)}}},[t._v("已设置")]):i("Button",{on:{click:function(e){return t.addVirtual(0,"oneFormValidate")}}},[t._v("添加卡密")])],1)],1):t._e()],1):t._e()],1),i("Row",{directives:[{name:"show",rawName:"v-show",value:"3"===t.currentTab,expression:"currentTab === '3'"}],staticClass:"mb10"},[i("Col",{attrs:{span:"22",offset:"1"}},[i("wangeditor",{ref:"wangeditor",staticStyle:{width:"100%"},attrs:{content:t.contents},on:{editorContent:t.getEditorContent}})],1)],1),i("Row",{directives:[{name:"show",rawName:"v-show",value:"4"===t.currentTab,expression:"currentTab === '4'"}]},[i("Col",t._b({},"Col",t.grid3,!1),[i("FormItem",{attrs:{label:"配送方式:"}},[i("CheckboxGroup",{model:{value:t.formValidate.delivery_type,callback:function(e){t.$set(t.formValidate,"delivery_type",e)},expression:"formValidate.delivery_type"}},[i("Checkbox",{attrs:{label:"3"}},[t._v("门店配送")]),i("Checkbox",{attrs:{label:"2"}},[t._v("到店自提")])],1)],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"运费设置:"}},[i("RadioGroup",{model:{value:t.formValidate.freight,callback:function(e){t.$set(t.formValidate,"freight",e)},expression:"formValidate.freight"}},[i("Radio",{attrs:{label:1}},[t._v("包邮")]),i("Radio",{attrs:{label:2}},[t._v("固定邮费")]),i("Radio",{attrs:{label:3}},[t._v("运费模板")])],1)],1)],1),2==t.formValidate.freight?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:""}},[i("div",{staticClass:"acea-row row-middle"},[i("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"}}),i("span",{staticClass:"ml10"},[t._v("元")])],1)])],1):t._e(),3==t.formValidate.freight?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:""}},[i("div",{staticClass:"acea-row"},[i("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,a){return i("Option",{key:a,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)])],1):t._e(),0==t.merchantPid?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品展示:"}},[i("RadioGroup",{model:{value:t.formValidate.show_type,callback:function(e){t.$set(t.formValidate,"show_type",e)},expression:"formValidate.show_type"}},[i("Radio",{attrs:{label:0}},[t._v("全部")]),i("Radio",{attrs:{label:1}},[t._v("移动端")]),i("Radio",{attrs:{label:2}},[t._v("收银台")])],1)],1)],1):t._e(),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"已售数量:"}},[i("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:999999,placeholder:"请输入已售数量"},model:{value:t.formValidate.ficti,callback:function(e){t.$set(t.formValidate,"ficti",e)},expression:"formValidate.ficti"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"是否限购:"}},[i("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":t.limitTap},model:{value:t.formValidate.is_limit,callback:function(e){t.$set(t.formValidate,"is_limit",e)},expression:"formValidate.is_limit"}},[i("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),i("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),t.formValidate.is_limit?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"限购类型:"}},[i("RadioGroup",{model:{value:t.formValidate.limit_type,callback:function(e){t.$set(t.formValidate,"limit_type",e)},expression:"formValidate.limit_type"}},[i("Radio",{attrs:{label:1}},[t._v("单次限购")]),i("Radio",{attrs:{label:2}},[t._v("长期限购")])],1),i("div",{staticClass:"tips"},[t._v("\n 单次限购是限制每次下单最多购买的数量,长期限购是限制一个用户总共可以购买的数量\n ")])],1)],1):t._e(),t.formValidate.is_limit?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"限购数量:"}},[i("InputNumber",{staticClass:"perW20 maxW",attrs:{min:1,placeholder:"请输入限购数量"},model:{value:t.formValidate.limit_num,callback:function(e){t.$set(t.formValidate,"limit_num",e)},expression:"formValidate.limit_num"}})],1)],1):t._e(),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"排序:"}},[i("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:999999,placeholder:"请输入排序"},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品关键字:"}},[i("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品关键字"},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品简介:"}},[i("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{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),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品口令:"}},[i("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{type:"textarea",rows:3,placeholder:"请输入商品口令"},model:{value:t.formValidate.command_word,callback:function(e){t.$set(t.formValidate,"command_word",e)},expression:"formValidate.command_word"}})],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品推荐图:"}},[i("div",{staticClass:"pictrueBox",on:{click:function(e){return t.modalPicTap("dan","recommend_image")}}},[t.formValidate.recommend_image?i("div",{staticClass:"pictrue"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formValidate.recommend_image,expression:"formValidate.recommend_image"}]}),i("Input",{staticClass:"input-display",model:{value:t.formValidate.recommend_image,callback:function(e){t.$set(t.formValidate,"recommend_image",e)},expression:"formValidate.recommend_image"}})],1):i("div",{staticClass:"upLoad acea-row row-center-wrapper"},[i("Input",{staticClass:"input-display",model:{value:t.formValidate.recommend_image,callback:function(e){t.$set(t.formValidate,"recommend_image",e)},expression:"formValidate.recommend_image"}}),i("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)]),i("div",{staticClass:"tips"},[t._v("(建议图片比例5:2)")])])],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"服务保障:"}},[i("CheckboxGroup",{staticClass:"checkAlls",model:{value:t.formValidate.ensure_id,callback:function(e){t.$set(t.formValidate,"ensure_id",e)},expression:"formValidate.ensure_id"}},t._l(t.ensureData,(function(e,a){return i("Checkbox",{attrs:{label:e.id}},[t._v(t._s(e.name))])})),1)],1)],1),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"商品参数:"}},[i("Select",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{clearable:"",filterable:"",placeholder:"请输入商品参数"},on:{"on-change":t.specsInfo},model:{value:t.formValidate.specs_id,callback:function(e){t.$set(t.formValidate,"specs_id",e)},expression:"formValidate.specs_id"}},t._l(t.specsData,(function(e,a){return i("Option",{key:a,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)],1),t.formValidate.specs_id?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"",props:""}},[i("Table",{ref:"table",staticClass:"specsList",attrs:{border:"",columns:t.specsColumns,data:t.specsList,width:"700"},scopedSlots:t._u([{key:"action",fn:function(e){e.row;var a=e.index;return[a>0?i("a",{on:{click:function(e){return t.delSpecs(a)}}},[t._v("删除")]):t._e()]}}],null,!1,2219201132)}),i("Button",{staticClass:"mt20",on:{click:t.addSpecs}},[t._v("添加参数")])],1)],1):t._e(),i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"自定义留言:"}},[i("i-switch",{attrs:{size:"large"},on:{"on-change":t.customMessBtn},model:{value:t.customBtn,callback:function(e){t.customBtn=e},expression:"customBtn"}},[i("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),i("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),t.customBtn?i("div",{staticClass:"mt10"},[i("Select",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{filterable:"",placeholder:"请选择"},on:{"on-change":t.changeForm},model:{value:t.formValidate.system_form_id,callback:function(e){t.$set(t.formValidate,"system_form_id",e)},expression:"formValidate.system_form_id"}},t._l(t.formList,(function(e,a){return i("Option",{key:e.id,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1):t._e()],1)],1),t.customBtn&&t.formValidate.system_form_id?i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"",props:""}},[i("Table",{ref:"table",staticClass:"specsList on",attrs:{border:"",columns:t.formColumns,data:t.formTypeList},scopedSlots:t._u([{key:"require",fn:function(e){var a=e.row;return[i("span",[t._v(t._s(a.require?"必填":"不必填"))])]}}],null,!1,469424967)})],1)],1):t._e()],1),i("Row",{directives:[{name:"show",rawName:"v-show",value:"5"===t.currentTab,expression:"currentTab === '5'"}]},[i("Col",{attrs:{span:"22",offset:"1"}},[i("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:t.replyColumns,data:t.replyData,loading:t.replyLoading,"no-data-text":"暂无数据","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"info",fn:function(e){var a=e.row;return[i("div",{staticClass:"imgPic acea-row row-middle"},[i("viewer",[i("div",{staticClass:"pictrue"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a.image,expression:"row.image"}]})])]),i("div",{staticClass:"info"},[t._v(t._s(a.store_name))])],1)]}},{key:"content",fn:function(e){var a=e.row;return[i("div",{staticClass:"mb5 content_font"},[t._v(t._s(a.comment))]),i("viewer",t._l(a.pics||[],(function(t,e){return i("div",{key:e,staticClass:"pictrue mr10"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t,expression:"item"}]})])})),0)]}},{key:"merchant_reply_content",fn:function(e){var a=e.row;return[a.replyComment?i("div",{staticClass:"mb5 content_font"},[t._v("\n "+t._s(a.replyComment.content)+"\n ")]):t._e()]}},{key:"action",fn:function(e){var a=e.row;e.index;return[i("a",{on:{click:function(e){return t.reply(a)}}},[t._v("回复")])]}}])})],1)],1),t.spinShow?i("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)],1),i("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?i("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic,getPicD:t.getPicD}}):t._e()],1),i("Card",{staticClass:"fixed-card",attrs:{bordered:!1,"dis-hover":""}},[i("Form",[i("FormItem",["1"!==t.currentTab?i("Button",{on:{click:t.upTab}},[t._v("上一步")]):t._e(),"5"!==t.currentTab?i("Button",{staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.downTab("formValidate")}}},[t._v("下一步")]):t._e(),t.pid||!t.productId&&"5"!==t.currentTab?t._e():i("Button",{staticClass:"submission",attrs:{type:"primary",disabled:t.openSubimit},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("保存")])],1)],1)],1)],1),i("freightTemplate",{ref:"templates",attrs:{template:t.template},on:{changeTemplate:t.changeTemplate}}),i("add-attr",{ref:"addattr",on:{getList:t.userSearchs}}),i("Modal",{attrs:{title:"商品列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":t.goodCancel},model:{value:t.goodsModals,callback:function(e){t.goodsModals=e},expression:"goodsModals"}},[t.goodsModals?i("goods-list",{ref:"goodslist",attrs:{ischeckbox:!0},on:{getProductId:t.getProductId}}):t._e()],1),i("Modal",{attrs:{scrollable:"",title:"选择商品标签",closable:!0,width:"540","footer-hide":!0,"mask-closable":!1},model:{value:t.storeLabelShow,callback:function(e){t.storeLabelShow=e},expression:"storeLabelShow"}},[i("labelList",{ref:"storeLabel",on:{activeData:t.activeStoreData,close:t.storeLabelClose}})],1),i("menus-from",{ref:"menusFrom",attrs:{formValidate:t.formBrand,fromName:1}}),i("Modal",{attrs:{scrollable:"",title:"请选择商品规格",closable:!1,width:"320","footer-hide":!0,"mask-closable":!1},model:{value:t.attrShow,callback:function(e){t.attrShow=e},expression:"attrShow"}},[t.attrShow?i("attr-list",{attrs:{attrs:t.attrsList},on:{activeData:t.activeAttr,close:t.labelAttr,subAttrs:t.subAttrs}}):t._e()],1),i("Modal",{attrs:{scrollable:"",title:"回复内容",closable:""},model:{value:t.replyModal,callback:function(e){t.replyModal=e},expression:"replyModal"}},[i("Form",{ref:"replyForm",attrs:{model:t.replyForm,rules:t.ruleInline,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[i("FormItem",{attrs:{prop:"content"}},[i("Input",{attrs:{type:"textarea",rows:4,placeholder:"请输入回复内容"},model:{value:t.replyForm.content,callback:function(e){t.$set(t.replyForm,"content",e)},expression:"replyForm.content"}})],1)],1),i("div",{attrs:{slot:"footer"},slot:"footer"},[i("Button",{attrs:{type:"primary"},on:{click:t.oks}},[t._v("确定")]),i("Button",{on:{click:t.cancels}},[t._v("取消")])],1)],1)],1)},I=[],F=i("c276"),L=i("310e"),$=i.n(L),T=i("b0e7"),M=i("5334"),D=i("a069"),A=i("2019"),B=i("0f0e"),N=i("e449"),O=i("c4ad"),E=i("2475"),z=i("645a"),P=i("0fc4"),R=i("0e5c");function j(t){return U(t)||H(t)||W()}function W(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function H(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function U(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}function G(t,e,i,a,o,n,r){try{var s=t[n](r),l=s.value}catch(c){return void i(c)}s.done?e(l):Promise.resolve(l).then(a,o)}function Y(t){return function(){var e=this,i=arguments;return new Promise((function(a,o){var n=t.apply(e,i);function r(t){G(n,a,o,r,s,"next",t)}function s(t){G(n,a,o,r,s,"throw",t)}r(void 0)}))}}function Z(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function X(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Z(i,!0).forEach((function(e){J(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Z(i).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function J(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var q={components:{uploadPictures:T["a"],freightTemplate:M["a"],goodsList:O["a"],addAttr:E["a"],couponList:N["a"],menusFrom:A["a"],attrList:z["a"],labelList:B["a"],wangeditor:D["a"],draggable:$.a},props:{visible:{type:Boolean,default:!1},productId:{type:Number,default:0}},data:function(){var t=this;return{formTypeList:[],formColumns:[{title:"表单标题",key:"title",minWidth:100},{title:"表单类型",key:"name",minWidth:100},{title:"是否必填",slot:"require",minWidth:100}],specsList:[],specsColumns:[{title:"参数名称",key:"name",align:"center",width:150,render:function(e,i){return e("div",[e("Input",{props:{value:i.row.name,placeholder:"请输入参数名称"},on:{"on-change":function(e){i.row.name=e.target.value,t.specsList[i.index].name=e.target.value}}})])}},{title:"参数值",key:"value",align:"center",width:300,render:function(e,i){return e("div",[e("Input",{props:{value:i.row.value,placeholder:"请输入参数值"},on:{"on-change":function(e){i.row.value=e.target.value,t.specsList[i.index].value=e.target.value}}})])}},{title:"排序",key:"sort",align:"center",width:100,render:function(e,i){return e("div",[e("InputNumber",{props:{value:parseInt(i.row.sort)||0,placeholder:"排序",precision:0},on:{"on-change":function(e){i.row.sort=e,t.specsList[i.index].sort=e}}})])}},{title:"操作",slot:"action",align:"center",minWidth:120}],customList:[{value:"text",label:"文本框"},{value:"number",label:"数字"},{value:"email",label:"邮件"},{value:"data",label:"日期"},{value:"time",label:"时间"},{value:"id",label:"身份证"},{value:"phone",label:"手机号"},{value:"img",label:"图片"}],headTab:[{title:"基础信息",name:"1"},{title:"规格库存",name:"2"},{title:"商品详情",name:"3"},{title:"其他设置",name:"4"},{title:"商品评论",name:"5"}],productType:[{name:"普通商品",title:"物流发货",id:0},{name:"卡密/网盘",title:"自动发货",id:1},{name:"虚拟商品",title:"虚拟发货",id:3}],virtualList:[],carMyShow:!1,customBtn:!1,attrShow:!1,content:"",contents:"",seletVideo:0,fileUrl:n["a"].apiBaseURL+"/file/upload",fileUrl2:n["a"].apiBaseURL+"/file/video_upload",upload_type:"",uploadData:{},header:{},storeDataLabel:[],labelShow:!1,storeLabelShow:!1,props:{emitPath:!1,multiple:!0,checkStrictly:!0},type:0,goodsModals:!1,off_show:0,modals:!1,spinShow:!1,openSubimit:!1,grid2:{xl:10,lg:12,md:12,sm:24,xs:24},grid3:{xl:18,lg:18,md:20,sm:24,xs:24},oneFormBatch:[{attr:"全部",pic:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0}],formDynamic:{attrsName:"",attrsVal:""},formDynamicNameData:[],isBtn:!1,columnsCarMy:[],columns2:[{title:"商品规格",slot:"attr",align:"center",minWidth:80},{title:"图片",slot:"pic",align:"center",minWidth:80},{title:"售价",slot:"price",align:"center",minWidth:95},{title:"成本价",slot:"cost",align:"center",minWidth:95},{title:"原价",slot:"ot_price",align:"center",minWidth:95},{title:"库存",slot:"stock",align:"center",minWidth:95},{title:"商品条形码",slot:"bar_code",align:"center",minWidth:120},{title:"商品编号",slot:"code",align:"center",minWidth:120},{title:"重量(KG)",slot:"weight",align:"center",minWidth:95},{title:"体积(m³)",slot:"volume",align:"center",minWidth:95},{title:"操作",slot:"action",align:"center",minWidth:140}],columns:[],columnsInstall:[],columnsInstal2:[],gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},formValidate:{system_form_id:0,supplier_id:0,is_limit:0,limit_type:1,limit_num:1,disk_info:"",auto_on_time:"",video_open:!1,store_name:"",freight:1,postage:0,custom_form:[],cate_id:[],ensure_id:[],keyword:"",unit_name:"",show_type:0,specs_id:0,store_info:"",bar_code:"",code:"",image:"",recommend_image:"",slider_image:[],description:"",ficti:0,sort:0,is_show:1,is_hot:0,is_benefit:0,is_best:0,is_new:0,is_good:0,is_postage:0,id:0,spec_type:0,video_link:"",temp_id:"",attrs:[],items:[{pic:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:""}],header:[],selectRule:"",coupon_ids:[],command_word:"",delivery_type:[],specs:[],recommend_list:[],brand_id:[],product_type:0},ruleList:[],templateList:[],createBnt:!1,showIput:!1,manyFormValidate:[],oneFormValidate:[{pic:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0,brokerage:0,brokerage_two:0,vip_price:0,virtual_list:[]}],images:[],imagesTable:"",currentTab:"1",isChoice:"",grid:{xl:8,lg:8,md:12,sm:24,xs:24},loading:!1,modalPic:!1,template:!1,uploadList:[],treeSelect:[],labelSelect:[],ensureData:[],specsData:[],picTit:"",tableIndex:0,ruleValidate:{store_name:[{required:!0,message:"请输入商品名称",trigger:"blur"}],cate_id:[{required:!0,message:"请选择商品分类",trigger:"change",type:"array"}],keyword:[{required:!0,message:"请输入商品关键字",trigger:"blur"}],unit_name:[{required:!0,message:"请输入单位",trigger:"change"}],store_info:[{required:!0,message:"请输入商品简介",trigger:"blur"}],slider_image:[{required:!0,message:"请上传商品轮播图",type:"array",trigger:"change"}],spec_type:[{required:!0,message:"请选择商品规格",trigger:"change"}],selectRule:[{required:!0,message:"请选择商品规格属性",trigger:"change"}]},manyBrokerage:0,manyBrokerageTwo:0,manyVipPrice:0,upload:{videoIng:!1},videoIng:!1,progress:0,videoLink:"",attrs:[],updateIds:[],updateName:[],rakeBack:[{title:"一级返佣",slot:"brokerage",align:"center",width:95},{title:"二级返佣",slot:"brokerage_two",align:"center",width:95}],member:[{title:"会员价",slot:"vip_price",align:"center",width:95}],headerCarMy:{title:"卡密设置",slot:"fictitious",align:"center",width:95},columnsInstalM:[],moveIndex:"",goodsData:[],brandData:[],unitNameList:[],formBrand:{},attrsList:[],activeAtter:[],tabIndex:0,tabName:"",attrData:[],datePickerOptions:{disabledDate:function(t){return t&&t.valueOf()<Date.now()-864e5}},openErp:!1,pid:0,replyColumns:[{title:"评论ID",key:"id",width:80},{title:"商品信息",slot:"info",minWidth:280},{title:"用户名称",key:"nickname",minWidth:150},{title:"评分",key:"score",minWidth:90},{title:"评价内容",slot:"content",minWidth:210},{title:"回复内容",slot:"merchant_reply_content",minWidth:250},{title:"评价时间",key:"add_time",minWidth:150},{title:"操作",slot:"action",fixed:"right",minWidth:150}],replyData:[],replyLoading:!1,replyValidate:{is_reply:"",store_name:"",account:"",product_id:0,page:1,limit:15},total:0,replyModal:!1,rows:{},replyForm:{content:""},ruleInline:{content:[{required:!0,message:"请输入回复内容",trigger:"blur"}]},formList:[],merchantPid:0}},computed:X({},Object(r["e"])("store/layout",["isMobile","menuCollapse"]),{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"},labelBottom:function(){return this.isMobile?void 0:15},startPickOptions:function(){var t=this;return{disabledDate:function(e){return t.formValidate.auto_off_time?e.getTime()>new Date(t.formValidate.auto_off_time).getTime()-864e5:""}}},endPickOptions:function(){var t=this;return{disabledDate:function(e){return"1"==t.formValidate.is_show?e.getTime()<Date.now():t.formValidate.auto_on_time?e.getTime()<new Date(t.formValidate.auto_on_time).getTime()+864e5:""}}},changeUnit:function(){var t=this.unitNameList,e=this.formValidate.unit_name;return{unitNameList:t,unit_name:e}}}),watch:{changeUnit:function(t){var e=t.unitNameList,i=t.unit_name;if(i){var a=e.find((function(t){return t.name==i}));a||(this.formValidate.unit_name="")}},currentTab:function(t){var e=this;this.$nextTick((function(){e.pid&&3==t?e.$refs.wangeditor.editor.disable():e.$refs.wangeditor.editor.enable()}))}},created:function(){this.columns=this.columns2.slice(1,10);var t=JSON.parse(JSON.stringify(this.columns2));t.splice(8,2,this.headerCarMy),this.columnsCarMy=t;var e=JSON.parse(JSON.stringify(this.columns2));e.splice(8,2),this.columnsFictitious=e,this.getToken(),this.getErpConfig()},mounted:function(){var t=this;this.setCopyrightShow({value:!1}),"0"!==this.productId&&this.productId||this.$route.query.copy?this.getInfo():"0"===this.productId&&Object(m["o"])().then((function(e){var i=e.data.info;if(!Array.isArray(i)){var a=i.cate_id.map(Number);t.attrs=i.items||[];var o=[],n=[];i.brand_id.forEach((function(t){n.push(t.toString())})),t.formValidate=i,t.formTypeList=i.custom_form_info||[],t.formValidate.brand_id=n,t.formValidate.coupon_ids=o,t.formValidate.is_limit=t.formValidate.is_limit?1:0,t.formValidate.limit_type=parseInt(t.formValidate.limit_type),t.updateIds=o,t.updateName=i.coupons,t.formValidate.cate_id=a,t.storeDataLabel=i.store_label_id,t.specsList=i.specs,t.oneFormValidate=i.attrs,t.formValidate.header=[],t.generate(0),t.columns=t.columns2.slice(1,10),t.formValidate.system_form_id=i.system_form_id||0,t.formValidate.system_form_id?t.customBtn=!0:t.customBtn=!1,t.spec_type=i.spec_type,0===i.spec_type?t.manyFormValidate=[]:(t.createBnt=!0,t.oneFormValidate=[{pic:i.slider_image[0],price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0,brokerage:0,brokerage_two:0,vip_price:0,virtual_list:[]}]),t.spinShow=!1}})).catch((function(e){t.$Message.error(e.msg)})),this.$route.query.type?(this.modals=!0,this.type=this.$route.query.type):this.type=0,this.goodsCategory(),this.productGetRule(),this.productGetTemplate(),this.getBrandList(),this.getAllUnit(),this.uploadType(),this.getProductAllEnsure(),this.getProductAllSpecs(),this.getAllSystemForm()},destroyed:function(){this.setCopyrightShow({value:!0})},methods:X({},Object(r["d"])("layout",["setCopyrightShow"]),{changeForm:function(t){this.getSystemFormInfo(t,{type:1})},getSystemFormInfo:function(t,e){var i=this;Object(m["J"])(t,e).then((function(t){i.formTypeList=t.data.info})).catch((function(t){i.$Message.error(t.msg)}))},getAllSystemForm:function(){var t=this;Object(m["a"])().then((function(e){t.formList=e.data})).catch((function(e){t.$Message.error(e.msg)}))},limitTap:function(t){t?(this.formValidate.limit_type=this.formValidate.is_limit&&!this.formValidate.limit_type?1:0,this.formValidate.limit_num=this.formValidate.is_limit&&0==this.formValidate.limit_num?1:0):(this.formValidate.limit_type=0,this.formValidate.limit_num=0)},getErpConfig:function(){var t=this;Object(P["a"])().then((function(e){t.openErp=e.data.open_erp})).catch((function(e){t.$Message.error(e.msg)}))},delSpecs:function(t){this.specsList.splice(t,1)},addSpecs:function(){var t={name:"",value:"",sort:0};this.specsList.push(t)},specsInfo:function(t){var e=this;this.specsData.forEach((function(i){i.id==t&&(e.specsList=i.specs)}))},getProductAllSpecs:function(){var t=this;Object(m["j"])().then((function(e){t.specsData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},getProductAllEnsure:function(){var t=this;Object(m["i"])().then((function(e){t.ensureData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},changeVirtual:function(t){this.virtualList=this.virtualList.concat(t)},addVirtual:function(t,e){this.tabIndex=t,this.tabName=e,this.virtualListClear(),this.$refs.addCarMy.fixedCar={disk_info:"",stock:0},this.$refs.addCarMy.cartMyType=1,this.carMyShow=!0},fixdBtn:function(t){1==t.cartMyType?(this.$set(this[this.tabName][this.tabIndex],"disk_info",t.disk_info),this.$set(this[this.tabName][this.tabIndex],"stock",Number(t.stock)),this[this.tabName][this.tabIndex].virtual_list=[]):(this.$set(this[this.tabName][this.tabIndex],"virtual_list",t.virtualList),this.$set(this[this.tabName][this.tabIndex],"stock",t.virtualList.length),this[this.tabName][this.tabIndex].disk_info=""),this.carMyShow=!1},closeCarMy:function(){this.carMyShow=!1},virtualListClear:function(){this.virtualList=[{key:"",value:""}]},seeVirtual:function(t,e,i){this.tabName=e,this.tabIndex=i,this.virtualListClear(),this.$refs.addCarMy.fixedCar={disk_info:"",stock:0},t.virtual_list&&t.virtual_list.length?(this.$refs.addCarMy.cartMyType=2,this.virtualList=t.virtual_list):t.disk_info&&(this.$refs.addCarMy.cartMyType=1,this.$refs.addCarMy.fixedCar.disk_info=t.disk_info,this.$refs.addCarMy.fixedCar.stock=t.stock),this.carMyShow=!0},addAssembly:function(){this.formValidate.custom_form.push({title:"",label:"text",value:"",status:0})},customMessBtn:function(t){t||(this.formValidate.system_form_id=0)},addcustom:function(){this.formValidate.custom_form.length>9?this.$Message.warning("最多添加10条"):this.addAssembly()},delcustom:function(t){this.formValidate.custom_form.splice(t,1)},onchangeShow:function(t){this.formValidate.auto_on_time=t},onchangeOff:function(t){this.formValidate.auto_off_time=t},batchAttr:function(){this.attrShow=!0},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},activeAttr:function(t){this.attrsList=t},labelAttr:function(){this.attrShow=!1},manyEmpty:function(t){t.pic="",t.price=0,t.cost=0,t.ot_price=0,t.stock=0,t.bar_code="",t.code="",t.weight=0,t.volume=0,t.virtual_list=[]},doCombination:function(t){var e=t.length-1,i=[],a=[];return o(t,0);function o(t,n){var r=!0,s=!1,l=void 0;try{for(var c,d=t[n][Symbol.iterator]();!(r=(c=d.next()).done);r=!0){var u=c.value;i[n]=u,n<e?o(t,n+1):a.push(i.join(","));var m=i;i=[];for(var h=0,p=m;h<p.length;h++){var f=p[h];i.push(f)}}}catch(v){s=!0,l=v}finally{try{r||null==d.return||d.return()}finally{if(s)throw l}}return a}},subAttrs:function(t){var e=[];this.attrsList.forEach((function(t,i){var a=[];t.details.forEach((function(t){t.select&&a.push(t.name)})),a.length&&e.push(a)}));var i=[];e.length&&(i=this.doCombination(e)),this.attrShow=!1,this.activeAtter=e,this.oneFormBatch[0].attr=i.length?i.join(";"):"全部",this.manyFormValidate.forEach((function(t){t.select=!1,i.length?i.forEach((function(e){t.values.split("").length==e.split("").length?t.values==e&&(t.select=!0):-1!=t.values.indexOf(e)&&(t.select=!0)})):t.select=!0})),this.$set(this,"manyFormValidate",this.manyFormValidate)},goodsOn:function(t){0!=t&&1!=t||(this.formValidate.auto_on_time="")},goodsOff:function(t){t||(this.formValidate.auto_off_time="")},addBrand:function(){this.$refs.menusFrom.modals=!0,this.$refs.menusFrom.titleFrom="添加品牌分类",this.formBrand={sort:0,is_show:1},this.formBrand.fid=[0],this.$refs.menusFrom.type=1},getAllUnit:function(){var t=this;Object(m["k"])().then((function(e){t.unitNameList=e.data})).catch((function(e){t.$Message.error(e.msg)}))},addClass:function(){var t=this;this.$modalForm(Object(m["p"])()).then((function(){return t.goodsCategory()}))},addUnit:function(){var t=this;this.$modalForm(Object(m["C"])()).then((function(){return t.getAllUnit()}))},addStoreLabel:function(){this.$modalForm(Object(m["v"])()).then((function(){}))},productTypeTap:function(t,e){if(1==t){if(this.productId)return this.$Message.error("商品类型不能切换!");this.formValidate.product_type=e.id}this.formValidate.product_type?(this.headTab=[{title:"基础信息",name:"1"},{title:"规格库存",name:"2"},{title:"商品详情",name:"3"},{title:"其他设置",name:"4"}],this.formValidate.postage=0,this.formValidate.supplier_id=0):this.headTab=[{title:"基础信息",name:"1"},{title:"规格库存",name:"2"},{title:"商品详情",name:"3"},{title:"其他设置",name:"4"}]},labelClose:function(){this.labelShow=!1},closeStoreLabel:function(t){var e=this.storeDataLabel.indexOf(this.storeDataLabel.filter((function(e){return e.id==t.id}))[0]);this.storeDataLabel.splice(e,1)},activeStoreData:function(t){this.storeLabelShow=!1,this.storeDataLabel=t},openStoreLabel:function(t){this.storeLabelShow=!0,this.$refs.storeLabel.userLabel(JSON.parse(JSON.stringify(this.storeDataLabel)))},storeLabelClose:function(){this.storeLabelShow=!1},getBrandList:function(){var t=this;Object(m["d"])().then((function(e){t.initBran(e.data),t.brandData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},initBran:function(t){var e=this;t.map((function(t){t.value=t.value.toString(),t.children&&t.children.length&&e.initBran(t.children)}))},getProductId:function(t){this.goodsModals=!1;var e=this.goodsData.concat(t).filter((function(t,e,i){return i.findIndex((function(e){return e.product_id==t.product_id}))==e}));this.goodsData=e.slice(0,12)},goodCancel:function(){this.goodsModals=!1},cancel:function(){this.$router.push({path:"".concat(n["a"].routePre,"/product/index")})},videoSaveToUrl:function(t){var e=this,i=["video/mp4"],a=-1!==i.indexOf(t.type);return a?(Object(R["a"])({randoms:"",file:t,pieceSize:3,success:function(t){e.formValidate.video_link=t.file_path,e.progress=100},error:function(t){e.$Message.error(t.msg)},uploading:function(t,i){e.videoIng=!0;var a=Math.floor(t/i*100);e.progress=a}}),!1):this.$Message.warning({content:"文件 "+t.name+" 格式不正确, 请选择格式正确的视频",duration:5})},getToken:function(){this.header["Authori-zation"]="Bearer "+F["a"].cookies.get("token")},handleSuccess:function(t,e,i){200===t.status?(this.formValidate.video_link=t.data.src,this.$Message.success(t.msg)):this.$Message.error(t.msg)},uploadType:function(){var t=this;Object(m["K"])().then((function(e){t.upload_type=e.data.upload_type}))},getEditorContent:function(t){this.content=t},infoData:function(t){var e=t.cate_id.map(Number);this.attrs=t.items||[];var i=[];t.coupons.map((function(t){i.push(t.id)})),this.goodsData=t.recommend_list,t.auto_off_time?this.off_show=1:this.off_show=0;var a=[];t.brand_id.forEach((function(t){a.push(t.toString())})),this.formValidate=t,this.formTypeList=t.custom_form_info,this.formValidate.brand_id=a,this.formValidate.is_limit=this.formValidate.is_limit?1:0,this.formValidate.limit_type=parseInt(t.limit_type),this.contents=t.description,this.formValidate.coupon_ids=i,this.updateIds=i,this.updateName=t.coupons,this.formValidate.cate_id=e,this.storeDataLabel=t.store_label_id,this.specsList=t.specs,t.attr&&(this.oneFormValidate=[t.attr]),this.formValidate.header=[],this.generate(0),this.formValidate.system_form_id=t.system_form_id||0,this.formValidate.system_form_id?this.customBtn=!0:this.customBtn=!1,this.spec_type=t.spec_type,0===t.spec_type?this.manyFormValidate=[]:(this.createBnt=!0,this.oneFormValidate=[{pic:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0,brokerage:0,brokerage_two:0,vip_price:0,virtual_list:[]}]),this.pid=t.pid},onClose:function(t){this.modals=!1,this.infoData(t)},checkMove:function(t){this.moveIndex=t.draggedContext.index},end:function(){this.moveIndex=""},unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},getList:function(){this.productGetTemplate()},addTemp:function(){this.$refs.templates.isTemplate=!0},delVideo:function(){var t=this;t.$set(t.formValidate,"video_link",""),t.$set(t,"progress",0),t.videoIng=!1,t.upload.videoIng=!1},zh_uploadFile:function(){if(1==this.seletVideo){if(!this.videoLink||"video"!=this.$getFileType(this.videoLink))return this.$Message.error("请输入正确的视频链接");this.formValidate.video_link=this.videoLink}else this.$refs.refid.click()},zh_uploadFile_change:function(t){var e=this,i=t.target.files[0].name.substr(t.target.files[0].name.indexOf("."));if(-1===i.indexOf(".mp4"))return e.$Message.error("只能上传MP4文件");var a={key:t.target.files[0].name,contentType:t.target.files[0].type};Object(m["r"])(a).then((function(i){e.$videoCloud.videoUpload({type:i.data.type,evfile:t,res:i,uploading:function(t,a){e.upload.videoIng=t,200==i.status&&(e.progress=100)}}).then((function(t){e.formValidate.video_link=t.url,e.$Message.success("视频上传成功"),e.upload.videoIng=!1})).catch((function(t){e.$Message.error(t)}))})).catch((function(t){e.$Message.error(t.msg)}))},upTab:function(){3==this.currentTab&&0!=this.formValidate.product_type?this.currentTab=(Number(this.currentTab)-2).toString():this.currentTab=(Number(this.currentTab)-1).toString()},downTab:function(t){var e=this;this.$refs[t].validate((function(t){if(t){if(2==e.formValidate.is_show&&!e.formValidate.auto_on_time)return e.$Message.warning("请填写定时上架时间");if(1==e.off_show&&!e.formValidate.auto_off_time)return e.$Message.warning("请填写定时下架时间");3==e.currentTab&&0!=e.formValidate.product_type?e.currentTab=(Number(e.currentTab)+2).toString():e.currentTab=(Number(e.currentTab)+1).toString()}else e.$Message.warning("请完善数据")}))},userSearchs:function(){this.productGetRule()},addRule:function(){this.$refs.addattr.modal=!0},vipPriceSetUp:function(){var t=this;if(t.manyVipPrice<=0)return t.$Message.error("请填写会员价在进行批量添加");var e=!0,i=!1,a=void 0;try{for(var o,n=t.manyFormValidate[Symbol.iterator]();!(e=(o=n.next()).done);e=!0){var r=o.value;this.$set(r,"vip_price",t.manyVipPrice)}}catch(s){i=!0,a=s}finally{try{e||null==n.return||n.return()}finally{if(i)throw a}}},batchDel:function(){this.oneFormBatch=[{attr:"全部",pic:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0,virtualList:[],disk_info:""}],this.activeAtter=[];var t=!0,e=!1,i=void 0;try{for(var a,o=this.manyFormValidate[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var n=a.value;n.select=!0}}catch(r){e=!0,i=r}finally{try{t||null==o.return||o.return()}finally{if(e)throw i}}},confirm:function(){var t=this;if(t.createBnt=!0,t.formValidate.selectRule.trim().length<=0)return t.$Message.error("请选择属性");t.ruleList.forEach((function(e,i){e.rule_name===t.formValidate.selectRule&&(t.attrs=e.rule_value)}))},productGetRule:function(){var t=this;Object(m["q"])().then((function(e){t.ruleList=e.data}))},productGetTemplate:function(){var t=this;Object(m["s"])().then((function(e){t.templateList=e.data}))},delAttrTable:function(t){var e=this.productId;e?(this.manyFormValidate.splice(t,1),this.$Message.success(res.msg)):this.manyFormValidate.splice(t,1)},batchAdd:function(){var t=!0,e=!1,i=void 0;try{for(var a,o=this.manyFormValidate[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var n=a.value;n.select&&(this.oneFormBatch[0].pic&&this.$set(n,"pic",this.oneFormBatch[0].pic),this.oneFormBatch[0].price>0&&this.$set(n,"price",this.oneFormBatch[0].price),this.oneFormBatch[0].cost>0&&this.$set(n,"cost",this.oneFormBatch[0].cost),this.oneFormBatch[0].ot_price>0&&this.$set(n,"ot_price",this.oneFormBatch[0].ot_price),this.oneFormBatch[0].stock>0&&this.$set(n,"stock",this.oneFormBatch[0].stock),""!==this.oneFormBatch[0].bar_code&&this.$set(n,"bar_code",this.oneFormBatch[0].bar_code),""!==this.oneFormBatch[0].code&&this.$set(n,"code",this.oneFormBatch[0].code),this.oneFormBatch[0].weight>0&&this.$set(n,"weight",this.oneFormBatch[0].weight),this.oneFormBatch[0].volume>0&&this.$set(n,"volume",this.oneFormBatch[0].volume),1==this.formValidate.product_type&&(this.oneFormBatch[0].virtual_list&&this.oneFormBatch[0].virtual_list.length?this.$set(n,"virtual_list",this.oneFormBatch[0].virtual_list):this.oneFormBatch[0].disk_info&&(this.$refs.addCarMy.cartMyType=1,this.$set(n,"disk_info",this.oneFormBatch[0].disk_info))))}}catch(r){e=!0,i=r}finally{try{t||null==o.return||o.return()}finally{if(e)throw i}}},addBtn:function(){this.clearAttr(),this.createBnt=!1,this.showIput=!0},addmanyData:function(t){t.forEach((function(t){t.select=!0})),this.manyFormValidate=t},generate:function(t){var e=this;Object(m["g"])({attrs:this.attrs,product_type:this.formValidate.product_type},this.formValidate.id,t).then((function(t){var i=t.data.info,a=JSON.parse(JSON.stringify(i.header));"0"!==e.productId&&e.addmanyData(i.value),e.formValidate.header=a,e.attrData=t.data.info.attr;var o=i.header;o.pop(),e.columnsInstalM=i.header,e.productId||1!==e.formValidate.spec_type?e.productId&&(e.manyFormValidate.map((function(t){t.pic||(t.pic=e.formValidate.slider_image[0])})),e.oneFormBatch[0].pic=e.formValidate.slider_image[0]):(e.manyFormValidate.map((function(t){t.pic=e.formValidate.slider_image[0]})),e.oneFormBatch[0].pic=e.formValidate.slider_image[0]),e.getAttr()})).catch((function(t){e.$Message.error(t.msg)}))},offAttrName:function(){this.showIput=!1,this.createBnt=!0},clearAttr:function(){this.formDynamic.attrsName="",this.formDynamic.attrsVal=""},handleRemoveRole:function(t){this.attrs.splice(t,1),this.manyFormValidate.splice(t,1)},handleRemove2:function(t,e){t.splice(e,1)},createAttrName:function(){if(this.formDynamic.attrsName&&this.formDynamic.attrsVal){var t={value:this.formDynamic.attrsName,detail:[this.formDynamic.attrsVal]};this.attrs.push(t);var e={};this.attrs=this.attrs.reduce((function(t,i){return!e[i.value]&&(e[i.value]=t.push(i)),t}),[]),this.clearAttr(),this.showIput=!1,this.createBnt=!0}else this.$Message.warning("请添加完整的规格!")},createAttr:function(t,e){if(t){this.attrs[e].detail.push(t);var i={};this.attrs[e].detail=this.attrs[e].detail.reduce((function(t,e){return!i[e]&&(i[e]=t.push(e)),t}),[])}else this.$Message.warning("请添加属性")},goodsCategory:function(){var t=this;Object(m["f"])(1).then((function(e){t.treeSelect=e.data})).catch((function(e){t.$Message.error(e.msg)}))},changeVideo:function(t){this.formValidate.video_link="",this.videoLink=""},changeSpec:function(){},getInfo:function(){var t=this,e=this;e.spinShow=!0,Object(m["u"])(e.productId||this.$route.query.copy).then((function(e){var i=e.data.productInfo,a=i.delivery_type;if(Array.isArray(a)){var o=a.findIndex((function(t){return 1==t}));-1!=o&&(a.splice(o,1),i.delivery_type=a)}t.merchantPid=i.pid,t.infoData(i),t.spinShow=!1})).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))},onhangeTab:function(t){this.currentTab=t},handleRemove:function(t){this.images.splice(t,1),this.formValidate.slider_image.splice(t,1),this.oneFormValidate[0].pic=this.formValidate.slider_image[0]},changeCancel:function(t){this.modalPic=!1},modalPicTap:function(t,e,i){this.modalPic=!0,this.isChoice="dan"===t?"单选":"多选",this.picTit=e,this.tableIndex=i},getPic:function(t){switch(this.picTit){case"danFrom":this.formValidate.image=t.att_dir,this.productId||(0===this.formValidate.spec_type?this.oneFormValidate[0].pic=t.att_dir:(this.manyFormValidate.map((function(e){e.pic=t.att_dir})),this.oneFormBatch[0].pic=t.att_dir));break;case"danTable":this.oneFormValidate[this.tableIndex].pic=t.att_dir;break;case"duopi":this.oneFormBatch[this.tableIndex].pic=t.att_dir;break;case"recommend_image":this.formValidate.recommend_image=t.att_dir;break;default:this.manyFormValidate[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.slider_image.push(t.att_dir),e.formValidate.slider_image=e.formValidate.slider_image.splice(0,10)})),this.oneFormValidate[0].pic=this.formValidate.slider_image[0],this.modalPic=!1},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(t){if(!e.formValidate.store_name.trim())return e.$Message.warning("基础信息-商品名称不能为空");if(2==e.formValidate.is_show&&!e.formValidate.auto_on_time)return e.$Message.warning("基础信息-定时上架时间不能为空");if(1==e.off_show&&!e.formValidate.auto_off_time)return e.$Message.warning("基础信息-定时下架时间不能为空");if(2==e.formValidate.freight&&0==e.formValidate.product_type&&e.formValidate.postage<=0)return e.$Message.warning("物流设置-固定邮费不能为0");if(3==e.formValidate.freight&&0==e.formValidate.product_type&&!e.formValidate.temp_id)return e.$Message.warning("物流设置-运费模板不能为空");if(4==e.currentTab&&!e.formValidate.delivery_type.length)return e.$Message.warning("请选择配送方式");if(e.customBtn&&0==e.formValidate.system_form_id)return e.$Message.warning("其他设置-请选择自定义表单模板");if(e.formValidate.type=e.type,0===e.formValidate.spec_type?(e.formValidate.attrs=e.oneFormValidate,e.formValidate.header=[],e.formValidate.items=[]):(e.formValidate.items=e.attrs,e.formValidate.attrs=e.manyFormValidate),1===e.formValidate.spec_type&&0===e.manyFormValidate.length)return e.$Message.warning("规格库存-请点击生成多规格");e.formValidate.attrs;for(var i=0;i<e.specsList.length;i++){var a=e.specsList[i];if(!a.name.trim())return e.$Message.error("请输入参数名称");if(!a.value.trim())return e.$Message.error("请输入参数值")}e.openSubimit=!0,e.formValidate.description=e.formatRichText(e.content);var o=[];e.goodsData.forEach((function(t){o.push(t.product_id)})),e.formValidate.recommend_list=o;var n=[];e.storeDataLabel.forEach((function(t){n.push(t.id)})),e.formValidate.store_label_id=n,e.formValidate.specs=e.specsList,e.$route.query.copy&&(e.formValidate.id=0,e.formValidate.soure_link=""),Object(m["h"])(e.formValidate).then(function(){var t=Y(d.a.mark((function t(i){return d.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.openSubimit=!1,e.$Message.success(i.msg),"0"===e.productId&&Object(m["e"])().catch((function(t){e.$Message.error(t.msg)})),e.$emit("saved");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.openSubimit=!1,e.$Message.error(t.msg)}))}else{if(!e.formValidate.store_name)return e.$Message.warning("基础信息-商品名称不能为空");if(!e.formValidate.cate_id.length)return e.$Message.warning("基础信息-商品分类不能为空");if(!e.formValidate.unit_name)return e.$Message.warning("基础信息-商品单位不能为空");if(!e.formValidate.slider_image.length)return e.$Message.warning("基础信息-商品轮播图不能为空")}}))},changeTemplate:function(t){this.template=t},validate:function(t,e,i){!1===e&&this.$Message.warning(i)},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 i=j(this.formValidate.slider_image),a=i.indexOf(this.dragging),o=i.indexOf(e);i.splice.apply(i,[o,0].concat(j(i.splice(a,1)))),this.formValidate.slider_image=i}},addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var i=new window.UE.ui.Dialog({iframeUrl:"/store/widget.images/index.html?fodder=dialog",editor:t,name:e,title:"上传图片",cssRules:"width:1200px;height:500px;padding:20px;"});this.dialog=i;var a=new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(https://cdn.oss.9gt.net/prov1.1/1/icons.png);background-position: -726px -77px;",onclick:function(){i.render(),i.open()}});return a}),37),window.UE.registerUI("video-dialog",(function(t,e){var i=new window.UE.ui.Dialog({iframeUrl:"/store/widget.video/index.html?fodder=video",editor:t,name:e,title:"上传视频",cssRules:"width:1000px;height:500px;padding:20px;"});this.dialog=i;var a=new window.UE.ui.Button({name:"video-button",title:"上传视频",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -320px -20px;",onclick:function(){i.render(),i.open()}});return a}),38)},formatRichText:function(t){var e=t.replace(/<img[^>]*>/gi,(function(t,e){return t=t.replace(/style="[^"]+"/gi,"").replace(/style='[^']+'/gi,""),t=t.replace(/width="[^"]+"/gi,"").replace(/width='[^']+'/gi,""),t=t.replace(/height="[^"]+"/gi,"").replace(/height='[^']+'/gi,""),t}));return e=e.replace(/style="[^"]+"/gi,(function(t,e){return t=t.replace(/width:[^;]+;/gi,"max-width:100%;").replace(/width:[^;]+;/gi,"max-width:100%;"),t})),e=e.replace(/\<img/gi,'<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"'),e},drawerChange:function(t){t?(this.currentTab="1",this.getInfo(),this.getReplyList()):this.$emit("update:visible",!1)},getReplyList:function(){var t=this;this.replyLoading=!0,this.replyValidate.product_id=this.productId,Object(m["y"])(this.replyValidate).then(function(){var e=Y(d.a.mark((function e(i){var a;return d.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=i.data,t.replyData=a.list,t.total=i.data.count,t.replyLoading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.replyLoading=!1,t.$Message.error(e.msg)}))},reply:function(t){this.replyModal=!0,this.rows=t},oks:function(){var t=this;this.replyModal=!0,this.$refs["replyForm"].validate((function(e){if(!e)return!1;Object(m["H"])(t.replyForm,t.rows.id).then(function(){var e=Y(d.a.mark((function e(i){return d.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$Message.success(i.msg),t.replyModal=!1,t.$refs["replyForm"].resetFields(),t.getReplyList();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))}))},cancels:function(){this.replyModal=!1,this.$refs["replyForm"].resetFields()}})},K=q,Q=(i("cb08"),Object(g["a"])(K,S,I,!1,null,"6f131fd8",null)),tt=Q.exports,et=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("Modal",{attrs:{title:"批量设置",width:"750","class-name":"batch-modal"},on:{"on-visible-change":t.batchVisibleChange},model:{value:t.batchModal,callback:function(e){t.batchModal=e},expression:"batchModal"}},[i("Alert",{attrs:{"show-icon":""}},[t._v("每次只能修改一项,如需修改多项,请多次操作。")]),i("Row",{attrs:{type:"flex",align:"middle"}},[i("Col",{attrs:{span:"5"}},[i("Menu",{attrs:{"active-name":t.menuActive,width:"auto"},on:{"on-select":t.menuSelect}},[i("MenuItem",{attrs:{name:9}},[t._v("商品展示")]),i("MenuItem",{attrs:{name:1}},[t._v("商品分类")]),i("MenuItem",{attrs:{name:3}},[t._v("物流设置")]),i("MenuItem",{attrs:{name:8}},[t._v("运费设置")]),i("MenuItem",{attrs:{name:7}},[t._v("自定义留言")])],1)],1),i("Col",{attrs:{span:"19"}},[i("Form",{attrs:{model:t.batchData,"label-width":122}},[9===t.menuActive?i("FormItem",{attrs:{label:"商品展示:"}},[i("RadioGroup",{model:{value:t.batchData.show_type,callback:function(e){t.$set(t.batchData,"show_type",e)},expression:"batchData.show_type"}},[i("Radio",{attrs:{label:0}},[t._v("全部")]),i("Radio",{attrs:{label:1}},[t._v("移动端")]),i("Radio",{attrs:{label:2}},[t._v("收银台")])],1)],1):t._e(),1===t.menuActive?i("FormItem",{attrs:{label:"商品分类:"}},[i("el-cascader",{class:{single:!t.batchData.cate_id.length},attrs:{options:t.data1,props:t.props,size:"small",filterable:"",clearable:""},model:{value:t.batchData.cate_id,callback:function(e){t.$set(t.batchData,"cate_id",e)},expression:"batchData.cate_id"}})],1):t._e(),3===t.menuActive?i("FormItem",{attrs:{label:"物流方式:"}},[i("CheckboxGroup",{attrs:{size:"small"},model:{value:t.batchData.delivery_type,callback:function(e){t.$set(t.batchData,"delivery_type",e)},expression:"batchData.delivery_type"}},[i("Checkbox",{attrs:{label:3}},[t._v("门店配送")]),i("Checkbox",{attrs:{label:2}},[t._v("到店自提")])],1)],1):t._e(),8===t.menuActive?i("FormItem",{attrs:{label:"运费设置:"}},[i("RadioGroup",{model:{value:t.batchData.freight,callback:function(e){t.$set(t.batchData,"freight",e)},expression:"batchData.freight"}},[i("Radio",{attrs:{label:1}},[t._v("包邮")]),i("Radio",{attrs:{label:2}},[t._v("固定邮费")]),i("Radio",{attrs:{label:3}},[t._v("运费模板")])],1)],1):t._e(),8===t.menuActive&&2===t.batchData.freight?i("FormItem",[i("div",{staticClass:"input-number"},[i("InputNumber",{attrs:{min:0},model:{value:t.batchData.postage,callback:function(e){t.$set(t.batchData,"postage",e)},expression:"batchData.postage"}}),i("span",{staticClass:"suffix"},[t._v("元")])],1)]):t._e(),8===t.menuActive&&3===t.batchData.freight?i("FormItem",[i("Select",{model:{value:t.batchData.temp_id,callback:function(e){t.$set(t.batchData,"temp_id",e)},expression:"batchData.temp_id"}},t._l(t.templateList,(function(e){return i("Option",{key:e.id,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1):t._e(),7===t.menuActive?i("FormItem",{attrs:{label:"自定义留言:"}},[i("i-switch",{attrs:{size:"large"},on:{"on-change":t.customMessBtn},model:{value:t.customBtn,callback:function(e){t.customBtn=e},expression:"customBtn"}},[i("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),i("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),t.customBtn?i("div",{staticClass:"mt10"},[i("Select",{attrs:{filterable:"",placeholder:"请选择"},on:{"on-change":t.changeForm},model:{value:t.batchData.system_form_id,callback:function(e){t.$set(t.batchData,"system_form_id",e)},expression:"batchData.system_form_id"}},t._l(t.formList,(function(e,a){return i("Option",{key:e.id,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1):t._e(),t.customBtn&&t.batchData.system_form_id?i("div",[i("Table",{ref:"table",staticClass:"customTab",attrs:{border:"",columns:t.formColumns,data:t.formTypeList,width:"100%","max-height":"165"},scopedSlots:t._u([{key:"require",fn:function(e){var a=e.row;return[i("span",[t._v(t._s(a.require?"必填":"不必填"))])]}}],null,!1,469424967)})],1):t._e()],1):t._e()],1)],1)],1),i("div",{attrs:{slot:"footer"},slot:"footer"},[i("Button",{on:{click:t.cancelBatch}},[t._v("取消")]),i("Button",{attrs:{type:"primary"},on:{click:t.saveBatch}},[t._v("保存")])],1)],1)],1)},it=[],at=i("90e7"),ot={data:function(){return{props:{emitPath:!1,multiple:!0,checkStrictly:!0},batchModal:!1,menuActive:1,data1:[],templateList:[],customBtn:!1,formList:[],formTypeList:[],formColumns:[{title:"表单标题",key:"title",minWidth:100},{title:"表单类型",key:"name",minWidth:100},{title:"是否必填",slot:"require",minWidth:100}],batchData:{show_type:0,system_form_id:0,cate_id:[],delivery_type:[],freight:1,postage:0,temp_id:0},checkUidList:[],isAll:0,formValidate:{}}},created:function(){this.allFormList()},mounted:function(){this.goodsCategory(),this.productGetTemplate()},methods:{cancelBatch:function(){this.batchModal=!1},saveBatch:function(){var t=this;if(this.customBtn&&0==this.batchData.system_form_id)return this.$Message.warning("请选择自定义表单模板");var e={type:this.menuActive,ids:this.checkUidList,all:this.isAll,where:this.formValidate,data:this.batchData};Object(m["b"])(e).then((function(e){t.$Message.success(e.msg),t.batchModal=!1})).catch((function(e){t.$Message.error(e.msg)}))},changeForm:function(t){this.getSystemFormInfo(t,{type:1})},getSystemFormInfo:function(t,e){var i=this;Object(at["E"])(t,e).then((function(t){i.formTypeList=t.data.info})).catch((function(t){i.$Message.error(t.msg)}))},allFormList:function(){var t=this;Object(m["a"])().then((function(e){t.formList=e.data})).catch((function(e){t.$Message.error(e.msg)}))},productGetTemplate:function(){var t=this;Object(m["s"])().then((function(e){t.templateList=e.data}))},goodsCategory:function(){var t=this;Object(m["f"])(1).then((function(e){t.data1=e.data})).catch((function(e){t.$Message.error(e.msg)}))},customMessBtn:function(t){t||(this.batchData.system_form_id=0)},menuSelect:function(t){this.menuActive=t},batchVisibleChange:function(){this.batchData={show_type:0,cate_id:[],delivery_type:[],freight:1,postage:0,temp_id:0,system_form_id:0},this.storeDataLabel=[],this.couponName=[],this.dataLabel=[],this.menuActive=9}}},nt=ot,rt=(i("91b67"),Object(g["a"])(nt,et,it,!1,null,"e607cade",null)),st=rt.exports;function lt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function ct(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?lt(i,!0).forEach((function(e){dt(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):lt(i).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function dt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var ut={name:"index",components:{goodsDetail:y,stockEdit:C,productDetails:tt,batchSet:st},data:function(){return{routePre:n["a"].routePre,props:{emitPath:!1,multiple:!0,checkStrictly:!0},openErp:!1,goodsId:"",headerList:[],total:0,loading:!1,orderList:[],formValidate:{show_type:"",store_name:"",cate_id:"",type:"1",page:1,limit:15},product_status:1,detailsVisible:!1,productId:0,isAll:0,isCheckBox:!1,checkUidList:[],isLabel:0,cateData:[]}},watch:{$route:function(){this.$route.fullPath==="".concat(this.routePre,"/product/index?type=5")&&this.getPath()}},computed:ct({},Object(r["e"])("store/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.goodsCategory(),this.getHeader(),this.getErpConfig()},methods:{openBatch:function(){this.isLabel=0,this.$refs.batch.checkUidList=this.checkUidList,this.$refs.batch.isAll=this.isAll,this.$refs.batch.formValidate=this.formValidate,this.$refs.batch.batchModal=!0},checkboxItem:function(t){var e=parseInt(t.rowid),i=this.checkUidList.indexOf(e);-1!==i?this.checkUidList=this.checkUidList.filter((function(t){return t!==e})):this.checkUidList.push(e)},checkboxAll:function(){var t=this.$refs.xTable.getCheckboxRecords(!0),e=this.$refs.xTable.getCheckboxReserveRecords(!0);0==this.isAll&&this.checkUidList.length<=e.length&&!this.isCheckBox&&(e=[]),e=e.concat(t);var i=[];e.forEach((function(t){i.push(parseInt(t.id))})),this.checkUidList=i,t.length||(this.isCheckBox=!1)},allPages:function(t){this.isAll=t,0==t?this.$refs.xTable.toggleAllCheckboxRow():(this.isCheckBox?(this.$refs.xTable.setAllCheckboxRow(!1),this.isCheckBox=!1,this.isAll=0):(this.$refs.xTable.setAllCheckboxRow(!0),this.isCheckBox=!0,this.isAll=1),this.checkUidList=[])},allReset:function(){this.isAll=0,this.isCheckBox=!1,this.$refs.xTable.setAllCheckboxRow(!1),this.checkUidList=[]},onShelves:function(){var t=this;if(1!=this.isAll&&0===this.checkUidList.length)this.$Message.warning("请选择要上架的商品");else{var e={all:this.isAll,ids:this.checkUidList};1==this.isAll&&(e.where={cate_id:this.formValidate.cate_id,store_name:this.formValidate.store_name,show_type:this.formValidate.show_type,type:this.formValidate.type}),Object(m["A"])(e).then((function(e){t.$Message.success(e.msg),t.getHeader(),t.allReset()})).catch((function(e){t.$Message.error(e.msg)}))}},onDismount:function(){var t=this;if(1!=this.isAll&&0===this.checkUidList.length)this.$Message.warning("请选择要下架的商品");else{var e={all:this.isAll,ids:this.checkUidList};1==this.isAll&&(e.where={cate_id:this.formValidate.cate_id,store_name:this.formValidate.store_name,show_type:this.formValidate.show_type,type:this.formValidate.type}),Object(m["D"])(e).then((function(e){t.$Message.success(e.msg),t.getHeader(),t.allReset()})).catch((function(e){t.$Message.error(e.msg)}))}},getErpConfig:function(){var t=this;Object(P["a"])().then((function(e){t.openErp=e.data.open_erp,t.product_status=e.data.product_status})).catch((function(e){t.$Message.error(e.msg)}))},stockChange:function(t){var e=this;this.orderList.forEach((function(i){e.goodsId==i.id&&(i.branch_stock=t)}))},stockControl:function(t){this.goodsId=t.id,this.$refs.stock.modals=!0,this.$refs.stock.productAttrs(t)},getPath:function(){this.formValidate.page=1,this.formValidate.type=this.$route.query.type.toString(),this.getList()},changeSwitch:function(t){var e=this;Object(m["I"])(t.id,t.is_show).then((function(t){e.$Message.success(t.msg),e.getHeader(),e.allReset()})).catch((function(t){e.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,Object(m["x"])(this.formValidate).then((function(e){t.orderList=e.data.list,t.total=e.data.count,t.loading=!1,t.$nextTick((function(){if(1==this.isAll)this.isCheckBox?this.$refs.xTable.setAllCheckboxRow(!0):this.$refs.xTable.setAllCheckboxRow(!1);else{var t=this.$refs.xTable.getCheckboxReserveRecords(!0);(!this.checkUidList.length||this.checkUidList.length<=t.length)&&this.$refs.xTable.setAllCheckboxRow(!1)}}))})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},getHeader:function(){var t=this;this.loading=!0,Object(m["t"])(this.formValidate).then((function(e){t.headerList=e.data.list,t.$route.fullPath==="".concat(n["a"].routePre,"/product/index?type=5")?t.getPath():t.getList()}))},goodsCategory:function(){var t=this;Object(m["f"])(1).then((function(e){t.cateData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},detail:function(t){this.detailsVisible=!0,this.productId=t},edit:function(t){this.$router.push({path:n["a"].routePre+"/product/edit_product/"+t.id})},reply:function(t){this.$router.push({path:n["a"].routePre+"/product/product_reply?id="+t})},del:function(t,e){var i=this,a={title:t.is_del?"恢复商品":"移入回收站",num:e,url:"product/product/".concat(t.id),method:"DELETE",ids:"",tips:t.is_del?"确定恢复商品吗":"确定移入回收站吗"};this.$modalSure(a).then((function(t){i.$Message.success(t.msg),i.orderList.splice(e,1),i.getHeader()})).catch((function(t){i.$Message.error(t.msg)}))},copy:function(t){this.$router.push({path:"".concat(n["a"].routePre,"/product/edit_product/"),query:{copy:t.id}})},search:function(){console.log("454545"),this.allReset(),this.formValidate.page=1,this.getHeader()},reset:function(){this.formValidate.page=1,this.formValidate.show_type="",this.formValidate.store_name="",this.formValidate.cate_id="",this.getHeader()},onClickTab:function(t){this.allReset(),this.formValidate.type=t,this.formValidate.page=1,this.getList(),this.getHeader()},pageChange:function(t){this.formValidate.page=t.currentPage,this.getList()}}},mt=ut,ht=(i("5953"),Object(g["a"])(mt,a,o,!1,null,"11e45062",null));e["default"]=ht.exports},"6db4":function(t,e,i){!function(t,a){a(e,i("a026"))}(0,(function(t,e){"use strict";function i(t,e,i){document.addEventListener?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function a(t,e,i){document.addEventListener?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function n(t,e){return e={exports:{}},t(e,e.exports),e.exports}function r(){var t={},e=0,i=0,a=0;return{add:function(o,n){n||(n=o,o=0),o>i?i=o:o<a&&(a=o),t[o]||(t[o]=[]),t[o].push(n),e++},process:function(){for(var e=a;e<=i;e++)for(var o=t[e],n=0;n<o.length;n++)(0,o[n])()},size:function(){return e}}}function s(t){return t[V]}function l(t){return Array.isArray(t)||void 0!==t.length}function c(t){if(Array.isArray(t))return t;var e=[];return L(t,(function(t){e.push(t)})),e}function d(t){return t&&1===t.nodeType}function u(t,e,i){var a=t[e];return void 0!==a&&null!==a||void 0===i?a:i}e=e&&e.hasOwnProperty("default")?e.default:e;var m=function(t){var e=Date.now();return function(i){if(i-e>(t||14))return e=i,!0}},h=function(t,e,i){var a,o,n,r,s,l=function l(){var c=(new Date).getTime()-r;c<e&&c>=0?a=setTimeout(l,e-c):(a=null,i||(s=t.apply(n,o),a||(n=o=null)))};return function(){n=this,o=arguments,r=(new Date).getTime();var c=i&&!a;return a||(a=setTimeout(l,e)),c&&(s=t.apply(n,o),n=o=null),s}},p={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"stripContainer",staticClass:"happy-scroll-strip",class:[t.horizontal?"happy-scroll-strip--horizontal":"happy-scroll-strip--vertical"],style:[t.initLocation],on:{"!wheel":function(e){return e.stopPropagation(),t.handlerWheel(e)}}},[i("div",{ref:"strip",staticClass:"happy-scroll-bar",style:[t.translate,o({},t.config.sizeAttr,t.length+"px"),t.initSize,{background:t.color},{opacity:t.isOpacity}],on:{mousedown:function(e){return e.stopPropagation(),t.handlerMouseDown(e)}}})])},staticRenderFns:[],name:"happy-scroll-strip",props:{horizontal:Boolean,left:Boolean,top:Boolean,move:{type:Number,default:0},size:{type:[Number,String],default:4},minLengthV:{type:Number,default:40},minLengthH:{type:Number,default:40},color:{type:String,default:"rgba(51,51,51,0.2)"},throttle:{type:Number,default:14}},data:function(){return{config:{},startMove:!1,binded:!1,length:0,percentage:0,maxOffset:0,currentOffset:0,moveThrottle:m(this.throttle)}},watch:{currentOffset:function(t){0===t?this.emitLocationEvent("start",0):t===this.maxOffset&&this.emitLocationEvent("end",t/this.percentage)}},computed:{initSize:function(){return o({},this.horizontal?"height":"width",this.size+"px")},isOpacity:function(){return this.percentage<1?1:0},translate:function(){var t=this.move*this.percentage;if(this.$refs.stripContainer)return t<0&&(t=0),t>this.maxOffset&&(t=this.maxOffset),this.currentOffset=t,{transform:this.config.translate+"("+t+"px)"}},initLocation:function(){return this.horizontal?this.top?{top:0,bottom:"auto"}:"":this.left?{left:0,right:"auto"}:""}},methods:{emitLocationEvent:function(t,e){var i=this.horizontal?"horizontal":"vertical";this.$emit(i+"-"+t,e)},computeStrip:function(t,e){var i=this.$refs.stripContainer[this.config.client];this.length=i*(e/t);var a=this.horizontal?this.minLengthH:this.minLengthV;a<1&&(a*=i),this.length=this.length<a?a:this.length;var o=this.maxOffset=i-this.length;this.percentage=o/(t-e)},bindEvents:function(){this.binded||(i(document,"mouseup",this.handlerMouseUp),i(document,"mousemove",this.handlerMove),this.binded=!0)},handlerMouseDown:function(t){if(0===t.button)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.startMove=!0,this.axis=t[this.config.clientAxis],this.bindEvents(),!1},handlerMouseUp:function(){this.startMove=!1},handlerMove:function(t){if(this.startMove&&this.moveThrottle(Date.now())){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation();var e=this.$refs.stripContainer.getBoundingClientRect(),i=this.$refs.strip.getBoundingClientRect()[this.config.direction]-e[this.config.direction],a=t[this.config.clientAxis]-this.axis+i;this.axis=t[this.config.clientAxis],this.changeOffset(a)}},handlerWheel:function(t){var e=this.$refs.stripContainer.getBoundingClientRect(),i=this.$refs.strip.getBoundingClientRect()[this.config.direction]-e[this.config.direction]+t[this.config.wheelDelta];this.changeOffset(i,t)},changeOffset:function(t,e){t<0&&(t=0),t>this.maxOffset&&(t=this.maxOffset),e&&t>0&&t<this.maxOffset&&(e.preventDefault(),e.stopImmediatePropagation()),this.currentOffset=t,this.$refs.strip.style.transform=this.config.translate+"("+t+"px)",this.$emit("change",t/this.percentage)}},created:function(){var t={h:{sizeAttr:"width",client:"clientWidth",clientAxis:"clientX",translate:"translateX",direction:"left",wheelDelta:"deltaX"},v:{sizeAttr:"height",client:"clientHeight",clientAxis:"clientY",translate:"translateY",direction:"top",wheelDelta:"deltaY"}};this.config=this.horizontal?t.h:t.v},destroyed:function(){a(document,"mouseup",this.handlerClickUp),a(document,"mousemove",this.handlerMove)}},f=n((function(t){(t.exports={}).forEach=function(t,e){for(var i=0;i<t.length;i++){var a=e(t[i]);if(a)return a}}})),v=function(t){var e=t.stateHandler.getState;return{isDetectable:function(t){var i=e(t);return i&&!!i.isDetectable},markAsDetectable:function(t){e(t).isDetectable=!0},isBusy:function(t){return!!e(t).busy},markBusy:function(t,i){e(t).busy=!!i}}},g=function(t){function e(e){var a=t.get(e);return void 0===a?[]:i[a]||[]}var i={};return{get:e,add:function(e,a){var o=t.get(e);i[o]||(i[o]=[]),i[o].push(a)},removeListener:function(t,i){for(var a=e(t),o=0,n=a.length;o<n;++o)if(a[o]===i){a.splice(o,1);break}},removeAllListeners:function(t){var i=e(t);i&&(i.length=0)}}},b=function(){var t=1;return{generate:function(){return t++}}},y=function(t){var e=t.idGenerator,i=t.stateHandler.getState;return{get:function(t){var e=i(t);return e&&void 0!==e.id?e.id:null},set:function(t){var a=i(t);if(!a)throw new Error("setId required the element to have a resize detection state.");var o=e.generate();return a.id=o,o}}},_=function(t){function e(){}var i={log:e,warn:e,error:e};if(!t&&window.console){var a=function(t,e){t[e]=function(){var t=console[e];if(t.apply)t.apply(console,arguments);else for(var i=0;i<arguments.length;i++)t(arguments[i])}};a(i,"log"),a(i,"warn"),a(i,"error")}return i},w=n((function(t){var e=t.exports={};e.isIE=function(t){return!!function(){var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/")}()&&(!t||t===function(){var t=3,e=document.createElement("div"),i=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(i[0]);return t>4?t:void 0}())},e.isLegacyOpera=function(){return!!window.opera}})),k=n((function(t){(t.exports={}).getOption=function(t,e,i){var a=t[e];return void 0!==a&&null!==a||void 0===i?a:i}})),x=function(t){function e(){for(u=!0;d.size();){var t=d;d=r(),t.process()}u=!1}function i(){c=o(e)}function a(t){return clearTimeout(t)}function o(t){return function(t){return setTimeout(t,0)}(t)}var n=(t=t||{}).reporter,s=k.getOption(t,"async",!0),l=k.getOption(t,"auto",!0);l&&!s&&(n&&n.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),s=!0);var c,d=r(),u=!1;return{add:function(t,e){!u&&l&&s&&0===d.size()&&i(),d.add(t,e)},force:function(t){u||(void 0===t&&(t=s),c&&(a(c),c=null),t?i():e())}}},V="_erd",C={initState:function(t){return t[V]={},s(t)},getState:s,cleanState:function(t){delete t[V]}},S=function(t){function e(t){return o(t).object}var i=(t=t||{}).reporter,a=t.batchProcessor,o=t.stateHandler.getState;if(!i)throw new Error("Missing required dependency: reporter.");return{makeDetectable:function(t,e,n){n||(n=e,e=t,t=null),t=t||{},w.isIE(8)?n(e):function(t,e){function n(){function a(){if("static"===l.position){t.style.position="relative";var e=function(t,e,i,a){var o=i[a];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+a+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+a+" will be set to 0. Element: ",e),e.style[a]=0)};e(i,t,l,"top"),e(i,t,l,"right"),e(i,t,l,"bottom"),e(i,t,l,"left")}}""!==l.position&&(a(l),s=!0);var n=document.createElement("object");n.style.cssText=r,n.tabIndex=-1,n.type="text/html",n.onload=function(){function i(t,e){t.contentDocument?e(t.contentDocument):setTimeout((function(){i(t,e)}),100)}s||a(),i(this,(function(i){e(t)}))},w.isIE()||(n.data="about:blank"),t.appendChild(n),o(t).object=n,w.isIE()&&(n.data="about:blank")}var r="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",s=!1,l=window.getComputedStyle(t),c=t.offsetWidth,d=t.offsetHeight;o(t).startSize={width:c,height:d},a?a.add(n):n()}(e,n)},addListener:function(t,i){function a(){i(t)}if(!e(t))throw new Error("Element is not detectable by this strategy.");w.isIE(8)?(o(t).object={proxy:a},t.attachEvent("onresize",a)):e(t).contentDocument.defaultView.addEventListener("resize",a)},uninstall:function(t){w.isIE(8)?t.detachEvent("onresize",o(t).object.proxy):t.removeChild(e(t)),delete o(t).object}}},I=f.forEach,F=function(t){function e(t){t.className+=" "+u+"_animation_active"}function i(t,e,i){if(t.addEventListener)t.addEventListener(e,i);else{if(!t.attachEvent)return r.error("[scroll] Don't know how to add event listeners.");t.attachEvent("on"+e,i)}}function a(t,e,i){if(t.removeEventListener)t.removeEventListener(e,i);else{if(!t.detachEvent)return r.error("[scroll] Don't know how to remove event listeners.");t.detachEvent("on"+e,i)}}function o(t){return l(t).container.childNodes[0].childNodes[0].childNodes[0]}function n(t){return l(t).container.childNodes[0].childNodes[0].childNodes[1]}var r=(t=t||{}).reporter,s=t.batchProcessor,l=t.stateHandler.getState,c=t.idHandler;if(!s)throw new Error("Missing required dependency: batchProcessor");if(!r)throw new Error("Missing required dependency: reporter.");var d=function(){var t=document.createElement("div");t.style.cssText="position: absolute; width: 1000px; height: 1000px; visibility: hidden; margin: 0; padding: 0;";var e=document.createElement("div");e.style.cssText="position: absolute; width: 500px; height: 500px; overflow: scroll; visibility: none; top: -1500px; left: -1500px; visibility: hidden; margin: 0; padding: 0;",e.appendChild(t),document.body.insertBefore(e,document.body.firstChild);var i=500-e.clientWidth,a=500-e.clientHeight;return document.body.removeChild(e),{width:i,height:a}}(),u="erd_scroll_detection_container";return function(t,e){if(!document.getElementById(t)){var i=e+"_animation",a="/* Created by the element-resize-detector library. */\n";a+="."+e+" > div::-webkit-scrollbar { display: none; }\n\n",a+="."+e+"_animation_active { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: "+i+"; animation-name: "+i+"; }\n",a+="@-webkit-keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(e,i){i=i||function(t){document.head.appendChild(t)};var a=document.createElement("style");a.innerHTML=e,a.id=t,i(a)}(a+="@keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}("erd_scroll_detection_scrollbar_style",u),{makeDetectable:function(t,a,m){function h(){if(t.debug){var e=Array.prototype.slice.call(arguments);if(e.unshift(c.get(a),"Scroll: "),r.log.apply)r.log.apply(null,e);else for(var i=0;i<e.length;i++)r.log(e[i])}}function p(t){var e=l(t).container.childNodes[0],i=getComputedStyle(e);return!i.width||-1===i.width.indexOf("px")}function f(){var t=getComputedStyle(a),e={};return e.position=t.position,e.width=a.offsetWidth,e.height=a.offsetHeight,e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left,e.widthCSS=t.width,e.heightCSS=t.height,e}function v(){var t=f();l(a).startSize={width:t.width,height:t.height},h("Element start size",l(a).startSize)}function g(){l(a).listeners=[]}function b(){if(h("storeStyle invoked."),l(a)){var t=f();l(a).style=t}else h("Aborting because element has been uninstalled")}function y(t,e,i){l(t).lastWidth=e,l(t).lastHeight=i}function _(t){return o(t).childNodes[0]}function w(){return 2*d.width+1}function k(){return 2*d.height+1}function x(t){return t+10+w()}function V(t){return t+10+k()}function C(t){return 2*t+w()}function S(t){return 2*t+k()}function F(t,e,i){var a=o(t),r=n(t),s=x(e),l=V(i),c=C(e),d=S(i);a.scrollLeft=s,a.scrollTop=l,r.scrollLeft=c,r.scrollTop=d}function L(){var t=l(a).container;if(!t){(t=document.createElement("div")).className=u,t.style.cssText="visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;",l(a).container=t,e(t),a.appendChild(t);var o=function(){l(a).onRendered&&l(a).onRendered()};i(t,"animationstart",o),l(a).onAnimationStart=o}return t}function $(){function t(){l(a).onExpand&&l(a).onExpand()}function e(){l(a).onShrink&&l(a).onShrink()}if(h("Injecting elements"),l(a)){!function(){var t=l(a).style;if("static"===t.position){a.style.position="relative";var e=function(t,e,i,a){var o=i[a];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+a+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+a+" will be set to 0. Element: ",e),e.style[a]=0)};e(r,a,t,"top"),e(r,a,t,"right"),e(r,a,t,"bottom"),e(r,a,t,"left")}}();var o=l(a).container;o||(o=L());var n=d.width,s=d.height,c="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; "+function(t,e,i,a){return t=t?t+"px":"0",e=e?e+"px":"0",i=i?i+"px":"0",a=a?a+"px":"0","left: "+t+"; top: "+e+"; right: "+a+"; bottom: "+i+";"}(-(1+n),-(1+s),-s,-n),m=document.createElement("div"),p=document.createElement("div"),f=document.createElement("div"),v=document.createElement("div"),g=document.createElement("div"),b=document.createElement("div");m.dir="ltr",m.style.cssText="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;",m.className=u,p.className=u,p.style.cssText=c,f.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",v.style.cssText="position: absolute; left: 0; top: 0;",g.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",b.style.cssText="position: absolute; width: 200%; height: 200%;",f.appendChild(v),g.appendChild(b),p.appendChild(f),p.appendChild(g),m.appendChild(p),o.appendChild(m),i(f,"scroll",t),i(g,"scroll",e),l(a).onExpandScroll=t,l(a).onShrinkScroll=e}else h("Aborting because element has been uninstalled")}function T(){function e(t,e,i){var a=_(t),o=x(e),n=V(i);a.style.width=o+"px",a.style.height=n+"px"}function i(i){var o=a.offsetWidth,n=a.offsetHeight;h("Storing current size",o,n),y(a,o,n),s.add(0,(function(){if(l(a))if(d()){if(t.debug){var i=a.offsetWidth,s=a.offsetHeight;i===o&&s===n||r.warn(c.get(a),"Scroll: Size changed before updating detector elements.")}e(a,o,n)}else h("Aborting because element container has not been initialized");else h("Aborting because element has been uninstalled")})),s.add(1,(function(){l(a)?d()?F(a,o,n):h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")})),i&&s.add(2,(function(){l(a)?d()?i():h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")}))}function d(){return!!l(a).container}function u(){h("notifyListenersIfNeeded invoked");var t=l(a);return void 0===l(a).lastNotifiedWidth&&t.lastWidth===t.startSize.width&&t.lastHeight===t.startSize.height?h("Not notifying: Size is the same as the start size, and there has been no notification yet."):t.lastWidth===t.lastNotifiedWidth&&t.lastHeight===t.lastNotifiedHeight?h("Not notifying: Size already notified"):(h("Current size not notified, notifying..."),t.lastNotifiedWidth=t.lastWidth,t.lastNotifiedHeight=t.lastHeight,void I(l(a).listeners,(function(t){t(a)})))}function m(){if(h("Scroll detected."),p(a))h("Scroll event fired while unrendered. Ignoring...");else{var t=a.offsetWidth,e=a.offsetHeight;t!==a.lastWidth||e!==a.lastHeight?(h("Element size changed."),i(u)):h("Element size has not changed ("+t+"x"+e+").")}}if(h("registerListenersAndPositionElements invoked."),l(a)){l(a).onRendered=function(){if(h("startanimation triggered."),p(a))h("Ignoring since element is still unrendered...");else{h("Element rendered.");var t=o(a),e=n(a);0!==t.scrollLeft&&0!==t.scrollTop&&0!==e.scrollLeft&&0!==e.scrollTop||(h("Scrollbars out of sync. Updating detector elements..."),i(u))}},l(a).onExpand=m,l(a).onShrink=m;var f=l(a).style;e(a,f.width,f.height)}else h("Aborting because element has been uninstalled")}function M(){if(h("finalizeDomMutation invoked."),l(a)){var t=l(a).style;y(a,t.width,t.height),F(a,t.width,t.height)}else h("Aborting because element has been uninstalled")}function D(){m(a)}function A(){h("Installing..."),g(),v(),s.add(0,b),s.add(1,$),s.add(2,T),s.add(3,M),s.add(4,D)}m||(m=a,a=t,t=null),t=t||{},h("Making detectable..."),function(t){return!function(t){return t===t.ownerDocument.body||t.ownerDocument.body.contains(t)}(t)||null===getComputedStyle(t)}(a)?(h("Element is detached"),L(),h("Waiting until element is attached..."),l(a).onRendered=function(){h("Element is now attached"),A()}):A()},addListener:function(t,e){if(!l(t).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");l(t).listeners.push(e)},uninstall:function(t){var e=l(t);e&&(e.onExpandScroll&&a(o(t),"scroll",e.onExpandScroll),e.onShrinkScroll&&a(n(t),"scroll",e.onShrinkScroll),e.onAnimationStart&&a(e.container,"animationstart",e.onAnimationStart),e.container&&t.removeChild(e.container))}}},L=f.forEach,$=function(t){var e;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var i=b(),a=y({idGenerator:i,stateHandler:C});e=a}var o=t.reporter;o||(o=_(!1===o));var n=u(t,"batchProcessor",x({reporter:o})),r={};r.callOnAdd=!!u(t,"callOnAdd",!0),r.debug=!!u(t,"debug",!1);var s,m=g(e),h=v({stateHandler:C}),p=u(t,"strategy","object"),f={reporter:o,batchProcessor:n,stateHandler:C,idHandler:e};if("scroll"===p&&(w.isLegacyOpera()?(o.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),p="object"):w.isIE(9)&&(o.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),p="object")),"scroll"===p)s=F(f);else{if("object"!==p)throw new Error("Invalid strategy name: "+p);s=S(f)}var k={};return{listenTo:function(t,i,a){function n(t){var e=m.get(t);L(e,(function(e){e(t)}))}function p(t,e,i){m.add(e,i),t&&i(e)}if(a||(a=i,i=t,t={}),!i)throw new Error("At least one element required.");if(!a)throw new Error("Listener required.");if(d(i))i=[i];else{if(!l(i))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");i=c(i)}var f=0,v=u(t,"callOnAdd",r.callOnAdd),g=u(t,"onReady",(function(){})),b=u(t,"debug",r.debug);L(i,(function(t){C.getState(t)||(C.initState(t),e.set(t));var r=e.get(t);if(b&&o.log("Attaching listener to element",r,t),!h.isDetectable(t))return b&&o.log(r,"Not detectable."),h.isBusy(t)?(b&&o.log(r,"System busy making it detectable"),p(v,t,a),k[r]=k[r]||[],void k[r].push((function(){++f===i.length&&g()}))):(b&&o.log(r,"Making detectable..."),h.markBusy(t,!0),s.makeDetectable({debug:b},t,(function(t){if(b&&o.log(r,"onElementDetectable"),C.getState(t)){h.markAsDetectable(t),h.markBusy(t,!1),s.addListener(t,n),p(v,t,a);var e=C.getState(t);if(e&&e.startSize){var l=t.offsetWidth,c=t.offsetHeight;e.startSize.width===l&&e.startSize.height===c||n(t)}k[r]&&L(k[r],(function(t){t()}))}else b&&o.log(r,"Element uninstalled before being detectable.");delete k[r],++f===i.length&&g()})));b&&o.log(r,"Already detecable, adding listener."),p(v,t,a),f++})),f===i.length&&g()},removeListener:m.removeListener,removeAllListeners:m.removeAllListeners,uninstall:function(t){if(!t)return o.error("At least one element is required.");if(d(t))t=[t];else{if(!l(t))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=c(t)}L(t,(function(t){m.removeAllListeners(t),s.uninstall(t),C.cleanState(t)}))}}},T=e;"undefined"!=typeof window&&window.Vue&&(T=window.Vue);var M={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"happy-scroll",staticClass:"happy-scroll"},[i("div",{ref:"container",staticClass:"happy-scroll-container",style:[t.initSize],on:{scroll:function(e){return e.stopPropagation(),t.onScroll(e)}}},[i("div",{ref:"content",staticClass:"happy-scroll-content",style:[t.contentBorderStyle]},[t._t("default")],2)]),t.hideVertical?t._e():i("happy-scroll-strip",t._g(t._b({ref:"stripY",attrs:{throttle:t.throttle,move:t.moveY},on:{change:t.slideYChange}},"happy-scroll-strip",t.$attrs,!1),t.$listeners)),t.hideHorizontal?t._e():i("happy-scroll-strip",t._g(t._b({ref:"stripX",attrs:{horizontal:"",throttle:t.throttle,move:t.moveX},on:{change:t.slideXChange}},"happy-scroll-strip",t.$attrs,!1),t.$listeners))],1)},staticRenderFns:[],name:"happy-scroll",inheritAttrs:!1,components:{HappyScrollStrip:p},props:{scrollTop:{type:[Number,String],default:0},scrollLeft:{type:[Number,String],default:0},hideVertical:Boolean,hideHorizontal:Boolean,throttle:{type:Number,default:14},resize:Boolean,smallerMoveH:{type:String,default:""},smallerMoveV:{type:String,default:""},biggerMoveH:{type:String,default:""},biggerMoveV:{type:String,default:""}},data:function(){return{initSize:{},moveX:+this.scrollLeft,moveY:+this.scrollTop,scrollThrottle:m(this.throttle),browserHSize:0,browserVSize:0,isScrollNotUseSpace:void 0}},watch:{scrollTop:function(t){this.$refs.container.scrollTop=this.moveY=+t},scrollLeft:function(t){this.$refs.container.scrollLeft=this.moveX=+t},hideVertical:function(t){t||this.$nextTick(this.computeStripY)},hideHorizontal:function(t){t||this.$nextTick(this.computeStripX)}},computed:{contentBorderStyle:function(){return void 0===this.isScrollNotUseSpace?{}:{"border-right":20-this.browserHSize+"px solid transparent","border-bottom":20-this.browserVSize+"px solid transparent"}}},methods:{slideYChange:function(t){this.$refs.container.scrollTop=t,this.$emit("update:scrollTop",this.$refs.container.scrollTop)},slideXChange:function(t){this.$refs.container.scrollLeft=t,this.$emit("update:scrollLeft",this.$refs.container.scrollLeft)},onScroll:function(t){if(!this.scrollThrottle(Date.now()))return!1;this.moveY=t.target.scrollTop,this.moveX=t.target.scrollLeft,this.updateSyncScroll()},initBrowserSize:function(){void 0!==this.isScrollNotUseSpace&&(!0===this.isScrollNotUseSpace?(this.browserHSize=0,this.browserVSize=0):(this.browserHSize=this.$refs.container.offsetWidth-this.$refs.container.clientWidth,this.browserVSize=this.$refs.container.offsetHeight-this.$refs.container.clientHeight))},computeStripX:function(){if(!this.hideHorizontal){var t=this.$refs["happy-scroll"],e=this.$slots.default[0].elm;this.$refs.stripX.computeStrip(e.scrollWidth,t.clientWidth)}},computeStripY:function(){if(!this.hideVertical){var t=this.$refs["happy-scroll"],e=this.$slots.default[0].elm;this.$refs.stripY.computeStrip(e.scrollHeight,t.clientHeight)}},resizeListener:function(){var t=this;if(this.resize){var e=$({strategy:"scroll",callOnAdd:!1}),i=this.$slots.default[0].elm,a=i.clientHeight,o=i.clientWidth;e.listenTo(i,(function(e){t.computeStripX(),t.computeStripY(),t.initBrowserSize();var i=void 0;e.clientHeight<a&&(i=t.smallerMoveH.toLocaleLowerCase()),e.clientHeight>a&&(i=t.biggerMoveH.toLocaleLowerCase()),"start"===i&&(t.moveY=0,t.slideYChange(t.moveY)),"end"===i&&(t.moveY=e.clientHeight,t.slideYChange(t.moveY)),a=e.clientHeight,i="",e.clientWidth<o&&(i=t.smallerMoveV.toLocaleLowerCase()),e.clientWidth>o&&(i=t.biggerMoveV.toLocaleLowerCase()),"start"===i&&(t.moveX=0,t.slideXChange(t.moveX)),"end"===i&&(t.moveX=e.clientWidth,t.slideXChange(t.moveX)),o=e.clientWidth}))}},setContainerSize:function(){this.initSize={width:this.$refs["happy-scroll"].clientWidth+20+"px",height:this.$refs["happy-scroll"].clientHeight+20+"px"}},checkScrollMode:function(){if(void 0===T._happyJS._isScrollNotUseSpace){var t=this.$slots.default[0].elm,e=this.$refs.container;(t.offsetHeight>e.clientHeight||t.offsetWidth>e.clientWidth)&&(e.offsetWidth>e.clientWidth||e.offsetHeight>e.clientHeight?T._happyJS._isScrollNotUseSpace=!1:T._happyJS._isScrollNotUseSpace=!0,this.isScrollNotUseSpace=T._happyJS._isScrollNotUseSpace)}}},beforeCreate:function(){var t=T._happyJS=T._happyJS||{};this.isScrollNotUseSpace=t._isScrollNotUseSpace},created:function(){this.updateSyncScroll=h((function(){this.$emit("update:scrollTop",this.moveY),this.$emit("update:scrollLeft",this.moveX)}),this.throttle)},mounted:function(){var t=this;this.setContainerSize(),this.$nextTick((function(){t.computeStripX(),t.computeStripY(),t.checkScrollMode(),t.initBrowserSize(),t.$nextTick((function(){t.scrollTop&&(t.$refs.container.scrollTop=+t.scrollTop),t.scrollLeft&&(t.$refs.container.scrollLeft=+t.scrollLeft)}))})),this.resizeListener(),this.$watch("browserHSize",this.setContainerSize),this.$watch("browserVSize",this.setContainerSize)}};"undefined"!=typeof window&&window.Vue&&Vue.component("happy-scroll",M);var D={install:function(t){t.component("happy-scroll",M)},version:"2.1.1"};t.default=D,t.HappyScroll=M,t.version="2.1.1",Object.defineProperty(t,"__esModule",{value:!0})}))},"7ab4":function(t,e,i){},"91b67":function(t,e,i){"use strict";var a=i("7ab4"),o=i.n(a);o.a},a254:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAAWCAYAAACL6W/rAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFGmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDYwLCAyMDIwLzA1LzEyLTE2OjA0OjE3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMiAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjAtMTEtMTBUMTU6MzI6MTkrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIwLTExLTEwVDE1OjMyOjUxKzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIwLTExLTEwVDE1OjMyOjUxKzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmZlYzBlOWE3LWE4YTEtNGZmNi05Nzg1LTkwMTViNmJjNzE5OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpmZWMwZTlhNy1hOGExLTRmZjYtOTc4NS05MDE1YjZiYzcxOTgiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpmZWMwZTlhNy1hOGExLTRmZjYtOTc4NS05MDE1YjZiYzcxOTgiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmZlYzBlOWE3LWE4YTEtNGZmNi05Nzg1LTkwMTViNmJjNzE5OCIgc3RFdnQ6d2hlbj0iMjAyMC0xMS0xMFQxNTozMjoxOSswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIxLjIgKE1hY2ludG9zaCkiLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+iB4NtgAABDpJREFUWIXdln1MlVUcxz/neR7QIEYi6VSYqLTSZjgvQi4VtFSwWUSytmaa1h8tw8ra/KuXLVtb/9RmU1ZLcxMr04q8LRlxezFIq2uxgZCvpMQ7oSYvl+c55/THxa53PBCXcGx+/7l7zvmd3/l+f2/nCq016enpu4HHuYFg9P9uAk6MJZHRhgHg9/u7LcsqALrHmM+o4WrGOHbs2Ang6THkMqowrv3w+/17gA/GhsrownJZ2wRkAHOGOhgbA6vvldwxS3FLnKa906DmlMDrM7HtoM3DOZJAn8DrMwb1s3C+Yk6qYvcBiyUZivg4TUmZCcCqpZKpk3SYvSMFzW1QfdKgoUkMX5jf7+/OzMwscBynZrBDqSmKom19aC2oOWnQ3G4w/05J3nLNhjUOG7eOo/0vSJqiKci18f04nu4ed1/Pb7Rp7RC8vx+W3i2ZPi0kbPUyyW0zFKfrQ4GJjwverxR8eMjk7V1RwxMGwX7zeDyDRmPbFpva0ybPvRaFlCFXM5I1xW8FeGWzTeGrUXh9Jo/lOSxbqFyzdvtMzcxkza5PXGkAUFVr8MLr0WFrE+I1G9ZI1j7ocLza5PufBvoevEYGwU3jYdZ0TXmlcY2oIM5dEBz4yiIjTRIbA2f+ENSdFeRmO66+crMlXT3w7VEzIg6dlwTvfWwS6IP0ucrVJmJhPb3Q0i5YvkgSHT1wf2exxfoXx+H0i/b6TBbcpUhMCLcTAlYulpRXmvQGImUBV7oEFy8LYmO0637EwgDe2BnFvNmK/dsDPPmIQ2pKKGo9vVB3RhDoJ3v4OxOlYMXi8PSmz1XcmqDx+iLL1lVkpCkmJ2rOnHeXMHhxD4GKXwwKnhnHA/dJcrIUTz3qcKFJ8HWFyaelJk2toWl18bKg8rjJqmzJvpKQiNxsSWOr4Hj10LGdnAg5WaHARUdpkqdo8lZIGpoNPit1D8yIhAE0tgiKii2KiiElSZGVqbl/qcO6fIdt70RxqDx0oddn8OZWm5QkTX2DIDoali2UfOT97+tnJCkK19n/ftsONLcJDh42KS4x6el1PxexsNgYiI/TNLaEslLfYFDfAHsOmmx5wuHlzTY1pwzOng/aHPnZ5NLfNjlZkqJiiyULFDfHMKwyPPrbwKk4HETcY2mzFV+8GyB5qnvT7thrIqUIm1a2DWUVFrlZwT7LyXKoqhv6gf2/iFhYVa2BVPDQCum6P3ECWKamvTN83eszmTZZsyhdco9HjXhoDBcRl2JXN2zfY/HsBgfDCBJu7RCkTFPMm6PIXyk512Bw9Ndw4tW/C+r/FLxU6KAUlP0wooE8bIxoeOz93MKRsD4/+Ppfhe1A6RGTHXst179QX35jsmmtQ1mFyZWu61eGAEJrjRADL/F4PO5NdO1hAYkJmkkT4fKV4MPd13ddeEaMEY97AK2hrUPQ1jFadEYP17fQxxA3rLB/AInulg8syJa/AAAAAElFTkSuQmCC"},a3ac:function(t,e,i){},c9cc:function(t,e,i){},cb08:function(t,e,i){"use strict";var a=i("a3ac"),o=i.n(a);o.a},cb3d:function(t,e,i){},db20:function(t,e,i){"use strict";var a=i("cb3d"),o=i.n(a);o.a}}]); |