|
@@ -36,7 +36,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="24">
|
|
|
<a-form-model-item label="文件" >
|
|
|
- <a-upload name="file" :multiple="false" action="/jeecg-boot/salary/salaryAttendance/importExcel" :before-upload="beforeUpload" @change="handleUploadChange" :data="{'yearWithMonth':formState.yearWithMonth,'type':formState.type,'id':this.checked}" :headers="tokenHeader" >
|
|
|
+ <a-upload name="file" :multiple="false" :showUploadList="showUploadList" action="/jeecg-boot/salary/salaryAttendance/importExcel" :before-upload="beforeUpload" @change="handleUploadChange" :data="{'yearWithMonth':formState.yearWithMonth,'type':formState.type,'id':this.checked}" :headers="tokenHeader" >
|
|
|
<a-button> <a-icon type="upload" /> 上 传 </a-button>
|
|
|
</a-upload>
|
|
|
</a-form-model-item>
|
|
@@ -67,6 +67,7 @@
|
|
|
type:'考勤表',
|
|
|
yearWithMonth:moment().subtract(1, 'months')
|
|
|
},
|
|
|
+ showUploadList:true,
|
|
|
dataSource: [{}],
|
|
|
visible:false,
|
|
|
loading:false,
|
|
@@ -98,10 +99,12 @@
|
|
|
},
|
|
|
handleUploadChange({ file, fileList }){
|
|
|
if (file.status === 'done'&&file.response.success) {
|
|
|
+ this.showUploadList = true
|
|
|
this.$message.success(file.response.message)
|
|
|
this.$emit('ok')
|
|
|
this.handleCancel()
|
|
|
}else if(file.status === 'done'&&!file.response.success){
|
|
|
+ this.showUploadList = false
|
|
|
this.$message.error(file.response.message)
|
|
|
}
|
|
|
|