chunk-f5025822.cd6eebaa.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f5025822"],{"7ca8":function(t,e,a){"use strict";var r=a("fe19"),i=a.n(r);i.a},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"}},[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",{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:t.getList},slot:"append"})],1)],1)],1)],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:{prop:"nickname",label:"用户信息","min-width":"130"}}),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",prop:"pay_count"}}),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("清除上级推广人")])],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:"推广人",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("二级推广人")])],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.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:{prop:"nickname",label:"用户信息","min-width":"130"}}),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:{label:"用户信息","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.user.nickname))])]}}],null,!1,1136050513)}),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)},i=[],n=a("e519"),s=a("e572"),l={name:"AccountsUser",data:function(){return{moren:a("cdfe"),cardLists:[],timeVal:[],tableData:{data:[],total:0},listLoading:!0,tableFrom:{paid:"",date:"",keyword:"",page:1,limit:20},fromList:s["a"],dialogVisible:!1,spreadData:{data:[],total:0},spreadFrom:{page:1,limit:10,date:"",level:"",keyword:""},timeValSpread:[],spreadLoading:!1,uid:"",onName:""}},mounted:function(){this.getList()},methods:{clearSpread:function(t){var e=this;this.$modalSure("解除【"+t.nickname+"】的上级推广人吗").then((function(){Object(n["m"])(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.dialogVisible=!0,this.spreadFrom={page:1,limit:10,date:"",level:"",keyword:""},this.getListSpread(t)},handleClose:function(){this.dialogVisible=!1},selectChangeSpread:function(t){this.timeValSpread=[],this.spreadFrom.date=t,"man"===this.onName?this.getListSpread(this.uid):this.getSpreadOrderList(this.uid)},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):this.getSpreadOrderList(this.uid)},getListSpread:function(t){var e=this;this.spreadLoading=!0,Object(n["n"])(t,this.spreadFrom).then((function(t){e.spreadData.data=t.data.list,e.spreadData.total=t.data.count,e.spreadLoading=!1})).catch((function(t){e.$message.error(t.message),e.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.dialogVisible=!0,this.spreadFrom={page:1,limit:10,date:"",level:"",keyword:""},this.getSpreadOrderList(t)},getSpreadOrderList:function(t){var e=this;this.spreadLoading=!0,Object(n["o"])(t,this.spreadFrom).then((function(t){e.spreadData.data=t.data.list,e.spreadData.total=t.data.count,e.spreadLoading=!1})).catch((function(t){e.$message.error(t.message),e.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(){var t=this;this.listLoading=!0,Object(n["l"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.$message.error(e.message),t.listLoading=!1}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()}}},o=l,d=(a("7ca8"),a("2877")),c=Object(d["a"])(o,r,i,!1,null,"06ada68e",null);e["default"]=c.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 i})),a.d(e,"d",(function(){return n})),a.d(e,"g",(function(){return s})),a.d(e,"l",(function(){return l})),a.d(e,"n",(function(){return o})),a.d(e,"o",(function(){return d})),a.d(e,"m",(function(){return c})),a.d(e,"i",(function(){return u})),a.d(e,"a",(function(){return p})),a.d(e,"h",(function(){return m})),a.d(e,"e",(function(){return h})),a.d(e,"b",(function(){return g})),a.d(e,"f",(function(){return b})),a.d(e,"j",(function(){return f})),a.d(e,"k",(function(){return v}));var r=a("0c6d");function i(){return r["a"].get("config/others/lst")}function n(t){return r["a"].post("config/others/update",t)}function s(){return r["a"].post("store/product/check")}function l(t){return r["a"].get("user/promoter/lst",t)}function o(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)}},e572:function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return n}));var r=[{label:"开启",value:1},{label:"关闭",value:0}],i={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"}]},n={title:"状态",custom:!0,fromTxt:[{text:"全部",val:""},{text:"待审核",val:"0"},{text:"审核已通过",val:"1"},{text:"审核未通过",val:"2"}]}},fe19:function(t,e,a){}}]);