(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8fb8296e"],{"0c89":function(e,t,a){},2835:function(e,t,a){"use strict";var r=a("0c89"),s=a.n(r);s.a},"2b21":function(e,t,a){},"6ea5":function(e,t,a){"use strict";var r=a("798c"),s=a.n(r);s.a},"798c":function(e,t,a){},"919c":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"selectgood"},[a("el-dialog",{attrs:{title:e.title,visible:e.dialogFormVisible,width:"1200px","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.close}},[a("div",{},[a("el-form",{staticClass:"demo-form-inline searchform",attrs:{inline:!0,model:e.formInline,"label-width":"120px"}},[a("div",{staticClass:"mar_b20"},[a("el-form-item",{attrs:{label:"按门店名称:"}},[a("el-input",{staticStyle:{width:"200px"},attrs:{size:"medium",placeholder:"请输入门店名称搜索"},on:{input:e.onSearch},model:{value:e.formInline.keyword,callback:function(t){e.$set(e.formInline,"keyword",t)},expression:"formInline.keyword"}})],1),a("el-form-item",{attrs:{label:"按门店类别:"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.onSearch},model:{value:e.formInline.type,callback:function(t){e.$set(e.formInline,"type",t)},expression:"formInline.type"}},e._l(e.typeOptions,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{staticClass:"mar_l20",attrs:{label:"按门店区域:"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.onSearch},model:{value:e.formInline.areaId,callback:function(t){e.$set(e.formInline,"areaId",t)},expression:"formInline.areaId"}},e._l(e.qyOptions,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{staticClass:"mar_t20",attrs:{label:"按门店分组:"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.onSearch},model:{value:e.formInline.typeId,callback:function(t){e.$set(e.formInline,"typeId",t)},expression:"formInline.typeId"}},e._l(e.fzOptions,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{staticClass:"mar_t20",attrs:{label:"按门店标签:"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.onSearch},model:{value:e.formInline.label,callback:function(t){e.$set(e.formInline,"label",t)},expression:"formInline.label"}},e._l(e.labelOptions,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{staticClass:"mar_t20"},[a("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.onSearch}},[e._v("搜索")])],1)],1)]),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list,stripe:""},on:{"selection-change":e.setSelectRows}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{prop:"name",label:"商家名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex flex-y-top"},[a("div",{},[a("img",{staticClass:"goodlogo bor_rad5",attrs:{src:t.row.icon}})]),a("div",{staticClass:"mar_l10"},[a("div",{staticClass:"flex"},[a("div",{},[e._v(e._s(t.row.name))]),a("el-tag",{staticClass:"mar_l5",attrs:{size:"mini",type:"info"}},[e._v("(ID:"+e._s(t.row.id)+")")])],1)])])]}}])}),a("el-table-column",{attrs:{prop:"address",label:"门店地址&联系电话",width:"400"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.address))]),a("div",[e._v(e._s(t.row.storeTel))])]}}])})],1),a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.page.total,"page-size":e.page.pagesize,"current-page":e.page.currentPage},on:{"update:currentPage":function(t){return e.$set(e.page,"currentPage",t)},"update:current-page":function(t){return e.$set(e.page,"currentPage",t)},"current-change":e.handleCurrentChange}})],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"medium"},on:{click:e.close}},[e._v("取 消")]),a("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)])],1)},s=[],o=(a("99af"),a("d81d"),a("96cf"),a("1da1")),i=a("e692"),n={name:"labelSave",created:function(){},data:function(){return{formInline:{keyword:"",typeId:"",type:"",areaId:"",label:""},title:"",dialogFormVisible:!1,list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1},typeOptions:[{id:"0",name:"全部"},{id:"1",name:"直营店"},{id:"2",name:"加盟店"}],qyOptions:[],fzOptions:[],labelOptions:[],storeIds:[],storeId:""}},components:{},methods:{init:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,r,s,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={page:e.page.currentPage,typeId:e.formInline.typeId,keyword:e.formInline.keyword,type:e.formInline.type,areaId:e.formInline.areaId,label:e.formInline.label,storeIds:e.storeIds},t.next=3,Object(i["q"])(a);case 3:r=t.sent,s=r.data,o=r.count,e.list=s,e.page.total=o;case 8:case"end":return t.stop()}}),t)})))()},onSearch:function(){this.init()},setStoreId:function(e){this.storeId=e},handleCurrentChange:function(e){this.page.currentPage=e,this.init()},setSelectRows:function(e){this.selectRows=e},selectStoreCategory:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["u"])();case 2:a=t.sent,r=a.data,e.qyOptions=r.area?r.area:[],e.fzOptions=r.type?r.type:[],e.labelOptions=r.label?r.label:[];case 7:case"end":return t.stop()}}),t)})))()},search:function(){this.init()},showEdit:function(e){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:e?(t.title="编辑门店",console.log(e,t.storeIds),t.storeIds=e,t.init(),t.selectStoreCategory()):(t.title="选择门店",t.init(),t.selectStoreCategory()),t.dialogFormVisible=!0;case 2:case"end":return a.stop()}}),a)})))()},close:function(){this.dialogFormVisible=!1},save:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,r,s,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(e.selectRows.length>0)){t.next=12;break}return a=e.selectRows.map((function(e){return e.id})),e.storeIds&&(r=a.concat(e.storeIds)),t.next=5,Object(i["q"])({ids:r});case 5:s=t.sent,s.msg,o=s.data,e.$emit("fetchData",o),e.close(),t.next=14;break;case 12:return e.$baseMessage("未选中任何门店","error"),t.abrupt("return",!1);case 14:case"end":return t.stop()}}),t)})))()}}},l=n,c=(a("a552"),a("2877")),u=Object(c["a"])(l,r,s,!1,null,null,null);t["a"]=u.exports},a434:function(e,t,a){"use strict";var r=a("23e7"),s=a("23cb"),o=a("a691"),i=a("50c4"),n=a("7b0b"),l=a("65f0"),c=a("8418"),u=a("1dde"),d=a("ae40"),m=u("splice"),f=d("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,b=Math.min,g=9007199254740991,h="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!m||!f},{splice:function(e,t){var a,r,u,d,m,f,v=n(this),y=i(v.length),x=s(e,y),_=arguments.length;if(0===_?a=r=0:1===_?(a=0,r=y-x):(a=_-2,r=b(p(o(t),0),y-x)),y+a-r>g)throw TypeError(h);for(u=l(v,r),d=0;dy-r+a;d--)delete v[d-1]}else if(a>r)for(d=y-r;d>x;d--)m=d+r-1,f=d+a-1,m in v?v[f]=v[m]:delete v[f];for(d=0;d0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="none"},leave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="inline-block"},test:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["img"+e].dialogVisible=!0},imgadd1:function(e){this.form.shareImg=e.str},deleteMultiImage:function(e,t,a){if(Array.prototype.remove=function(e){var t=this.indexOf(e);t>-1&&this.splice(t,1)},"multigraph"==a)switch(t){case 2:this.form2.environment.remove(e);break}else switch(t){case 1:this.form.shareImg="";break}},handleEdit:function(e){e.id?this.$refs["edit"].showEdit(e):this.$refs["edit"].showEdit()},getUeditor:function(e){this.form.details=e},init:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["Ec"])();case 2:a=t.sent,r=a.data,e.typeOptions=r.category?r.category:[],e.labelOptions=r.label?r.label:[];case 6:case"end":return t.stop()}}),t)})))()},edit:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["Ec"])({id:e.id});case 2:a=t.sent,r=a.data,Object.assign(e.form,r),"2"!=r.goodsType&&"3"!=r.goodsType||(e.tableData3=r.goodsArr?r.goodsArr:[]),"4"==r.goodsType&&(e.goodsArr=r.goodsArr?r.goodsArr:[]),"3"==r.memberType&&(e.memberLabel=r.memberLabel?r.memberLabel:[]),r.storeInfo&&(e.shopTable=r.storeInfo?r.storeInfo:[]);case 9:case"end":return t.stop()}}),t)})))()},addgood:function(e){if(e){var t=e.map((function(e){return e.id}));this.$refs["edit"].showEdit(t)}else this.$refs["edit"].showEdit();this.$refs["edit"].isSpec("")},addshop:function(e){if(e){var t=e.map((function(e){return e.id}));this.$refs["ShopEdit"].showEdit(t)}else this.$refs["ShopEdit"].showEdit()},submitForm:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs["form"].validate(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(a){var r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=12;break}return e.form.type=e.type,"2"!=e.form.goodsType&&"3"!=e.form.goodsType||e.tableData3&&(e.form.goodsArr=e.tableData3.map((function(e){return e.id}))),"4"==e.form.goodsType&&(e.form.goodsArr=e.goodsArr),"3"==e.form.memberType&&(e.form.memberLabel=e.memberLabel),e.shopTable&&(e.form.storeArr=e.shopTable.map((function(e){return e.id}))),t.next=8,Object(i["Gc"])(e.form);case 8:r=t.sent,s=r.msg,e.$baseMessage(s,"success"),e.$router.go(-1);case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}},m=d,f=(a("2835"),a("2877")),p=Object(f["a"])(m,r,s,!1,null,null,null);t["default"]=p.exports},df58:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"selectgood"},[a("el-dialog",{attrs:{title:e.title,visible:e.dialogFormVisible,width:"1000px","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.close}},[a("div",{staticClass:"flex-bet flex-y-top selected"},[a("div",{staticClass:"flex-g-0 leftType"},[a("el-scrollbar",[a("div",{staticClass:"leftborder",staticStyle:{"max-height":"600px"}},e._l(e.categoryList,(function(t,r){return a("p",{key:r,staticClass:"curs pad_l_10 lh40",class:{current:r==e.current},on:{click:function(a){return e.clickCategory(r,t)}}},[e._v(e._s(t.name))])})),0)])],1),a("div",{staticClass:"flex-g-1"},[a("div",{staticClass:"search mar_b20 mar_l10"},[a("div",{staticClass:"filter_wrapper_edit flex"},[a("div",{staticClass:"flex"},[a("el-input",{staticClass:"elinput",attrs:{placeholder:"请输入商品名称"},model:{value:e.goodName,callback:function(t){e.goodName=t},expression:"goodName"}})],1),a("el-button",{staticClass:"mar_l20",attrs:{type:"primary",size:"medium"},on:{click:function(t){return e.search()}}},[e._v("搜索")])],1)]),a("div",[a("el-scrollbar",[a("div",{staticClass:"wid flex flex-wrap",staticStyle:{"max-height":"600px"}},e._l(e.goodList,(function(t,r){return a("div",{key:r,staticClass:"goods flex-bet"},[a("div",{staticClass:"flex-g-0"},[a("el-image",{staticStyle:{width:"90px",height:"80px","border-radius":"10px"},attrs:{src:t.icon,fit:"cover"}})],1),a("div",{staticClass:"pad_l_10 flex-g-1"},[a("div",{staticClass:"fon_12 color_6"},[e._v(e._s(t.name))]),1==t.goodsType?a("el-tag",{staticClass:"mar_t10",attrs:{size:"mini",type:"success",effect:"dark"}},[e._v("外卖")]):e._e(),2==t.goodsType?a("el-tag",{staticClass:"mar_t10",attrs:{size:"mini",type:"",effect:"dark"}},[e._v("店内")]):e._e(),a("div",{staticClass:"flex-bet mar_t10"},[a("div",{staticClass:"color_f6c"},[e._v("库存:"+e._s(t.stock))]),a("div",[1==t.type?a("el-button",{attrs:{size:"mini",round:""},on:{click:function(a){return e.open(t,r)}}},[e._v("选取")]):a("el-button",{attrs:{size:"mini",round:"",type:"primary"},on:{click:function(a){return e.open(t,r)}}},[e._v("取消")])],1)])],1)])})),0)])],1)])]),a("div",{staticStyle:{"margin-left":"190px"}},[a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.page.total,"page-size":e.page.pagesize,"current-page":e.page.currentPage},on:{"update:currentPage":function(t){return e.$set(e.page,"currentPage",t)},"update:current-page":function(t){return e.$set(e.page,"currentPage",t)},"current-change":e.handleCurrentChange}})],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"medium"},on:{click:e.close}},[e._v("取 消")]),a("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)])],1)},s=[],o=(a("b0c0"),a("96cf"),a("1da1")),i=a("5530"),n=a("7cb7"),l=a("2f62"),c={name:"labelSave",created:function(){},computed:Object(i["a"])({},Object(l["d"])(["storeData"])),data:function(){return{title:"",goodName:"",dialogFormVisible:!1,yhtableData:[],selection:"选取",list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1},tableData3:[],tableData4:[],ids:[],category:"",categoryList:[],goodList:[],current:0,storeId:"",isSpecs:"",goodsType:"",startTime:"",endTime:"",goodsInfo:"",danxuan:""}},components:{},methods:{goodType:function(e){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function a(){var r,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(n["xc"])({item:e,storeId:t.storeId,goodsInfo:t.goodsInfo});case 2:r=a.sent,s=r.data,t.categoryList=s||[],t.categoryList.unshift({id:"",name:"全部"});case 6:case"end":return a.stop()}}),a)})))()},clickCategory:function(e,t){this.current=e,this.category=t.id,this.init()},init:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(n["wc"])({startTime:e.startTime,endTime:e.endTime,goodsType:e.goodsType,page:e.page.currentPage,keyword:e.goodName,idArr:e.ids,typeId:e.category,isSpecs:e.isSpecs,goodsInfo:e.goodsInfo,storeId:e.storeId,goodsModel:e.storeData.goodsModel});case 2:a=t.sent,r=a.data,s=a.count,e.goodList=r||[],e.page.total=s;case 7:case"end":return t.stop()}}),t)})))()},setStoreId:function(e){this.storeId=e},handleCurrentChange:function(e){this.page.currentPage=e,this.init()},search:function(){this.init()},showEdit:function(e,t,a,r){var s=this;return Object(o["a"])(regeneratorRuntime.mark((function o(){return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:s.goodsType=t||"",a&&(s.startTime=s.$moment(a[0]).format("YYYY-MM-DD HH:mm:ss"),s.endTime=s.$moment(new Date(a[1])).format("YYYY-MM-DD HH:mm:ss")),console.log(s.startTime),console.log(s.endTime),s.goodType(r),e?(s.title="编辑商品",s.ids=e,s.init()):s.title="添加商品",s.dialogFormVisible=!0;case 7:case"end":return o.stop()}}),o)})))()},isSpec:function(e){this.isSpecs=e},isGoodsInfo:function(e){this.goodsInfo=e},isDanXuan:function(e){this.danxuan=e},open:function(e,t){if(1==e.type){this.goodList[t].type=2;var a={name:e.name,stock:e.stock,price:e.price,icon:e.icon,id:e.id,type:e.type};"1"==this.goodsInfo?this.$set(this.tableData3,this.tableData3.length,a):"2"==this.goodsInfo?this.$set(this.tableData4,this.tableData4.length,a):this.$set(this.tableData3,this.tableData3.length,a)}else this.goodList[t].type=1;"1"==this.danxuan&&(this.dialogFormVisible=!1,this.save())},close:function(){this.dialogFormVisible=!1},save:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:"1"==e.goodsInfo?e.$emit("fetchData",e.tableData3):"2"==e.goodsInfo?e.$emit("fetchData2",e.tableData4):e.$emit("fetchData",e.tableData3),e.close();case 2:case"end":return t.stop()}}),t)})))()}}},u=c,d=(a("6ea5"),a("2877")),m=Object(d["a"])(u,r,s,!1,null,null,null);t["a"]=m.exports}}]);