1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-417055ab"],{"0fc4":function(t,e,r){"use strict";r.d(e,"a",(function(){return a})),r.d(e,"c",(function(){return n})),r.d(e,"b",(function(){return i}));var o=r("b6bd");function a(){return Object(o.a)({url:"erp/config",method:"get"})}function n(t){return Object(o.a)({url:"store/erp/shop",method:"get",params:t})}function i(t){return Object(o.a)({url:"product/import_erp_product",method:"post",data:t})}},"1d5b":function(t,e,r){"use strict";r.r(e);var o=r("c276"),a=r("d708"),n=r("a34a"),i=r.n(n),s=r("c4ad"),c=r("73f5"),l=r("0fc4"),d=r("2f62"),u=r("b0e7");function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p={name:"erpList",data:function(){var t=this;return{loading:!1,currentid:0,columns1:[{width:60,align:"center",render:function(e,r){var o=r.row.shop_id,a=!1;a=t.currentid===o;var n=t;return e("div",[e("Radio",{props:{value:a,disabled:!o},on:{"on-change":function(){n.currentid=o,t.$emit("getProductId",o)}}})])}},{title:"ID",key:"shop_id",width:120},{title:"店铺名称",key:"shop_name",minWidth:100}],erpFrom:{page:1,limit:1},list:[],disabledB:!0,disabledF:!1}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(r,!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(d.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{back:function(){this.erpFrom.page=this.erpFrom.page-1,this.getList()},forward:function(){this.erpFrom.page=this.erpFrom.page+1,this.getList()},getList:function(){var t=this;this.loading=!0,Object(l.c)(this.erpFrom).then((function(e){var r=e.data;t.list=r,t.erpFrom.page>1?t.disabledB=!1:t.disabledB=!0,r.length<t.erpFrom.limit?t.disabledF=!0:t.disabledF=!1,t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.specsFrom.page=t,this.getList()}}},h=r("2877"),g=Object(h.a)(p,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("Table",{ref:"table",staticClass:"mt25",attrs:{columns:this.columns1,data:this.list,loading:this.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}}),e("div",{staticClass:"acea-row row-right page"},[e("Button",{attrs:{icon:"ios-arrow-back",disabled:this.disabledB},on:{click:this.back}}),e("Button",{staticClass:"ml10",attrs:{icon:"ios-arrow-forward",disabled:this.disabledF},on:{click:this.forward}})],1)],1)}),[],!1,null,null,null).exports,b=r("c7fc");function _(t,e,r,o,a,n,i){try{var s=t[n](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(o,a)}function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function I(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var y={name:"systemStore",components:{uploadPictures:u.a,Maps:b.a,erpList:g,goodsList:s.default},props:{},data:function(){var t=this;return{goodsList:[],modals:!1,treeSelect:[],modalErp:!1,openErp:!1,isTemplate:!1,title:"",formItem:{product_id:[],cate_id:[],id:0,erp_shop_id:0,store_account:"",store_password:"",image:"",name:"",introduction:"",phone:"",is_show:1,day_time:[],is_store:0,address:"",detailed_address:"",latitude:"",longitude:"",province:0,city:0,area:0,street:0,addressSelect:[],valid_range:0,product_verify_status:0,product_status:1,type:1,applicable_type:1},spinShow:!1,addresData:[],ruleValidate:{name:[{required:!0,message:"请输入门店名称",trigger:"blur"}],erp_shop_id:[{required:!0,validator:function(e,r,o){0==t.formItem.erp_shop_id?o(new Error("请选择erp门店")):o()},trigger:"change"}],store_account:[{required:!0,message:"请输入管理员账号",trigger:"blur"}],store_password:[{required:!0,message:"请输入管理员密码",trigger:"blur"}],address:[{required:!0,message:"请选择门店地址",trigger:"change"}],day_time:[{required:!0,type:"array",message:"请选择营业时间",trigger:"change"},{validator:function(t,e,r,o,a){""===e[0]&&r("时间不能为空"),r()}}],phone:[{required:!0,validator:function(t,e,r){if(!e)return r(new Error("请填写手机号"));/^1[3456789]\d{9}$/.test(e)?r():r(new Error("手机号格式不正确!"))},trigger:"blur"}],detailed_address:[{required:!0,message:"请输入详细地址",trigger:"blur"}],image:[{required:!0,validator:function(e,r,o){t.formItem.image?o():o(new Error("请上传门店照片"))},trigger:"change"}]},mapKey:"",grid:{xl:20,lg:20,md:20,sm:24,xs:24},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},modalPic:!1,isChoice:"单选",pid:0,isApi:0,add:0}},created:function(){this.goodsCategory(),this.getErpConfig(),this.getKey(),this.cityInfo({pid:0})},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(r,!0).forEach((function(e){I(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(d.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){},methods:{unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.product_id)&&e.set(t.product_id,1)}))},getGoodsId:function(t){var e=this,r=this.goodsList.concat(t),o=this.unique(r);this.goodsList=o,this.$nextTick((function(t){setTimeout((function(){e.modals=!1}),300)}))},bindDelete:function(t){this.goodsList.splice(t,1)},goodsCategory:function(){var t=this;Object(c.a)(1).then((function(e){t.treeSelect=e.data})).catch((function(e){t.$Message.error(e.msg)}))},getProductId:function(t){this.formItem.erp_shop_id=t,this.modalErp=!1,this.$refs.formItem.validateField("erp_shop_id")},tapErp:function(){this.$refs.refErp.currentid=this.formItem.erp_shop_id,this.modalErp=!0,this.$refs.formItem.validateField("erp_shop_id")},getErpConfig:function(){var t=this;Object(l.a)().then((function(e){t.openErp=e.data.open_erp})).catch((function(e){t.$Message.error(e.msg)}))},clearFrom:function(){this.goodsList=[],this.formItem={cate_id:[],id:0,store_account:"",store_password:"",image:"",erp_shop_id:0,name:"",introduction:"",phone:"",is_show:1,day_time:[],is_store:0,address:"",detailed_address:"",latitude:"",longitude:"",province:0,city:0,area:0,street:0,addressSelect:[],valid_range:0,product_verify_status:0,product_status:1,type:1,applicable_type:1},this.add=0,this.isApi=0},cancel:function(){this.isTemplate=!1,this.clearFrom()},addchack:function(t,e){var r=this;t.forEach((function(t,e){0==e?r.formItem.province=t:1==e?r.formItem.city=t:2==e?r.formItem.area=t:r.formItem.street=t})),this.formItem.address=e.map((function(t){return t.label})).join("/")},cityInfo:function(t){var e=this;Object(c.e)(t).then((function(t){e.addresData=t.data}))},loadData:function(t,e){t.loading=!0,Object(c.e)({pid:t.value}).then((function(r){t.children=r.data,t.loading=!1,e()}))},getCoordinates:function(t){if(this.formItem.latitude=t.location.lat||34.34127,this.formItem.longitude=t.location.lng||108.93984,this.isApi){var e=t.addressComponents;-1==this.formItem.detailed_address.indexOf(e.street)&&(this.formItem.detailed_address=t.address+(e.town?e.town:""))}},onSearch:function(){this.$refs.mapChild&&this.$refs.mapChild.searchKeyword(this.formItem.detailed_address)},getKey:function(){var t=this;Object(c.l)().then((function(e){t.mapKey=e.data.key})).catch((function(e){t.$Message.error(e.msg)}))},getInfo:function(t){var e=this,r=this;r.$refs.formItem.resetFields(),r.formItem.id=t,r.spinShow=!0,Object(c.I)(t).then((function(t){e.isApi=1;var o=[];e.formItem=t.data.info,e.formItem.erp_shop_id=t.data.info.erp_shop_id||0;var a=[];a.push(t.data.info.day_start),a.push(t.data.info.day_end),e.formItem.day_time=a,t.data.info.province&&o.push(t.data.info.province),t.data.info.city&&o.push(t.data.info.city),t.data.info.area&&o.push(t.data.info.area),t.data.info.street&&o.push(t.data.info.street),e.$set(e.formItem,"valid_range",e.formItem.valid_range/1e3),e.formItem.addressSelect=o,e.onSearch(),r.spinShow=!1})).catch((function(t){r.spinShow=!1,r.$Message.error(t.msg)}))},modalPicTap:function(){this.modalPic=!0,this.$refs.formItem.validateField("image")},getPic:function(t){this.formItem.image=t.att_dir,this.modalPic=!1,this.$refs.formItem.validateField("image")},onchangeTime:function(t){this.formItem.day_time=t},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return!1;if(""==e.formItem.day_time[0]&&(e.formItem.day_time=["00:00:00","23:59:59"]),""==e.formItem.valid_range||e.formItem.valid_range<0)return e.$Message.error("请输入有效的门店范围");var r=[];e.goodsList.forEach((function(t){r.push(t.product_id)})),e.formItem.product_id=r,Object(c.N)(e.formItem.id,e.formItem).then(function(){var t,r=(t=i.a.mark((function t(r){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg),e.isTemplate=!1,e.$parent.getList(),e.clearFrom();case 4:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(o,a){var n=t.apply(e,r);function i(t){_(n,o,a,i,s,"next",t)}function s(t){_(n,o,a,i,s,"throw",t)}i(void 0)}))});return function(t){return r.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))}))}}},w=(r("ee5f"),{name:"storeList",components:{addStore:Object(h.a)(y,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:t.title,"z-index":1,width:"700"},on:{"on-cancel":t.cancel},model:{value:t.isTemplate,callback:function(e){t.isTemplate=e},expression:"isTemplate"}},[r("div",{staticClass:"article-manager"},[r("Card",{attrs:{bordered:!1,"dis-hover":""}},[r("Form",{ref:"formItem",attrs:{model:t.formItem,"label-width":t.labelWidth,"label-position":t.labelPosition,rules:t.ruleValidate},nativeOn:{submit:function(t){t.preventDefault()}}},[r("Row",{attrs:{type:"flex",gutter:24}},[t.openErp?r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"erp门店:",prop:"erp_shop_id"}},[r("Button",{on:{click:t.tapErp}},[t._v(t._s(t.formItem.erp_shop_id?t.formItem.erp_shop_id:"请选择erp门店"))])],1)],1)],1):t._e(),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"门店照片:",prop:"image"}},[r("div",{staticClass:"picBox",on:{click:function(e){return t.modalPicTap("单选")}}},[t.formItem.image?r("div",{staticClass:"pictrue"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formItem.image,expression:"formItem.image"}]})]):r("div",{staticClass:"upLoad"},[r("div",{staticClass:"iconfont"},[t._v("+")])])])])],1)],1),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"门店分类:",prop:"cate_id","label-for":"cate_id"}},[r("Cascader",{attrs:{data:t.treeSelect,placeholder:"请选择门店分类","change-on-select":"",filterable:""},model:{value:t.formItem.cate_id,callback:function(e){t.$set(t.formItem,"cate_id",e)},expression:"formItem.cate_id"}})],1)],1)],1),0==t.formItem.id?r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"管理员账号:",prop:"store_account","label-for":"store_account"}},[r("Input",{attrs:{placeholder:"请输入管理员账号"},model:{value:t.formItem.store_account,callback:function(e){t.$set(t.formItem,"store_account",e)},expression:"formItem.store_account"}})],1)],1)],1):t._e(),0==t.formItem.id?r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"管理员密码:",prop:"store_password","label-for":"store_password"}},[r("Input",{attrs:{type:"password",placeholder:"请输入管理员密码"},model:{value:t.formItem.store_password,callback:function(e){t.$set(t.formItem,"store_password",e)},expression:"formItem.store_password"}})],1)],1)],1):t._e(),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"门店名称:",prop:"name","label-for":"name"}},[r("Input",{attrs:{maxlength:"20","show-word-limit":"",placeholder:"请输入门店名称"},model:{value:t.formItem.name,callback:function(e){t.$set(t.formItem,"name",e)},expression:"formItem.name"}})],1)],1)],1),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"门店简介:","label-for":"introduction"}},[r("Input",{attrs:{maxlength:"100","show-word-limit":"",rows:4,autosize:{maxRows:4,minRows:4},type:"textarea",placeholder:"请输入门店简介",s:""},model:{value:t.formItem.introduction,callback:function(e){t.$set(t.formItem,"introduction",e)},expression:"formItem.introduction"}})],1)],1)],1),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"门店手机号:","label-for":"phone",prop:"phone"}},[r("Input",{attrs:{placeholder:"请输入门店手机号"},model:{value:t.formItem.phone,callback:function(e){t.$set(t.formItem,"phone",e)},expression:"formItem.phone"}})],1)],1)],1),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"营业状态:","label-for":"is_show",prop:"is_show"}},[r("i-switch",{attrs:{size:"large","false-value":0,"true-value":1},model:{value:t.formItem.is_show,callback:function(e){t.$set(t.formItem,"is_show",e)},expression:"formItem.is_show"}},[r("span",{attrs:{slot:"open","true-value":1},slot:"open"},[t._v("开启")]),r("span",{attrs:{slot:"close","false-value":0},slot:"close"},[t._v("关闭")])])],1)],1)],1),r("Col",{attrs:{span:"24"}},[1==t.formItem.is_show?r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"营业时间:","label-for":"day_time",prop:"day_time"}},[r("TimePicker",{staticClass:"inputW",attrs:{type:"timerange",format:"HH:mm:ss",value:t.formItem.day_time,placement:"bottom-end",placeholder:"请选择营业时间"},on:{"on-change":t.onchangeTime},model:{value:t.formItem.day_time,callback:function(e){t.$set(t.formItem,"day_time",e)},expression:"formItem.day_time"}})],1)],1):t._e()],1),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"门店类型:"}},[r("RadioGroup",{model:{value:t.formItem.type,callback:function(e){t.$set(t.formItem,"type",e)},expression:"formItem.type"}},[r("Radio",{attrs:{label:1}},[r("Icon",{attrs:{type:"social-apple"}}),r("span",[t._v("自营")])],1),r("Radio",{attrs:{label:2}},[r("Icon",{attrs:{type:"social-android"}}),r("span",[t._v("加盟")])],1)],1),r("div",{staticClass:"tips"},[t._v("自营店不支持自主上传商品,加盟店有自主上传商品的权限")])],1)],1)],1),2==t.formItem.type?r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"商品免审:","label-for":"product_verify_status",prop:"product_verify_status"}},[r("i-switch",{attrs:{size:"large","false-value":0,"true-value":1},model:{value:t.formItem.product_verify_status,callback:function(e){t.$set(t.formItem,"product_verify_status",e)},expression:"formItem.product_verify_status"}},[r("span",{attrs:{slot:"open","true-value":1},slot:"open"},[t._v("开启")]),r("span",{attrs:{slot:"close","false-value":0},slot:"close"},[t._v("关闭")])])],1)],1)],1):t._e(),2==t.formItem.type?r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"自主添加商品:","label-for":"product_status",prop:"product_status"}},[r("i-switch",{attrs:{size:"large","false-value":0,"true-value":1},model:{value:t.formItem.product_status,callback:function(e){t.$set(t.formItem,"product_status",e)},expression:"formItem.product_status"}},[r("span",{attrs:{slot:"open","true-value":1},slot:"open"},[t._v("开启")]),r("span",{attrs:{slot:"close","false-value":0},slot:"close"},[t._v("关闭")])])],1)],1)],1):t._e(),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"到店自提:","label-for":"mention",prop:"mention"}},[r("i-switch",{attrs:{size:"large","false-value":0,"true-value":1},model:{value:t.formItem.is_store,callback:function(e){t.$set(t.formItem,"is_store",e)},expression:"formItem.is_store"}},[r("span",{attrs:{slot:"open","true-value":1},slot:"open"},[t._v("开启")]),r("span",{attrs:{slot:"close","false-value":0},slot:"close"},[t._v("关闭")])])],1)],1)],1),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"门店地址:","label-for":"address",prop:"address"}},[r("Cascader",{staticClass:"inputW",attrs:{data:t.addresData,"load-data":t.loadData},on:{"on-change":t.addchack},model:{value:t.formItem.addressSelect,callback:function(e){t.$set(t.formItem,"addressSelect",e)},expression:"formItem.addressSelect"}})],1)],1)],1),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{required:"",label:"配送范围(半径):","label-for":"valid_range",prop:"valid_range"}},[r("InputNumber",{staticStyle:{width:"90px"},attrs:{min:.01,max:1e5,formatter:function(e){return""+t.formItem.valid_range},parser:function(t){return t.replace("%","")}},model:{value:t.formItem.valid_range,callback:function(e){t.$set(t.formItem,"valid_range",e)},expression:"formItem.valid_range"}}),r("span",{staticClass:"ml10"},[t._v("km")])],1)],1)],1),r("Col",{attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"门店详细地址:","label-for":"detailed_address",prop:"detailed_address"}},[r("Input",{staticClass:"inputW",attrs:{search:"","enter-button":"查找位置",placeholder:"输入地址(包含城市名称,否则会影响搜索精度)"},on:{"on-search":t.onSearch},model:{value:t.formItem.detailed_address,callback:function(e){t.$set(t.formItem,"detailed_address",e)},expression:"formItem.detailed_address"}})],1)],1)],1),t.isApi||t.add?r("Col",{attrs:{span:"24"}},[t.mapKey?r("Maps",{ref:"mapChild",staticClass:"map-sty",attrs:{mapKey:t.mapKey,lat:Number(t.formItem.latitude||34.34127),lon:Number(t.formItem.longitude||108.93984),address:t.formItem.detailed_address},on:{getCoordinates:t.getCoordinates}}):t._e()],1):t._e(),t.formItem.id?t._e():r("Col",{staticClass:"mt20",attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"同步商品:"}},[r("RadioGroup",{model:{value:t.formItem.applicable_type,callback:function(e){t.$set(t.formItem,"applicable_type",e)},expression:"formItem.applicable_type"}},[r("Radio",{attrs:{label:1}},[r("Icon",{attrs:{type:"social-apple"}}),r("span",[t._v("全部商品")])],1),r("Radio",{attrs:{label:2}},[r("Icon",{attrs:{type:"social-android"}}),r("span",[t._v("部分商品")])],1)],1)],1)],1)],1),t.formItem.id||2!=t.formItem.applicable_type?t._e():r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"选择商品:","label-for":"product_id",prop:""}},[r("div",{staticClass:"box"},[t._l(t.goodsList,(function(e,o){return r("div",{key:o,staticClass:"box-item"},[r("img",{attrs:{src:e.image,alt:""}}),r("Icon",{staticClass:"icon",attrs:{type:"ios-close-circle",size:"20"},on:{click:function(e){return t.bindDelete(o)}}})],1)})),r("div",{staticClass:"upload-box",on:{click:function(e){t.modals=!0}}},[r("Icon",{attrs:{type:"ios-camera-outline",size:"36"}})],1)],2)])],1)],1),r("Row",{staticStyle:{"justify-content":"space-around"}},[r("Col",[r("Button",{staticClass:"btn",attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit("formItem")}}},[t._v(t._s(0!=t.formItem.id?"修改":"提交"))])],1)],1),t.spinShow?r("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)],1),r("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传提货点logo","mask-closable":!1,"z-index":1},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?r("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic}}):t._e()],1),r("Modal",{attrs:{width:"700px",scrollable:"","footer-hide":"",closable:"",title:"erp门店","mask-closable":!1,"z-index":1},model:{value:t.modalErp,callback:function(e){t.modalErp=e},expression:"modalErp"}},[r("erpList",{ref:"refErp",on:{getProductId:t.getProductId}})],1)],1)]),r("Modal",{staticClass:"paymentFooter",attrs:{title:"商品列表",scrollable:"",width:"900","footer-hide":!0},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[t.modals?r("goods-list",{ref:"goodslist",attrs:{ischeckbox:!0,isLive:!0,storeType:1},on:{getProductId:t.getGoodsId}}):t._e()],1)],1)}),[],!1,null,"40a565a9",null).exports},data:function(){return{BaseURL:"",total:0,loading:!1,formValidate:{type:"all",page:1,limit:15},columns:[{title:"ID",key:"id",width:60},{title:"门店图片",slot:"image",minWidth:80},{title:"门店名称",key:"name",minWidth:80},{title:"门店分类",key:"cate_name",minWidth:80},{title:"联系电话",key:"phone",minWidth:90},{title:"门店地址",key:"address",ellipsis:!0,minWidth:150},{title:"营业时间",key:"day_time",minWidth:120},{title:"营业状态",key:"status_name",minWidth:80},{title:"操作",slot:"action",fixed:"right",minWidth:240,align:"center"}],orderList:[{id:"1",order_id:"12",pay_price:"12",status:1,phone:"13000000000",address:"陕西省西安市莲湖区大兴西路啊餐厨"}]}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;this.loading=!0,Object(c.J)(this.formValidate).then((function(e){t.orderList=e.data.list,t.total=e.data.count,t.loading=!1}))},reset:function(t){var e=this;this.$modalForm(Object(c.x)(t.id)).then((function(){return e.getList()}))},add:function(){this.$refs.template.title="添加门店",this.$refs.template.add=1,this.$refs.template.isTemplate=!0,this.$refs.template.cityInfo({pid:0})},edit:function(t){this.$refs.template.title="编辑门店",this.$refs.template.isTemplate=!0,this.$refs.template.getInfo(t.id)},getExpiresTime:function(t){var e=Math.round(new Date/1e3);return parseFloat(parseFloat(parseFloat((t-e)/60)/60)/24)},gostore:function(t){var e=this;Object(c.K)(t.id).then((function(r){var n=r.data,i=n.expires_time;o.a.cookies.setStore("token",n.token,{expires:i}),o.a.cookies.setStore("uuid",n.user_info.id,{expires:i}),o.a.cookies.setStore("expires_time",i,{expires:i}),o.a.makeMenu("/".concat(n.prefix),n.menus);var s=window.localStorage;s.setItem("menuListStore",JSON.stringify(n.menus)),s.setItem("uniqueAuthStore",JSON.stringify(n.unique_auth));var c={account:n.user_info.account,head_pic:n.user_info.avatar,logo:n.logo,logoSmall:n.logo_square,version:n.version};s.setItem("userInfoStore",JSON.stringify(c)),e.BaseURL=a.a.apiBaseURL.replace(/adminapi/,"".concat(t.prefix,"/home/")),window.open(e.BaseURL)})).catch((function(t){e.$Message.error(t.msg)}))},delte:function(t,e,r){var o=this,a={title:e,num:r,url:"store/store/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){o.$Message.success(t.msg),o.orderList.splice(r,1),o.orderList.length||(o.formValidate.page=1==o.formValidate.page?1:o.formValidate.page-1),o.getList()})).catch((function(t){o.$Message.error(t.msg)}))},operation:function(t){var e=this,r=0;0==t.is_show&&(r=1),1==t.is_show&&(r=0),Object(c.L)(t.id,r).then((function(t){e.getList(),e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(res.msg)}))},searchs:function(){},onClickTab:function(t){this.formValidate.page=1,this.formValidate.type=t,this.getList()},pageChange:function(t){this.formValidate.page=t,this.getList()}}}),C=(r("ac57"),Object(h.a)(w,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("Card",{staticClass:"ivu-mt tablebox",attrs:{bordered:!1,"dis-hover":"",padding:16}},[r("div",{staticClass:"new_tab"},[r("Tabs",{on:{"on-click":t.onClickTab}},[r("TabPane",{attrs:{label:"全部",name:"all"}}),r("TabPane",{attrs:{label:"营业中",name:"1"}}),r("TabPane",{attrs:{label:"已停业",name:"-1"}})],1)],1),r("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加门店")]),r("div",{staticClass:"table"},[r("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:t.columns,data:t.orderList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"image",fn:function(t){var e=t.row;return[r("img",{attrs:{src:e.image}})]}},{key:"action",fn:function(e){var o=e.row,a=e.index;return[r("a",{on:{click:function(e){return t.gostore(o)}}},[t._v("进入门店")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.reset(o)}}},[t._v("重置")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.operation(o)}}},[t._v(t._s(0==o.is_show?"开业":"停业"))]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.edit(o)}}},[t._v("编辑")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.delte(o,"删除门店(同步删除商品)",a)}}},[t._v("删除")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1)],1),r("add-store",{ref:"template"})],1)}),[],!1,null,"27c9eefb",null));e.default=C.exports},"73f5":function(t,e,r){"use strict";r.d(e,"y",(function(){return a})),r.d(e,"r",(function(){return n})),r.d(e,"n",(function(){return i})),r.d(e,"q",(function(){return s})),r.d(e,"s",(function(){return c})),r.d(e,"t",(function(){return l})),r.d(e,"j",(function(){return d})),r.d(e,"i",(function(){return u})),r.d(e,"P",(function(){return m})),r.d(e,"h",(function(){return f})),r.d(e,"v",(function(){return p})),r.d(e,"u",(function(){return h})),r.d(e,"w",(function(){return g})),r.d(e,"p",(function(){return b})),r.d(e,"G",(function(){return _})),r.d(e,"H",(function(){return v})),r.d(e,"E",(function(){return I})),r.d(e,"F",(function(){return y})),r.d(e,"g",(function(){return w})),r.d(e,"B",(function(){return C})),r.d(e,"C",(function(){return O})),r.d(e,"D",(function(){return k})),r.d(e,"O",(function(){return j})),r.d(e,"J",(function(){return x})),r.d(e,"I",(function(){return $})),r.d(e,"e",(function(){return L})),r.d(e,"N",(function(){return F})),r.d(e,"l",(function(){return P})),r.d(e,"K",(function(){return S})),r.d(e,"L",(function(){return E})),r.d(e,"M",(function(){return M})),r.d(e,"k",(function(){return D})),r.d(e,"o",(function(){return T})),r.d(e,"z",(function(){return q})),r.d(e,"m",(function(){return B})),r.d(e,"x",(function(){return z})),r.d(e,"f",(function(){return R})),r.d(e,"A",(function(){return W})),r.d(e,"b",(function(){return K})),r.d(e,"d",(function(){return V})),r.d(e,"c",(function(){return N})),r.d(e,"a",(function(){return A}));var o=r("b6bd");function a(t){return Object(o.a)({url:"merchant/store_list",method:"get",params:t})}function n(t){return Object(o.a)({url:"store/order/list",method:"get",params:t})}function i(t){return Object(o.a)({url:"store/order/chart",method:"get",params:t})}function s(t){return Object(o.a)({url:"store/order/header",method:"get"})}function c(t){return Object(o.a)({url:"store/recharge",method:"get",params:t})}function l(t){return Object(o.a)({url:"store/vip_order",method:"get",params:t})}function d(t){return Object(o.a)({url:"store/order/edit/".concat(t),method:"get"})}function u(t){return Object(o.a)({url:"store/order/distribution/".concat(t),method:"get"})}function m(t){return Object(o.a)({url:"store/order/write_update/".concat(t),method:"put"})}function f(t){return Object(o.a)({url:"store/order/info/".concat(t),method:"get"})}function p(t){return Object(o.a)({url:"order/remark/".concat(t.id),method:"put",data:t.remark})}function h(t){return Object(o.a)({url:"store/recharge/remark/".concat(t.id),method:"put",data:t.remark})}function g(t){return Object(o.a)({url:"store/vip/remark/".concat(t.id),method:"put",data:t.remark})}function b(t,e){return Object(o.a)({url:"store/order/export/".concat(e),method:"post",data:t})}function _(t){return Object(o.a)({url:"store/finance_flow/list",method:"get",params:t})}function v(t,e){return Object(o.a)({url:"store/finance_flow/mark/".concat(t),method:"put",params:e})}function I(t){return Object(o.a)({url:"store/finance_flow/fund_record",method:"get",params:t})}function y(t){return Object(o.a)({url:"store/finance_flow/fund_record_info",method:"get",params:t})}function w(t){return Object(o.a)({url:"/export/storeFinanceRecord",method:"get",params:t})}function C(t){return Object(o.a)({url:"/store/extract/list",method:"get",params:t})}function O(t,e){return Object(o.a)({url:"store/extract/mark/".concat(t),method:"post",data:e})}function k(t,e){return Object(o.a)({url:"store/extract/verify/".concat(t),method:"post",data:e})}function j(t){return Object(o.a)({url:"store/extract/transfer/".concat(t),method:"get"})}function x(t){return Object(o.a)({url:"store/store",method:"get",params:t})}function $(t){return Object(o.a)({url:"store/store/get_info/".concat(t),method:"get"})}function L(t){return Object(o.a)({url:"city",method:"get",params:t})}function F(t,e){return Object(o.a)({url:"store/store/".concat(t),method:"post",data:e})}function P(){return Object(o.a)({url:"store/store/address",method:"get"})}function S(t){return Object(o.a)({url:"store/store/login/".concat(t),method:"get"})}function E(t,e){return Object(o.a)({url:"store/store/set_show/".concat(t,"/").concat(e),method:"put"})}function M(t){return Object(o.a)({url:"store/share/order",method:"post",params:t})}function D(t){return Object(o.a)({url:"store/home/header",method:"get",params:t})}function T(t){return Object(o.a)({url:"store/home/orderChart",method:"get",params:t})}function q(t){return Object(o.a)({url:"store/home/store",method:"get",params:t})}function B(t){return Object(o.a)({url:"store/home/operate",method:"get",params:t})}function z(t){return Object(o.a)({url:"store/store/reset_admin/".concat(t),method:"get"})}function R(t,e,r){return Object(o.a)({url:"export/storeFlowExport?store_id=".concat(t,"&keyword=").concat(e,"&data=").concat(r),method:"get"})}function W(t){return Object(o.a)({url:"/store/category",params:t,method:"get"})}function K(t){return Object(o.a)({url:"/store/category/create/".concat(t),method:"get"})}function V(t){return Object(o.a)({url:"/store/category/tree/".concat(t),method:"get"})}function N(t){return Object(o.a)({url:"/store/category/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function A(t){return Object(o.a)({url:"store/category/cascader_list/".concat(t),method:"get"})}},"897d":function(t,e,r){},ac57:function(t,e,r){"use strict";var o=r("897d");r.n(o).a},c7fc:function(t,e,r){"use strict";var o={props:{lat:{type:Number,default:34.34127},lon:{type:Number,default:108.93984},mapKey:{tyep:String},address:{tyep:String}},data:function(){return{geocoder:void 0,marker:null,resultDatail:{}}},created:function(){this.initMap()},methods:{initMap:function(){var t,e=this;(t=this.mapKey,new Promise((function(e,r){window.init=function(){e(window.qq)};var o=document.createElement("script");o.type="text/javascript",o.src="https://map.qq.com/api/js?v=2.exp&callback=init&key=".concat(t),o.onerror=r,document.head.appendChild(o)}))).then((function(t){var r,o=new t.maps.LatLng(e.lat,e.lon);r=new t.maps.Map(document.getElementById("container"),{zoom:15}),e.geocoder=new t.maps.Geocoder({complete:function(o){r.setCenter(o.detail.location),e.marker=new t.maps.Marker({map:r,position:o.detail.location}),e.resultDatail=o.detail,e.$emit("getCoordinates",o.detail)}}),e.geocoder.getAddress(o),t.maps.event.addListener(r,"click",(function(r){e.marker.setMap(null),e.marker.position={lat:r.latLng.getLat(),lng:r.latLng.getLng()};var o=new t.maps.LatLng(r.latLng.getLat(),r.latLng.getLng());e.geocoder.getAddress(o)}))}))},searchKeyword:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"西安";this.marker.setMap(null),this.geocoder.getLocation(t)}}},a=r("2877"),n=Object(a.a)(o,(function(){return this.$createElement,this._self._c,this._m(0)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticStyle:{width:"100%",height:"450px"},attrs:{id:"container"}})])}],!1,null,"55512a5f",null);e.a=n.exports},c863:function(t,e,r){},ee5f:function(t,e,r){"use strict";var o=r("c863");r.n(o).a}}]);
|