zx/public/mer/js/chunk-169cf82e.50592541.js

1 line
7.6 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-169cf82e"],{"1e65":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",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"article-manager"},[a("div",{staticClass:"ivu-mt"},[a("el-form",{ref:"formItem",attrs:{model:e.formItem,"label-width":e.labelWidth,"label-position":e.labelPosition,rules:e.ruleValidate},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("el-col",e._b({},"el-col",e.grid,!1),[a("el-form-item",{attrs:{label:"提货点名称:",prop:"mer_take_name"}},[a("el-input",{attrs:{placeholder:"请输入提货点名称"},model:{value:e.formItem.mer_take_name,callback:function(t){e.$set(e.formItem,"mer_take_name",t)},expression:"formItem.mer_take_name"}})],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-col",e._b({},"el-col",e.grid,!1),[a("el-form-item",{attrs:{label:"提货点手机号:",prop:"mer_take_phone"}},[a("el-input",{attrs:{type:"number",placeholder:"请输入提货点手机号"},model:{value:e.formItem.mer_take_phone,callback:function(t){e.$set(e.formItem,"mer_take_phone",t)},expression:"formItem.mer_take_phone"}})],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-col",e._b({},"el-col",e.grid,!1),[a("el-form-item",{attrs:{label:"详细地址:",prop:"mer_take_address"}},[a("el-input",{attrs:{placeholder:"请输入详细地址"},model:{value:e.formItem.mer_take_address,callback:function(t){e.$set(e.formItem,"mer_take_address",t)},expression:"formItem.mer_take_address"}})],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-col",e._b({},"el-col",e.grid,!1),[a("el-form-item",{attrs:{label:"提货点营业日期:",prop:"mer_take_day"}},[a("el-select",{staticClass:"selWidth",attrs:{filterable:"",multiple:"",placeholder:"请选择营业时间"},model:{value:e.formItem.mer_take_day,callback:function(t){e.$set(e.formItem,"mer_take_day",t)},expression:"formItem.mer_take_day"}},e._l(e.date,(function(e){return a("el-option",{key:e.date_id,attrs:{label:e.date_name,value:e.date_id}})})),1)],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-col",e._b({},"el-col",e.grid,!1),[a("el-form-item",{attrs:{label:"提货点营业时间:",prop:"mer_take_time"}},[a("el-time-picker",{attrs:{"is-range":"","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",placeholder:"选择时间范围","value-format":"HH:mm"},on:{change:e.onchangeTime},model:{value:e.formItem.mer_take_time,callback:function(t){e.$set(e.formItem,"mer_take_time",t)},expression:"formItem.mer_take_time"}})],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-col",e._b({},"el-col",e.grid,!1),[a("el-form-item",{attrs:{label:"经纬度:",prop:"mer_take_location"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{"enter-button":"查找位置",placeholder:"请查找位置",readonly:""},model:{value:e.formItem.mer_take_location,callback:function(t){e.$set(e.formItem,"mer_take_location",t)},expression:"formItem.mer_take_location"}},[a("el-button",{staticStyle:{background:"#46a6ff",color:"#fff","border-radius":"0 4px 4px 0"},attrs:{slot:"append"},on:{click:e.onSearch},slot:"append"},[e._v("查找位置")])],1),e._v(" "),a("div",{attrs:{slot:"content"},slot:"content"},[e._v("请点击查找位置选择位置")])],1)],1),e._v(" "),a("el-col",[a("el-form-item",{attrs:{label:"是否开启门店自提:"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,width:55,"active-text":"开启","inactive-text":"关闭"},model:{value:e.formItem.mer_take_status,callback:function(t){e.$set(e.formItem,"mer_take_status",t)},expression:"formItem.mer_take_status"}})],1)],1)],1)],1),e._v(" "),a("el-row",[a("el-col",e._b({},"el-col",e.grid,!1),[a("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:function(t){return e.handleSubmit("formItem")}}},[e._v("提交")])],1)],1)],1)],1),e._v(" "),e.modalMap?a("el-dialog",{staticClass:"mapBox",attrs:{visible:e.modalMap,title:"选择位置","close-on-click-modal":"","custom-class":"dialog-scustom"},on:{"update:visible":function(t){e.modalMap=t}},model:{value:e.modalMap,callback:function(t){e.modalMap=t},expression:"modalMap"}},[a("iframe",{attrs:{id:"mapPage",width:"100%",height:"500px",frameborder:"0",src:e.keyUrl}})]):e._e()],1)])],1)},o=[],l=a("c80c"),m=(a("96cf"),a("3b8d")),s=(a("28a5"),a("7f7f"),a("90e7")),i={name:"SystemStore",components:{},props:{},data:function(){var e=function(e,t,a){if(!t)return a(new Error("请填写手机号"));/^1[3456789]\d{9}$/.test(t)?a():a(new Error("手机号格式不正确!"))};return{modalMap:!1,labelPosition:"right",labelWidth:"130px",key:"",date:[{date_name:"周一",date_id:1},{date_name:"周二",date_id:2},{date_name:"周三",date_id:3},{date_name:"周四",date_id:4},{date_name:"周五",date_id:5},{date_name:"周六",date_id:6},{date_name:"周日",date_id:7}],formItem:{mer_take_name:"",mer_take_phone:"",mer_take_address:"",mer_take_time:["",""],mer_take_day:[],mer_take_location:"",id:0,mer_take_status:0},ruleValidate:{mer_take_name:[{required:!0,message:"请输入提货点名称",trigger:"blur"}],mer_take_day:[{required:!0,type:"array",message:"请选择提货点营业日期",trigger:"change"}],mer_take_time:[{required:!0,message:"请选择提货点营业时间",trigger:"change"}],mer_take_phone:[{required:!0,validator:e,trigger:"blur"}],mer_take_address:[{required:!0,message:"请输入详细地址",trigger:"blur"}],mer_take_location:[{required:!0,message:"请选择经纬度",trigger:"blur"}]},keyUrl:"",grid:{xl:20,lg:20,md:20,sm:24,xs:24},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12}}},created:function(){},mounted:function(){window.addEventListener("message",(function(e){var t=e.data;t&&"locationPicker"===t.module&&window.parent.selectAdderss(t)}),!1),window.selectAdderss=this.selectAdderss,this.getInfo()},methods:{onchangeTime:function(e){this.formItem.mer_take_time=e},selectAdderss:function(e){this.formItem.mer_take_location=e.latlng.lat+","+e.latlng.lng,this.modalMap=!1},getInfo:function(){var e=this,t=this;Object(s["P"])().then((function(a){e.key=a.data.tx_map_key;var r=a.data.tx_map_key;e.keyUrl="https://apis.map.qq.com/tools/locpicker?type=1&key=".concat(r,"&referer=myapp");var o=a.data||null;t.formItem.mer_take_time=o.mer_take_time||["",""],t.formItem.mer_take_day=o.mer_take_day||[],t.formItem.mer_take_phone=o.mer_take_phone,t.formItem.mer_take_name=o.mer_take_name,t.formItem.mer_take_address=o.mer_take_address,t.formItem.mer_take_location=o.mer_take_location&&o.mer_take_location.length?o.mer_take_location[0]+","+o.mer_take_location[1]:"",t.formItem.mer_take_status=o.mer_take_status||0})).catch((function(e){t.spinShow=!1,t.$message.error(e.message)}))},onSearch:function(){this.key&&""!=this.key?this.modalMap=!0:this.$message.error("平台未配置腾讯地图KEY")},handleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;var a=t.formItem.mer_take_location?[t.formItem.mer_take_location.split(",")[0],t.formItem.mer_take_location.split(",")[1]]:[],r=Object.assign({},t.formItem);r.mer_take_location=a,Object(s["Q"])(r).then(function(){var e=Object(m["a"])(Object(l["a"])().mark((function e(a){return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$message.success(a.message),t.getInfo();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))}))}}},n=i,c=(a("b64d"),a("2877")),_=Object(c["a"])(n,r,o,!1,null,"3b71b567",null);t["default"]=_.exports},b64d:function(e,t,a){"use strict";a("f1d5")},f1d5:function(e,t,a){}}]);