1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["app"],{0:function(t,e,n){n("db4d"),t.exports=n("56d7")},1:function(t,e){},"2ac3":function(t,e,n){"use strict";n("5724")},3547:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAC4VJREFUeF7tnE/IpWUZxq977QRhKmhJTiqCSpvQRVk5i8iiWbRQStvk0LSqFhEUBhUkBdGiWk3itEkLXbQwymiRlrVQ2oQK4kxjlAppEqTrO149hs2fb773ut/net4/14EDs3iv+36f33N+333O851vAn6YgAmck0CYjQmYwLkJWBC/OkxgDwIWxC8PE7Agfg2YAEfAE4Tj5tRGCFiQjWy0l8kRsCAcN6c2QsCCbGSjvUyOgAXhuDm1EQIWZCMb7WVyBCwIx82pjRCwIBvZaC+TI7BpQTLzYgDXAbgWwCUcwslTOXlFruBLAJ4G8FREDP/e5GNTgmTmpQBuAXAjgI8AuHKTuz5+0ScB/BbA4wAejogXx5dYZmITguzEOApgeF62zK2azV2/AOAeAMe2IMrqBcnM2wHcDeCK2bzE1nEjzwG4KyLuX8dyzr6KVQuSmV8F8J01b+AM1va1iPjuDO6jyS2sVpDMvBXAA02ouejpBG6LiAfXiGWVgliOLi/VVUqyOkEy8xoAjwG4qMvLZLtNXwZwU0Q8syYEaxTkXgB3rmmTFrSW4xFxZEH3e95bXZUgmfkxAL8676p9QUsCH4+IX7dsoKy9NkF+COALSoDudQaBH0XEF9fCZW2CPAvgqrVszkLXcSIirl7ovZ9x26sRJDMvAPDqDDfmeQDDT9RXJr63CwEME/OdE9edotyBiHhtikK9a6xJkOE35ad6Az1L/8MR8csW95WZnwDwUIvaxZoHI2L4TfviH2sS5Ibdl+nmtCknI6LpW77MPDHDL13eGBFPzGkj2HtZkyA3A/gdC6JRbviq+PWNar9eNjOf3H1lv2WbsbUPRcQjY0NzvN6CtN+VZi+WzJzjD4WBaLM1t9+u/+9gQTTEDw+/3Y+If0/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ELO+3izLwdwH2VGoKsBRFAHtViIYIcjIjnRi3sTEGuAHCqUkOQtSACyKNaLECQUxHxnlGLOsfFmflXAAenqNWohgVpBJYum5k3AHicLtA+eCIirp6iTWY+C+CqKWo1qnFjRDzRqLa07Jq+7r6Etx6XR8Q/Kjucme8C8PdKDUG2/FZScI/7arEmQS4A8Oq+Vt3votsi4sFK+8y8FcADlRqC7IGIeE3Qp3mL1QgykMrMJwFc15wa3+C+iPgMH399jT8FcEelRuPsUxFxfeMesvJrE+TbAO6S0eMa3R0RX2eimbnq9TFMWmfWJshHATzcGtoE9Ud/FlnIZ48BzS0R8ZsJGM2ixKoE2b3NuhdA6bfVop35cET8fj+9MvNDC/mPJ45HxJH9rGkp16xRkGsAPAbgogVswg8AfD8iznoqlZmXA/gygC8tYC0vA7gpIp5ZwL3u+xZXJ8huihwFcGzfFPpeOJy8/WX3/NPuVt4P4L2754G+t7fv7p+PiCV9JX9fC1ulIDtJvgngG/ui4IuqBL4VEQPv1T1WK8gCJ8lSX1yrnBxvbsaqBdlJ8gEAwwf34bOJH9MRGD5rHImIP05Xcn6VVi/ITpJLAQyfS4bnZfPbhkXd0QsAhj8VPhYRLy7qzomb3YQgb3LJzEGUwwA+uHu+m2C2xcjfAPxh93xoC2Js5i3WXq/mzLx499WUawFcssVX/h5r/ieApwEMXx15aatsNjVBtrrJXjdPwILw7JzcAAELsoFN9hJ5AhaEZ+fkBghYkA1sspfIE7AgPDsnN0DAgmxgk71EnoAF4dk5uQECFmQDm+wl8gQsCM/OyQ0QsCAb2GQvkSdgQXh2Tm6AgAXZwCZ7iTyB/wLzcDEjMeq8gAAAAABJRU5ErkJggg=="},"4aec":function(t,e,n){"use strict";n("66e2")},"4c25":function(t,e,n){},5416:function(t,e,n){},"56d7":function(t,e,n){"use strict";n.r(e);var a={},r=(e=(n.r(a),n.d(a,"toThousandFilter",(function(){return H})),n("d25f"),n("456d"),n("ac6a"),n("f3e2"),n("7f7f"),n("4917"),n("cadf"),n("551c"),n("f751"),n("097d"),{name:"App"}),n("2877")),o=Object(r.a)(e,(function(){var t=this.$createElement;return(this._self._c||t)("router-view")}),[],!1,null,null,null).exports,i=(n("1c01"),n("58b2"),n("8e6e"),n("ade3")),s=(e=(n("0cd8"),n("6d67"),n("96cf"),n("1da1")),n("6b54"),n("87b3"),n("6821f")),c=n.n(s),l={};function u(t){return w[String(t)]}window.ajaxTimeout=2e4;var p=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n,a,r,o,i,s,u=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<u.length&&void 0!==u[0]?u[0]:"",n=1<u.length&&void 0!==u[1]?u[1]:{},a=2<u.length&&void 0!==u[2]?u[2]:"GET",r=3<u.length&&void 0!==u[3]?u[3]:{},o=4<u.length&&void 0!==u[4]?u[4]:l,i=5<u.length?u[5]:void 0,a=a.toLowerCase(),s={method:a,baseURL:"",url:e,data:n,params:r,timeout:window.ajaxTimeout,headers:o,onUploadProgress:i},i&&"function"==typeof i&&(s.onUploadProgress=i),axios.interceptors.request.use((function(t){e=10;var e=Math.random().toString(36).substring(2,e+2),n=window.location.origin,a=(new Date).valueOf();return t.headers.noce=e,t.headers.origin=n,t.headers.timestamp=a,t.headers.sign=c()(n+e+a),t.headers["web-auth"]=1,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)}))),d=n("f121"),m=n.n(d),h="admin/",f=function(t,e){return p(d.reportApi+h+"departEveryDay",t,"post",e)},g=function(t,e){return p(d.reportApi+h+"companyEveryMonth",t,"post",e)},b=(s={methods:{getHeight:function(){var t=document.body.offsetHeight;this.maxHeight=t-90+""}}},n("a481"),n("c5f6"),n("28a5"),{1:"自营",2:"渠道",3:"供应商端"}),w={"泓源":"泓源广诚","普润":"普润心堂","百辰":"百辰荣达","平台":"平台部"};function y(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 _(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 O(t){return NaN===t||"NaN"===t||0===Number(t)?"0":t<1e3?t:v(t,1e4).toFixed(2)+"W"}function C(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 A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){Object(i.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var j,k,S,E,D={name:"WanyuReport",props:["date"],mixins:[s],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:O(e),month:O(n),total_tips:O(t),completionRate:x(v(n,t)||0,100)+"%"}}},created:(k=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 k.apply(this,arguments)}),mounted:function(){var t=this;this.$nextTick((function(){t.getHeight()})),this.searchList()},methods:{getCompanyLabel:u,unit2TenThousand:O,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:(j=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n=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});case 4:0===(e=t.sent).code&&e.data&&0<e.data.length?(e=(e.data||[]).map((function(t){var e=t.depart,n=t.msale_total,a=t.mth_total,r=t.sale_total,o=t.th_total;return{depart:e,total_tips:t.total_tips,dayinfo:{sale_total:r,th_total:o},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:y(void 0===n?0:n,t.total_tips),month:y(e,t.month),day:y(a,t.day)}}),{total_tips:0,month:0,day:0}),this.tableData=e.map((function(t){var e=t.depart,a=t.total_tips,r=t.dayinfo,o=(t=t.monthinfo,_(t.msale_total,t.mth_total)),i=x(v(o,a),100).toFixed(2);return{depart:e,total_tips:a,dayinfo:A(A({},r),{},{sale_total:_(r.sale_total,r.th_total)}),monthinfo:{monthNetSales:o,monthProportion:i},proportion:x(v(t.msale_total,n.total.month)||0,100)||0}})),this.total={completion:this.tableData.reduce((function(t,e){return y(t,e.monthinfo.monthNetSales)}),0),total_tips:this.tableData.reduce((function(t,e){return y(t,e.total_tips)}),0)},e=x(v(this.total.completion,this.total.total_tips)||0,100).toFixed(2)+"%",this.total=A(A({},this.total),{},{completionRate:e})):this.tableData=[],this.getHeight(),this.loading=!1;case 8:case"end":return t.stop()}}),t,this)}))),function(){return j.apply(this,arguments)})}},R=(D=(n("cbfe"),Object(r.a)(D,(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:{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:"70",prop:"depart"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.getCompanyLabel(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,"370e1d94",null).exports),n("2909")),L={name:"WanyuTypeReport",props:["date"],mixins:[s],watch:{date:function(t){(this.dataTime=t)&&this.searchList()}},data:function(){return{total:{day:0,month:0,total_tips:0},dataTime:this.date,loading:!1,maxHeight:"0",tableData:[]}},created:(E=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 E.apply(this,arguments)}),mounted:function(){var t=this;this.$nextTick((function(){t.getHeight()})),this.searchList()},methods:{getCompanyLabel:u,unit2TenThousand:O,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:(S=Object(e.a)(regeneratorRuntime.mark((function t(){var e;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});case 4:0===(e=t.sent).code&&e.data&&0<e.data.length?(e=e.data.reduce((function(t,e){var n=e.mzy_sale_total,a=e.zy_sale_total,r=e.mchannel_sale_total,o=e.channel_sale_total,i=x(v(n,y(r,n)||0)||0,100).toFixed(2),s=(0===Number(i)?0:100-Number(i)).toFixed(2);return[].concat(Object(R.a)(t),[{depart:e.depart,type:"直营",month:n,day:a,proportion:i},{depart:e.depart,type:"渠道",month:r,day:o,proportion:s}])}),[]),this.tableData=e):this.tableData=[],this.getHeight(),this.loading=!1;case 8:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})}};n("7f2f"),L=Object(r.a)(L,(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:"70",prop:"depart"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.getCompanyLabel(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,"70ba6c4e",null).exports;function T(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 B(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){Object(i.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n("7514"),n("5a0c");s={name:"DepartmentReport",props:["date","companyNo","index"],mixins:[s],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=_(e,n),n=x(v(e,t)||0,100);return{month:O(e),total_tips:O(t),completionRate:n?n.toFixed(2)+"%":n+"%"}}},data:function(){return{total:{day:0,month:0,total_tips:0,monthReturn:0},companyName:"",mapReponseType:b,dataTime:this.date,loading:!1,maxHeight:"0",tableData:[]}},created:(Q=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 Q.apply(this,arguments)}),mounted:function(){var t=this;this.$nextTick((function(){t.getHeight()})),this.searchList()},methods:{getTypeLabel:function(t){return b[String(t)]},unit2TenThousand:O,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:(I=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n,a,r,o,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.loading=!0,this.tableData=[],t.next=4,g({daytime:this.date,companyNo:this.companyNo});case 4:r=t.sent,o=this.getDiffDay()<0&&"GS2302231323386950"===this.companyNo,0===r.code&&r.data&&0<r.data.length?(r=r.data[0]||[],a=r.monthinfo,e=void 0===a?[]:a,a=r.dayinfo,n=void 0===a?[]:a,a=r.total_tips,a=void 0===a?0:a,r=r.companyName,e[1]=B({},o?{msale_total:y(e[1].msale_total,e[2].msale_total),mth_total:y(e[1].mth_total,e[2].mth_total),type:"2"}:e[1]),e[0]=B({},o?{msale_total:0,mth_total:0,type:"1"}:e[0]),e[2]=B({},o?{msale_total:0,mth_total:0,type:"3"}:e[1]),this.companyName=r,o=Object.keys(b),this.total={total_tips:Number(a),day:n.reduce((function(t,e){return e=e.sale_total,y(t,void 0===e?"0":e)}),0),month:e.reduce((function(t,e){return e=e.msale_total,y(t,void 0===e?"0":e)}),0),monthReturn:e.reduce((function(t,e){return e=e.mth_total,y(t,void 0===e?"0":e)}),0)},this.tableData=o.map((function(t){var a=e.find((function(e){return String(e.type)===t}))||{},r=n.find((function(e){return String(e.type)===t}))||{},o=Number(a.msale_total)||0;return{type:t,dayinfo:B(B({},r),{},{sale_total:_(r.sale_total,r.th_total)||0}),monthinfo:B(B({},a),{},{msale_total:_(a.msale_total,a.mth_total)||0}),proportion:x(v(o,i.total.month)||0,100).toFixed(2)}}))):this.tableData=[],this.getHeight(),this.loading=!1;case 9:case"end":return t.stop()}}),t,this)}))),function(){return I.apply(this,arguments)})}},n("599e"),s=Object(r.a)(s,(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,"79dc0df0",null).exports;var I,Q,P={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)}}},W=(n("4aec"),[D,Object(r.a)(P,(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,L,s]);D={install:function(t){W.forEach((function(e){return t.component(e.name,e)}))}};function H(t){return"-"===t?"":(+t||0).toString().replace(/^-?\d+/g,(function(t){return t.replace(/(?=(?!\b)(\d{3})+$)/g,",")}))}n("386d");var F=function(t,e){return p(d.baseApi+"WebAuth",t,"post",e)},N=function(t,e){return p(d.baseApi+"login",t,"post",e)},z=function(t,e){return p(d.baseApi+"accountquery",t,"post",e)},M=function(t,e){return p(d.baseReportApi+"admin/WeTemplate/getTemplate",t,"post",e)};function V(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}function q(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 J(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?q(Object(n),!0).forEach((function(e){Object(i.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n("3b2b"),P={name:"UnusualState",props:["message"],methods:{toLogin:function(){var t=V("name"),e=V("back");this.$router.push("/?name="+t+"&back="+e)}}},L=Object(r.a)(P,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",[e("el-empty",{attrs:{description:t.message,image:"/static/warning.png"}},[e("el-button",{attrs:{type:"primary"},on:{click:t.toLogin}},[t._v("重新获取微信授权")])],1)],1)}),[],!1,null,null,null).exports,n("2caf"),n("4f37"),n("57e7");s={props:["openid","template","isWx"],data:function(){var t={visible:!1,template:"",isMobile:!0,ol:!1,maxHeight:null,loading:!1,loading_login:!1,currentAccount:{}};return Object(i.a)(t,"isMobile",!1),Object(i.a)(t,"formData",{username:"",password:""}),Object(i.a)(t,"rules",{username:[{required:!0,trigger:"change",validator:function(t,e,n){""===e?n(new Error("手机号不能为空!")):/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(e=e)||/^852[3|5|6|8|9]\d{7}$/.test(e)?n():n(new Error("请输入正确的手机号"))}}],password:[{required:!0,trigger:"change",validator:function(t,e,n){""===e?n(new Error("密码不能为空!")):!/^[0-9A-Za-z]*$/.test(e)||e.length<6||18<e.length?n(new Error("密码为6-18位数字字母组合!")):/^[0-9]*$/.test(e)?n(new Error("密码不能为纯数字!")):/^[A-Za-z]+$/.test(e)?n(new Error("密码不能为纯字母!")):n()}}]}),t},created:function(){document.title="采销365"},beforeDestory:function(){document.title=""},methods:{toLogin:function(){var t=V("back");window.location.href=t+"/?from=authorization"},handleChange:function(t){var e=this.accounts.find((function(e){return e.value===t}));this.formData={id:e.value,phone:e.mobile,lastCode:""}},submit:(X=Object(e.a)(regeneratorRuntime.mark((function t(e){var n,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.$refs.formRef.validate();case 3:return a=this.formData,n=a.username,a=a.password,this.loading_login=!0,t.next=7,N(J(J({},{password:a,username:n}),e?{openId:this.openid}:{}));case 7:a=t.sent,this.loading_login=!1,0===a.code?this.$emit("bind",a.data.token):this.$message.error(a.message),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0);case 15:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(t){return X.apply(this,arguments)}),requestUserList:(U=Object(e.a)(regeneratorRuntime.mark((function t(e){var n,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.ol=!0,t.next=3,z({openId:this.openid,nickname:e});case 3:n=t.sent,this.ol=!1,a=n.code,n=n.data,0===a?(a=n.list,this.accounts=a.map((function(t){return{value:t.id,label:t.nickname,mobile:t.mobile,is_wx:t.is_wx,status:t.status}}))):this.accounts=[];case 7:case"end":return t.stop()}}),t,this)}))),function(t){return U.apply(this,arguments)})}},n("2ac3"),P=Object(r.a)(s,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"binding-container"},[e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading_login,expression:"loading_login"}],staticClass:"login-container"},[e("div",{staticClass:"inner-login-container"},[e("h3",{staticStyle:{"margin-bottom":"30px"}},[t._v("采销365")]),e("el-form",{ref:"formRef",staticStyle:{"margin-top":"10px"},attrs:{"label-width":"0px",model:t.formData,rules:t.rules}},[e("el-form-item",{attrs:{label:"",prop:"username"}},[e("el-input",{attrs:{size:"medium",placeholder:"账号",maxlength:"11"},model:{value:t.formData.username,callback:function(e){t.$set(t.formData,"username",e)},expression:"formData.username"}},[e("template",{slot:"prefix"},[e("i",{staticClass:"el-icon-user",staticStyle:{"padding-left":"5px",color:"#087af5"}})])],2)],1),e("el-form-item",{attrs:{prop:"password"}},[e("el-input",{attrs:{size:"medium",type:"password",placeholder:"密码"},model:{value:t.formData.password,callback:function(e){t.$set(t.formData,"password",e)},expression:"formData.password"}},[e("template",{slot:"prefix"},[e("i",{staticClass:"el-icon-key",staticStyle:{"padding-left":"5px",color:"#087af5"}})])],2)],1),e("el-form-item",[e("div",{staticStyle:{display:"flex",gap:"10px"}},[e("div",{staticClass:"button",staticStyle:{"background-color":"#087af5","border-color":"#087af5",width:"100%"},on:{click:function(e){return t.submit(!1)}}},[e("img",{staticStyle:{height:"20px",width:"20px",margin:"0 2px 0 5px"},attrs:{src:n("3547")}}),e("span",{staticStyle:{"font-weight":"600"}},[t._v("登录")])]),t.isWx?e("div",{staticClass:"button",staticStyle:{"background-color":"#07c160",width:"100%"},on:{click:function(e){return t.submit(!0)}}},[e("img",{staticStyle:{height:"20px",width:"20px"},attrs:{src:n("ead3")}}),e("span",{staticStyle:{"font-weight":"600"}},[t._v("授权登录")])]):t._e()])])],1)],1)])])}),[],!1,null,"6b568518",null).exports,s=n("3452");var U,X,K,Z,G,Y,$=n.n(s);s={name:"report",components:{UnusualState:L,Binding:P},data:function(){return{loading:!1,isBound:!1,isReady:!1,message:"",template:"",isError:"",openid:"",back:"",name:"",isWx:!1}},created:function(){var t=window.navigator.userAgent.toLowerCase();this.isWx="micromessenger"==t.match(/micromessenger/i)&&"?from=authorization"!==window.location.search},mounted:(G=Object(e.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.back=V("back"),this.name=V("name"),this.isWx)return t.next=5,this.requestUserinfo();t.next=5;break;case 5:case"end":return t.stop()}}),t,this)}))),function(){return G.apply(this,arguments)}),methods:{requestUserinfo:(Z=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n,a,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=V("code"),this.loading=!0,t.next=4,F({code:e});case 4:if(e=t.sent,this.loading=!1,null===e.data&&(this.isError=!0,this.message=e.message),r=e.data||{},n=r.wxinfo,a=r.isLogin,r=r.userinfo,this.isBound=1===Number(a),this.openid=n.openid,this.isBound){t.next=12;break}return t.abrupt("return");case 12:this.jumpToSystem(r.token);case 13:case"end":return t.stop()}}),t,this)}))),function(){return Z.apply(this,arguments)}),jumpToSystem:function(){var t=$.a.AES.encrypt(JSON.stringify({token:0<arguments.length&&void 0!==arguments[0]?arguments[0]:""}),"key123");t=$.a.enc.Base64.stringify($.a.enc.Utf8.parse(t));window.location.href=this.back+"/#/accept?t="+t},getTemplate:(K=Object(e.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,M();case 2:t.sent;case 4:case"end":return t.stop()}}),t)}))),function(){return K.apply(this,arguments)})}},L=Object(r.a)(s,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{id:"app"}},[t.isError||t.isBound||t.loading?t._e():e("div",[e("Binding",{attrs:{isWx:t.isWx,openid:t.openid,template:t.template},on:{bind:t.jumpToSystem}})],1),t.isError||!t.isBound||t.loading?t._e():e("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticStyle:{height:"100vh"},attrs:{"element-loading-text":" 正在登录至系统..."}}),t.isError&&!t.loading?e("UnusualState",{attrs:{message:t.message}}):t._e()],1)}),[],!1,null,null,null).exports,P={name:"login",mounted:(Y=Object(e.a)(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=V("name"),e=V("back"),n=encodeURIComponent("http://wxlogin.caixiao365.com/#/wechat?name=".concat(n,"&back=").concat(e)),e="wx_"+Math.random().toString(36).substr(2,15),n="https://open.weixin.qq.com/connect/oauth2/authorize?appid=".concat(m.a.appId,"&redirect_uri=").concat(n,"&response_type=code&scope=").concat("snsapi_userinfo","&state=").concat(e,"#wechat_redirect"),window.location.href=n;case 7:case"end":return t.stop()}}),t)}))),function(){return Y.apply(this,arguments)})},s=Object(r.a)(P,(function(){var t=this.$createElement;return(this._self._c||t)("div",{})}),[],!1,null,null,null).exports,e=new VueRouter({routes:[{path:"/wechat",component:L},{path:"/",component:s}],mode:"hash"}),r=n("5c96"),n("0fae"),P=window.navigator.userAgent.toLowerCase(),L=V("code"),s=V("back"),P="micromessenger"==P.match(/micromessenger/i);P&&!L&&e.push("/?back="+s),P||e.push("/wechat?back="+s),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(D),Object.keys(a).forEach((function(t){return Vue.filter(t,a[t])})),Vue.config.productionTip=!1,window.vm=new Vue({router:e,render:function(t){return t(o)}}).$mount("#app")},5724:function(t,e,n){},"599e":function(t,e,n){"use strict";n("4c25")},"66e2":function(t,e,n){},"7f2f":function(t,e,n){"use strict";n("9e7f")},"8bbf":function(t,e){t.exports=Vue},"9e7f":function(t,e,n){},cbfe:function(t,e,n){"use strict";n("5416")},ead3:function(t,e,n){t.exports=n.p+"static/img/wechat.42e0fefc.png"},f121:function(t,e,n){n=n("f1e0"),t.exports=n},f1e0:function(t,e){t.exports={title:"微信登录",baseApi:"http://user.api.caixiao365.com/",baseReportApi:"http://report.test241.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/",authUrl:"http://rep.caixiao365.com",wechatEnv:"micromessenger",ding:{CorpId:"dingc78fa4301e1a424a35c2f4657eb6378f",AgentId:"1184953963"}}}},[[0,"runtime","chunk-elementUI","chunk-libs"]]]);
|