Merge branch 'main' of https://gitee.com/hdka/fad_oa
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 上传弹窗 -->
|
||||
<el-dialog
|
||||
<el-dialog
|
||||
title="薪资计算"
|
||||
:visible.sync="uploadVisible"
|
||||
width="30%"
|
||||
@@ -23,7 +23,7 @@
|
||||
:disabled="isUploading">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="薪资文件" required>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
@@ -38,15 +38,16 @@
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="uploadVisible = false" :disabled="isUploading">取消</el-button>
|
||||
<el-button @click="handleUpload" :disabled="fileList.length === 0">确认上传</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSubmit"
|
||||
:loading="isUploading"
|
||||
:disabled="!filePath">
|
||||
:disabled="isUploading"
|
||||
>
|
||||
{{ isUploading ? '计算中...' : '开始计算' }}
|
||||
</el-button>
|
||||
</span>
|
||||
@@ -84,7 +85,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<div class="summary">
|
||||
<span>合计人数:{{currentResult.length}} 人</span>
|
||||
<span class="total-amount">总金额:¥ {{totalAmount}}</span>
|
||||
@@ -109,6 +110,12 @@ export default {
|
||||
currentMonth: '',
|
||||
historyData: [],
|
||||
filePath: '',
|
||||
query:{
|
||||
pageSize:10,
|
||||
pageNum:1,
|
||||
payTime:"2025-03-01"
|
||||
},
|
||||
StaffSalaryList:[]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -131,15 +138,21 @@ export default {
|
||||
this.getHistoryData(firstDayStr)
|
||||
},
|
||||
methods: {
|
||||
getStaffList(){
|
||||
listStaff(this.query).then(res => {
|
||||
this.StaffSalaryList = res.rows
|
||||
console.log(this.StaffSalaryList)
|
||||
})
|
||||
},
|
||||
showUploadDialog() {
|
||||
this.uploadVisible = true
|
||||
},
|
||||
|
||||
|
||||
handleFileChange(file, fileList) {
|
||||
// 限制单个文件上传
|
||||
this.fileList = [fileList[fileList.length - 1]]
|
||||
},
|
||||
|
||||
|
||||
async handleSubmit() {
|
||||
try {
|
||||
this.isUploading = true
|
||||
@@ -166,12 +179,12 @@ export default {
|
||||
this.isUploading = false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 上传文件
|
||||
async handleUpload() {
|
||||
const formData = new FormData()
|
||||
formData.append('file', this.fileList[0].raw)
|
||||
|
||||
|
||||
const { data } = await uploadOssFile(formData)
|
||||
|
||||
const filePath = '/data' + data.url.split('/data')[1];
|
||||
@@ -183,7 +196,7 @@ export default {
|
||||
this.fileList = []
|
||||
this.month = ''
|
||||
},
|
||||
|
||||
|
||||
showDetail(row) {
|
||||
// 查看历史详情逻辑
|
||||
console.log('查看详情', row)
|
||||
@@ -251,4 +264,4 @@ export default {
|
||||
.upload-demo {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user