소스 검색

调整组织架构的人员成本管理

Lijy 3 년 전
부모
커밋
408af4f6d5
1개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 9 4
      fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

+ 9 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -135,7 +135,7 @@
                         <el-link @click.native="showSalaryList(scope.row)"><i class="iconfont firerock-iconrecord"></i></el-link>
                     </template>
                 </el-table-column>
-                <el-table-column label="操作" width="330" v-if="permissions.structurePersonnel">
+                <el-table-column label="操作" width="330">
                     <template slot-scope="scope">
                         <el-button size="mini" type="default" v-if="scope.row.roleName == '超级管理员'" @click="transferRole(scope.row)">转让</el-button>
                         <el-button size="mini" type="default" v-if="scope.row.roleName != '超级管理员'" @click="resetPwd(scope.row)">重置</el-button>
@@ -238,18 +238,18 @@
                 <el-form-item label="电话" prop="phone">
                     <el-input v-model="insertForm.phone" placeholder="请输入电话号码" clearable></el-input>
                 </el-form-item>
-                <el-form-item label="薪酬方式" prop="salaryType">
+                <el-form-item label="薪酬方式" prop="salaryType" v-if="permissions.structurePersonnel">
                     <el-radio-group v-model="insertForm.salaryType" @change="onSalaryTypeChange">
                     <el-radio  :label="0" >固定月成本</el-radio>
                     <el-radio  :label="1">计时工资</el-radio>
                     </el-radio-group>
                 </el-form-item>
-                <el-form-item label="月成本" prop="monthCost" v-if="insertForm.salaryType == 0">
+                <el-form-item label="月成本" prop="monthCost" v-if="insertForm.salaryType == 0 && permissions.structurePersonnel">
                     <el-input v-model="insertForm.monthCost" id="mc" @input="oninput" placeholder="请输入月成本,单位:元" clearable @keyup.native="restrictNumber('mc')"></el-input>
                     <span style="color:orange;font-size:12px;">按照每个月工作{{timeType.monthDays}}天,每天{{timeType.allday}}小时预估时薪</span>
                     <el-link :underline="false" style="color:blue;font-size:12px;margin-left:7px;" href="#/timetype">修改工作时长</el-link>
                 </el-form-item>
-                <el-form-item label="时薪" prop="cost">
+                <el-form-item label="时薪" prop="cost" v-if="permissions.structurePersonnel">
                     <el-input v-model="insertForm.cost" :disabled="insertForm.salaryType == 0" id="cc" style="width:120px;" @keyup.native="restrictNumber('cc')"
                      placeholder="请输入成本 单位:元/小时" clearable></el-input>
                     <span style="margin-left:25px;">生效日期</span>
@@ -1124,6 +1124,10 @@
                     }
                 });
                 console.log(form, '提交的数据')
+                if(this.permissions.structurePersonnel && this.title == '编辑人员') {
+                    this.from.cost = 0
+                    this.from.monthCost = 0
+                }
                 // return
                 this.http.post( this.port.manage.insert, form,
                         res => {
@@ -1270,6 +1274,7 @@
                         }
                     }
                 });
+
                 this.http.post( this.port.manage.insert, form,
                         res => {
                             this.submitLoading = false;