|
@@ -183,13 +183,13 @@
|
|
|
postAction('/salary/salaryManagement/generatePayroll',data).then((res) => {
|
|
|
if (res.success) {
|
|
|
if(res.data&&res.data.ZZ){
|
|
|
- that.handleDownload(res.data.ZZ,that.formState.type,"正织");
|
|
|
+ that.handleDownload(res.data.ZZ,that.formState.type,"正织",data);
|
|
|
}
|
|
|
if(res.data&&res.data.MFY){
|
|
|
- that.handleDownload(res.data.MFY,that.formState.type,"马菲羊");
|
|
|
+ that.handleDownload(res.data.MFY,that.formState.type,"马菲羊",data);
|
|
|
}
|
|
|
if(res.data&&res.data.NBSY){
|
|
|
- that.handleDownload(res.data.NBSY,that.formState.type,"宁波森语");
|
|
|
+ that.handleDownload(res.data.NBSY,that.formState.type,"宁波森语",data);
|
|
|
}
|
|
|
this.$message.success(res.message);
|
|
|
this.handleCancel()
|
|
@@ -201,7 +201,7 @@
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
- handleDownload(id,type,name){
|
|
|
+ handleDownload(id,type,name,datas){
|
|
|
downFile('/salary/salaryManagement/exportXls2',{id:id,type:type}).then(data => {
|
|
|
|
|
|
this.$message.success(name+type+"数据导出中,请稍等");
|
|
@@ -213,9 +213,11 @@
|
|
|
|
|
|
let datePar = "";
|
|
|
if(type == '年休工资单'){
|
|
|
- datePar = moment(this.formState.yearWith).format('YYYY');
|
|
|
+ datePar = datas.yearWith;
|
|
|
+ // datePar = moment(data.yearWith).format('YYYY');
|
|
|
}else{
|
|
|
- datePar = moment(this.formState.yearWithMonth).format('YYYY-MM');
|
|
|
+ datePar = datas.yearWithMonth;
|
|
|
+ // datePar = moment(data.yearWithMonth).format('YYYY-MM');
|
|
|
}
|
|
|
|
|
|
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|