(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-938bd970"],{"32d1":function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container bgHeight checkMain"},[a("el-tabs",{attrs:{value:t.activeName,type:"border-card"},on:{"tab-click":t.handleClick}},[a("el-tab-pane",{attrs:{label:"工资发放",name:"payroll"}},["payroll"===t.activeName?a("payroll"):t._e()],1),t._v(" "),a("el-tab-pane",{attrs:{label:"工资项",name:"salaryItem"}},["salaryItem"===t.activeName?a("salaryItem"):t._e()],1)],1)],1)},n=[],s=(a("a450"),a("4d4e")),o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"formContent"},[a("el-form",{ref:"query",staticClass:"demo-form-inline",attrs:{inline:!0,model:t.query}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{attrs:{placeholder:"工资项名称",clearable:""},model:{value:t.query.name,callback:function(e){t.$set(t.query,"name",e)},expression:"query.name"}})],1),t._v(" "),a("el-form-item",{attrs:{prop:"status"}},[a("el-select",{attrs:{placeholder:"请选择状态",clearable:""},model:{value:t.query.status,callback:function(e){t.$set(t.query,"status",e)},expression:"query.status"}},[a("el-option",{attrs:{label:"启用",value:1}}),t._v(" "),a("el-option",{attrs:{label:"禁用",value:0}})],1)],1),t._v(" "),a("el-form-item",{attrs:{prop:"salaryCalculate"}},[a("el-select",{attrs:{placeholder:"请选择是否参与计算",clearable:""},model:{value:t.query.salaryCalculate,callback:function(e){t.$set(t.query,"salaryCalculate",e)},expression:"query.salaryCalculate"}},[a("el-option",{attrs:{label:"参与",value:1}}),t._v(" "),a("el-option",{attrs:{label:"不参与",value:0}})],1)],1),t._v(" "),a("el-form-item",{attrs:{prop:"taxCalculate"}},[a("el-select",{attrs:{placeholder:"请选择是否缴税",clearable:""},model:{value:t.query.taxCalculate,callback:function(e){t.$set(t.query,"taxCalculate",e)},expression:"query.taxCalculate"}},[a("el-option",{attrs:{label:"参与缴税",value:1}}),t._v(" "),a("el-option",{attrs:{label:"参与实发调整",value:0}})],1)],1),t._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary"},on:{click:t.onSearch}},[t._v("查询")])],1),t._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],on:{click:function(e){return t.resetForm("query")}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("div",{staticClass:"contentStys"},[a("div",{staticClass:"planLst"},[a("span",[t._v("工资项列表")]),t._v(" "),a("div",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.infoVisible=!0}}},[t._v("新增")])],1)]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"tableData",attrs:{border:"",data:t.listTable,"header-cell-style":t.headClass,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{align:"center",label:"工资项ID"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.itemNo||"-"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"工资项"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.name||"-"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"序号"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.sortNum))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.status?a("el-tag",{attrs:{type:"success"}},[t._v("启用")]):t._e(),t._v(" "),0==e.row.status?a("el-tag",{attrs:{type:"info"}},[t._v("禁用")]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"计算"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.salaryCalculate?a("el-tag",{attrs:{type:"success"}},[t._v("是")]):t._e(),t._v(" "),0==e.row.salaryCalculate?a("el-tag",{attrs:{type:"info"}},[t._v("否")]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"缴税"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.taxCalculate?a("el-tag",{attrs:{type:"success"}},[t._v("是")]):t._e(),t._v(" "),0==e.row.taxCalculate?a("el-tag",{attrs:{type:"info"}},[t._v("否")]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"更新人"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.updaterName||"-")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"更新时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.updateTime||"-")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.editClick(e.row)}}},[t._v("编辑")]),t._v(" "),0==e.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.changeStatus(e.row)}}},[t._v("启用")]):t._e(),t._v(" "),1==e.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.changeStatus(e.row)}}},[t._v("禁用")]):t._e()]}}])})],1),t._v(" "),a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{"current-page":t.query.pageNumber,"page-sizes":[10,20,30,100],"page-size":t.query.pageSize,layout:"total, sizes, prev, pager, next, jumper",background:"",total:t.pageTotal},on:{"update:currentPage":function(e){return t.$set(t.query,"pageNumber",e)},"update:current-page":function(e){return t.$set(t.query,"pageNumber",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1),t._v(" "),a("el-dialog",{attrs:{title:t.title,visible:t.infoVisible,"close-on-press-escape":!1,"close-on-click-modal":!1,width:"30%","before-close":t.infoClose},on:{"update:visible":function(e){t.infoVisible=e}}},[a("el-form",{ref:"infoForm",staticClass:"demo-ruleForm",attrs:{model:t.infoForm,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"工资项",prop:"name",rules:{required:!0,message:"请输入工资项名称",trigger:"blur"}}},[a("el-input",{attrs:{placeholder:"工资项名称",clearable:""},model:{value:t.infoForm.name,callback:function(e){t.$set(t.infoForm,"name",e)},expression:"infoForm.name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"参与计算",prop:"salaryCalculate"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"参与计算","inactive-text":"不参与计算"},on:{change:t.switchChange},model:{value:t.infoForm.salaryCalculate,callback:function(e){t.$set(t.infoForm,"salaryCalculate",e)},expression:"infoForm.salaryCalculate"}})],1),t._v(" "),1==t.infoForm.salaryCalculate?a("el-form-item",{attrs:{label:"工资缴税",prop:"taxCalculate"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"工资项参与缴税","inactive-text":"工资项参与实发调整"},model:{value:t.infoForm.taxCalculate,callback:function(e){t.$set(t.infoForm,"taxCalculate",e)},expression:"infoForm.taxCalculate"}})],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"启用","inactive-text":"禁用"},model:{value:t.infoForm.status,callback:function(e){t.$set(t.infoForm,"status",e)},expression:"infoForm.status"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"排序",prop:"sortNum"}},[a("el-input-number",{attrs:{precision:0,"controls-position":"right",min:1,max:999},model:{value:t.infoForm.sortNum,callback:function(e){t.$set(t.infoForm,"sortNum",e)},expression:"infoForm.sortNum"}})],1),t._v(" "),a("el-form-item",["新增工资项"==t.title?a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitInfo("infoForm")}}},[t._v("确认新增")]):a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.saveInfo("infoForm")}}},[t._v("确认保存")]),t._v(" "),a("el-button",{on:{click:t.infoClose}},[t._v("关闭")])],1)],1)],1)],1)},r=[],i=a("8425"),c=a("dd26"),u=a.n(c),m={data:function(){return{moment:u.a,companyId:"",pageTotal:0,listLoading:!1,listTable:[],title:"新增工资项",infoVisible:!1,query:{name:"",status:"",pageSize:10,pageNumber:1},infoForm:{name:"",status:1,salaryCalculate:1,taxCalculate:1,sortNum:1},saveData:{}}},mounted:function(){this.companyId=JSON.parse(localStorage.getItem("companyInfo")).osId,this.getlistData()},methods:{getlistData:function(){var t=this;this.listLoading=!0,this.checkList=[],this.query.companyId=JSON.parse(localStorage.getItem("companyInfo")).osId,Object(i["g"])(this.query).then((function(e){e.data.records&&e.data.records.length>0?(t.listTable=e.data.records,t.pageTotal=e.data.rowsCount):(t.listTable=[],t.pageTotal=0),t.listLoading=!1})).catch((function(){t.listLoading=!1,t.listTable=[],t.pageTotal=0}))},onSearch:function(){this.query.pageNumber=1,this.getlistData()},resetForm:function(t){this.$refs[t].resetFields(),this.query.pageNumber=1,this.getlistData()},handleSizeChange:function(t){this.query.pageSize=t,this.query.pageNumber=1,this.getlistData()},handleCurrentChange:function(t){this.query.pageNumber=t,this.getlistData()},submitInfo:function(t){var e=this,a=JSON.parse(window.localStorage.getItem("memberInfor"));this.$refs[t].validate((function(t){if(t){var l=e.infoForm;l.companyId=e.companyId,l.creatorId=a.id,l.creatorName=a.name,Object(i["c"])(l).then((function(t){0==t.code&&(e.$message({message:"新增成功!",type:"success"}),e.infoClose(),e.getlistData())}))}}))},infoClose:function(){this.$refs["infoForm"].resetFields(),this.title="新增工资项",this.infoVisible=!1},editClick:function(t){this.title="编辑工资项",this.saveData=JSON.parse(JSON.stringify(t)),this.infoVisible=!0,this.$nextTick((function(){this.infoForm.name=this.saveData.name,this.infoForm.status=this.saveData.status,this.infoForm.salaryCalculate=this.saveData.salaryCalculate,this.infoForm.taxCalculate=this.saveData.taxCalculate,this.infoForm.sortNum=this.saveData.sortNum}))},saveInfo:function(t){var e=this;this.$refs[t].validate((function(t){if(t){var a={name:e.infoForm.name,status:e.infoForm.status,salaryCalculate:e.infoForm.salaryCalculate,taxCalculate:e.infoForm.taxCalculate,sortNum:e.infoForm.sortNum,id:e.saveData.id};e.updateInfo(a,"1")}}))},changeStatus:function(t){var e=this;this.$confirm("此操作将".concat(1==t.status?"禁用":"启用","该工资项, 是否继续?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id,name:t.name,status:1==t.status?0:1,salaryCalculate:t.salaryCalculate,sortNum:e.infoForm.sortNum,taxCalculate:t.taxCalculate};e.updateInfo(a,"2")})).catch((function(){}))},updateInfo:function(t,e){var a=this,l=JSON.parse(window.localStorage.getItem("memberInfor")),n=t;n.updaterId=l.id,n.updaterName=l.name,Object(i["j"])(n).then((function(t){0==t.code&&(a.$message({message:"操作成功!",type:"success"}),"1"==e&&a.infoClose(),a.getlistData())}))},headClass:function(){return"text-align:center;background:#FAFAFA;"},switchChange:function(t){this.infoForm.taxCalculate=1==t?1:0}}},f=m,p=(a("c00e"),a("829d")),v=Object(p["a"])(f,o,r,!1,null,"735428bf",null),d=v.exports,b={components:{payroll:s["a"],salaryItem:d},data:function(){return{activeName:"payroll"}},methods:{handleClick:function(t){this.activeName=t.name}}},h=b,y=Object(p["a"])(h,l,n,!1,null,null,null);e["default"]=y.exports},c00e:function(t,e,a){"use strict";a("e156")},e156:function(t,e,a){}}]);