(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5c3a10ec"],{"21d2":function(t,e,a){"use strict";a.d(e,"j",(function(){return i})),a.d(e,"k",(function(){return r})),a.d(e,"y",(function(){return l})),a.d(e,"G",(function(){return o})),a.d(e,"H",(function(){return s})),a.d(e,"F",(function(){return c})),a.d(e,"s",(function(){return d})),a.d(e,"C",(function(){return u})),a.d(e,"q",(function(){return m})),a.d(e,"A",(function(){return f})),a.d(e,"D",(function(){return p})),a.d(e,"E",(function(){return h})),a.d(e,"z",(function(){return b})),a.d(e,"d",(function(){return g})),a.d(e,"p",(function(){return v})),a.d(e,"i",(function(){return x})),a.d(e,"g",(function(){return _})),a.d(e,"o",(function(){return I})),a.d(e,"b",(function(){return y})),a.d(e,"r",(function(){return w})),a.d(e,"t",(function(){return C})),a.d(e,"u",(function(){return O})),a.d(e,"f",(function(){return S})),a.d(e,"h",(function(){return j})),a.d(e,"a",(function(){return k})),a.d(e,"e",(function(){return L})),a.d(e,"m",(function(){return T})),a.d(e,"n",(function(){return E})),a.d(e,"x",(function(){return B})),a.d(e,"w",(function(){return D})),a.d(e,"l",(function(){return P})),a.d(e,"B",(function(){return G})),a.d(e,"N",(function(){return $})),a.d(e,"c",(function(){return z})),a.d(e,"v",(function(){return U})),a.d(e,"I",(function(){return A})),a.d(e,"J",(function(){return N})),a.d(e,"K",(function(){return R})),a.d(e,"L",(function(){return V})),a.d(e,"M",(function(){return q}));var n=a("b775");function i(){return Object(n["a"])({url:"/admin/platform/retail/store/config/get",method:"get"})}function r(t){return Object(n["a"])({url:"/admin/platform/retail/store/config/save",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/admin/platform/retail/store/people/list",method:"get",params:t})}function o(t){return Object(n["a"])({url:"/admin/platform/retail/store/sub/user/list",method:"get",params:t})}function s(t){return Object(n["a"])({url:"/admin/platform/retail/store/promotion/order/list",method:"get",params:t})}function c(t){return Object(n["a"])({url:"/admin/platform/retail/store/clean/spread/".concat(t),method:"get"})}function d(t){return Object(n["a"])({url:"/admin/platform/bcx/brokerage/config/product/list",method:"GET",params:t})}function u(t){return Object(n["a"])({url:"/admin/platform/bcx/brokerage/config/set/product",method:"POST",data:t})}function m(t,e){var a=1==t?"/admin/platform/bcx/performance/report/fxy/list":2==t?"/admin/platform/bcx/performance/report/fxs/list":3==t?"/admin/platform/bcx/performance/report/channel/list":4==t?"/admin/platform/bcx/performance/report/department/list":"/admin/platform/bcx/performance/report/department/member/list";return Object(n["a"])({url:a,method:"GET",params:e})}function f(t){return Object(n["a"])({url:"/admin/platform/bcx/performance/report/statistics",method:"GET",params:t})}function p(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/bill/statistics",method:"GET",params:t})}function h(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/statistics",method:"GET",params:t})}function b(){return Object(n["a"])({url:"/admin/platform/bcx/region/tree",method:"GET"})}function g(t,e){var a=1===t?"/admin/platform/bcx/performance/report/fxy/list/excel":2===t?"/admin/platform/bcx/performance/report/fxs/list/excel":3===t?"/admin/platform/bcx/performance/report/channel/list/excel":4===t?"/admin/platform/bcx/performance/report/department/list/excel":"/admin/platform/bcx/performance/report/department/member/list/excel";return Object(n["a"])({url:a,method:"GET",params:e,responseType:"blob"})}function v(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/bill/fxy/list",method:"GET",params:t})}function x(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/bill/fxs/list",method:"GET",params:t})}function _(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/bill/channel/list",method:"GET",params:t})}function I(t,e){return Object(n["a"])({url:0==t?"/admin/platform/bcx/settle/bill/department/list":"/admin/platform/bcx/settle/bill/department/member/list",method:"GET",params:e})}function y(t,e){var a=1===t?"/admin/platform/bcx/settle/bill/fxy/list/excel":2===t?"/admin/platform/bcx/settle/bill/fxs/list/excel":3===t?"/admin/platform/bcx/settle/bill/channel/list/excel":4===t?"/admin/platform/bcx/settle/bill/department/list/excel":"/admin/platform/bcx/settle/bill/department/member/list/excel";return Object(n["a"])({url:a,method:"GET",params:e,responseType:"blob"})}function w(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/bill/generate/settle",method:"POST",data:t})}function C(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/bill/detail/".concat(t.id),method:"GET",params:t})}function O(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/bill/get/settle/info",method:"POST",data:t})}function S(t){return Object(n["a"])({url:"/admin/platform/bcx/brokerage/config/load",method:"get",params:t})}function j(t){return Object(n["a"])({url:"/admin/platform/bcx/channel/list",method:"get",params:t})}function k(t){return Object(n["a"])({url:"/admin/platform/bcx/region/tree",method:"get",params:t})}function L(t){return Object(n["a"])({url:"/admin/platform/bcx/brokerage/config/save",method:"post",data:t})}function T(t){return Object(n["a"])({url:"/admin/platform/bcx/department/tree",method:"get",params:t})}function E(t){return Object(n["a"])({url:"/admin/platform/bcx/department/member/list",method:"GET",params:t})}function B(t,e){var a=1===t?"/admin/platform/bcx/settle/fxy/list":2===t?"/admin/platform/bcx/settle/fxs/list":3===t?"/admin/platform/bcx/settle/channel/list":4===t?"/admin/platform/bcx/settle/department/list":"/admin/platform/bcx/settle/department/member/list";return Object(n["a"])({url:a,method:"GET",params:e})}function D(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/get/settle/info",method:"POST",data:t})}function P(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/do/settle",method:"POST",data:t})}function G(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/cancel/".concat(t.id),method:"POST",params:t})}function $(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/upload/attachments",method:"POST",data:t})}function z(t,e){var a=1===t?"/admin/platform/bcx/settle/fxy/list/excel":2===t?"/admin/platform/bcx/settle/fxs/list/excel":3===t?"/admin/platform/bcx/settle/channel/list/excel":4===t?"/admin/platform/bcx/settle/department/list/excel":"/admin/platform/bcx/settle/department/member/list/excel";return Object(n["a"])({url:a,method:"GET",params:e,responseType:"blob"})}function U(t){return Object(n["a"])({url:"/admin/platform/bcx/settle/detail/".concat(t.id),method:"GET",params:t})}function A(t){return Object(n["a"])({url:"/admin/platform/bcx/performance/report/channel/list",method:"GET",params:t})}function N(t){return Object(n["a"])({url:"/admin/platform/bcx/performance/report/settle/bill/list",method:"GET",params:t})}function R(t){return Object(n["a"])({url:"/admin/platform/bcx/performance/report/settle/list",method:"GET",params:t})}function V(t){return Object(n["a"])({url:"/front/user/performance/report/list",method:"GET",params:t})}function q(t){return Object(n["a"])({url:"/front/user/performance/report/settle/bill/list",method:"GET",params:t})}},"63f5":function(t,e,a){},7145:function(t,e,a){},8614:function(t,e,a){"use strict";a("7145")},"885c":function(t,e,a){"use strict";a("63f5")},"903a":function(t,e,a){"use strict";a("f732")},"9dd5":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("div",{staticClass:"top-info"},[a("div",{staticClass:"settle-obj-status"},[a("div",{staticClass:"settle-obj"},[a("div",{staticClass:"item"},[a("span",{staticClass:"tip"},[t._v("结算对象:")]),t._v(" "),a("span",[t._v(t._s(t.settleBillInfo.settleName))])]),t._v(" "),a("div",{staticClass:"item"},[a("span",{staticClass:"tip"},[t._v("账期:")]),t._v(" "),a("span",[t._v(t._s(t.settleBillInfo.billPeriod))])])]),t._v(" "),a("div",{staticClass:"settle-status",staticStyle:{"margin-left":"50px"}},[a("div",{staticClass:"item"},[a("span",{staticClass:"tip"},[t._v("结算状态:")]),t._v(" "),a("span",[t._v(t._s(1===t.settleBillInfo.settleStatus?"待结算":2===t.settleBillInfo.settleStatus?"部分结算":"已结算"))])]),t._v(" "),a("div",{staticClass:"item"},[a("span",{staticClass:"tip"},[t._v("结算类型:")]),t._v(" "),a("span",[t._v(t._s(1===t.settleBillInfo.belongType?"渠道商":2===t.settleBillInfo.belongType?"部门":3===t.settleBillInfo.belongType||5===t.settleBillInfo.belongType?"个人":"企业"))])])])]),t._v(" "),a("div",{staticClass:"data-info"},[a("div",{staticClass:"data-item"},[a("span",[t._v("¥ "+t._s(t.settleBillInfo.brokerageTotalPrice))]),t._v(" "),a("span",[t._v("佣金(元)")])]),t._v(" "),a("div",{staticClass:"data-item"},[a("span",[t._v("¥ "+t._s(t.settleBillInfo.orderTotalPrice))]),t._v(" "),a("span",[t._v("订单金额(元)")])]),t._v(" "),a("div",{staticClass:"data-item"},[a("span",[t._v(t._s(t.settleBillInfo.orderCount))]),t._v(" "),a("span",[t._v("订单数(笔)")])])]),t._v(" "),a("el-button",{staticClass:"back-btn",attrs:{size:"small"},on:{click:function(e){return t.back()}}},[t._v("返回")])],1),t._v(" "),a("div",{staticClass:"search-condition",staticStyle:{"margin-top":"30px"}},[a("el-form",{staticClass:"search-condition",attrs:{size:"small","label-width":"100px"}},[a("el-form-item",{attrs:{label:"订单号:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入订单号",size:"small",clearable:""},model:{value:t.searchInfo.orderNo,callback:function(e){t.$set(t.searchInfo,"orderNo","string"===typeof e?e.trim():e)},expression:"searchInfo.orderNo"}})],1),t._v(" "),a("el-form-item",{staticStyle:{"margin-left":"10px"},attrs:{label:3===t.type?"渠道商名称:":4===t.type?"部门名称:":5===t.type?"成员姓名:":"分销员姓名:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"姓名",size:"small",clearable:""},model:{value:t.searchInfo.name,callback:function(e){t.$set(t.searchInfo,"name","string"===typeof e?e.trim():e)},expression:"searchInfo.name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"下单时间:"}},[a("el-date-picker",{attrs:{type:"datetimerange","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"~","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.changeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1)],1),t._v(" "),a("div",{staticClass:"search-btn",on:{click:t.searchList}},[t._v("搜 索")])],1)]),t._v(" "),a("el-tabs",{on:{"tab-click":t.changeTab},model:{value:t.tabActive,callback:function(e){t.tabActive=e},expression:"tabActive"}},[a("el-tab-pane",{attrs:{label:"待结算",name:"0"}},[a("SettleDetailComp",{attrs:{id:t.id,listLoading:t.listLoading,billList:t.billList,searchInfo:t.searchInfo,total:t.total,page:t.page,limit:t.limit,type:t.type},on:{handleSizeChange:t.handleSizeChange}})],1),t._v(" "),a("el-tab-pane",{attrs:{label:"已结算",name:"1"}},[a("SettleDetailComp",{attrs:{id:t.id,listLoading:t.listLoading,billList:t.billList,searchInfo:t.searchInfo,total:t.total,page:t.page,limit:t.limit,type:t.type},on:{handleSizeChange:t.handleSizeChange}})],1)],1)],1)])],1)},i=[],r=a("21d2"),l=a("0f56"),o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"settle-detail-comp"},[a("div",{staticClass:"btns"},[a("div",{staticClass:"batch-settle-btn",on:{click:t.openSettleDialog}},[t._v("生成结算单")]),t._v(" "),a("div",{staticClass:"batch-export-btn",on:{click:t.batchExport}},[t._v("导出明细")])]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.billList,size:"mini","highlight-current-row":""},on:{"selection-change":t.changeOptions}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"orderNo",label:"订单号","min-width":"180",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"orderTime",label:"订单时间","min-width":"140",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"payPrice",label:"实付金额","min-width":"130",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"brokeragePrice",label:"佣金(元)","min-width":"130",align:"center"}}),t._v(" "),t.type<3?a("el-table-column",{attrs:{label:"分销类型","min-width":"130",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(1===e.row.brokerageUserType?"企业":"个人"))])]}}],null,!1,3808179565)}):t._e(),t._v(" "),t.type<3?a("el-table-column",{attrs:{prop:"brokerageUserRealName",label:"分销员姓名","min-width":"130",align:"center"}}):t._e(),t._v(" "),t.type<3?a("el-table-column",{attrs:{prop:"brokerageUserNikeName",label:"分销员昵称","min-width":"130",align:"center"}}):t._e(),t._v(" "),t.type<3?a("el-table-column",{attrs:{prop:"brokerageUserPhone",label:"分销员手机号","min-width":"130",align:"center"}}):t._e(),t._v(" "),t.type<3?a("el-table-column",{attrs:{prop:"brokerageUserOrg",label:"所属企业","min-width":"130",align:"center"}}):t._e(),t._v(" "),a("el-table-column",{attrs:{label:"结算状态","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(1===e.row.settleStatus?"待生效":2===e.row.settleStatus?"冻结中":3===e.row.settleStatus?"待结算":4===e.row.settleStatus?"结算中":5===e.row.settleStatus?"已结算":"无效"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"orderTime",label:"结算时间","min-width":"140",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.settleTime?e.row.settleTime:"--/——"))])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.limit,"current-page":t.page,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1),t._v(" "),a("settleDialog",{attrs:{showSettleDialog:t.showSettleDialog,rowId:t.rowId,id:t.id,checkList:t.checkList,from:"detail"},on:{closeSettleDialog:t.closeSettleDialog}})],1)},s=[],c=a("785a"),d=a("f6ba"),u={props:["id","listLoading","billList","total","page","limit","searchInfo","type"],components:{settleDialog:d["a"]},data:function(){return{showSettleDialog:!1,rowId:null,checkList:[]}},methods:{openSettleDialog:function(){this.checkList.length?this.checkList.filter((function(t){return 4===t.settleStatus})).length>0?this.$message({message:"有结算中的记录,请重新选择",type:"warning",showClose:!0}):this.showSettleDialog=!0:this.$message({message:"至少选择一条记录",type:"warning",showClose:!0})},closeSettleDialog:function(){this.showSettleDialog=!1},batchExport:function(){var t={settleBillId:this.id};this.bcxId&&(t.bcxId=this.bcxId),this.searchInfo.billPeriodStart&&(t.billPeriodStart=this.searchInfo.billPeriodStart),this.searchInfo.billPeriodEnd&&(t.billPeriodEnd=this.searchInfo.billPeriodEnd),this.searchInfo.name&&(t.name=this.searchInfo.name),this.searchInfo.settleStatus>0&&(t.settleStatus=this.searchInfo.settleStatus),Object(r["d"])(this.type,t).then((function(t){var e=decodeURIComponent(t.headers["content-disposition"].split("=")[1]),a=window.URL.createObjectURL(new Blob([t.data],{type:"application/vnd.ms-excel"})),n=document.createElement("a");n.style.display="none",n.href=a,n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(a)})).catch((function(){}))},changeOptions:function(t){this.checkList=t},down:function(t){var e=this,a=document.createElement("a");a.download="author-img","blob"===t?this.$refs.cropper.getCropBlob((function(t){e.downImg=window.URL.createObjectURL(t),a.href=window.URL.createObjectURL(t),a.click()})):this.$refs.cropper.getCropData((function(t){e.downImg=t,a.href=t,a.click()}))},confirmSettle:function(t){this.rowId=t,this.showSettleDialog=!0},uploadVoucher:function(t){console.info("result",t);var e=new FormData,a={model:"user",pid:0};e.append("multipart",t.file),this.uploadPic(e,a)},uploadPic:function(t,e){var a=this,n=this.$loading({lock:!0,text:"上传中,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(c["d"])(t,e).then((function(t){n.close(),a.$message.success("上传成功"),console.info("res",t)})).catch((function(t){n.close()}))},handleSizeChange:function(t){this.$emit("handleSizeChange",t)},pageChange:function(t){this.$emit("pageChange",t)}}},m=u,f=(a("8614"),a("2877")),p=Object(f["a"])(m,o,s,!1,null,"58bd1e99",null),h=p.exports,b=a("e350"),g={name:"performanceBillDetail",components:{cardsData:l["a"],settleDetailComp:h,SettleDetailComp:h},data:function(){return{listLoading:!1,settleBillInfo:{},billList:[],timeVal:[],searchInfo:{orderNo:"",name:"",dateLimit:""},limit:20,page:1,total:0,totalPage:null,type:null,id:null,bcxId:null,tabActive:0}},mounted:function(){this.type=this.$route.query.type,this.bcxId=this.$route.query.bcxId,this.id=this.$route.query.id,this.getSettleBillInfo(),this.getList()},methods:{checkPermi:b["a"],getSettleBillInfo:function(){var t=this,e={id:this.id};Object(r["t"])(e).then((function(e){t.settleBillInfo=e})).catch((function(){}))},getList:function(){var t=this;this.listLoading=!0;var e={limit:this.limit,page:this.page,settleBillId:this.$route.query.id,settleStatus:0==this.tabActive?"3,4":"5"};this.bcxId&&(e.bcxId=this.bcxId),this.searchInfo.orderNo&&(e.orderNo=this.searchInfo.orderNo),this.searchInfo.dateLimit&&(e.dateLimit=this.searchInfo.dateLimit),Object(r["q"])(this.type,e).then((function(e){var a=e.limit,n=e.total,i=e.totalPage,r=e.page,l=e.list;t.limit=a,t.total=n,t.totalPage=i,t.page=r,t.billList=l,t.listLoading=!1,console.info("xxx list",e)})).catch((function(){t.listLoading=!1}))},searchList:function(){this.page=1,this.getList()},changeTime:function(){this.timeVal?this.searchInfo.dateLimit=this.timeVal.join(","):this.searchInfo.dateLimit="",this.getList()},changeTab:function(){this.getList()},handleSizeChange:function(t){this.limit=t,this.page=1,this.getList()},pageChange:function(t){this.page=t,this.getList()},back:function(){this.$router.go(-1)}}},v=g,x=(a("903a"),Object(f["a"])(v,n,i,!1,null,"169a95ee",null));e["default"]=x.exports},f6ba:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"settle-dialog"},[a("el-dialog",{attrs:{visible:t.showSettleDialog,title:"生成结算单"},on:{"update:visible":function(e){t.showSettleDialog=e},close:t.onCancel}},[a("el-form",[a("el-form-item",{attrs:{label:"结算订单"}},[a("div",[t._v(t._s(t.settleBaseInfo.settleOrderCount)+"(笔)")])]),t._v(" "),a("el-form-item",{attrs:{label:"结算金额"}},[a("div",[t._v("¥ "+t._s(t.settleBaseInfo.settleTotalPrice))])])],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.onCancel}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary",disabled:0===t.settleBaseInfo.settleOrderCount},on:{click:t.confirmSettle}},[t._v("确认生成")])],1)],1)],1)},i=[],r=a("21d2");function l(t){return d(t)||c(t)||s(t)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){if(t){if("string"===typeof t)return u(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?u(t,e):void 0}}function c(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function d(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a