dev-cl
qsh 4 months ago
parent ab2da33ebc
commit 274fc2f435
  1. 7
      src/components/UploadFile/src/UploadFile.vue
  2. 6
      src/views/Finance/Salary/Comp/DialogSalary.vue
  3. 64
      src/views/Home/Salary/Comp/DialogCreateSalary.vue
  4. 28
      src/views/Home/Salary/index.vue
  5. 23
      src/views/Pers/Employee/Comp/DialogEmployee.vue

@ -22,7 +22,8 @@
class="upload-file-uploader"
>
<el-button type="primary"><Icon icon="ep:upload-filled" />选取文件</el-button>
<template v-if="isShowTip" #tip>
<template #tip>
<template v-if="isShowTip">
<div style="font-size: 12px">
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
</div>
@ -30,6 +31,8 @@
格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b> 的文件
</div>
</template>
<slot name="tip"></slot>
</template>
</el-upload>
</div>
</template>
@ -47,7 +50,7 @@ const props = defineProps({
// fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // , ['png', 'jpg', 'jpeg']
fileType: propTypes.array.def([]),
accept: propTypes.string.def('*'),
fileSize: propTypes.number.def(5), // (MB)
fileSize: propTypes.number.def(10), // (MB)
limit: propTypes.number.def(5), //
autoUpload: propTypes.bool.def(true), //
drag: propTypes.bool.def(false), //

@ -1,9 +1,9 @@
<template>
<Dialog v-model="dialogVisible" :title="dialogTitle" style="width: 600px">
<el-form :model="formData" ref="formRef" :rules="rules" label-width="80px">
<el-form-item label="生效日期" prop="validTime">
<el-form-item label="生效日期" prop="startDate">
<el-date-picker
v-model="formData.validTime"
v-model="formData.startDate"
type="date"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@ -116,7 +116,7 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formData = ref({})
const rules = {
validTime: { required: true, message: '生效日期不可为空', trigger: 'blur, change' },
startDate: { required: true, message: '生效日期不可为空', trigger: 'blur, change' },
baseSalary: { required: true, message: '基本工资不可为空', trigger: 'blur' }
}

@ -10,13 +10,51 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12" :offset="0">
<el-form-item label="导入奖金" size="normal">
<UploadFile v-model="formData.files1" :limit="1" :isShowTip="false" />
<el-form-item label="导入奖金">
<UploadFile
v-model="formData.files1"
:limit="1"
:fileType="['xls', 'xlsx']"
accept=".xls,.xlsx"
:isShowTip="false"
>
<template #tip>
<div>
<el-link
type="primary"
:underline="false"
href="https://ss-cloud.ahduima.com/1011/1808052748575576064.pdf"
target="_blank"
>
点击下载模板文件
</el-link>
</div>
</template>
</UploadFile>
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="导入考勤" size="normal">
<UploadFile v-model="formData.files2" :limit="1" :isShowTip="false" />
<el-form-item label="导入考勤" prop="files2">
<UploadFile
v-model="formData.files2"
:limit="1"
:fileType="['xls', 'xlsx']"
accept=".xls,.xlsx"
:isShowTip="false"
>
<template #tip>
<div>
<el-link
type="primary"
:underline="false"
href="https://ss-cloud.ahduima.com/1011/1808052748575576064.pdf"
target="_blank"
>
点击下载模板文件
</el-link>
</div>
</template>
</UploadFile>
</el-form-item>
</el-col>
</el-row>
@ -24,9 +62,7 @@
<template #footer>
<span>
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" :disabled="formLoading" @click="handleSave">
</el-button>
<el-button type="primary" :disabled="formLoading" @click="handleSave"> 确认生成 </el-button>
</span>
</template>
</Dialog>
@ -39,10 +75,22 @@ const formData = ref({})
const formLoading = ref(false)
const rules = {}
const rules = {
yearmonth: { required: true, message: '年月不可为空', trigger: 'blur,change' },
files2: { required: true, message: '考勤文件不可为空', trigger: 'blur,change' }
}
function open() {
dialogVisible.value = true
resetForm()
}
function resetForm() {
formData.value = {
yearmonth: new Date().getFullYear(),
files1: '',
files2: ''
}
}
defineExpose({ open })

@ -47,19 +47,19 @@
</template>
</el-table-column>
<el-table-column prop="dept" label="部门" min-width="90px" />
<el-table-column prop="job" label="职位" min-width="90px" />
<el-table-column prop="post" label="职位" min-width="90px" />
<el-table-column label="应发工资" align="center">
<el-table-column label="基本工资" min-width="90px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.jbgz"
v-model="row.baseSalary"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.jbgz }}</span>
<span v-else> {{ row.baseSalary }}</span>
</template>
</el-table-column>
<el-table-column label="补贴" min-width="90px">
@ -92,13 +92,13 @@
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.jiangjin"
v-model="row.rewardSalary"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.jiangjin }}</span>
<span v-else> {{ row.rewardSalary }}</span>
</template>
</el-table-column>
<el-table-column label="满勤" min-width="90px">
@ -118,13 +118,13 @@
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.jbgz"
v-model="row.extraSalary"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.jbgz }}</span>
<span v-else> {{ row.extraSalary }}</span>
</template>
</el-table-column>
<el-table-column label="小计" min-width="90px" />
@ -134,13 +134,13 @@
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.jbgz"
v-model="row.meritsSalary"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.jbgz }}</span>
<span v-else> {{ row.meritsSalary }}</span>
</template>
</el-table-column>
<el-table-column label="请假" min-width="90px">
@ -202,26 +202,26 @@
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.jbgz"
v-model="row.accumulationFundDeduct"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.jbgz }}</span>
<span v-else> {{ row.accumulationFundDeduct }}</span>
</template>
</el-table-column>
<el-table-column label="社保" min-width="90px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.jbgz"
v-model="row.socialDeduct"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.jbgz }}</span>
<span v-else> {{ row.socialDeduct }}</span>
</template>
</el-table-column>
<el-table-column label="所得税" min-width="90px">
@ -252,7 +252,7 @@
</el-table-column>
<el-table-column label="小计" min-width="90px" />
</el-table-column>
<el-table-column label="实发工资" fixed="right" />
<el-table-column label="实发工资" fixed="right" width="90" />
<el-table-column label="操作" fixed="right" width="200">
<template #default="{ row }">
<el-button

@ -24,14 +24,8 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="入职日期" prop="hireDate">
<el-date-picker
v-model="formData.hireDate"
type="date"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
placeholder="选择日期时间"
/>
<el-form-item label="组织部门" prop="dept">
<el-input v-model="formData.dept" placeholder="请输入部门" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -108,6 +102,19 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="入职日期" prop="hireDate">
<el-date-picker
v-model="formData.hireDate"
type="date"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
placeholder="选择日期时间"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="备注">

Loading…
Cancel
Save