|
|
@@ -340,10 +340,12 @@ export default {
|
|
|
expectDeliveryTime: '', //预约送达时间
|
|
|
timer: '', //定时器
|
|
|
autoSendOrder: 0, //autoSendOrder为1商家自配,0平台配送
|
|
|
- reservationOpenFlag: 0 //1预约,0不预约
|
|
|
+ reservationOpenFlag: 0, //1预约,0不预约
|
|
|
+ status: null
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
+ console.log(option, '256')
|
|
|
// #ifdef APP
|
|
|
this.openLists = [
|
|
|
{
|
|
|
@@ -401,6 +403,14 @@ export default {
|
|
|
// #endif
|
|
|
|
|
|
this.shopId = option.shopId
|
|
|
+ this.orderType = option.orderType
|
|
|
+ if (option.orderId) {
|
|
|
+ this.orderId = option.orderId
|
|
|
+ }
|
|
|
+
|
|
|
+ if (option.status) {
|
|
|
+ this.status = option.status
|
|
|
+ }
|
|
|
// #ifndef H5
|
|
|
uni.getLocation({
|
|
|
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
|
|
|
@@ -423,11 +433,6 @@ export default {
|
|
|
this.getShopDet(this.shopId)
|
|
|
// #endif
|
|
|
|
|
|
- this.orderType = option.orderType
|
|
|
- if (option.orderId) {
|
|
|
- this.orderId = option.orderId
|
|
|
- }
|
|
|
-
|
|
|
uni.showLoading({
|
|
|
title: '加载中...',
|
|
|
mask: true // 是否显示透明蒙层,防止触摸穿透
|
|
|
@@ -966,6 +971,12 @@ export default {
|
|
|
})
|
|
|
this.paotuiMoney = 0
|
|
|
this.totalPrice1 = 0
|
|
|
+
|
|
|
+ if (this.status == 0) {
|
|
|
+ console.log(6666)
|
|
|
+ this.payContinue()
|
|
|
+ return
|
|
|
+ }
|
|
|
let data = {
|
|
|
shopId: this.shopId,
|
|
|
status: 1,
|
|
|
@@ -973,6 +984,7 @@ export default {
|
|
|
limit: 1000
|
|
|
// orderType: this.orderType
|
|
|
}
|
|
|
+ console.log(data)
|
|
|
this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
|
|
|
console.log(res)
|
|
|
uni.hideLoading()
|
|
|
@@ -1021,6 +1033,61 @@ export default {
|
|
|
uni.hideLoading()
|
|
|
})
|
|
|
},
|
|
|
+ payContinue() {
|
|
|
+ let data = {
|
|
|
+ orderId: this.orderId,
|
|
|
+ page: 1,
|
|
|
+ limit: 1000
|
|
|
+ }
|
|
|
+ console.log(data)
|
|
|
+ this.$Request.get('/app/order/selectOrder', data).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ uni.hideLoading()
|
|
|
+ if (res.code == 0 && res.data.pageUtils.list.length) {
|
|
|
+ this.GoodsorderId = res.data.pageUtils.list[0].orderId
|
|
|
+ this.dataList = res.data.pageUtils.list[0]
|
|
|
+
|
|
|
+ if (this.dataList && this.dataList.orderGoodsList && this.dataList.orderGoodsList[0]) {
|
|
|
+ this.dataList.orderGoodsList[0].forEach((res) => {
|
|
|
+ res.goodsPicture = res.goodsPicture.split(',')
|
|
|
+ this.dabaoMoney += res.goodsPack * res.goodsNum
|
|
|
+ this.goodsMoney += res.goodsPrice * res.goodsNum
|
|
|
+ this.goodsMoney = parseFloat(this.goodsMoney + this.dabaoMoney)
|
|
|
+ })
|
|
|
+ this.goodsList = this.dataList.orderGoodsList[0]
|
|
|
+ }
|
|
|
+ console.log(this.dataList, this.dabaoMoney, 'kkklll')
|
|
|
+
|
|
|
+ // this.paotuiMoney = this.dataList.errandMoney
|
|
|
+ if (this.ifPaotui == 1) {
|
|
|
+ this.paotuiMoney = this.dataList.errandMoney
|
|
|
+ } else if (this.ifPaotui == 0) {
|
|
|
+ // 判断商品金额是否大于最低减免配送费金额
|
|
|
+ console.log(this.goodsMoney, '商品总金额', res, this.dataList.exemptMinMoney)
|
|
|
+ if (Number(this.goodsMoney) >= Number(this.dataList.exemptMinMoney)) {
|
|
|
+ this.paotuiMoney = 0
|
|
|
+ } else {
|
|
|
+ this.paotuiMoney = this.dataList.errandMoney
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.totalPrice = res.data.money
|
|
|
+ if (this.orderType == 2) {
|
|
|
+ this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
+ } else {
|
|
|
+ this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
+ }
|
|
|
+
|
|
|
+ // console.log(this.dataList)
|
|
|
+ this.getCouponList()
|
|
|
+ this.getHuoList()
|
|
|
+ this.detCoupon()
|
|
|
+ this.getDistance()
|
|
|
+ }
|
|
|
+ // 加载提示关闭
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
+ },
|
|
|
selectWay(item) {
|
|
|
this.openWay = item.id
|
|
|
},
|