更新 商品信息修改回显 删除
parent
cc8f437a06
commit
de8b1ebdc6
|
@ -29,7 +29,7 @@ export function addInfo(data) {
|
|||
// 修改商品信息
|
||||
export function updateInfo(data) {
|
||||
return request({
|
||||
url: '/product/info/'+data.id,
|
||||
url: '/product/info/'+data.projectAddModel.id,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-menu
|
||||
default-active="1"
|
||||
class="el-menu-demo"
|
||||
mode="horizontal"
|
||||
background-color="#545c64"
|
||||
text-color="#fff"
|
||||
active-text-color="#ffd04b">
|
||||
<el-menu-item index="1">处理中心</el-menu-item>
|
||||
<el-submenu index="2">
|
||||
<template slot="title">我的工作台</template>
|
||||
<el-menu-item index="2-1">选项1</el-menu-item>
|
||||
<el-menu-item index="2-2">选项2</el-menu-item>
|
||||
<el-menu-item index="2-3">选项3</el-menu-item>
|
||||
<el-submenu index="2-4">
|
||||
<template slot="title">选项4</template>
|
||||
<el-menu-item index="2-4-1">选项1</el-menu-item>
|
||||
<el-menu-item index="2-4-2">选项2</el-menu-item>
|
||||
<el-menu-item index="2-4-3">选项3</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-submenu>
|
||||
<el-menu-item index="3" disabled>消息中心</el-menu-item>
|
||||
<el-menu-item index="4"><a href="https://www.ele.me" target="_blank">订单管理</a></el-menu-item>
|
||||
</el-menu>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="6">
|
||||
<router-view/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "layoutShop"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-header, el-footer {
|
||||
background-color: #E9EEF3;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
line-height: 60px;
|
||||
}
|
||||
.el-main {
|
||||
background-color: #E9EEF3;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
body > .el-container {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.el-container:nth-child(5) .el-aside,
|
||||
.el-container:nth-child(6) .el-aside{
|
||||
line-height: 260;
|
||||
}
|
||||
|
||||
.el-container:nth-child(7).el.el-aside{
|
||||
line-height: 320px;
|
||||
}
|
||||
</style>
|
|
@ -2,7 +2,7 @@ import Vue from 'vue'
|
|||
import Router from 'vue-router'
|
||||
/* Layout */
|
||||
import Layout from '@/layout'
|
||||
|
||||
import LayoutShop from "@/layout-shop/index.vue";
|
||||
Vue.use(Router)
|
||||
|
||||
/**
|
||||
|
@ -73,6 +73,19 @@ export const constantRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: LayoutShop,
|
||||
redirect: 'product-detail',
|
||||
children: [
|
||||
{
|
||||
path: 'product-detail',
|
||||
component: () => import('@/views/product/info/detail/index'),
|
||||
name: 'Demo',
|
||||
meta: {title: '商品详情', icon: 'dashboard', affix: true}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<template>
|
||||
<div>
|
||||
这是一个小小的例子
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,52 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item v-for="breadcrumb in breadcrumbList">{{breadcrumb}}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-carousel trigger="click" height="150px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<h3 class="small">{{ item }}</h3>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div>
|
||||
<el-statistic title="男女比">
|
||||
<template slot="formatter">
|
||||
456/2
|
||||
</template>
|
||||
</el-statistic>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "productDetail",
|
||||
data() {
|
||||
return {
|
||||
breadcrumbList: [
|
||||
"服装",
|
||||
"外衣",
|
||||
"女士移除"
|
||||
],
|
||||
like: true,
|
||||
value1: 4154.564,
|
||||
value2: 1314,
|
||||
title: "增长人数",
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods:{}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -375,7 +375,7 @@ import {addAttribute} from "@/api/product/attribute";
|
|||
|
||||
export default {
|
||||
name: "Info",
|
||||
dicts: {type:{'sys_yes_no':[]}},
|
||||
dicts: ['sys_yes_no'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -779,6 +779,7 @@ export default {
|
|||
console.log("response",response)
|
||||
this.respData = response.data.asProductAttributeInfos
|
||||
this.form = response.data;
|
||||
console.log("sd",this.form.id)
|
||||
this.initCategoryTree()
|
||||
this.oneSettingForm = response.data.projectSkuInfos
|
||||
this.categoryOptionValue = [Number(response.data.mianType),Number(response.data.parentType),Number(response.data.type)]
|
||||
|
@ -832,7 +833,7 @@ export default {
|
|||
attrValueList: attrValueList,
|
||||
productSkuList: productSkuList
|
||||
};
|
||||
console.log(productAddReq)
|
||||
console.log("pto",productAddReq)
|
||||
if (this.form.id != null) {
|
||||
updateInfo(productAddReq).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
|
Loading…
Reference in New Issue