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

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

@ -10,13 +10,51 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12" :offset="0"> <el-col :span="12" :offset="0">
<el-form-item label="导入奖金" size="normal"> <el-form-item label="导入奖金">
<UploadFile v-model="formData.files1" :limit="1" :isShowTip="false" /> <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-form-item>
</el-col> </el-col>
<el-col :span="12" :offset="0"> <el-col :span="12" :offset="0">
<el-form-item label="导入考勤" size="normal"> <el-form-item label="导入考勤" prop="files2">
<UploadFile v-model="formData.files2" :limit="1" :isShowTip="false" /> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -24,9 +62,7 @@
<template #footer> <template #footer>
<span> <span>
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" :disabled="formLoading" @click="handleSave"> <el-button type="primary" :disabled="formLoading" @click="handleSave"> 确认生成 </el-button>
</el-button>
</span> </span>
</template> </template>
</Dialog> </Dialog>
@ -39,10 +75,22 @@ const formData = ref({})
const formLoading = ref(false) const formLoading = ref(false)
const rules = {} const rules = {
yearmonth: { required: true, message: '年月不可为空', trigger: 'blur,change' },
files2: { required: true, message: '考勤文件不可为空', trigger: 'blur,change' }
}
function open() { function open() {
dialogVisible.value = true dialogVisible.value = true
resetForm()
}
function resetForm() {
formData.value = {
yearmonth: new Date().getFullYear(),
files1: '',
files2: ''
}
} }
defineExpose({ open }) defineExpose({ open })

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

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

Loading…
Cancel
Save