商品属性修改

master
2812875475 2024-03-23 09:04:16 +08:00
parent ecfc615f9f
commit 6c5fbb6f0d
4 changed files with 78 additions and 16 deletions

View File

@ -0,0 +1,19 @@
<template>
<div>
<h1>hello 这是第一个路由视图</h1>
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'Index',
data() {
return {}
},
created() {
},
methods: {}
}
</script>
<style scoped>
</style>

View File

@ -2,6 +2,7 @@ import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
/* Layout */ /* Layout */
import Layout from '@/layout' import Layout from '@/layout'
import Layouttest from "@/layouttest";
Vue.use(Router) Vue.use(Router)
@ -73,6 +74,19 @@ export const constantRoutes = [
} }
] ]
}, },
{
path: '',
component: Layouttest,
redirect: 'test',
children: [
{
path: 'test',
component: () => import('@/views/a/index'),
name: 'Test',
meta: {title: "测试", icon: 'dashboard', affix: true}
}
]
},
{ {
path: '/user', path: '/user',
component: Layout, component: Layout,

View File

@ -0,0 +1,23 @@
<template>
<div>
<h2>第二个</h2>
</div>
</template>
<script>
export default {
name: 'Index',
data() {
return {}
},
created() {
},
methods: {}
}
</script>
<style scoped>
</style>

View File

@ -286,12 +286,12 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>属性组名称{{ templateAttributeGroup.groupName }}</span> <span>属性组名称{{ templateAttributeGroup.groupName }}</span>
</div> </div>
<div style="width: 100px;height: 200px"> <div style="width: 100px;height: 500px">
<el-form v-for="attribute in templateAttributeGroup.attributeList">
<el-form-item :label="attribute.name"> <el-form-item :label="attribute.id" v-for="attribute in templateAttributeGroup.attributeList">
<el-input v-model="attribute.value"></el-input> <el-input style="width: 100px;" v-model="attribute.value"></el-input>
</el-form-item> </el-form-item>
</el-form>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
@ -299,7 +299,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="商品属性" name="second"> <el-tab-pane label="商品属性" name="second">
商品属性 商品属性{{e}}
<el-row style="overflow-x: auto; height: 300px;"> <el-row style="overflow-x: auto; height: 300px;">
<el-form label-width="80px"> <el-form label-width="80px">
<el-col :span="6" v-for="templateAttribute in categoryCommonElement.templateAttributeList"> <el-col :span="6" v-for="templateAttribute in categoryCommonElement.templateAttributeList">
@ -313,7 +313,7 @@
<el-tab-pane label="自有属性" name="third"> <el-tab-pane label="自有属性" name="third">
自有属性 自有属性{{e}}
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row>
<el-form :inline="true" :model="customAttributeForm" class="demo-form-inline"> <el-form :inline="true" :model="customAttributeForm" class="demo-form-inline">
@ -520,8 +520,8 @@ export default {
d:[], d:[],
e:[ e:[
{ {
"name":null, "attributeId":0,
"value":null "value":""
} }
], ],
}; };
@ -761,10 +761,18 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids const id = row.id || this.ids
getInfo(id).then(response => { getInfo(id).then(response => {
console.log(response)
this.form = response.data; this.form = response.data;
this.oneSettingValue=response.data.specification this.oneSettingValue=response.data.specification
this.e=[] this.e=[]
this.e=response.data.asProductAttributeInfo this.e1=[]
this.e2=[]
this.e3=[]
this.e = response.data.asProductAttributeInfo.map(item => {
return { attributeId: item.attributeId, value: item.value };
});
console.log(this.e) console.log(this.e)
this.changeRule(response.data.ruleId) this.changeRule(response.data.ruleId)
this.onSubmit() this.onSubmit()
@ -782,27 +790,25 @@ export default {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
this.selectAttribut() this.selectAttribute()
console.log(this.form) console.log(this.form)
updateInfo(this.form).then(response => { updateInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.form=""
}); });
} else { } else {
this.selectAttribut() this.selectAttribute()
addInfo(this.form).then(response => { addInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.form=""
}); });
} }
} }
}); });
}, },
selectAttribut(){ selectAttribute(){
this.a=[] this.a=[]
this.b=[] this.b=[]
this.c=[] this.c=[]