(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3f31a850"],{"2f2c":function(t,e,r){"use strict";r.d(e,"b",(function(){return u})),r.d(e,"c",(function(){return d})),r.d(e,"p",(function(){return m})),r.d(e,"d",(function(){return h})),r.d(e,"a",(function(){return f})),r.d(e,"g",(function(){return p})),r.d(e,"h",(function(){return v})),r.d(e,"j",(function(){return g})),r.d(e,"i",(function(){return y})),r.d(e,"e",(function(){return b})),r.d(e,"m",(function(){return w})),r.d(e,"o",(function(){return F})),r.d(e,"l",(function(){return x})),r.d(e,"n",(function(){return O})),r.d(e,"k",(function(){return _})),r.d(e,"f",(function(){return j}));var n=r("b775");function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function f(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(c){return void r(c)}s.done?e(l):Promise.resolve(l).then(n,a)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){f(i,n,a,o,s,"next",t)}function s(t){f(i,n,a,o,s,"throw",t)}o(void 0)}))}}var v={name:"index",components:{Templates:u["a"]},data:function(){var t=this,e=function(t,e,r){if(!e)return r(new Error("请填写手机号"));/^1[3456789]\d{9}$/.test(e)?r():r(new Error("手机号格式不正确!"))},r=function(e,r,n){t.ruleForm.image?n():n(new Error("请上传提货点logo"))};return{loading:!1,dialogFormVisible:!1,modalMap:!1,keyUrl:"",addresData:[],ruleForm:{name:"",introduction:"",phone:"",address:"",detailedAddress:"",dayTime:"",image:"",latitude:""},id:0,dayTime:["",""],rules:{name:[{required:!0,message:"请输入提货点名称",trigger:"blur"}],address:[{required:!0,message:"请选择提货点地址",trigger:"change"}],dayTime:[{required:!0,type:"array",message:"请选择提货点营业时间",trigger:"change"}],phone:[{required:!0,validator:e,trigger:"blur"}],detailedAddress:[{required:!0,message:"请输入详细地址",trigger:"blur"}],image:[{required:!0,validator:r,trigger:"change"}],latitude:[{required:!0,message:"请选择经纬度",trigger:"blur"}]}}},created:function(){this.ruleForm.image="";var t=JSON.parse(sessionStorage.getItem("cityList"));this.addresData=t,this.getCityList(),this.getKey()},mounted:function(){window.addEventListener("message",(function(t){var e=t.data;e&&"locationPicker"===e.module&&window.parent.selectAdderss(e)}),!1),window.selectAdderss=this.selectAdderss},methods:{getInfo:function(t){var e=this,r=this;r.id=t,this.loading=!0,Object(s["e"])({id:t}).then((function(t){r.ruleForm=t,r.ruleForm.address=t.address.split(","),r.dayTime=t.dayTime.split(","),e.loading=!1}))},cancel:function(){this.dialogFormVisible=!1,this.clearFrom(),this.ruleForm.image="",this.resetForm("ruleForm"),this.id=0},resetForm:function(t){this.$refs[t].resetFields()},submitForm:Object(d["a"])((function(t){var e=this;this.$refs[t].validate((function(r){if(!r)return!1;Object(s["h"])(e.ruleForm).then(p(h().mark((function r(){return h().wrap((function(r){while(1)switch(r.prev=r.next){case 0:e.$message.success("提交成功"),e.dialogFormVisible=!1,e.$parent.tableList(),e.$parent.storeGetCount(),e.clearFrom(),e.resetForm(t),e.id=0;case 7:case"end":return r.stop()}}),r)}))))}))})),editForm:Object(d["a"])((function(t){var e=this;this.$refs[t].validate((function(r){if(!r)return!1;e.handleChange(e.ruleForm.address),Object(s["o"])(e.ruleForm,e.id).then(p(h().mark((function r(){return h().wrap((function(r){while(1)switch(r.prev=r.next){case 0:e.$message.success("编辑成功"),e.dialogFormVisible=!1,e.$parent.tableList(),e.clearFrom(),e.resetForm(t),e.id=0;case 6:case"end":return r.stop()}}),r)}))))}))})),clearFrom:function(){this.ruleForm.introduction="",this.dayTime=["",""]},handleChange:function(t){var e=t[0],r=t[1],n=t[2];2===t.length?this.ruleForm.address=e+","+r:3===t.length&&(this.ruleForm.address=e+","+r+","+n)},onchangeTime:function(t){this.ruleForm.dayTime=t?t.join(","):""},modalPicTap:function(t){var e=this;this.$modalUpload((function(t){e.ruleForm.image=t[0].sattDir}),t,"system")},onSearch:function(){this.modalMap=!0},selectAdderss:function(t){this.ruleForm.latitude=t.latlng.lat+","+t.latlng.lng,this.modalMap=!1},getKey:function(){var t=this;Object(c["i"])().then(function(){var e=p(h().mark((function e(r){var n;return h().wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=r.value,t.keyUrl="https://apis.map.qq.com/tools/locpicker?type=1&key=".concat(n,"&referer=myapp");case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},getCityList:function(){var t=this;l["c"]().then((function(e){sessionStorage.setItem("cityList",JSON.stringify(e));var r=JSON.parse(sessionStorage.getItem("cityList"));t.addresData=r})).catch((function(e){t.$message.error(e.message)}))}}},g=v,y=(r("3088"),r("2877")),b=Object(y["a"])(g,i,o,!1,null,null,null),w=b.exports,F=r("e350"),x={name:"Point",components:{systemStore:w},data:function(){return{artFrom:{page:1,limit:20,status:"1",keywords:""},loading:!1,tableData:[],total:0,headerCount:{}}},created:function(){this.storeGetCount(),this.tableList()},methods:{checkPermi:F["a"],storeGetCount:function(){var t=this;Object(s["d"])().then((function(e){t.headerCount=e}))},tableList:function(){var t=this;t.loading=!0,Object(s["f"])(t.artFrom).then((function(e){t.loading=!1,t.tableData=e.list,t.total=e.total}))},pageChange:function(t){this.artFrom.page=t,this.tableList()},sizeChange:function(t){this.artFrom.limit=t,this.tableList()},onClickTab:function(){this.artFrom.keywords="",this.tableList()},search:function(){this.artFrom.page=1,this.tableList()},onchangeIsShow:function(t,e){var r=this;Object(s["p"])({id:t,status:e}).then((function(){r.$message.success("操作成功"),r.tableList(),r.storeGetCount()})).catch((function(){row.isShow=!row.isShow}))},storeRecovery:function(t){var e=this;this.$modalSure("恢复提货吗").then((function(){Object(s["g"])({id:t}).then((function(){e.$message.success("恢复成功"),e.storeGetCount(),e.tableList()}))}))},storeDelete:function(t){var e=this;e.$modalSure("删除提货点吗?").then((function(){Object(s["c"])({id:t}).then((function(){e.$message.success("删除成功"),e.storeGetCount(),e.tableList()}))}))},allDelete:function(t){var e=this;this.$modalSure().then((function(){Object(s["a"])({id:t}).then((function(){e.$message.success("删除成功"),e.storeGetCount(),e.tableList()}))}))},add:function(){this.$refs.template.dialogFormVisible=!0},edit:function(t){this.$refs.template.dialogFormVisible=!0,this.$refs.template.getInfo(t)}}},O=x,_=Object(y["a"])(O,n,a,!1,null,"2e3722e0",null);e["default"]=_.exports}}]);