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("确认
|