|
|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
<el-form-item label="年份批次">
|
|
|
<div style="display: flex; gap: 8px; align-items: center;">
|
|
|
- <el-select v-model="selectedYear" clearable placeholder="请选择年份" style="width: 80px">
|
|
|
+ <!-- <el-select v-model="selectedYear" clearable placeholder="请选择年份" style="width: 80px">
|
|
|
<el-option v-for="year in yearList" :key="year" :label="year" :value="year"/>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="localBatchId" clearable placeholder="请选择批次" style="width: 90px">
|
|
|
- <el-option v-for="b in filteredBatchList" :key="b.batchId" :label="b.name" :value="b.batchId"/>
|
|
|
+ </el-select> -->
|
|
|
+ <el-select v-model="localBatchId" clearable placeholder="请选择批次" style="width: 157px">
|
|
|
+ <el-option v-for="b in filteredBatchList" :key="b.batchId" :label="formatBatchName(b)" :value="b.batchId"/>
|
|
|
</el-select>
|
|
|
<el-button type="primary" @click="handleAddBatch">新增</el-button>
|
|
|
</div>
|
|
|
@@ -74,7 +74,8 @@ const {
|
|
|
batchForm,
|
|
|
batchRules,
|
|
|
handleAddBatch,
|
|
|
- handleSaveBatch
|
|
|
+ handleSaveBatch,
|
|
|
+ formatBatchName
|
|
|
} = useBatchYear(localBatchId, localBatchList)
|
|
|
|
|
|
// 监听 localBatchId 的变化,同步回父组件
|