合并
This commit is contained in:
@ -280,11 +280,42 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="打卡类型" prop="playCardStart" label-width="110px">
|
||||
<!-- <el-time-picker value-format="HH:mm" v-model="form.playCardStart" placeholder="请输入打卡开始时间" /> -->
|
||||
<el-time-select
|
||||
v-model="form.playCardStart"
|
||||
style="width: 100%"
|
||||
class="mr-4"
|
||||
placeholder="请输入打卡开始时间"
|
||||
value-format="HH:mm"
|
||||
start="00:00"
|
||||
step="00:15"
|
||||
end="23:59"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="工作日" prop="playCardEnd" label-width="110px">
|
||||
<!-- <el-time-picker value-format="HH:mm" v-model="form.playCardEnd" placeholder="请输入打卡结束时间" /> -->
|
||||
<el-time-select
|
||||
v-model="form.playCardEnd"
|
||||
style="width: 100%"
|
||||
:min-time="form.playCardStart"
|
||||
class="mr-4"
|
||||
placeholder="请输入打卡结束时间"
|
||||
value-format="HH:mm"
|
||||
start="00:00"
|
||||
step="00:15"
|
||||
end="23:59"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24" :offset="0">
|
||||
<el-form-item label="安全协议书" prop="securityAgreement">
|
||||
<file-upload v-model="form.securityAgreement" :limit="1" :file-type="['pdf']" :file-size="50" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
|
@ -1,7 +1,190 @@
|
||||
<template>
|
||||
<div>init</div>
|
||||
<div class="system-busSalaryDetails-container">
|
||||
<el-card shadow="hover">
|
||||
<div class="info_s">
|
||||
<div>
|
||||
<el-button type="success" @click="DownloadSalaryMOdel"
|
||||
><el-icon><Download /></el-icon>下载模版</el-button
|
||||
>
|
||||
<el-button type="primary" @click="uploadSalary"
|
||||
><el-icon><Upload /></el-icon>上传工资表</el-button
|
||||
>
|
||||
<el-button type="danger" :disabled="!(ids.length > 0)" @click="delSalary"
|
||||
><el-icon><Delete /></el-icon>删除</el-button
|
||||
>
|
||||
</div>
|
||||
<el-popover placement="top-start" title="" :width="200" trigger="hover" :content="DetailMoney + '元'">
|
||||
<template #reference>
|
||||
<el-tag class="m-2" size="large"
|
||||
><span style="font-size: 20px; cursor: pointer">金额:{{ totalMoney }}元</span></el-tag
|
||||
>
|
||||
</template>
|
||||
</el-popover>
|
||||
</div>
|
||||
<el-table v-loading="loading" @selection-change="handleSelectionChange" size="large" border :data="tableData.data" height="76vh">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" type="index" min-width="50px" />
|
||||
<el-table-column label="标题" align="center" prop="title" min-width="120px" />
|
||||
<el-table-column label="金额" align="center" prop="money" min-width="100px" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding" min-width="200px" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="handleView(scope.row)"
|
||||
><el-icon><View /></el-icon>详情</el-button
|
||||
>
|
||||
<el-button type="success" link @click="bookSalary(scope.row)"
|
||||
><el-icon><View /></el-icon>查看工资表</el-button
|
||||
>
|
||||
<el-button type="primary" link @click="DownloadSalary(scope.row)"
|
||||
><el-icon><Download /></el-icon>下载工资表</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!-- <uploadSalary ref="uploadSalaryRef" @busSalaryDetailsList="busSalaryDetailsList"></uploadSalary>
|
||||
<detail ref="detailRef" @busSalaryDetailsList="busSalaryDetailsList"></detail>
|
||||
<documentDetail ref="documentDetailRef" v-if="showDocumentDetail" @onClose="showDocumentDetail = false"></documentDetail> -->
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, getCurrentInstance, nextTick, toRaw } from 'vue';
|
||||
// import uploadSalary from '/@/views/system/salaryExcel/component/uploadSalary.vue';
|
||||
// import detail from '/@/views/system/salaryExcel/component/detail.vue';
|
||||
// import { readAllImportedListData, getTheSourceExcelAccordingToTheIdOfThePayroll, deletePayroll } from '/@/api/system/salaryExcel';
|
||||
// import documentDetail from '/@/views/OnlineEngineering/comm/documentsDetail/index.vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
const stores = useUserStoreHook();
|
||||
const { proxy } = <any>getCurrentInstance();
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
const loading = ref(false);
|
||||
const uploadSalaryRef = ref();
|
||||
const editRef = ref();
|
||||
const documentDetailRef = ref();
|
||||
const detailRef = ref();
|
||||
|
||||
const showAll = ref(false);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
|
||||
const showDocumentDetail = ref(false);
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0
|
||||
});
|
||||
const totalMoney = ref(0);
|
||||
const DetailMoney = ref(0);
|
||||
const ids = ref<any[]>([]);
|
||||
|
||||
const uploadSalary = () => {
|
||||
uploadSalaryRef.value.openDialog();
|
||||
};
|
||||
|
||||
const initTableData = () => {
|
||||
busSalaryDetailsList();
|
||||
};
|
||||
|
||||
const busSalaryDetailsList = () => {
|
||||
loading.value = true;
|
||||
readAllImportedListData().then((res: any) => {
|
||||
let list = res.data.list ?? [];
|
||||
let moneySum = 0;
|
||||
list.forEach((item) => {
|
||||
moneySum += parseInt(item.money);
|
||||
});
|
||||
DetailMoney.value = moneySum;
|
||||
totalMoney.value = moneySum >= 10000 ? (moneySum / 10000).toFixed(2) + '万' : moneySum;
|
||||
tableData.data = list;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
const handleView = (row: any) => {
|
||||
detailRef.value.openDialog(toRaw(row));
|
||||
};
|
||||
|
||||
const bookSalary = (row: any) => {
|
||||
getTheSourceExcelAccordingToTheIdOfThePayroll({ id: row.id }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
showDocumentDetail.value = true;
|
||||
let obj = {
|
||||
suffix: '.' + res.data.Suffix,
|
||||
name: res.data.Name,
|
||||
filenPathCoding: res.data.Path,
|
||||
id: row.id
|
||||
};
|
||||
nextTick(() => {
|
||||
documentDetailRef.value.openDialog(obj);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const DownloadSalary = (row: any) => {
|
||||
getTheSourceExcelAccordingToTheIdOfThePayroll({ id: row.id }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
window.open(res.data.Path, '_blank');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const DownloadSalaryMOdel = () => {
|
||||
window.open('http://zmkg.cqet.top:8899/file/masterMask/coryStorageTemplate/工资表模板.xlsx', '_blank');
|
||||
};
|
||||
|
||||
const delSalary = () => {
|
||||
ElMessageBox.confirm('是否删除选中数据', '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deletePayroll({ ids: ids.value }).then(() => {
|
||||
ElMessage.success('删除成功');
|
||||
busSalaryDetailsList();
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
const handleSelectionChange = (selection: any[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
// initTableData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.colBlock {
|
||||
display: block;
|
||||
}
|
||||
.colNone {
|
||||
display: none;
|
||||
}
|
||||
.system-busSalaryDetails-container {
|
||||
.el-tag__content {
|
||||
font-size: 20px !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
.info_s {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
input[type='file'] {
|
||||
display: none;
|
||||
}
|
||||
label {
|
||||
display: inline-block;
|
||||
background-color: #007bff; /*设置背景色*/
|
||||
color: #fff; /*设置字体颜色*/
|
||||
padding: 3px 10px; /*设置内边距*/
|
||||
border-radius: 5px; /*设置圆角*/
|
||||
cursor: pointer; /*将鼠标光标设置为手型*/
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user