1 line
42 KiB
JavaScript
1 line
42 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6bd89961"],{"0fe3":function(e,t,a){"use strict";var r=a("5545"),i=a.n(r);i.a},"129f":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},1969:function(e,t,a){},2911:function(e,t,a){},2948:function(e,t,a){"use strict";var r=a("2911"),i=a.n(r);i.a},"3bbe":function(e,t,a){var r=a("861d");e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},5545:function(e,t,a){},7156:function(e,t,a){var r=a("861d"),i=a("d2bb");e.exports=function(e,t,a){var s,n;return i&&"function"==typeof(s=t.constructor)&&s!==a&&r(n=s.prototype)&&n!==a.prototype&&i(e,n),e}},"73f0":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"selectmap",attrs:{id:"container"}})},i=[],s=(a("a9e3"),a("ac1f"),a("841c"),{name:"selectmap",props:{mapLng:{type:Number,default:114.304692},mapLat:{type:Number,default:30.59331},mapAddress:{type:String,default:""}},data:function(){return{markersArray:[],searchService:""}},created:function(){var e=this;setTimeout((function(){e.init()}),1e3)},methods:{init:function(){var e=this,t=new qq.maps.Map(document.getElementById("container"),{center:new qq.maps.LatLng(e.mapLat?e.mapLat:30.59331,e.mapLng?e.mapLng:114.304692),zoom:13}),a=new qq.maps.Marker({position:new qq.maps.LatLng(e.mapLat?e.mapLat:30.59331,e.mapLng?e.mapLng:114.304692),draggable:!0,map:t});qq.maps.event.addListener(a,"dragend",(function(t){console.log(t);var a=t.latLng.lat,r=t.latLng.lng;e.$api.get("channel/shop/map",{lat:e.mapLat,lng:e.mapLng},(function(t){if(0==t.status){var i=t.result.address;e.$emit("clickmap",i,a,r)}}))})),e.$set(e.markersArray,0,a),qq.maps.event.addListener(t,"click",(function(a){e.deleteOverlays();var r=new qq.maps.Marker({position:a.latLng,draggable:!0,map:t});e.$set(e.markersArray,1,r),console.log(a);var i=a.latLng.lat,s=a.latLng.lng;e.$api.get("channel/shop/map",{lat:i,lng:s},(function(t){if(0==t.status){var a=t.result.address;e.$emit("clickmap",a,i,s)}})),qq.maps.event.addListener(r,"dragend",(function(t){var a=t.latLng.lat,r=t.latLng.lng;e.$api.get("channel/shop/map",{lat:a,lng:r},(function(t){if(0==t.status){var i=t.result.address;e.$emit("clickmap",i,a,r)}}))}))}));var r=new qq.maps.LatLngBounds,i=new qq.maps.SearchService({location:"北京",pageIndex:1,pageCapacity:1,autoExtend:!0,complete:function(a){for(var i=a.detail.pois,s=0,n=i.length;s<n;s++){var o=i[s];r.extend(o.latLng);var l=new qq.maps.Marker({map:t,draggable:!0,position:o.latLng});l.setTitle(s+1),e.$set(e.markersArray,2,l)}t.fitBounds(r);var c=a.detail.pois[0].latLng.lat,m=a.detail.pois[0].latLng.lng;e.$api.get("channel/shop/map",{lat:c,lng:m},(function(t){if(0==t.status){t.result.address;e.$emit("clickmap",e.mapAddress,c,m)}})),qq.maps.event.addListener(l,"dragend",(function(t){var a=t.latLng.lat,r=t.latLng.lng;e.$api.get("channel/shop/map",{lat:a,lng:r},(function(t){if(0==t.status){var i=t.result.address;e.$emit("clickmap",i,a,r)}}))}))}});this.searchService=i},deleteOverlays:function(){if(this.markersArray){for(var e in this.markersArray)this.markersArray[e].setMap(null);this.markersArray.length=0}},searchKeyword:function(){this.deleteOverlays(),this.searchService.setPageCapacity(1),this.searchService.setPageIndex(0),this.searchService.search(this.mapAddress)}}}),n=s,o=(a("af6c"),a("2877")),l=Object(o["a"])(n,r,i,!1,null,null,null);t["a"]=l.exports},"841c":function(e,t,a){"use strict";var r=a("d784"),i=a("825a"),s=a("1d80"),n=a("129f"),o=a("14c3");r("search",1,(function(e,t,a){return[function(t){var a=s(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,a):new RegExp(t)[e](String(a))},function(e){var r=a(t,e,this);if(r.done)return r.value;var s=i(e),l=String(this),c=s.lastIndex;n(c,0)||(s.lastIndex=0);var m=o(s,l);return n(s.lastIndex,c)||(s.lastIndex=c),null===m?-1:m.index}]}))},a434:function(e,t,a){"use strict";var r=a("23e7"),i=a("23cb"),s=a("a691"),n=a("50c4"),o=a("7b0b"),l=a("65f0"),c=a("8418"),m=a("1dde"),d=a("ae40"),u=m("splice"),f=d("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,g=Math.min,h=9007199254740991,v="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!u||!f},{splice:function(e,t){var a,r,m,d,u,f,b=o(this),y=n(b.length),k=i(e,y),x=arguments.length;if(0===x?a=r=0:1===x?(a=0,r=y-k):(a=x-2,r=g(p(s(t),0),y-k)),y+a-r>h)throw TypeError(v);for(m=l(b,r),d=0;d<r;d++)u=k+d,u in b&&c(m,d,b[u]);if(m.length=r,a<r){for(d=k;d<y-r;d++)u=d+r,f=d+a,u in b?b[f]=b[u]:delete b[f];for(d=y;d>y-r+a;d--)delete b[d-1]}else if(a>r)for(d=y-r;d>k;d--)u=d+r-1,f=d+a-1,u in b?b[f]=b[u]:delete b[f];for(d=0;d<a;d++)b[d+k]=arguments[d+2];return b.length=y-r+a,m}})},a9e3:function(e,t,a){"use strict";var r=a("83ab"),i=a("da84"),s=a("94ca"),n=a("6eeb"),o=a("5135"),l=a("c6b6"),c=a("7156"),m=a("c04e"),d=a("d039"),u=a("7c73"),f=a("241c").f,p=a("06cf").f,g=a("9bf2").f,h=a("58a8").trim,v="Number",b=i[v],y=b.prototype,k=l(u(y))==v,x=function(e){var t,a,r,i,s,n,o,l,c=m(e,!1);if("string"==typeof c&&c.length>2)if(c=h(c),t=c.charCodeAt(0),43===t||45===t){if(a=c.charCodeAt(2),88===a||120===a)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(s=c.slice(2),n=s.length,o=0;o<n;o++)if(l=s.charCodeAt(o),l<48||l>i)return NaN;return parseInt(s,r)}return+c};if(s(v,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var _,L=function(e){var t=arguments.length<1?0:e,a=this;return a instanceof L&&(k?d((function(){y.valueOf.call(a)})):l(a)!=v)?c(new b(x(t)),a,L):x(t)},w=r?f(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;w.length>C;C++)o(b,_=w[C])&&!o(L,_)&&g(L,_,p(b,_));L.prototype=y,y.constructor=L,n(i,v,L)}},af6c:function(e,t,a){"use strict";var r=a("1969"),i=a.n(r);i.a},c8f1:function(e,t,a){},d2bb:function(e,t,a){var r=a("825a"),i=a("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,a={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(a,[]),t=a instanceof Array}catch(s){}return function(a,s){return r(a),i(s),t?e.call(a,s):a.__proto__=s,a}}():void 0)},dad0:function(e,t,a){"use strict";var r=a("c8f1"),i=a.n(r);i.a},df95:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"outmain ba_f shopadd"},[a("div",{staticClass:"maintitle"},[e._v("门店信息")]),a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"基本信息",name:"1"}},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"门店名称",required:!0,prop:"name"}},[a("el-input",{staticStyle:{width:"400px"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.form.id,expression:"form.id"}],attrs:{label:"门店ID"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{disabled:""},model:{value:e.form.id,callback:function(t){e.$set(e.form,"id",t)},expression:"form.id"}}),a("el-button",{staticClass:"mar_l10",on:{click:function(t){return e.copyText(e.form.id)}}},[e._v("复制")])],1),a("el-form-item",{attrs:{label:"门店LOGO",required:!0}},[e.form.icon?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("span",{staticClass:"curs ab closeicon",attrs:{title:"删除这张图片"},on:{click:function(t){return e.deleteMultiImage(e.form.icon,1)}}},[a("i",{staticClass:"el-icon-circle-close fon_14 color_3"})]),a("img",{staticClass:"wid",attrs:{src:e.form.icon},on:{click:function(t){return e.test(1)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(1)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})])]),a("el-form-item",{attrs:{label:"联系人",required:!0,prop:"storeLinkMan"}},[a("el-input",{staticStyle:{width:"400px"},model:{value:e.form.storeLinkMan,callback:function(t){e.$set(e.form,"storeLinkMan",t)},expression:"form.storeLinkMan"}})],1),a("el-form-item",{attrs:{label:"门店电话",required:!0,prop:"storeTel"}},[a("el-input",{staticStyle:{width:"400px"},model:{value:e.form.storeTel,callback:function(t){e.$set(e.form,"storeTel",t)},expression:"form.storeTel"}})],1),a("el-form-item",{attrs:{label:"所属区域",required:!0}},[a("el-cascader",{attrs:{options:e.data,size:"medium",filterable:""},on:{change:e.cascaderChange},model:{value:e.form.cityArr,callback:function(t){e.$set(e.form,"cityArr",t)},expression:"form.cityArr"}})],1),a("el-form-item",{attrs:{label:"门店类别",required:!0}},[a("el-radio-group",{model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[a("el-radio",{attrs:{label:"1"}},[e._v("直营店")]),a("el-radio",{attrs:{label:"2"}},[e._v("加盟店")])],1)],1),a("el-form-item",{attrs:{label:"商品模式",required:!0}},[e.id?a("el-radio-group",{model:{value:e.form.goodsModel,callback:function(t){e.$set(e.form,"goodsModel",t)},expression:"form.goodsModel"}},[a("el-radio",{attrs:{label:"1",disabled:"1"!=e.BdgoodsModel,border:""}},[e._v("模式一:同步总店商品")]),a("el-radio",{attrs:{label:"2",disabled:"1"!=e.BdgoodsModel,border:""}},[e._v("模式二:同步总店商品")]),a("el-radio",{attrs:{label:"3",disabled:"",border:""}},[e._v("模式三:超级商品权限")])],1):a("el-radio-group",{model:{value:e.form.goodsModel,callback:function(t){e.$set(e.form,"goodsModel",t)},expression:"form.goodsModel"}},[a("el-radio",{attrs:{label:"1",border:""}},[e._v("模式一:同步总店商品")]),a("el-radio",{attrs:{label:"2",border:""}},[e._v("模式二:同步总店商品")]),a("el-radio",{attrs:{label:"3",border:""}},[e._v("模式三:超级商品权限")])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.goodsModel,expression:"form.goodsModel=='1'"}],staticClass:"yb_margin lh16 mar_t10"},[e._v("商品模式一:实时同步总店商品,可自行修改库存和商品上下架权限")]),a("div",{directives:[{name:"show",rawName:"v-show",value:"2"==e.form.goodsModel,expression:"form.goodsModel=='2'"}],staticClass:"yb_margin lh16 mar_t10"},[e._v("商品模式二:实时同步总店商品,可自行修改库存、价格和商品上下架权限")]),a("div",{directives:[{name:"show",rawName:"v-show",value:"3"==e.form.goodsModel,expression:"form.goodsModel=='3'"}],staticClass:"yb_margin lh16 mar_t10"},[e._v("商品模式三:自定义添加商品和商品分类,与总店商品无关")]),a("div",{staticClass:"color-red"},[a("span",{staticClass:"wei"},[e._v("温馨提示:")]),e._v("门店商品模式一旦选择后,请勿随意修改,以免造成门店商品数据错乱(商品模式一可升级到商品模式二,商品模式二和商品模式三一旦确定后将不可修改) ")])],1),a("el-form-item",{attrs:{label:"详细地址",required:!0}},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入地址"},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}},[a("el-button",{attrs:{slot:"append"},on:{click:e.searchMapClick},slot:"append"},[e._v("搜索")])],1)],1),a("el-form-item",{attrs:{label:"店铺经纬度",required:!0}},[a("el-input",{staticStyle:{width:"130px"},attrs:{disabled:""},model:{value:e.form.lng,callback:function(t){e.$set(e.form,"lng",t)},expression:"form.lng"}}),a("el-input",{staticClass:"mar_l20",staticStyle:{width:"130px"},attrs:{disabled:""},model:{value:e.form.lat,callback:function(t){e.$set(e.form,"lat",t)},expression:"form.lat"}})],1),a("el-form-item",{attrs:{label:"地图定位",required:!0}},[a("div",[a("select-map",{ref:"mapCom",attrs:{mapLng:+e.form.lng,mapLat:+e.form.lat,mapAddress:e.form.address},on:{clickmap:e.getMapdata}})],1)])],1)],1),a("el-tab-pane",{attrs:{label:"门店信息",name:"2"}},[a("el-form",{ref:"form2",attrs:{model:e.form2,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"门店分组",required:!0}},[a("el-select",{attrs:{placeholder:"请选择门店所属分组"},model:{value:e.form2.typeId,callback:function(t){e.$set(e.form2,"typeId",t)},expression:"form2.typeId"}},e._l(e.typeList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),a("div",{staticClass:"yb_margin lh16"},[e._v("请选择门店所属分组,可按照分组统一设置抽佣比率以及活动类型")])],1),a("el-form-item",{attrs:{label:"门店区域",required:!0}},[a("el-select",{attrs:{placeholder:"请选择门店所属区域"},model:{value:e.form2.areaId,callback:function(t){e.$set(e.form2,"areaId",t)},expression:"form2.areaId"}},e._l(e.arealList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),a("div",{staticClass:"yb_margin lh16"},[e._v("请选择门店所属区域,可按照区域统一设置抽佣比率以及活动类型")])],1),a("el-form-item",{attrs:{label:"门店标签"}},[a("el-radio-group",{model:{value:e.form2.label,callback:function(t){e.$set(e.form2,"label",t)},expression:"form2.label"}},e._l(e.labelList,(function(t){return a("el-radio",{key:t.id,attrs:{label:t.id}},[e._v(e._s(t.name))])})),1)],1),a("el-form-item",{attrs:{label:"门店简介",required:!0}},[a("el-input",{staticStyle:{width:"400px"},attrs:{type:"textarea",placeholder:"请输入门店简介"},model:{value:e.form2.introduction,callback:function(t){e.$set(e.form2,"introduction",t)},expression:"form2.introduction"}})],1),a("el-form-item",{attrs:{label:"主营产品",required:!0}},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入主营产品"},model:{value:e.form2.mainDishes,callback:function(t){e.$set(e.form2,"mainDishes",t)},expression:"form2.mainDishes"}})],1),a("el-form-item",{attrs:{label:"人均消费",required:!0}},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入人均消费"},model:{value:e.form2.perCapita,callback:function(t){e.$set(e.form2,"perCapita",t)},expression:"form2.perCapita"}},[a("template",{slot:"append"},[e._v("元")])],2)],1),a("el-form-item",{attrs:{label:"商家环境"}},[e._l(e.form2.environment,(function(t,r){return a("div",{key:r,staticClass:"uploadSource bor_de rel flex"},[a("span",{staticClass:"curs ab closeicon",attrs:{title:"删除这张图片"},on:{click:function(a){return e.deleteMultiImage(t,2,"multigraph")}}},[a("i",{staticClass:"el-icon-circle-close fon_14 color_3"})]),a("img",{staticClass:"wid img",attrs:{src:t},on:{click:function(t){return e.test(2)}}})])})),a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(2)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})])],2),a("el-form-item",{attrs:{label:"商品安全档案",required:!0}},[e._l(e.form2.foodRecords,(function(t,r){return a("div",{key:r,staticClass:"uploadSource bor_de rel flex"},[a("span",{staticClass:"curs ab closeicon",attrs:{title:"删除这张图片"},on:{click:function(a){return e.deleteMultiImage(t,3,"multigraph")}}},[a("i",{staticClass:"el-icon-circle-close fon_14 color_3"})]),a("img",{staticClass:"wid img",attrs:{src:t},on:{click:function(t){return e.test(3)}}})])})),a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(3)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})])],2),a("el-form-item",{attrs:{label:"营业执照",required:!0}},[e._l(e.form2.license,(function(t,r){return a("div",{key:r,staticClass:"uploadSource bor_de rel flex"},[a("span",{staticClass:"curs ab closeicon",attrs:{title:"删除这张图片"},on:{click:function(a){return e.deleteMultiImage(t,4,"multigraph")}}},[a("i",{staticClass:"el-icon-circle-close fon_14 color_3"})]),a("img",{staticClass:"wid img",attrs:{src:t},on:{click:function(t){return e.test(4)}}})])})),a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(4)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})])],2)],1)],1),a("el-tab-pane",{attrs:{label:"账号密码",name:"4"}},[a("el-form",{ref:"form4",attrs:{model:e.form4,rules:e.rules4,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"登录账号",prop:"userName",required:""}},[a("el-input",{attrs:{autocomplete:"off",placeholder:"请输入登录账号"},model:{value:e.form4.userName,callback:function(t){e.$set(e.form4,"userName",t)},expression:"form4.userName"}})],1),a("el-form-item",{attrs:{label:"登录密码",prop:"password",required:""}},[a("el-input",{attrs:{type:"password",autocomplete:"off",placeholder:"请输入登录密码"},model:{value:e.form4.password,callback:function(t){e.$set(e.form4,"password",t)},expression:"form4.password"}})],1),a("el-form-item",{attrs:{label:"绑定手机号",prop:"bindTel",required:""}},[a("el-input",{attrs:{autocomplete:"off",placeholder:"请输入绑定手机号"},model:{value:e.form4.bindTel,callback:function(t){e.$set(e.form4,"bindTel",t)},expression:"form4.bindTel"}})],1),e.app?a("el-form-item",{attrs:{label:"关联微信管理员"}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择关联微信管理员"},model:{value:e.form4.merchantId,callback:function(t){e.$set(e.form4,"merchantId",t)},expression:"form4.merchantId"}},e._l(e.merchantUser,(function(e){return a("el-option",{key:e.id,attrs:{label:e.userName+"(ID:"+e.id+")",value:e.id}})})),1)],1):e._e()],1)],1),a("el-tab-pane",{attrs:{label:"提现方式",name:"5"}},[a("el-form",{ref:"form5",attrs:{model:e.form5,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"提现方式"}},[a("el-radio-group",{model:{value:e.form5.type,callback:function(t){e.$set(e.form5,"type",t)},expression:"form5.type"}},[e.form5.channel&&e.form5.channel.indexOf("1")>=0?a("el-radio",{attrs:{label:"1"}},[e._v("微信")]):e._e(),e.form5.channel&&e.form5.channel.indexOf("2")>=0?a("el-radio",{attrs:{label:"2"}},[e._v("支付宝")]):e._e(),e.form5.channel&&e.form5.channel.indexOf("3")>=0?a("el-radio",{attrs:{label:"3"}},[e._v("银行卡")]):e._e(),e.form5.channel&&e.form5.channel.indexOf("1")<0&&e.form5.channel&&e.form5.channel.indexOf("2")<0&&e.form5.channel&&e.form5.channel.indexOf("3")<0?[a("el-radio",{attrs:{label:"1"}},[e._v("微信")]),a("el-radio",{attrs:{label:"2"}},[e._v("支付宝")]),a("el-radio",{attrs:{label:"3"}},[e._v("银行卡")])]:e._e()],2)],1),"1"==e.form5.type?a("div",[a("el-form-item",{attrs:{label:"手机号"}},[a("el-input",{attrs:{placeholder:"请输入手机号"},model:{value:e.form5.wxTel,callback:function(t){e.$set(e.form5,"wxTel",t)},expression:"form5.wxTel"}})],1),a("el-form-item",{attrs:{label:"用户ID"}},[a("el-input",{attrs:{placeholder:"请输入用户Id"},model:{value:e.form5.userId,callback:function(t){e.$set(e.form5,"userId",t)},expression:"form5.userId"}}),a("el-button",{staticClass:"mar_l20",on:{click:e.onSearch}},[e._v("搜索")]),a("div",{staticClass:"yb_margin lh16"},[e._v("*为了打款成功,请真实的填写您的用户ID号 当前绑定微信昵称:"+e._s(e.wName))])],1),a("el-form-item",{attrs:{label:"微信收款码图片"}},[e.form5.wxImg?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("span",{staticClass:"curs ab closeicon",attrs:{title:"删除这张图片"},on:{click:function(t){return e.deleteMultiImage(e.form5.wxImg,5)}}},[a("i",{staticClass:"el-icon-circle-close fon_14 color_3"})]),a("img",{staticClass:"wid",attrs:{src:e.form5.wxImg},on:{click:function(t){return e.test(5)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(5)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})])])],1):e._e(),"2"==e.form5.type?a("div",[a("el-form-item",{attrs:{label:"手机号"}},[a("el-input",{attrs:{placeholder:"请输入手机号"},model:{value:e.form5.aliTel,callback:function(t){e.$set(e.form5,"aliTel",t)},expression:"form5.aliTel"}})],1),a("el-form-item",{attrs:{label:"支付宝账号"}},[a("el-input",{attrs:{placeholder:"请输入支付宝账号"},model:{value:e.form5.aliAccount,callback:function(t){e.$set(e.form5,"aliAccount",t)},expression:"form5.aliAccount"}})],1),a("el-form-item",{attrs:{label:"支付宝真实姓名"}},[a("el-input",{attrs:{placeholder:"请输入支付宝真实姓名"},model:{value:e.form5.aliUserName,callback:function(t){e.$set(e.form5,"aliUserName",t)},expression:"form5.aliUserName"}})],1),a("el-form-item",{attrs:{label:"支付宝收款码图片"}},[e.form5.aliImg?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("span",{staticClass:"curs ab closeicon",attrs:{title:"删除这张图片"},on:{click:function(t){return e.deleteMultiImage(e.form5.aliImg,6)}}},[a("i",{staticClass:"el-icon-circle-close fon_14 color_3"})]),a("img",{staticClass:"wid",attrs:{src:e.form5.aliImg},on:{click:function(t){return e.test(6)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(6)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})])])],1):e._e(),"3"==e.form5.type?a("div",[a("el-form-item",{attrs:{label:"手机号"}},[a("el-input",{attrs:{placeholder:"请输入手机号"},model:{value:e.form5.bankTel,callback:function(t){e.$set(e.form5,"bankTel",t)},expression:"form5.bankTel"}})],1),a("el-form-item",{attrs:{label:"银行卡号"}},[a("el-input",{attrs:{placeholder:"请输入银行卡号"},model:{value:e.form5.bankAccount,callback:function(t){e.$set(e.form5,"bankAccount",t)},expression:"form5.bankAccount"}})],1),a("el-form-item",{attrs:{label:"所属银行"}},[a("el-input",{attrs:{placeholder:"请输入所属银行"},model:{value:e.form5.bankName,callback:function(t){e.$set(e.form5,"bankName",t)},expression:"form5.bankName"}})],1),a("el-form-item",{attrs:{label:"所属支行"}},[a("el-input",{attrs:{placeholder:"请输入所属支行"},model:{value:e.form5.subBank,callback:function(t){e.$set(e.form5,"subBank",t)},expression:"form5.subBank"}})],1),a("el-form-item",{attrs:{label:"真实姓名"}},[a("el-input",{attrs:{placeholder:"请输入真实姓名"},model:{value:e.form5.bankUserName,callback:function(t){e.$set(e.form5,"bankUserName",t)},expression:"form5.bankUserName"}})],1)],1):e._e()],1)],1)],1),a("attachment-img",{ref:"img1",attrs:{type:"img"},on:{attachment:e.imgadd1}}),a("attachment-img",{ref:"img2",attrs:{type:"imgs"},on:{attachment:e.multigraph1}}),a("attachment-img",{ref:"img3",attrs:{type:"imgs"},on:{attachment:e.multigraph2}}),a("attachment-img",{ref:"img4",attrs:{type:"imgs"},on:{attachment:e.multigraph3}}),a("attachment-img",{ref:"img5",attrs:{type:"img"},on:{attachment:e.imgadd2}}),a("attachment-img",{ref:"img6",attrs:{type:"img"},on:{attachment:e.imgadd3}})],1),a("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)])},i=[],s=(a("99af"),a("c975"),a("d81d"),a("a434"),a("96cf"),a("1da1")),n=a("fc6e"),o=a("73f0"),l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"selectmap",attrs:{id:"containert"}})},c=[],m=(a("a9e3"),a("ac1f"),a("841c"),{name:"selectmap",props:{mapLng:{type:Number,default:114.304692},mapLat:{type:Number,default:30.59331},mapAddress:{type:String,default:""}},data:function(){return{markersArray:[],searchService:""}},created:function(){},methods:{init:function(){var e=this,t=new qq.maps.Map(document.getElementById("containert"),{center:new qq.maps.LatLng(e.mapLat?e.mapLat:30.59331,e.mapLng?e.mapLng:114.304692),zoom:13}),a=new qq.maps.Marker({position:new qq.maps.LatLng(e.mapLat?e.mapLat:30.59331,e.mapLng?e.mapLng:114.304692),draggable:!0,map:t});qq.maps.event.addListener(a,"dragend",(function(t){console.log(t);var a=t.latLng.lat,r=t.latLng.lng;e.$api.get("channel/shop/map",{lat:e.mapLat,lng:e.mapLng},(function(t){if(0==t.status){var i=t.result.address;e.$emit("clickmap",i,a,r)}}))})),e.$set(e.markersArray,0,a),qq.maps.event.addListener(t,"click",(function(a){e.deleteOverlays();var r=new qq.maps.Marker({position:a.latLng,draggable:!0,map:t});e.$set(e.markersArray,1,r),console.log(a);var i=a.latLng.lat,s=a.latLng.lng;e.$api.get("channel/shop/map",{lat:i,lng:s},(function(t){if(0==t.status){var a=t.result.address;e.$emit("clickmap",a,i,s)}})),qq.maps.event.addListener(r,"dragend",(function(t){var a=t.latLng.lat,r=t.latLng.lng;e.$api.get("channel/shop/map",{lat:a,lng:r},(function(t){if(0==t.status){var i=t.result.address;e.$emit("clickmap",i,a,r)}}))}))}));var r=new qq.maps.LatLngBounds,i=new qq.maps.SearchService({location:"北京",pageIndex:1,pageCapacity:1,autoExtend:!0,complete:function(a){for(var i=a.detail.pois,s=0,n=i.length;s<n;s++){var o=i[s];r.extend(o.latLng);var l=new qq.maps.Marker({map:t,draggable:!0,position:o.latLng});l.setTitle(s+1),e.$set(e.markersArray,2,l)}t.fitBounds(r);var c=a.detail.pois[0].latLng.lat,m=a.detail.pois[0].latLng.lng;e.$api.get("channel/shop/map",{lat:c,lng:m},(function(t){if(0==t.status){var a=t.result.address;e.$emit("clickmap",a,c,m)}})),qq.maps.event.addListener(l,"dragend",(function(t){var a=t.latLng.lat,r=t.latLng.lng;e.$api.get("channel/shop/map",{lat:a,lng:r},(function(t){if(0==t.status){var i=t.result.address;e.$emit("clickmap",i,a,r)}}))}))}});this.searchService=i},deleteOverlays:function(){if(this.markersArray){for(var e in this.markersArray)this.markersArray[e].setMap(null);this.markersArray.length=0}},searchKeyword:function(){this.deleteOverlays(),this.searchService.setPageCapacity(1),this.searchService.search(this.mapAddress)}}}),d=m,u=(a("2948"),a("2877")),f=Object(u["a"])(d,l,c,!1,null,null,null),p=f.exports,g=a("e692"),h=(a("294d"),{name:"shopadd",created:function(){this.initt(),this.$route.query.id&&(this.id=this.$route.query.id,this.edit())},components:{attachmentImg:n["a"],selectMap:o["a"],selectMapt:p},data:function(){var e=function(e,t,a){if(!t)return a(new Error("账号不能为空"))},t=function(e,t,a){""===t?a(new Error("请输入密码")):a()},a=function(e,t,a){if(!t)return a(new Error("手机号不能为空"))};return{activeName:"1",id:"",wName:"",form:{name:"",icon:"",storeTel:"",storeLinkMan:"",storeOpen:"1",type:"1",cityArr:[],lng:"",lat:"",address:"",id:"",goodsModel:"1"},BdgoodsModel:"",data:[],form2:{timeType:"1",timeArr:[],mainDishes:"",perCapita:"",introduction:"",service:[],environment:[],id:"",label:"",typeId:"",areaId:"",foodRecords:[],license:[]},serviceList:[],form3:{label:"",typeId:"",areaId:"",foodRecords:[],license:[]},merchantUser:[],labelList:[],typeList:[],arealList:[],form4:{userName:"",password:"",bindTel:"",id:"",merchantId:""},app:"",rules4:{password:[{validator:t,trigger:"blur"}],userName:[{validator:e,trigger:"blur"}],bindTel:[{validator:a,trigger:"blur"}]},form5:{type:"1",userId:"",wxTel:"",wxImg:"",aliTel:"",aliAccount:"",aliUserName:"",aliImg:"",bankTel:"",bankName:"",subBank:"",bankUserName:"",storeId:"",bankAccount:"",channel:["1","2","3"]},form6:{linkMan:"",linkTel:"",lng:"",lat:"",address:""}}},methods:{copyText:function(e){var t=e,a=document.createElement("input");a.value=t,document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.className="oInput",a.style.display="none",this.$message({message:"复制成功",type:"success"})},handleClick:function(){this.edit()},onSearch:function(){var e=this;return Object(s["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(g["i"])({id:e.form5.userId});case 2:a=t.sent,r=a.data,e.wName=r.userName;case 5:case"end":return t.stop()}}),t)})))()},initt:function(){var e=this;return Object(s["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(g["b"])({type:3});case 2:a=t.sent,r=a.data,e.data=r;case 5:case"end":return t.stop()}}),t)})))()},edit:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var a,r,i,s,n,o,l,c,m,d,u,f,p,h;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("1"!=+e.activeName){t.next=8;break}return t.next=3,Object(g["g"])({storeType:2,id:e.id});case 3:a=t.sent,r=a.data,e.id&&r.id&&(e.form=r,e.form.lat=+r.lat,e.form.lng=+r.lng,e.form.address=r.address,e.BdgoodsModel=r.goodsModel),t.next=67;break;case 8:if("2"!=+e.activeName){t.next=19;break}return t.next=11,Object(g["h"])({storeType:2,id:e.id});case 11:i=t.sent,s=i.data,e.labelList=s.labelList,e.arealList=s.arealList,e.typeList=s.typeList,e.id&&s.info.id&&(e.form2=s.info,"2"==s.info.timeType&&(e.form2.timeArr=s.info.timeArr.map((function(e){return{startTime:e.startTime,endTime:e.endTime,ciri:e.ciri}})))),t.next=67;break;case 19:if("3"!=+e.activeName){t.next=30;break}return t.next=22,Object(g["f"])({storeType:2,id:e.id});case 22:n=t.sent,o=n.data,e.labelList=o.labelList,e.arealList=o.arealList,e.typeList=o.typeList,e.id&&o.info.id&&(e.form3=o.info),t.next=67;break;case 30:if("4"!=+e.activeName||e.id){t.next=39;break}return t.next=33,Object(g["c"])();case 33:l=t.sent,c=l.data,e.app=c.app?c.app:"",e.merchantUser=c.merchantUser?c.merchantUser:[],t.next=67;break;case 39:if("4"!=+e.activeName||!e.id){t.next=49;break}return t.next=42,Object(g["e"])({storeType:2,id:e.id});case 42:m=t.sent,d=m.data,e.app=d.app?d.app:"",e.merchantUser=d.merchantUser?d.merchantUser:[],d.id&&(e.form4.userName=d.userName,e.form4.password=d.passWord,e.form4.bindTel=d.phone,e.form4.userId=d.id,e.form4.merchantId=d.merchantId),t.next=67;break;case 49:if("5"!=+e.activeName||!e.id){t.next=60;break}return t.next=52,Object(g["j"])({storeType:2,storeId:e.id});case 52:u=t.sent,f=u.data,f.storeId&&(e.form5=f),Object.assign(e.form5,f),e.wName=f.userName,f.type||(f.channel&&f.channel.length?e.form5.type=f.channel.sort()[0]:e.form5.type="1"),t.next=67;break;case 60:if("6"!=+e.activeName||!e.id){t.next=67;break}return setTimeout((function(){e.$refs.mapCom2.init()}),200),t.next=64,Object(g["d"])({storeType:2,storeId:e.id});case 64:p=t.sent,h=p.data,h.storeId&&(e.form6=h,e.form6.lat=+h.lat,e.form6.lng=+h.lng,e.form6.address=h.address);case 67:case"end":return t.stop()}}),t)})))()},addtimeInterval:function(){var e={startTime:"00:00",endTime:"00:00",ciri:!0};this.$set(this.form2.timeArr,this.form2.timeArr.length,e)},deltimeInterval:function(e){this.$delete(this.form2.timeArr,e)},selectTime:function(e,t,a,r){for(var i=0;i<this.form2.timeArr.length;i++)i==a&&(1==r&&(e>=t.endTime?t.ciri=!0:t.ciri=!1),2==r&&(e<=t.startTime?t.ciri=!0:t.ciri=!1))},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.icon=e.str},imgadd2:function(e){this.form5.wxImg=e.str},imgadd3:function(e){this.form5.aliImg=e.str},multigraph1:function(e){this.form2.environment&&this.form2.environment.length>0?this.form2.environment=this.form2.environment.concat(e.arr):this.form2.environment=e.arr},multigraph2:function(e){this.form2.foodRecords&&this.form2.foodRecords.length>0?this.form2.foodRecords=this.form2.foodRecords.concat(e.arr):this.form2.foodRecords=e.arr},multigraph3:function(e){this.form2.license&&this.form2.license.length>0?this.form2.license=this.form2.license.concat(e.arr):this.form2.license=e.arr},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;case 3:this.form2.foodRecords.remove(e);break;case 4:this.form2.license.remove(e);break}else switch(t){case 1:this.form.icon="";break;case 5:this.form5.wxImg="";break;case 6:this.form5.aliImg="";break}},getMapdata:function(e,t,a){this.form.address=e,this.form.lat=t,this.form.lng=a},searchMapClick:function(){console.log(this.$refs.mapCom),this.$refs.mapCom.searchKeyword()},getMapdata2:function(e,t,a){this.form6.address=e,this.form6.lat=t,this.form6.lng=a},searchMapClick2:function(){console.log(this.$refs.mapCom2),this.$refs.mapCom2.searchKeyword()},onSubmit:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var a,r,i,n,o,l,c,m,d,u;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log("submit!"),"1"!=e.activeName){t.next=5;break}e.$refs["form"].validate(function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(a){var r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=10;break}return e.form.isMain=2,t.next=4,Object(g["r"])(e.form);case 4:r=t.sent,i=r.msg,e.$baseMessage(i,"success"),e.$router.push({path:"/shoplist?currentPage=".concat(e.$route.query.currentPage,"&activeName=").concat(e.$route.query.activeName)}),t.next=11;break;case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.next=51;break;case 5:if("2"!=e.activeName){t.next=14;break}return t.next=8,Object(g["s"])(e.form2);case 8:a=t.sent,r=a.msg,e.$baseMessage(r,"success"),e.$router.push({path:"/shoplist?currentPage=".concat(e.$route.query.currentPage,"&activeName=").concat(e.$route.query.activeName)}),t.next=51;break;case 14:if("3"!=e.activeName){t.next=23;break}return t.next=17,Object(g["p"])(e.form3);case 17:i=t.sent,n=i.msg,e.$baseMessage(n,"success"),e.$router.push({path:"/shoplist?currentPage=".concat(e.$route.query.currentPage,"&activeName=").concat(e.$route.query.activeName)}),t.next=51;break;case 23:if("4"!=e.activeName){t.next=33;break}return e.id&&(e.form4.id=e.id),t.next=27,Object(g["o"])(e.form4);case 27:o=t.sent,l=o.msg,e.$baseMessage(l,"success"),e.$router.go(-1),t.next=51;break;case 33:if("5"!=e.activeName){t.next=43;break}return e.form5.storeId=e.id,t.next=37,Object(g["t"])(e.form5);case 37:c=t.sent,m=c.msg,e.$baseMessage(m,"success"),e.$router.go(-1),t.next=51;break;case 43:if("6"!=e.activeName){t.next=51;break}return e.form6.storeId=e.id,t.next=47,Object(g["n"])(e.form6);case 47:d=t.sent,u=d.msg,e.$baseMessage(u,"success"),e.$router.go(-1);case 51:case"end":return t.stop()}}),t)})))()},cascaderChange:function(e){this.form.cityArr=e}}}),v=h,b=(a("0fe3"),Object(u["a"])(v,r,i,!1,null,null,null));t["default"]=b.exports},fc6e:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{staticClass:"attachmentImg",attrs:{title:"选择图片",visible:e.dialogVisible,"close-on-click-modal":!1,width:"55%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.modalClose,opened:e.dialogOpened}},[a("div",{staticClass:"attachment_img_box",attrs:{flex:"box:first"}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.groupListLoading,expression:"groupListLoading"}],staticClass:"attachment_img_left"},[a("el-menu",{staticClass:"group-menu",attrs:{mode:"vertical"}},[a("el-scrollbar",{staticStyle:{height:"523px",width:"100%"}},[a("div",{staticClass:"goods-menu"},[a("el-menu-item",{class:{"is-active":"all"==e.allindex},staticStyle:{"text-align":"center"},attrs:{index:"all"},on:{click:function(t){return e.selected(0)}}},[a("span",[e._v("全部")])]),e._l(e.groupItem,(function(t){return[a("el-menu-item",{key:t.id,attrs:{index:t.id},on:{click:function(a){return e.selected(t.id)}}},[a("div",{staticClass:"fenlei",attrs:{flex:"dir:left box:last"}},[a("i",{staticClass:"el-icon-circle-close gbfenlei",staticStyle:{display:"none"},on:{click:function(a){return e.deleteType(t.id)}}}),a("div",{staticStyle:{overflow:"hidden","text-overflow":"ellipsis",width:"100%"}},[a("span",[e._v(e._s(t.name))])])])])]}))],2)]),a("el-popover",{attrs:{placement:"top",width:"160"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("el-input",{attrs:{placeholder:"请输入分组名称",size:"mini"},model:{value:e.new_type_name,callback:function(t){e.new_type_name=t},expression:"new_type_name"}}),a("div",{staticStyle:{"text-align":"right",margin:"0","margin-top":"10px"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){e.visible=!1}}},[e._v("取消")]),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.addNewAttType}},[e._v("确定")])],1),a("el-button",{staticStyle:{"margin-left":"22%","margin-top":"13px"},attrs:{slot:"reference",size:"small"},slot:"reference"},[a("i",{staticClass:"el-icon-circle-plus-outline"}),e._v(" 新建分组 ")])],1)],1)],1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.rightLoading,expression:"rightLoading"}],staticClass:"attachment_img_right",attrs:{flex:"dir:top"}},[a("div",{staticClass:"selectBox"},[a("el-input",{staticStyle:{width:"30%","padding-left":"12px"},attrs:{placeholder:"请输入图片名称","suffix-icon":"el-icon-search",size:"small"},on:{input:function(t){return e.search(e.atta_name)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search(e.atta_name)}},model:{value:e.atta_name,callback:function(t){e.atta_name=t},expression:"atta_name"}}),a("div",{staticStyle:{float:"right",padding:"0 10px 0 0"}},[a("el-upload",{staticClass:"upload-demo",attrs:{action:e.UploadUrl(),multiple:!0,limit:50,"on-exceed":e.handleExceed,"file-list":e.fileList,"on-success":e.handleSuccess,"on-error":e.handleError,"before-upload":e.beforeUpload,data:e.uploadData,"on-progress":e.handProgress}},[a("el-button",{attrs:{size:"small",type:"primary"}},[a("i",{staticClass:"el-icon-plus avatar-uploader-icon"}),e._v(" 上传图片 ")])],1)],1)],1),a("el-scrollbar",{staticClass:"scrollbar",staticStyle:{height:"460px"}},[a("div",{staticClass:"app-attachment-list"},[e._l(e.attachments,(function(t,r){return[a("el-tooltip",{key:t.id,staticClass:"item",attrs:{effect:"dark",content:t.name,placement:"top","open-delay":1}},[a("div",{staticClass:"app-attachment-item",on:{click:function(a){return e.selectedItem(r,t.url)}}},[a("div",{staticClass:"app-attachment-item-bj"},[a("div",{staticClass:"imgStyle"},[a("el-image",{staticStyle:{width:"100%",height:"143px","border-radius":"5px"},attrs:{src:t.url,fit:"cover"}}),a("div",{staticClass:"mask",style:e.getStyle2(r)},[a("i",{staticClass:"el-icon-check center-icon pos-center"}),a("p",{staticClass:"triangle"},[a("i",{staticClass:"el-icon-check"})])])],1),a("div",{staticClass:"app-attachment-name"},[e._v(e._s(t.name))]),a("i",{staticClass:"el-icon-error delete",on:{click:function(a){return e.deleteItem(t.id)}}})])])])]}))],2)]),a("div",{staticStyle:{padding:"5px","text-align":"right","margin-top":"auto"}},[a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.pagesize},on:{"current-change":e.current_change}})],1)],1)]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.selectedItems()}}},[e._v("确 定")])],1)])},i=[],s=(a("99af"),a("365c")),n={name:"attachment-img",props:{type:{type:String,default:"img"},type2:{type:String,default:""},op:{type:String}},data:function(){return{visible:!1,atta_name:"",uploadParams:{type_id:0,type:1},category:0,keywords:"",total:0,pagesize:30,currentPage:1,dialogVisible:!1,groupItem:[],attachments:[],groupListLoading:!1,rightLoading:!1,new_type_name:"",fileList:[],selectedArr:{},attachmentList:"12",uploadData:{key:"",token:""},file:{Url:"",path:"",name:"",size:0},att_type:"",allindex:"all"}},created:function(){},methods:{getStyle2:function(e){var t=this,a=t.currentPage,r=t.selectedArr["img"==t.type?"danxuan":"item"+e+a];return r&&r.page==a&&r.index==e?"display:block":""},modalClose:function(){var e=this;e.selectedArr={}},dialogOpened:function(){this.getgroupItem(),this.getAttachment_List()},handProgress:function(){var e=this;e.rightLoading=!0},getgroupItem:function(){var e=this;this.$api.get("common/file/get-category",{storeId:this.type2},(function(t){1==t.code?(e.groupItem=t.data,e.groupListLoading=!1,e.visible=!1):e.groupListLoading=!1}))},getAttachment_List:function(){var e=this;e.rightLoading=!0,this.$api.get("common/file/get-picture",{page:e.currentPage,category:e.category,keywords:e.keywords,storeId:this.type2},(function(t){1==t.code?(e.attachments=t.data,e.total=t.count,e.rightLoading=!1):e.rightLoading=!1}))},addNewAttType:function(){var e=this;e.groupListLoading=!0,this.$api.post("common/file/save-category",{storeId:this.type2,name:e.new_type_name},(function(t){1==t.code?(e.visible=!1,e.$message({message:t.msg,type:"success",duration:500,onClose:function(){e.new_type_name="",e.getgroupItem()}})):(e.visible=!1,e.$message.error(t.msg))}))},deleteType:function(e){var t=this;t.groupListLoading=!0,this.$api.post("common/file/del-picture-category",{id:e},(function(e){1==e.code?(t.visible=!1,t.$message({message:e.msg,type:"success",duration:500,onClose:function(){t.getgroupItem()}})):(t.$message.error(e.msg),t.groupListLoading=!1)}))},search:function(e){var t=this;console.log(e),this.keywords=e,t.getAttachment_List()},current_change:function(e){var t=this;t.currentPage=e,t.getAttachment_List()},deleteItem:function(e){var t=this;t.rightLoading=!0,this.$api.post("common/file/del-picture",{id:e},(function(e){1==e.code?(t.visible=!1,t.$message({message:e.msg,type:"success",duration:500,onClose:function(){t.getAttachment_List()}})):(t.$message.error(e.msg),t.groupListLoading=!1)}))},UploadUrl:function(){var e=s["a"].backendPath;return e+"common/file/get-category"},beforeUpload:function(e){console.log("上传前判断",e);var t="image/jpg"===e.type||"image/jpeg"===e.type||"image/png"===e.type||"image/gif"===e.type,a=e.size/1024/1024<2;return t?a?void 0:(this.$message.error("文件大小不能超过 2MB!"),!1):(this.$message.error("上传图片只支持jpg、jpeg、png格式!"),!1)},handleError:function(e){this.$message({message:"上传失败",duration:2e3,type:"warning"})},handleSuccess:function(e,t,a){console.log("345",a),this.file=t,this.addAttachment()},handleExceed:function(e,t){this.$message.warning("当前限制选择 50 个文件,本次选择了 ".concat(e.length," 个文件,共选择了 ").concat(e.length+t.length," 个文件"))},addAttachment:function(){var e=this,t=new FormData;t.append("file",this.file.raw),t.append("category",this.category),t.append("storeId",this.type2),this.$api.post("common/file/upload",t,(function(t){1==t.code?(e.getAttachment_List(),e.$message.success("上传成功")):(e.$message.error(t.msg),console.log(t.msg))}))},selected:function(e){var t=this;t.rightLoading=!0,t.currentPage=1,t.category=e,t.allindex="otherList",t.getAttachment_List()},selectedItem:function(e,t){var a=this,r="img"==a.type,i=r?"danxuan":"item"+e+a.currentPage,s=a.selectedArr[i];s&&s.index==e?a.$delete(a.selectedArr,i):(r&&a.$delete(a.selectedArr,i),a.$set(a.selectedArr,i,{page:a.currentPage,index:e,url:t}))},selectedItems:function(){var e=this;e=this;var t=e.selectedArr,a="",r=[];for(var i in t)a+=a?","+t[i].url:t[i].url,r.push(t[i].url);e.$emit("attachment",{str:a,arr:r}),e.dialogVisible=!1}}},o=n,l=(a("dad0"),a("2877")),c=Object(l["a"])(o,r,i,!1,null,null,null);t["a"]=c.exports}}]); |