|
@@ -1,34 +1,14 @@
|
|
<template>
|
|
<template>
|
|
<!-- 添加或修改菜单对话框 -->
|
|
<!-- 添加或修改菜单对话框 -->
|
|
- <el-dialog
|
|
|
|
- title="工资信息"
|
|
|
|
- v-model="visible"
|
|
|
|
- width="800px"
|
|
|
|
- append-to-body
|
|
|
|
- draggable
|
|
|
|
- :close-on-click-modal = "false"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-dialog title="工资信息" v-model="visible" width="800px" append-to-body draggable :close-on-click-modal="false">
|
|
<div style="padding: 8px 24px 16px 24px">
|
|
<div style="padding: 8px 24px 16px 24px">
|
|
<el-form size="small" label-width="50px">
|
|
<el-form size="small" label-width="50px">
|
|
<el-row :gutter="30">
|
|
<el-row :gutter="30">
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
- <el-table
|
|
|
|
- ref="dbTable"
|
|
|
|
- :data="detailList"
|
|
|
|
- size="small"
|
|
|
|
- border
|
|
|
|
- max-height="400"
|
|
|
|
- header-row-class-name="list-header-row"
|
|
|
|
- row-class-name="list-row"
|
|
|
|
- show-summary
|
|
|
|
- :summary-method="getSummaries"
|
|
|
|
- >
|
|
|
|
- <el-table-column
|
|
|
|
- type="index"
|
|
|
|
- label="序号"
|
|
|
|
- width="50"
|
|
|
|
- align="center"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-table ref="dbTable" :data="detailList" size="small" border max-height="400"
|
|
|
|
+ header-row-class-name="list-header-row" row-class-name="list-row" show-summary
|
|
|
|
+ :summary-method="getSummaries">
|
|
|
|
+ <el-table-column type="index" label="序号" width="50" align="center" />
|
|
<el-table-column label="员工姓名" width="80" align="center">
|
|
<el-table-column label="员工姓名" width="80" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ scope.row.employeeName }}</span>
|
|
<span>{{ scope.row.employeeName }}</span>
|
|
@@ -45,127 +25,64 @@
|
|
<span>{{}}</span>
|
|
<span>{{}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
- <el-table-column
|
|
|
|
- label="应发工资"
|
|
|
|
- width="80"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="planSalary"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="应发工资" width="80" header-align="center" align="right" prop="planSalary">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ rowNum(scope.row.planSalary) }}</span>
|
|
<span>{{ rowNum(scope.row.planSalary) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="实发工资"
|
|
|
|
- width="80"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="actuallySalary"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="实发工资" width="80" header-align="center" align="right" prop="actuallySalary">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ rowNum(scope.row.actuallySalary) }}</span>
|
|
<span>{{ rowNum(scope.row.actuallySalary) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column
|
|
|
|
- label="奖金及其他"
|
|
|
|
- width="100"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="bonusAmount"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="奖金及其他" width="100" header-align="center" align="right" prop="bonusAmount">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ rowNum(scope.row.bonusAmount) }}</span>
|
|
<span>{{ rowNum(scope.row.bonusAmount) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="社保" align="center">
|
|
<el-table-column label="社保" align="center">
|
|
- <el-table-column
|
|
|
|
- label="养老保险"
|
|
|
|
- width="80"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="endowmentInsurance"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="养老保险" width="80" header-align="center" align="right" prop="endowmentInsurance">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ rowNum(scope.row.endowmentInsurance) }}</span>
|
|
<span>{{ rowNum(scope.row.endowmentInsurance) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="医疗保险"
|
|
|
|
- width="80"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="medicalInsurance"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="医疗保险" width="80" header-align="center" align="right" prop="medicalInsurance">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ rowNum(scope.row.medicalInsurance) }}</span>
|
|
<span>{{ rowNum(scope.row.medicalInsurance) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="失业险"
|
|
|
|
- width="80"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="unemploymentBenefit"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="失业险" width="80" header-align="center" align="right" prop="unemploymentBenefit">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ rowNum(scope.row.unemploymentBenefit) }}</span>
|
|
<span>{{ rowNum(scope.row.unemploymentBenefit) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="大病险"
|
|
|
|
- width="80"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="seriousIllnessInsurance"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="大病险" width="80" header-align="center" align="right"
|
|
|
|
+ prop="seriousIllnessInsurance">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ rowNum(scope.row.seriousIllnessInsurance) }}</span>
|
|
<span>{{ rowNum(scope.row.seriousIllnessInsurance) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="公积金"
|
|
|
|
- width="80"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="housingFund"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="公积金" width="80" header-align="center" align="right" prop="housingFund">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ rowNum(scope.row.housingFund) }}</span>
|
|
<span>{{ rowNum(scope.row.housingFund) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="个税"
|
|
|
|
- width="60"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="currentIndividualIncomeTax"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="个税" width="60" header-align="center" align="right"
|
|
|
|
+ prop="currentIndividualIncomeTax">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{
|
|
<span>{{
|
|
rowNum(scope.row.currentIndividualIncomeTax)
|
|
rowNum(scope.row.currentIndividualIncomeTax)
|
|
- }}</span>
|
|
|
|
|
|
+ }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="其它扣款"
|
|
|
|
- width="80"
|
|
|
|
- header-align="center"
|
|
|
|
- align="right"
|
|
|
|
- prop="otherCut"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="其它扣款" width="80" header-align="center" align="right" prop="otherCut">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ rowNum(scope.row.otherCut) }}</span>
|
|
<span>{{ rowNum(scope.row.otherCut) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="备注"
|
|
|
|
- width="60"
|
|
|
|
- align="center"
|
|
|
|
- prop="accidentInsurance"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="备注" width="60" align="center" prop="accidentInsurance">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ scope.row.accidentInsurance }}</span>
|
|
<span>{{ scope.row.accidentInsurance }}</span>
|
|
</template>
|
|
</template>
|
|
@@ -183,106 +100,111 @@
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-const { proxy } = getCurrentInstance();
|
|
|
|
-import { getSalaryDetail } from "@/api/business/production/detail";
|
|
|
|
-import { rowNum, numberToCurrencyNo } from "@/utils/index";
|
|
|
|
-
|
|
|
|
-/** 父组件传参 */
|
|
|
|
-const props = defineProps({
|
|
|
|
- getList: {
|
|
|
|
- type: Function,
|
|
|
|
- default: () => {},
|
|
|
|
- },
|
|
|
|
-});
|
|
|
|
-const { getList } = toRefs(props);
|
|
|
|
-/** 字典数组区 */
|
|
|
|
-const { develop_type } = proxy.useDict("develop_type");
|
|
|
|
-/** 表单抽屉 页变量 */
|
|
|
|
-const detailList = ref([]);
|
|
|
|
-const title = ref("");
|
|
|
|
-const loading = ref(false);
|
|
|
|
-const multiple = ref(true);
|
|
|
|
-const visible = ref(false);
|
|
|
|
-const editStatus = ref(false);
|
|
|
|
-const content = ref("");
|
|
|
|
-const isFullscreen = ref(false);
|
|
|
|
-const addDetailNum = ref(1);
|
|
|
|
-const currentMember = {};
|
|
|
|
-const provinces = ref(proxy.region.getProvinces());
|
|
|
|
-provinces.value.unshift({ code: "", name: "全部" });
|
|
|
|
-const cities = ref([]);
|
|
|
|
-const districts = ref([]);
|
|
|
|
-
|
|
|
|
-const sourceCategories = ref([]);
|
|
|
|
-
|
|
|
|
-const addType = ref(1);
|
|
|
|
-
|
|
|
|
-watch(addType, (value) => {
|
|
|
|
- switch (value) {
|
|
|
|
- case "1":
|
|
|
|
- break;
|
|
|
|
- case "2":
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
-});
|
|
|
|
-
|
|
|
|
-const webHost = import.meta.env.VITE_APP_BASE_API;
|
|
|
|
-
|
|
|
|
-const followQuery = ref({});
|
|
|
|
-
|
|
|
|
-/*********************** 表单页方法 ****************************/
|
|
|
|
-
|
|
|
|
-/** 抽屉打开 */
|
|
|
|
-function open(data) {
|
|
|
|
- console.log("工资open");
|
|
|
|
- getSalaryDetail(data).then((response) => {
|
|
|
|
- if (response.data) {
|
|
|
|
- detailList.value = response.data.details;
|
|
|
|
- content.value = response.data.content;
|
|
|
|
|
|
+ const { proxy } = getCurrentInstance();
|
|
|
|
+ import { getSalaryDetail } from "@/api/business/production/detail";
|
|
|
|
+ import { rowNum, numberToCurrencyNo } from "@/utils/index";
|
|
|
|
+
|
|
|
|
+ /** 父组件传参 */
|
|
|
|
+ const props = defineProps({
|
|
|
|
+ getList: {
|
|
|
|
+ type: Function,
|
|
|
|
+ default: () => { },
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ const { getList } = toRefs(props);
|
|
|
|
+ /** 字典数组区 */
|
|
|
|
+ const { develop_type } = proxy.useDict("develop_type");
|
|
|
|
+ /** 表单抽屉 页变量 */
|
|
|
|
+ const detailList = ref([]);
|
|
|
|
+ const title = ref("");
|
|
|
|
+ const loading = ref(false);
|
|
|
|
+ const multiple = ref(true);
|
|
|
|
+ const visible = ref(false);
|
|
|
|
+ const editStatus = ref(false);
|
|
|
|
+ const content = ref("");
|
|
|
|
+ const isFullscreen = ref(false);
|
|
|
|
+ const addDetailNum = ref(1);
|
|
|
|
+ const currentMember = {};
|
|
|
|
+ const provinces = ref(proxy.region.getProvinces());
|
|
|
|
+ provinces.value.unshift({ code: "", name: "全部" });
|
|
|
|
+ const cities = ref([]);
|
|
|
|
+ const districts = ref([]);
|
|
|
|
+
|
|
|
|
+ const sourceCategories = ref([]);
|
|
|
|
+
|
|
|
|
+ const addType = ref(1);
|
|
|
|
+
|
|
|
|
+ watch(addType, (value) => {
|
|
|
|
+ switch (value) {
|
|
|
|
+ case "1":
|
|
|
|
+ break;
|
|
|
|
+ case "2":
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
- visible.value = true;
|
|
|
|
});
|
|
});
|
|
-}
|
|
|
|
|
|
|
|
-function getSummaries(param) {
|
|
|
|
- const { columns, data } = param;
|
|
|
|
- const sums = [];
|
|
|
|
- columns.forEach((column, index) => {
|
|
|
|
- if (index === 0) {
|
|
|
|
- sums[index] = "合计";
|
|
|
|
- return;
|
|
|
|
- } else if (index === 1) {
|
|
|
|
- sums[index] = "";
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- const values = data.map((item) => Number(item[column.property]));
|
|
|
|
|
|
+ const webHost = import.meta.env.VITE_APP_BASE_API;
|
|
|
|
+
|
|
|
|
+ const followQuery = ref({});
|
|
|
|
+
|
|
|
|
+ /*********************** 表单页方法 ****************************/
|
|
|
|
+
|
|
|
|
+ /** 抽屉打开 */
|
|
|
|
+ function open(data) {
|
|
|
|
+ console.log("工资open");
|
|
|
|
+ getSalaryDetail(data).then((response) => {
|
|
|
|
+ if (response.data) {
|
|
|
|
+ detailList.value = response.data.details;
|
|
|
|
+ detailList.value.forEach((item) => {
|
|
|
|
+ if (item.individualIncomeTaxConfirm != undefined && item.currentIndividualIncomeTax != null) {
|
|
|
|
+ item.currentIndividualIncomeTax = item.individualIncomeTaxConfirm;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ content.value = response.data.content;
|
|
|
|
+ }
|
|
|
|
+ visible.value = true;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
- if (!values.every((value) => isNaN(value))) {
|
|
|
|
- sums[index] = values.reduce((prev, curr) => {
|
|
|
|
- const value = Number(curr);
|
|
|
|
- if (!isNaN(value)) {
|
|
|
|
- return (Number(prev) + Number(curr)).toFixed(2);
|
|
|
|
- } else {
|
|
|
|
- return Number(prev).toFixed(2);
|
|
|
|
- }
|
|
|
|
- }, 0);
|
|
|
|
- sums[index] = numberToCurrencyNo(sums[index]);
|
|
|
|
- } else {
|
|
|
|
- sums[index] = "";
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return sums;
|
|
|
|
-}
|
|
|
|
|
|
+ function getSummaries(param) {
|
|
|
|
+ const { columns, data } = param;
|
|
|
|
+ const sums = [];
|
|
|
|
+ columns.forEach((column, index) => {
|
|
|
|
+ if (index === 0) {
|
|
|
|
+ sums[index] = "合计";
|
|
|
|
+ return;
|
|
|
|
+ } else if (index === 1) {
|
|
|
|
+ sums[index] = "";
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ const values = data.map((item) => Number(item[column.property]));
|
|
|
|
+
|
|
|
|
+ if (!values.every((value) => isNaN(value))) {
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return (Number(prev) + Number(curr)).toFixed(2);
|
|
|
|
+ } else {
|
|
|
|
+ return Number(prev).toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index] = numberToCurrencyNo(sums[index]);
|
|
|
|
+ } else {
|
|
|
|
+ sums[index] = "";
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return sums;
|
|
|
|
+ }
|
|
|
|
|
|
-function init() {}
|
|
|
|
|
|
+ function init() { }
|
|
|
|
|
|
-// 暴露给父组件的方法
|
|
|
|
-defineExpose({
|
|
|
|
- open,
|
|
|
|
-});
|
|
|
|
-init();
|
|
|
|
|
|
+ // 暴露给父组件的方法
|
|
|
|
+ defineExpose({
|
|
|
|
+ open,
|
|
|
|
+ });
|
|
|
|
+ init();
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style></style>
|
|
<style></style>
|