1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
webpackJsonp([281],{fFUy:function(e,t){},sGbw:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("mvHQ"),i=a.n(o),s=a("Dd8w"),l=a.n(s),n=a("NYxO"),r=(a("t4zo"),a("Dod7")),c=a("bzuE"),u={data:function(){return{pageSizes:[10,20,50],search_data:{pageno:1,pagesize:1e5},search_data1:{pageno:1,pagesize:1e4,isShowSalaryAccounting:1},search_data2:{pageno:1,pagesize:10},uploadAttachment:[],fileDocList:[],uploadUrl:r.a.uploadUrl,auto_upload:!1,fullscreenLoading:!1,uploadAttachment1:[],fileDocList1:[],uploadUrl1:r.a.uploadUrl,auto_upload1:!1,fullscreenLoading1:!1,tableData:[],editable:!1,computeLoading:!1,computeData:[],rowIds:[],formData:{deptId:""},rulesForm:{monthDate:[{required:!0,message:"请选择所属时期",trigger:"change"}]},selectDeptId:"",dialogTitle:"",depOptions:[],config:c.a,btnDelDisabled:!0,btnOtherDisabled:!0,dialogLoading:!1,dialogVisible:!1,columnSetDialogVisible:!1,columnSetDialogTitle:"设置显示字段列表",tableId:"salaryManagement_salaryAccounting_table",pictLoading:!1,showTableColumnsDefault:[],showTableColumns:[],showTableColumnsTemp:[],formTableData:[]}},computed:l()({},Object(n.c)({userInfo:"user/getUserInfo"})),mounted:function(){this.search_data.monthDate=this.$route.query.monthDate,this.initData(),this.getList()},methods:{goCompute:function(){this.formData={},this.dialogVisible=!0,this.computeList()},compute:function(){var e=this;this.$api.salaryProjectApi.compute({monthDate:this.search_data.monthDate,formulaId:this.rowIds[0].id}).then(function(t){0==t.code?(e.$message({message:t.msg,type:"success"}),e.dialogVisible=!1,e.getList()):e.$message({message:t.msg,type:"error"})})},computeList:function(){var e=this;this.computeLoading=!0,this.$api.salaryProjectApi.formulaPageList(this.search_data2).then(function(t){e.computeLoading=!1,t.data?e.computeData=t.data.datas?t.data.datas:[]:e.computeData=[]}).catch(function(e){console.log(e)})},edit:function(){this.editable=!0},audit:function(){var e=this;this.$confirm("确认审核选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.salaryProjectApi.audit({monthDate:e.search_data.monthDate}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg,type:"error"})})})},antiAudit:function(){var e=this;this.$confirm("确认反审核选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.salaryProjectApi.antiAudit({monthDate:e.search_data.monthDate}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg,type:"error"})})})},save:function(){var e=this,t=[],a={};this.tableData.forEach(function(e){var o=[];for(var s in e){var l={property:s,amount:e[s]};o.push(l)}var n=i()(o);a={id:e.id,salaryProjectJson:n},t.push(a)}),console.log(t),this.$api.salaryProjectApi.salaryAccountingSave(t).then(function(t){0==t.code?e.$message({message:t.msg,type:"success"}):e.$message({message:t.msg,type:"error"})})},downLoadTax:function(){this.$api.salesAPI.downLoadTax().then(function(e){})},downLoadSocialSecurity:function(){this.$api.salesAPI.downLoadSocialSecurity().then(function(e){})},getList:function(){var e=this;this.pictLoading=!0,this.$api.salaryProjectApi.getSalaryAccountingData(this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.tableData=t.data?t.data:[],e.tableData.forEach(function(e){}),e.zero(),e.tableData.forEach(function(e){e.monthDate=/\d{4}-\d{1,2}/g.exec(e.monthDate)})):e.tableData=[]}).catch(function(e){console.log(e)})},initData:function(){var e=this;this.$api.salaryProjectApi.getProjectList(this.search_data1).then(function(t){t.data.forEach(function(t){var a={title:t.name,prop_:t.property};e.formTableData.push(a)}),e.zero(),console.log(e.tableData)})},zero:function(){for(var e=0;e<this.tableData.length;e++)for(var t=this.tableData[e],a=0;a<this.formTableData.length;a++)t[this.formTableData[a].prop_]=t[this.formTableData[a].prop_]?t[this.formTableData[a].prop_]:0},setBtn:function(e){var t=!0,a=!0;e.length>0?(a=!1,1==e.length&&(t=!1)):(t=!0,a=!0),this.btnOtherDisabled=a,this.btnDelDisabled=t},clickRow:function(e){this.$refs.tb.toggleRowSelection(e)},handleSelectionChange:function(e){this.rowIds=e,console.log(this.rowIds),this.setBtn(e)},httpRequest:function(e,t,a){var o=this,i=this,s=new FormData;s.append("file",e,t),s.append("monthDate",this.search_data.monthDate),this.$api.salaryProjectApi.importSocialSecurity(s).then(function(t){i.fullscreenLoading=!1,0==t.code?(i.$message({message:"上传成功",type:"success",duration:2e3}),o.getList(),a?a.filePath=t.filePath:e.filePath=t.filePath,i.uploadAttachment.push({filePath:t.filePath,fileName:t.fileName})):(i.fullscreenLoading=!1,i.$message.error(t.msg),i.$refs.upload.uploadFiles.splice(i.$refs.upload.uploadFiles.length-1,1))})},uploadSuccess:function(e,t){"操作成功"===e.msg&&this.uploadAttachment.push({filePath:e.filePath,fileName:e.fileName})},onChange:function(e,t){if(e.size>1e8)return this.$message.error("上传文件不能超过100M!"),this.$refs.upload.fileList=this.$refs.upload.fileList,this.$refs.upload.uploadFiles.splice(this.$refs.upload.uploadFiles.length-1,1),!1;if(e=e.raw,/image\/\w+/.test(e.type)){this.fullscreenLoading=!0;var a=this;imageConversion.compressAccurately(e,400).then(function(t){t.size?a.httpRequest(t,e.name,e):(a.$message.error("压缩图片失败"),a.fullscreenLoading=!1,a.$refs.upload.uploadFiles.splice(a.$refs.upload.uploadFiles.length-1,1))})}else this.fullscreenLoading=!0,this.httpRequest(e,e.name)},httpRequest1:function(e,t,a){var o=this,i=this,s=new FormData;s.append("file",e,t),s.append("monthDate",this.search_data.monthDate),this.$api.salaryProjectApi.importTax(s).then(function(t){i.fullscreenLoading1=!1,0==t.code?(i.$message({message:"上传成功",type:"success",duration:2e3}),o.getList(),a?a.filePath=t.filePath:e.filePath=t.filePath,i.uploadAttachment.push({filePath:t.filePath,fileName:t.fileName})):(i.fullscreenLoading1=!1,i.$message.error(t.msg),i.$refs.upload.uploadFiles.splice(i.$refs.upload.uploadFiles.length-1,1))})},uploadSuccess1:function(e,t){"操作成功"===e.msg&&this.uploadAttachment.push({filePath:e.filePath,fileName:e.fileName})},onChange1:function(e,t){if(e.size>1e8)return this.$message.error("上传文件不能超过100M!"),this.$refs.upload.fileList=this.$refs.upload.fileList,this.$refs.upload.uploadFiles.splice(this.$refs.upload.uploadFiles.length-1,1),!1;if(e=e.raw,/image\/\w+/.test(e.type)){this.fullscreenLoading1=!0;var a=this;imageConversion.compressAccurately(e,400).then(function(t){t.size?a.httpRequest1(t,e.name,e):(a.$message.error("压缩图片失败"),a.fullscreenLoading1=!1,a.$refs.upload.uploadFiles.splice(a.$refs.upload.uploadFiles.length-1,1))})}else this.fullscreenLoading1=!0,this.httpRequest1(e,e.name)},addClass:function(e){e.row,e.column;var t=e.rowIndex;e.columnIndex;if(1===this.tableData[t].isThisMonth)return"background-color:#E6F7FF"}},watch:{}},d={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box"},[a("div",{staticClass:"sys-operate"},[a("el-upload",{directives:[{name:"loading",rawName:"v-loading.lock",value:e.fullscreenLoading,expression:"fullscreenLoading",modifiers:{lock:!0}}],ref:"upload",staticClass:"inline-block mr",staticStyle:{float:"left"},attrs:{"show-file-list":!1,action:e.uploadUrl,"on-success":e.uploadSuccess,"before-remove":function(){return!1},"auto-upload":e.auto_upload,"on-change":e.onChange,accept:".xls,.xlsx,"}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("社保导入")])],1),e._v(" "),a("el-upload",{directives:[{name:"loading",rawName:"v-loading.lock",value:e.fullscreenLoading1,expression:"fullscreenLoading1",modifiers:{lock:!0}}],ref:"upload",staticClass:"inline-block mr",staticStyle:{float:"left"},attrs:{"show-file-list":!1,action:e.uploadUrl1,"on-success":e.uploadSuccess1,"before-remove":function(){return!1},"auto-upload":e.auto_upload1,"on-change":e.onChange1,accept:".xls,.xlsx,"}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("个税导入")])],1),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.save()}}},[e._v("保存")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.edit()}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.goCompute()}}},[e._v("数据计算")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.audit()}}},[e._v("审核")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.antiAudit()}}},[e._v("反审核")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.downLoadSocialSecurity()}}},[e._v("社保模板下载")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.downLoadTax()}}},[e._v("个税模板下载")])],1),e._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"所属时期"}},[a("el-date-picker",{attrs:{type:"month",format:"yyyy-MM","range-separator":"—",placeholder:"选择日期","value-format":"yyyy-MM-dd HH:mm:ss",disabled:""},model:{value:e.search_data.monthDate,callback:function(t){e.$set(e.search_data,"monthDate",t)},expression:"search_data.monthDate"}})],1)],1)])],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"",id:"out-table",data:e.tableData,"cell-style":e.addClass,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}}},[a("el-table-column",{attrs:{type:"index",width:"55",label:"编号",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"monthDate",align:"center",label:"所属时期"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"employeeCode",align:"center",label:"员工工号"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"employeeName",align:"center",label:"员工姓名"}}),e._v(" "),e._l(e.formTableData,function(t,o){return a("el-table-column",{key:o,attrs:{prop:t.prop_,label:t.title,align:"center",width:"120px"},scopedSlots:e._u([{key:"default",fn:function(o){return[a("el-input",{attrs:{disabled:!e.editable||178!=o.row.auditSign},model:{value:o.row[t.prop_],callback:function(a){e.$set(o.row,t.prop_,a)},expression:"scope.row[items.prop_]"}})]}}],null,!0)})}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"auditSignName",align:"center",label:"审核状态"}})],2)],1),e._v(" "),a("el-dialog",{attrs:{title:e.dialogTitle,center:"",visible:e.dialogVisible,width:"600px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-button",{attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:function(t){return e.compute()}}},[e._v("计算")]),e._v(" "),a("div",{staticClass:"mt"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.computeLoading,expression:"computeLoading"}],ref:"tb",attrs:{border:"",data:e.computeData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"row-click":e.clickRow,"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{type:"index",width:"55",align:"center",label:"序号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",align:"center",label:"公式计算方案名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"instruction",align:"center",label:"说明","show-overflow-tooltip":""}})],1)],1)],1)],1)},staticRenderFns:[]};var p=a("VU/8")(u,d,!1,function(e){a("fFUy")},"data-v-ca53fed8",null);t.default=p.exports}}); |