You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
26 KiB
1 lines
26 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9ffd7a0e"],{"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),Math.easeInOutQuad=function(t,e,a,r){return t/=r/2,t<1?a/2*t*t+e:(t--,-a/2*(t*(t-2)-1)+e)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function n(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(t,e,a){var s=o(),i=t-s,c=20,l=0;e="undefined"===typeof e?500:e;var u=function t(){l+=c;var o=Math.easeInOutQuad(l,s,i,e);n(o),l<e?r(t):a&&"function"===typeof a&&a()};u()}},1034:function(t,e,a){"use strict";var r=a("27fe"),n=a.n(r);n.a},"204c":function(t,e,a){"use strict";var r=a("ff59"),n=a.n(r);n.a},"27ae":function(t,e,a){(function(a){var r,n;(function(e,a){t.exports=a(e)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof a?a:this,(function(a){"use strict";a=a||{};var o,s=a.Base64,i="2.6.4",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(t){for(var e={},a=0,r=t.length;a<r;a++)e[t.charAt(a)]=a;return e}(c),u=String.fromCharCode,m=function(t){if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?u(192|e>>>6)+u(128|63&e):u(224|e>>>12&15)+u(128|e>>>6&63)+u(128|63&e)}e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return u(240|e>>>18&7)+u(128|e>>>12&63)+u(128|e>>>6&63)+u(128|63&e)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function(t){return t.replace(d,m)},p=function(t){var e=[0,2,1][t.length%3],a=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0),r=[c.charAt(a>>>18),c.charAt(a>>>12&63),e>=2?"=":c.charAt(a>>>6&63),e>=1?"=":c.charAt(63&a)];return r.join("")},h=a.btoa&&"function"==typeof a.btoa?function(t){return a.btoa(t)}:function(t){if(t.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return t.replace(/[\s\S]{1,3}/g,p)},b=function(t){return h(f(String(t)))},g=function(t){return t.replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"})).replace(/=/g,"")},v=function(t,e){return e?g(b(t)):b(t)},w=function(t){return v(t,!0)};a.Uint8Array&&(o=function(t,e){for(var a="",r=0,n=t.length;r<n;r+=3){var o=t[r],s=t[r+1],i=t[r+2],l=o<<16|s<<8|i;a+=c.charAt(l>>>18)+c.charAt(l>>>12&63)+("undefined"!=typeof s?c.charAt(l>>>6&63):"=")+("undefined"!=typeof i?c.charAt(63&l):"=")}return e?g(a):a});var y,x=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,k=function(t){switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),a=e-65536;return u(55296+(a>>>10))+u(56320+(1023&a));case 3:return u((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return u((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},P=function(t){return t.replace(x,k)},T=function(t){var e=t.length,a=e%4,r=(e>0?l[t.charAt(0)]<<18:0)|(e>1?l[t.charAt(1)]<<12:0)|(e>2?l[t.charAt(2)]<<6:0)|(e>3?l[t.charAt(3)]:0),n=[u(r>>>16),u(r>>>8&255),u(255&r)];return n.length-=[0,0,2,1][a],n.join("")},O=a.atob&&"function"==typeof a.atob?function(t){return a.atob(t)}:function(t){return t.replace(/\S{1,4}/g,T)},M=function(t){return O(String(t).replace(/[^A-Za-z0-9\+\/]/g,""))},A=function(t){return P(O(t))},B=function(t){return String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},D=function(t){return A(B(t))};a.Uint8Array&&(y=function(t){return Uint8Array.from(M(B(t)),(function(t){return t.charCodeAt(0)}))});var z=function(){var t=a.Base64;return a.Base64=s,t};if(a.Base64={VERSION:i,atob:M,btoa:h,fromBase64:D,toBase64:v,utob:f,encode:v,encodeURI:w,btou:P,decode:D,noConflict:z,fromUint8Array:o,toUint8Array:y},"function"===typeof Object.defineProperty){var F=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};a.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",F((function(){return D(this)}))),Object.defineProperty(String.prototype,"toBase64",F((function(t){return v(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",F((function(){return v(this,!0)})))}}return a["Meteor"]&&(Base64=a.Base64),t.exports?t.exports.Base64=a.Base64:(r=[],n=function(){return a.Base64}.apply(e,r),void 0===n||(t.exports=n)),{Base64:a.Base64}}))}).call(this,a("c8ba"))},"27fe":function(t,e,a){},"39be":function(t,e,a){"use strict";var r=a("6a54"),n=a.n(r);n.a},"3cb9":function(t,e,a){"use strict";var r=a("7082"),n=a.n(r);n.a},"484d":function(t,e,a){},"4fad":function(t,e,a){var r=a("23e7"),n=a("6f53").entries;r({target:"Object",stat:!0},{entries:function(t){return n(t)}})},"5c52":function(t,e,a){"use strict";var r=a("ac91"),n=a.n(r);n.a},6153:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"management-page"},[a("SearchBar",{staticClass:"search-bar",on:{query:t.query,addManagement:t.addManagement}}),a("Container",{attrs:{"data-list":t.dataList},on:{fetch:t.fetch}}),a("Dialog",{attrs:{title:"新建商家",visible:t.dialogVisible,fullscreen:!1,width:"55%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("AddDialog",{on:{close:t.closeDialog,addManagement:t.addManagement}})],1)],1)},n=[],o=(a("96cf"),a("1da1")),s=a("5c96"),i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"search-bar-component"},[a("Form",{attrs:{inline:!0,model:t.formParams}},[a("form-item",{attrs:{label:"店铺名称"}},[a("Input",{attrs:{size:"mini",placeholder:"店铺名称"},model:{value:t.formParams.name,callback:function(e){t.$set(t.formParams,"name",e)},expression:"formParams.name"}})],1),a("form-item",{attrs:{label:"店铺编码"}},[a("Input",{attrs:{size:"mini",placeholder:"店铺编码"},model:{value:t.formParams.code,callback:function(e){t.$set(t.formParams,"code",e)},expression:"formParams.code"}})],1),a("form-item",{attrs:{label:"负责人"}},[a("Input",{attrs:{size:"mini",placeholder:"负责人"},model:{value:t.formParams.duty,callback:function(e){t.$set(t.formParams,"duty",e)},expression:"formParams.duty"}})],1),a("form-item",{attrs:{label:"合同状态"}},[a("Select",{attrs:{size:"mini"},model:{value:t.formParams.status.code,callback:function(e){t.$set(t.formParams.status,"code",e)},expression:"formParams.status.code"}},[a("Option",{attrs:{label:"全部",value:"NORMAL"}}),a("Option",{attrs:{label:"有效",value:"NORMAL"}}),a("Option",{attrs:{label:"无效",value:"FORBIDDEN"}})],1)],1),a("form-item",[a("Button",{attrs:{type:"primary",size:"mini"},on:{click:t.query}},[t._v("查询")]),a("Button",{attrs:{plain:"",size:"mini"},on:{click:t.reset}},[t._v("重置")]),a("Button",{attrs:{type:"success",size:"mini"},on:{click:t.addManagement}},[t._v("新建商家")])],1)],1)],1)},c=[],l={components:{Form:s["Form"],FormItem:s["FormItem"],Input:s["Input"],Select:s["Select"],Option:s["Option"],Button:s["Button"]},data:function(){return{formParams:{name:"",code:"",duty:"",status:{code:""}}}},methods:{query:function(){this.$emit("query",this.formParams)},addManagement:function(){this.$emit("addManagement")},reset:function(){this.formParams={name:"",code:"",duty:"",status:{code:""}}}}},u=l,m=(a("e1c5"),a("204c"),a("2877")),d=Object(m["a"])(u,i,c,!1,null,"4ca63d19",null),f=d.exports,p=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"management-container-component"},[a("Table",{staticStyle:{width:"100%"},attrs:{data:t.dataList.records,border:""}},[a("table-column",{attrs:{prop:"name",label:"店铺名称"}}),a("table-column",{attrs:{prop:"code",label:"店铺编码"}}),a("table-column",{attrs:{prop:"duty",label:"负责人",width:"180"}}),a("table-column",{attrs:{prop:"contactTel",label:"联系电话",width:"180"}}),a("table-column",{attrs:{label:"合同状态",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t._f("state")(e.row.status.code))+" ")]}}])}),a("table-column",{attrs:{prop:"createTime",label:"创建时间",width:"180"}}),a("table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),t.checkRow(e.row,!0)}}},[t._v(" 查看 ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),t.checkRow(e.row,!1)}}},[t._v(" 编辑 ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),t.prohibit(e.row)}}},[t._v(" "+t._s(t._f("prohibitTips")(e.row.status.code))+" ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),t.fixRole(e.row)}}},[t._v(" 权限恢复 ")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.dataList.total>0,expression:"dataList.total > 0"}],attrs:{limit:t.form.size,page:t.form.current,total:Number(t.dataList.total)},on:{"update:limit":function(e){return t.$set(t.form,"size",e)},"update:page":function(e){return t.$set(t.form,"current",e)},pagination:t.fetch}}),a("Dialog",{staticClass:"check-dialog",attrs:{center:!0,title:t.checkData.check?"查看商家":"修改商家",visible:t.checkVisible,fullscreen:!1,"before-close":t.closeCheckDialog,width:"55%"},on:{"update:visible":function(e){t.checkVisible=e}}},[t.checkVisible?a("checkDialog",{ref:"checkDialog",attrs:{dataMap:t.list},on:{close:t.closeCheckDialog}}):t._e()],1)],1)},h=[],b=a("9256"),g={getTenants:"/tenant/page",addTenant:"/tenant",editTenant:"/tenant"},v={getAllTenant:function(t){return Object(b["a"])({method:"POST",url:g.getTenants,data:t})},addTenant:function(t){return Object(b["a"])({method:"POST",url:g.addTenant,data:t})},editTenant:function(t){return Object(b["a"])({method:"PUT",url:g.editTenant,data:t})},fixRole:function(t){return Object(b["a"])({method:"GET",url:"/resource/fixRole/".concat(t)})}},w=a("333d"),y=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"add-dialog-component"},[a("Form",{ref:"addForm",attrs:{"label-width":"150px",model:t.dataMap}},[a("Tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("tab-pane",{attrs:{label:"授权信息",name:"authorize"}},[a("form-item",{attrs:{label:"店铺名称",prop:"name"}},[a("Input",{attrs:{disabled:t.dataMap.check,size:"medium",maxlength:"30","show-word-limit":"",clearable:""},model:{value:t.dataMap.name,callback:function(e){t.$set(t.dataMap,"name",e)},expression:"dataMap.name"}})],1),a("form-item",{attrs:{label:"店铺logo",prop:"logo"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{headers:t.headers,data:t.dataObj,action:t.action,"show-file-list":!1,"on-success":t.handleAvatarSuccess}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1),t.dataMap.logo?a("img",{staticClass:"avatar",staticStyle:{"margin-top":"5px"},attrs:{src:t.dataMap.logo,width:"80",height:"80"}}):t._e()],1),a("form-item",{attrs:{label:"店铺负责人",prop:"duty"}},[a("Input",{attrs:{disabled:t.dataMap.check,size:"medium",maxlength:"50","show-word-limit":"",clearable:""},model:{value:t.dataMap.duty,callback:function(e){t.$set(t.dataMap,"duty",e)},expression:"dataMap.duty"}})],1),a("form-item",{attrs:{label:"联系电话"}},[a("Input",{attrs:{disabled:t.dataMap.check,size:"medium",maxlength:"50","show-word-limit":"",clearable:""},model:{value:t.dataMap.contactTel,callback:function(e){t.$set(t.dataMap,"contactTel",e)},expression:"dataMap.contactTel"}})],1),a("form-item",{attrs:{label:"联系地址"}},[a("Input",{attrs:{disabled:t.dataMap.check,size:"medium",maxlength:"50","show-word-limit":"",clearable:""},model:{value:t.dataMap.address,callback:function(e){t.$set(t.dataMap,"address",e)},expression:"dataMap.address"}})],1),a("form-item",{attrs:{label:"生效日期",prop:"startTime"}},[a("date-picker",{attrs:{disabled:t.dataMap.check,size:"medium",type:"date","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.dataMap.startTime,callback:function(e){t.$set(t.dataMap,"startTime",e)},expression:"dataMap.startTime"}})],1),a("form-item",{attrs:{label:"生效时限(年)",prop:"expireLimitYear"}},[a("Input",{attrs:{disabled:t.dataMap.check,size:"medium",maxlength:"4","show-word-limit":"",clearable:""},model:{value:t.dataMap.expireLimitYear,callback:function(e){t.$set(t.dataMap,"expireLimitYear",e)},expression:"dataMap.expireLimitYear"}})],1),a("form-item",{attrs:{label:"是否使用平台收款",prop:"mobile"}},[a("el-radio-group",{attrs:{size:"small"},model:{value:t.dataMap.defaultPay,callback:function(e){t.$set(t.dataMap,"defaultPay",e)},expression:"dataMap.defaultPay"}},[a("el-radio-button",{attrs:{label:!0}},[t._v(t._s(t.$t("common.yes")))]),a("el-radio-button",{attrs:{label:!1}},[t._v(t._s(t.$t("common.no")))])],1)],1),a("form-item",{attrs:{label:"账号",prop:"mobile"}},[a("Input",{attrs:{disabled:t.dataMap.check,size:"medium",maxlength:"11","show-word-limit":"",clearable:""},model:{value:t.dataMap.account,callback:function(e){t.$set(t.dataMap,"account",e)},expression:"dataMap.account"}})],1),a("form-item",{attrs:{size:"large"}},[t.dataMap.check?t._e():a("Button",{attrs:{type:"primary"},on:{click:t.sumbit}},[t._v("确定")])],1)],1)],1)],1)],1)},x=[],k=a("5657"),P={components:{Tabs:s["Tabs"],TabPane:s["TabPane"],Form:s["Form"],FormItem:s["FormItem"],Input:s["Input"],Button:s["Button"],DatePicker:s["DatePicker"]},props:{dialogVisible:{type:Boolean,default:!1},dataMap:{type:Object,default:function(){return{}}}},data:function(){return{activeName:"authorize",headers:{Authorization:""},action:"".concat("https://pos.admin.api.lotus-wallet.com","/file/upload"),dataObj:{folderId:1}}},created:function(){this.headers.token="Bearer "+k["a"].get("TOKEN",""),this.headers.tenant="0000"},methods:{close:function(){this.$emit("close")},sumbit:function(){var t=this;v.editTenant(this.dataMap).then((function(e){0===e.data.code&&(t.$message.success("修改成功"),t.close())}))},handleAvatarSuccess:function(t){var e=t.data.url;this.dataMap.logo=e}}},T=P,O=(a("ce2d"),a("5c52"),Object(m["a"])(T,y,x,!1,null,"37685b40",null)),M=O.exports,A={components:{Table:s["Table"],TableColumn:s["TableColumn"],Dialog:s["Dialog"],checkDialog:M,Pagination:w["a"]},filters:{state:function(t){var e={NORMAL:"有效",FORBIDDEN:"无效"};return e[t]},prohibitTips:function(t){var e={NORMAL:"禁用",FORBIDDEN:"启用"};return e[t]}},props:{dataList:{type:Object,default:function(){return{}}}},data:function(){return{checkVisible:!1,checkData:{status:{},defaultPay:!1},form:{current:1,size:10},list:{}}},methods:{fetch:function(){this.$emit("fetch",this.form)},checkRow:function(t,e){t.check=e,this.checkVisible=!0,this.checkData=t,this.list=t,console.log(this.checkData,11)},closeCheckDialog:function(){this.checkVisible=!1,this.checkData={},console.log(this.$refs.checkDialog.dataMap,"dataMap")},prohibit:function(t){var e=this,a=t.status.code,r={NORMAL:"禁用",FORBIDDEN:"启用"};console.log(t),this.$confirm("是否".concat(r[a],"?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.prohibitPut(t)}))},fixRole:function(t){var e=this;v.fixRole(t.code).then((function(t){e.$message({message:"权限修复完成",type:"success",center:!0})}))},prohibitPut:function(t){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function a(){var r,n,o,s,i,c;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r=t.status.code,n=t.id,o={NORMAL:"禁用",FORBIDDEN:"启用"},s={NORMAL:"FORBIDDEN",FORBIDDEN:"NORMAL"},a.next=6,v.editTenant({id:n,status:{code:s[r]}});case 6:i=a.sent,c=i.data,0===c.code?(t.status.code=s[r],e.$message({type:"success",message:"".concat(o[r],"成功!")})):e.$message({type:"error",message:"".concat(o[r],"失败!")});case 9:case"end":return a.stop()}}),a)})))()}}},B=A,D=(a("b1c6"),Object(m["a"])(B,p,h,!1,null,"754550b6",null)),z=D.exports,F=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"add-dialog-component"},[a("Form",{ref:"addForm",attrs:{"label-width":"150px",rules:t.rules,model:t.formParams}},[a("Tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("tab-pane",{attrs:{label:"授权信息",name:"authorize"}},[a("form-item",{attrs:{label:"店铺名称",prop:"name"}},[a("Input",{attrs:{size:"medium",placeholder:"请输入店铺名称",maxlength:"30","show-word-limit":"",clearable:""},model:{value:t.formParams.name,callback:function(e){t.$set(t.formParams,"name",e)},expression:"formParams.name"}})],1),a("form-item",{attrs:{label:"店铺logo",prop:"logo"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{headers:t.headers,data:t.dataObj,action:t.action,"show-file-list":!1,"on-success":t.handleAvatarSuccess}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1),t.formParams.logo?a("img",{staticClass:"avatar",staticStyle:{"margin-top":"5px"},attrs:{src:t.formParams.logo,width:"80",height:"80"}}):t._e()],1),a("form-item",{attrs:{label:"店铺负责人",prop:"duty"}},[a("Input",{attrs:{size:"medium",placeholder:"请输入店铺负责人",maxlength:"50","show-word-limit":"",clearable:""},model:{value:t.formParams.duty,callback:function(e){t.$set(t.formParams,"duty",e)},expression:"formParams.duty"}})],1),a("form-item",{attrs:{label:"联系电话"}},[a("Input",{attrs:{size:"medium",placeholder:"请输入联系电话",maxlength:"50","show-word-limit":"",clearable:""},model:{value:t.formParams.contactTel,callback:function(e){t.$set(t.formParams,"contactTel",e)},expression:"formParams.contactTel"}})],1),a("form-item",{attrs:{label:"联系地址"}},[a("Input",{attrs:{size:"medium",placeholder:"请输入联系地址",maxlength:"50","show-word-limit":"",clearable:""},model:{value:t.formParams.address,callback:function(e){t.$set(t.formParams,"address",e)},expression:"formParams.address"}})],1),a("form-item",{attrs:{label:"生效日期",prop:"startTime"}},[a("date-picker",{attrs:{size:"medium",type:"date","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"请输入生效日期"},model:{value:t.formParams.startTime,callback:function(e){t.$set(t.formParams,"startTime",e)},expression:"formParams.startTime"}})],1),a("form-item",{attrs:{label:"生效时限(年)",prop:"expireLimitYear"}},[a("Input",{attrs:{size:"medium",placeholder:"请输入生效时限",maxlength:"4","show-word-limit":"",clearable:""},model:{value:t.formParams.expireLimitYear,callback:function(e){t.$set(t.formParams,"expireLimitYear",e)},expression:"formParams.expireLimitYear"}})],1),a("form-item",{attrs:{label:"合同状态"}},[a("Select",{attrs:{size:"mini"},model:{value:t.formParams.status.code,callback:function(e){t.$set(t.formParams.status,"code",e)},expression:"formParams.status.code"}},[a("Option",{attrs:{label:"有效",value:"NORMAL"}}),a("Option",{attrs:{label:"无效",value:"FORBIDDEN"}})],1)],1),a("form-item",{attrs:{label:"收单类型"}},[a("Select",{attrs:{size:"mini"},model:{value:t.formParams.posType.code,callback:function(e){t.$set(t.formParams.posType,"code",e)},expression:"formParams.posType.code"}},[a("Option",{attrs:{label:"普通餐饮",value:"NORMALSTORE"}}),a("Option",{attrs:{label:"快消奶茶",value:"FASTSTORE"}}),a("Option",{attrs:{label:"零售店",value:"RETAILSTORE"}})],1)],1),a("form-item",{attrs:{size:"large"}},[a("Button",{attrs:{type:"primary"},on:{click:t.next}},[t._v("下一步")]),a("Button",{on:{click:t.close}},[t._v("取消")])],1)],1),a("tab-pane",{attrs:{label:"账户信息",name:"account"}},[a("form-item",{attrs:{label:"账号",prop:"mobile"}},[a("Input",{attrs:{size:"medium",placeholder:"账号",maxlength:"11","show-word-limit":"",clearable:""},model:{value:t.formParams.mobile,callback:function(e){t.$set(t.formParams,"mobile",e)},expression:"formParams.mobile"}})],1),a("form-item",{attrs:{label:"密码",prop:"password"}},[a("Input",{attrs:{size:"medium",type:"password",placeholder:"请输入密码","show-word-limit":"",clearable:""},model:{value:t.formParams.password,callback:function(e){t.$set(t.formParams,"password",e)},expression:"formParams.password"}})],1),a("form-item",{attrs:{label:"确认密码",prop:"confirmPassword"}},[a("Input",{attrs:{size:"medium",type:"password",placeholder:"请再次输入密码","show-word-limit":"",clearable:""},model:{value:t.formParams.confirmPassword,callback:function(e){t.$set(t.formParams,"confirmPassword",e)},expression:"formParams.confirmPassword"}})],1),a("form-item",{attrs:{size:"large"}},[a("Button",{attrs:{type:"primary",loading:t.addLoading},on:{click:t.onSubmit}},[t._v("保存")]),a("Button",{on:{click:t.close}},[t._v("取消")])],1)],1)],1)],1)],1)},$=[],R={components:{Tabs:s["Tabs"],TabPane:s["TabPane"],Form:s["Form"],FormItem:s["FormItem"],Input:s["Input"],Button:s["Button"],Select:s["Select"],Option:s["Option"],DatePicker:s["DatePicker"]},props:{dialogVisible:{type:Boolean,default:!1}},data:function(){var t=this,e=function(t,e,a){if(!e)return a(new Error("手机号不能为空"));var r=/^1[3|4|5|7|8][0-9]\d{8}$/;if(console.log(r.test(e)),!r.test(e))return a(new Error("请输入正确的手机号"));a()},a=function(t,e,a){if(!e)return a(new Error("密码不能为空"));var r=/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/;if(console.log(r.test(e)),!r.test(e))return a(new Error("中英文混合6-20位,区分大小写"));a()},r=function(e,a,r){if(!a)return r(new Error("确认密码不能为空"));a!==t.formParams.password&&r(new Error("两次输入密码不一致!")),r()},n=function(e,a,r){if(!a)return t.activeName="authorize",r(new Error("手机号不能为空"));r()};return{activeName:"authorize",formParams:{posType:{code:"NORMALSTORE"},status:{code:"NORMAL"},logo:""},addLoading:!1,rules:{name:[{required:!0,validator:n,message:"请输入店铺名称",trigger:["blur","change"]}],startTime:[{type:"date",required:!0,validator:n,message:"请输入生效日期",trigger:["blur","change"]}],expireLimitYear:[{required:!0,validator:n,message:"请输入生效日期",trigger:["blur","change"]}],mobile:[{required:!0,validator:e,message:"请输入11位数手机号",trigger:["blur","change"]}],password:[{required:!0,validator:a,message:"中英文混合6-20位,区分大小写",trigger:["blur","change"]},{min:6,max:20,message:"长度在 6 到 20 个字符",trigger:"blur"}],confirmPassword:[{required:!0,message:"确认密码不能为空",trigger:["blur","change"]},{required:!0,validator:r,trigger:["blur"]}]},headers:{Authorization:""},action:"".concat("https://pos.admin.api.lotus-wallet.com","/file/upload"),dataObj:{folderId:1}}},created:function(){this.headers.token="Bearer "+k["a"].get("TOKEN",""),this.headers.tenant="0000"},methods:{handleAvatarSuccess:function(t){var e=t.data.url;this.formParams.logo=e},open:function(){this.resetForm()},close:function(){this.$emit("close")},next:function(){this.activeName="account"},onSubmit:function(){var t=this,e=this.$refs.addForm;e.validate((function(e){if(!e)return!1;t.addManagement()}))},resetForm:function(){this.$emit("close"),this.activeName="authorize",this.$refs.addForm&&this.$refs.addForm.resetFields()},addManagement:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=t,a.addLoading=!0,v.addTenant(a.formParams).then((function(t){a.addLoading=!1,a.addLoading=!1,a.resetForm(),a.$message({message:"创建成功!",type:"success"})}));case 3:case"end":return e.stop()}}),e)})))()}}},I=R,_=(a("1034"),a("3cb9"),Object(m["a"])(I,F,$,!1,null,"095e6f0c",null)),C=_.exports,N={components:{Dialog:s["Dialog"],SearchBar:f,Container:z,AddDialog:C},data:function(){return{dialogVisible:!1,dataList:{},params:{current:1,map:{},model:{name:"",code:"",duty:"",status:""},order:"descending",size:10,sort:"id"}}},created:function(){this.getManagementList()},methods:{closeDialog:function(){this.dialogVisible=!1},query:function(t){this.params.model=Object.assign(this.params.model,t),this.getManagementList()},addManagement:function(){this.dialogVisible=!this.dialogVisible},getManagementList:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,v.getAllTenant(t.params);case 2:a=e.sent,r=a.data,t.dataList=r.data||{};case 5:case"end":return e.stop()}}),e)})))()},fetch:function(t){Object.assign(this.params,t),console.log(this.params,t),this.getManagementList()}}},E=N,L=(a("39be"),Object(m["a"])(E,r,n,!1,null,"31b60efc",null));e["default"]=L.exports},"6a54":function(t,e,a){},"6f53":function(t,e,a){var r=a("83ab"),n=a("df75"),o=a("fc6a"),s=a("d1e7").f,i=function(t){return function(e){var a,i=o(e),c=n(i),l=c.length,u=0,m=[];while(l>u)a=c[u++],r&&!s.call(i,a)||m.push(t?[a,i[a]]:i[a]);return m}};t.exports={entries:i(!0),values:i(!1)}},7082:function(t,e,a){},"8c74":function(t,e,a){},9256:function(t,e,a){"use strict";a("99af"),a("4160"),a("caad"),a("4fad"),a("d3b7"),a("159b");var r=a("5530"),n=a("bc3a"),o=a.n(n),s=a("5c96"),i=a("5657");a("27ae");function c(t,e){"ECONNABORTED"===t.code?Object(s["Message"])({message:"请求超时"}):t.response&&t.response.data?Object(s["Message"])({message:t.response.data}):t.message&&Object(s["Message"])({message:t.message}),e(t)}function l(t,e){t.data.isError&&(4e4===t.data.code||40001===t.data.code||40002===t.data.code||40003===t.data.code||40005===t.data.code||40006===t.data.code||40008===t.data.code?s["MessageBox"].alert(t.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):s["Message"].error(t.data.msg)),e(t)}o.a.interceptors.request.use((function(t){var e=!1!==t.headers["X-isToken"]||t.headers["X-isToken"],a=i["a"].get("TOKEN","");a&&e&&(t.headers.token="Bearer "+a);var r="ceres_admin_web",n="ceres_admin_web";return t.headers["Authorization"]="Basic ".concat("".concat(r,":").concat(n)),t}),(function(t){return Promise.reject(t)})),o.a.interceptors.response.use((function(t){return t}),(function(t){return Promise.reject(t)}));var u=function(t){console.log(t,"opts");var e={ts:Date.now()},a=t.method.toUpperCase(),n={method:a,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(t.url),responseType:t.responseType||"",timeout:2e4},s=["PUT","POST","PATCH"];s.includes(a)?n.data=t.data||{}:n.params=Object(r["a"])(Object(r["a"])({},e),t.data||{}),t.formData&&(n.transformRequest=[function(t){var e=new FormData;return t&&Object.entries(t).forEach((function(t){e.append(t[0],t[1])})),e}]);var i=new Promise((function(t,e){o()(n).then((function(e){l(e,t)})).catch((function(t){c(t,e)}))}));return i};e["a"]=u},ac91:function(t,e,a){},b1c6:function(t,e,a){"use strict";var r=a("484d"),n=a.n(r);n.a},ce2d:function(t,e,a){"use strict";var r=a("eb53"),n=a.n(r);n.a},e1c5:function(t,e,a){"use strict";var r=a("8c74"),n=a.n(r);n.a},eb53:function(t,e,a){},ff59:function(t,e,a){}}]); |