app.87a17168.js 34 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["app"],{0:function(t,e,n){n("db4d"),t.exports=n("56d7")},"10f8":function(t,e,n){"use strict";n("b23c")},"390b":function(t,e,n){"use strict";n("75a5")},"39ef":function(t,e,n){},"4aec":function(t,e,n){"use strict";n("66e2")},"4f92":function(t,e,n){"use strict";n("39ef")},"56d7":function(t,e,n){"use strict";function a(t){return _[String(t)]}n.r(e);var o={},r=(e=(n.r(o),n.d(o,"toThousandFilter",(function(){return G})),n("d25f"),n("456d"),n("ac6a"),n("f3e2"),n("7f7f"),n("cadf"),n("551c"),n("f751"),n("097d"),{name:"App"}),n("2877")),i=Object(r.a)(e,(function(){var t=this.$createElement;return(this._self._c||t)("router-view")}),[],!1,null,null,null).exports,s=(n("1c01"),n("58b2"),n("8e6e"),n("bd86")),l=(e=(n("7514"),n("0cd8"),n("6d67"),n("96cf"),n("3b8d")),{}),c=(window.ajaxTimeout=2e4,Object(e.a)(regeneratorRuntime.mark((function t(){var e,n,a,o,r,i,s,c=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<c.length&&void 0!==c[0]?c[0]:"",n=1<c.length&&void 0!==c[1]?c[1]:{},a=2<c.length&&void 0!==c[2]?c[2]:"GET",o=3<c.length&&void 0!==c[3]?c[3]:{},r=4<c.length&&void 0!==c[4]?c[4]:l,i=5<c.length?c[5]:void 0,a=a.toLowerCase(),s={method:a,baseURL:"",url:e,data:n,params:o,timeout:window.ajaxTimeout,headers:r,onUploadProgress:i},i&&"function"==typeof i&&(s.onUploadProgress=i),axios.interceptors.request.use((function(t){return t}),(function(t){return Promise.reject(new Error("服务器异常,请联系管理员!"))})),axios.interceptors.response.use((function(t){return t}),(function(t){return Promise.reject(t.response.data)})),t.abrupt("return",new Promise((function(t,e){axios(s).then((function(e){t(e.data)})).catch((function(t){e(t)}))})));case 12:case"end":return t.stop()}}),t)})))),u=n("f121"),p=n.n(u),d="admin/",h=function(t,e){return c(u.reportApi+d+"stats",t,"post",e)},m=function(t,e){return c(u.reportApi+d+"departEveryDay",t,"post",e)},f=function(t,e){return c(u.reportApi+d+"companyEveryMonth",t,"post",e)},b={methods:{getHeight:function(){var t=document.body.offsetHeight;this.maxHeight=t-90+""}}},g=(n("a481"),n("c5f6"),n("6b54"),n("87b3"),n("28a5"),{1:"自营",2:"渠道",3:"供应商端"}),_={"泓源":"泓源广诚","普润":"普润心堂","百辰":"百辰荣达","平台":"平台部"},y={"泓源":"泓源广诚","普润":"普润心堂&锦兴弘昌","百辰":"百辰荣达","平台":"平台部"};function w(t,e){var n,a;try{n=t.toString().split(".")[1].length}catch(t){n=0}try{a=e.toString().split(".")[1].length}catch(t){a=0}return(t*(t=Math.pow(10,Math.max(n,a)))+e*t)/t}function v(t,e){var n=0,a=0;try{n=t.toString().split(".")[1].length}catch(t){}try{a=e.toString().split(".")[1].length}catch(t){}return x(Number(t.toString().replace(".",""))/Number(e.toString().replace(".","")),Math.pow(10,a-n))}function x(t,e){var n=0;t=t.toString(),e=e.toString();try{n+=t.split(".")[1].length}catch(t){}try{n+=e.split(".")[1].length}catch(t){}return Number(t.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,n)}function O(t,e){var n,a;try{n=t.toString().split(".")[1].length}catch(t){n=0}try{a=e.toString().split(".")[1].length}catch(t){a=0}return((t*(t=Math.pow(10,Math.max(n,a)))-e*t)/t).toFixed(a<=n?n:a)}function S(t){return NaN===t||"NaN"===t||0===Number(t)?"0":t<1e3&&0<t||t<0&&-1e3<t?t:v(t,1e4).toFixed(2)+"W"}function j(t,e){var n,a=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)),a}function T(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){Object(s.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var k,R,D,N,P={name:"WanyuReport",props:["date"],mixins:[b],watch:{date:function(t){(this.dataTime=t)&&this.searchList()}},data:function(){return{total:{completion:0,total_tips:0},mapResponseCompletionCompanyName:y,dataTime:this.date,loading:!1,maxHeight:"0",tableData:[]}},computed:{stats:function(){var t=this.total,e=t.day,n=t.month;t=t.total_tips;return{day:S(e),month:S(n),total_tips:S(t),completionRate:x(v(n,t)||0,100)+"%"}}},created:(R=Object(e.a)(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.onresize=function(){e.getHeight()};case 1:case"end":return t.stop()}}),t)}))),function(){return R.apply(this,arguments)}),mounted:function(){var t=this;this.$nextTick((function(){t.getHeight()})),this.searchList()},methods:{getCompanyLabel:a,unit2TenThousand:S,division:v,tableRowClassName:function(t){var e=t.row;t=t.rowIndex;return e&&e.child&&0<e.child.length||0===t?"warning-row":""},searchList:(k=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n,a=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.loading=!0,this.tableData=[],t.next=4,m({daytime:this.date});case 4:0===(n=t.sent).code&&n.data&&0<n.data.length?(e=(n.data||[]).map((function(t){var e=t.depart,n=t.msale_total,a=t.mth_total,o=t.sale_total,r=t.th_total;return{depart:e,total_tips:t.total_tips,dayinfo:{sale_total:o,th_total:r},monthinfo:{msale_total:n,mth_total:a}}})),this.total=e.reduce((function(t,e){var n=e.total_tips,a=e.day;a=void 0===a?0:a,e=e.month,e=void 0===e?0:e;return{total_tips:w(void 0===n?0:n,t.total_tips),month:w(e,t.month),day:w(a,t.day)}}),{total_tips:0,month:0,day:0}),e=["百辰","泓源","普润","平台"].map((function(t){return e.find((function(e){return e.depart===t}))})),this.tableData=e.map((function(t){var e=t.depart,n=t.total_tips,o=t.dayinfo,r=(t=t.monthinfo,O(t.msale_total,t.mth_total)),i=x(v(r,n),100).toFixed(2);return{depart:e,total_tips:n,dayinfo:T(T({},o),{},{sale_total:O(o.sale_total,o.th_total)}),monthinfo:{monthNetSales:r,monthProportion:i},proportion:x(v(t.msale_total,a.total.month)||0,100)||0}})),this.total={completion:this.tableData.reduce((function(t,e){return w(t,e.monthinfo.monthNetSales)}),0),total_tips:this.tableData.reduce((function(t,e){return w(t,e.total_tips)}),0)},n=x(v(this.total.completion,this.total.total_tips)||0,100).toFixed(2)+"%",this.total=T(T({},this.total),{},{completionRate:n})):this.tableData=[],this.getHeight(),this.loading=!1;case 8:case"end":return t.stop()}}),t,this)}))),function(){return k.apply(this,arguments)})}},C=(P=(n("66bc"),Object(r.a)(P,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"SalesReportRejectedNew"},[e("div",{staticClass:"table-header",staticStyle:{"line-height":"36px"}},[t._v("北京万宇恒通国际科贸有限公司")]),e("el-table",{staticStyle:{"margin-bottom":"-1px"},attrs:{size:"mini",border:"",data:[t.total]}},[e("el-table-column",{attrs:{label:"月指标",prop:"total_tips"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.total_tips))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"完成额",prop:"completion"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.completion))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"完成率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.completionRate)+"\n ")]}}])})],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{border:"",data:t.tableData,"max-height":t.maxHeight,size:"mini","row-key":"id","default-expand-all":"","tree-props":{children:"child",hasChildren:"hasChildren"}}},[e("el-table-column",{attrs:{label:"部门",fixed:"left",width:"80",prop:"depart"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.mapResponseCompletionCompanyName[e.row.depart]||e.row.depart))]}}])}),e("el-table-column",{attrs:{label:"本日销售额","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.dayinfo.sale_total))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"本月金额","min-width":"120",align:"center"}},[e("el-table-column",{attrs:{label:"销售指标",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.total_tips))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"净销售",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.monthinfo.monthNetSales))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"净销售完成率",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.monthinfo.monthProportion)+"%\n ")]}}])})],1)],1)],1)}),[],!1,null,"5d4b8096",null).exports),n("75fc")),E={name:"WanyuTypeReport",props:["date"],mixins:[b],watch:{date:function(t){(this.dataTime=t)&&this.searchList()}},data:function(){return{total:{day:0,month:0,total_tips:0},mapResponseCompletionCompanyName:y,dataTime:this.date,loading:!1,maxHeight:"0",tableData:[]}},created:(N=Object(e.a)(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.onresize=function(){e.getHeight()};case 1:case"end":return t.stop()}}),t)}))),function(){return N.apply(this,arguments)}),mounted:function(){var t=this;this.$nextTick((function(){t.getHeight()})),this.searchList()},methods:{getCompanyLabel:a,unit2TenThousand:S,objectSpanMethod:function(t){t.row,t.column;var e=t.rowIndex;if(0===t.columnIndex)return e%2==0?{rowspan:2,colspan:1}:{rowspan:0,colspan:0}},searchList:(D=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.loading=!0,this.tableData=[],t.next=4,m({daytime:this.date});case 4:0===(e=t.sent).code&&e.data&&0<e.data.length?(n=e.data.reduce((function(t,e){var n=e.mzy_sale_total,a=e.zy_sale_total,o=e.mchannel_sale_total,r=e.channel_sale_total,i=w(o,n)||0,s=x(v(n,i)||0,100).toFixed(2);return i=0!==Number(s)||0!==x(v(o,i)||0,100)?Number(100-Number(s)).toFixed(2):0,[].concat(Object(C.a)(t),[{depart:e.depart,type:"直营",month:n,day:a,proportion:s},{depart:e.depart,type:"渠道",month:o,day:r,proportion:i}])}),[]),a=[],["百辰","泓源","普润","平台"].forEach((function(t){return n.forEach((function(e){e.depart===t&&a.push(e)}))})),this.tableData=a):this.tableData=[],this.getHeight(),this.loading=!1;case 8:case"end":return t.stop()}}),t,this)}))),function(){return D.apply(this,arguments)})}};n("390b"),E=Object(r.a)(E,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"SalesReportRejectedNew"},[e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"","max-height":t.maxHeight,size:"mini","row-key":"id","span-method":t.objectSpanMethod,stripe:""}},[e("el-table-column",{attrs:{label:"部门",fixed:"left",width:"80",prop:"depart"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.mapResponseCompletionCompanyName[e.row.depart]||e.row.depart))]}}])}),e("el-table-column",{attrs:{label:"业绩类型",prop:"type",align:"center"}}),e("el-table-column",{attrs:{label:"日净销售额",prop:"day",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.day))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"月净销售额",prop:"month",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.month))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"月占比",prop:"proportion",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.proportion)+"%\n ")]}}])})],1)],1)}),[],!1,null,"220ed842",null).exports;function H(t,e){var n,a=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)),a}function L(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?H(Object(n),!0).forEach((function(e){Object(s.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n("6762"),n("2fdb");var z,$,A={name:"WanyuCompletion",props:["date"],mixins:[b],watch:{date:function(t){(this.dataTime=t)&&this.searchList()}},data:function(){return{total:{completion:0,total_tips:0},dataTime:this.date,loading:!1,maxHeight:"0",tableData:[]}},computed:{stats:function(){var t=this.total,e=t.day,n=t.month;t=t.total_tips;return{day:S(e),month:S(n),total_tips:S(t),completionRate:x(v(n,t)||0,100)+"%"}}},created:($=Object(e.a)(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.onresize=function(){e.getHeight()};case 1:case"end":return t.stop()}}),t)}))),function(){return $.apply(this,arguments)}),mounted:function(){var t=this;this.$nextTick((function(){t.getHeight()})),this.searchList()},methods:{getCompanyCompletionLabel:function(t){return y[String(t)]},unit2TenThousand:S,division:v,tableRowClassName:function(t){var e=t.row;t=t.rowIndex;return e&&e.child&&0<e.child.length||0===t?"warning-row":""},searchList:(z=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n,a,o,r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.loading=!0,this.tableData=[],t.next=4,m({daytime:this.date});case 4:return e=t.sent,t.next=7,f({daytime:this.date});case 7:o=t.sent,0===e.code&&e.data&&0<e.data.length&&0===o.code&&o.data&&0<o.data.length?(n=o.data.reduce((function(t,e){return L(L({},t),{},Object(s.a)({},e.companyName,O(e.monthinfo[2].msale_total,e.monthinfo[2].mth_total)))}),{}),a=(e.data||[]).map((function(t){var e=t.depart,n=t.msale_total,a=t.mth_total,o=t.sale_total,r=t.th_total;return{depart:e,total_tips:t.total_tips,dayinfo:{sale_total:o,th_total:r},monthinfo:{msale_total:n,mth_total:a}}})),a=["百辰","泓源","普润","平台"].map((function(t){return a.find((function(e){return e.depart===t}))})),this.total=a.reduce((function(t,e){var n=e.total_tips,a=e.day;a=void 0===a?0:a,e=e.month,e=void 0===e?0:e;return{total_tips:w(void 0===n?0:n,t.total_tips),month:w(e,t.month),day:w(a,t.day)}}),{total_tips:0,month:0,day:0}),this.tableData=a.map((function(t){var e=t.depart,a=t.total_tips,o=t.dayinfo,i=(t=t.monthinfo,O(t.msale_total,t.mth_total)),s=Object.keys(n).find((function(t){return t.includes(e)}));s&&(i=w(i,n[s])),s=x(v(i="北京普润心堂商贸有限公司"===s?w(i,n["北京锦兴弘昌科技有限公司"]):i,a),100).toFixed(2);return{depart:e,total_tips:a,dayinfo:L(L({},o),{},{sale_total:O(o.sale_total,o.th_total)}),monthinfo:{monthNetSales:i,monthProportion:s},proportion:x(v(t.msale_total,r.total.month)||0,100)||0}})),this.total={completion:this.tableData.reduce((function(t,e){return w(t,e.monthinfo.monthNetSales)}),0),total_tips:this.tableData.reduce((function(t,e){return w(t,e.total_tips)}),0)},o=x(v(this.total.completion,this.total.total_tips)||0,100).toFixed(2)+"%",this.total=L(L({},this.total),{},{completionRate:o})):this.tableData=[],this.getHeight(),this.loading=!1;case 11:case"end":return t.stop()}}),t,this)}))),function(){return z.apply(this,arguments)})}};n("10f8"),A=Object(r.a)(A,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"SalesReportRejectedNew"},[e("h3",[t._v("\n 整体搞了 "+t._s(t.unit2TenThousand(t.total.completion))+"元(万宇平台+业务公司供应商端)\n ")]),e("el-table",{staticStyle:{"margin-bottom":"-1px"},attrs:{size:"mini",border:"",data:[t.total]}},[e("el-table-column",{attrs:{label:"月指标",prop:"total_tips"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.total_tips))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"完成额",prop:"completion"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.completion))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"完成率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.completionRate)+"\n ")]}}])})],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"","max-height":t.maxHeight,size:"mini","row-key":"id","default-expand-all":"","tree-props":{children:"child",hasChildren:"hasChildren"}}},[e("el-table-column",{attrs:{label:"部门",fixed:"left",width:"80",prop:"depart"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.getCompanyCompletionLabel(e.row.depart)))]}}])}),e("el-table-column",{attrs:{label:"本日销售额","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.dayinfo.sale_total))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"本月金额","min-width":"120",align:"center"}},[e("el-table-column",{attrs:{label:"销售指标",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.total_tips))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"净销售",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.monthinfo.monthNetSales))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"净销售完成率",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.monthinfo.monthProportion)+"%\n ")]}}])})],1)],1)],1)}),[],!1,null,"9b3fe3fc",null).exports;function I(t,e){var n,a=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)),a}function M(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(s.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}n("5a0c");var F,U,V={name:"DepartmentReport",props:["date","companyNo","index"],mixins:[b],watch:{date:function(t){(this.dataTime=t)&&this.searchList()}},computed:{stats:function(){var t=this.total,e=t.month,n=t.monthReturn;t=t.total_tips,e=O(e,n),n=x(v(e,t)||0,100);return{month:S(e),total_tips:S(t),completionRate:n?n.toFixed(2)+"%":n+"%"}}},data:function(){return{total:{day:0,month:0,total_tips:0,monthReturn:0},companyName:"",mapReponseType:g,dataTime:this.date,loading:!1,maxHeight:"0",tableData:[]}},created:(U=Object(e.a)(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.onresize=function(){e.getHeight()};case 1:case"end":return t.stop()}}),t)}))),function(){return U.apply(this,arguments)}),mounted:function(){var t=this;this.$nextTick((function(){t.getHeight()})),this.searchList()},methods:{getTypeLabel:function(t){return g[String(t)]},unit2TenThousand:S,tableRowClassName:function(t){var e=t.row;t=t.rowIndex;return e&&e.child&&0<e.child.length||0===t?"warning-row":""},getDiffDay:function(){var t=Date.parse(this.date),e=Date.parse("2023-04-17 00:00:00");return Math.floor((t-e)/864e5)},searchList:(F=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n,a,o,r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.loading=!0,this.tableData=[],t.next=4,f({daytime:this.date,companyNo:this.companyNo});case 4:o=t.sent,r=this.getDiffDay()<0&&"GS2302231323386950"===this.companyNo,0===o.code&&o.data&&0<o.data.length?(o=o.data[0]||[],a=o.monthinfo,e=void 0===a?[]:a,a=o.dayinfo,n=void 0===a?[]:a,a=o.total_tips,a=void 0===a?0:a,o=o.companyName,e[1]=M({},r?{msale_total:w(e[1].msale_total,e[2].msale_total),mth_total:w(e[1].mth_total,e[2].mth_total),type:"2"}:e[1]),e[0]=M({},r?{msale_total:0,mth_total:0,type:"1"}:e[0]),e[2]=M({},r?{msale_total:0,mth_total:0,type:"3"}:e[2]),this.companyName=o,r=Object.keys(g),this.total={total_tips:Number(a),day:n.reduce((function(t,e){return e=e.sale_total,w(t,void 0===e?"0":e)}),0),month:e.reduce((function(t,e){return e=e.msale_total,w(t,void 0===e?"0":e)}),0),monthReturn:e.reduce((function(t,e){return e=e.mth_total,w(t,void 0===e?"0":e)}),0)},this.tableData=r.map((function(t){var a=e.find((function(e){return String(e.type)===t}))||{},o=n.find((function(e){return String(e.type)===t}))||{},r=O(a.msale_total,a.mth_total)||0,s=O(i.total.month,i.total.monthReturn);return{type:t,dayinfo:M(M({},o),{},{sale_total:O(o.sale_total,o.th_total)||0}),monthinfo:M(M({},a),{},{msale_total:r}),proportion:x(v(r,Number(s).toFixed(2))||0,100).toFixed(2)}}))):this.tableData=[],this.getHeight(),this.loading=!1;case 9:case"end":return t.stop()}}),t,this)}))),function(){return F.apply(this,arguments)})}},W=(V=(n("4f92"),Object(r.a)(V,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"SalesReportRejectedNew"},[e("div",{staticClass:"table-header"},[t._v(t._s(t.index)+"."+t._s(t.companyName||"--"))]),e("el-table",{staticClass:"table-sub__header",staticStyle:{"margin-top":"10px","margin-bottom":"-1px"},attrs:{data:[t.stats],size:"mini",border:""}},[e("el-table-column",{attrs:{align:"center",prop:"total_tips",label:"月指标"}}),e("el-table-column",{attrs:{align:"center",prop:"month",label:"完成额"}}),e("el-table-column",{attrs:{align:"center",prop:"completionRate",label:"完成率"}})],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"","max-height":t.maxHeight,size:"mini","row-key":"id","default-expand-all":"","tree-props":{children:"child",hasChildren:"hasChildren"}}},[e("el-table-column",{attrs:{prop:"type",label:"业绩类型",width:"70"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.getTypeLabel(e.row.type))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"本日销售额","max-width":"120",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.dayinfo.sale_total))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"本月销售额","max-width":"120",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.monthinfo.msale_total))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"月占比",prop:"proportion",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.proportion)+"%\n ")]}}])})],1)],1)}),[],!1,null,"770490fc",null).exports),{name:"ControlDisplay",props:["companyArr","hasPlatformDimension"],data:function(){return{date:""}},mounted:function(){this.date=this.transformTime()},methods:{transformTime:function(){var t=new Date,e=t.getFullYear(),n=t.getMonth()+1;t=t.getDate();return e+"-"+(n<10?"0"+n:n)+"-"+(t<10?"0"+t:t)}}}),q=(n("4aec"),[P,Object(r.a)(W,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-main"},[n("div",{staticClass:"app-main-zhunbeixuanzhuan"},[n("div",{staticClass:"app-main-xuanzhuan"},[n("div",{staticClass:"search clear"},[n("el-date-picker",{staticClass:"fr picker",staticStyle:{"margin-top":"10px"},attrs:{size:"small",editable:!1,clearable:!1,"value-format":"yyyy-MM-dd",format:"yyyy-MM-dd",type:"date",align:"right",placeholder:"选择日期","picker-options":{disabledDate:function(t){return t.getTime()>Date.now()}}},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}})],1),t.hasPlatformDimension?[n("h3",[t._v("平台维度")]),n("el-row",{staticClass:"myul",attrs:{gutter:20}},[n("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:24,md:12,lg:12,xl:12}},[n("wanyu-report",{attrs:{date:t.date}})],1),n("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:24,md:12,lg:12,xl:12}},[n("wanyu-type-report",{attrs:{date:t.date}})],1)],1)]:t._e(),t.companyArr&&0<t.companyArr.length?[n("h3",[t._v("业务公司维度")]),n("el-row",{attrs:{gutter:20}},t._l(t.companyArr,(function(e,a){return n("el-col",{key:e.companyNo,staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:12,lg:6,xl:6}},[n("department-report",{attrs:{date:t.date,index:a+1,companyNo:e.companyNo}})],1)})),1)]:t._e()],2)])])}),[],!1,null,null,null).exports,E,V,A]);P={install:function(t){q.forEach((function(e){return t.component(e.name,e)}))}};function G(t){return"-"===t?"":(+t||0).toString().replace(/^-?\d+/g,(function(t){return t.replace(/(?=(?!\b)(\d{3})+$)/g,",")}))}var J=function(t,e){return c(u.reportApi+"admin/wechat_getinfo",t,"post",e)},Y=(W={name:"UnusualState",props:["message"],methods:{toLogin:function(){this.$router.push("/login")}}},E=Object(r.a)(W,(function(){var t=this.$createElement;t=this._self._c||t;return t("div",[t("el-empty",{attrs:{description:"未获取到用户数据",image:"/static/warning.png"}},[t("el-button",{attrs:{type:"primary"},on:{click:this.toLogin}},[this._v("重新登录")])],1)],1)}),[],!1,null,null,null).exports,n("3b2b"),"WECHAT_OPENID");function B(t){var e=window.location.href;return t=t.replace(/[\[\]]/g,"\\$&"),t=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(e),t?t[2]?decodeURIComponent(t[2].replace(/\+/g," ")):"":null}var K,Q,X;V={name:"report",components:{UnusualState:E},data:function(){return{companyArr:[],hasPlatformDimension:!1,state:{error:!1,loading:!1,message:""}}},mounted:(Q=Object(e.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.requestUserinfo();case 1:case"end":return t.stop()}}),t,this)}))),function(){return Q.apply(this,arguments)}),methods:{requestUserinfo:(K=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.state.loading=!0,e=window.sessionStorage.getItem(Y)||"",n=B("code"),t.next=5,J({code:n});case 5:a=t.sent,this.state.loading=!1,t.t0=Number(a.code),t.next=0===t.t0?10:14;break;case 10:return this.companyArr=a.data.companyArr.filter((function(t){return t=t.info,t=void 0===t?[]:t,t.includes(1)||t.includes("1")})),this.hasPlatformDimension=(a.data.is_show||[]).includes(1)||(a.data.is_show||[]).includes("1"),o=a.data.openid,window.sessionStorage.setItem(Y,o||""),t.abrupt("break",18);case 14:return this.state.error=!0,this.state.message=a.message,e&&window.sessionStorage.removeItem(Y),t.abrupt("break",18);case 18:case"end":return t.stop()}var o}),t,this)}))),function(){return K.apply(this,arguments)})}},A=Object(r.a)(V,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.state.loading,expression:"state.loading"}],attrs:{id:"app"}},[t.state.error?[e("unusual-state",{attrs:{message:t.state.message}})]:[e("control-display",{attrs:{companyArr:t.companyArr,hasPlatformDimension:t.hasPlatformDimension}})]],2)}),[],!1,null,null,null).exports,W={name:"login",mounted:(X=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=encodeURIComponent("http://rep.caixiao365.com/"),e="wx_"+Math.random().toString(36).substr(2,15),n="https://open.weixin.qq.com/connect/oauth2/authorize?appid=".concat(p.a.appId,"&redirect_uri=").concat(n,"&response_type=code&scope=").concat("snsapi_userinfo","&state=").concat(e,"#wechat_redirect"),window.location.href=n;case 5:case"end":return t.stop()}}),t)}))),function(){return X.apply(this,arguments)})},E=Object(r.a)(W,(function(){var t=this.$createElement;return(this._self._c||t)("div",{})}),[],!1,null,null,null).exports;function Z(t,e){var n,a=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)),a}function tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Z(Object(n),!0).forEach((function(e){Object(s.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var et,nt;V={name:"WanyuTypeReport",props:["date"],mixins:[b],watch:{date:function(t){(this.dataTime=t)&&this.searchList()}},data:function(){return{total:{day:0,month:0,total_tips:0},mapResponseCompletionCompanyName:y,dataTime:this.date,loading:!1,maxHeight:"0",tableData:[]}},created:(nt=Object(e.a)(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.onresize=function(){e.getHeight()};case 1:case"end":return t.stop()}}),t)}))),function(){return nt.apply(this,arguments)}),mounted:function(){var t=this;this.$nextTick((function(){t.getHeight()})),this.searchList()},methods:{getCompanyLabel:a,unit2TenThousand:S,objectSpanMethod:function(t){t.row,t.column;var e=t.rowIndex;if(0===t.columnIndex)return e%2==0?{rowspan:2,colspan:1}:{rowspan:0,colspan:0}},searchList:(et=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.loading=!0,this.tableData=[],t.next=4,h({daytime:this.date});case 4:0===(n=t.sent).code&&n.data&&0<n.data.length?(e=n.data,n=n.data.reduce((function(t,e){return Object.keys(e).reduce((function(t,n){return tt(tt({},t),{},Object(s.a)({},n,"depart"!==n?w(e[n]||0,t[n]||0):"总计"))}),t)}),{}),this.tableData=[].concat(Object(C.a)(e),[n])):this.tableData=[],this.getHeight(),this.loading=!1;case 8:case"end":return t.stop()}}),t,this)}))),function(){return et.apply(this,arguments)})}},n("a553"),W=Object(r.a)(V,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"SalesReportRejectedNew"},[e("div",{staticClass:"table-header",staticStyle:{"line-height":"36px"}},[t._v("应收账款报表看板")]),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"","max-height":t.maxHeight,size:"mini","row-key":"id",stripe:""}},[e("el-table-column",{attrs:{label:"业务公司",fixed:"left",width:"80",prop:"depart"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.depart.split("@")[1]||"总计"))]}}])}),e("el-table-column",{attrs:{label:"应收账款",prop:"wpay_fee",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.wpay_fee))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"已开票未回票",prop:"wpay_ainv_fee",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.wpay_ainv_fee))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"未开票",prop:"winv_fee",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.winv_fee))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"待开票",prop:"inv_fee",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.inv_fee))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"已发货未开票",prop:"winv_asend_fee",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.winv_asend_fee))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"未发货",prop:"wpay_send_fee",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.wpay_send_fee))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"超60天已发货未开票",prop:"winv_two_month",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.winv_two_month))+"\n ")]}}])}),e("el-table-column",{attrs:{label:"超180天应收账款",prop:"wpay_six_month",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.unit2TenThousand(e.row.wpay_six_month))+"\n ")]}}])})],1)],1)}),[],!1,null,"092a3302",null).exports,b=new VueRouter({routes:[{path:"/",component:A},{path:"/accountsReceivable",component:W},{path:"/login",component:E}],mode:"hash"}),b.beforeEach((function(t,e,n){"/login"===t.path||B("code")?n():n("/login")})),e=b,r=n("5c96");n("0fae"),Vue.component(r.Table.name,r.Table),Vue.component(r.Select.name,r.Select),Vue.component(r.Option.name,r.Option),Vue.component(r.DatePicker.name,r.DatePicker),Vue.use(e),Vue.use(P),Object.keys(o).forEach((function(t){return Vue.filter(t,o[t])})),Vue.config.productionTip=!1,window.vm=new Vue({router:e,render:function(t){return t(i)}}).$mount("#app")},"66bc":function(t,e,n){"use strict";n("bdc3")},"66e2":function(t,e,n){},"75a5":function(t,e,n){},"8bbf":function(t,e){t.exports=Vue},a553:function(t,e,n){"use strict";n("d74d")},b23c:function(t,e,n){},bdc3:function(t,e,n){},d74d:function(t,e,n){},f121:function(t,e,n){n=n("f1e0"),t.exports=n},f1e0:function(t,e){t.exports={title:"业绩报表",baseApi:"http://inv.sitw.wanyuhengtong.com/",cxApi:"http://stock.api.wanyuhengtong.com/",fileURL:"https://api2.edu.futurelab.tv",reportApi:"http://cxinv.api.caixiao365.com/",appId:"wxfa1f1a0211edf630",redirect:"http://depart.test241.wanyuhengtong.com/",ding:{CorpId:"dingc78fa4301e1a424a35c2f4657eb6378f",AgentId:"1184953963"}}}},[[0,"runtime","chunk-elementUI","chunk-libs"]]]);