Merge branch 'master' into xbx

This commit is contained in:
luyuan 2020-09-01 16:07:30 +08:00
commit db13a1882d
7 changed files with 88 additions and 33 deletions

View File

@ -139,7 +139,7 @@ export default {
});
},
// 订单步骤2发起订单返回订单信息
sendOrder({ ifcart, cart_id, address_id, buy_city_id, pintuan_id, pintuangroup_id, voucher_id }) {
sendOrder({ ifcart, cart_id, address_id, buy_city_id, pintuan_id, pintuangroup_id, voucher_id, is_selfraising }) {
return vm.$u.post('buy/buy_step2', {
ifcart: ifcart,
cart_id: cart_id,
@ -148,6 +148,7 @@ export default {
pintuan_id: pintuan_id,
pintuangroup_id: pintuangroup_id,
voucher_id: voucher_id, // 优惠券信息
is_selfraising: is_selfraising, // 是否自提
});
},
// 订单步骤3发起支付第三方统一下单

View File

@ -9,7 +9,7 @@
<view class="text">{{ content.geval_content }}</view>
</view>
<view class="image-container">
<image :src="src" v-for="(src, index) in content.geval_image" :key="index" @click="previewImage(content.geval_image)"></image>
<image :src="src" v-for="(src, index) in content.geval_image" :key="index" @click="previewImage(content.geval_image, index)"></image>
</view>
<view class="reply" v-if="reply && content.geval_explain">
<view class="title">掌柜回复</view>
@ -41,11 +41,12 @@ export default {
if(this.content.hasOwnProperty('scores_two')) this.rate = this.content.scores_two;
},
methods: {
previewImage(urls) {
console.log(urls);
// uni.previewImage({
// urls: urls,
// });
previewImage(urls, index) {
// console.log(urls);
uni.previewImage({
urls: urls,
current: urls[index]
});
},
}
};

View File

@ -25,7 +25,7 @@
<view class="order-btn" v-if="[1, 2, 3, 4, 8, 11].indexOf(order.view_type) >= 0">
<!-- || order.view_type == 2 -->
<view class="cancel" v-if="(order.view_type == 3 || order.view_type == 2) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
<view class="cancel" v-if="order.view_type == 3 && order.shipping_code" @click="toOtherPage('Logistics')">查看物流</view>
<view class="cancel" v-if="order.view_type == 3 && order.shipping_code && order.is_selfraising != 1" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view>

View File

@ -49,7 +49,7 @@
<!-- <navs :value="'选择尺码'"></navs> -->
<view class="comment">
<view class="title">
<view class="left">商品评价{{ evaluate.evaluate_num }}</view>
<view class="left">商品评价{{ evaluate.evaluate_num || '0' }}</view>
<view class="right" @click="viewComment">
<text>查看全部</text>
<image src="/static/image/common/1.png"></image>

View File

@ -48,6 +48,10 @@
</view>
</view>
</view>
<view class="pick-up" v-if="is_selfraising == 1">
<view class="title">自提地址</view>
<view class="content">{{ orderInfo.store_list[index].store_address }}</view>
</view>
</view>
</view>
<view class="common-active">
@ -107,9 +111,15 @@ export default {
deliveryList: [{
text: '快递',
value: 'express',
disabled: false,
}, {
text: '骑手',
value: 'takeawayer',
disabled: false,
}, {
text: '自提',
value: 'selfraising',
disabled: false,
}],
delivery: {
text: '快递',
@ -123,6 +133,7 @@ export default {
goodsClass: [],
orderType: '', // 1 2 3 4 5
debounce: true,
is_selfraising: 0, // 0=1=
}
},
components: {
@ -148,6 +159,8 @@ export default {
onLoad(option) {
this.orderType = this.$store.state.orderType;
this.orderInfo = this.$store.state.orderInfo;
//
if(!this.orderInfo.is_selfraising) this.deliveryList[2].disabled = true;
// console.log('orderType' + this.orderType);
// console.log(this.orderInfo);
this.getGoodsClass();
@ -182,8 +195,10 @@ export default {
// console.log(this.orderInfo);
// console.log(this.$store.state.pintuangroup_headid);
if(this.orderInfo.pintuangroup_id) {
Object.assign(params, { pintuangroup_headid: this.$store.state.pintuangroup_headid });
Object.assign(params, { pintuangroup_id: this.orderInfo.pintuangroup_id });
Object.assign(params, {
pintuangroup_headid: this.$store.state.pintuangroup_headid,
pintuangroup_id: this.orderInfo.pintuangroup_id
});
}
console.log(params);
this.$u.api.withImmediate(params).then(res => {
@ -249,6 +264,7 @@ export default {
cart_id: id,
address_id: this.addressInfo.address_id,
buy_city_id: this.addressInfo.city_id,
is_selfraising: this.is_selfraising,
}
if(coupon.length) Object.assign(params, { voucher_id: coupon });
if(this.orderType == 2) {
@ -262,10 +278,10 @@ export default {
type: 'redirect',
url: '/pageC/cart/cashier',
params: {
ifcart: params.ifcart,
ifcart: ifcart,
pay_sn: res.data.pay_sn,
price: res.data.order_total_amount,
order_id: res.data.order_list[0].order_id,
order_id: res.data.order_list[0].order_id,
}
})
} else {
@ -282,13 +298,8 @@ export default {
this.couponStatus = true;
},
useCoupon(coupon) {
console.log(coupon)
// console.log(coupon)
if(this.couponType.type == 1){
this.choiceCoupon = {}
for(let i in this.orderInfo.store_voucher_all_list){
if(this.orderInfo.store_voucher_all_list[i].voucher_id == coupon.voucher_id && !this.orderInfo.store_voucher_all_list[i].sel){
@ -338,23 +349,23 @@ export default {
const goods = this.orderInfo.store_goods_total;
let [freight, price, minPrice] = [0, 0, 0];
//
for (const key in this.freight) {
if (this.freight.hasOwnProperty(key)) {
for(const key in this.freight) {
if(this.freight.hasOwnProperty(key)) {
const element = this.freight[key];
freight += Number(element);
}
}
//
//
for (const gid in goods) {
if (goods.hasOwnProperty(gid)) {
for(const gid in goods) {
if(goods.hasOwnProperty(gid)) {
//
minPrice += 0.01;
//
let sprice = Number(goods[gid]);
if(JSON.stringify(this.storeCoupon) != '{}') {
for (const cid in this.storeCoupon) {
if (this.storeCoupon.hasOwnProperty(cid)) {
for(const cid in this.storeCoupon) {
if(this.storeCoupon.hasOwnProperty(cid)) {
const cprice = this.storeCoupon[cid];
//
if(gid == cid) {
@ -378,13 +389,31 @@ export default {
// console.log("price:" + price);
this.totalPrice = (price + freight).toFixed(2);
},
setDelivery(index) {
async setDelivery(index) {
// console.log(index);
if(index == 1) {
if(!this.isTakeawayer) this.$u.toast('此地区不支持骑手配送');
return false;
this.delivery = this.deliveryList[index];
this.getFreight();
}
if(index == 2) {
this.is_selfraising = 1;
for (const key in this.freight) {
if (this.freight.hasOwnProperty(key)) {
this.freight[key] = '0.00';
}
}
this.isTakeawayer = false;
this.setTotalPrice(); //
this.delivery = this.deliveryList[index];
} else {
this.is_selfraising = 0;
}
if(index == 0) {
this.delivery = this.deliveryList[index];
this.getFreight();
}
this.delivery = this.deliveryList[index];
this.getFreight();
},
settlement() {
uni.navigateTo({
@ -409,6 +438,7 @@ export default {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
padding-top: 1rpx;
padding-bottom: 200rpx;
.info-address {
padding: 30rpx;
display: flex;
@ -471,7 +501,7 @@ export default {
height: 60rpx;
border-radius: 50%;
margin-right: 15rpx;
background-color: aquamarine;
// background-color: aquamarine;
}
> view {
font-size: 28rpx;
@ -479,6 +509,7 @@ export default {
margin-right: 15rpx;
}
.right {
margin-left: auto;
flex-shrink: 0;
width: 11rpx;
height: 22rpx;
@ -496,7 +527,7 @@ export default {
width: 180rpx;
height: 160rpx;
border-radius: 10rpx;
background-color: aqua;
// background-color: aqua;
flex-shrink: 0;
}
.info {
@ -565,10 +596,24 @@ export default {
}
}
}
.pick-up {
padding: 30rpx;
background: rgba(255,255,255,1);
.title {
font-size: 28rpx;
color: #666666;
margin-bottom: 30rpx;
}
.content {
font-size: 30rpx;
color: #343434;
line-height: 40rpx;
}
}
}
}
.common-active {
padding-bottom: 200rpx;
padding-bottom: 30rpx;
> view {
height: 98rpx;
background: rgba(255,255,255,1);

View File

@ -59,12 +59,17 @@
<view class="title">支付方式</view>
<view class="price">{{ orderInfo.payment_name }}</view>
</view>
<view v-if="orderInfo.is_selfraising == 1">
<view class="title">配送方式</view>
<view class="price">自提</view>
</view>
</view>
</view>
<view class="info-order">
<view>订单编号{{ orderInfo.order_sn }}</view>
<view>支付单号{{ orderInfo.pay_sn }}</view>
<view>创建时间{{ orderInfo.add_time | date}}</view>
<view v-if="orderInfo.is_selfraising == 1" class="address">自提地址{{ orderInfo.extend_store.store_address }}</view>
</view>
</view>
<!-- '4', '8' -->
@ -75,7 +80,7 @@
<view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
<!-- <view class="cancel" v-if="orderstate == '8'" @click="cancelOrder">取消订单</view> -->
<view class="cancel" v-if="orderstate == '1' && orderInfo.shipping_code" @click="toOtherPage('Logistics')">查看物流</view>
<view class="cancel" v-if="orderstate == '1' && orderInfo.shipping_code && orderInfo.is_selfraising != 1" @click="toOtherPage('Logistics')">查看物流</view>
<view class="phone" v-if="orderstate == '1' && orderInfo.takeawayer_mobile" @click="makePhone(orderInfo.takeawayer_mobile)">
<u-icon name="phone-fill" color="#FF780F" size="28"></u-icon>
<text>联系骑手</text>
@ -460,6 +465,9 @@ export default {
> view:not(:last-child) {
margin-bottom: 30rpx;
}
.address {
line-height: 40rpx;
}
}
}
.btn {

View File

@ -135,7 +135,7 @@
"backgroundColor":"#ffffff",
"buttons": [
{
// "type":"none",
"type":"none",
"text":"\ue503",
"float":"right",
"fontSize":"20",