siontion 3 months ago
commit 6ea888694f

@ -96,6 +96,10 @@ export const getUsersalaryPage = (params: PageParam) => {
export const exportsalaryexcel = (params) => {
return request.download({ url: '/system/user/export-salary-excel', params })
}
//导出明细/biz/task-report/export-salary-detail-excel
export const exportsalaryDetailexcel = (params) => {
return request.download({ url: '/biz/task-report/export-salary-detail-excel', params })
}
//列表增加明细编辑接口/biz/salary-month/save
export const updateUserSalaryMonth = async (data) => {
return await request.post({ url: `/biz/salary-month/save`, data })

@ -62,6 +62,15 @@
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
<el-button
type="success"
plain
@click="handleExportDetail"
:loading="exportLoading"
v-hasPermi="['heli:plan:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出明细
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
@ -275,9 +284,37 @@ const handleExport = async () => {
}
}
//handleExportDetail
const handleExportDetail = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await UserApi.exportsalaryDetailexcel(queryParams)
download.excel(data, '员工工资明细.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
// Date
const now = new Date()
//
const year = now.getFullYear()
// getMonth() 0 +1
const month = (now.getMonth() + 1).toString().padStart(2, '0')
// "YYYYMM"
const formattedDate = `${year}${month}`
queryParams.yearMonth = formattedDate
})
//

@ -32,6 +32,7 @@ const queryParams: Required<any> = {
dispatchType: 'PRODUCTION', //
isReport: 1, //
// dispatchStatus: 2
projectSubCodeOrName: undefined
}
const dataList = ref([])
const total = ref()
@ -107,17 +108,9 @@ const onRefresherrefresh = async () => {
const searchVal = ref('')
// const dataListDefault = ref([])
const handleSearch = async () => {
console.log(searchVal)
// const code = searchVal.value
// if (code) {
// dataListDefault.value = dataList.value
// dataList.value = dataList.value.filter((e) => {
// return e.code == code
// })
// } else {
// dataList.value = dataListDefault.value
// }
const code = searchVal.value
queryParams.projectSubCodeOrName = code
getListData()
}
const flag = ref(true)
const selectedItemId = ref([])
@ -396,7 +389,7 @@ const handleOk = async () => {
.statusText {
position: absolute;
right: 30rpx;
top: 100rpx;
top: 73rpx;
border-radius: 10rpx;
font-size: 24rpx;
padding: 10rpx 30rpx;
@ -610,7 +603,7 @@ const handleOk = async () => {
top: 17rpx;
// background: linear-gradient(142deg, #feb34a 14%, #fe9b12 83%);
position: absolute;
right: 180rpx;
right: 50rpx;
padding: 5rpx 10rpx;
border-radius: 10rpx;
font-size: 24rpx;

Loading…
Cancel
Save