refactor(物料管理): 统一物料选项变量名并更新引用
将materialCodeOptions重命名为materialOptions以保持命名一致性,并更新相关组件中的引用
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料名称" prop="materialCode">
|
<el-form-item label="物料名称" prop="materialCode">
|
||||||
<el-select v-model="queryParams.materialCode" filterable placeholder="请选择">
|
<el-select v-model="queryParams.materialCode" filterable placeholder="请选择">
|
||||||
<el-option v-for="item in dataList" :key="item.materialCode" :label="item.materialName" :value="item.materialCode">
|
<el-option v-for="item in options.materialOptions" :key="item.materialCode" :label="item.materialName" :value="item.materialCode">
|
||||||
<span style="float: left">{{ item.materialCode }}</span>
|
<span style="float: left">{{ item.materialCode }}</span>
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.materialName }}</span>
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.materialName }}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
@@ -344,7 +344,7 @@ const state = reactive({
|
|||||||
options: {
|
options: {
|
||||||
// 入库类型 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
// 入库类型 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||||
transactionTypeOptions: [],
|
transactionTypeOptions: [],
|
||||||
materialCodeOptions: [],
|
materialOptions: [],
|
||||||
locationOptions: []
|
locationOptions: []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -468,7 +468,7 @@ function getMaterialCodeList() {
|
|||||||
getMaterialOption('materialCode').then((res) => {
|
getMaterialOption('materialCode').then((res) => {
|
||||||
const { code, data } = res
|
const { code, data } = res
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
state.options.materialCodeOptions = data
|
state.options.materialOptions = data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user