订单评价修改

This commit is contained in:
zzyuan 2025-09-03 18:13:45 +08:00
parent d24ca009ce
commit 0b52c27bde
8 changed files with 463 additions and 354 deletions

View File

@ -39,7 +39,7 @@
}
},
{
"path": "pages/mine/index",
"path": "pages/mine/mine",
"style": {
// "navigationBarTitleText": "我的"
"navigationStyle": "custom"
@ -371,7 +371,7 @@
"text": "订单"
},
{
"pagePath": "pages/mine/index",
"pagePath": "pages/mine/mine",
"iconPath": "static/images/tabbar/mine.png",
"selectedIconPath": "static/images/tabbar/mine_.png",
"text": "我的"

View File

@ -20,7 +20,7 @@
<view class="comment-box">
<view>
<u--textarea
v-model="description" maxlength="200"
v-model="content" maxlength="200"
placeholder="请详细补充您的问题或建议"
height="120" style="font-size: 24rpx;background: transparent;"
></u--textarea>
@ -99,7 +99,6 @@ export default {
content: '',
fileList: [],
contactInfo: '',
description:""
}
},
onLoad() {

View File

@ -88,7 +88,7 @@ export default {
}
},
onShow() {
// uni.reLaunch({ url: '/pages/feedback/evaluate' })
// uni.reLaunch({ url: '/pages/index' })
// setTimeout(()=>{
if(Cookies.get('remember')){
this.remember = [Cookies.get('remember')] || [];

View File

@ -78,7 +78,7 @@
<script>
import Tabs from '@/pages/components/Tabs.vue'
import { couponMobileGroupApi } from '../../../api/mine/index'
import { couponMobileGroupApi } from '@/api/mine/index'
export default {
components: { Tabs },

View File

@ -43,17 +43,24 @@
<script>
import { decryptWithSM4 } from '@/utils/sm'
import { getInfoNewAPI } from '@/api/login'
export default {
data() {
return {
fontValue:uni.getStorageSync('fontSize') || 8,
currentPhone: decryptWithSM4(uni.getStorageSync('mobile'))
currentPhone: ""
}
},
onLoad() {
this.getUserInfo()
},
methods: {
//
getUserInfo(){
getInfoNewAPI({'custId':uni.getStorageSync('custId'),"sourceType":7}).then(result => {
this.currentPhone = decryptWithSM4(result.data.mobile);
})
},
goBack() {
uni.navigateBack()
},

View File

@ -74,7 +74,12 @@
<u-image :src="imgItem" width="80px" height="80px" />
</view>
</view>
<view v-if="item.reply&&item.reply!=''" style="width: 94%;margin: 10rpx auto;height: auto;word-break: break-all;font-size: 24rpx;">
回复内容{{item.reply}}
</view>
<view v-if="item.replyTime&&item.replyTime!=''" style="width: 94%;margin: 10rpx auto;height: auto;word-break: break-all;font-size: 24rpx;">
回复时间{{item.replyTime}}
</view>
</view>
<view style="margin: 20px 0" v-if="tableList2.length > 0">
<u-loadmore :status="status2" nomoreText="没有更多数据了" />
@ -208,7 +213,7 @@ export default {
size: this.pageSize2,
}
try {
const res = await getPageEvaluateListApi(params)
const res = await getPageEvaluateListApi(params)
console.log('?? ~ getEvaluatedList ~ res:', res)
this.total2 = Number(res.total);
if(this.pageNum2==1){

View File

@ -23,8 +23,8 @@
<Tabs :tabList="tabList" @changeTab="changeTab" />
</view>
<!-- <view style="height: 56px"></view> -->
<scroll-view style="width: 100%;height: 80vh;" @scrolltolower="onScrollTolower" scroll-y="true">
<view class="evaluateCenter" v-if="this.tabIndex==1">
<scroll-view style="width: 100%;height: 80vh;" @scrolltolower="onScrollTolower" scroll-y="true" v-if="this.tabIndex!=1">
<!-- <view class="evaluateCenter" v-if="this.tabIndex==1">
<view class="evaluateCenterLeft">
<u-image src="../../static/images/user.png" width="30px" height="30px" />
<text>评价中心</text>
@ -32,7 +32,7 @@
<view class="evaluateCenterRight" @click="goEvaluateCenter">
去看看
</view>
</view>
</view> -->
<view class="order-list" v-for="(item, index) in tableList" :key="index">
<view class="flex justify-between">
<!-- <view class="order-source">订单来源双屏消费机</view> -->
@ -85,6 +85,44 @@
<u-empty icon="../../static/images/not_order.png" text="暂无相关订单" textColor="#000" />
</view>
</scroll-view>
<!-- 已评价 -->
<scroll-view style="width: 100%;height: 80vh;" @scrolltolower="onScrollTolower2" scroll-y="true" v-if="tabIndex==1">
<view class="order-list" v-for="(item, index) in tableList2" :key="index">
<view class="flex justify-between">
<view>
<text style="color: #0f274b;font-weight: bold;font-size:28rpx">{{ item.canteenName }}/{{item.stallName}}</text>
</view>
<view style="color: rgba(15, 39, 75, 0.8)">{{ item.crtime.split(" ")[0] }}</view>
</view>
<view class="flex" style="width: 100%;margin: 10rpx 0;">
<view style="display: flex;gap: 0rpx;">
<u-icon v-for="n in 5" :key="n" :name="n <= item.starLevel ? 'star-fill' : 'star-fill'"
:color="n <= item.starLevel ? '#ff9933' : '#ccc'" size="20"></u-icon>
</view>
</view>
<view style="width: 94%;margin: 10rpx auto;height: auto;word-break: break-all;font-size: 24rpx;">
{{item.description}}
</view>
<view style="width: 94%;margin: 10rpx auto;height: auto;display: flex;flex-wrap: wrap;">
<view v-for="(imgItem,imgIndex) in item.pictureList" :key="imgIndex" @click="opePopup(imgItem)">
<u-image :src="imgItem" width="80px" height="80px" />
</view>
</view>
<view v-if="item.reply&&item.reply!=''" style="width: 94%;margin: 10rpx auto;height: auto;word-break: break-all;font-size: 24rpx;">
回复内容{{item.reply}}
</view>
<view v-if="item.replyTime&&item.replyTime!=''" style="width: 94%;margin: 10rpx auto;height: auto;word-break: break-all;font-size: 24rpx;">
回复时间{{item.replyTime}}
</view>
</view>
<view style="margin: 20px 0" v-if="tableList2.length > 0">
<u-loadmore :status="status2" nomoreText="没有更多数据了" />
</view>
<view v-else class="flex justify-center align-center" style="height: 50vh">
<u-empty icon="../../static/images/not_order.png" text="暂无评价" textColor="#000" />
</view>
</scroll-view>
</view>
<!-- 筛选部分-->
<u-popup :show="localShow" @close="closePopup" mode="bottom" round="20">
@ -171,6 +209,11 @@
mode="date"
></u-datetime-picker>
</u-popup>
<u-popup :show="showPic" mode="center" @close="showPic=false">
<image :src="imagerUrl" mode="aspectFit" style="height: 100vh;width: 100vw;" @click="showPic=false"></image>
</u-popup>
</view>
</template>
@ -178,6 +221,7 @@
import Tabs from '@/pages/components/Tabs.vue'
import { getDate } from '../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/util'
import { getOrderInfoListAPI,getOrderSourceTypeListAPI,payOrderApi,cancelOrderApi } from '../../api/order/index'
import { getPageEvaluateListApi } from '../../api/order/index'
export default {
components: { Tabs },
@ -197,7 +241,7 @@ export default {
searchValue: '',
searchType:'',
status: 'loadmore',
tabList: ['全部订单', '评价', '待支付', '退款'],
tabList: ['全部订单', '评价', '待支付', '退款'],
dateValue:new Date(),
dateValue2:new Date(),
sourceTypeList:[],
@ -270,7 +314,14 @@ export default {
{id:"13",name:'到店扫码'},{id:"14",name:'到店扫码'},{id:"15",name:'美团外卖'},{id:"16",name:'美团到店'},{id:"21",name:'补扣'},{id:"22",name:'外部订单'},{id:"99",name:'其他'}
],
selectedOrderTypes: [],
//
pageNum2: 1,
pageSize2: 10,
total2: 0,
tableList2: [],
status2:'loadmore',
showPic:false,
imagerUrl:""
}
},
watch: {
@ -299,10 +350,10 @@ export default {
//
onScrollTolower(){
console.log(this.tableList.length)
if(this.total>this.tableList.length){
this.pageNum++
this.getList()
}
if(this.total>this.tableList.length){
this.pageNum++
this.getList()
}
},
//
async getList() {
@ -363,19 +414,66 @@ export default {
console.log('?? ~ changeTab ~ index:', index)
this.tabIndex = index;
if(index==1){
this.searchType="3"
}else if(index==2){
// this.searchType="3"//
//
this.pageNum2=1;
this.tableList2=[]
this.getEvaluatedList()
}else if(index==2){//
this.searchType="4"
}else if(index==3){
this.pageNum=1;
this.tableList=[]
this.getList()
}else if(index==3){//退退
this.searchType="2"
}else{
this.pageNum=1;
this.tableList=[]
this.getList()
}else{//
this.searchType=""
this.pageNum=1;
this.tableList=[]
this.getList()
}
this.pageNum=1;
this.tableList=[]
this.getList()
},
//
onScrollTolower2(){
if(this.total2>this.tableList2.length){
if(this.tabIndex==1){
this.pageNum2++
this.getEvaluatedList()
}
}
},
//
async getEvaluatedList() {
console.log('获取列表')
const params = {
custId: uni.getStorageSync('custId'),
startDate: this.startDate,
endDate: this.endDate,
current: this.pageNum2,
size: this.pageSize2,
}
try {
const res = await getPageEvaluateListApi(params)
console.log('?? ~ getEvaluatedList ~ res:', res)
this.total2 = Number(res.total);
if(this.pageNum2==1){
this.tableList2 = res.records
}else{
this.tableList2.push(...res.records)
}
this.status2 = this.total2 == this.tableList2.length ? 'nomore' : 'loadmore'
} catch (error) {
console.log(error)
}
},
//
opePopup(item){
this.imagerUrl = item;
this.showPic = true
},
//
handleOrderState(state) {
switch (state) {