yxk_pc_mdh/gyhl/static/js/312.914469364ae82c29764b.js

1 line
8.5 KiB
JavaScript

webpackJsonp([312],{KV6W:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("mvHQ"),i=a.n(n),s=a("BO1k"),o=a.n(s),r=a("Dd8w"),l=a.n(r),c=a("NYxO"),d=(a("t4zo"),a("bzuE")),p={data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,contractType:1},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:"trainingContract_table",pictLoading:!1,formTableData:[],totalTransferAmount:0}},computed:{},mounted:function(){this.initData(),this.getList()},methods:l()({},Object(c.d)({removeTagNav:"tagNav/removeTagNav"}),{initData:function(){var t=this;this.$api.commonAPI.getDeptsTree().then(function(e){0===e.code&&(t.depOptions=e.data.children,t.setDeptList(t.depOptions))}).catch(function(t){console.log(t)})},setDeptList:function(t){var e=!0,a=!1,n=void 0;try{for(var i,s=o()(t);!(e=(i=s.next()).done);e=!0){var r=i.value;r.hasChildren?this.setDeptList(r.children):r.children=void 0}}catch(t){a=!0,n=t}finally{try{!e&&s.return&&s.return()}finally{if(a)throw n}}},setDefaultDept:function(){if(this.depOptions.length>0&&this.search_data.signingDept){var t=i()(this.search_data.signingDept),e=this.treeFindPath(this.depOptions,function(e){return e.id===t});this.selectDeptId=JSON.parse(i()(e))}},handleChange:function(t){this.search_data.signingDept=t[t.length-1],this.selectDeptId=t},treeFindPath:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!t)return[];var n=!0,i=!1,s=void 0;try{for(var r,l=o()(t);!(n=(r=l.next()).done);n=!0){var c=r.value;if(a.push(c.id),e(c))return a;if(c.children){var d=this.treeFindPath(c.children,e,a);if(d.length)return d}a.pop()}}catch(t){i=!0,s=t}finally{try{!n&&l.return&&l.return()}finally{if(i)throw s}}return[]},download:function(t){var e=this;console.log(t);var a={id:t.id,assocType:"CONTRACT_INFO_CONTENT",fileName:t.employeeName};console.log(a),this.$api.salesAPI.downloadByCusName(a).then(function(t){console.log(t),200==t.status?(window.open(t.request.responseURL),e.$message({message:"下载成功",type:"success"})):e.$message({message:t.msg,type:"error"})})},goAdd:function(){this.$router.push({path:"/staffContract/trainingContract_add",query:{t:Date.now()}})},edit:function(){var t=this.rowIds[0].id;this.$router.push({path:"/staffContract/trainingContract_add",query:{id:t,t:Date.now()}})},viewDetail:function(t){this.$router.push({path:"/staffContract/trainingContract_add",query:{id:t.id,t:Date.now()}})},search:function(){this.search_data.pageno=1,this.getList()},getList:function(){var t=this;this.pictLoading=!0,this.$api.staffContractAPI.pageList(this.search_data).then(function(e){t.pictLoading=!1,e.data?(t.total=e.data.totalRows,t.tableData=e.data.datas?e.data.datas:[],t.tableData.forEach(function(t){t.createTime=/\d{4}-\d{1,2}-\d{1,2}/g.exec(t.createTime),t.signingDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(t.signingDate),t.stopDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(t.stopDate)})):(t.total=0,t.tableData=[])}).catch(function(t){console.log(t)})},remove:function(){var t=this,e=[];this.rowIds.forEach(function(t){e.push(t.id)}),this.$confirm("确认删除选中的项吗?","提示",{type:"warning"}).then(function(){t.$api.staffContractAPI.batchRemove(e).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getList()):t.$message({message:e.msg?e.msg:"删除失败,请重试",type:"error"})}).catch(function(e){t.$message({message:"删除失败,请重试",type:"error"})})})},handleSelectionChange:function(t){console.log(t),this.rowIds=t,this.setBtn(t)},handleSizeChange:function(t){this.search_data.pagesize=t,this.getList()},handleCurrentChange:function(t){this.search_data.pageno=t,this.getList()},setBtn:function(t){var e=!0,a=!0;t.length>0?(a=!1,1==t.length&&(e=!1)):(e=!0,a=!0),this.btnOtherDisabled=a,this.btnDelDisabled=e}}),watch:{}},h={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sys-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"staffManagement:trainingContract:add",expression:"'staffManagement:trainingContract:add'"}],attrs:{type:"primary"},on:{click:function(e){return t.goAdd()}}},[t._v("新增")]),t._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"staffManagement:trainingContract:remove",expression:"'staffManagement:trainingContract:remove'"}],attrs:{type:"primary",disabled:t.btnOtherDisabled},on:{click:function(e){return t.remove()}}},[t._v("删除")]),t._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"staffManagement:trainingContract:edit",expression:"'staffManagement:trainingContract:edit'"}],attrs:{type:"primary",disabled:t.btnDelDisabled},on:{click:function(e){return t.edit()}}},[t._v("编辑")])],1),t._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:t.depOptions,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:t.handleChange},model:{value:t.selectDeptId,callback:function(e){t.selectDeptId=e},expression:"selectDeptId"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"工号"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入"},model:{value:t.search_data.employeeCode,callback:function(e){t.$set(t.search_data,"employeeCode",e)},expression:"search_data.employeeCode"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"员工姓名"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入"},model:{value:t.search_data.employeeName,callback:function(e){t.$set(t.search_data,"employeeName",e)},expression:"search_data.employeeName"}})],1)],1),t._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.search()}}},[t._v("查询")])],1)],1)])],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"",data:t.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"employeeCode",align:"center",label:"员工工号"}}),t._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"employeeName",align:"center",label:"员工姓名"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return a.stopPropagation(),t.viewDetail(e.row)}}},[t._v(t._s(e.row.employeeName))])]}}])}),t._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"signingDate",align:"center",label:"签订日期"}}),t._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"stopDate",align:"center",label:"终止日期"}}),t._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"contractTerm",align:"center",label:"合同期限"}}),t._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"signingDeptName",align:"center",label:"签订单位"}}),t._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"createTime",align:"center",label:"上传日期"}}),t._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"userName",align:"center",label:"上传人"}}),t._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",align:"center",label:"档案下载"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.download(e.row)}}},[t._v("下载")])]}}])})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.search_data.pageno,"page-sizes":t.pageSizes,"page-size":t.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)])},staticRenderFns:[]};var u=a("VU/8")(p,h,!1,function(t){a("j5Ff")},"data-v-83964376",null);e.default=u.exports},j5Ff:function(t,e){}});