1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
webpackJsonp([360],{"8Utr":function(e,t){},k6Df:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("mvHQ"),n=a.n(s),o=a("BO1k"),r=a.n(o),i=a("Dd8w"),l=a.n(i),c=a("NYxO"),d=(a("t4zo"),a("bzuE")),u={data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,contractType:0},sexoptions:[{value:1,label:"关闭"},{value:0,label:"正常"}],value:"",accountNumberList:[],settlementTypeList:[],tableData:[],rowIds:[],prDate:"",auditSignList:[],businessTypeList:[],companyList:[],createByList:[],depOptions:[],selectDeptId:"",config:d.a,btnDelDisabled:!0,btnOtherDisabled:!0,dialogLoading:!1,columnSetDialogVisible:!1,columnSetDialogTitle:"设置显示字段列表",tableId:"laborContract_table",pictLoading:!1,formTableData:[],totalTransferAmount:0}},computed:{},mounted:function(){this.initData(),this.getList()},methods:l()({},Object(c.d)({removeTagNav:"tagNav/removeTagNav"}),{sortChange:function(e){var t={column:e.column,prop:e.prop,order:e.order},a="ascending"==t.order?"ASC":"DESC";this.$set(this.search_data,"sort",t.prop),this.$set(this.search_data,"order",a),this.getList()},initData:function(){var e=this;this.$api.commonAPI.getDeptsTree().then(function(t){0===t.code&&(e.depOptions=t.data.children,e.setDeptList(e.depOptions))}).catch(function(e){console.log(e)})},setDeptList:function(e){var t=!0,a=!1,s=void 0;try{for(var n,o=r()(e);!(t=(n=o.next()).done);t=!0){var i=n.value;i.hasChildren?this.setDeptList(i.children):i.children=void 0}}catch(e){a=!0,s=e}finally{try{!t&&o.return&&o.return()}finally{if(a)throw s}}},setDefaultDept:function(){if(this.depOptions.length>0&&this.search_data.signingDept){var e=n()(this.search_data.signingDept),t=this.treeFindPath(this.depOptions,function(t){return t.id===e});this.selectDeptId=JSON.parse(n()(t))}},handleChange:function(e){this.search_data.signingDept=e[e.length-1],this.selectDeptId=e},treeFindPath:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var s=!0,n=!1,o=void 0;try{for(var i,l=r()(e);!(s=(i=l.next()).done);s=!0){var c=i.value;if(a.push(c.id),t(c))return a;if(c.children){var d=this.treeFindPath(c.children,t,a);if(d.length)return d}a.pop()}}catch(e){n=!0,o=e}finally{try{!s&&l.return&&l.return()}finally{if(n)throw o}}return[]},download:function(e){var t=this;console.log(e);var a={id:e.id,assocType:"CONTRACT_INFO_CONTENT",fileName:e.employeeName};console.log(a),this.$api.salesAPI.downloadByCusName(a).then(function(e){console.log(e),200==e.status?(window.open(e.request.responseURL),t.$message({message:"下载成功",type:"success"})):t.$message({message:e.msg,type:"error"})})},goAdd:function(){this.$router.push({path:"/staffContract/laborContract_add",query:{t:Date.now()}})},edit:function(){var e=this.rowIds[0].id;this.$router.push({path:"/staffContract/laborContract_add",query:{id:e,t:Date.now()}})},viewDetail:function(e){this.$router.push({path:"/staffContract/laborContract_add",query:{id:e.id,t:Date.now()}})},search:function(){this.search_data.pageno=1,this.getList()},getList:function(){var e=this;this.pictLoading=!0,this.$api.staffContractAPI.pageList(this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.total=t.data.totalRows,e.tableData=t.data.datas?t.data.datas:[],e.tableData.forEach(function(e){e.createTime=/\d{4}-\d{1,2}-\d{1,2}/g.exec(e.createTime),e.signingDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(e.signingDate),e.stopDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(e.stopDate)})):(e.total=0,e.tableData=[])}).catch(function(e){console.log(e)})},remove:function(){var e=this,t=[];this.rowIds.forEach(function(e){t.push(e.id)}),this.$confirm("确认删除选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.staffContractAPI.batchRemove(t).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg?t.msg:"删除失败,请重试",type:"error"})}).catch(function(t){e.$message({message:"删除失败,请重试",type:"error"})})})},close:function(){var e=this,t=[];this.rowIds.forEach(function(e){t.push(e.id)}),this.$confirm("确认关闭选中的合同吗?","提示",{type:"warning"}).then(function(){e.$api.staffContractAPI.close(t).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg?t.msg:"关闭失败,请重试",type:"error"})}).catch(function(t){e.$message({message:"关闭失败,请重试",type:"error"})})})},handleSelectionChange:function(e){console.log(e),this.rowIds=e,this.setBtn(e)},handleSizeChange:function(e){this.search_data.pagesize=e,this.getList()},handleCurrentChange:function(e){this.search_data.pageno=e,this.getList()},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},addClass:function(e){e.row,e.column;var t=e.rowIndex;e.columnIndex;return this.tableData[t].remainDays<0?"color:red":this.tableData[t].remainDays>=0&&this.tableData[t].remainDays<=30?"color:#d3c21d":void 0}}),watch:{}},p={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-button",{directives:[{name:"has",rawName:"v-has",value:"staffManagement:laborContract:add",expression:"'staffManagement:laborContract:add'"}],attrs:{type:"primary"},on:{click:function(t){return e.goAdd()}}},[e._v("新增")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"staffManagement:laborContract:remove",expression:"'staffManagement:laborContract:remove'"}],attrs:{type:"primary",disabled:e.btnOtherDisabled},on:{click:function(t){return e.remove()}}},[e._v("删除")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"staffManagement:laborContract:edit",expression:"'staffManagement:laborContract:edit'"}],attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:function(t){return e.edit()}}},[e._v("编辑")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"staffManagement:laborContract:close",expression:"'staffManagement:laborContract:close'"}],attrs:{type:"primary",disabled:e.btnOtherDisabled},on:{click:function(t){return e.close()}}},[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-cascader",{attrs:{clearable:"",options:e.depOptions,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:e.handleChange},model:{value:e.selectDeptId,callback:function(t){e.selectDeptId=t},expression:"selectDeptId"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"22%"},attrs:{label:"工号"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入"},model:{value:e.search_data.employeeCode,callback:function(t){e.$set(e.search_data,"employeeCode",t)},expression:"search_data.employeeCode"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"22%"},attrs:{label:"员工姓名"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入"},model:{value:e.search_data.employeeName,callback:function(t){e.$set(e.search_data,"employeeName",t)},expression:"search_data.employeeName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"22%"},attrs:{label:"合同状态"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.search_data.status,callback:function(t){e.$set(e.search_data,"status",t)},expression:"search_data.status"}},e._l(e.sexoptions,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.search()}}},[e._v("查询")])],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:"",fit:"",data:e.tableData,"cell-style":e.addClass,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"sort-change":e.sortChange,"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),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:"员工姓名"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return a.stopPropagation(),e.viewDetail(t.row)}}},[e._v(e._s(t.row.employeeName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{sortable:"custom","show-overflow-tooltip":"",prop:"signingDate",align:"center",label:"签订日期"}}),e._v(" "),a("el-table-column",{attrs:{sortable:"custom","show-overflow-tooltip":"",prop:"stopDate",align:"center",label:"终止日期"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"contractTerm",align:"center",label:"合同期限(年)"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"signingDeptName",align:"center",label:"签订单位"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"status",align:"center",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.status?a("div",[e._v("关闭")]):0==t.row.status&&t.row.remainDays<0?a("div",[e._v("已到期")]):0==t.row.status&&t.row.remainDays>0&&t.row.remainDays<=30?a("div",[e._v("即将到期")]):a("div",[e._v("正常")])]}}])}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"createTime",align:"center",label:"上传日期"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"userName",align:"center",label:"上传人"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",align:"center",label:"档案下载"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.download(t.row)}}},[e._v("下载")])]}}])})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.search_data.pageno,"page-sizes":e.pageSizes,"page-size":e.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)])},staticRenderFns:[]};var h=a("VU/8")(u,p,!1,function(e){a("8Utr")},"data-v-633dbacf",null);t.default=h.exports}}); |