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
9.4 KiB
1 lines
9.4 KiB
webpackJsonp([13],{AwEC:function(e,t){},VZTR:function(e,t){},"nf9+":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("aFK5"),r=a.n(n),s=a("mvHQ"),o=a.n(s),l=a("Xxa5"),i=a.n(l),c=a("exGp"),u=a.n(c),d=a("PJh5"),m=a.n(d),p={data:function(){return{userInfo:JSON.parse(window.localStorage.getItem("massage_userInfo")),statusTypeList:[{label:"全部",value:0},{label:"未入账",value:1},{label:"已入账",value:2}],cashTypeList:[{label:"全部",value:0},{label:"分销合伙人",value:1},{label:"代理商",value:2},{label:this.$t("action.attendantName")+"",value:3},{label:"车费",value:8},{label:"经纪人",value:9},{label:"渠道商",value:10},{label:"业务员",value:12}],statusType:{1:"未入账",2:"已入账"},cityType:{1:"城市",2:"区县",3:"省"},loading:!1,searchForm:{page:1,limit:10,order_code:"",top_name:"",type:0,status:0},tableData:[],total:0,downloadLoading:!1,dialogRefund:!1,refundId:"",refundMoney:"",refundTotalMoney:"",lockRefund:!1}},created:function(){this.getTableDataList()},methods:{resetForm:function(e){this.$refs[e].resetFields(),this.getTableDataList(1)},handleSizeChange:function(e){this.searchForm.limit=e,this.handleCurrentChange(1)},handleCurrentChange:function(e){this.searchForm.page=e,this.getTableDataList()},getTableDataList:function(e){var t=this;return u()(i.a.mark(function a(){var n,r,s,o;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e&&(t.searchForm.page=1),t.tableData=[],t.loading=!0,n=t.searchForm,a.next=6,t.$api.shop.commList(n);case 6:if(r=a.sent,s=r.code,o=r.data,t.loading=!1,200===s){a.next=12;break}return a.abrupt("return");case 12:t.tableData=o.data,t.total=o.total;case 14:case"end":return a.stop()}},a,t)}))()},confirmCashOut:function(e){var t=this;this.$confirm("点击按钮之后,表示该笔提成已经结算给线"+this.$t("action.attendantName")+",确认已结算了吗?",this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){t.updateItem(e)}).catch(function(){})},updateItem:function(e){var t=this;return u()(i.a.mark(function a(){return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:t.$api.shop.adminUpdateCoachCommisson({id:e}).then(function(e){200===e.code&&t.$message.success(t.$t("tips.successOper")),t.getTableDataList()});case 1:case"end":return a.stop()}},a,t)}))()},toExportExcel:function(){var e=this;this.downloadLoading=!0;var t=JSON.parse(o()(this.searchForm)),a=t.start_time;a&&a.length>0?(t.start_time=a[0]/1e3,t.end_time=a[1]/1e3):(t.start_time="",t.end_time="");var n=this.$util.getProCurrentHref(),s=n.indexOf("?")>0?"":"?",l=n.indexOf("?")>0;r()(t).forEach(function(e,a){s+=l?"&"+e+"="+t[e]:e+"="+t[e],l=!0});var i=window.localStorage.getItem("massage_minitk"),c=n+"/massage/admin/AdminExcel/commList"+s+"&token="+i;window.location.href=c,setTimeout(function(){e.downloadLoading=!1},5e3)}},filters:{handleTime:function(e,t){return 1===t?m()(1e3*e).format("YYYY-MM-DD"):2===t?m()(1e3*e).format("HH:mm:ss"):m()(1e3*e).format("YYYY-MM-DD HH:mm:ss")},handleCashTypeText:function(e,t){var a=t.filter(function(t){return t.value===e});return a&&a.length>0?a[0].label:""}}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"lb-shop-commission"},[a("top-nav"),e._v(" "),a("div",{staticClass:"page-main"},[a("el-row",{staticClass:"page-search-form"},[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"佣金获得者",prop:"top_name"}},[a("el-input",{attrs:{placeholder:"请输入佣金获得者姓名"},model:{value:e.searchForm.top_name,callback:function(t){e.$set(e.searchForm,"top_name",t)},expression:"searchForm.top_name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"系统订单号",prop:"order_code"}},[a("el-input",{attrs:{placeholder:"请输入系统订单号"},model:{value:e.searchForm.order_code,callback:function(t){e.$set(e.searchForm,"order_code",t)},expression:"searchForm.order_code"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"佣金类型",prop:"type"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){return e.getTableDataList(1)}},model:{value:e.searchForm.type,callback:function(t){e.$set(e.searchForm,"type",t)},expression:"searchForm.type"}},e._l(e.cashTypeList,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){return e.getTableDataList(1)}},model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status",t)},expression:"searchForm.status"}},e._l(e.statusTypeList,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",[a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",type:"primary",icon:"el-icon-search"},on:{click:function(t){return e.getTableDataList(1)}}},[e._v(e._s(e.$t("action.search")))]),e._v(" "),a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",icon:"el-icon-refresh-left"},on:{click:function(t){return e.resetForm("searchForm")}}},[e._v(e._s(e.$t("action.reset")))])],1)],1)],1),e._v(" "),a("el-row",{staticClass:"page-top-operate"},[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-export",expression:"`${$route.name}-export`"}],attrs:{size:"mini",plain:"",type:"primary",icon:"el-icon-download",loading:e.downloadLoading},on:{click:e.toExportExcel}},[e._v("\n "+e._s(e.$t("action.export")))])],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"header-cell-style":{background:"#f5f7fa",color:"#606266"}}},[a("el-table-column",{attrs:{prop:"id",label:"ID","min-width":"80",fixed:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"top_name",label:"佣金获得者","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"nickName",label:"来源","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"order_code",width:"150",label:"系统订单号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"transaction_id",width:"150",label:"付款订单号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"type",label:"佣金类型","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex-y-center"},[a("div",[e._v("\n "+e._s([2,5,6].includes(t.row.type)?e.cityType[t.row.city_type]:"")+"\n ")]),e._v(" "),a("div",[e._v(e._s(e._f("handleCashTypeText")(t.row.type,e.cashTypeList)))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.statusType[t.row.status])+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"order_goods","min-width":"300",label:"提成比例"},scopedSlots:e._u([{key:"default",fn:function(t){return[1===t.row.type?a("div",e._l(t.row.order_goods,function(t,n){return a("div",{key:n,staticClass:"pb-sm",staticStyle:{width:"250px"}},[a("div",{staticClass:"flex-center pt-md"},[a("lb-image",{staticClass:"avatar radius-5",attrs:{src:t.goods_cover}}),e._v(" "),a("div",{staticClass:"flex-1 f-caption c-caption ml-md",staticStyle:{width:"180px"}},[a("div",{staticClass:"flex-between"},[a("div",{staticClass:"f-paragraph c-title ellipsis",staticStyle:{"line-height":"1.2","margin-bottom":"4px"}},[e._v("\n "+e._s(t.goods_name)+"\n ")])]),e._v(" "),a("div",{staticClass:"flex-y-center"},[e._v("\n 提成比例\n "),a("div",{staticClass:"c-warning ml-sm"},[e._v(e._s(t.balance)+"%")])]),e._v(" "),a("div",{staticClass:"flex-between f-caption"},[a("div",{staticClass:"c-warning"},[e._v("¥"+e._s(t.true_price))]),e._v(" "),a("div",[e._v("x"+e._s(t.num))])])])],1)])}),0):8===t.row.type?a("div",[e._v("-")]):a("div",[e._v(e._s(t.row.balance)+"%")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"pay_price",label:"订单总金额","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" ¥"+e._s(t.row.pay_price))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"cash",label:"此单提成金额","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" ¥"+e._s(t.row.cash))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time","min-width":"120",label:"时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("handleTime")(t.row.create_time,1)))]),e._v(" "),a("div",[e._v(e._s(e._f("handleTime")(t.row.create_time,2)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table-operate"},[1===t.row.coach_cash_control?a("lb-button",{attrs:{disabled:1===t.row.cash_status,size:"mini",plain:"",type:0===t.row.cash_status?"primary":"info"},on:{click:function(a){0===t.row.cash_status&&e.confirmCashOut(t.row.id)}}},[e._v(e._s(0===t.row.cash_status?e.$t("action.attendantName")+"转账":"已转账"))]):e._e()],1)]}}])})],1),e._v(" "),a("lb-page",{attrs:{batch:!1,page:e.searchForm.page,pageSize:e.searchForm.limit,total:e.total},on:{handleSizeChange:e.handleSizeChange,handleCurrentChange:e.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var f=a("VU/8")(p,h,!1,function(e){a("VZTR"),a("AwEC")},"data-v-986d4a64",null);t.default=f.exports}}); |