上传
This commit is contained in:
@@ -38,15 +38,15 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="补贴" prop="butie">
|
||||
<el-input-number v-model="formData.butie" :min="0" :controls="false" />
|
||||
<el-form-item label="补贴" prop="allowanceSalary">
|
||||
<el-input-number v-model="formData.allowanceSalary" :min="0" :controls="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="满勤" prop="manqin">
|
||||
<el-input-number v-model="formData.manqin" :min="0" :controls="false" />
|
||||
<el-form-item label="满勤" prop="fullWorkSalary">
|
||||
<el-input-number v-model="formData.fullWorkSalary" :min="0" :controls="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
@@ -87,8 +87,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="其他应扣" prop="qitayingkou">
|
||||
<el-input-number v-model="formData.qitayingkou" :min="0" :controls="false" />
|
||||
<el-form-item label="其他应扣" prop="extraDeduct">
|
||||
<el-input-number v-model="formData.extraDeduct" :min="0" :controls="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -129,7 +129,7 @@ const open = async (row) => {
|
||||
try {
|
||||
formData.value = await SalaryApi.getSalaryDetail(row.id)
|
||||
if (!formData.value) {
|
||||
resetForm()
|
||||
resetForm(row.id)
|
||||
}
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
@@ -145,17 +145,19 @@ function getOptions() {
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
const resetForm = (id) => {
|
||||
formData.value = {
|
||||
employeeId: id,
|
||||
baseSalary: 0,
|
||||
planId: undefined,
|
||||
rewardSalary: 0,
|
||||
butie: 0,
|
||||
manqin: 0,
|
||||
allowanceSalary: 0,
|
||||
fullWorkSalary: 0,
|
||||
extraSalary: 0,
|
||||
socialDeduct: 0,
|
||||
accumulationFundDeduct: 0,
|
||||
qitayingkou: 0
|
||||
meritsSalary: 0,
|
||||
extraDeduct: 0
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
@@ -171,12 +173,7 @@ const submitForm = async () => {
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value
|
||||
if (formType.value === 'create') {
|
||||
await SalaryApi.createSalary(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await SalaryApi.updateSalary(data)
|
||||
}
|
||||
await SalaryApi.updateSalary(data)
|
||||
message.success('配置成功')
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
|
||||
Reference in New Issue
Block a user