(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6628"],{"0A9Q":function(t,e,a){},"2kKq":function(t,e,a){"use strict";a.r(e);var s=a("9kPm"),i=a("z5/s"),n=a("QbLZ"),l=a.n(n),o=a("Ew9n"),r=a("/407"),c=a("hwzM"),u=a("dAOq"),d={name:"ExamineCell",components:{RelatedBusinessCell:r.a,FileCell:c.a},mixins:[u.a],props:{data:Object,showHandle:{type:Boolean,default:!0}},data:function(){return{}},computed:{relatedListData:function(){return{contacts:(this.data.contactsList||[]).map(function(t){return t.id&&(t.contacts_id=t.contacts_id),t}),customer:(this.data.customerList||[]).map(function(t){return t.id&&(t.customer_id=t.customer_id),t}),business:(this.data.businessList||[]).map(function(t){return t.id&&(t.business_id=t.business_id),t}),contract:(this.data.contractList||[]).map(function(t){return t.id&&(t.contract_id=t.contract_id),t})}}},watch:{},mounted:function(){},methods:{imgZoom:function(t,e){this.$bus.emit("preview-image-bus",{index:e,data:t})},handleCommand:function(t){this.$emit("on-handle",{type:t,data:{item:this.data}})},checkDetail:function(t){this.$emit("on-handle",{type:"view",data:{item:this.data}})},checkRelatedDetail:function(t,e){this.$emit("on-handle",{type:"related-detail",data:{type:t,item:e}})}}},h=(a("mVbG"),a("KHd+")),p=Object(h.a)(d,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"list"},[a("div",{staticClass:"list-content"},[a("flexbox",{staticClass:"header"},[t.data.create_user_info?[a("xr-avatar",{attrs:{name:t.data.create_user_info.realname,size:34,src:t.data.create_user_info.img}}),t._v(" "),a("div",{staticClass:"name-time"},[a("span",{staticClass:"name"},[t._v(t._s(t.data.create_user_info.realname))]),t._v(" "),a("span",{staticClass:"time"},[t._v(t._s(t.data.create_time))])])]:t._e(),t._v(" "),a("div",{staticClass:"rt-setting"},[a("span",{staticClass:"bg-color",style:{"background-color":t.getTaskStatusColor(t.data.check_status)}}),t._v(" "),a("span",{staticClass:"dep"},[a("span",[t._v(t._s(t.data.category_name)+" - ")]),t._v(" "),a("span",[t._v(t._s(t.getTaskStatusName(t.data.check_status)))])]),t._v(" "),t.showHandle&&t.data.permission&&(t.data.permission.is_checked||t.data.permission.is_update||t.data.permission.is_delete)?a("el-dropdown",{attrs:{trigger:"click"},on:{command:t.handleCommand}},[a("i",{staticClass:"el-icon-arrow-down el-icon-more",staticStyle:{color:"#CDCDCD",cursor:"pointer"}}),t._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t.data.permission&&t.data.permission.is_checked?a("el-dropdown-item",{attrs:{command:"withdraw"}},[t._v("撤回")]):t._e(),t._v(" "),t.data.permission&&t.data.permission.is_update?a("el-dropdown-item",{attrs:{command:"edit"}},[t._v("编辑")]):t._e(),t._v(" "),t.data.permission&&t.data.permission.is_delete?a("el-dropdown-item",{attrs:{command:"delete"}},[t._v("删除")]):t._e()],1)],1):t._e()],1)],2),t._v(" "),a("div",{staticClass:"row",on:{click:function(e){t.checkDetail(t.data)}}},[t.data.content?a("p",{staticClass:"text"},[t._v(t._s(t.data.content))]):t._e(),t._v(" "),t.data.remark?a("p",{staticClass:"title"},[t._v(t._s(t.data.remark))]):t._e()]),t._v(" "),t.data.fileList&&t.data.fileList.length>0||t.data.imgList&&t.data.imgList.length>0?a("div",{staticClass:"accessory"},[a("div",{staticClass:"upload-img-box"},t._l(t.data.imgList,function(e,s){return a("div",{key:s,staticClass:"img-list",on:{click:function(e){t.imgZoom(t.data.imgList,s)}}},[a("img",{directives:[{name:"src",rawName:"v-src",value:e.url||e.file_path_thumb,expression:"imgItem.url ||imgItem.file_path_thumb"}]})])})),t._v(" "),a("div",{staticClass:"accessory-box"},t._l(t.data.fileList,function(e,s){return a("file-cell",{key:s,attrs:{list:t.data.fileList,data:e,"cell-index":s}})}))]):t._e(),t._v(" "),t.relatedListData.contacts.length>0||t.relatedListData.customer.length>0||t.relatedListData.business.length>0||t.relatedListData.contract.length>0?a("div",{staticClass:"related-business"},[a("div",{staticClass:"label"},[t._v("相关信息")]),t._v(" "),t._l(t.relatedListData,function(e,s){return a("div",{key:s},t._l(e,function(e,i){return a("related-business-cell",{key:i,attrs:{data:e,"cell-index":i,type:s,"show-foot":!1},nativeOn:{click:function(a){t.checkRelatedDetail(s,e)}}})}))})],2):t._e()],1)])},[],!1,null,"f6631496",null);p.options.__file="ExamineCell.vue";var m=p.exports,f={name:"ExamineList",components:{SlideView:o.a,ExamineCell:m,CRMFullScreenDetail:function(){return Promise.all([a.e("chunk-114a"),a.e("chunk-5f62"),a.e("chunk-db57"),a.e("chunk-34a4"),a.e("chunk-0b9e")]).then(a.bind(null,"3z7q"))}},props:{type:[String,Number],name:String,request:Function,params:Object,listenerIDs:{type:Array,default:function(){return["crm-main-container"]}},noListenerIDs:{type:Array,default:function(){return[]}},noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{totalCount:0,sumData:"",loading:!1,noMore:!1,page:1,list:[],relatedID:"",relatedCRMType:"",showRelatedDetail:!1,scrollKey:Date.now()}},computed:{showDes:function(){return this.type>1&&this.type<=6},desInfo:function(){return 2==this.type?"请假总天数":3==this.type?"出差总天数":4==this.type?"加班总天数":5==this.type?"报销总金额":6==this.type?"借款总金额":""},desUnit:function(){return this.type>1&&this.type<=4?"天":"元"},scrollDisabled:function(){return this.loading||this.noMore}},watch:{params:function(){this.refreshList()}},mounted:function(){},methods:{refreshList:function(){this.sumData="",this.totalCount=0,this.page=1,this.list=[],this.noMore=!1,this.scrollKey=Date.now()},getList:function(){var t=this;this.loading=!0,this.request(l()({page:this.page,limit:15},this.params)).then(function(e){t.sumData="天"==t.desUnit?e.data.duration:e.data.money,t.noMore||(t.list=t.list.concat(e.data.list.page.list),t.page++),t.totalCount=e.data.list.page.dataCount,t.loading=!1,t.noMore=!(e.data.list.page.list&&15==e.data.list.page.list.length)}).catch(function(){t.noMore=!0,t.loading=!1})},examineCellHandle:function(t){"view"==t.type?(this.relatedID=t.data.item.examine_id,this.relatedCRMType="examine",this.showRelatedDetail=!0):"related-detail"==t.type&&(this.relatedID=t.data.item[t.data.type+"_id"],this.relatedCRMType=t.data.type,this.showRelatedDetail=!0)},hideView:function(){this.$emit("hide")}}},y=(a("rY1s"),Object(h.a)(f,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("slide-view",{staticClass:"d-view",attrs:{"listener-ids":t.listenerIDs,"no-listener-ids":t.noListenerIDs,"no-listener-class":t.noListenerClass,"body-style":{padding:0,height:"100%"}},on:{close:t.hideView}},[a("div",{staticClass:"examine-list-main"},[a("div",{staticClass:"t-section"},[a("span",{staticClass:"t-name"},[t._v(t._s(t.name))]),t._v(" \n "),a("span",{staticClass:"t-des"},[t._v("("+t._s(t.name)+"申请:"),a("span",{staticClass:"t-value"},[t._v(t._s(t.totalCount)+"次")])]),t._v(" "),t.showDes?a("span",{staticClass:"t-des"},[t._v("    "+t._s(t.desInfo)+":"),a("span",{staticClass:"t-value"},[t._v(t._s(t.sumData+t.desUnit))])]):t._e(),a("span",{staticClass:"t-des"},[t._v(") ")])]),t._v(" "),a("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.getList,expression:"getList"}],key:t.scrollKey,staticClass:"t-content",attrs:{"infinite-scroll-distance":"100","infinite-scroll-disabled":"scrollDisabled"}},[t._l(t.list,function(e,s){return a("examine-cell",{key:s,attrs:{data:e,"show-handle":!1},on:{"on-handle":t.examineCellHandle}})}),t._v(" "),t.loading?a("p",{staticClass:"scroll-bottom-tips"},[t._v("加载中...")]):t._e(),t._v(" "),t.noMore?a("p",{staticClass:"scroll-bottom-tips"},[t._v("没有更多了")]):t._e()],2)]),t._v(" "),a("c-r-m-full-screen-detail",{attrs:{visible:t.showRelatedDetail,"crm-type":t.relatedCRMType,id:t.relatedID},on:{"update:visible":function(e){t.showRelatedDetail=e},handle:t.refreshList}})],1)},[],!1,null,"db29d950",null));y.options.__file="ExamineList.vue";var v=y.exports,_=a("CMIa"),g=a("7Qib"),b={name:"ExamineStatistics",components:{FiltrateHandleView:_.a,ExamineList:v},mixins:[s.a],data:function(){return{loading:!1,tableHeight:document.documentElement.clientHeight-190,postParams:{},list:[],fieldList:[],typeList:[],indexParams:{},showType:"",showTypeName:"",showList:!1}},computed:{indexRequest:function(){return i.b}},mounted:function(){var t=this;window.onresize=function(){t.tableHeight=document.documentElement.clientHeight-190}},methods:{getDataList:function(t){var e=this;this.postParams=t,this.loading=!0,Object(i.c)(t).then(function(t){e.typeList=t.data.category_list||[],e.fieldList=e.getFieldList(t.data.category_list||[]),e.list=t.data.userList||[],e.loading=!1}).catch(function(){e.loading=!1})},getFieldList:function(t){return[{name:"员工",width:100,field:"realname"}].concat(t.map(function(t){var e=0;return e=t.title&&t.title.length<=6?15*t.title.length+45:140,{name:t.title,width:e,field:"count_"+t.category_id}}))},fieldFormatter:function(t,e){return""===t[e.property]||null===t[e.property]?"--":t[e.property]},cellStyle:function(t){var e=t.row,a=t.column;t.rowIndex,t.columnIndex;return"realname"!==a.property&&parseInt(e[a.property])?{color:"#2362FB",cursor:"pointer"}:""},handleRowClick:function(t,e,a){if("realname"!==e.property&&parseInt(t[e.property])){var s=e.property.split("_"),i=s.length>1?s[1]:"",n={user_id:t.id,category_id:i};this.postParams.type?n.type=this.postParams.type:(n.start_time=this.postParams.start_time,n.end_time=this.postParams.end_time);var l=this.typeList.find(function(t){return t.category_id==i});this.showType=l.type,this.showTypeName=l.title,this.indexParams=n,this.showList=!0}},exportExcel:function(){var t=this;this.loading=!0,Object(i.a)(this.postParams).then(function(e){t.loading=!1,Object(g.c)(e)}).catch(function(){t.loading=!1})}}},w=(a("Rsd3"),Object(h.a)(b,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"main-container"},[a("filtrate-handle-view",{staticClass:"filtrate-bar",attrs:{title:"审批分析","module-type":"oa"},on:{load:function(e){t.loading=!0},change:t.getDataList}}),t._v(" "),a("div",{staticClass:"content"},[a("div",{staticClass:"table-content"},[t.showTable?a("el-table",{attrs:{data:t.list,height:t.tableHeight,"cell-style":t.cellStyle,stripe:"",border:"","show-overflow-tooltip":"","highlight-current-row":""},on:{"row-click":t.handleRowClick,"sort-change":function(e){var a=e.prop,s=e.order;return t.mixinSortFn(t.list,a,s)}}},t._l(t.fieldList,function(e,s){return a("el-table-column",{key:s,attrs:{fixed:0==s,formatter:t.fieldFormatter,prop:e.field,"min-width":e.width,label:e.name,sortable:"custom",align:"center","header-align":"center"}})})):t._e()],1)]),t._v(" "),t.showList?a("examine-list",{attrs:{type:t.showType,name:t.showTypeName,request:t.indexRequest,params:t.indexParams},on:{hide:function(e){t.showList=!1}}}):t._e()],1)},[],!1,null,"278e704a",null));w.options.__file="Examine.vue";e.default=w.exports},"77fj":function(t,e,a){"use strict";var s=a("Btlj");a.n(s).a},"9/X1":function(t,e,a){"use strict";var s=a("gQl/");a.n(s).a},"9kPm":function(t,e,a){"use strict";e.a={data:function(){return{showTable:!0}},methods:{mixinSortFn:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ascending";if("[object Array]"!==Object.prototype.toString.call(t))return[];if(!e)return t;t.sort(function(t,s){if(t[e]===s[e])return 0;var i=isNaN(Number(t[e]))||isNaN(Number(s[e]))?t[e]Date.now()}},yearValue:"",timeTypeValue:{},dataSelect:1,structuresSelectValue:[],userSelectValue:[],businessOptions:[],businessStatusValue:"",productValue:[],productOptions:[],customValue:""}},computed:{showUserStrucSelect:function(){return this.showUserSelect}},watch:{},mounted:function(){var t=this;this.showCustomSelect&&(this.customValue=this.customDefault),this.showYearSelect&&(this.yearValue=u()(new Date).year().toString()),this.$emit("load"),this.showBusinessSelect?this.getBusinessStatusList(function(){t.postFiltrateValue()}):this.postFiltrateValue(),this.showProductSelect&&this.getProductCategoryIndex()},beforeDestroy:function(){},methods:{structureChange:function(t){this.structuresSelectValue=t.value||[]},userChange:function(t){this.userSelectValue=t.value||[]},customSelectChange:function(){this.$emit("typeChange",this.customValue)},timeTypeChange:function(t){this.timeTypeValue=t},structuresValueChange:function(t){this.showUserSelect&&(this.userSelectValue="",this.userOptions=[],this.getUserList())},getUserList:function(){var t=this,e={};e.structure_id=this.structuresSelectValue,Object(s.m)(e).then(function(e){t.userOptions=e.data}).catch(function(){t.$emit("error")})},getBusinessStatusList:function(t){var e=this;Object(i.t)().then(function(a){var s=a.data||[];e.businessOptions=s.filter(function(t){return 1===t.status}),e.businessOptions.length>0&&(e.businessStatusValue=e.businessOptions[0].type_id),t(!0)}).catch(function(){e.$emit("error")})},getProductCategoryIndex:function(){var t=this;Object(n.K)({type:"tree"}).then(function(e){t.productOptions=e.data}).catch(function(){})},postFiltrateValue:function(){var t={};this.showUserStrucSelect?1==this.dataSelect&&(t.structure_id=this.structuresSelectValue.length>0?this.structuresSelectValue[0].id:"1"):t.structure_id=this.structuresSelectValue.length>0?this.structuresSelectValue[0].id:"1",this.showUserSelect&&2==this.dataSelect&&(t.user_id=this.userSelectValue.length>0?this.userSelectValue[0].id:""),this.showBusinessSelect&&(t.type_id=this.businessStatusValue),this.showProductSelect&&(t.category_id=this.productValue.length>0?this.productValue[this.productValue.length-1]:""),this.showYearSelect?t.year=this.yearValue:"custom"==this.timeTypeValue.type?(t.start_time=this.timeTypeValue.startTime.replace(/\./g,"-"),t.end_time=this.timeTypeValue.endTime.replace(/\./g,"-")):t.type=this.timeTypeValue.value,this.$emit("change",t)}}},h=(a("9/X1"),a("KHd+")),p=Object(h.a)(d,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("flexbox",{staticClass:"filtrate-content",attrs:{justify:"flex-start"}},[a("flexbox",{staticClass:"title-box",attrs:{justify:"flex-start"}},[a("div",{staticClass:"icon-box"},[a("span",{staticClass:"wk wk-my-task icon"})]),t._v(" "),a("span",{staticClass:"text"},[t._v(t._s(t.title))])]),t._v(" "),t.showFilterView?[t.showYearSelect?t._e():a("time-type-select",{on:{change:t.timeTypeChange}}),t._v(" "),t.showYearSelect?a("el-date-picker",{attrs:{clearable:!1,"picker-options":t.pickerOptions,type:"year","value-format":"yyyy",placeholder:"选择年"},model:{value:t.yearValue,callback:function(e){t.yearValue=e},expression:"yearValue"}}):t._e(),t._v(" "),t.showUserStrucSelect?a("el-select",{model:{value:t.dataSelect,callback:function(e){t.dataSelect=e},expression:"dataSelect"}},t._l([{label:"按部门",value:1},{label:"按员工",value:2}],function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})):t._e(),t._v(" "),1==t.dataSelect?a("xh-structure-cell",{staticClass:"xh-structure-cell",attrs:{radio:"",placeholder:"选择部门(默认为本部门及下属部门)"},on:{"value-change":t.structureChange}}):t._e(),t._v(" "),2==t.dataSelect&&t.showUserSelect?a("xh-user-cell",{staticClass:"xh-user-cell",attrs:{radio:"",placeholder:"选择员工(默认为本人及下属)\n"},on:{"value-change":t.userChange}}):t._e(),t._v(" "),t.showBusinessSelect?a("el-select",{attrs:{placeholder:"商机组"},model:{value:t.businessStatusValue,callback:function(e){t.businessStatusValue=e},expression:"businessStatusValue"}},t._l(t.businessOptions,function(t){return a("el-option",{key:t.type_id,attrs:{label:t.name,value:t.type_id}})})):t._e(),t._v(" "),t.showProductSelect?a("el-cascader",{staticStyle:{width:"100%"},attrs:{options:t.productOptions,"show-all-levels":!1,props:{children:"children",label:"label",value:"categoryId"},"change-on-select":""},model:{value:t.productValue,callback:function(e){t.productValue=e},expression:"productValue"}}):t._e(),t._v(" "),t.showCustomSelect?a("el-select",{on:{change:t.customSelectChange},model:{value:t.customValue,callback:function(e){t.customValue=e},expression:"customValue"}},t._l(t.customOptions,function(t){return a("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})})):t._e(),t._v(" "),t._t("append"),t._v(" "),a("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){t.postFiltrateValue()}}},[t._v("搜索")]),t._v(" "),t._t("default")]:t._e()],2)},[],!1,null,"6e5853cd",null);p.options.__file="FiltrateHandleView.vue";e.a=p.exports},Rsd3:function(t,e,a){"use strict";var s=a("c/q0");a.n(s).a},ZX9L:function(t,e,a){"use strict";var s={name:"TimeTypeSelect",props:{defaultType:[String,Object],width:{type:Number,default:200},options:{type:Array,default:function(){return[{label:"今天",value:"today"},{label:"昨天",value:"yesterday"},{label:"本周",value:"week"},{label:"上周",value:"lastWeek"},{label:"本月",value:"month"},{label:"上月",value:"lastMonth"},{label:"本季度",value:"quarter"},{label:"上季度",value:"lastQuarter"},{label:"本年",value:"year"},{label:"去年",value:"lastYear"}]}}},data:function(){return{selectType:{label:"本年",value:"year"},showTypePopover:!1,showCustomContent:!1,sureCustomContent:!1,startTime:"",endTime:""}},computed:{typeShowValue:function(){return this.sureCustomContent?this.startTime||this.endTime?(this.startTime||"")+"-"+(this.endTime||""):"":this.selectType.label}},watch:{defaultType:function(){this.selectType.value!=this.defaultType&&(this.selectType=this.getDefaultTypeValue(this.defaultType))}},mounted:function(){void 0!==this.defaultType?"string"==typeof this.defaultType?this.selectType=this.getDefaultTypeValue(this.defaultType):this.defaultType.label?this.selectType=this.defaultType:"default"==this.defaultType.type?this.selectType=this.getDefaultTypeValue(this.defaultType.value):"custom"==this.defaultType.type&&(this.sureCustomContent=!0,this.showCustomContent=!0,this.startTime=this.defaultType.startTime,this.endTime=this.defaultType.endTime):this.$emit("change",{type:"default",value:this.selectType.value})},methods:{getDefaultTypeValue:function(t){for(var e=0;e