|
@@ -11,44 +11,49 @@
|
|
|
>
|
|
|
<template #footer>
|
|
|
<a-button @click="handleCancel" style="margin-left: 8px;">取消</a-button>
|
|
|
- <a-button @click="handleOk" style="margin-left: 8px;">确认</a-button>
|
|
|
+ <a-button @click="handleOk" type="primary" style="margin-left: 8px;">确认</a-button>
|
|
|
</template>
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form-model layout="inline" ref="form" :model="formState" >
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="24" >
|
|
|
<a-form-model-item label="姓名" :labelCol="{offset: 2}">
|
|
|
- <a-input placeholder="请输入" v-model="formState.name" />
|
|
|
+ <a-input placeholder="请输入" v-model="formState.name" disabled/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="24" >
|
|
|
<a-form-model-item label="组织" prop="name" :labelCol="{offset: 2}">
|
|
|
- <a-input v-model="formState.organization" />
|
|
|
+ <a-input v-model="formState.orgName" disabled/>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="24" >
|
|
|
+ <a-form-model-item label="部门" prop="name" :labelCol="{offset: 2}">
|
|
|
+ <a-input v-model="formState.sysOrgCode" disabled/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="24" >
|
|
|
<a-form-model-item label="当前薪资" prop="totalNum" >
|
|
|
- <a-input placeholder="" v-model="formState.currentSalary" />
|
|
|
+ <a-input placeholder="" v-model="formState.beforeAdjustment" disabled/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="24">
|
|
|
<a-form-model-item label="加薪" :labelCol="{offset: 2}">
|
|
|
- <a-input placeholder="请输入" v-model="formState.salaryIncrease" />
|
|
|
+ <a-input placeholder="请输入" v-model="formState.salaryIncrease" @change="changeSalaryIncrease" :disabled="formState.salaryReduction!==''&&formState.salaryReduction"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="24">
|
|
|
<a-form-model-item label="减薪" :labelCol="{offset: 2}">
|
|
|
- <a-input placeholder="请输入" v-model="formState.salaryReduction" />
|
|
|
+ <a-input placeholder="请输入" v-model="formState.salaryReduction" @change="changeSalaryReduction" :disabled="formState.salaryIncrease!==''&&formState.salaryIncrease"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="24">
|
|
|
<a-form-model-item label="调后薪资">
|
|
|
- <a-input placeholder="请输入" v-model="formState.salaryReduction" />
|
|
|
+ <a-input placeholder="请输入" v-model="formState.afterAdjustment" disabled/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="24" >
|
|
|
<a-form-model-item label="调整说明" class="nresume" style="height:100px !important">
|
|
|
- <a-input type="textarea" placeholder="请输入" v-model="formState.adjustedSalary" />
|
|
|
+ <a-input type="textarea" placeholder="请输入" v-model="formState.remarks" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -62,7 +67,7 @@
|
|
|
import moment from 'moment'
|
|
|
import pick from 'lodash.pick'
|
|
|
import { FormTypes } from '@/utils/JEditableTableUtil'
|
|
|
- import { putAction,getAction } from '@/api/manage'
|
|
|
+ import { putAction,getAction,postAction } from '@/api/manage'
|
|
|
export default {
|
|
|
name: 'ChangeBasicSalary',
|
|
|
components: {
|
|
@@ -71,7 +76,6 @@
|
|
|
data() {
|
|
|
return {
|
|
|
formState:{},
|
|
|
- dataSource: [{}],
|
|
|
visible:false,
|
|
|
loading:false,
|
|
|
}
|
|
@@ -85,7 +89,27 @@
|
|
|
this.visible = false
|
|
|
},
|
|
|
handleOk(){
|
|
|
-
|
|
|
+ this.loading = true
|
|
|
+ postAction('/salary/salaryChangeRecord/saveSalaryChangeRecord', this.formState).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('添加成功!');
|
|
|
+ this.handleCancel()
|
|
|
+ this.$emit('ok')
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getData(record){
|
|
|
+ this.formState = record
|
|
|
+ },
|
|
|
+ changeSalaryIncrease(){
|
|
|
+ this.formState.afterAdjustment=Number(this.formState.beforeAdjustment)+Number(this.formState.salaryIncrease)
|
|
|
+ },
|
|
|
+ changeSalaryReduction(){
|
|
|
+ this.formState.afterAdjustment=Number(this.formState.beforeAdjustment)-Number(this.formState.salaryReduction)
|
|
|
}
|
|
|
}
|
|
|
}
|