mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-01-04 19:08:13 +00:00
1 line
19 KiB
JavaScript
1 line
19 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2762145e"],{"6cf8":function(t,e,r){},a402:function(t,e,r){"use strict";r.r(e);var n=r("0122"),o=r("c964"),a=r("f3f3"),i=(r("d9e2"),r("ac1f"),r("00b4"),r("d81d"),r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("159b"),r("b0c0"),r("131a"),r("fb6a"),r("90e7")),c=r("2f62"),l=r("b0e7"),u=r("b562");function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(e){u=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var a,i,c,l;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new O(n||[]);return o(e,"_invoke",{value:(a=t,i=r,c=n,l="suspendedStart",function(t,e){if("executing"===l)throw new Error("Generator is already running");if("completed"===l){if("throw"===t)throw e;return I()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r&&(r=function t(e,r){var n=r.method,o=e.iterator[n];return void 0===o?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m):(n=f(o,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,m):(o=n.arg,o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)))}(r,c),r)){if(r===m)continue;return r}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===l)throw l="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(l="executing",r=f(a,i,c),"normal"===r.type){if(l=c.done?"completed":"suspendedYield",r.arg===m)continue;return{value:r.arg,done:c.done}}"throw"===r.type&&(l="completed",c.method="throw",c.arg=r.arg)}})}),e}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var m={};function p(){}function h(){}function g(){}a={};var b=(u(a,i,(function(){return this})),Object.getPrototypeOf),y=(b=b&&b(b(j([]))),b&&b!==e&&r.call(b,i)&&(a=b),g.prototype=p.prototype=Object.create(a));function v(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var a;o(this,"_invoke",{value:function(o,i){function c(){return new e((function(a,c){!function o(a,i,c,l){var u;a=f(t[a],t,i);if("throw"!==a.type)return(i=(u=a.arg).value)&&"object"==Object(n.a)(i)&&r.call(i,"__await")?e.resolve(i.__await).then((function(t){o("next",t,c,l)}),(function(t){o("throw",t,c,l)})):e.resolve(i).then((function(t){u.value=t,c(u)}),(function(t){return o("throw",t,c,l)}));l(a.arg)}(o,i,a,c)}))}return a=a?a.then(c,c):c()}})}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e,n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:I}}function I(){return{value:void 0,done:!0}}return o(y,"constructor",{value:h.prototype=g,configurable:!0}),o(g,"constructor",{value:h,configurable:!0}),h.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(w.prototype),u(w.prototype,c,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new w(d(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},v(y),u(y,l,"Generator"),u(y,i,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;0<=o;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}var i=(a=a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc?null:a)?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,x(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),m}},t}l={name:"systemStore",components:{uploadPictures:l.a},data:function(){var t=this;return{spinShow:!1,modalMap:!1,addresData:[],formItem:{name:"",introduction:"",phone:"",address:[],address2:[],detailed_address:"",valid_time:[],day_time:["",""],latlng:"",id:0},ruleValidate:{name:[{required:!0,message:"请输入门店名称",trigger:"blur"}],mail:[{required:!0,message:"Mailbox cannot be empty",trigger:"blur"},{type:"email",message:"Incorrect email format",trigger:"blur"}],address:[{required:!0,message:"请选择门店地址",type:"array",trigger:"change"}],valid_time:[{required:!0,type:"array",message:"请选择核销时效",trigger:"change",fields:{0:{type:"date",required:!0,message:"请选择年度范围"},1:{type:"date",required:!0,message:"请选择年度范围"}}}],day_time:[{required:!0,type:"array",message:"请选择门店营业时间",trigger:"change"}],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,n){t.formItem.image?n():n(new Error("请上传门店logo"))},trigger:"change"}],latlng:[{required:!0,message:"请选择经纬度",trigger:"blur"}]},keyUrl:"",grid:{xl:10,lg:16,md:18,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:"单选"}},created:function(){this.getCityList(),this.getKey(),this.getFrom()},computed:Object(a.a)(Object(a.a)({},Object(c.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){window.addEventListener("message",(function(t){t=t.data,t&&"locationPicker"===t.module&&window.parent.selectAdderss(t)}),!1),window.selectAdderss=this.selectAdderss},methods:{getCityList:function(){var t=this;Object(u.b)().then((function(e){e.data.map((function(t){t.value=t.label,t.children&&t.children.length&&t.children.map((function(t){t.value=t.label,t.children&&t.children.length&&t.children.map((function(t){t.value=t.label}))}))})),t.addresData=e.data}))},selectAdderss:function(t){this.formItem.latlng=t.latlng.lat+","+t.latlng.lng,this.modalMap=!1},getKey:function(){var t=this;Object(i.I)().then(function(){var e=Object(o.a)(s().mark((function e(r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data.key,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)}}()).catch((function(e){t.$message.error(e.msg)}))},getFrom:function(){var t=this;this.spinShow=!0,Object(i.Eb)().then(function(){var e=Object(o.a)(s().mark((function e(r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data.info||null,t.formItem=n||t.formItem,t.formItem.address=n.address2,t.spinShow=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$message.error(e.msg)}))},modalPicTap:function(){this.modalPic=!0},getPic:function(t){this.formItem.image=t.att_dir,this.modalPic=!1},handleChange:function(t,e){this.formItem.address=e.map((function(t){return t.label}))},onchangeDate:function(t){this.formItem.valid_time=t},onchangeTime:function(t){this.formItem.day_time=t},onSearch:function(){this.modalMap=!0},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return!1;Object(i.Db)(e.formItem).then(function(){var t=Object(o.a)(s().mark((function t(r){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.msg)}))}))}}},r("d0e6"),a=r("2877"),c=Object(a.a)(l,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.spinShow,expression:"spinShow"}],staticClass:"article-manager"},[e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never"}},[e("el-form",{ref:"formItem",attrs:{model:t.formItem,"label-width":t.labelWidth,"label-position":t.labelPosition,rules:t.ruleValidate},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-row",{attrs:{gutter:24}},[e("el-col",{attrs:{span:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-form-item",{attrs:{label:"门店名称:",prop:"name","label-for":"name"}},[e("el-input",{attrs:{placeholder:"请输入门店名称"},model:{value:t.formItem.name,callback:function(e){t.$set(t.formItem,"name",e)},expression:"formItem.name"}})],1)],1)],1),e("el-col",{attrs:{span:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-form-item",{attrs:{label:"门店简介:","label-for":"introduction"}},[e("el-input",{attrs:{placeholder:"请输入门店简介"},model:{value:t.formItem.introduction,callback:function(e){t.$set(t.formItem,"introduction",e)},expression:"formItem.introduction"}})],1)],1)],1),e("el-col",{attrs:{span:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-form-item",{attrs:{label:"门店手机号:","label-for":"phone",prop:"phone"}},[e("el-input",{attrs:{type:"number",placeholder:"请输入门店手机号"},model:{value:t.formItem.phone,callback:function(e){t.$set(t.formItem,"phone",e)},expression:"formItem.phone"}})],1)],1)],1),e("el-col",{attrs:{span:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-form-item",{attrs:{label:"门店地址:","label-for":"address",prop:"address"}},[e("el-cascader",{attrs:{options:t.addresData,value:t.formItem.address},on:{change:t.handleChange},model:{value:t.formItem.address,callback:function(e){t.$set(t.formItem,"address",e)},expression:"formItem.address"}})],1)],1)],1),e("el-col",{attrs:{span:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-form-item",{attrs:{label:"详细地址:","label-for":"detailed_address",prop:"detailed_address"}},[e("el-input",{attrs:{placeholder:"请输入详细地址"},model:{value:t.formItem.detailed_address,callback:function(e){t.$set(t.formItem,"detailed_address",e)},expression:"formItem.detailed_address"}})],1)],1)],1),e("el-col",{attrs:{span:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-form-item",{attrs:{label:"核销时效:","label-for":"valid_time"}},[e("el-date-picker",{attrs:{clearable:"",editable:!1,format:"yyyy/MM/dd",type:"daterange","value-format":"yyyy/MM/dd","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.onchangeDate},model:{value:t.formItem.valid_time,callback:function(e){t.$set(t.formItem,"valid_time",e)},expression:"formItem.valid_time"}})],1)],1)],1),e("el-col",{attrs:{span:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-form-item",{attrs:{label:"门店营业:","label-for":"day_time"}},[e("el-time-picker",{attrs:{format:"HH:mm:ss","value-format":"HH:mm:ss","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间",placeholder:"选择时间范围"},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)],1),e("el-col",{attrs:{span:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-form-item",{attrs:{label:"门店logo:",prop:"image"}},[e("div",{staticClass:"picBox",on:{click:function(e){return t.modalPicTap("单选")}}},[t.formItem.image?e("div",{staticClass:"pictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formItem.image,expression:"formItem.image"}]})]):e("div",{staticClass:"upLoad acea-row row-center-wrapper"},[e("i",{staticClass:"el-icon-picture-outline",staticStyle:{"font-size":"24px"}})])])])],1)],1),e("el-col",{attrs:{span:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-form-item",{attrs:{label:"经纬度:","label-for":"status2",prop:"latlng"}},[e("el-tooltip",[e("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请查找位置"},model:{value:t.formItem.latlng,callback:function(e){t.$set(t.formItem,"latlng",e)},expression:"formItem.latlng"}},[e("el-button",{attrs:{slot:"append",type:"primary"},on:{click:t.onSearch},slot:"append"},[t._v("查找位置")])],1),e("div",{attrs:{slot:"content"},slot:"content"},[t._v("请点击查找位置选择位置")])],1)],1)],1)],1)],1),e("el-row",[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-button",{staticClass:"ml20",attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit("formItem")}}},[t._v("提交")])],1)],1)],1)],1),e("el-dialog",{attrs:{visible:t.modalPic,width:"1024px",title:"上传商品图","close-on-click-modal":!1,"show-close":!0},on:{"update:visible":function(e){t.modalPic=e}}},[t.modalPic?e("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic}}):t._e()],1),e("el-dialog",{staticClass:"mapBox",attrs:{visible:t.modalMap,title:"上传商品图","show-close":!0,"close-on-click-modal":!1},on:{"update:visible":function(e){t.modalMap=e}}},[e("iframe",{attrs:{id:"mapPage",width:"100%",height:"100%",frameborder:"0",src:t.keyUrl}})])],1)}),[],!1,null,"6fc26379",null),e.default=c.exports},b562:function(t,e,r){"use strict";r.d(e,"l",(function(){return o})),r.d(e,"u",(function(){return a})),r.d(e,"q",(function(){return i})),r.d(e,"a",(function(){return c})),r.d(e,"i",(function(){return l})),r.d(e,"j",(function(){return u})),r.d(e,"k",(function(){return s})),r.d(e,"f",(function(){return d})),r.d(e,"g",(function(){return f})),r.d(e,"h",(function(){return m})),r.d(e,"r",(function(){return p})),r.d(e,"t",(function(){return h})),r.d(e,"s",(function(){return g})),r.d(e,"x",(function(){return b})),r.d(e,"v",(function(){return y})),r.d(e,"w",(function(){return v})),r.d(e,"p",(function(){return w})),r.d(e,"n",(function(){return _})),r.d(e,"o",(function(){return x})),r.d(e,"m",(function(){return O})),r.d(e,"c",(function(){return j})),r.d(e,"b",(function(){return I})),r.d(e,"e",(function(){return k})),r.d(e,"d",(function(){return E})),r("99af");var n=r("6b6c");function o(){return Object(n.a)({url:"app/routine/syncSubscribe",method:"GET"})}function a(){return Object(n.a)({url:"app/wechat/syncSubscribe",method:"GET"})}function i(t){return Object(n.a)({url:"app/wechat/menu",method:"get"})}function c(t){return Object(n.a)({url:"app/wechat/menu",method:"post",data:t})}function l(t){return Object(n.a)({url:t.url,method:"post",data:t.key})}function u(t){return Object(n.a)({url:"app/routine/download",method:"post",data:t})}function s(){return Object(n.a)({url:"app/routine/info",method:"get"})}function d(t){return Object(n.a)({url:"app/wechat/keyword",method:"get",params:t})}function f(t){return Object(n.a)({url:"app/wechat/keyword/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function m(t,e){return Object(n.a)({url:t,method:"get",params:e.key})}function p(t){return Object(n.a)({url:"/app/wechat/news",method:"POST",data:t})}function h(t){return Object(n.a)({url:"app/wechat/news",method:"GET",params:t})}function g(t){return Object(n.a)({url:"app/wechat/news/".concat(t),method:"GET"})}function b(){return Object(n.a)({url:"app/wechat/tag",method:"GET"})}function y(){return Object(n.a)({url:"app/wechat/tag/create",method:"GET"})}function v(t){return Object(n.a)({url:"app/wechat/tag/".concat(t,"/edit"),method:"GET"})}function w(){return Object(n.a)({url:"app/wechat/group",method:"GET"})}function _(){return Object(n.a)({url:"app/wechat/group/create",method:"GET"})}function x(t){return Object(n.a)({url:"app/wechat/group/".concat(t,"/edit"),method:"GET"})}function O(t){return Object(n.a)({url:"app/wechat/action",method:"GET",params:t})}function j(t){return Object(n.a)({url:"app/wechat/code_reply/".concat(t),method:"GET"})}function I(){return Object(n.a)({url:"setting/city/full_list",method:"GET"})}function k(t){return Object(n.a)({url:"app/kefu/auto_reply/list",method:"get",params:t})}function E(t){return Object(n.a)({url:"app/kefu/auto_reply/form/"+t,method:"get"})}},d0e6:function(t,e,r){"use strict";var n=r("6cf8");r.n(n).a}}]); |