| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="离职日期:" prop="leaveDate"> |
| | | <el-date-picker |
| | | v-model="form.leaveDate" |
| | | type="date" |
| | | placeholder="请选择离职日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="离职原因:" prop="reason"> |
| | | <el-select v-model="form.reason" placeholder="请选择离职原因" style="width: 100%" @change="handleSelectDimissionReason"> |
| | | <el-option |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="备注:" prop="remark" v-if="form.reason === 'other'"> |
| | | <el-input |
| | |
| | | const data = reactive({ |
| | | form: { |
| | | staffOnJobId: undefined, |
| | | leaveDate: "", |
| | | reason: "", |
| | | remark: "", |
| | | }, |
| | | rules: { |
| | | staffName: [{ required: true, message: "请选择人员" }], |
| | | leaveDate: [{ required: true, message: "请选择离职日期", trigger: "change" }], |
| | | reason: [{ required: true, message: "请选择离职原因"}], |
| | | }, |
| | | dimissionReasonOptions: [ |
| | |
| | | if (operationType.value === 'edit') { |
| | | currentStaffRecord.value = row |
| | | form.value.staffOnJobId = row.staffOnJobId |
| | | form.value.leaveDate = row.leaveDate |
| | | form.value.reason = row.reason |
| | | form.value.remark = row.remark |
| | | personList.value = [ |
| | |
| | | // 表单已注释,手动重置表单数据 |
| | | form.value = { |
| | | staffOnJobId: undefined, |
| | | leaveDate: "", |
| | | reason: "", |
| | | remark: "", |
| | | }; |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: "离职日期", |
| | | prop: "leaveDate", |
| | | }, |
| | | { |
| | | label: "员工编号", |
| | | prop: "staffNo", |
| | | }, |