涉及以下接口的请求/响应新增字段:
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /technologyRoutingOperation/page | 分页查询 |
| GET | /technologyRoutingOperation/list | 列表查询 |
| GET | /technologyRoutingOperation/{id} | 详情 |
| POST | /technologyRoutingOperation/add | 新增 |
| PUT | /technologyRoutingOperation | 修改 |
新增响应/请求字段:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| planPerson | Long | 否 | 计划人员ID |
| executor | Long | 否 | 计划执行人员ID |
| planPersonName | String | 否 | 计划人员姓名(响应字段,后端自动关联查询) |
| executorName | String | 否 | 计划执行人员姓名(响应字段,后端自动关联查询) |
在工序表单中新增两个人员选择下拉框:
<el-form-item label="计划人员" prop="planPerson">
<el-select v-model="processForm.planPerson"
placeholder="请选择计划人员"
clearable
filterable
style="width: 100%">
<el-option v-for="item in employeeOptions"
:key="item.id"
:label="item.staffName"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="计划执行人员" prop="executor">
<el-select v-model="processForm.executor"
placeholder="请选择计划执行人员"
clearable
filterable
style="width: 100%">
<el-option v-for="item in employeeOptions"
:key="item.id"
:label="item.staffName"
:value="item.id" />
</el-select>
</el-form-item>
data() {
return {
processForm: {
planPerson: null,
executor: null,
// ...其他字段
},
employeeOptions: [], // 员工列表,需从接口获取
}
}
列表中可直接使用后端返回的姓名展示:
<el-table-column label="计划人员" prop="planPersonName" />
<el-table-column label="计划执行人员" prop="executorName" />
planPerson 和 executor 存储的是员工ID(Long类型),提交表单时传IDplanPersonName 和 executorName 由后端通过 staff_on_job 表自动关联查询,前端无需额外转换employeeOptions 数据源)doc/20260615_add_plan_person_and_executor_to_routing_operation.sqlproduction_order_routing_operation)同步支持这两个字段