订单详情页

This commit is contained in:
wangh 2023-12-11 09:21:21 +08:00
parent 841b823692
commit 0fab8cd1d4
4 changed files with 119 additions and 18 deletions

View File

@ -199,7 +199,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
public Integer todayIsSignIn(Integer storeId) {
// 查询是否开启签到功能
IntegralSettings integralSettings = integralSettingsMapper.getByStoreId(storeId);
if (integralSettings.getSignInFunction() == 0 || integralSettings.getPointsObtained().length() > 10) {
if (!ObjectUtil.isEmpty(integralSettings) && (integralSettings.getSignInFunction() == 0 || integralSettings.getPointsObtained().length() > 10)) {
List<IntegralDetail> signInGifts = integralDetailMapper.signInGifts("签到赠送");
if (signInGifts.size() > 0) {
// 已经签到过

View File

@ -21,13 +21,20 @@
<view class="t-b-box">
<view class="goodsimg">
<image src="../../static/imgs/xp.jpg" mode=""></image>
<image :src="baseUrl+form.coverImage" mode=""></image>
</view>
<view class="right-r-box">
<view class="-title">商品名称</view>
<view class="-title">{{form.giftName}}</view>
<view class="b-bt">
<view class="h-size"> X1 </view>
<view class="r-size"> 1000 积分 </view>
<view class="h-size"> X{{form.exchangeQuantity}} </view>
<view class="r-size">
{{form.amount?"¥"+form.amount:''}}
{{form.amount && form.integral ? '+':''}}
{{form.integral ? form.integral+'积分':''}}
</view>
</view>
</view>
</view>
@ -38,25 +45,38 @@
<view class="t-top">订单信息</view>
<view class="gang-box">
<view class="left-size">订单编号</view>
<view class="right-size">1325468751325468235</view>
<view class="right-size">{{form.orderNumber}}</view>
</view>
<view class="gang-box">
<view class="left-size">快递单号</view>
<view class="right-size" v-if="shippingType == '物流配送'">
<span>{{form.courierCompanies}}{{form.theTrackingNumber}}</span>
</view>
<view class="right-size" else>门店自提</view>
</view>
<view class="gang-box">
<view class="left-size">兑换时间</view>
<view class="right-size">2023-03-24 1200</view>
<view class="right-size">{{form.createTime}}</view>
</view>
<view class="gang-box">
<view class="left-size">所需积分</view>
<view class="right-size">2000</view>
<view class="right-size">
{{form.amount?"¥"+form.amount:''}}
{{form.amount && form.integral ? '+':''}}
{{form.integral ? form.integral+'积分':''}}
</view>
</view>
</view>
<view class="d-box">
<view class="t-top">物流信息</view>
<u-steps current="1" direction="column">
<u-steps-item title="已下单" desc="10:30">
<u-steps :current="flag" direction="column">
<u-steps-item title="已下单" :desc="form.createTime">
</u-steps-item>
<u-steps-item title="已出库" desc="10:35">
<u-steps-item title="已发货" :desc="form.shippingTime?form.shippingTime:'--'">
</u-steps-item>
<u-steps-item title="运输中" desc="11:40"></u-steps-item>
<u-steps-item title="运输中"></u-steps-item>
</u-steps>
</view>
@ -66,17 +86,68 @@
</template>
<script>
import config from '@/config'
import request from '../../utils/request'
export default {
data() {
return {
title: '',
baseUrl: config.baseUrl,
pointsGoodsDetails: '',
flag: '0',
form: {
orderNumber: '',
createTime: '',
shippingTime: '',
integral: '',
coverImage: '',
giftName: '',
exchangeQuantity: '',
exchangeMethod: '',
shippingType: '',
amount: '',
courierCompanies: '',
theTrackingNumber: ''
}
}
},
components: {
},
onShow() {
uni.$on('pointsGoodsDetails', (data) => {
this.pointsGoodsDetails = data
if (this.pointsGoodsDetails != null) {
// this.dataProcessing()
this.form.orderNumber = this.pointsGoodsDetails.orderNumber
this.form.createTime = this.pointsGoodsDetails.createTime
this.form.coverImage = this.pointsGoodsDetails.coverImage
this.form.giftName = this.pointsGoodsDetails.giftName
this.form.exchangeQuantity = this.pointsGoodsDetails.exchangeQuantity
this.form.exchangeMethod = this.pointsGoodsDetails.exchangeMethod
this.form.integral = this.pointsGoodsDetails.integral
this.form.amount = this.pointsGoodsDetails.amount
this.form.shippingTime = this.pointsGoodsDetails.shippingTime
this.form.shippingType = this.pointsGoodsDetails.shippingType
this.form.courierCompanies = this.pointsGoodsDetails.courierCompanies
this.form.theTrackingNumber = this.pointsGoodsDetails.theTrackingNumber
//
if (this.pointsGoodsDetails.orderStatus) {
let status = this.pointsGoodsDetails.orderStatus;
if (status == '已发货') {
this.flag = 1
} else if (status == '已完成') {
this.flag = 2
}
}
}
})
uni.$emit('pointsGoodsDetailsUn')
},
methods: {
goback() {

View File

@ -15,7 +15,7 @@
</view>
</view>
<view class="goods-box" v-for="(item,index) in orderList">
<view class="goods-box" v-for="(item,index) in orderList" :key="item.id" @click="orderDetails(item)">
<view class="goods-top">
<view class="goods-img">
<image :src="baseUrl+item.coverImage" mode=""></image>
@ -24,7 +24,8 @@
<view class="title-s">{{item.giftName}}</view>
<view class="hui-s">{{item.createTime}}</view>
<view class="right-size">
<view class="jg">{{item.amount?"¥"+item.amount:''}}
<view class="jg">
{{item.amount?"¥"+item.amount:''}}
{{item.amount && item.integral ? '+':''}}
{{item.integral?item.integral+'积分':''}}
</view>
@ -135,6 +136,18 @@
}
})
},
//
orderDetails(data) {
console.log("dara", data)
uni.$on('pointsGoodsDetailsUn', function() {
uni.$emit('pointsGoodsDetails', data)
})
uni.navigateTo({
url: '/pagesHome/PointsGoodsDetails/PointsGoodsDetails',
})
},
confirmTheReceipt(data) {
let params = {
id: data,

View File

@ -18,7 +18,9 @@
积分签到
</view>
<view class="anniu" v-if="!flag">
已签到
<span v-if="flag2">已签到</span>
<span v-if="!flag2">未开通签到</span>
</view>
</view>
</view>
@ -55,7 +57,9 @@
title: '',
myPoints: 0, //
flag: true,
storeId: uni.getStorageSync('storeId')
flag2: true,
storeId: uni.getStorageSync('storeId'),
chainStoreId: uni.getStorageSync('chainStoreId'),
}
},
@ -66,13 +70,20 @@
this.getUserInfoList();
this.getTodayIsSignIn();
},
// onLoad() {
// this.getUserInfoList();
// this.getTodayIsSignIn();
// },
methods: {
//
getUserInfoList() {
request({
url: '/business/userManager/user/getByUniApp',
method: 'get',
// params:{}
params: {
chainStoreId: this.chainStoreId
}
}).then((res) => {
if (res.code == 200) {
this.myPoints = res.data.points
@ -100,8 +111,14 @@
if (res.code == 200) {
if (res.data != 0) {
this.flag = false
} else {
} else if (
res.data == -2
) {
this.flag = true
this.flag2 = true
} else {
this.flag2 = false
}
}
})