商品属性修改
parent
ecfc615f9f
commit
6c5fbb6f0d
|
@ -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>
|
|
@ -2,6 +2,7 @@ import Vue from 'vue'
|
|||
import Router from 'vue-router'
|
||||
/* Layout */
|
||||
import Layout from '@/layout'
|
||||
import Layouttest from "@/layouttest";
|
||||
|
||||
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',
|
||||
component: Layout,
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<template>
|
||||
<div>
|
||||
<h2>第二个</h2>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'Index',
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
|
@ -286,12 +286,12 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<span>属性组名称【{{ templateAttributeGroup.groupName }}】</span>
|
||||
</div>
|
||||
<div style="width: 100px;height: 200px">
|
||||
<el-form v-for="attribute in templateAttributeGroup.attributeList">
|
||||
<el-form-item :label="attribute.name">
|
||||
<el-input v-model="attribute.value"></el-input>
|
||||
<div style="width: 100px;height: 500px">
|
||||
|
||||
<el-form-item :label="attribute.id" v-for="attribute in templateAttributeGroup.attributeList">
|
||||
<el-input style="width: 100px;" v-model="attribute.value"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
@ -299,7 +299,7 @@
|
|||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="商品属性" name="second">
|
||||
商品属性
|
||||
商品属性{{e}}
|
||||
<el-row style="overflow-x: auto; height: 300px;">
|
||||
<el-form label-width="80px">
|
||||
<el-col :span="6" v-for="templateAttribute in categoryCommonElement.templateAttributeList">
|
||||
|
@ -313,7 +313,7 @@
|
|||
|
||||
|
||||
<el-tab-pane label="自有属性" name="third">
|
||||
自有属性
|
||||
自有属性{{e}}
|
||||
<el-card class="box-card">
|
||||
<el-row>
|
||||
<el-form :inline="true" :model="customAttributeForm" class="demo-form-inline">
|
||||
|
@ -520,8 +520,8 @@ export default {
|
|||
d:[],
|
||||
e:[
|
||||
{
|
||||
"name":null,
|
||||
"value":null
|
||||
"attributeId":0,
|
||||
"value":""
|
||||
}
|
||||
],
|
||||
};
|
||||
|
@ -761,10 +761,18 @@ export default {
|
|||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getInfo(id).then(response => {
|
||||
console.log(response)
|
||||
|
||||
this.form = response.data;
|
||||
this.oneSettingValue=response.data.specification
|
||||
|
||||
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)
|
||||
this.changeRule(response.data.ruleId)
|
||||
this.onSubmit()
|
||||
|
@ -782,27 +790,25 @@ export default {
|
|||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
this.selectAttribut()
|
||||
this.selectAttribute()
|
||||
console.log(this.form)
|
||||
updateInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.form=""
|
||||
});
|
||||
} else {
|
||||
this.selectAttribut()
|
||||
this.selectAttribute()
|
||||
addInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.form=""
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
selectAttribut(){
|
||||
selectAttribute(){
|
||||
this.a=[]
|
||||
this.b=[]
|
||||
this.c=[]
|
||||
|
|
Loading…
Reference in New Issue