Commit 5ff585dd by cwq0219

商品管理-查看订单评价

1 parent eb74d0fe
......@@ -87,4 +87,14 @@ const updateTakeProApi = params => {
})
}
export default { getListApi, getProShareApi, topProApi, updateStatusProApi, deleteTakeProApi, getProInfoApi, insertOrUpdateProApi, updateTakeProApi }
const getGoodsCommentListApi = params => {
params.method = 'scrm.api.shopmall.backstage.orderGoodsComment.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getListApi, getProShareApi, topProApi, updateStatusProApi, deleteTakeProApi, getProInfoApi, insertOrUpdateProApi, updateTakeProApi, getGoodsCommentListApi }
\ No newline at end of file
......@@ -313,4 +313,48 @@ html {
.el-tag.el-tag--info.el-tag--plain {
background: transparent !important;
}
\ No newline at end of file
}
/* tab */
.marketing .el-tabs__nav-wrap:after {
opacity: 0;
}
.marketing .el-tabs__item {
height: 20px !important;
line-height: 10px !important;
}
.marketing .el-tabs__item {
width: 120px;
height: 40px !important;
line-height: 40px !important;
font-size: 14px;
text-align: center;
border: 0 !important;
background: #FFFFFF;
color: #999999;
border-radius: 0px 4px 0px 0px;
border: 1px solid #F4F6FC;
padding: 0;
}
.marketing .el-tabs__active-bar {
display: none;
}
.marketing .el-tabs__header {
margin: 0 !important;
}
.marketing .el-tabs__item.is-active {
color: #5850ff;
background: #F4F6FC !important;
border-radius: 4px 0px 0px 0px;
border: 1px solid #F4F6FC !important;
}
/* tab */
\ No newline at end of file
......@@ -675,36 +675,4 @@ export default {
</script>
<style lang="scss">
.marketing .el-tabs__nav-wrap:after {
opacity: 0;
}
.marketing .el-tabs__item {
height: 20px !important;
line-height: 10px !important;
}
.marketing .el-tabs__item {
width: 120px;
height: 40px !important;
line-height: 40px !important;
font-size: 14px;
text-align: center;
border: 0 !important;
background: #FFFFFF;
color: #999999;
border-radius: 0px 4px 0px 0px;
border: 1px solid #F4F6FC;
padding: 0;
}
.marketing .el-tabs__active-bar {
display: none;
}
.marketing .el-tabs__header {
margin: 0 !important;
}
.marketing .el-tabs__item.is-active {
color: #5850ff;
background: #F4F6FC !important;
border-radius: 4px 0px 0px 0px;
border: 1px solid #F4F6FC !important;
}
</style>
<!-- 查看产品 - 评价信息 -->
<template>
<div class="comment-detail container edit-container">
<div style="padding: 20px;">
<!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="starLevel" slot-scope="scope">
<img v-for="(item, index) in scope.scope.starLevel" :key="index" class="icon-star" src="@/assets/icon-star.png"/>
</div>
<div slot="goodsImage" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</div>
</GLTable>
</div>
</div>
</template>
<script>
import url from "@/assets/empty.png"
export default {
name: 'commentDetail',
data() {
return {
size: 'small',
url: url,
searchForm: {
goodsId: ''
},
// 表格
getListApi: this.$apis.proManage.getGoodsCommentListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '评价用户名称',
prop: 'customerName'
},
{
label: '几天前',
prop: 'createdDateStr'
},
{
label: '评价星级',
prop: 'starLevel',
addHtml: 'starLevel'
},
{
label: '评价内容',
prop: 'commentContent',
line: 3
},
{
label: '图片',
prop: 'goodsImage',
addHtml: 'goodsImage'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
props: {
goodsId: {
type: Object,
default: () => {}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.goodsId = this.goodsId
resolve()
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.commentRef.data.length ? (this.$refs.commentRef.tableHeightValues = '') : this.$refs.commentRef.setTableHeightFun()
}
}
}
</script>
<style></style>
<!-- 编辑商品 -->
<template>
<div class="edit-pro marketing p-t-20 edit-box">
<div class="container edit-container">
<el-tabs v-if="routeInfo.addOrEdit == '3'" v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</el-tabs>
<div v-show="(routeInfo.addOrEdit != '3') || (routeInfo.addOrEdit == '3' && activeName == 'basicInfo')" class="container edit-container">
<div class="flex">
<div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index">
......@@ -317,6 +321,7 @@
</div>
</div>
</div>
<comment-detail v-show="routeInfo.addOrEdit == '3' && activeName == 'afterOrder'" :goodsId="routeInfo.id"></comment-detail>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button v-if="routeInfo.addOrEdit != '3'" type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
......@@ -403,6 +408,7 @@
<script>
import { limitPrice } from '@/common/constant'
import commentDetail from './components/commentDetail'
export default {
name: 'editProduct',
data() {
......@@ -411,6 +417,8 @@ export default {
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
// tab
activeName: 'basicInfo',
submitted: false,
isDisabled: false,
wechatImgList: [],
......@@ -775,6 +783,10 @@ export default {
}
},
components: {
commentDetail
},
watch: {
editForm: {
handler(val) {
......@@ -804,12 +816,15 @@ export default {
}
},
created() {
this.routeInfo = this.$route.query
},
mounted() {
this.userInfo = this.$globalState.session
this.$refs.merchantTableRef[0].tableHeightValues = '400px'
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.query
// console.log(this.routeInfo)
this.getBaseDate().then(() => {
this.getOptionsList(0, 'editFormData', false)
......@@ -1554,4 +1569,14 @@ export default {
border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3);
}
.marketing.edit-pro .el-tabs__item {
background: #F4F6FC !important;
border: 1px solid #F4F6FC !important;
}
.marketing.edit-pro .el-tabs__item.is-active {
background: #FFFFFF !important;
border: 1px solid #FFFFFF !important;
}
</style>
<!-- 商品编辑 - 带货 -->
<template>
<div class="edit-product-dh marketing p-t-20 edit-box">
<div class="container edit-container">
<el-tabs v-if="routeInfo.addOrEdit == '3'" v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</el-tabs>
<div v-show="(routeInfo.addOrEdit != '3') || (routeInfo.addOrEdit == '3' && activeName == 'basicInfo')" class="container edit-container">
<p class="edit-title">{{ title }}</p>
<div class="flex" style="margin-top: 20px;">
<div class="main-img-box">
......@@ -75,6 +79,7 @@
<img style="width: 375px; width: 375px;" v-show="item.resType == 1" :src="item.content" />
</div>
</div>
<comment-detail v-show="routeInfo.addOrEdit == '3' && activeName == 'afterOrder'" :goodsId="routeInfo.id"></comment-detail>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button v-if="routeInfo.addOrEdit != '3'" type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
......@@ -84,6 +89,7 @@
<script>
import { limitPrice } from '@/common/constant'
import commentDetail from '../productGroup/components/commentDetail'
export default {
name: 'editProductDh',
data() {
......@@ -98,6 +104,8 @@ export default {
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
// tab
activeName: 'basicInfo',
submitted: false,
isDisabled: false,
mainImgUrl: '',
......@@ -154,6 +162,10 @@ export default {
}
},
components: {
commentDetail
},
watch: {
editForm: {
handler(val) {
......@@ -166,10 +178,13 @@ export default {
}
},
created() {
this.routeInfo = this.$route.query
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.query
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.isDisabled = this.routeInfo.addOrEdit == 3
this.editFormData[0].isDisabled = this.isDisabled
......@@ -387,13 +402,13 @@ export default {
}
}
</script>
<style scoped>
.title {
<style>
.edit-product-dh .title {
padding: 13px 20px;
border-bottom: 1px solid #E5E5E5;
}
.view {
.edit-product-dh .view {
width: 375px;
height: 667px;
margin: 30px 45px 0 60px;
......@@ -405,7 +420,7 @@ export default {
width: calc(100% - 480px);
} */
.view img {
.edit-product-dh .view img {
width: 100%;
vertical-align: top;
}
......@@ -529,4 +544,13 @@ export default {
cursor: pointer;
}
/* 规格 */
.marketing.edit-product-dh .el-tabs__item {
background: #F4F6FC !important;
border: 1px solid #F4F6FC !important;
}
.marketing.edit-product-dh .el-tabs__item.is-active {
background: #FFFFFF !important;
border: 1px solid #FFFFFF !important;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!