CRMEB/crmeb/public/admin/js/chunk-8d9a063e.13a07434.js
2022-03-03 11:45:22 +08:00

1 line
14 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8d9a063e"],{"3b2b":function(t,e,n){var r=n("7726"),i=n("5dbc"),a=n("86cc").f,o=n("9093").f,s=n("aae3"),c=n("0bfb"),u=r.RegExp,l=u,d=u.prototype,f=/a/g,m=/a/g,g=new u(f)!==f;if(n("9e1e")&&(!g||n("79e5")((function(){return m[n("2b4c")("match")]=!1,u(f)!=f||u(m)==m||"/a/i"!=u(f,"i")})))){u=function(t,e){var n=this instanceof u,r=s(t),a=void 0===e;return!n&&r&&t.constructor===u&&a?t:i(g?new l(r&&!a?t.source:t,e):l((r=t instanceof u)?t.source:t,r&&a?c.call(t):e),n?this:d,u)};for(var p=function(t){t in u||a(u,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},v=o(l),h=0;v.length>h;)p(v[h++]);d.constructor=u,u.prototype=d,n("2aba")(r,"RegExp",u)}n("7a56")("RegExp")},"61f7":function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return l})),n.d(e,"b",(function(){return d}));n("8e6e"),n("ac6a"),n("456d");var r=n("bd86");n("6b54"),n("3b2b"),n("a481");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){Object(r["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var r in n)if(new RegExp("(".concat(r,")")).test(e)){var i=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?i:s(i))}return e}function s(t){return("00"+t).substr(t.length)}var c={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};var u=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a({required:!0,message:t,type:"string"},e)}function d(t){return f.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}u(l,"请输入%s"),u(d,"%s格式不正确");var f=Object.keys(c).reduce((function(t,e){return t[e]=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:Object(r["a"])({},e,t);return a(a({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o),i)},u(t[e],c[e]),t}),{})},"7ac0":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"i-layout-page-header"},[n("div",{staticClass:"i-layout-page-header"},[n("span",{staticClass:"ivu-page-header-title mr20",domProps:{textContent:t._s(t.$route.meta.title)}})])]),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("Row",{attrs:{type:"flex",gutter:24,align:"middle"}},[n("Col",t._b({},"Col",t.grid,!1),[n("FormItem",{attrs:{label:"搜索:","label-for":"status"}},[n("Input",{staticStyle:{width:"300px"},attrs:{search:"","enter-button":"",placeholder:"请输入姓名、UID"},on:{"on-search":t.userSearchs},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}})],1)],1)],1)],1)],1),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Row",{staticClass:"ivu-mt box-wrapper"},[n("Col",{ref:"rightBox",attrs:{xs:24,sm:24}},[n("Row",{attrs:{type:"flex"}},[n("Col",t._b({},"Col",t.grid,!1),[n("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:function(e){return t.groupAdd("0")}}},[t._v("添加事业部")])],1)],1),n("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns,data:t.userLists,loading:t.loading,"highlight-row":"","no-formValidate-text":"暂无数据","no-filtered-formValidate-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatars",fn:function(t){var e=t.row;t.index;return[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])]}},{key:"nickname",fn:function(e){var r=e.row;e.index;return[n("div",{staticClass:"acea-row"},[n("Icon",{directives:[{name:"show",rawName:"v-show",value:"男"===r.sex,expression:"row.sex === '男'"}],staticClass:"mr5",attrs:{type:"md-male",color:"#2db7f5",size:"15"}}),n("Icon",{directives:[{name:"show",rawName:"v-show",value:"女"===r.sex,expression:"row.sex === '女'"}],staticClass:"mr5",attrs:{type:"md-female",color:"#ed4014",size:"15"}}),n("div",{domProps:{textContent:t._s(r.nickname)}})],1)]}},{key:"status",fn:function(e){var r=e.row;e.index;return[n("i-switch",{attrs:{value:r.division_status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(r)}},model:{value:r.division_status,callback:function(e){t.$set(r,"division_status",e)},expression:"row.division_status"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"division_end_time",fn:function(e){var r=e.row;e.index;return[n("span",[t._v(" "+t._s(r.division_end_time))])]}},{key:"division_percent",fn:function(e){var r=e.row;e.index;return[n("span",[t._v(" "+t._s(r.division_percent)+"%")])]}},{key:"action",fn:function(e){var r=e.row,i=e.index;return[n("a",{on:{click:function(e){return t.jump(r.uid)}}},[t._v("查看代理商")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.groupAdd(r.uid)}}},[t._v("编辑")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(r,"删除员工",i)}}},[t._v("删除")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("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)],1),n("Modal",{staticClass:"order_box",attrs:{scrollable:"",title:"代理商列表",width:"800","footer-hide":""},model:{value:t.staffModal,callback:function(e){t.staffModal=e},expression:"staffModal"}},[n("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns2,data:t.clerkLists,loading:t.loading,"highlight-row":"","no-formValidate-text":"暂无数据","no-filtered-formValidate-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatars",fn:function(t){var e=t.row;t.index;return[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])]}},{key:"nickname",fn:function(e){var r=e.row;e.index;return[n("div",{staticClass:"acea-row"},[n("Icon",{directives:[{name:"show",rawName:"v-show",value:"男"===r.sex,expression:"row.sex === '男'"}],staticClass:"mr5",attrs:{type:"md-male",color:"#2db7f5",size:"15"}}),n("Icon",{directives:[{name:"show",rawName:"v-show",value:"女"===r.sex,expression:"row.sex === '女'"}],staticClass:"mr5",attrs:{type:"md-female",color:"#ed4014",size:"15"}}),n("div",{domProps:{textContent:t._s(r.nickname)}})],1)]}},{key:"agent_end_time",fn:function(e){var r=e.row;e.index;return[n("span",[t._v(" "+t._s(t._f("formatDate")(r.agent_end_time)))])]}},{key:"division_percent",fn:function(e){var r=e.row;e.index;return[n("span",[t._v(" "+t._s(r.division_percent)+"%")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total2,current:t.clerkReqData.page,"show-elevator":"","show-total":"","page-size":t.clerkReqData.limit},on:{"on-change":t.clerkPageChange}})],1)],1)],1)},i=[],a=(n("8e6e"),n("ac6a"),n("456d"),n("96cf"),n("3b8d")),o=n("bd86"),s=n("2f62"),c=n("bbbc"),u=n("61f7");function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){Object(o["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f={name:"agent_extra",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},total:0,total2:0,userLists:[],formInline:{uid:0,proportion:0,image:""},columns2:[{title:"用户UID",key:"uid",width:80},{title:"头像",slot:"avatars",minWidth:60},{title:"姓名",slot:"nickname",minWidth:150},{title:"邀请码",key:"division_invite",minWidth:150},{title:"分销比例",slot:"division_percent",minWidth:100},{title:"用户数量",key:"user_count",minWidth:100},{title:"订单数量",key:"order_count",minWidth:100}],columns:[{title:"用户UID",key:"uid",width:80},{title:"头像",slot:"avatars",minWidth:60},{title:"姓名",slot:"nickname",minWidth:150},{title:"邀请码",key:"division_invite",minWidth:150},{title:"分销比例",slot:"division_percent",minWidth:100},{title:"代理商数量",key:"agent_count",minWidth:100},{title:"订单数量",key:"order_count",minWidth:100},{title:"截止时间",slot:"division_end_time",minWidth:100},{title:"状态",slot:"status",minWidth:100},{title:"操作",slot:"action",fixed:"right",minWidth:120}],FromData:null,loading:!1,current:0,formValidate:{page:1,limit:15,keyword:""},staffModal:!1,clerkReqData:{uid:0,page:1,limit:15},clerkLists:[]}},filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(u["a"])(e,"yyyy-MM-dd hh:mm")}}},computed:d(d({},Object(s["e"])("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.getList()},methods:{userSearchs:function(){this.formValidate.page=1,this.getList()},jump:function(t){this.clerkReqData.uid=t,this.getClerkList()},getClerkList:function(){var t=this;this.clerkReqData.division_type=2,Object(c["d"])(this.clerkReqData).then((function(e){t.clerkLists=e.data.list,t.total2=e.data.count,t.staffModal=!0}))},getList:function(){var t=this;this.loading=!0,this.formValidate.division_type=1,Object(c["l"])(this.formValidate).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=n.data,t.userLists=r.list,t.total=r.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},clerkPageChange:function(){this.clerkReqData.page=index,this.getClerkList()},groupAdd:function(t){var e=this;this.$modalForm(Object(c["k"])(t)).then((function(t){e.getList()})).catch((function(t){}))},onchangeIsShow:function(t){var e=this,n={id:t.uid,status:t.division_status};Object(c["g"])(n).then(function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$Message.success(n.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)}))},edit:function(t){},del:function(t,e,n){var r=this,i={title:e,method:"DELETE",uid:t.uid,url:"agent/division/del/1/".concat(t.uid)};this.$modalSure(i).then((function(t){r.$Message.success(t.msg),r.userLists.splice(n,1)})).catch((function(t){r.$Message.error(t.msg)}))}}},m=f,g=(n("b3cb"),n("2877")),p=Object(g["a"])(m,r,i,!1,null,"96cded48",null);e["default"]=p.exports},b3cb:function(t,e,n){"use strict";var r=n("dd80"),i=n.n(r);i.a},bbbc:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"n",(function(){return o})),n.d(e,"m",(function(){return s})),n.d(e,"h",(function(){return c})),n.d(e,"j",(function(){return u})),n.d(e,"i",(function(){return l})),n.d(e,"o",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"f",(function(){return m})),n.d(e,"a",(function(){return g})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return v})),n.d(e,"d",(function(){return h})),n.d(e,"g",(function(){return b}));var r=n("6b6c");function i(t){return Object(r["a"])({url:"agent/index",method:"get",params:t})}function a(t){return Object(r["a"])({url:"agent/spread",method:"PUT",data:t})}function o(t){return Object(r["a"])({url:"agent/statistics",method:"get",params:t})}function s(t,e){return Object(r["a"])({url:t,method:"get",params:e})}function c(t){return Object(r["a"])({url:"agent/look_code",method:"get",params:t})}function u(t){return Object(r["a"])({url:"agent/look_xcx_code",method:"get",params:t})}function l(t){return Object(r["a"])({url:"agent/look_h5_code",method:"get",params:t})}function d(t){return Object(r["a"])({url:"export/userAgent",method:"get",params:t})}function f(t){return Object(r["a"])({url:"agent/division/list",method:"get",params:t})}function m(t){return Object(r["a"])({url:"agent/division/agent_apply/list",method:"get",params:t})}function g(t){return Object(r["a"])({url:"agent/division/agent/create/".concat(t),method:"get"})}function p(t,e){return Object(r["a"])({url:"agent/division/examine_apply/".concat(t,"/").concat(e),method:"get"})}function v(t){return Object(r["a"])({url:"agent/division/create/".concat(t),method:"get"})}function h(t){return Object(r["a"])({url:"agent/division/down_list",method:"get",params:t})}function b(t){return Object(r["a"])({url:"agent/division/set_status/".concat(t.status,"/").concat(t.id),method:"put"})}},dd80:function(t,e,n){}}]);