直播数据中心

28.23f9599059ab85cb1560.js 16KB

1
  1. webpackJsonp([28],{G9W2:function(t,e){},M6rc:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("mvHQ"),s=i.n(a),n=i("g8Fq"),l={name:"expenseManagement",components:{expenseDialog:i("97aY").a,selfInfo:n.a},data:function(){return{selfInfoFlag:!1,fileIpt:"",time:[],timeList:[],start_time:"",end_time:"",staffList:[],staff_id:"",edit_id:"",else_listDialogFlag:!1,listDialogFlag:!1,editlistDialogFlag:!1,else_editlistDialogFlag:!1,isEdit:!1,live_status:1,pickerTimes:{disabledDate:function(t){return t>Date.now()}},infoList:[],total:0,page:1,pages:0,page_size:20,loading:!1,isbig:!1,actionUrl:"",upFile:new FormData,baoxiao_item:{},baoxiao_id:"",upload_pic_data:{admin_id:this.$cookie.getCookie("admin_id"),ttl:Number(this.$cookie.getCookie("ttl")),sign:this.$cookie.getCookie("sign")},pics:[],userInfo:{}}},created:function(){this.userInfo=JSON.parse(this.$localSelfStore.getLocal("userInfo")),this.get_staffList(),this.getTimeList()},methods:{editBxd:function(t,e){this.userInfo.reimburse_info?("add"==t&&(this.listDialogFlag=!0,this.baoxiao_item=e),"edit"==t&&(this.editClick(e),this.editlistDialogFlag=!0),"look"==t&&(this.editClick(e),this.editlistDialogFlag=!0),"else_edit"==t&&(this.editClick(e),this.else_editlistDialogFlag=!0),"else_look"==t&&(this.editClick(e),this.else_editlistDialogFlag=!0)):this.selfInfoFlag=!0},clearSelfInfo:function(t){var e=this;"load"==t&&this.$axios.get(this.URL.BASEURL+this.URL.dialogProfile,{}).then(function(t){var i=t.data;i&&0==i.errno&&(e.$localSelfStore.setLocal("userInfo",s()(i.rst)),e.userInfo=JSON.parse(e.$localSelfStore.getLocal("userInfo")))}).catch(function(t){}),this.selfInfoFlag=!1},editClick:function(t){this.edit_id=t.id,this.baoxiao_item=t},closeFlag:function(){this.listDialogFlag=!1,this.editlistDialogFlag=!1,this.else_listDialogFlag=!1,this.else_editlistDialogFlag=!1},getTimeList:function(){var t=new Date,e=t.getDay(),i=t.getDate(),a=t.getMonth(),s=t.getFullYear(),n=new Date(s,a,i-e),l=new Date(s,a,i+(6-e));this.timeList=[{name:"今日",start_time:this.$getDay(0,!1),end_time:this.$getDay(0,!1)},{name:"本周",start_time:this.day_format(n).date,end_time:this.day_format(l).date},{name:"本月",start_time:this.day_format(new Date(s,a,1)).date,end_time:this.day_format(new Date(s,a+1,0)).date}],this.time=[this.timeList[2].start_time,this.timeList[2].end_time],this.start_time=this.time[0],this.end_time=this.time[1],this.init(1)},changeInit:function(t){this.start_time=t.start_time,this.end_time=t.end_time,this.init(1),this.time=[t.start_time,t.end_time]},timeChange:function(t){t&&0!=t.length&&(this.start_time=t[0],this.end_time=t[1],this.init(1))},init:function(t){var e=this;this.page=t||this.page,this.loading=!0;var i=this.URL.LiveReimbs;0==this.live_status&&(i=this.URL.reimbsList),this.$axios.get(this.URL.BASEURL+i,{params:{staff_id:this.staff_id,start:this.start_time,end:this.end_time,page:this.page,pagesize:this.page_size}}).then(function(t){t=t.data;e.loading=!1,t&&0==t.errno?(e.infoList=t.rst.data,e.total=t.rst.pageInfo.total,e.pages=t.rst.pageInfo.pages):4002!=t.errno&&e.$message({message:t.err,type:"warning"})}).catch(function(t){e.loading=!1})},handleCurrentChange:function(t){this.init(t)},day_format:function(t){return{date:t.getFullYear()+"-"+(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-"+(t.getDate()<10?"0"+t.getDate():t.getDate()),day:t.getDate()}},get_staffList:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.userListForFilter,{}).then(function(e){e=e.data;if(t.loading=!1,e&&0==e.errno){var i=e.rst;i.forEach(function(t){t.name=t.real_name}),t.staffList=i}else 4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(t){})}}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"pageCon"},[i("div",{staticClass:"operation_container flex-between"},[i("div",{staticClass:"flex"},[i("div",{staticClass:"commonInfoName"},[t._v("时间筛选")]),t._v(" "),i("ul",{staticClass:"commonTimeList flex"},[t._l(t.timeList,function(e,a){return i("li",{key:"time"+a,class:t.start_time==e.start_time&&t.end_time==e.end_time?"active":"",on:{click:function(i){return t.changeInit(e)}}},[t._v("\n "+t._s(e.name)+"\n ")])}),t._v(" "),i("li",{staticClass:"commonTime_container"},[t._v("\n "+t._s(t.time&&0!=t.time.length?t.time[0]+"  ~  "+t.time[1]:"开始时间  -  结束时间")+"\n "),i("i",{staticClass:"iconfont icon-rili_icon"}),t._v(" "),i("el-date-picker",{staticClass:"commonTime_picker",attrs:{size:"small",clearable:!1,"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.timeChange},model:{value:t.time,callback:function(e){t.time=e},expression:"time"}})],1)],2),t._v(" "),i("div",{staticClass:"flex"},[i("div",{staticClass:"commonInfoName",staticStyle:{"margin-left":"20px"}},[t._v("人员筛选")]),t._v(" "),i("el-select",{staticClass:"self_list_input__inner",attrs:{size:"small",filterable:"",clearable:"",placeholder:"人员筛选"},on:{change:function(e){return t.init(1)}},model:{value:t.staff_id,callback:function(e){t.staff_id=e},expression:"staff_id"}},t._l(t.staffList,function(t,e){return i("el-option",{key:e,attrs:{label:t.name,value:t.id}})}),1)],1)])]),t._v(" "),i("div",{staticClass:"commonInfo operation_container flex"},[i("div",{staticClass:"switchButton"},[i("button",{class:["addButton",1==t.live_status?"active":""],on:{click:function(e){t.live_status=1,t.init(1)}}},[t._v("直播报销")]),t._v(" "),i("button",{class:["addButton",0==t.live_status?"active":""],staticStyle:{"margin-left":"-10px"},on:{click:function(e){t.live_status=0,t.init(1)}}},[t._v("其他报销\n ")])]),t._v(" "),i("el-popover",{attrs:{"popper-class":"self_popover",placement:"bottom",title:"",width:"200",trigger:"hover",content:"晚8点之后和节假日打车费报销"}},[i("span",{staticClass:"c-fff f14",staticStyle:{"margin-left":"10px"},attrs:{slot:"reference"},slot:"reference"},[i("i",{staticClass:"el-icon-question f13 c-A5A5A5"}),t._v("\n 报销规则\n ")])]),t._v(" "),0==t.live_status?i("button",{staticClass:"addButton active lMarauto",on:{click:function(e){t.userInfo.reimburse_info?t.else_listDialogFlag=!0:t.selfInfoFlag=!0}}},[t._v("添加报销")]):t._e()],1),t._v(" "),1==t.live_status?i("div",{staticClass:"table_div"},[i("table",[t._m(0),t._v(" "),i("tbody",t._l(t.infoList,function(e){return i("tr",{key:e.id},[i("td",[t._v("\n "+t._s(e.date)+"\n ")]),t._v(" "),i("td",[t._v("\n "+t._s(e.staff_name?e.staff_name:"-")+"\n ")]),t._v(" "),i("td",[t._v("\n "+t._s(e.staff_station?e.staff_station:"-")+"\n ")]),t._v(" "),i("td",[i("el-tooltip",{attrs:{effect:"dark",disabled:!(e.reason&&e.reason.length>20),content:e.reason,placement:"top"}},[i("div",{staticClass:"reasonDiv"},[t._v("\n "+t._s(e.reason?e.reason:"-")+"\n ")])])],1),t._v(" "),i("td",[i("div",{staticStyle:{padding:"10px 0",display:"inline-block"}},t._l(e.plans,function(e){return i("div",{staticClass:"planItem flex"},[i("div",{staticClass:"account flex"},[i("el-tooltip",{attrs:{effect:"dark",content:e.title,disabled:!(e.title&&e.title.length>5),placement:"top"}},[i("div",{staticClass:"seller_name"},[t._v(t._s(e.title))])])],1),t._v(" "),i("div",{staticClass:"time"},[t._v(t._s(e.start&&e.start.slice(5,16))+" 至 "+t._s(e.end&&e.end.slice(5,16)))])])}),0)]),t._v(" "),i("td",[t._v("\n "+t._s(e.off_time?e.off_time:"-")+"\n ")]),t._v(" "),i("td",[0==e.is_add_detail?i("span",{staticClass:"c-4F7EFF pointer",on:{click:function(i){return i.stopPropagation(),t.editBxd("add",e)}}},[t._v("添加报销单")]):1==e.is_add_detail&&1==e.if_edit?i("span",{staticClass:"c-FE9 pointer",on:{click:function(i){return i.stopPropagation(),t.editBxd("edit",e)}}},[t._v("编辑报销单")]):i("span",{staticClass:"pointer",on:{click:function(i){return i.stopPropagation(),t.editBxd("look",e)}}},[t._v("查看")])])])}),0)])]):t._e(),t._v(" "),0==t.live_status?i("div",{staticClass:"table_div"},[i("table",[t._m(1),t._v(" "),i("tbody",t._l(t.infoList,function(e){return i("tr",{key:e.id},[i("td",[t._v("\n "+t._s(e.date)+"\n ")]),t._v(" "),i("td",[t._v("\n "+t._s(e.staff_name?e.staff_name:"-")+"\n ")]),t._v(" "),i("td",[t._v("\n "+t._s(e.staff_station?e.staff_station:"-")+"\n ")]),t._v(" "),i("td",[i("el-tooltip",{attrs:{effect:"dark",disabled:!(e.reason&&e.reason.length>20),content:e.reason,placement:"top"}},[i("div",{staticClass:"reasonDiv"},[t._v("\n "+t._s(e.reason?e.reason:"-")+"\n ")])])],1),t._v(" "),i("td",[t._v("\n "+t._s(e.off_time?e.off_time:"-")+"\n ")]),t._v(" "),i("td",[1==e.if_edit?i("span",{staticClass:"c-FE9 pointer",on:{click:function(i){return i.stopPropagation(),t.editBxd("else_edit",e)}}},[t._v("编辑报销单")]):i("span",{staticClass:"pointer",on:{click:function(i){return i.stopPropagation(),t.editBxd("else_look",e)}}},[t._v("查看")])])])}),0)])]):t._e(),t._v(" "),t.loading||0!=t.infoList.length?t._e():i("div",{staticClass:"noHaveDate"},[t._v("暂无数据")]),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],staticClass:"bottom"},[i("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1),t._v(" "),i("el-dialog",{staticClass:"listDialog",attrs:{title:"添加报销单",visible:t.listDialogFlag,width:"600px",top:"60px"},on:{"update:visible":function(e){t.listDialogFlag=e}}},[t.listDialogFlag?i("expenseDialog",{attrs:{props_dialog:{baoxiao_item:t.baoxiao_item,danListShow:!0,add_edit:!0}},on:{closeFlag:t.closeFlag,init:t.init}}):t._e()],1),t._v(" "),i("el-dialog",{staticClass:"listDialog",attrs:{title:"编辑报销单",visible:t.editlistDialogFlag,width:"600px",top:"60px"},on:{"update:visible":function(e){t.editlistDialogFlag=e}}},[t.editlistDialogFlag?i("expenseDialog",{attrs:{props_dialog:{baoxiao_item:t.baoxiao_item,danListShow:!1,add_edit:!1},edit_id:t.edit_id},on:{closeFlag:t.closeFlag,init:t.init}}):t._e()],1),t._v(" "),i("el-dialog",{staticClass:"listDialog",attrs:{title:"其他添加报销单",visible:t.else_listDialogFlag,width:"600px",top:"60px"},on:{"update:visible":function(e){t.else_listDialogFlag=e}}},[t.else_listDialogFlag?i("expenseDialog",{attrs:{props_dialog:{baoxiao_item:t.baoxiao_item,danListShow:!0,add_edit:!0,add_else:!0}},on:{closeFlag:t.closeFlag,init:t.init}}):t._e()],1),t._v(" "),i("el-dialog",{staticClass:"listDialog",attrs:{title:"其他编辑报销单",visible:t.else_editlistDialogFlag,width:"600px",top:"60px"},on:{"update:visible":function(e){t.else_editlistDialogFlag=e}}},[t.else_editlistDialogFlag?i("expenseDialog",{attrs:{edit_id:t.edit_id,props_dialog:{baoxiao_item:t.baoxiao_item,danListShow:!1,add_edit:!1,add_else:!0}},on:{closeFlag:t.closeFlag,init:t.init}}):t._e()],1),t._v(" "),i("el-dialog",{attrs:{title:"基础报销信息",visible:t.selfInfoFlag,width:"500px","close-on-click-modal":!1,left:""},on:{"update:visible":function(e){t.selfInfoFlag=e}}},[i("self-info",{on:{clearSelfInfo:t.clearSelfInfo}})],1)],1)},staticRenderFns:[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("thead",[i("tr",[i("th",{staticStyle:{width:"14%"}},[i("div",{staticClass:"th_title"},[t._v("日期")])]),t._v(" "),i("th",{staticStyle:{width:"10%"}},[i("div",{staticClass:"th_title"},[t._v("员工")])]),t._v(" "),i("th",{staticStyle:{width:"10%"}},[i("div",{staticClass:"th_title"},[t._v("岗位")])]),t._v(" "),i("th",{staticStyle:{width:"10%"}},[i("div",{staticClass:"th_title"},[t._v("事由说明")])]),t._v(" "),i("th",[i("div",{staticClass:"th_title"},[t._v("计划直播")])]),t._v(" "),i("th",[i("div",{staticClass:"th_title"},[t._v("实际下播时间")])]),t._v(" "),i("th",{staticStyle:{width:"14%"}},[i("div",{staticClass:"th_title"},[t._v("\n 操作\n ")])])])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("thead",[i("tr",[i("th",{staticStyle:{width:"14%"}},[i("div",{staticClass:"th_title"},[t._v("日期")])]),t._v(" "),i("th",[i("div",{staticClass:"th_title"},[t._v("员工")])]),t._v(" "),i("th",[i("div",{staticClass:"th_title"},[t._v("岗位")])]),t._v(" "),i("th",{staticStyle:{width:"20%"}},[i("div",{staticClass:"th_title"},[t._v("事由说明")])]),t._v(" "),i("th",{staticStyle:{width:"14%"}},[i("div",{staticClass:"th_title"},[t._v("下班时间")])]),t._v(" "),i("th",{staticStyle:{width:"14%"}},[i("div",{staticClass:"th_title"},[t._v("\n 操作\n ")])])])])}]};var r=i("VU/8")(l,o,!1,function(t){i("G9W2")},"data-v-83f15278",null);e.default=r.exports},g8Fq:function(t,e,i){"use strict";var a={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"dialogBox"},[i("div",{staticClass:"dialogitem"},[t._m(0),t._v(" "),i("el-select",{staticClass:"input",attrs:{size:"mini",filterable:""},model:{value:t.companyIdx,callback:function(e){t.companyIdx=e},expression:"companyIdx"}},t._l(t.companyList,function(t,e){return i("el-option",{key:e,attrs:{label:t.company_name,value:t.id}})}),1)],1),t._v(" "),i("div",{staticClass:"dialogitem"},[t._m(1),t._v(" "),i("el-select",{staticClass:"input",attrs:{size:"mini",filterable:"",placeholder:"请选择部门"},model:{value:t.departIdx,callback:function(e){t.departIdx=e},expression:"departIdx"}},t._l(t.departmentList,function(t,e){return i("el-option",{key:e,attrs:{label:t.department_name,value:t.id}})}),1)],1),t._v(" "),i("div",{staticClass:"dialogitem"},[t._m(2),t._v(" "),i("el-input",{staticClass:"input",attrs:{placeholder:"请输入真实姓名",size:"small",clearable:""},model:{value:t.realName,callback:function(e){t.realName="string"==typeof e?e.trim():e},expression:"realName"}})],1),t._v(" "),i("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[i("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.$emit("clearSelfInfo")}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.submit}},[t._v("提 交")])],1)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("label",[e("em",[this._v("*")]),this._v("公司:")])},function(){var t=this.$createElement,e=this._self._c||t;return e("label",[e("em",[this._v("*")]),this._v("部门:")])},function(){var t=this.$createElement,e=this._self._c||t;return e("label",[e("em",[this._v("*")]),this._v("真实姓名:")])}]};var s=i("VU/8")({data:function(){return{loading:!1,companyList:[],companyIdx:"",departIdx:"",departmentList:[],realName:""}},created:function(){this.get_companySubjectList(),this.get_departmentList(),this.init()},methods:{submit:function(){var t=this;""!=this.companyIdx&&this.companyIdx?""!=this.departIdx&&this.departIdx?""!=this.realName&&this.realName?(this.loading=!0,this.$axios.post(this.URL.BASEURL+this.URL.userReiInfoOperate,{company_subject_id:this.companyIdx,department_id:this.departIdx,reimburse_name:this.realName}).then(function(e){e=e.data,t.loading=!1,e&&0==e.errno?t.$emit("clearSelfInfo","load"):4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})):this.$message({message:"请输入真实姓名",type:"warning"}):this.$message({message:"请选择部门",type:"warning"}):this.$message({message:"请选择公司",type:"warning"})},init:function(){var t=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.userReiInfoDetail,{}).then(function(e){e=e.data,t.loading=!1,e&&0==e.errno?(t.companyIdx=e.rst.company_subject_id,t.departIdx=e.rst.department_id,t.realName=e.rst.reimburse_name):4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})},get_companySubjectList:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.companySubjectList,{params:{page:1,page_size:999}}).then(function(e){(e=e.data)&&0==e.errno?t.companyList=e.rst.data:4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(t){})},get_departmentList:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.departments,{params:{page:1,page_size:999}}).then(function(e){(e=e.data)&&0==e.errno?t.departmentList=e.rst.data:4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(t){})}}},a,!1,function(t){i("ss7m")},"data-v-1093b756",null);e.a=s.exports},ss7m:function(t,e){}});