|
@@ -209,7 +209,6 @@
|
|
|
<el-button size="mini" type="default" v-if="scope.row.roleName != $t('role.superAdministrator') && user.userNameNeedTranslate != 1" @click="resetPwd(scope.row)">{{ $t('reset') }}</el-button>
|
|
|
<!-- <el-button size="mini" type="primary" v-if="scope.row.roleName != $t('role.superAdministrator')" @click="openInsertDialog(scope.row)">{{ $t('bian-ji') }}</el-button> -->
|
|
|
<el-button size="mini" type="primary" @click="openInsertDialog(scope.row, scope.row.roleName)">{{ $t('bian-ji') }}</el-button>
|
|
|
- <!-- <el-button size="mini" type="primary" v-if="scope.row.roleName == $t('role.superAdministrator')" @click="openInsertDialog1(scope.row)">{{ $t('bian-ji') }}</el-button> -->
|
|
|
<!-- <el-button size="mini" type="danger" v-if="scope.row.roleName != $t('role.superAdministrator')" @click="deleteUser(scope.row)">删除</el-button> -->
|
|
|
<el-button size="mini" type="default" v-if="scope.row.roleName != $t('role.superAdministrator') && scope.row.isActive==1" @click="showDeactiveDialog(scope.row)">{{ $t('ting-yong') }}</el-button>
|
|
|
<el-button size="mini" type="success" v-if="scope.row.roleName != $t('role.superAdministrator') && scope.row.isActive==0" @click="setActive(scope.row, 1)">{{ $t('enable') }}</el-button>
|
|
@@ -503,58 +502,6 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <!-- 编辑超级管理员的Dialog -->
|
|
|
- <el-dialog :title="$t('editorialstaff')" :visible.sync="dialogVisible1" width="550px" >
|
|
|
- <el-form ref="form1" :model="insertForm" :rules="rules" label-width="80px">
|
|
|
- <el-form-item :label="$t('lable.name')" prop="name">
|
|
|
- <el-input v-model="insertForm.name" :placeholder="$t('peaseenterthe')" clearable :disabled="user.userNameNeedTranslate == '1'"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="$t('phone')" prop="phone">
|
|
|
- <el-input v-model="insertForm.phone" :placeholder="$t('peaseenterthe')" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="$t('Worknumber')" prop="jobNumber">
|
|
|
- <el-input v-model="insertForm.jobNumber" :placeholder="$t('peaseenterthe')" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="$t('payway')" prop="salaryType" v-if="permissions.structurePersonnel">
|
|
|
- <el-radio-group v-model="insertForm.salaryType" @change="onSalaryTypeChange">
|
|
|
- <el-radio :label="0" >{{ $t('fixedmonthlycost') }}</el-radio>
|
|
|
- <el-radio :label="1">{{ $t('hourlywages') }}</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="$t('monthcost')" prop="monthCost" v-if="insertForm.salaryType == 0 && permissions.structurePersonnel" >
|
|
|
- <el-input v-model="insertForm.monthCost" id="monthCost" @input="oninput" @keyup.native="restrictNumber('monthCost')" :placeholder="$t('yuechengben')" clearable></el-input>
|
|
|
- <span style="color:orange;font-size:12px;">{{ $t('yuegongzuoo') }}{{timeType.monthDays}}{{ $t('time.day') }},{{$t('meitian')}}{{timeType.allday}}{{ $t('xiaoshi') }}</span>
|
|
|
- <el-link :underline="false" style="color:blue;font-size:12px;margin-left:7px;" href="#/timetype">{{ $t('modifyworkinghours') }}</el-link>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="$t('hourlywage')" prop="cost" v-if="permissions.structurePersonnel">
|
|
|
- <el-input v-model="insertForm.cost" id="cost" :disabled="insertForm.salaryType == 0" @keyup.native="restrictNumber4('cost')" style="width:120px;"
|
|
|
- :placeholder="$t('yuechengbenxiaoshi')" clearable></el-input>
|
|
|
- <span style="margin-left:25px;">{{ $t('effectivedate') }}</span>
|
|
|
- <el-date-picker v-model="insertForm.costApplyDate" value-format="yyyy-MM-dd"></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="$t('lable.department')" prop="departmentId">
|
|
|
- <el-cascader v-model="insertForm.departmentId"
|
|
|
- :placeholder="$t('qing-xuan-ze-bu-men')"
|
|
|
- style="width: 100%"
|
|
|
- :options="option"
|
|
|
- :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false"
|
|
|
- clearable></el-cascader>
|
|
|
- </el-form-item>
|
|
|
- <!-- <el-form-item :label="$t('immediatesuperior')">
|
|
|
- <el-select v-model="insertForm.superiorId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" filterable clearable>
|
|
|
- <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id" :disabled="item.id == insertForm.id">
|
|
|
- <span style="float: left">{{item.name}}</span>
|
|
|
- <span style="float: right; color: #8492a6; font-size: 13px">{{item.departmentName}}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item> -->
|
|
|
- </el-form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogVisible1=false">{{ $t('btn.cancel') }}</el-button>
|
|
|
- <el-button type="primary" @click="submitInsert1" :loading="submitLoading">{{ $t('btn.submit') }}</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
<el-dialog :title="$t('historicalpersonnelcost')" :visible.sync="userSalaryListDialog" width="550px" >
|
|
|
<el-table :data="userSalaryList" highlight-current-row v-loading="listLoading" height="300px" style="width: 100%;">
|
|
|
<el-table-column prop="userName" :label="$t('lable.name')" >
|
|
@@ -1005,7 +952,6 @@ export default {
|
|
|
managementFormRou: {
|
|
|
name: [{ required: true, message: this.$t('pleaseenterprofessionalcertificate'), trigger: "blur" }],
|
|
|
},
|
|
|
- dialogVisible1: false,
|
|
|
|
|
|
departmentVisible: false,
|
|
|
depTitle: "",
|
|
@@ -2766,7 +2712,7 @@ export default {
|
|
|
type: "success",
|
|
|
});
|
|
|
this.dialogVisible = false;
|
|
|
- this.getUser();
|
|
|
+ this.getUser(this.insertForm.id == null?1:this.page);
|
|
|
this.getUsers();
|
|
|
} else {
|
|
|
this.$message({
|
|
@@ -2845,7 +2791,7 @@ export default {
|
|
|
type: "success",
|
|
|
});
|
|
|
//重新读取列表
|
|
|
- this.getUser();
|
|
|
+ this.getUser(this.page);
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -2864,142 +2810,6 @@ export default {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
-
|
|
|
- // 修改老板的成本
|
|
|
- openInsertDialog1(row) {
|
|
|
- var list1 = JSON.parse(JSON.stringify(row)),
|
|
|
- arr1 = [],
|
|
|
- array1 = [];
|
|
|
- if (list1.departmentCascade != "0" && list1.departmentCascade != null) {
|
|
|
- if (list1.departmentCascade.indexOf(",") > -1) {
|
|
|
- arr1 = list1.departmentCascade.split(",");
|
|
|
- } else {
|
|
|
- arr1 = [].concat(list1.departmentCascade);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- for (var i in arr1) {
|
|
|
- array1.push(parseInt(arr1[i]));
|
|
|
- }
|
|
|
- this.http.post(
|
|
|
- "/user/getUserInfo",
|
|
|
- {
|
|
|
- userId: list1.id,
|
|
|
- },
|
|
|
- (res) => {
|
|
|
- if (res.code == "ok") {
|
|
|
- this.insertForm = {
|
|
|
- id: res.data.id,
|
|
|
- name: res.data.name,
|
|
|
- phone: res.data.phone,
|
|
|
- roleId: res.data.roleId,
|
|
|
- monthCost: res.data.monthCost,
|
|
|
- cost: res.data.cost,
|
|
|
- departmentId: array1.reverse(),
|
|
|
- salaryType: res.data.salaryType,
|
|
|
- costApplyDate: res.data.costApplyDate,
|
|
|
- inductionDate: res.data.inductionDate,
|
|
|
- position: res.data.position,
|
|
|
- certJson: res.data.certList,
|
|
|
- plateMap: {},
|
|
|
- superiorId: res.data.superiorId,
|
|
|
- jobNumber: res.data.jobNumber,
|
|
|
- };
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- (error) => {
|
|
|
- this.listLoading = false;
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- }
|
|
|
- );
|
|
|
- // console.log(list1)
|
|
|
- // this.insertForm = {
|
|
|
- // id: list1.id,
|
|
|
- // name: list1.name,
|
|
|
- // phone: list1.phone,
|
|
|
- // roleId: list1.roleId,
|
|
|
- // monthCost:list1.monthCost,
|
|
|
- // cost: list1.cost,
|
|
|
- // departmentId: array1.reverse(),
|
|
|
- // salaryType: list1.salaryType,
|
|
|
- // name: list1.name,
|
|
|
- // position: list1.position,
|
|
|
- // certJson: list1.certJson
|
|
|
- // };
|
|
|
- this.dialogVisible1 = true;
|
|
|
- },
|
|
|
-
|
|
|
- submitInsert1() {
|
|
|
- var form = {};
|
|
|
- this.$refs.form1.validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.submitLoading = true;
|
|
|
- form = {
|
|
|
- id: this.insertForm.id,
|
|
|
- name: this.insertForm.name,
|
|
|
- phone: this.insertForm.phone,
|
|
|
- roleId: this.insertForm.roleId,
|
|
|
- monthCost: this.insertForm.monthCost,
|
|
|
- cost: this.insertForm.cost,
|
|
|
- position: this.insertForm.position,
|
|
|
- certJson: this.insertForm.certJson,
|
|
|
- inductionDate: this.insertForm.inductionDate,
|
|
|
- jobNumber: this.insertForm.jobNumber
|
|
|
- };
|
|
|
- if (this.insertForm.departmentId != null) {
|
|
|
- form.departmentId =
|
|
|
- this.insertForm.departmentId[
|
|
|
- this.insertForm.departmentId.length - 1
|
|
|
- ];
|
|
|
- }
|
|
|
- if (this.insertForm.costApplyDate != null) {
|
|
|
- form.costApplyDate = this.insertForm.costApplyDate;
|
|
|
- }
|
|
|
- if (this.insertForm.superiorId) {
|
|
|
- form.superiorId = this.insertForm.superiorId;
|
|
|
- }
|
|
|
-
|
|
|
- this.http.post(
|
|
|
- this.port.manage.insert,
|
|
|
- form,
|
|
|
- (res) => {
|
|
|
- this.submitLoading = false;
|
|
|
- if (res.code == "ok") {
|
|
|
- this.$message({
|
|
|
- message: this.$t('message.modifyTheSuccess'),
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.dialogVisible1 = false;
|
|
|
- //重新读取列表
|
|
|
- this.getUser();
|
|
|
- this.getUsers();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- (error) => {
|
|
|
- this.listLoading = false;
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
// 获取部门列表
|
|
|
getDepartment() {
|
|
|
this.http.post(
|