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.
 
 
 
 
 
crmeb_php/public/system/js/chunk-242aeaf3.9eb16a1f.js

1 lines
18 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-242aeaf3"],{ae25:function(t,e,a){"use strict";a("f8c0")},cc3c:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"divBox"},[r("el-card",{staticClass:"box-card"},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("div",{staticClass:"container"},[r("el-form",{attrs:{size:"small","label-width":"100px",inline:""}},[r("el-form-item",{staticClass:"width100",attrs:{label:"时间选择:"}},[r("el-radio-group",{staticClass:"mr20",attrs:{type:"button",size:"small"},on:{change:function(e){return t.selectChange(t.tableFrom.date)}},model:{value:t.tableFrom.date,callback:function(e){t.$set(t.tableFrom,"date",e)},expression:"tableFrom.date"}},t._l(t.fromList.fromTxt,(function(e,a){return r("el-radio-button",{key:a,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),t._v(" "),r("el-date-picker",{staticStyle:{width:"250px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",size:"small",type:"daterange",placement:"bottom-end",placeholder:"自定义时间"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"分销等级:"}},[r("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.brokerage_level,callback:function(e){t.$set(t.tableFrom,"brokerage_level",e)},expression:"tableFrom.brokerage_level"}},t._l(t.levelList,(function(t){return r("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),r("el-form-item",{staticClass:"width100",attrs:{label:"关键字:"}},[r("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入姓名、电话、UID",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(e)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}},[r("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1)],1)],1),t._v(" "),r("cards-data",{attrs:{"card-lists":t.cardLists}})],1),t._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","highlight-current-row":""}},[r("el-table-column",{attrs:{prop:"uid",label:"ID",width:"60"}}),t._v(" "),r("el-table-column",{attrs:{label:"头像","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",{staticClass:"demo-image__preview"},[r("el-image",{attrs:{src:e.row.avatar||t.moren,"preview-src-list":[e.row.avatar||t.moren]}})],1)]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"用户信息","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",[t._v("昵称:"+t._s(e.row.nickname))]),t._v(" "),r("div",[t._v("电话:"+t._s(e.row.phone))])]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"spread_count",label:"推广用户数量","min-width":"120"}}),t._v(" "),r("el-table-column",{attrs:{label:"分销等级","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.brokerage?e.row.brokerage.brokerage_name:""))])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"推广订单数量","min-width":"120",prop:"spread_pay_count"}}),t._v(" "),r("el-table-column",{attrs:{label:"推广订单金额","min-width":"120",prop:"spread_pay_price"}}),t._v(" "),r("el-table-column",{attrs:{label:"佣金金额","min-width":"120",sortable:"","sort-method":function(t,e){return t.total_brokerage_price-e.total_brokerage_price},prop:"total_brokerage_price"}}),t._v(" "),r("el-table-column",{attrs:{label:"已提现金额","min-width":"120",sortable:"","sort-method":function(t,e){return t.total_extract_price-e.total_extract_price},prop:"total_extract_price"}}),t._v(" "),r("el-table-column",{attrs:{prop:"total_extract_num",label:"提现次数","min-width":"90"}}),t._v(" "),r("el-table-column",{attrs:{label:"未提现金额","min-width":"120",sortable:"","sort-method":function(t,e){return t.brokerage_price-e.brokerage_price},prop:"brokerage_price"}}),t._v(" "),r("el-table-column",{attrs:{prop:"spread.nickname",label:"上级推广人","min-width":"150"}}),t._v(" "),r("el-table-column",{attrs:{label:"操作","min-width":"150",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(a){return t.onSpread(e.row.uid,"man")}}},[t._v("推广人")]),t._v(" "),r("el-dropdown",[r("span",{staticClass:"el-dropdown-link"},[t._v("\n 更多"),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{nativeOn:{click:function(a){return t.onSpreadOrder(e.row.uid,"order")}}},[t._v("推广订单")]),t._v(" "),r("el-dropdown-item",{nativeOn:{click:function(a){return t.clearSpread(e.row)}}},[t._v("清除上级推广人")]),t._v(" "),r("el-dropdown-item",{nativeOn:{click:function(a){return t.setDistriLevel(e.row)}}},[t._v("编辑分销员等级")])],1)],1)]}}])})],1),t._v(" "),r("div",{staticClass:"block"},[r("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),r("el-dialog",{attrs:{title:t.showDistributor?"推广订单":"推广人",visible:t.dialogVisible,width:"900px","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[r("div",{staticClass:"container"},[r("el-form",{attrs:{size:"small","label-width":"100px"}},[r("el-form-item",{staticClass:"width100",attrs:{label:"时间选择:"}},[r("el-radio-group",{staticClass:"mr20",attrs:{type:"button",size:"small"},on:{change:function(e){return t.selectChangeSpread(t.spreadFrom.date)}},model:{value:t.spreadFrom.date,callback:function(e){t.$set(t.spreadFrom,"date",e)},expression:"spreadFrom.date"}},t._l(t.fromList.fromTxt,(function(e,a){return r("el-radio-button",{key:a,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),t._v(" "),r("el-date-picker",{staticStyle:{width:"250px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",size:"small",type:"daterange",placement:"bottom-end",placeholder:"自定义时间"},on:{change:t.onchangeTimeSpread},model:{value:t.timeValSpread,callback:function(e){t.timeValSpread=e},expression:"timeValSpread"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"用户类型:"}},[r("el-radio-group",{attrs:{size:"small"},on:{change:t.onChanges},model:{value:t.spreadFrom.level,callback:function(e){t.$set(t.spreadFrom,"level",e)},expression:"spreadFrom.level"}},[r("el-radio-button",{attrs:{label:""}},[t._v("全部")]),t._v(" "),r("el-radio-button",{attrs:{label:"1"}},[t._v("一级推广人")]),t._v(" "),r("el-radio-button",{attrs:{label:"2"}},[t._v("二级推广人")]),t._v(" "),t.showDistributor?r("el-radio-button",{attrs:{label:"-1"}},[t._v("分销员自购")]):t._e()],1)],1),t._v(" "),r("el-form-item",{staticClass:"width100",attrs:{label:"关键字:"}},[r("el-input",{staticClass:"selWidth",attrs:{placeholder:t.showDistributor?"请输入订单号":"请输入请输入姓名、电话、UID",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onChanges(e)}},model:{value:t.spreadFrom.keyword,callback:function(e){t.$set(t.spreadFrom,"keyword",e)},expression:"spreadFrom.keyword"}},[r("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:t.onChanges},slot:"append"})],1)],1)],1)],1),t._v(" "),"man"===t.onName?r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.spreadLoading,expression:"spreadLoading"}],key:"men",staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.spreadData.data,size:"mini","highlight-current-row":""}},[r("el-table-column",{attrs:{prop:"uid",label:"ID",width:"60"}}),t._v(" "),r("el-table-column",{attrs:{label:"头像","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[t.row.avatar?r("div",{staticClass:"demo-image__preview"},[r("el-image",{attrs:{src:t.row.avatar,"preview-src-list":[t.row.avatar]}})],1):r("span",[r("img",{staticStyle:{width:"36px",height:"36px"},attrs:{src:a("cdfe"),alt:""}})])]}}],null,!1,1562091832)}),t._v(" "),r("el-table-column",{attrs:{label:"用户信息","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",[t._v("昵称:"+t._s(e.row.nickname))]),t._v(" "),r("div",[t._v("电话:"+t._s(e.row.phone))])]}}],null,!1,642054921)}),t._v(" "),r("el-table-column",{attrs:{prop:"is_promoter",label:"是否推广员","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(t._f("filterYesOrNo")(e.row.is_promoter)))])]}}],null,!1,4001846245)}),t._v(" "),r("el-table-column",{attrs:{sortable:"","sort-method":function(t,e){return t.spread_count-e.spread_count},label:"推广人数","min-width":"120",prop:"spread_count"}}),t._v(" "),r("el-table-column",{attrs:{sortable:"",label:"订单数","min-width":"120",prop:"pay_count"}}),t._v(" "),r("el-table-column",{attrs:{sortable:"",label:"绑定时间","min-width":"120",prop:"spread_time"}}),t._v(" "),r("el-table-column",{attrs:{sortable:"",label:"解绑时间","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.spread_limit?e.row.spread_limit:""))])]}}],null,!1,2019153763)}),t._v(" "),r("el-table-column",{attrs:{prop:"create_time",label:"关注时间","min-width":"150"}})],1):t._e(),t._v(" "),"order"===t.onName?r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.spreadLoading,expression:"spreadLoading"}],key:"order",staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.spreadData.data,size:"mini","highlight-current-row":""}},[r("el-table-column",{attrs:{prop:"order_sn",label:"订单ID","min-width":"120"}}),t._v(" "),r("el-table-column",{attrs:{prop:"create_time",label:"时间","min-width":"150"}}),t._v(" "),r("el-table-column",{attrs:{sortable:"","sort-method":function(t,e){return t.brokerage-e.brokerage},label:"返佣金额","min-width":"120",prop:"brokerage"}})],1):t._e(),t._v(" "),r("div",{staticClass:"block"},[r("el-pagination",{attrs:{"page-sizes":[10,20],"page-size":t.spreadFrom.limit,"current-page":t.spreadFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.spreadData.total},on:{"size-change":t.handleSizeChangeSpread,"current-change":t.pageChangeSpread}})],1)],1)],1)},n=[],i=a("e519"),o=a("e572"),s=a("0f56"),l={name:"AccountsUser",components:{cardsData:s["a"]},data:function(){return{moren:a("cdfe"),timeVal:[],levelList:[],cardLists:[],tableData:{data:[],total:0},listLoading:!0,tableFrom:{paid:"",date:"",keyword:"",brokerage_level:"",page:1,limit:20},fromList:o["a"],dialogVisible:!1,spreadData:{data:[],total:0},spreadFrom:{page:1,limit:10,date:"",level:"",keyword:""},timeValSpread:[],spreadLoading:!1,uid:"",onName:"",showDistributor:!1}},mounted:function(){this.getList(""),this.getLevelList(),this.getStatistics()},methods:{clearSpread:function(t){var e=this;this.$modalSure("解除【"+t.nickname+"】的上级推广人吗").then((function(){Object(i["w"])(t.uid).then((function(t){var a=t.message;e.$message.success(a),e.getList("")})).catch((function(t){var a=t.message;e.$message.error(a)}))}))},onSpread:function(t,e){this.onName=e,this.uid=t,this.showDistributor=!1,this.dialogVisible=!0,this.spreadFrom={page:1,limit:10,date:"",level:"",keyword:""},this.getListSpread(t,"")},handleClose:function(){this.dialogVisible=!1},getLevelList:function(){var t=this;Object(i["l"])().then((function(e){t.levelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getStatistics:function(){var t=this;Object(i["i"])().then((function(e){t.cardLists=e.data})).catch((function(e){t.$message.error(e.message)}))},setDistriLevel:function(t){this.$modalForm(Object(i["h"])(t.uid))},selectChangeSpread:function(t){this.timeValSpread=[],this.spreadFrom.date=t,"man"===this.onName?this.getListSpread(this.uid,1):this.getSpreadOrderList(this.uid,1)},onchangeTimeSpread:function(t){this.timeValSpread=t,this.spreadFrom.date=t?this.timeValSpread.join("-"):"","man"===this.onName?this.getListSpread(this.uid,""):this.getSpreadOrderList(this.uid,"")},onChanges:function(){"man"===this.onName?this.getListSpread(this.uid,1):this.getSpreadOrderList(this.uid,1)},getListSpread:function(t,e){var a=this;this.spreadLoading=!0,this.spreadFrom.page=e||this.spreadFrom.page,Object(i["x"])(t,this.spreadFrom).then((function(t){a.spreadData.data=t.data.list,a.spreadData.total=t.data.count,a.spreadLoading=!1})).catch((function(t){a.$message.error(t.message),a.spreadLoading=!1}))},pageChangeSpread:function(t){this.spreadFrom.page=t,"man"===this.onName?this.getListSpread(this.uid,""):this.getSpreadOrderList(this.uid,"")},handleSizeChangeSpread:function(t){this.spreadFrom.limit=t,"man"===this.onName?this.getListSpread(this.uid,""):this.getSpreadOrderList(this.uid,"")},onSpreadOrder:function(t,e){this.uid=t,this.onName=e,this.showDistributor=!0,this.dialogVisible=!0,this.spreadFrom={page:1,limit:10,date:"",level:"",keyword:""},this.getSpreadOrderList(t,1)},getSpreadOrderList:function(t,e){var a=this;this.spreadLoading=!0,this.spreadFrom.page=e||this.spreadFrom.page,Object(i["y"])(t,this.spreadFrom).then((function(t){a.spreadData.data=t.data.list,a.spreadData.total=t.data.count,a.spreadLoading=!1})).catch((function(t){a.$message.error(t.message),a.spreadLoading=!1}))},selectChange:function(t){this.tableFrom.date=t,this.timeVal=[],this.tableFrom.page=1,this.getList("")},onchangeTime:function(t){this.timeVal=t,this.tableFrom.date=t?this.timeVal.join("-"):"",this.tableFrom.page=1,this.getList("")},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(i["v"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.$message.error(t.message),e.listLoading=!1}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")}}},d=l,c=(a("ae25"),a("2877")),u=Object(c["a"])(d,r,n,!1,null,"a690019e",null);e["default"]=u.exports},cdfe:function(t,e,a){t.exports=a.p+"system/img/f.5aa43cd3.png"},e519:function(t,e,a){"use strict";a.d(e,"c",(function(){return n})),a.d(e,"d",(function(){return i})),a.d(e,"q",(function(){return o})),a.d(e,"v",(function(){return s})),a.d(e,"x",(function(){return l})),a.d(e,"y",(function(){return d})),a.d(e,"w",(function(){return c})),a.d(e,"s",(function(){return u})),a.d(e,"a",(function(){return p})),a.d(e,"r",(function(){return m})),a.d(e,"n",(function(){return h})),a.d(e,"b",(function(){return g})),a.d(e,"p",(function(){return b})),a.d(e,"t",(function(){return f})),a.d(e,"u",(function(){return v})),a.d(e,"m",(function(){return _})),a.d(e,"A",(function(){return w})),a.d(e,"k",(function(){return k})),a.d(e,"z",(function(){return y})),a.d(e,"o",(function(){return L})),a.d(e,"g",(function(){return S})),a.d(e,"f",(function(){return x})),a.d(e,"j",(function(){return F})),a.d(e,"e",(function(){return C})),a.d(e,"l",(function(){return z})),a.d(e,"i",(function(){return D})),a.d(e,"h",(function(){return O}));var r=a("0c6d");function n(){return r["a"].get("config/others/lst")}function i(t){return r["a"].post("config/others/update",t)}function o(){return r["a"].post("store/product/check")}function s(t){return r["a"].get("user/promoter/lst",t)}function l(t,e){return r["a"].get("user/spread/lst/".concat(t),e)}function d(t,e){return r["a"].get("user/spread/order/".concat(t),e)}function c(t){return r["a"].post("user/spread/clear/".concat(t))}function u(t){return r["a"].get("store/bag/lst",t)}function p(){return r["a"].get("store/category/list")}function m(t){return r["a"].get("store/bag/detail/".concat(t))}function h(){return r["a"].get("store/bag/lst_filter")}function g(t,e){return r["a"].post("store/bag/change/".concat(t),{status:e})}function b(){return r["a"].get("store/product/mer_select")}function f(t){return r["a"].post("store/bag/status",t)}function v(t,e){return r["a"].post("store/bag/update/".concat(t),e)}function _(t){return r["a"].get("agreement/".concat(t))}function w(t,e){return r["a"].post("agreement/".concat(t),e)}function k(t){return r["a"].get("agreement/".concat(t))}function y(t,e){return r["a"].post("agreement/".concat(t),e)}function L(t){return r["a"].post("user/brokerage/create",t)}function S(t){return r["a"].get("user/brokerage/lst",t)}function x(t){return r["a"].get("user/brokerage/detail/".concat(t))}function F(t,e){return r["a"].post("user/brokerage/update/".concat(t),e)}function C(t){return r["a"].delete("user/brokerage/delete/".concat(t))}function z(){return r["a"].get("user/brokerage/options")}function D(){return r["a"].get("user/promoter/count")}function O(t){return r["a"].get("user/spread/".concat(t,"/form"))}},e572:function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return i}));var r=[{label:"开启",value:1},{label:"关闭",value:0}],n={title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},i={title:"状态",custom:!0,fromTxt:[{text:"全部",val:""},{text:"待审核",val:"0"},{text:"审核已通过",val:"1"},{text:"审核未通过",val:"2"}]}},f8c0:function(t,e,a){}}]);