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 line
19 KiB
1 line
19 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-637ee96e"],{"0ccb":function(t,e,a){var n=a("50c4"),i=a("1148"),s=a("1d80"),r=Math.ceil,o=function(t){return function(e,a,o){var c,l,u=String(s(e)),d=u.length,m=void 0===o?" ":String(o),f=n(a);return f<=d||""==m?u:(c=f-d,l=i.call(m,r(c/m.length)),l.length>c&&(l=l.slice(0,c)),t?u+l:l+u)}};t.exports={start:o(!1),end:o(!0)}},"34e1":function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return s})),a.d(e,"e",(function(){return r})),a.d(e,"a",(function(){return o})),a.d(e,"d",(function(){return c}));var n=a("b775");function i(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Object(n["a"])({method:"get",url:"/api/admin/customer/get-list",params:t,isLoading:e})}function s(t,e){return Object(n["a"])({method:"get",url:"/api/admin/customer/get-info/".concat(t),params:e})}function r(t){return Object(n["a"])({method:"post",url:"/api/admin/customer/save",data:t})}function o(t,e){return Object(n["a"])({method:"post",url:"/api/admin/customer/delete/".concat(t),data:e})}function c(t){return Object(n["a"])({method:"post",url:"/api/admin/customer/import",data:t})}},"3e3b":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",[a("div",{staticClass:"boxlist"},[a("div",{staticClass:"box box1"},[t._m(0),a("div",{staticClass:"bline"}),a("div",{staticClass:"boxcontentsubtitle"},[t._v("服务金额")]),a("div",{staticClass:"boxcontent"},[a("div",{staticClass:"boxcontentitem"},[a("div",{staticClass:"boxcontentitem-big"},[t._v(" "+t._s(t.totaldata.business.server_money_total.toFixed(2))+" ")]),a("div",{staticStyle:{display:"flex","justify-content":"space-around"}},[a("div",{staticClass:"boxcontentitem-small"},[a("span",[t._v(t._s(t.totaldata.business.nurse_money_total.toFixed(2)))]),a("span",[t._v("护工金额")])]),a("div",{staticClass:"boxcontentitem-small"},[a("span",[t._v(t._s(t.totaldata.business.remain_money_total.toFixed(2)))]),a("span",[t._v("留存金额")])])])])])]),a("div",{staticClass:"box box2"},[t._m(1),a("div",{staticClass:"bline"}),a("div",{staticClass:"boxcontentsubtitle"},[t._v("总服务时长")]),a("div",{staticClass:"boxcontent"},[a("div",{staticClass:"boxcontentitem"},[a("div",{staticClass:"boxcontentitem-big"},[t._v(" "+t._s(t.totaldata.person_efficiency.server_time_total)+" 分钟 ")]),a("div",{staticStyle:{display:"flex","justify-content":"space-around"}},[a("div",{staticClass:"boxcontentitem-small"},[a("span",[t._v(t._s(t.totaldata.person_efficiency.expect))]),a("span",[t._v(" 照护人员数")])]),a("div",{staticClass:"boxcontentitem-small"},[a("span",[t._v(t._s(t.totaldata.person_efficiency.act)+" ")]),a("span",[t._v("天数")])])])])])]),a("div",{staticClass:"box box3"},[t._m(2),a("div",{staticClass:"bline"}),a("div",{staticClass:"boxcontentsubtitle"},[t._v("活跃客户")]),a("div",{staticClass:"boxcontent"},[a("div",{staticClass:"boxcontentitem"},[a("div",{staticClass:"boxcontentitem-big"},[t._v(" "+t._s(t.totaldata.customer.active)+"人 ")]),a("div",{staticStyle:{display:"flex","justify-content":"space-around"}},[a("div",{staticClass:"boxcontentitem-small"},[a("span",[t._v(t._s(t.totaldata.customer.add))]),a("span",[t._v("新增")])]),a("div",{staticClass:"boxcontentitem-small"},[a("span",[t._v(t._s(t.totaldata.customer.wash))]),a("span",[t._v("流失")])])])])])]),a("div",{staticClass:"box box4"},[t._m(3),a("div",{staticClass:"bline"}),a("div",{staticClass:"boxcontentsubtitle"},[t._v("服务订单")]),a("div",{staticClass:"boxcontent"},[a("div",{staticClass:"boxcontentitem"},[a("div",{staticClass:"boxcontentitem-big"},[t._v(t._s(t.totaldata.order.server_total)+"单 ")]),a("div",{staticStyle:{display:"flex","justify-content":"space-around"}},[a("div",{staticClass:"boxcontentitem-small"},[a("span",[t._v(t._s(t.totaldata.order.cycle_total))]),a("span",[t._v("周期性订单")])]),a("div",{staticClass:"boxcontentitem-small"},[a("span",[t._v(t._s(t.totaldata.order.unit_total))]),a("span",[t._v("单次订单")])])])])])])])])},i=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"boxtitle"},[a("span",[t._v("营业统计")]),a("i",{staticClass:"el-icon-data-line statIcon"})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"boxtitle"},[a("span",[t._v("人效统计")]),a("i",{staticClass:"el-icon-user statIcon"})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"boxtitle"},[a("span",[t._v("客户统计")]),a("i",{staticClass:"el-icon-s-custom statIcon"})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"boxtitle"},[a("span",[t._v("订单统计")]),a("i",{staticClass:"el-icon-document statIcon"})])}],s=(a("b680"),a("ec1b")),r=a.n(s),o={props:{countsData:{type:Object},totaldata:{type:Object,default:{business:{server_money_total:0,nurse_money_total:0,remain_money_total:0},person_efficiency:{server_time_total:"0",expect:0,act:0},customer:{active:0,add:0,wash:0},order:{server_total:0,cycle_total:0,unit_total:0}}}},components:{CountTo:r.a},methods:{handleRoute:function(t){this.$emit("handleRoute",t)},toCaculateper:function(t,e){return(t/(0==e?1:e)*100).toFixed(2)+"%"}}},c=o,l=(a("73a9"),a("2877")),u=Object(l["a"])(c,n,i,!1,null,"f41dd268",null);e["default"]=u.exports},"42de":function(t,e,a){},"4d90":function(t,e,a){"use strict";var n=a("23e7"),i=a("0ccb").start,s=a("9a0c");n({target:"String",proto:!0,forced:s},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"73a9":function(t,e,a){"use strict";a("7be5")},"7b96":function(t,e,a){"use strict";a("42de")},"7be5":function(t,e,a){},"8d9e":function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return s})),a.d(e,"a",(function(){return r}));var n=a("b775");function i(t){return Object(n["a"])({method:"get",url:"/api/admin/chart/income",params:t})}function s(t){return Object(n["a"])({method:"get",url:"/api/admin/chart/effct",params:t})}function r(t){return Object(n["a"])({method:"get",url:"/api/admin/chart/check-age",params:t})}},9406: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",[a("div",{staticClass:"block",staticStyle:{"padding-top":"10px",display:"flex","justify-content":"flex-end"}},[a("el-button",{staticStyle:{"margin-right":"10px"},attrs:{type:"primary",round:""},on:{click:function(e){t.isShowDraw=!0}}},[t._v("超龄查看")]),a("el-date-picker",{attrs:{type:"month",placeholder:"选择月"},on:{change:function(e){return t.loadData()}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),a("div",{staticClass:"statistics"},[a("panel-group",{attrs:{totaldata:t.list}})],1),t._m(0),a("draw",{attrs:{isShow:t.isShowDraw},on:{"update:isShow":function(e){t.isShowDraw=e},"update:is-show":function(e){t.isShowDraw=e}}})],1)},i=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"chart"},[a("div",{staticClass:"chartItem",staticStyle:{"margin-right":"1%"}},[a("div",{staticClass:"chartItemTitle"},[t._v("营业与收入")]),a("div",{attrs:{id:"col-chart"}})]),a("div",{staticClass:"chartItem",staticStyle:{"margin-left":"1%"}},[a("div",{staticClass:"chartItemTitle"},[t._v("客户与订单")]),a("div",{attrs:{id:"line-chart"}})])])}],s=a("c14f"),r=a("1da1"),o=(a("d81d"),a("d3b7"),a("3ca3"),a("0643"),a("a573"),a("ddb0"),a("313e")),c=a.n(o),l=a("3e3b"),u=a("b775");function d(t){return Object(u["a"])({url:"/api/admin/chart/home",method:"get",params:t})}function m(t){return Object(u["a"])({url:"/api/admin/chart/business_data",method:"get",params:t})}function f(t){return Object(u["a"])({url:"/api/admin/chart/order_data",method:"get",params:t})}var h=a("f859"),p={components:{PanelGroup:l["default"],draw:h["default"]},data:function(){return{isShowDraw:!1,col:"",line:"",business_data:[],collect_data:[],list:{business:{server_money_total:0,nurse_money_total:0,remain_money_total:0},person_efficiency:{server_time_total:"0",expect:0,act:0},customer:{active:0,add:0,wash:0},order:{server_total:0,cycle_total:0,unit_total:0}},customerArr:[],orderArr:[],chartData:{},month:""}},watch:{chartData:function(t,e){e&&this.init()}},methods:{loadData:function(){var t=this;return Object(r["a"])(Object(s["a"])().m((function e(){return Object(s["a"])().w((function(e){while(1)switch(e.n){case 0:return e.n=1,Promise.all([d({month:t.month}),f({month:t.month}),m({month:t.month})]).then((function(e){t.list=e[0].list,t.chartData=e;var a=[],n=[];e[2].business_data.map((function(t){a.push(t.server_money_total),n.push(t.collect_money)})),t.business_data=a,t.collect_data=n;var i=[],s=[];e[1].order_data.map((function(t){i.push(t.active_customer),s.push(t.order_total)})),t.customerArr=i,t.orderArr=s})).catch();case 1:return e.a(2)}}),e)})))()},init:function(){this.col=c.a.init(document.getElementById("col-chart")),this.col.setOption({title:{text:""},tooltip:{trigger:"axis",axisPointer:{type:"shadow"},position:"bottom"},legend:{},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},yAxis:{type:"value",boundaryGap:[0,.01]},xAxis:{type:"category",data:["第一周","第二周","第三周","第四周"]},series:[{name:"服务金额",type:"bar",data:this.business_data,itemStyle:{normal:{color:"rgb(42,182,252)"}}},{name:"收款",type:"bar",data:this.collect_data,itemStyle:{normal:{color:"rgb(34,228,255)"}}}]}),this.line=c.a.init(document.getElementById("line-chart")),this.line.setOption({title:{text:""},tooltip:{trigger:"axis"},legend:{data:["活跃客户","服务订单"]},grid:{left:"3%",right:"6%",bottom:"3%",containLabel:!0},toolbox:{},xAxis:{type:"category",boundaryGap:!1,data:["第一周","第二周","第三周","第四周"]},yAxis:{type:"value"},series:[{name:"活跃客户",type:"line",stack:"Total",data:this.customerArr,itemStyle:{normal:{color:"rgb(42,182,252)"}}},{name:"服务订单",type:"line",stack:"Total",data:this.orderArr,itemStyle:{normal:{color:"rgb(34,228,255)"}}}]})}},created:function(){this.month=this.$moment().format("YYYY-MM"),this.loadData()},mounted:function(){var t=this;window.onresize=function(){t.col.resize(),t.line.resize()}},destroyed:function(){window.onresize=null}},b=p,v=(a("7b96"),a("2877")),_=Object(v["a"])(b,n,i,!1,null,"3acc137e",null);e["default"]=_.exports},"9a0c":function(t,e,a){var n=a("342f");t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(n)},ec1b:function(t,e,a){!function(e,a){t.exports=a()}(0,(function(){return function(t){function e(n){if(a[n])return a[n].exports;var i=a[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var a={};return e.m=t,e.c=a,e.i=function(t){return t},e.d=function(t,a,n){e.o(t,a)||Object.defineProperty(t,a,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,"a",a),a},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=2)}([function(t,e,a){var n=a(4)(a(1),a(5),null,null);t.exports=n.exports},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(3);e.default={props:{startVal:{type:Number,required:!1,default:0},endVal:{type:Number,required:!1,default:2017},duration:{type:Number,required:!1,default:3e3},autoplay:{type:Boolean,required:!1,default:!0},decimals:{type:Number,required:!1,default:0,validator:function(t){return t>=0}},decimal:{type:String,required:!1,default:"."},separator:{type:String,required:!1,default:","},prefix:{type:String,required:!1,default:""},suffix:{type:String,required:!1,default:""},useEasing:{type:Boolean,required:!1,default:!0},easingFn:{type:Function,default:function(t,e,a,n){return a*(1-Math.pow(2,-10*t/n))*1024/1023+e}}},data:function(){return{localStartVal:this.startVal,displayValue:this.formatNumber(this.startVal),printVal:null,paused:!1,localDuration:this.duration,startTime:null,timestamp:null,remaining:null,rAF:null}},computed:{countDown:function(){return this.startVal>this.endVal}},watch:{startVal:function(){this.autoplay&&this.start()},endVal:function(){this.autoplay&&this.start()}},mounted:function(){this.autoplay&&this.start(),this.$emit("mountedCallback")},methods:{start:function(){this.localStartVal=this.startVal,this.startTime=null,this.localDuration=this.duration,this.paused=!1,this.rAF=(0,n.requestAnimationFrame)(this.count)},pauseResume:function(){this.paused?(this.resume(),this.paused=!1):(this.pause(),this.paused=!0)},pause:function(){(0,n.cancelAnimationFrame)(this.rAF)},resume:function(){this.startTime=null,this.localDuration=+this.remaining,this.localStartVal=+this.printVal,(0,n.requestAnimationFrame)(this.count)},reset:function(){this.startTime=null,(0,n.cancelAnimationFrame)(this.rAF),this.displayValue=this.formatNumber(this.startVal)},count:function(t){this.startTime||(this.startTime=t),this.timestamp=t;var e=t-this.startTime;this.remaining=this.localDuration-e,this.useEasing?this.countDown?this.printVal=this.localStartVal-this.easingFn(e,0,this.localStartVal-this.endVal,this.localDuration):this.printVal=this.easingFn(e,this.localStartVal,this.endVal-this.localStartVal,this.localDuration):this.countDown?this.printVal=this.localStartVal-(this.localStartVal-this.endVal)*(e/this.localDuration):this.printVal=this.localStartVal+(this.localStartVal-this.startVal)*(e/this.localDuration),this.countDown?this.printVal=this.printVal<this.endVal?this.endVal:this.printVal:this.printVal=this.printVal>this.endVal?this.endVal:this.printVal,this.displayValue=this.formatNumber(this.printVal),e<this.localDuration?this.rAF=(0,n.requestAnimationFrame)(this.count):this.$emit("callback")},isNumber:function(t){return!isNaN(parseFloat(t))},formatNumber:function(t){t=t.toFixed(this.decimals),t+="";var e=t.split("."),a=e[0],n=e.length>1?this.decimal+e[1]:"",i=/(\d+)(\d{3})/;if(this.separator&&!this.isNumber(this.separator))for(;i.test(a);)a=a.replace(i,"$1"+this.separator+"$2");return this.prefix+a+n+this.suffix}},destroyed:function(){(0,n.cancelAnimationFrame)(this.rAF)}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(0),i=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=i.default,"undefined"!=typeof window&&window.Vue&&window.Vue.component("count-to",i.default)},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=0,i="webkit moz ms o".split(" "),s=void 0,r=void 0;if("undefined"==typeof window)e.requestAnimationFrame=s=function(){},e.cancelAnimationFrame=r=function(){};else{e.requestAnimationFrame=s=window.requestAnimationFrame,e.cancelAnimationFrame=r=window.cancelAnimationFrame;for(var o=void 0,c=0;c<i.length&&(!s||!r);c++)o=i[c],e.requestAnimationFrame=s=s||window[o+"RequestAnimationFrame"],e.cancelAnimationFrame=r=r||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];s&&r||(e.requestAnimationFrame=s=function(t){var e=(new Date).getTime(),a=Math.max(0,16-(e-n)),i=window.setTimeout((function(){t(e+a)}),a);return n=e+a,i},e.cancelAnimationFrame=r=function(t){window.clearTimeout(t)})}e.requestAnimationFrame=s,e.cancelAnimationFrame=r},function(t,e){t.exports=function(t,e,a,n){var i,s=t=t||{},r=typeof t.default;"object"!==r&&"function"!==r||(i=t,s=t.default);var o="function"==typeof s?s.options:s;if(e&&(o.render=e.render,o.staticRenderFns=e.staticRenderFns),a&&(o._scopeId=a),n){var c=Object.create(o.computed||null);Object.keys(n).forEach((function(t){var e=n[t];c[t]=function(){return e}})),o.computed=c}return{esModule:i,exports:s,options:o}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",[t._v("\n "+t._s(t.displayValue)+"\n")])},staticRenderFns:[]}}])}))},ed08:function(t,e,a){"use strict";a.d(e,"f",(function(){return i})),a.d(e,"c",(function(){return s})),a.d(e,"d",(function(){return r})),a.d(e,"e",(function(){return o})),a.d(e,"b",(function(){return c})),a.d(e,"a",(function(){return l}));var n=a("53ca");a("fb6a"),a("a9e3"),a("d3b7"),a("4d63"),a("ac1f"),a("2c3e"),a("00b4"),a("25f0"),a("4d90"),a("5319"),a("0643"),a("4e3e"),a("159b");function i(t,e){if(0===arguments.length||!t)return null;var a,i=e||"{y}-{m}-{d} {h}:{i}:{s}";"object"===Object(n["a"])(t)?a=t:("string"===typeof t&&(t=/^[0-9]+$/.test(t)?parseInt(t):t.replace(new RegExp(/-/gm),"/")),"number"===typeof t&&10===t.toString().length&&(t*=1e3),a=new Date(t));var s={y:a.getFullYear(),m:a.getMonth()+1,d:a.getDate(),h:a.getHours(),i:a.getMinutes(),s:a.getSeconds(),a:a.getDay()},r=i.replace(/{([ymdhisa])+}/g,(function(t,e){var a=s[e];return"a"===e?["日","一","二","三","四","五","六"][a]:a.toString().padStart(2,"0")}));return r}function s(t){var e=(t+"").length;if(0==e)return 0;if(15!=e&&18!=e)return 0;var a="";18==e&&(a=t.substr(6,4)+"/"+t.substr(10,2)+"/"+t.substr(12,2)),15==e&&(a="19"+t.substr(6,2)+"/"+t.substr(8,2)+"/"+t.substr(10,2));var n=new Date(a),i=new Date,s=i.getFullYear()-n.getFullYear();return(i.getMonth()<n.getMonth()||i.getMonth()==n.getMonth()&&i.getDate()<n.getDate())&&s--,s}function r(t){var e="";return null!=t&&""!=t&&(15==t.length?e="19"+t.slice(6,12):18==t.length&&(e=t.slice(6,14)),e=e.replace(/(.{4})(.{2})/,"$1-$2-")),e}function o(t){var e;return e=parseInt(t.slice(-2,-1))%2==1?"男":"女",e}function c(t){if(!t||"object"!==Object(n["a"])(t))return t;if("function"===typeof t){var e=t.bind(null);return e.prototype=c(t.prototype),e}switch(Object.prototype.toString.call(t)){case"[object String]":return t.toString();case"[object Number]":return Number(t.toString());case"[object Boolean]":return new Boolean(t.toString());case"[object Date]":return new Date(t.getTime());case"[object Array]":for(var a=[],i=0;i<t.length;i++)a[i]=c(t[i]);return a;case"[object Object]":var s={};for(var r in t)s[r]=c(t[r]);return s}}function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,a=null;return function(){var n=this;null!==a&&clearTimeout(a),a=setTimeout((function(){t.call(n)}),e)}}},f859: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",[a("el-drawer",{attrs:{size:"42%",title:"超龄人员",visible:t.isShow,direction:"rtl"},on:{close:function(e){return t.$emit("update:isShow",!1)}}},[a("div",[a("xy-table",{staticStyle:{margin:"auto 6px"},attrs:{height:"80%","is-page":!1,list:t.list,"table-item":t.table},scopedSlots:t._u([{key:"btns",fn:function(){return[a("el-table-column",{attrs:{label:"操作","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(a){return t.signOut(e.row)}}},[t._v("签退")])]}}])})]},proxy:!0}])})],1)])],1)},i=[],s=a("c14f"),r=a("1da1"),o=a("8d9e"),c=a("34e1"),l=a("ed08"),u={props:{isShow:{type:Boolean,default:!1}},data:function(){return{total:0,list:[],table:[{prop:"name",label:"姓名",width:120},{label:"年龄",prop:"age",width:80},{label:"身份证",width:166,prop:"idcard"},{prop:"phone",label:"手机号",width:"160"}]}},methods:{signOut:function(t){var e=this,a=Object(l["b"])(t);a.status=3,Object(c["e"])(a).then((function(t){e.$message({type:"success",message:"签退成功"}),e.getList()}))},getList:function(){var t=this;return Object(r["a"])(Object(s["a"])().m((function e(){var a;return Object(s["a"])().w((function(e){while(1)switch(e.n){case 0:return e.n=1,Object(o["a"])();case 1:a=e.v,t.list=a,t.list.length>0&&t.$emit("update:isShow",!0);case 2:return e.a(2)}}),e)})))()}},computed:{},created:function(){this.getList()}},d=u,m=a("2877"),f=Object(m["a"])(d,n,i,!1,null,"046f4b16",null);e["default"]=f.exports}}]); |