|
|
@ -149,7 +149,17 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="分类类别" prop="categoryId"> |
|
|
|
<el-form-item v-if="disabled" label="分类类别" prop="categoryId"> |
|
|
|
<el-select v-model="form.categoryId" filterable :disabled="disabled" placeholder="请选择" class="input-width" clearable> |
|
|
|
<el-option |
|
|
|
v-for="item in optionsC" |
|
|
|
:key="item.categoryId" |
|
|
|
:label="item.categoryName" |
|
|
|
:value="item.categoryId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-else label="分类类别" prop="categoryId"> |
|
|
|
<el-select v-model="form.categoryId" filterable :disabled="disabled" placeholder="请选择" class="input-width" clearable> |
|
|
|
<el-option |
|
|
|
v-for="item in optionsEditC" |
|
|
@ -561,6 +571,12 @@ export default { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} else { |
|
|
|
this.form = { ...res.data } |
|
|
|
const _arr = this.optionsEditC.map(item => item.categoryId) |
|
|
|
|
|
|
|
if (!_arr.includes(res.data.categoryId) && !this.disabled) this.form.categoryId = '' |
|
|
|
// this.optionsEditC.forEach(item => { |
|
|
|
// if (item.categoryId === res.data.categoryId) |
|
|
|
// }) |
|
|
|
this.dialogVisible = true |
|
|
|
} |
|
|
|
}) |
|
|
|