1 line
8.5 KiB
JavaScript
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:fu
|