更改订单

This commit is contained in:
魏啾
2024-06-05 17:15:28 +08:00
parent 5ea2ab4aa9
commit 1e9797f09a
5 changed files with 62 additions and 49 deletions

View File

@@ -16,11 +16,11 @@ const baseUrl = debug ? proxyApi : "https://wxcashiertest.sxczgkj.cn/cashierServ
const baseUrlwws = 'ws://cashier.sxczgkj.cn/cashierService' const baseUrlwws = 'ws://cashier.sxczgkj.cn/cashierService'
// #endif // #endif
// #ifdef APP || MP-WEIXIN // #ifdef APP || MP-WEIXIN
// const baseUrl = 'https://cashier.sxczgkj.cn/cashierService'// 线上 const baseUrl = 'https://cashier.sxczgkj.cn/cashierService'// 线上
// const baseUrlwws = 'wss://cashier.sxczgkj.cn/cashierService' // 线上 const baseUrlwws = 'wss://cashier.sxczgkj.cn/cashierService' // 线上
// const baseUrl = 'http://192.168.2.42:9888/cashierService'// 测试-w // const baseUrl = 'http://192.168.2.42:9888/cashierService'// 测试-w
const baseUrlwws ='wss://192.168.2.42:9999/cashierService' // 测试-w // const baseUrlwws ='wss://192.168.2.42:9999/cashierService' // 测试-w
const baseUrl = 'https://wxcashiertest.sxczgkj.cn/cashierService'// 测试 // const baseUrl = 'https://wxcashiertest.sxczgkj.cn/cashierService'// 测试
// const baseUrlwws ='wss://wxcashiertest.sxczgkj.cn/cashierService' // 测试 // const baseUrlwws ='wss://wxcashiertest.sxczgkj.cn/cashierService' // 测试
// #endif // #endif

View File

@@ -93,7 +93,8 @@
</view> </view>
<view class="fivecontent_item_box"> <view class="fivecontent_item_box">
<view class="fivecontent_item_boxitem flex-between"> <view class="fivecontent_item_boxitem flex-between">
<image :src="`${item.image}?x-oss-process=image/resize,m_lfit,w_192,h_192`" mode="aspectFill"></image> <image :src="`${item.image}?x-oss-process=image/resize,m_lfit,w_192,h_192`"
mode="aspectFill"></image>
<view class="fivecontent_item_boxitemleft flex-colum-start"> <view class="fivecontent_item_boxitemleft flex-colum-start">
<view class="fivecontent_item_boxitemleftone flex-between" <view class="fivecontent_item_boxitemleftone flex-between"
style="display: flex;justify-content: space-between;align-items: center;"> style="display: flex;justify-content: space-between;align-items: center;">
@@ -509,7 +510,9 @@
if (item.isChild) { if (item.isChild) {
this.form.type = '' //先清空后赋值 this.form.type = '' //先清空后赋值
this.showproductlist = true setTimeout(()=> {
this.showproductlist = true
}, 500);
} else { } else {
this.showproductlist = false this.showproductlist = false
// 以下没有多选处理 // 以下没有多选处理

View File

@@ -135,7 +135,7 @@
console.log(e) console.log(e)
try { try {
this.types = e.type this.types = e.types
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
} }

View File

@@ -2,38 +2,39 @@
<view> <view>
<view class="navtab flex-center"> <view class="navtab flex-center">
<view class="navtabpost flex-center"> <view class="navtabpost flex-center">
<view :class="navtabindex == 0 ? 'navtabone':'navtabtow'" style="border-radius: 12rpx 0 0 12rpx;" @click="navtabclick(0)"> <view :class="navtabindex == 0 ? 'navtabone':'navtabtow'" @click="navtabclick(0)">
团购订单
</view>
<view :class="navtabindex == 1 ? 'navtabone':'navtabtow'" style="border-radius: 0 12rpx 12rpx 0;" @click="navtabclick(1)">
到店订单 到店订单
</view> </view>
<view :class="navtabindex == 1 ? 'navtabone':'navtabtow'" @click="navtabclick(1)">
团购订单
</view>
</view> </view>
</view> </view>
<u-sticky bgColor="#fff"> <u-sticky bgColor="#fff">
<view class="tab-wrap"> <view class="tab-wrap">
<block v-if="navtabindex==0"> <block v-if="navtabindex==1">
<view class="item" v-for="(item, index) in tabs2" :key="index" @click="orderswitch(item,index)"> <view class="item" v-for="(item, index) in tabs2" :key="index" @click="orderswitch(item,index)">
<text >{{ item.name }}</text> <text>{{ item.name }}</text>
</view> </view>
</block> </block>
<block v-if="navtabindex==1"> <block v-if="navtabindex==0">
<view class="item" v-for="(item, index) in tabs" :key="index" @click="orderswitch(item,index)"> <view class="item" v-for="(item, index) in tabs" :key="index" @click="orderswitch(item,index)">
<text >{{ item.name }}</text> <text>{{ item.name }}</text>
</view> </view>
</block> </block>
<view class="line-wrap" <view class="line-wrap"
:style="{ left: `${(100 / tabs.length) * active}%`, width: `${100 / tabs.length}%` }"> :style="{ left: `${(100 / tabs.length) * active}%`, width: `${100 / tabs.length}%` }">
<view class="line"> <view class="line">
<image style="width:40rpx; height: 10rpx;" <image style="width:40rpx; height: 10rpx;"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dgs.png" mode="aspectFill"> src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dgs.png"
mode="aspectFill">
</image> </image>
</view> </view>
</view> </view>
</view> </view>
</u-sticky> </u-sticky>
<view class="list-wrap" v-if="navtabindex == 1"> <view class="list-wrap" v-if="navtabindex == 0">
<view class="item" v-for="(item,index) in list" :key="index" @click="orderinfo(item)"> <view class="item" v-for="(item,index) in list" :key="index" @click="orderinfo(item)">
<view class="header-wrap"> <view class="header-wrap">
<text v-if="item.sendType == 'post'">快递</text> <text v-if="item.sendType == 'post'">快递</text>
@@ -98,7 +99,7 @@
</view> </view>
</view> </view>
<!-- 新订单 --> <!-- 新订单 -->
<view class="orderList" v-if="navtabindex == 0"> <view class="orderList" v-if="navtabindex == 1">
<view class="listBox" v-for="(item,i) in groupList" :key="i" @click="orderinfoTo(item)"> <view class="listBox" v-for="(item,i) in groupList" :key="i" @click="orderinfoTo(item)">
<view class="df"> <view class="df">
<view style="display: flex;"> <view style="display: flex;">
@@ -117,10 +118,8 @@
<view>实付<text style="color: #FF4C11;">{{item.payAmount}}</text></view> <view>实付<text style="color: #FF4C11;">{{item.payAmount}}</text></view>
</view> </view>
</view> </view>
<button v-if="item.status=='unused'" type="primary" class="buttonStyle" <button v-if="item.status=='unused'" type="primary" class="buttonStyle">查看券码</button>
>查看券码</button> <button v-if="item.status=='unpaid'" type="primary" class="buttonStyle">去付款</button>
<button v-if="item.status=='unpaid'" type="primary" class="buttonStyle"
>去付款</button>
</view> </view>
</view> </view>
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png" <image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
@@ -213,7 +212,7 @@
this.init_fn() this.init_fn()
}, },
onReachBottom() { onReachBottom() {
if (this.navtabindex == 0) { if (this.navtabindex == 1) {
// 获取团购订单 // 获取团购订单
this.getorderList() this.getorderList()
} else { } else {
@@ -264,7 +263,7 @@
this.form.page = 1 this.form.page = 1
this.form.size = 10 this.form.size = 10
this.form.status = 'loadmore' this.form.status = 'loadmore'
if (this.navtabindex == 0) { if (this.navtabindex == 1) {
// 获取团购订单 // 获取团购订单
this.getorderList() this.getorderList()
} else { } else {
@@ -353,18 +352,20 @@
.navtabpost { .navtabpost {
position: relative; position: relative;
background: #FFFFFF;
border-radius: 12rpx;
padding:0 10rpx;
.navtabone { .navtabone {
// margin-left: -10rpx; // margin-left: -10rpx;
width: 162rpx; width: 166rpx;
height: 56rpx; height: 36rpx;
background: #FFEAB1; background: #FFEAB1;
// border-radius: 12rpx 0 0 12rpx; border-radius: 12rpx;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
line-height: 56rpx; line-height: 36rpx;
text-align: center; text-align: center;
z-index: 10; z-index: 10;
} }
@@ -372,11 +373,10 @@
.navtabtow { .navtabtow {
// margin-left: -10rpx; // margin-left: -10rpx;
z-index: 9; z-index: 9;
width: 166rpx; width: 146rpx;
height: 56rpx; height: 56rpx;
line-height: 56rpx; line-height: 56rpx;
text-align: center; text-align: center;
background: #FFFFFF;
// border-radius: 0 12rpx 12rpx 0; // border-radius: 0 12rpx 12rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400; font-weight: 400;

View File

@@ -323,16 +323,26 @@
let res = await this.api.productqueryShopIdByTableCode({ let res = await this.api.productqueryShopIdByTableCode({
code: uni.cache.get('tableCode') code: uni.cache.get('tableCode')
}) })
try { if (res.code == 0) {
if (res.data) { let time = new Date
let time = new Date console.log(time, '时间戳')
console.log(time, '时间戳') uni.cache.set('shopUser', res.data)
uni.cache.set('shopUser', res.data) this.handlemessage()
this.handlemessage() }else{
} setTimeout(()=>{
} catch (e) { uni.pro.switchTab('index/index')
//TODO handle the exception },1000)
} }
// try {
// if (res.data) {
// let time = new Date
// console.log(time, '时间戳')
// uni.cache.set('shopUser', res.data)
// this.handlemessage()
// }
// } catch (e) {
// //TODO handle the exception
// }
}, },
getMessage(msg) { //wss 回显数据 getMessage(msg) { //wss 回显数据
if (msg.status != 'success') { if (msg.status != 'success') {