fix(): 功能修复

11.25/AoCi_Tian
DongZeLiang 2024-11-25 19:44:29 +08:00
parent a6161b73eb
commit 15a3d00801
4 changed files with 23 additions and 6 deletions

View File

@ -99,7 +99,9 @@ export default {
data() {
return {
attributeIdList: [],
//
checkedAttributeList: [],
//
attributeQuery: {
pageNum: 1,
pageSize: 10,
@ -107,6 +109,7 @@ export default {
name: null
},
attributeTotal: 0,
//
attributeList: []
}
},

View File

@ -141,7 +141,7 @@
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-row>
<CheckAttribute v-model="form.attributeIdList"/>
<CheckAttribute v-model="form.attributeIdList" :checked-list="form.attributeList"/>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -258,6 +258,7 @@ export default {
this.form = response.data;
this.open = true;
this.title = "修改属性组";
console.log(this.form)
});
},
/** 提交按钮 */

View File

@ -244,7 +244,8 @@ export default {
watch: {
'form.parentId': {
handler(val){
if (val !== undefined && val !== 0){
console.log('form.parentId', this.form);
if (val !== undefined && val !== null && val !== 0 && this.form.id === null){
parentCommonElement(val).then(response => {
this.attributeInfoList = response.data.attributeInfoList;
this.attributeGroupList = response.data.attributeGroupList;
@ -342,11 +343,18 @@ export default {
handleUpdate(row) {
this.reset();
this.getTreeselect();
if (row != null) {
this.form.parentId = row.parentId;
}
getCategory(row.id).then(response => {
this.form = response.data;
if (row != null) {
this.form.parentId = row.parentId;
}
console.log(row)
parentCommonElement(row.id).then(response => {
this.attributeInfoList = response.data.attributeInfoList;
this.attributeGroupList = response.data.attributeGroupList;
this.brandInfoList = response.data.brandInfoList;
})
this.open = true;
this.title = "修改品类信息";
});

View File

@ -509,7 +509,6 @@ export default {
this.categoryCommonElement.attributeList = attributeList;
})
}
}
}
},
@ -723,6 +722,12 @@ export default {
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data;
this.categoryOptionValue = [
this.form.mianType,
this.form.parentType,
this.form.type
];
this.open = true;
this.title = "修改商品信息";
});