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