| | |
| | | <el-date-picker v-model="form.fillDate" type="date" style="width: 340px;" :disabled="disabledFlagBySettlement" /> |
| | | </el-form-item> |
| | | <el-form-item label="所属员工" prop="userId"> |
| | | <el-select v-model="form.userId" filterable clearable placeholder="请选择" style="width: 340px;" :disabled="disabledFlagBySettlement || userRolesLevelMin == roleLevelOrdinary" @change="formUserChange"> |
| | | <el-select v-model="form.userId" filterable clearable placeholder="请选择" style="width: 340px;" :disabled="disabledFlagBySettlement || (userRolesLevelMin != roleLevelSuper && userRolesLevelMin != roleLevelGeneral)" @change="formUserChange"> |
| | | <el-option |
| | | v-for="item in users" |
| | | :key="item.id" |
| | |
| | | <template slot="append">%</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="userRolesLevelMin != roleLevelOrdinary && crud.status.edit == crudStatusPrepared" label="结算状态" prop="settlementStatus"> |
| | | <el-form-item v-if="(userRolesLevelMin == roleLevelSuper || userRolesLevelMin == roleLevelGeneral) && crud.status.edit == crudStatusPrepared" label="结算状态" prop="settlementStatus"> |
| | | <el-select v-model="form.settlementStatus" filterable placeholder="请选择" style="width: 340px;" :disabled="disabledFlagBySettlement"> |
| | | <el-option |
| | | v-for="item in dict[settlementStatus]" |
| | |
| | | <el-table-column v-if="checkPer(['admin','taskDaliy:edit','taskDaliy:del'])" label="操作" width="150px" align="center" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <udOperation |
| | | v-if="userRolesLevelMin != roleLevelOrdinary || scope.row.userId == user.id" |
| | | v-if="userRolesLevelMin == roleLevelSuper || userRolesLevelMin == roleLevelGeneral || scope.row.userId == user.id" |
| | | :data="scope.row" |
| | | :permission="permission" |
| | | /> |
| | |
| | | standardWorkloadUnit: constant.STANDARD_WORKLOAD_UNIT, |
| | | // 字典:结算状态 |
| | | settlementStatus: constant.SETTLEMENT_STATUS, |
| | | // 角色级别:普通用户 |
| | | roleLevelOrdinary: constant.ROLE_LEVEL_ORDINARY, |
| | | // 角色级别:超级管理员 |
| | | roleLevelSuper: constant.ROLE_LEVEL_SUPER, |
| | | // 角色级别:总经理 |
| | | roleLevelGeneral: constant.ROLE_LEVEL_GENERAL, |
| | | // CRUD状态 |
| | | crudStatusPrepared: CRUD.STATUS.PREPARED, |
| | | // 用户最大角色级别 |
| | |
| | | [CRUD.HOOK.beforeToAdd]() { |
| | | // 表单赋值 |
| | | this.form.consumedWorkloadUnit = null |
| | | // 判断用户最大角色级别是否是角色级别:普通用户 |
| | | if (this.userRolesLevelMin === this.roleLevelOrdinary) { |
| | | // 判断用户最大角色级别是否是角色级别:超级管理员或角色级别:总经理 |
| | | if (this.userRolesLevelMin !== this.roleLevelSuper && this.userRolesLevelMin !== this.roleLevelGeneral) { |
| | | // 表单赋值 |
| | | this.form.userId = this.user.id |
| | | // 表单用户变更 |