更新
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<view class="">
|
||||
<view class="u-flex">
|
||||
<view class="tui" v-if="isTui(item)">
|
||||
{{item.status=='refunding'?'退款中':'已退'}}
|
||||
{{item.status=='part_refund'?'部分已退':'全部已退'}}
|
||||
</view>
|
||||
<view
|
||||
:class="{'line-th':item.status=='return'||item.status=='refund'||item.status=='refunding'}">
|
||||
@@ -55,7 +55,7 @@
|
||||
</view>
|
||||
<view class="u-m-r-20 u-font-24 u-flex" v-if="item.returnAmount">
|
||||
<view class="color-666">退款金额:</view>
|
||||
<view class="color-999 u-m-l-6">{{item.returnAmount*item.returnNum}}</view>
|
||||
<view class="color-999 u-m-l-6">{{item.returnAmount*item.refundNum}}</view>
|
||||
</view>
|
||||
<view class="u-m-r-20 u-font-24 u-flex" v-if="item.returnNum">
|
||||
<view class="color-666">退菜数量:</view>
|
||||
@@ -70,8 +70,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-text-right u-m-t-28">
|
||||
<template v-if="isTui(item)">
|
||||
<view>¥0.00</view>
|
||||
<template v-if="item.refundNum>0">
|
||||
<view>¥{{(returnTotalMoney(item)-item.refundNum*item.returnAmount).toFixed(2)}}</view>
|
||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}</view>
|
||||
</template>
|
||||
<template v-else-if="item.userCouponId">
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
<script setup>
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { reactive, ref } from 'vue';
|
||||
import * as Api from '@/http/yskApi/Instead.js'
|
||||
import userVue from './components/user.vue';
|
||||
import orderVue from './components/order.vue';
|
||||
import goodsList from './components/list.vue';
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
<view class="no-wrap u-m-r-32">打包费</view>
|
||||
<view>¥{{data.packFee||0}}</view>
|
||||
</view>
|
||||
<view style="height: 32rpx;" v-if="data.packFee>0&&data.seatInfo&&data.seatInfo.priceAmount>0"></view>
|
||||
<view class="u-flex u-row-between u-col-top" v-if="data.seatInfo&&data.seatInfo.priceAmount>0">
|
||||
<view style="height: 32rpx;" ></view>
|
||||
<view class="u-flex u-row-between u-col-top" v-if="data.seatInfo&&data.seatInfo.priceAmount>0">
|
||||
<view class="no-wrap u-m-r-32">{{data.seatInfo.productName}}</view>
|
||||
<view>¥{{data.seatInfo.priceAmount}}</view>
|
||||
</view>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
})
|
||||
onShow(init)
|
||||
onPullDownRefresh(()=>{
|
||||
pageData.page = 1
|
||||
pageData.query.page = 1
|
||||
init()
|
||||
})
|
||||
watch(()=>pageData.createdAt,(newval)=>{
|
||||
@@ -107,7 +107,8 @@
|
||||
* @param {Object} e
|
||||
*/
|
||||
function pageChange(e){
|
||||
pageData.page = e
|
||||
pageData.query.page = e
|
||||
console.log(e)
|
||||
init()
|
||||
}
|
||||
|
||||
@@ -118,7 +119,7 @@
|
||||
*/
|
||||
function updateQuery(key,e){
|
||||
pageData.query[key] = e
|
||||
pageData.page = 1
|
||||
pageData.query.page = 1
|
||||
init()
|
||||
}
|
||||
|
||||
@@ -126,7 +127,7 @@
|
||||
* 搜索监听
|
||||
*/
|
||||
function searchConfirm(){
|
||||
pageData.page = 1
|
||||
pageData.query.page = 1
|
||||
init()
|
||||
}
|
||||
|
||||
|
||||
@@ -373,7 +373,8 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
pageData.seatNum = order.tableId!=null&&order.tableId!="undefined" ? order.seatNum : 0;
|
||||
console.log("order==",order)
|
||||
pageData.seatNum = order.seatNum;
|
||||
}
|
||||
const coupAllPrice = computed(() => {
|
||||
const n = pays.quan.reduce((prve, cur) => {
|
||||
@@ -429,7 +430,7 @@
|
||||
const discountSaleAmount = computed(() => {
|
||||
if(pageData.goodsList){
|
||||
let price = pageData.goodsList.filter(v => v.discountSaleAmount > 0 && v.status !== "return").reduce((a, b) => {
|
||||
return a + (b.num * b.discountSaleAmount)
|
||||
return a + ((b.num * b.price) - (b.num * b.discountSaleAmount))
|
||||
}, 0)
|
||||
return price
|
||||
}
|
||||
|
||||
@@ -194,11 +194,12 @@
|
||||
if (!noteResult) {
|
||||
return infoBox.showToast('请输入或选择退款原因!')
|
||||
}
|
||||
let refundAmount = orderDetail.goodsList.reduce((prve, cur) => {
|
||||
return prve + (cur.number * 1 * cur.unitPrice)
|
||||
}, 0)
|
||||
let params = {
|
||||
orderId: option.orderId,
|
||||
refundAmount: orderDetail.goodsList.reduce((prve, cur) => {
|
||||
return prve + (cur.number * 1 * cur.unitPrice)
|
||||
}, 0),
|
||||
refundAmount: refundAmount.toFixed(2),
|
||||
refundReason: noteResult,
|
||||
refundDetails: orderDetail.goodsList.filter(v=>v.number*1).map(v=>{
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user