dev
parent
46cace5d2e
commit
668ffce29d
|
@ -42,3 +42,13 @@ export function delType(id) {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function listAll7() {
|
||||||
|
return request({
|
||||||
|
url: '/product/type/listAll',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -103,25 +103,39 @@
|
||||||
<!-- 添加或修改商品评价对话框 -->
|
<!-- 添加或修改商品评价对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="商品名称" prop="productId">
|
<!-- <el-form-item label="商品名称" prop="productId">-->
|
||||||
<el-input v-model="form.productId" placeholder="请输入商品名称" />
|
<!-- <el-input v-model="form.productId" placeholder="请输入商品名称" />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
|
|
||||||
|
<div class="grid-content bg-purple">
|
||||||
|
<el-form-item label="商品名称" prop="productId">
|
||||||
|
<el-select v-model="form.info" placeholder="请选择商品" clearable>
|
||||||
|
<el-option v-for="item in infoList" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="商品SKU" prop="productRuleCententId">
|
<el-form-item label="商品SKU" prop="productRuleCententId">
|
||||||
<el-input v-model="form.productRuleCententId" placeholder="请输入商品SKU" />
|
<el-input v-model="form.productRuleCententId" placeholder="请输入商品SKU" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-table-column label="商品评价图片" align="center" prop="reviewImages">
|
<el-table-column label="商品评价图片" align="center" prop="reviewImages">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<img :src="scope.row.reviewImages" alt="加载失败" width="80px" height="80px"/>
|
<img :src="scope.row.reviewImages" alt="加载失败" width="80px" height="80px"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-form-item label="商品评价信息">
|
<el-form-item label="商品评价信息">
|
||||||
<editor v-model="form.content" :min-height="192"/>
|
<editor v-model="form.content" :min-height="192"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -129,6 +143,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { listEvaluate, getEvaluate, delEvaluate, addEvaluate, updateEvaluate } from "@/api/product/evaluate";
|
import { listEvaluate, getEvaluate, delEvaluate, addEvaluate, updateEvaluate } from "@/api/product/evaluate";
|
||||||
import ImageUpload from "@/components/ImageUpload"
|
import ImageUpload from "@/components/ImageUpload"
|
||||||
|
import {listInfo} from "@/api/product/info"
|
||||||
export default {
|
export default {
|
||||||
components: {ImageUpload},
|
components: {ImageUpload},
|
||||||
name: "Evaluate",
|
name: "Evaluate",
|
||||||
|
@ -158,6 +173,7 @@ export default {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
productId: null,
|
productId: null,
|
||||||
},
|
},
|
||||||
|
infoList: [],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
|
@ -179,8 +195,20 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.initGetInfoList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 查询商品信息列表 **/
|
||||||
|
initGetInfoList() {
|
||||||
|
let params = {
|
||||||
|
status: 0
|
||||||
|
};
|
||||||
|
listInfo(params).then(res =>{
|
||||||
|
if(200 == res.code){
|
||||||
|
this.infoList = res.data.list;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 查询商品评价列表 */
|
/** 查询商品评价列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
|
@ -197,9 +197,9 @@
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="grid-content bg-purple">
|
<div class="grid-content bg-purple">
|
||||||
<el-form-item label="分类" prop="type">
|
<el-form-item label="分类" prop="brand">
|
||||||
|
|
||||||
<el-cascader
|
<el-cascader
|
||||||
placeholder="请选择分类"
|
|
||||||
v-model="form.type"
|
v-model="form.type"
|
||||||
:options="typeList"
|
:options="typeList"
|
||||||
:props="{ expandTrigger: 'hover' ,value:'catId',label:'name',children:'childrenList'}"
|
:props="{ expandTrigger: 'hover' ,value:'catId',label:'name',children:'childrenList'}"
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableBodyTemplate"
|
:data="tableBodyTemplate"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column v-for="column in tableColumnHeaderTemplate" :key="0"
|
<el-table-column v-for="column in tableColumnHeaderTemplate" :key="column.prop"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
:label="column.label">
|
:label="column.label">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -321,9 +321,9 @@
|
||||||
<script>
|
<script>
|
||||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/product/info";
|
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/product/info";
|
||||||
import ImageUpload from "@/components/ImageUpload"
|
import ImageUpload from "@/components/ImageUpload"
|
||||||
import {listBrand, updateBrand} from "@/api/product/brand"
|
import {listBrand} from "@/api/product/brand"
|
||||||
import { listRule } from "@/api/product/rule"
|
import { listRule } from "@/api/product/rule"
|
||||||
import { listType } from "@/api/product/type"
|
import {listAll7 } from "@/api/product/type"
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -344,6 +344,7 @@ export default {
|
||||||
pc:true,
|
pc:true,
|
||||||
move:false,
|
move:false,
|
||||||
typeList: [],
|
typeList: [],
|
||||||
|
type: null,
|
||||||
children: [{}],
|
children: [{}],
|
||||||
tableColumnHeaderTemplate:[],
|
tableColumnHeaderTemplate:[],
|
||||||
tableBodyTemplate:[],
|
tableBodyTemplate:[],
|
||||||
|
@ -500,14 +501,13 @@ export default {
|
||||||
|
|
||||||
/** 查询商品类型**/
|
/** 查询商品类型**/
|
||||||
initTypeListInfo() {
|
initTypeListInfo() {
|
||||||
let prams = {
|
listAll7().then(
|
||||||
status : 0
|
res => {
|
||||||
};
|
if (res.code == 200) {
|
||||||
listType(prams).then(res => {
|
this.typeList = res.data
|
||||||
if(200 == res.code){
|
}
|
||||||
this.typeList = res.data.list;
|
|
||||||
}
|
}
|
||||||
});
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**查询商品规格**/
|
/**查询商品规格**/
|
||||||
|
|
Loading…
Reference in New Issue