1 line
44 KiB
JavaScript
1 line
44 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c34776e"],{"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,r){},"3bbe":function(e,t,r){var a=r("861d");e.exports=function(e){if(!a(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},7156:function(e,t,r){var a=r("861d"),o=r("d2bb");e.exports=function(e,t,r){var i,n;return o&&"function"==typeof(i=t.constructor)&&i!==r&&a(n=i.prototype)&&n!==r.prototype&&o(e,n),e}},"73f0":function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"selectmap",attrs:{id:"container"}})},o=[],i=(r("a9e3"),r("ac1f"),r("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}),r=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(r,"dragend",(function(t){console.log(t);var r=t.latLng.lat,a=t.latLng.lng;e.$api.get("channel/shop/map",{lat:e.mapLat,lng:e.mapLng},(function(t){if(0==t.status){var o=t.result.address;e.$emit("clickmap",o,r,a)}}))})),e.$set(e.markersArray,0,r),qq.maps.event.addListener(t,"click",(function(r){e.deleteOverlays();var a=new qq.maps.Marker({position:r.latLng,draggable:!0,map:t});e.$set(e.markersArray,1,a),console.log(r);var o=r.latLng.lat,i=r.latLng.lng;e.$api.get("channel/shop/map",{lat:o,lng:i},(function(t){if(0==t.status){var r=t.result.address;e.$emit("clickmap",r,o,i)}})),qq.maps.event.addListener(a,"dragend",(function(t){var r=t.latLng.lat,a=t.latLng.lng;e.$api.get("channel/shop/map",{lat:r,lng:a},(function(t){if(0==t.status){var o=t.result.address;e.$emit("clickmap",o,r,a)}}))}))}));var a=new qq.maps.LatLngBounds,o=new qq.maps.SearchService({location:"北京",pageIndex:1,pageCapacity:1,autoExtend:!0,complete:function(r){for(var o=r.detail.pois,i=0,n=o.length;i<n;i++){var s=o[i];a.extend(s.latLng);var l=new qq.maps.Marker({map:t,draggable:!0,position:s.latLng});l.setTitle(i+1),e.$set(e.markersArray,2,l)}t.fitBounds(a);var c=r.detail.pois[0].latLng.lat,m=r.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 r=t.latLng.lat,a=t.latLng.lng;e.$api.get("channel/shop/map",{lat:r,lng:a},(function(t){if(0==t.status){var o=t.result.address;e.$emit("clickmap",o,r,a)}}))}))}});this.searchService=o},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=i,s=(r("af6c"),r("2877")),l=Object(s["a"])(n,a,o,!1,null,null,null);t["a"]=l.exports},"841c":function(e,t,r){"use strict";var a=r("d784"),o=r("825a"),i=r("1d80"),n=r("129f"),s=r("14c3");a("search",1,(function(e,t,r){return[function(t){var r=i(this),a=void 0==t?void 0:t[e];return void 0!==a?a.call(t,r):new RegExp(t)[e](String(r))},function(e){var a=r(t,e,this);if(a.done)return a.value;var i=o(e),l=String(this),c=i.lastIndex;n(c,0)||(i.lastIndex=0);var m=s(i,l);return n(i.lastIndex,c)||(i.lastIndex=c),null===m?-1:m.index}]}))},"9e7f":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"storeinformation"},[r("div",{staticClass:"ba_f outmain"},[e._m(0),r("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[r("el-tab-pane",{attrs:{label:"基本信息",name:"1"}},[r("el-form",{ref:"form",attrs:{model:e.form,"label-width":"180px"}},[r("el-form-item",{attrs:{label:"门店名称",required:!0}},[r("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入门店名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.form.id,expression:"form.id"}],attrs:{label:"门店ID"}},[r("el-input",{staticStyle:{width:"400px"},attrs:{disabled:""},model:{value:e.form.id,callback:function(t){e.$set(e.form,"id",t)},expression:"form.id"}}),r("el-button",{staticClass:"mar_l10",on:{click:function(t){return e.copyText(e.form.id)}}},[e._v("复制")])],1),r("el-form-item",{attrs:{label:"门店显示"}},[r("el-switch",{attrs:{"active-value":"1","inactive-value":"2","active-text":"显示","inactive-text":"隐藏"},model:{value:e.form.display,callback:function(t){e.$set(e.form,"display",t)},expression:"form.display"}}),r("div",{staticClass:"yb_margin lh16"},[e._v("备注:关闭后用户将不可下单")])],1),r("el-form-item",{attrs:{label:"门店状态"}},[r("el-switch",{attrs:{"active-value":"1","inactive-value":"2","active-text":"正常营业","inactive-text":"紧急关店"},model:{value:e.form.storeOpen,callback:function(t){e.$set(e.form,"storeOpen",t)},expression:"form.storeOpen"}}),r("div",{staticClass:"yb_margin lh16"},[e._v("备注:关闭后用户将不可下单")])],1),r("el-form-item",{attrs:{label:"门店LOGO",required:!0}},[e.form.icon?r("div",{staticClass:"uploadSource bor_de rel flex"},[r("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enter(1)},mouseleave:function(t){return e.leave(1)}}},[r("i",{ref:"imgicon1",staticClass:"el-icon-check"}),r("i",{staticClass:"el-icon-close",on:{click:function(t){return e.deleteMultiImage(e.form.icon,1)}}})]),r("img",{staticClass:"wid",attrs:{src:e.form.icon},on:{click:function(t){return e.test(1)}}})]):r("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(1)}}},[r("i",{staticClass:"el-icon-plus fon_40 color_d9"})])]),r("el-form-item",{attrs:{label:"联系人",required:!0}},[r("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入门店联系人"},model:{value:e.form.storeLinkMan,callback:function(t){e.$set(e.form,"storeLinkMan",t)},expression:"form.storeLinkMan"}})],1),r("el-form-item",{attrs:{label:"门店电话",required:!0}},[r("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入门店电话"},model:{value:e.form.storeTel,callback:function(t){e.$set(e.form,"storeTel",t)},expression:"form.storeTel"}})],1),r("el-form-item",{attrs:{label:"所属区域",required:!0}},[r("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),r("el-form-item",{attrs:{label:"详细地址",required:!0}},[r("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入详细地址"},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}},[r("el-button",{attrs:{slot:"append"},on:{click:e.searchMapClick},slot:"append"},[e._v("搜索")])],1)],1),r("el-form-item",{attrs:{label:"店铺经纬度"}},[r("el-input",{staticStyle:{width:"130px"},attrs:{disabled:""},model:{value:e.form.lng,callback:function(t){e.$set(e.form,"lng",t)},expression:"form.lng"}}),r("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),r("el-form-item",{attrs:{label:"地图定位"}},[r("select-map",{ref:"mapCom",attrs:{mapLng:e.form.lng,mapLat:e.form.lat,mapAddress:e.form.address},on:{clickmap:e.getMapdata}})],1)],1)],1),r("el-tab-pane",{attrs:{label:"门店信息",name:"2"}},[r("el-form",{ref:"form2",attrs:{model:e.form2,"label-width":"180px"}},[r("el-form-item",{attrs:{label:"门店简介"}},[r("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),r("el-form-item",{attrs:{label:"主营产品"}},[r("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),r("el-form-item",{attrs:{label:"人均消费"}},[r("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入人均消费"},model:{value:e.form2.perCapita,callback:function(t){e.$set(e.form2,"perCapita",t)},expression:"form2.perCapita"}},[r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"商家环境"}},[e._l(e.form2.environment,(function(t,a){return r("div",{key:a,staticClass:"uploadSource bor_de rel flex"},[r("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enterMultigraph(a,1)},mouseleave:function(t){return e.leaveMultigraph(a,1)}}},[r("i",{ref:"list1"+a,refInFor:!0,staticClass:"el-icon-check"}),r("i",{staticClass:"el-icon-close",on:{click:function(r){return e.deleteMultiImage(t,2,"multigraph")}}})]),r("img",{staticClass:"wid img",attrs:{src:t},on:{click:function(t){return e.test(2)}}})])})),r("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(2)}}},[r("i",{staticClass:"el-icon-plus fon_40 color_d9"})])],2),r("el-form-item",{attrs:{label:"商品安全档案"}},[e._l(e.form2.foodRecords,(function(t,a){return r("div",{key:a,staticClass:"uploadSource bor_de rel flex"},[r("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enterMultigraph(a,2)},mouseleave:function(t){return e.leaveMultigraph(a,2)}}},[r("i",{ref:"list2"+a,refInFor:!0,staticClass:"el-icon-check"}),r("i",{staticClass:"el-icon-close",on:{click:function(r){return e.deleteMultiImage(t,3,"multigraph")}}})]),r("img",{staticClass:"wid img",attrs:{src:t},on:{click:function(t){return e.test(3)}}})])})),r("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(3)}}},[r("i",{staticClass:"el-icon-plus fon_40 color_d9"})])],2),r("el-form-item",{attrs:{label:"营业执照"}},[e._l(e.form2.license,(function(t,a){return r("div",{key:a,staticClass:"uploadSource bor_de rel flex"},[r("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enterMultigraph(a,3)},mouseleave:function(t){return e.leaveMultigraph(a,3)}}},[r("i",{ref:"list3"+a,refInFor:!0,staticClass:"el-icon-check"}),r("i",{staticClass:"el-icon-close",on:{click:function(r){return e.deleteMultiImage(t,4,"multigraph")}}})]),r("img",{staticClass:"wid img",attrs:{src:t},on:{click:function(t){return e.test(4)}}})])})),r("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(4)}}},[r("i",{staticClass:"el-icon-plus fon_40 color_d9"})])],2)],1)],1),r("el-tab-pane",{attrs:{label:"账号密码",name:"5"}},[r("el-form",{ref:"form5",attrs:{model:e.form5,rules:e.rules4,"label-width":"180px"}},[r("el-form-item",{attrs:{label:"登录账号",prop:"userName",required:""}},[r("el-input",{attrs:{autocomplete:"off",placeholder:"请输入登录账号"},model:{value:e.form5.userName,callback:function(t){e.$set(e.form5,"userName",t)},expression:"form5.userName"}})],1),r("el-form-item",{attrs:{label:"登录密码",prop:"password",required:""}},[r("el-input",{attrs:{type:"password",autocomplete:"off",placeholder:"请输入登录密码"},model:{value:e.form5.password,callback:function(t){e.$set(e.form5,"password",t)},expression:"form5.password"}})],1),r("el-form-item",{attrs:{label:"绑定手机号",prop:"bindTel",required:""}},[r("el-input",{attrs:{autocomplete:"off",placeholder:"请输入绑定手机号"},model:{value:e.form5.bindTel,callback:function(t){e.$set(e.form5,"bindTel",t)},expression:"form5.bindTel"}})],1),e.app?r("el-form-item",{attrs:{label:"关联微信管理员"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择关联微信管理员"},model:{value:e.form5.merchantId,callback:function(t){e.$set(e.form5,"merchantId",t)},expression:"form5.merchantId"}},e._l(e.merchantUser,(function(e){return r("el-option",{key:e.id,attrs:{label:e.userName+"(ID:"+e.id+")",value:e.id}})})),1)],1):e._e()],1)],1),"2"!=e.form.loginType?r("el-tab-pane",{attrs:{label:"服务费率设置",name:"4"}},[r("el-form",{ref:"form4",staticClass:"mar_t20",attrs:{model:e.form4,"label-width":"180px"}},[r("div",{staticClass:"shuju_title mar_b20"},[r("div",{staticClass:"shuju_title_text"},[r("span",[e._v("服务费率")])])]),r("el-form-item",{attrs:{label:"平台抽佣模式"}},[r("el-radio-group",{model:{value:e.form4.rule,callback:function(t){e.$set(e.form4,"rule",t)},expression:"form4.rule"}},[r("el-radio",{attrs:{label:"2"}},[e._v("自定义抽佣设置")])],1),r("div",{staticClass:"yb_margin lh16"},[e._v("温馨提示:此抽佣模式建议在单商户下使用")])],1),"2"==e.form4.rule?r("el-form-item",{attrs:{label:"佣金计算方式"}},[r("el-radio-group",{model:{value:e.form4.type,callback:function(t){e.$set(e.form4,"type",t)},expression:"form4.type"}},[r("el-radio",{attrs:{label:"1"}},[e._v("订单百分比抽成")]),r("el-radio",{attrs:{label:"2"}},[e._v("按固定金额")])],1)],1):e._e(),"2"==e.form4.rule&&"1"==e.form4.type?r("div",[r("el-form-item",{attrs:{label:"商品抽佣比例"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.goodsPlatformProportion,callback:function(t){e.$set(e.form4,"goodsPlatformProportion",t)},expression:"form4.goodsPlatformProportion"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("%")])],2),r("el-input",{staticStyle:{width:"220px"},attrs:{disabled:""},model:{value:e.form4.goodsStoreProportion,callback:function(t){e.$set(e.form4,"goodsStoreProportion",t)},expression:"form4.goodsStoreProportion"}},[r("template",{slot:"prepend"},[e._v("商家获得")]),r("template",{slot:"append"},[e._v("%")])],2),e._v(" / "),r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.goodsDownMoney,callback:function(t){e.$set(e.form4,"goodsDownMoney",t)},expression:"form4.goodsDownMoney"}},[r("template",{slot:"prepend"},[e._v("最低抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"配送费抽佣比例"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.deliverPlatformProportion,callback:function(t){e.$set(e.form4,"deliverPlatformProportion",t)},expression:"form4.deliverPlatformProportion"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("%")])],2),r("el-input",{staticStyle:{width:"220px"},attrs:{disabled:""},model:{value:e.form4.deliverStoreProportion,callback:function(t){e.$set(e.form4,"deliverStoreProportion",t)},expression:"form4.deliverStoreProportion"}},[r("template",{slot:"prepend"},[e._v("商家获得")]),r("template",{slot:"append"},[e._v("%")])],2),e._v(" / "),r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.deliverDownMoney,callback:function(t){e.$set(e.form4,"deliverDownMoney",t)},expression:"form4.deliverDownMoney"}},[r("template",{slot:"prepend"},[e._v("最低抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"包装费抽佣比例"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.boxPlatformProportion,callback:function(t){e.$set(e.form4,"boxPlatformProportion",t)},expression:"form4.boxPlatformProportion"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("%")])],2),r("el-input",{staticStyle:{width:"220px"},attrs:{disabled:""},model:{value:e.form4.boxStoreProportion,callback:function(t){e.$set(e.form4,"boxStoreProportion",t)},expression:"form4.boxStoreProportion"}},[r("template",{slot:"prepend"},[e._v("商家获得")]),r("template",{slot:"append"},[e._v("%")])],2),e._v(" / "),r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.boxDownMoney,callback:function(t){e.$set(e.form4,"boxDownMoney",t)},expression:"form4.boxDownMoney"}},[r("template",{slot:"prepend"},[e._v("最低抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"当面付抽佣比例"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.cashierPlatformProportion,callback:function(t){e.$set(e.form4,"cashierPlatformProportion",t)},expression:"form4.cashierPlatformProportion"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("%")])],2),r("el-input",{staticStyle:{width:"220px"},attrs:{disabled:""},model:{value:e.form4.cashierStoreProportion,callback:function(t){e.$set(e.form4,"cashierStoreProportion",t)},expression:"form4.cashierStoreProportion"}},[r("template",{slot:"prepend"},[e._v("商家获得")]),r("template",{slot:"append"},[e._v("%")])],2),e._v(" / "),r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.cashierDownMoney,callback:function(t){e.$set(e.form4,"cashierDownMoney",t)},expression:"form4.cashierDownMoney"}},[r("template",{slot:"prepend"},[e._v("最低抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"快餐抽佣比例"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.fastPlatformProportion,callback:function(t){e.$set(e.form4,"fastPlatformProportion",t)},expression:"form4.fastPlatformProportion"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("%")])],2),r("el-input",{staticStyle:{width:"220px"},attrs:{disabled:""},model:{value:e.form4.fastStoreProportion,callback:function(t){e.$set(e.form4,"fastStoreProportion",t)},expression:"form4.fastStoreProportion"}},[r("template",{slot:"prepend"},[e._v("商家获得")]),r("template",{slot:"append"},[e._v("%")])],2),e._v(" / "),r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.fastDownMoney,callback:function(t){e.$set(e.form4,"fastDownMoney",t)},expression:"form4.fastDownMoney"}},[r("template",{slot:"prepend"},[e._v("最低抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"店内抽佣比例"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.inStorePlatformProportion,callback:function(t){e.$set(e.form4,"inStorePlatformProportion",t)},expression:"form4.inStorePlatformProportion"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("%")])],2),r("el-input",{staticStyle:{width:"220px"},attrs:{disabled:""},model:{value:e.form4.inStoreStoreProportion,callback:function(t){e.$set(e.form4,"inStoreStoreProportion",t)},expression:"form4.inStoreStoreProportion"}},[r("template",{slot:"prepend"},[e._v("商家获得")]),r("template",{slot:"append"},[e._v("%")])],2),e._v(" / "),r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.inStoreDownMoney,callback:function(t){e.$set(e.form4,"inStoreDownMoney",t)},expression:"form4.inStoreDownMoney"}},[r("template",{slot:"prepend"},[e._v("最低抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1)],1):e._e(),"2"==e.form4.rule&&"2"==e.form4.type?r("div",[r("el-form-item",{attrs:{label:"商品抽成金额"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.goodsFixedMoney,callback:function(t){e.$set(e.form4,"goodsFixedMoney",t)},expression:"form4.goodsFixedMoney"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"配送费抽成金额"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.deliverFixedMoney,callback:function(t){e.$set(e.form4,"deliverFixedMoney",t)},expression:"form4.deliverFixedMoney"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"包装费抽成金额"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.boxFixedMoney,callback:function(t){e.$set(e.form4,"boxFixedMoney",t)},expression:"form4.boxFixedMoney"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"当面付抽成金额"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.cashierFixedMoney,callback:function(t){e.$set(e.form4,"cashierFixedMoney",t)},expression:"form4.cashierFixedMoney"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"快餐抽成金额"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.fastFixedMoney,callback:function(t){e.$set(e.form4,"fastFixedMoney",t)},expression:"form4.fastFixedMoney"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("el-form-item",{attrs:{label:"店内抽成金额"}},[r("el-input",{staticStyle:{width:"220px"},model:{value:e.form4.inStoreFixedMoney,callback:function(t){e.$set(e.form4,"inStoreFixedMoney",t)},expression:"form4.inStoreFixedMoney"}},[r("template",{slot:"prepend"},[e._v("平台抽佣")]),r("template",{slot:"append"},[e._v("元")])],2)],1)],1):e._e(),r("div",{staticClass:"shuju_title mar_b20"},[r("div",{staticClass:"shuju_title_text"},[r("span",[e._v("子商户设置")])])]),r("el-form-item",{attrs:{label:"子商户号"}},[r("el-radio-group",{model:{value:e.form4.sonService,callback:function(t){e.$set(e.form4,"sonService",t)},expression:"form4.sonService"}},[r("el-radio",{attrs:{label:"1"}},[e._v("开启")]),r("el-radio",{attrs:{label:"2"}},[e._v("关闭")])],1),r("div",{staticClass:"yb_margin lh16"},[e._v("开启子商户号后,用户微信付款的订单直接入账到当前商户号里,此模式下平台抽佣设置无效,余额支付的订单不受影响")])],1),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form4.sonService,expression:"form4.sonService=='1'"}],attrs:{label:"服务商子商户号"}},[r("el-input",{attrs:{placeholder:"请输入服务商子商户号"},model:{value:e.form4.subMchId,callback:function(t){e.$set(e.form4,"subMchId",t)},expression:"form4.subMchId"}}),r("div",{staticClass:"yb_margin lh16"},[e._v("请填写此门店的服务商子商户号")])],1),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form4.sonService,expression:"form4.sonService=='1'"}],attrs:{label:"服务商分账"}},[r("el-radio-group",{model:{value:e.form4.profit_sharing,callback:function(t){e.$set(e.form4,"profit_sharing",t)},expression:"form4.profit_sharing"}},[r("el-radio",{attrs:{label:"Y"}},[e._v("开启")]),r("el-radio",{attrs:{label:"N"}},[e._v("关闭")])],1),r("div",{staticClass:"yb_margin lh16"},[e._v("服务商分账需要先开启子商户功能,开启分账后,商家订单完成后会向指定的子商户号进行分账打款(分账比例按照服务费率来计算)")])],1),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form4.sonService&&"Y"==e.form4.profit_sharing,expression:"form4.sonService=='1' && form4.profit_sharing=='Y'"}],attrs:{label:"分账商户号"}},[r("el-input",{attrs:{placeholder:"请输入分账商户号"},model:{value:e.form4.giveMchid,callback:function(t){e.$set(e.form4,"giveMchid",t)},expression:"form4.giveMchid"}}),r("div",{staticClass:"yb_margin lh16"},[e._v("请填写接受平台佣金的微信商户号")])],1),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form4.sonService&&"Y"==e.form4.profit_sharing,expression:"form4.sonService=='1' && form4.profit_sharing=='Y'"}],attrs:{label:"分账商户号商户全称"}},[r("el-input",{attrs:{placeholder:"请输入分账商户号商户全称"},model:{value:e.form4.giveName,callback:function(t){e.$set(e.form4,"giveName",t)},expression:"form4.giveName"}}),r("div",{staticClass:"yb_margin lh16"},[e._v("请填写接受平台佣金的微信商户号全称,此名称要和微信商户后台保持一致")])],1)],1)],1):e._e()],1),r("attachment-img",{ref:"img1",attrs:{type:"img"},on:{attachment:e.imgadd1}}),r("attachment-img",{ref:"img2",attrs:{type:"imgs"},on:{attachment:e.multigraph1}}),r("attachment-img",{ref:"img3",attrs:{type:"imgs"},on:{attachment:e.multigraph2}}),r("attachment-img",{ref:"img4",attrs:{type:"imgs"},on:{attachment:e.multigraph3}})],1),r("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)])},o=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"shuju_title mar_b20"},[r("div",{staticClass:"shuju_title_text"},[r("span",[e._v("店铺信息")])])])}],i=(r("99af"),r("c975"),r("d81d"),r("a434"),r("96cf"),r("1da1")),n=r("fc6e"),s=r("73f0"),l=r("e692"),c=r("294d"),m={name:"storinformation",created:function(){this.initt(),this.edit()},components:{attachmentImg:n["a"],selectMap:s["a"]},data:function(){var e=function(e,t,r){if(!t)return r(new Error("账号不能为空"))},t=function(e,t,r){""===t?r(new Error("请输入密码")):r()},r=function(e,t,r){if(!t)return r(new Error("手机号不能为空"))};return{loading:!0,activeName:"1",form:{name:"",icon:"",cityArr:[],lng:114.304692,lat:30.59331,isMain:"1",storeTel:"",storeLinkMan:"",display:"1",storeOpen:"1",address:"湖北省武汉市",id:""},storeNumber:"",data:[],form2:{timeType:"1",timeArr:[],mainDishes:"",perCapita:"",introduction:"",environment:[],id:"",foodRecords:[],license:[]},form3:{label:"",foodRecords:[],license:[]},form4:{rule:"2",type:"2",goodsPlatformProportion:0,goodsStoreProportion:100,goodsDownMoney:0,deliverPlatformProportion:0,deliverStoreProportion:100,deliverDownMoney:0,boxPlatformProportion:0,boxStoreProportion:100,boxDownMoney:0,goodsFixedMoney:0,deliverFixedMoney:0,boxFixedMoney:0,entryDay:"",cashierPlatformProportion:0,cashierStoreProportion:100,cashierDownMoney:0,cashierFixedMoney:0,fastPlatformProportion:0,fastStoreProportion:100,fastDownMoney:0,fastFixedMoney:0,inStorePlatformProportion:0,inStoreStoreProportion:100,inStoreDownMoney:0,inStoreFixedMoney:0,sonService:"2",profit_sharing:"N",subMchId:"",giveMchid:"",giveName:""},labelList:[],ruleValidate1:{name:[{required:!0,message:"请输入门店名称",trigger:"blur"}],storeTel:[{required:!0,message:"请输入门店电话",trigger:"blur"}],address:[{required:!0,message:"请选择地址",trigger:"blur"}]},form5:{userName:"",password:"",bindTel:"",id:"",merchantId:""},app:"",merchantUser:[],rules4:{password:[{validator:t,trigger:"blur"}],userName:[{validator:e,trigger:"blur"}],bindTel:[{validator:r,trigger:"blur"}]}}},methods:{handleClick:function(){this.edit()},initt:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(l["b"])({type:3});case 2:r=t.sent,a=r.data,e.data=a;case 5:case"end":return t.stop()}}),t)})))()},copyText:function(e){var t=e,r=document.createElement("input");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("Copy"),r.className="oInput",r.style.display="none",this.$message({message:"复制成功",type:"success"})},edit:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,a,o,i,n,s,m,p,d,f,u,g;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.bus.$emit("loading",!0),"1"!=+e.activeName){t.next=10;break}return t.next=4,Object(l["g"])();case 4:r=t.sent,a=r.data,a.id&&(e.form=a,e.form.lat=+a.lat,e.form.lng=+a.lng,e.storeNumber=a.storeNumber),e.bus.$emit("loading",!1),t.next=66;break;case 10:if("2"!=+e.activeName){t.next=19;break}return t.next=13,Object(l["h"])();case 13:o=t.sent,i=o.data,i.info.id&&(e.form2=i.info,"2"==i.info.timeType&&(e.form2.timeArr=i.info.timeArr.map((function(e){return{startTime:e.startTime,endTime:e.endTime,ciri:e.ciri}})))),e.bus.$emit("loading",!1),t.next=66;break;case 19:if("3"!=+e.activeName){t.next=28;break}return t.next=22,Object(l["f"])();case 22:n=t.sent,s=n.data,s.info.id&&(e.form3=s.info),e.bus.$emit("loading",!1),t.next=66;break;case 28:if("4"!=+e.activeName){t.next=45;break}return t.next=31,Object(c["E"])({ident:"serviceCharge"});case 31:m=t.sent,p=m.data,e.formcp=e.form4,e.form4=Object.assign(e.formcp,p),e.form4.goodsStoreProportion=100-e.form4.goodsPlatformProportion,e.form4.deliverStoreProportion=100-e.form4.deliverPlatformProportion,e.form4.boxStoreProportion=100-e.form4.boxPlatformProportion,e.form4.cashierStoreProportion=100-e.form4.cashierPlatformProportion,e.form4.fastStoreProportion=100-e.form4.fastPlatformProportion,e.form4.inStoreStoreProportion=100-e.form4.inStorePlatformProportion,e.form4.rule="2",e.bus.$emit("loading",!1),t.next=66;break;case 45:if("5"!=+e.activeName){t.next=66;break}return t.next=48,Object(l["g"])();case 48:if(d=t.sent,f=d.data,!f.id){t.next=60;break}return e.id=f.id,t.next=54,Object(l["e"])({id:f.id});case 54:u=t.sent,e.app=u.data.app?u.data.app:"",e.merchantUser=u.data.merchantUser?u.data.merchantUser:[],u.data.id&&(e.form5.userName=u.data.userName,e.form5.password=u.data.passWord,e.form5.bindTel=u.data.phone,e.form5.userId=u.data.id,e.form5.merchantId=u.data.merchantId),t.next=65;break;case 60:return t.next=62,Object(l["c"])();case 62:g=t.sent,e.app=g.data.app?g.data.app:"",e.merchantUser=g.data.merchantUser?g.data.merchantUser:[];case 65:e.bus.$emit("loading",!1);case 66:case"end":return t.stop()}}),t)})))()},clickTab:function(e){this.activeName=e},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,r,a){for(var o=0;o<this.form2.timeArr.length;o++)o==r&&(1==a&&(e>=t.endTime?t.ciri=!0:t.ciri=!1),2==a&&(e<=t.startTime?t.ciri=!0:t.ciri=!1))},test:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;console.log(this.$refs,e),this.$refs["img"+e].dialogVisible=!0},enter:function(){var e=arguments.length>0&&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"},enterMultigraph:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.$refs["list".concat(t).concat(e)][0].style.display="none"},leaveMultigraph:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.$refs["list".concat(t).concat(e)][0].style.display="inline-block"},imgadd1:function(e){this.form.icon=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,r){if(Array.prototype.remove=function(e){var t=this.indexOf(e);t>-1&&this.splice(t,1)},"multigraph"==r)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}},getMapdata:function(e,t,r){this.form.address=e,this.form.lat=t,this.form.lng=r},searchMapClick:function(){console.log(this.$refs.mapCom),this.$refs.mapCom.searchKeyword()},onSubmit:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,a,o,i,n,s,m,p,d,f;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log("submit!"),"1"!=e.activeName){t.next=10;break}return e.form.isMain=1,t.next=5,Object(l["r"])(e.form);case 5:r=t.sent,a=r.msg,e.$baseMessage(a,"success"),t.next=44;break;case 10:if("2"!=e.activeName){t.next=18;break}return t.next=13,Object(l["s"])(e.form2);case 13:o=t.sent,i=o.msg,e.$baseMessage(i,"success"),t.next=44;break;case 18:if("3"!=e.activeName){t.next=26;break}return t.next=21,Object(l["p"])(e.form3);case 21:n=t.sent,s=n.msg,e.$baseMessage(s,"success"),t.next=44;break;case 26:if("4"!=e.activeName){t.next=37;break}return e.form4.ident="serviceCharge",e.form4.identName="商家费率设置",e.form4.rule="2",t.next=32,Object(c["V"])(e.form4);case 32:m=t.sent,p=m.msg,e.$baseMessage(p,"success"),t.next=44;break;case 37:if("5"!=e.activeName){t.next=44;break}return e.id&&(e.form5.id=e.id),t.next=41,Object(l["o"])(e.form5);case 41:d=t.sent,f=d.msg,e.$baseMessage(f,"success");case 44:case"end":return t.stop()}}),t)})))()},cascaderChange:function(e){this.form.cityArr=e}}},p=m,d=(r("ab08"),r("2877")),f=Object(d["a"])(p,a,o,!1,null,"2987c52a",null);t["default"]=f.exports},a434:function(e,t,r){"use strict";var a=r("23e7"),o=r("23cb"),i=r("a691"),n=r("50c4"),s=r("7b0b"),l=r("65f0"),c=r("8418"),m=r("1dde"),p=r("ae40"),d=m("splice"),f=p("splice",{ACCESSORS:!0,0:0,1:2}),u=Math.max,g=Math.min,v=9007199254740991,h="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!d||!f},{splice:function(e,t){var r,a,m,p,d,f,b=s(this),y=n(b.length),x=o(e,y),_=arguments.length;if(0===_?r=a=0:1===_?(r=0,a=y-x):(r=_-2,a=g(u(i(t),0),y-x)),y+r-a>v)throw TypeError(h);for(m=l(b,a),p=0;p<a;p++)d=x+p,d in b&&c(m,p,b[d]);if(m.length=a,r<a){for(p=x;p<y-a;p++)d=p+a,f=p+r,d in b?b[f]=b[d]:delete b[f];for(p=y;p>y-a+r;p--)delete b[p-1]}else if(r>a)for(p=y-a;p>x;p--)d=p+a-1,f=p+r-1,d in b?b[f]=b[d]:delete b[f];for(p=0;p<r;p++)b[p+x]=arguments[p+2];return b.length=y-a+r,m}})},a9e3:function(e,t,r){"use strict";var a=r("83ab"),o=r("da84"),i=r("94ca"),n=r("6eeb"),s=r("5135"),l=r("c6b6"),c=r("7156"),m=r("c04e"),p=r("d039"),d=r("7c73"),f=r("241c").f,u=r("06cf").f,g=r("9bf2").f,v=r("58a8").trim,h="Number",b=o[h],y=b.prototype,x=l(d(y))==h,_=function(e){var t,r,a,o,i,n,s,l,c=m(e,!1);if("string"==typeof c&&c.length>2)if(c=v(c),t=c.charCodeAt(0),43===t||45===t){if(r=c.charCodeAt(2),88===r||120===r)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:a=2,o=49;break;case 79:case 111:a=8,o=55;break;default:return+c}for(i=c.slice(2),n=i.length,s=0;s<n;s++)if(l=i.charCodeAt(s),l<48||l>o)return NaN;return parseInt(i,a)}return+c};if(i(h,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var k,w=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof w&&(x?p((function(){y.valueOf.call(r)})):l(r)!=h)?c(new b(_(t)),r,w):_(t)},S=a?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(","),$=0;S.length>$;$++)s(b,k=S[$])&&!s(w,k)&&g(w,k,u(b,k));w.prototype=y,y.constructor=w,n(o,h,w)}},ab08:function(e,t,r){"use strict";var a=r("c102"),o=r.n(a);o.a},af6c:function(e,t,r){"use strict";var a=r("1969"),o=r.n(a);o.a},c102:function(e,t,r){},c8f1:function(e,t,r){},d2bb:function(e,t,r){var a=r("825a"),o=r("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(r,[]),t=r instanceof Array}catch(i){}return function(r,i){return a(r),o(i),t?e.call(r,i):r.__proto__=i,r}}():void 0)},dad0:function(e,t,r){"use strict";var a=r("c8f1"),o=r.n(a);o.a},fc6e:function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("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}},[r("div",{staticClass:"attachment_img_box",attrs:{flex:"box:first"}},[r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.groupListLoading,expression:"groupListLoading"}],staticClass:"attachment_img_left"},[r("el-menu",{staticClass:"group-menu",attrs:{mode:"vertical"}},[r("el-scrollbar",{staticStyle:{height:"523px",width:"100%"}},[r("div",{staticClass:"goods-menu"},[r("el-menu-item",{class:{"is-active":"all"==e.allindex},staticStyle:{"text-align":"center"},attrs:{index:"all"},on:{click:function(t){return e.selected(0)}}},[r("span",[e._v("全部")])]),e._l(e.groupItem,(function(t){return[r("el-menu-item",{key:t.id,attrs:{index:t.id},on:{click:function(r){return e.selected(t.id)}}},[r("div",{staticClass:"fenlei",attrs:{flex:"dir:left box:last"}},[r("i",{staticClass:"el-icon-circle-close gbfenlei",staticStyle:{display:"none"},on:{click:function(r){return e.deleteType(t.id)}}}),r("div",{staticStyle:{overflow:"hidden","text-overflow":"ellipsis",width:"100%"}},[r("span",[e._v(e._s(t.name))])])])])]}))],2)]),r("el-popover",{attrs:{placement:"top",width:"160"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[r("el-input",{attrs:{placeholder:"请输入分组名称",size:"mini"},model:{value:e.new_type_name,callback:function(t){e.new_type_name=t},expression:"new_type_name"}}),r("div",{staticStyle:{"text-align":"right",margin:"0","margin-top":"10px"}},[r("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){e.visible=!1}}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.addNewAttType}},[e._v("确定")])],1),r("el-button",{staticStyle:{"margin-left":"22%","margin-top":"13px"},attrs:{slot:"reference",size:"small"},slot:"reference"},[r("i",{staticClass:"el-icon-circle-plus-outline"}),e._v(" 新建分组 ")])],1)],1)],1),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.rightLoading,expression:"rightLoading"}],staticClass:"attachment_img_right",attrs:{flex:"dir:top"}},[r("div",{staticClass:"selectBox"},[r("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"}}),r("div",{staticStyle:{float:"right",padding:"0 10px 0 0"}},[r("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}},[r("el-button",{attrs:{size:"small",type:"primary"}},[r("i",{staticClass:"el-icon-plus avatar-uploader-icon"}),e._v(" 上传图片 ")])],1)],1)],1),r("el-scrollbar",{staticClass:"scrollbar",staticStyle:{height:"460px"}},[r("div",{staticClass:"app-attachment-list"},[e._l(e.attachments,(function(t,a){return[r("el-tooltip",{key:t.id,staticClass:"item",attrs:{effect:"dark",content:t.name,placement:"top","open-delay":1}},[r("div",{staticClass:"app-attachment-item",on:{click:function(r){return e.selectedItem(a,t.url)}}},[r("div",{staticClass:"app-attachment-item-bj"},[r("div",{staticClass:"imgStyle"},[r("el-image",{staticStyle:{width:"100%",height:"143px","border-radius":"5px"},attrs:{src:t.url,fit:"cover"}}),r("div",{staticClass:"mask",style:e.getStyle2(a)},[r("i",{staticClass:"el-icon-check center-icon pos-center"}),r("p",{staticClass:"triangle"},[r("i",{staticClass:"el-icon-check"})])])],1),r("div",{staticClass:"app-attachment-name"},[e._v(e._s(t.name))]),r("i",{staticClass:"el-icon-error delete",on:{click:function(r){return e.deleteItem(t.id)}}})])])])]}))],2)]),r("div",{staticStyle:{padding:"5px","text-align":"right","margin-top":"auto"}},[r("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.pagesize},on:{"current-change":e.current_change}})],1)],1)]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.selectedItems()}}},[e._v("确 定")])],1)])},o=[],i=(r("99af"),r("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,r=t.currentPage,a=t.selectedArr["img"==t.type?"danxuan":"item"+e+r];return a&&a.page==r&&a.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=i["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,r=e.size/1024/1024<2;return t?r?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,r){console.log("345",r),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 r=this,a="img"==r.type,o=a?"danxuan":"item"+e+r.currentPage,i=r.selectedArr[o];i&&i.index==e?r.$delete(r.selectedArr,o):(a&&r.$delete(r.selectedArr,o),r.$set(r.selectedArr,o,{page:r.currentPage,index:e,url:t}))},selectedItems:function(){var e=this;e=this;var t=e.selectedArr,r="",a=[];for(var o in t)r+=r?","+t[o].url:t[o].url,a.push(t[o].url);e.$emit("attachment",{str:r,arr:a}),e.dialogVisible=!1}}},s=n,l=(r("dad0"),r("2877")),c=Object(l["a"])(s,a,o,!1,null,null,null);t["a"]=c.exports}}]); |