Commit 5ff585dd by cwq0219

商品管理-查看订单评价

1 parent eb74d0fe
...@@ -87,4 +87,14 @@ const updateTakeProApi = params => { ...@@ -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 \ No newline at end of file
...@@ -314,3 +314,47 @@ html { ...@@ -314,3 +314,47 @@ html {
.el-tag.el-tag--info.el-tag--plain { .el-tag.el-tag--info.el-tag--plain {
background: transparent !important; background: transparent !important;
} }
/* 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 \ No newline at end of file
...@@ -675,36 +675,4 @@ export default { ...@@ -675,36 +675,4 @@ export default {
</script> </script>
<style lang="scss"> <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> </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> <template>
<div class="edit-pro marketing p-t-20 edit-box"> <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="flex">
<div class="home-set-form flex-grow"> <div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index"> <div v-for="(item, index) in externalFormList" :key="index">
...@@ -317,6 +321,7 @@ ...@@ -317,6 +321,7 @@
</div> </div>
</div> </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' }"> <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 v-if="routeInfo.addOrEdit != '3'" type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
...@@ -403,6 +408,7 @@ ...@@ -403,6 +408,7 @@
<script> <script>
import { limitPrice } from '@/common/constant' import { limitPrice } from '@/common/constant'
import commentDetail from './components/commentDetail'
export default { export default {
name: 'editProduct', name: 'editProduct',
data() { data() {
...@@ -411,6 +417,8 @@ export default { ...@@ -411,6 +417,8 @@ export default {
footerLeft: '0', footerLeft: '0',
footerWidth: '0', footerWidth: '0',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
// tab
activeName: 'basicInfo',
submitted: false, submitted: false,
isDisabled: false, isDisabled: false,
wechatImgList: [], wechatImgList: [],
...@@ -775,6 +783,10 @@ export default { ...@@ -775,6 +783,10 @@ export default {
} }
}, },
components: {
commentDetail
},
watch: { watch: {
editForm: { editForm: {
handler(val) { handler(val) {
...@@ -804,12 +816,15 @@ export default { ...@@ -804,12 +816,15 @@ export default {
} }
}, },
created() {
this.routeInfo = this.$route.query
},
mounted() { mounted() {
this.userInfo = this.$globalState.session this.userInfo = this.$globalState.session
this.$refs.merchantTableRef[0].tableHeightValues = '400px' this.$refs.merchantTableRef[0].tableHeightValues = '400px'
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.query
// console.log(this.routeInfo) // console.log(this.routeInfo)
this.getBaseDate().then(() => { this.getBaseDate().then(() => {
this.getOptionsList(0, 'editFormData', false) this.getOptionsList(0, 'editFormData', false)
...@@ -1554,4 +1569,14 @@ export default { ...@@ -1554,4 +1569,14 @@ export default {
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3); 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> </style>
<!-- 商品编辑 - 带货 --> <!-- 商品编辑 - 带货 -->
<template> <template>
<div class="edit-product-dh marketing p-t-20 edit-box"> <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> <p class="edit-title">{{ title }}</p>
<div class="flex" style="margin-top: 20px;"> <div class="flex" style="margin-top: 20px;">
<div class="main-img-box"> <div class="main-img-box">
...@@ -75,6 +79,7 @@ ...@@ -75,6 +79,7 @@
<img style="width: 375px; width: 375px;" v-show="item.resType == 1" :src="item.content" /> <img style="width: 375px; width: 375px;" v-show="item.resType == 1" :src="item.content" />
</div> </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' }"> <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 v-if="routeInfo.addOrEdit != '3'" type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
...@@ -84,6 +89,7 @@ ...@@ -84,6 +89,7 @@
<script> <script>
import { limitPrice } from '@/common/constant' import { limitPrice } from '@/common/constant'
import commentDetail from '../productGroup/components/commentDetail'
export default { export default {
name: 'editProductDh', name: 'editProductDh',
data() { data() {
...@@ -98,6 +104,8 @@ export default { ...@@ -98,6 +104,8 @@ export default {
footerLeft: '0', footerLeft: '0',
footerWidth: '0', footerWidth: '0',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
// tab
activeName: 'basicInfo',
submitted: false, submitted: false,
isDisabled: false, isDisabled: false,
mainImgUrl: '', mainImgUrl: '',
...@@ -154,6 +162,10 @@ export default { ...@@ -154,6 +162,10 @@ export default {
} }
}, },
components: {
commentDetail
},
watch: { watch: {
editForm: { editForm: {
handler(val) { handler(val) {
...@@ -166,10 +178,13 @@ export default { ...@@ -166,10 +178,13 @@ export default {
} }
}, },
created() {
this.routeInfo = this.$route.query
},
mounted() { mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.query
this.title = this.titleObj[this.routeInfo.addOrEdit] this.title = this.titleObj[this.routeInfo.addOrEdit]
this.isDisabled = this.routeInfo.addOrEdit == 3 this.isDisabled = this.routeInfo.addOrEdit == 3
this.editFormData[0].isDisabled = this.isDisabled this.editFormData[0].isDisabled = this.isDisabled
...@@ -387,13 +402,13 @@ export default { ...@@ -387,13 +402,13 @@ export default {
} }
} }
</script> </script>
<style scoped> <style>
.title { .edit-product-dh .title {
padding: 13px 20px; padding: 13px 20px;
border-bottom: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5;
} }
.view { .edit-product-dh .view {
width: 375px; width: 375px;
height: 667px; height: 667px;
margin: 30px 45px 0 60px; margin: 30px 45px 0 60px;
...@@ -405,7 +420,7 @@ export default { ...@@ -405,7 +420,7 @@ export default {
width: calc(100% - 480px); width: calc(100% - 480px);
} */ } */
.view img { .edit-product-dh .view img {
width: 100%; width: 100%;
vertical-align: top; vertical-align: top;
} }
...@@ -529,4 +544,13 @@ export default { ...@@ -529,4 +544,13 @@ export default {
cursor: pointer; 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> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!