优惠卷和商品卷

This commit is contained in:
wwz
2025-03-10 16:33:43 +08:00
parent 70edc6756d
commit 5342133cbd
30 changed files with 2820 additions and 3338 deletions

View File

@@ -58,12 +58,12 @@
<view class="content">
<view></view>
<view class="intro-wrap">
下单日期{{$u.timeFormat(item.createdAt, 'yyyy-mm-dd hh:MM')}}
下单日期{{item.createTime}}
</view>
<view class="shop-info">
<view class="shop-item">
<view class="cover" v-for="(item1,index1) in item.goods" :key="index1">
<u-image width="112" height="112" radius="20" :src='item1.productImg'
<u-image width="56" height="56" radius="10" :src='item1.productImg'
v-if="item1.productId!=-999"></u-image>
<u-image width="112" height="112" radius="20"
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/table.png'"
@@ -73,47 +73,19 @@
</view>
<view class="shop-amount">
<text class="orderAmount">{{item.orderAmount}}</text>
<text class="totalNumber">{{item.totalNumber}}</text>
<text class="totalNumber">{{item.goods.length}}</text>
</view>
</view>
</view>
<view class="footer-wrap">
<!-- <view class="footer-wrap">
<view class="btn" @click.stop="$u.debounce(isRemoveOrder(item,index),1000)"
v-if="item.status != 'unpaid' && item.status != 'paying'"> 删除订单 </view>
<view class="btn s" @click.stop="$u.debounce(showpopupclick(item),1000)"
v-if="item.status == 'unpaid' || item.status == 'paying'"> 去付款 </view>
</view>
</view> -->
</view>
</view>
<!-- 新订单 -->
<!-- <view class="orderList" v-if="navtabindex == 1">
<view class="listBox" v-for="(item,i) in groupList" :key="i" @click="orderinfoTo(item)">
<view class="df">
<view style="display: flex;">
<text>{{item.proName.length>10?item.proName.substring(0,10)+'...':item.proName}}</text><u-icon
name="arrow-right" color="#000" size="28"></u-icon>
</view>
<text
:class="[item.status=='unpaid'||item.status=='unused'?'state':'state2']">{{item.status|statusFirter}}</text>
</view>
<view class="df" style="justify-content: flex-start;margin-top: 32rpx;">
<image style="width:120rpx; height: 120rpx;border-radius: 12rpx 12rpx 12rpx 12rpx;"
:src="item.proImg" mode="aspectFill">
</image>
<view class="ml-20 fontStyle">
<view>数量{{item.number}}</view>
<view>实付<text style="color: #FF4C11;">{{item.payAmount}}</text></view>
</view>
</view>
<button v-if="item.status=='unused'" type="primary" class="buttonStyle">查看券码</button>
<button v-if="item.status=='unpaid'" type="primary" class="buttonStyle">去付款</button>
</view>
</view>
<u-modal width="450rpx" :show="removeOrderShow" @confirm="$u.debounce(removeOrder(),1000)"
@cancel="removeOrderShow = false" @close="removeOrderShow = false" :showCancelButton="true"
:closeOnClickOverlay="true" :title="'是否删除当前订单'"></u-modal>-->
<view v-if="orderForm.list.length <= 0" style="text-align: center;">
<image style="width: 402rpx;height: 442rpx;margin:240rpx auto 32rpx;"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png" mode="aspectFill"></image>
@@ -127,13 +99,14 @@
import {
ref,
reactive,
onMounted
onMounted,
} from "vue";
import {
onLoad,
onReady,
onShow,
onPageScroll
onPageScroll,
onReachBottom
} from '@dcloudio/uni-app'
import Nav from '@/components/CustomNavbar.vue'; //导航栏
import {
@@ -152,11 +125,11 @@
},
{
name: '待支付',
status: 'in-production'
status: 'unpaid'
},
{
name: '订单完成',
status: 'refunding'
status: 'done'
},
{
name: '取消订单',
@@ -187,8 +160,7 @@
size: orderForm.form.size,
status: orderForm.status
})
console.log(res)
if (res.totalPage == 1 && res.totalRow <= 10) {
if (res.totalPage == 0 || res.totalPage == 1 && res.totalRow <= 10) {
orderForm.form.status = 'nomore'
orderForm.list = res.records
if (orderForm.form.page == 1 && res.records.length == 0) {
@@ -198,7 +170,11 @@
return false;
} else {
orderForm.form.status = 'loading';
orderForm.list = [...orderForm.list, ...res.records];
if (orderForm.form.page == 1) {
orderForm.list = res.records
} else {
orderForm.list = [...orderForm.list, ...res.records];
}
orderForm.form.page = ++orderForm.form.page;
if (orderForm.form.page > res.totalPage) {
orderForm.form.status = 'nomore';
@@ -221,24 +197,31 @@
orderForm.form.page = 1
orderForm.form.size = 10
orderForm.form.status = 'loadmore'
navtabindex.value == '1' ? getorderList() : userorderList()
// navtabindex.value == '1' ? getorderList() : userorderList()
userorderList()
}
const orderinfo = (e) => {
uni.pro.navigateTo('order/detail', {
orderId: e.id,
shopId:e.shopId
shopId: e.shopId
})
}
onReachBottom(() => {
if (orderForm.form.status != 'nomore') {
console.log('页面滚动到底部');
userorderList()
}
})
onShow(() => {
init_fn()
})
// onMounted(() => {})
</script>
<style scoped lang="scss">
<style lang="scss">
page {
// background: #f6f6f6;
background: #f6f6f6;
}
.navtab {