|
|
@@ -327,21 +327,22 @@
|
|
|
</header>
|
|
|
<div class="subsection-title"><strong>劳动合同(只读)</strong></div>
|
|
|
<el-row :gutter="16">
|
|
|
- <el-col :xs="24" :sm="12"><el-form-item label="分类"><el-input :value="form.contract.category" readonly
|
|
|
+ <!-- 只读区块统一 disabled(置灰)而非 readonly(白底易误以为可编辑),2026-11-06 用户要求 -->
|
|
|
+ <el-col :xs="24" :sm="12"><el-form-item label="分类"><el-input :value="contractCategoryText" disabled
|
|
|
placeholder="—" /></el-form-item></el-col>
|
|
|
<el-col :xs="24" :sm="12"><el-form-item label="合同编号/名称"><el-input
|
|
|
- :value="form.contract.name || form.contract.number" readonly
|
|
|
+ :value="form.contract.name || form.contract.number" disabled
|
|
|
placeholder="—" /></el-form-item></el-col>
|
|
|
- <el-col :xs="24" :sm="8"><el-form-item label="签订时间"><el-input :value="form.contract.signDate" readonly
|
|
|
+ <el-col :xs="24" :sm="8"><el-form-item label="签订时间"><el-input :value="form.contract.signDate" disabled
|
|
|
placeholder="—" /></el-form-item></el-col>
|
|
|
- <el-col :xs="24" :sm="8"><el-form-item label="开始时间"><el-input :value="form.contract.startDate" readonly
|
|
|
+ <el-col :xs="24" :sm="8"><el-form-item label="开始时间"><el-input :value="form.contract.startDate" disabled
|
|
|
placeholder="—" /></el-form-item></el-col>
|
|
|
- <el-col :xs="24" :sm="8"><el-form-item label="结束时间"><el-input :value="form.contract.endDate" readonly
|
|
|
+ <el-col :xs="24" :sm="8"><el-form-item label="结束时间"><el-input :value="form.contract.endDate" disabled
|
|
|
placeholder="无固定期限/未同步" /></el-form-item></el-col>
|
|
|
- <el-col :xs="24" :sm="12"><el-form-item label="生效状态"><el-input :value="form.contract.status" readonly
|
|
|
+ <el-col :xs="24" :sm="12"><el-form-item label="生效状态"><el-input :value="contractStatusText" disabled
|
|
|
placeholder="—" /></el-form-item></el-col>
|
|
|
<el-col :span="24"><el-form-item label="备注"><el-input :value="form.contract.remark" type="textarea"
|
|
|
- :rows="2" readonly placeholder="—" /></el-form-item></el-col>
|
|
|
+ :rows="2" disabled placeholder="—" /></el-form-item></el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
|
|
|
@@ -665,6 +666,8 @@ import {
|
|
|
getDepartmentPositions,
|
|
|
getDepartmentPositionType,
|
|
|
getDepartmentPositionLevels,
|
|
|
+ contractTypeLabel,
|
|
|
+ contractStatusLabel,
|
|
|
} from '@/api/hr';
|
|
|
import { listOrganizations, getFactoryAreaPage, searchUsersByKeyword, loadEmployeeBriefs, EMPLOYEE_STATUS, EMPLOYEE_STATUS_CODE, CERT_TYPE } from '@/api/organization';
|
|
|
import { getDictByCode } from '@/api/sys';
|
|
|
@@ -1085,6 +1088,20 @@ export default {
|
|
|
return Math.round(values.filter(Boolean).length / values.length * 100);
|
|
|
},
|
|
|
contractState() { return this.form.contract.name ? (this.form.contract.endDate ? '合同资料已填写' : '待补结束日期') : '待录入合同'; },
|
|
|
+ /** 合同分类:后端同步的是枚举码(如 FIXED)→ contractTypeLabel 翻中文,未知名原样回显 */
|
|
|
+ contractCategoryText() {
|
|
|
+ const c = this.form.contract || {};
|
|
|
+ return c.categoryName || contractTypeLabel(c.category);
|
|
|
+ },
|
|
|
+ /** 生效状态:后端同步的是状态码 → contractStatusLabel 翻中文;
|
|
|
+ REJECTED 不在合同状态枚举(CONTRACT_STATUS_LABELS)里,按流程单据口径翻「已驳回」 */
|
|
|
+ contractStatusText() {
|
|
|
+ const c = this.form.contract || {};
|
|
|
+ if (c.statusName) return c.statusName;
|
|
|
+ const upper = String(c.status || '').trim().toUpperCase();
|
|
|
+ if (upper === 'REJECTED') return '已驳回';
|
|
|
+ return contractStatusLabel(c.status) || '';
|
|
|
+ },
|
|
|
selectedWorkTypeIds() {
|
|
|
return (this.form.workTypes || [])
|
|
|
.map((item) => item.id)
|