Browse Source

增加核销和门店订单

master
Gao xiaosong 5 years ago
parent
commit
f1f70c2066
  1. 4
      config/index.js
  2. 13
      pages/order/MyOrder/index.vue
  3. 146
      pages/order/OrderDetails/index.vue
  4. 323
      pages/order/OrderSubmission/index.vue
  5. 101
      pages/orderAdmin/OrderCancellation/index.vue
  6. 40
      pages/shop/StoreList/index.vue
  7. 6
      pages/user/UserAccount/index.vue
  8. 1
      pages/user/UserBill/index.vue
  9. 15
      store/index.js

4
config/index.js

@ -1,4 +1,4 @@
export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://h5api.dayouqiantu.cn/api'; export const VUE_APP_API_URL = 'https://h5api.dayouqiantu.cn/api';
export const VUE_APP_RESOURCES_URL = 'https://h5.dayouqiantu.cn/static'; export const VUE_APP_RESOURCES_URL = 'https://h5.dayouqiantu.cn/static';

13
pages/order/MyOrder/index.vue

@ -38,13 +38,14 @@
<view class="item" v-for="(order,orderListIndex) in orderList" :key="orderListIndex"> <view class="item" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
<view class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<text <span
class="sign cart-color acea-row row-center-wrapper" class="sign cart-color acea-row row-center-wrapper"
v-if="order.combinationId > 0" v-if="order.combinationId > 0"
>拼团</text> >拼团</span>
<text class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</text> <span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span>
<text class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</text> <span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span>
<data-format :date="order.addTime"></data-format> <span class="sign cart-color acea-row row-center-wrapper" v-if="order.storeId > 0">门店</span>
{{ dataFormat(order.addTime) }}
</view> </view>
<view class="font-color-red">{{ getStatus(order) }}</view> <view class="font-color-red">{{ getStatus(order) }}</view>
</view> </view>
@ -200,7 +201,7 @@ export default {
}, },
computed: mapGetters(["userInfo"]), computed: mapGetters(["userInfo"]),
onShow: function() { onShow: function() {
console.log(this) console.log(this);
this.type = parseInt(this.$yroute.query.type) || 0; this.type = parseInt(this.$yroute.query.type) || 0;
this.changeType(this.type); this.changeType(this.type);
this.getOrderData(); this.getOrderData();

146
pages/order/OrderDetails/index.vue

@ -45,7 +45,7 @@
'bg-color-red': 'bg-color-red':
status.type > 1 && status.type != 6 && status.type != 9 status.type > 1 && status.type != 6 && status.type != 9
}" }"
v-if="orderInfo.shipping_type === 1" v-if="orderInfo.shippingType === 1"
></view> ></view>
<view <view
class="iconfont" class="iconfont"
@ -91,66 +91,60 @@
></view> ></view>
</view> </view>
</view> </view>
<!--<view--> <div class="writeOff" v-if="orderInfo.shippingType === 2 && orderInfo.paid === 1">
<!--class="writeOff"--> <div class="title">核销信息</div>
<!--v-if="orderInfo.shipping_type === 2 && orderInfo.paid === 1"--> <div class="grayBg">
<!--&gt;--> <div class="pictrue">
<!--<view class="title">核销信息</view>--> <img :src="orderInfo.code" />
<!--<view class="grayBg">--> </div>
<!--<view class="pictrue"><image :src="orderInfo.code" /></view>--> </div>
<!--</view>--> <div class="gear">
<!--<view class="gear"><image src="@/static/images/writeOff.jpg" /></view>--> <img src="@/static/images/writeOff.jpg" />
<!--<view class="num">{{ orderInfo._verify_code }}</view>--> </div>
<!--<!--<!--<!--<text class="rules">--> <div class="num">{{ orderInfo.verifyCode }}</div>
<!--<!--<!--<text class="item">--> <div class="rules">
<!--<!--<text class="rulesTitle acea-row row-middle">--> <div class="item">
<!--<text class="iconfont icon-shijian"></text>核销时间--> <div class="rulesTitle acea-row row-middle">
<!--</!--<text>--> <span class="iconfont icon-shijian"></span>核销时间
<!--<view class="info">--> </div>
<!--{{ system_store._valid_time--> <div class="info">
<!--}}<text class="time">{{ system_store.day_time }}</text>--> 每日
<!--</view>--> <span class="time">{{ system_store.dayTime }}</span>
<!--</!--<!--<text>--> </div>
<!--<view class="item">--> </div>
<!--<view class="rulesTitle acea-row row-middle">--> <div class="item">
<!--<text class="iconfont icon-shuoming1"></text>使用说明--> <div class="rulesTitle acea-row row-middle">
<!--</view>--> <span class="iconfont icon-shuoming1"></span>使用说明
<!--<view class="info">可将二维码出示给店员扫描或提供数字核销码</view>--> </div>
<!--</view>--> <div class="info">可将二维码出示给店员扫描或提供数字核销码</div>
<!--</!--<!--<!--<text>--> </div>
<!--</!--<!--<!--<!--<text>--> </div>
<!--<view--> </div>
<!--class="map acea-row row-between-wrapper"--> <div
<!--v-if="orderInfo.shipping_type === 2 && orderInfo.paid === 1"--> class="map acea-row row-between-wrapper"
<!--&gt;--> v-if="orderInfo.shippingType === 2 && orderInfo.paid === 1"
<!--<view>自提地址信息</view>--> >
<!--<view--> <div>自提地址信息</div>
<!--class="place cart-color acea-row row-center-wrapper"--> <div class="place cart-color acea-row row-center-wrapper" @click="showChang">
<!--@click="showChang"--> <span class="iconfont icon-weizhi"></span>查看位置
<!--&gt;--> </div>
<!--<text class="iconfont icon-weizhi"></text>查看位置--> </div>
<!--</view>-->
<!--</view>-->
<view class="address" v-if="orderInfo.shippingType === 1"> <view class="address" v-if="orderInfo.shippingType === 1">
<view class="name"> <view class="name">
{{ orderInfo.realName {{ orderInfo.realName }}
}}
<text class="phone">{{ orderInfo.userPhone }}</text> <text class="phone">{{ orderInfo.userPhone }}</text>
<text class="iconfont icon-tonghua font-color-red"></text> <text class="iconfont icon-tonghua font-color-red"></text>
</view> </view>
<view>{{ orderInfo.userAddress }}</view> <view>{{ orderInfo.userAddress }}</view>
</view> </view>
<!--<view class="address" v-else>--> <div class="address" v-else>
<!--<view class="name">--> <div class="name">
<!--{{ system_store.name--> {{ system_store.name}}
<!--}}<text class="phone">{{ system_store.phone }}</text>--> <span class="phone">{{ system_store.phone }}</span>
<!--<a--> <span class="iconfont icon-tonghua font-color-red" :href="'tel:' + system_store.phone"></span>
<!--class="iconfont icon-tonghua font-color-red"--> </div>
<!--:href="'tel:' + system_store.phone"--> <div>{{ system_store.address }}</div>
<!--&gt;</a>--> </div>
<!--</view>-->
<!--<view>{{ system_store._detailed_address }}</view>-->
<!--</view>-->
<view class="line" v-if="orderInfo.shippingType === 1"> <view class="line" v-if="orderInfo.shippingType === 1">
<image src="@/static/images/line.jpg" /> <image src="@/static/images/line.jpg" />
</view> </view>
@ -160,8 +154,7 @@
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>订单编号</view> <view>订单编号</view>
<view class="conter acea-row row-middle row-right"> <view class="conter acea-row row-middle row-right">
{{ orderInfo.orderId {{ orderInfo.orderId }}
}}
<text class="copy copy-data" @click="copyClipboard(orderInfo.orderId)">复制</text> <text class="copy copy-data" @click="copyClipboard(orderInfo.orderId)">复制</text>
</view> </view>
</view> </view>
@ -272,9 +265,7 @@
<template v-if="status.type == 2"> <template v-if="status.type == 2">
<view <view
class="bnt default" class="bnt default"
@click=" @click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})"
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
"
>查看物流</view> >查看物流</view>
<view class="bnt bg-color-red" @click="takeOrder">确认收货</view> <view class="bnt bg-color-red" @click="takeOrder">确认收货</view>
</template> </template>
@ -319,13 +310,11 @@
top: 0; top: 0;
z-index: 10000; z-index: 10000;
} }
.order-details .writeOff { .order-details .writeOff {
background-color: #fff; background-color: #fff;
margin-top: 0.13 * 100rpx; margin-top: 0.13 * 100rpx;
padding-bottom: 0.3 * 100rpx; padding-bottom: 0.3 * 100rpx;
} }
.order-details .writeOff .title { .order-details .writeOff .title {
font-size: 0.3 * 100rpx; font-size: 0.3 * 100rpx;
color: #282828; color: #282828;
@ -334,7 +323,6 @@
padding: 0 0.3 * 100rpx; padding: 0 0.3 * 100rpx;
line-height: 0.87 * 100rpx; line-height: 0.87 * 100rpx;
} }
.order-details .writeOff .grayBg { .order-details .writeOff .grayBg {
background-color: #f2f5f7; background-color: #f2f5f7;
width: 5.9 * 100rpx; width: 5.9 * 100rpx;
@ -343,31 +331,26 @@
margin: 0.5 * 100rpx auto 0 auto; margin: 0.5 * 100rpx auto 0 auto;
padding-top: 0.55 * 100rpx; padding-top: 0.55 * 100rpx;
} }
.order-details .writeOff .grayBg .pictrue { .order-details .writeOff .grayBg .pictrue {
width: 2.9 * 100rpx; width: 2.9 * 100rpx;
height: 2.9 * 100rpx; height: 2.9 * 100rpx;
margin: 0 auto; margin: 0 auto;
} }
.order-details .writeOff .grayBg .pictrue img {
.order-details .writeOff .grayBg .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
.order-details .writeOff .gear { .order-details .writeOff .gear {
width: 5.9 * 100rpx; width: 5.9 * 100rpx;
height: 0.3 * 100rpx; height: 0.3 * 100rpx;
margin: 0 auto; margin: 0 auto;
} }
.order-details .writeOff .gear img {
.order-details .writeOff .gear image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
.order-details .writeOff .num { .order-details .writeOff .num {
background-color: #f0c34c; background-color: #f0c34c;
width: 5.9 * 100rpx; width: 5.9 * 100rpx;
@ -379,50 +362,42 @@
text-align: center; text-align: center;
padding-top: 0.04 * 100rpx; padding-top: 0.04 * 100rpx;
} }
.order-details .writeOff .rules { .order-details .writeOff .rules {
margin: 0.46 * 100rpx 0.3 * 100rpx 0 0.3 * 100rpx; margin: 0.46 * 100rpx 0.3 * 100rpx 0 0.3 * 100rpx;
border-top: 0.01 * 100rpx solid #f0f0f0; border-top: 0.01 * 100rpx solid #f0f0f0;
padding-top: 0.1 * 100rpx; padding-top: 0.1 * 100rpx;
} }
.order-details .writeOff .rules .item { .order-details .writeOff .rules .item {
margin-top: 0.15 * 100rpx; margin-top: 0.15 * 100rpx;
} }
.order-details .writeOff .rules .item .rulesTitle { .order-details .writeOff .rules .item .rulesTitle {
font-size: 0.28 * 100rpx; font-size: 0.28 * 100rpx;
color: #282828; color: #282828;
} }
.order-details .writeOff .rules .item .rulesTitle .iconfont { .order-details .writeOff .rules .item .rulesTitle .iconfont {
font-size: 0.3 * 100rpx; font-size: 0.3 * 100rpx;
color: #333; color: #333;
margin-right: 0.08 * 100rpx; margin-right: 0.08 * 100rpx;
margin-top: 0.05 * 100rpx; margin-top: 0.05 * 100rpx;
} }
.order-details .writeOff .rules .item .info { .order-details .writeOff .rules .item .info {
font-size: 0.28 * 100rpx; font-size: 0.28 * 100rpx;
color: #999; color: #999;
margin-top: 0.05 * 100rpx; margin-top: 0.05 * 100rpx;
} }
.order-details .writeOff .rules .item .info .time { .order-details .writeOff .rules .item .info .time {
margin-left: 0.2 * 100rpx; margin-left: 0.2 * 100rpx;
} }
.order-details .map { .order-details .map {
height: 0.86 * 100rpx; height: 0.86 * 100rpx;
font-size: 0.3 * 100rpx; font-size: 0.3 * 100rpx;
color: #282828; color: #282828;
line-height: 0.86 * 100rpx; line-height: 0.86 * 100rpx;
border-bottom: 1rpx solid #f0f0f0; border-bottom: 0.01 * 100rpx solid #f0f0f0;
margin-top: 0.13 * 100rpx; margin-top: 0.13 * 100rpx;
background-color: #fff; background-color: #fff;
padding: 0 0.3 * 100rpx; padding: 0 0.3 * 100rpx;
} }
.order-details .map .place { .order-details .map .place {
font-size: 0.26 * 100rpx; font-size: 0.26 * 100rpx;
width: 1.76 * 100rpx; width: 1.76 * 100rpx;
@ -431,14 +406,12 @@
line-height: 0.5 * 100rpx; line-height: 0.5 * 100rpx;
text-align: center; text-align: center;
} }
.order-details .map .place .iconfont { .order-details .map .place .iconfont {
font-size: 0.27 * 100rpx; font-size: 0.27 * 100rpx;
height: 0.27 * 100rpx; height: 0.27 * 100rpx;
line-height: 0.27 * 100rpx; line-height: 0.27 * 100rpx;
margin: 0.02 * 100rpx 0.03 * 100rpx 0 0; margin: 0.02 * 100rpx 0.03 * 100rpx 0 0;
} }
.order-details .address .name .iconfont { .order-details .address .name .iconfont {
font-size: 0.34 * 100rpx; font-size: 0.34 * 100rpx;
margin-left: 0.1 * 100rpx; margin-left: 0.1 * 100rpx;
@ -528,7 +501,7 @@ export default {
latitude: this.system_store.latitude, latitude: this.system_store.latitude,
longitude: this.system_store.longitude, longitude: this.system_store.longitude,
name: this.system_store.name, name: this.system_store.name,
address: this.system_store._detailed_address address: this.system_store.address
}; };
} else { } else {
if (!this.mapKey) if (!this.mapKey)
@ -546,7 +519,7 @@ export default {
this.$yrouter.back(); this.$yrouter.back();
return; return;
} else { } else {
console.log(this) console.log(this);
this.$yrouter.replace({ this.$yrouter.replace({
path: "/pages/order/MyOrder/index" path: "/pages/order/MyOrder/index"
}); });
@ -556,7 +529,6 @@ export default {
cancelOrder() { cancelOrder() {
cancelOrderHandle(this.orderInfo.orderId) cancelOrderHandle(this.orderInfo.orderId)
.then(() => { .then(() => {
setTimeout(() => this.goBack(), 300); setTimeout(() => this.goBack(), 300);
}) })
.catch(() => { .catch(() => {
@ -582,9 +554,7 @@ export default {
}, },
getOrderStatus: function() { getOrderStatus: function() {
let orderInfo = this.orderInfo || {}, let orderInfo = this.orderInfo || {},
_status = orderInfo._status || { _status = orderInfo._status || { _type: 0 },
_type: 0
},
status = {}; status = {};
let type = parseInt(_status._type), let type = parseInt(_status._type),
delivery_type = orderInfo.deliveryType, delivery_type = orderInfo.deliveryType,
@ -642,7 +612,7 @@ export default {
this.orderTypeName = "秒杀订单"; this.orderTypeName = "秒杀订单";
this.orderTypeNameStatus = false; this.orderTypeNameStatus = false;
} }
this.system_store = res.data.system_store || {}; this.system_store = res.data.systemStore || {};
this.mapKey = res.data.mapKay; this.mapKey = res.data.mapKay;
this.setOfflinePayStatus(this.orderInfo.offlinePayStatus); this.setOfflinePayStatus(this.orderInfo.offlinePayStatus);
}) })
@ -660,6 +630,6 @@ export default {
await payOrderHandle(this.orderInfo.orderId, type, that.from); await payOrderHandle(this.orderInfo.orderId, type, that.from);
that.getDetail(); that.getDetail();
} }
}, }
}; };
</script> </script>

323
pages/order/OrderSubmission/index.vue

@ -1,11 +1,25 @@
<template> <template>
<view class="order-submission"> <view class="order-submission">
<view class="allAddress"> <view class="allAddress" :style="systemStore ? '' : 'padding-top: 0.2*100rpx'">
<view class="nav acea-row"> <view class="nav acea-row">
<view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)"></view> <view
<view class="item font-color-red" :class="shipping_type === 1 ? 'on' : 'on2'" @click="addressType(1)" v-if="storeSelfMention"></view> class="item font-color-red"
</view> :class="shipping_type === 0 ? 'on' : 'on2'"
<view class="address acea-row row-between-wrapper" v-if="shipping_type === 0" @click="addressTap"> @click="addressType(0)"
v-if="systemStore"
></view>
<view
class="item font-color-red"
:class="shipping_type === 1 ? 'on' : 'on2'"
@click="addressType(1)"
v-if="storeSelfMention"
></view>
</view>
<view
class="address acea-row row-between-wrapper"
v-if="shipping_type === 0"
@click="addressTap"
>
<view class="addressCon" v-if="addressInfo.realName"> <view class="addressCon" v-if="addressInfo.realName">
<view class="name"> <view class="name">
{{ addressInfo.realName }} {{ addressInfo.realName }}
@ -13,8 +27,7 @@
</view> </view>
<view> <view>
<text class="default font-color-red" v-if="addressInfo.isDefault">[默认]</text> <text class="default font-color-red" v-if="addressInfo.isDefault">[默认]</text>
{{ addressInfo.province }}{{ addressInfo.city {{ addressInfo.province }}{{ addressInfo.city}}{{ addressInfo.district }}{{ addressInfo.detail }}
}}{{ addressInfo.district }}{{ addressInfo.detail }}
</view> </view>
</view> </view>
<view class="addressCon" v-else> <view class="addressCon" v-else>
@ -22,17 +35,18 @@
</view> </view>
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </view>
<!--<view class="address acea-row row-between-wrapper" v-else>--> <div class="address acea-row row-between-wrapper" v-else @click="showStoreList">
<!--<view class="addressCon">--> <div class="addressCon">
<!--<view class="name">--> <div class="name">
<!--{{ systemStore.name }}--> {{ storeItems.name || systemStore.name }}
<!--<text class="phone">{{ systemStore.phone }}</text>--> <span
<!--</view>--> class="phone"
<!--<view>--> >{{storeItems.phone || systemStore.phone}}</span>
<!--{{ systemStore._detailed_address }}--> </div>
<!--</view>--> <div>{{ storeItems.address || systemStore.address }}</div>
<!--</view>--> </div>
<!--</view>--> <div class="iconfont icon-jiantou"></div>
</div>
<view class="line"> <view class="line">
<image src="@/static/images/line.jpg" /> <image src="@/static/images/line.jpg" />
</view> </view>
@ -46,7 +60,10 @@
<text class="iconfont icon-jiantou"></text> <text class="iconfont icon-jiantou"></text>
</view> </view>
</view> </view>
<view class="item acea-row row-between-wrapper" v-if="deduction === false"> <view
class="item acea-row row-between-wrapper"
v-if="deduction === false && enableIntegral === true"
>
<view>积分抵扣</view> <view>积分抵扣</view>
<view class="discount"> <view class="discount">
<view class="select-btn"> <view class="select-btn">
@ -98,21 +115,33 @@
<view class="item"> <view class="item">
<view>支付方式</view> <view>支付方式</view>
<view class="list"> <view class="list">
<view class="payItem acea-row row-middle" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')" <view
v-show="isWeixin"> class="payItem acea-row row-middle"
:class="active === 'weixin' ? 'on' : ''"
@click="payItem('weixin')"
v-show="isWeixin"
>
<view class="name acea-row row-center-wrapper"> <view class="name acea-row row-center-wrapper">
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付
</view> </view>
<view class="tip">微信快捷支付</view> <view class="tip">微信快捷支付</view>
</view> </view>
<view class="payItem acea-row row-middle" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')" <view
v-show="!isWeixin"> class="payItem acea-row row-middle"
:class="active === 'weixin' ? 'on' : ''"
@click="payItem('weixin')"
v-show="!isWeixin"
>
<view class="name acea-row row-center-wrapper"> <view class="name acea-row row-center-wrapper">
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付
</view> </view>
<view class="tip">微信快捷支付</view> <view class="tip">微信快捷支付</view>
</view> </view>
<view class="payItem acea-row row-middle" :class="active === 'yue' ? 'on' : ''" @click="payItem('yue')"> <view
class="payItem acea-row row-middle"
:class="active === 'yue' ? 'on' : ''"
@click="payItem('yue')"
>
<view class="name acea-row row-center-wrapper"> <view class="name acea-row row-center-wrapper">
<view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付 <view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付
</view> </view>
@ -147,135 +176,135 @@
</view> </view>
<view class="settlement" @click="createOrder">立即结算</view> <view class="settlement" @click="createOrder">立即结算</view>
</view> </view>
<CouponListWindow v-on:couponchange="changecoupon($event)" v-model="showCoupon" :price="orderPrice.totalPrice" <CouponListWindow
:checked="usableCoupon.id" @checked="changeCoupon"></CouponListWindow> v-on:couponchange="changecoupon($event)"
<AddressWindow @checked="changeAddress" @redirect="addressRedirect" v-model="showAddress" :checked="addressInfo.id" v-model="showCoupon"
ref="mychild"></AddressWindow> :price="orderPrice.totalPrice"
:checked="usableCoupon.id"
@checked="changeCoupon"
></CouponListWindow>
<AddressWindow
@checked="changeAddress"
@redirect="addressRedirect"
v-model="showAddress"
:checked="addressInfo.id"
ref="mychild"
></AddressWindow>
</view> </view>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.order-submission .wrapper .shipping select { .order-submission .wrapper .shipping select {
color: #999; color: #999;
padding-right: 0.15*100rpx; padding-right: 0.15 * 100rpx;
} }
.order-submission .wrapper .shipping .iconfont { .order-submission .wrapper .shipping .iconfont {
font-size: 0.3*100rpx; font-size: 0.3 * 100rpx;
color: #515151; color: #515151;
} }
.order-submission .allAddress { .order-submission .allAddress {
width: 100%; width: 100%;
background-image: linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%); background-image: linear-gradient(to bottom, #00c17b 0%, #00c17b 100%);
background-image: -webkit-linear-gradient(to bottom, background-image: -webkit-linear-gradient(
#e93323 0%, to bottom,
#f5f5f5 100%); #00c17b 0%,
background-image: -moz-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%); #00c17b 100%
padding-top: 0.2*100rpx; );
} background-image: -moz-linear-gradient(to bottom, #00c17b 0%, #00c17b 100%);
padding-top: 1 * 100rpx;
}
.order-submission .allAddress .nav { .order-submission .allAddress .nav {
width: 7.1*100rpx;
margin: 0 auto; margin: 0 auto;
} padding: 0 30rpx;
width: 100%;
box-sizing: border-box;
}
.order-submission .allAddress .nav .item { .order-submission .allAddress .nav .item {
width: 3.55*100rpx; flex: 1;
} position: relative;
}
.order-submission .allAddress .nav .item.on { .order-submission .allAddress .nav .item.on {
position: relative; position: relative;
width: 2.5*100rpx; }
}
.order-submission .allAddress .nav .item.on:before { .order-submission .allAddress .nav .item.on:before {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
/*content: "快递配送";*/ content: "快递配送";
font-size: 0.28*100rpx; font-size: 0.28 * 100rpx;
display: block; display: block;
height: 0; height: 0;
width: 3.55*100rpx; left: 0;
border-width: 0 0.2*100rpx 0.8*100rpx 0; right: 0;
border-style: none solid solid; border-width: 0.4 * 100rpx;
border-color: transparent transparent #fff; border-style: solid;
border-color: #fff;
z-index: 9; z-index: 9;
border-radius: 0.07*100rpx 0.3*100rpx 0 0;
text-align: center; text-align: center;
line-height: 0.8*100rpx; line-height: 0.14 * 100rpx;
} }
.order-submission .allAddress .nav .item:nth-of-type(2).on:before { .order-submission .allAddress .nav .item:nth-of-type(2).on:before {
content: "到店自提"; content: "到店自提";
border-width: 0 0 0.8*100rpx 0.2*100rpx; border-width: 0.4 * 100rpx;
border-radius: 0.3*100rpx 0.07*100rpx 0 0; }
}
.order-submission .allAddress .nav .item.on2 { .order-submission .allAddress .nav .item.on2 {
position: relative; position: relative;
} }
.order-submission .allAddress .nav .item.on2:before { .order-submission .allAddress .nav .item.on2:before {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
content: "到店自提"; content: "到店自提";
font-size: 0.28*100rpx; font-size: 0.28 * 100rpx;
display: block; display: block;
height: 0; height: 0;
width: 4.6*100rpx; left: 0;
border-width: 0 0 0.6*100rpx 0.6*100rpx; right: 0;
border-style: none solid solid; border-width: 0.4 * 100rpx;
border-color: transparent transparent #f7c1bd; border-style: solid;
border-radius: 0.4*100rpx 0.06*100rpx 0 0; border-color: #d5e6e6;
text-align: center; text-align: center;
line-height: 0.6*100rpx; line-height: 0.14 * 100rpx;
} }
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before { .order-submission .allAddress .nav .item:nth-of-type(1).on2:before {
content: "快递配送"; content: "快递配送";
border-width: 0 0.6*100rpx 0.6*100rpx 0; border-width: 0.4 * 100rpx;
border-radius: 0.06*100rpx 0.4*100rpx 0 0; }
}
.order-submission .allAddress .address { .order-submission .allAddress .address {
box-sizing: border-box; width: 7.1 * 100rpx;
width: 100%; height: 1.5 * 100rpx;
height: 1.5*100rpx;
margin: 0 auto; margin: 0 auto;
} }
.order-submission .allAddress .line { .order-submission .allAddress .line {
box-sizing: border-box; width: 7.1 * 100rpx;
width: 100%;
margin: 0 auto; margin: 0 auto;
} }
.order-submission .wrapper .item .discount input::placeholder { .order-submission .wrapper .item .discount input::placeholder {
color: #ccc; color: #ccc;
} }
</style> </style>
<script> <script>
import OrderGoods from "@/components/OrderGoods"; import OrderGoods from "@/components/OrderGoods";
import CouponListWindow from "@/components/CouponListWindow"; import CouponListWindow from "@/components/CouponListWindow";
import AddressWindow from "@/components/AddressWindow"; import AddressWindow from "@/components/AddressWindow";
import { import { postOrderConfirm, postOrderComputed, createOrder } from "@/api/order";
postOrderConfirm, import { mapGetters } from "vuex";
postOrderComputed, import { weappPay } from "@/libs/wechat";
createOrder import { isWeixin } from "@/utils";
} from "@/api/order";
import {
mapGetters
} from "vuex";
import {
weappPay
} from "@/libs/wechat";
import {
isWeixin
} from "@/utils";
const NAME = "OrderSubmission", const NAME = "OrderSubmission",
_isWeixin = isWeixin(); _isWeixin = isWeixin();
export default { export default {
name: NAME, name: NAME,
components: { components: {
OrderGoods, OrderGoods,
@ -287,11 +316,12 @@
return { return {
offlinePayStatus: 2, offlinePayStatus: 2,
from: this.$deviceType, from: this.$deviceType,
// from: _isWeixin ? "weixin" : "weixinh5",
deduction: true, deduction: true,
enableIntegral: true,
enableIntegralNum: 0,
isWeixin: _isWeixin, isWeixin: _isWeixin,
pinkId: 0, pinkId: 0,
active: "weixin", active: _isWeixin ? "weixin" : "yue",
showCoupon: false, showCoupon: false,
showAddress: false, showAddress: false,
addressInfo: {}, addressInfo: {},
@ -306,14 +336,14 @@
payPrice: "计算中" payPrice: "计算中"
}, },
mark: "", mark: "",
system_store: {}, systemStore: {},
shipping_type: 0, shipping_type: 0,
contacts: "", contacts: "",
contactsTel: "", contactsTel: "",
store_self_mention: 0 storeSelfMention: 0
}; };
}, },
computed: mapGetters(["userInfo"]), computed: mapGetters(["userInfo", "storeItems"]),
watch: { watch: {
useIntegral() { useIntegral() {
this.computedPrice(); this.computedPrice();
@ -327,20 +357,26 @@
}, },
mounted: function() { mounted: function() {
let that = this; let that = this;
this.$store.dispatch('getUser', true) this.$store.dispatch("getUser", true);
that.getCartInfo(); that.getCartInfo();
if (that.$yroute.query.pinkid !== undefined) if (that.$yroute.query.pinkid !== undefined)
that.pinkId = that.$yroute.query.pinkid; that.pinkId = that.$yroute.query.pinkid;
}, },
methods: { methods: {
showStoreList() {
this.$store.commit("get_to", "orders");
this.$yrouter.push({
path: "/pages/shop/StoreList/index"
});
},
addressType: function(index) { addressType: function(index) {
if (index && !this.system_store.id) { if (index && !this.systemStore.id) {
uni.showToast({ uni.showToast({
title: "暂无门店信息,您无法选择到店自提!", title: "暂无门店信息,您无法选择到店自提!",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
return return;
} }
this.shipping_type = index; this.shipping_type = index;
}, },
@ -374,7 +410,7 @@
if (!cartIds) { if (!cartIds) {
uni.showToast({ uni.showToast({
title: "参数有误", title: "参数有误",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
return this.$yrouter.back(); return this.$yrouter.back();
@ -386,14 +422,14 @@
this.deduction = res.data.deduction; this.deduction = res.data.deduction;
this.usableCoupon = res.data.usableCoupon || {}; this.usableCoupon = res.data.usableCoupon || {};
this.addressInfo = res.data.addressInfo || {}; this.addressInfo = res.data.addressInfo || {};
this.system_store = res.data.system_store || {}; this.systemStore = res.data.systemStore || {};
this.store_self_mention = res.data.store_self_mention; this.storeSelfMention = res.data.storeSelfMention;
this.computedPrice(); this.computedPrice();
}) })
.catch(() => { .catch(() => {
uni.showToast({ uni.showToast({
title: "加载订单数据失败", title: "加载订单数据失败",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
}); });
@ -434,18 +470,18 @@
if (!this.active) { if (!this.active) {
uni.showToast({ uni.showToast({
title: "请选择支付方式", title: "请选择支付方式",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
return return;
} }
if (!this.addressInfo.id && !this.shipping_type) { if (!this.addressInfo.id && !this.shipping_type) {
uni.showToast({ uni.showToast({
title: "请选择收货地址", title: "请选择收货地址",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
return return;
} }
if (this.shipping_type) { if (this.shipping_type) {
@ -455,36 +491,36 @@
) { ) {
uni.showToast({ uni.showToast({
title: "请填写联系人或联系人电话", title: "请填写联系人或联系人电话",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
return return;
} }
if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(this.contactsTel)) { if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(this.contactsTel)) {
uni.showToast({ uni.showToast({
title: "请填写正确的手机号", title: "请填写正确的手机号",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
return return;
} }
if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(this.contacts)) { if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(this.contacts)) {
uni.showToast({ uni.showToast({
title: "请填写您的真实姓名", title: "请填写您的真实姓名",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
return return;
} }
} }
uni.showLoading({ uni.showLoading({
title: "生成订单中" title: "生成订单中"
}); });
let from = {} let from = {};
if (this.$deviceType == 'app') { if (this.$deviceType == "app") {
from.from = 'app' from.from = "app";
} }
createOrder(this.orderGroupInfo.orderKey, { createOrder(this.orderGroupInfo.orderKey, {
realName: this.contacts, realName: this.contacts,
@ -500,6 +536,7 @@
from: this.from, from: this.from,
mark: this.mark || "", mark: this.mark || "",
shippingType: parseInt(shipping_type) + 1, shippingType: parseInt(shipping_type) + 1,
storeId: this.storeItems.id || this.systemStore.id,
...from ...from
}) })
.then(res => { .then(res => {
@ -526,7 +563,7 @@
case "PAY_ERROR": case "PAY_ERROR":
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
this.$yrouter.replace({ this.$yrouter.replace({
@ -563,26 +600,26 @@
break; break;
case "WECHAT_PAY": case "WECHAT_PAY":
// //
weappPay(data.result.jsConfig).finally(()=>{ weappPay(data.result.jsConfig).finally(() => {
this.$yrouter.replace({ this.$yrouter.replace({
path: "/pages/order/OrderDetails/index", path: "/pages/order/OrderDetails/index",
query: { query: {
id: data.result.orderId id: data.result.orderId
} }
}); });
}) });
break; break;
case "WECHAT_APP_PAY": case "WECHAT_APP_PAY":
// APP // APP
weappPay(data.result.jsConfig).finally(()=>{ weappPay(data.result.jsConfig).finally(() => {
this.$yrouter.replace({ this.$yrouter.replace({
path: "/pages/order/OrderDetails/index", path: "/pages/order/OrderDetails/index",
query: { query: {
id: data.result.orderId id: data.result.orderId
} }
}); });
}) });
break; break;
// //
// pay(data.result.jsConfig).finally(() => { // pay(data.result.jsConfig).finally(() => {
@ -596,11 +633,11 @@
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: err.response.data.msg || "创建订单失败", title: err.response.data.msg || "创建订单失败",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
}); });
} }
} }
}; };
</script> </script>

101
pages/orderAdmin/OrderCancellation/index.vue

@ -14,73 +14,70 @@
</view> </view>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.OrderCancellation .header { .OrderCancellation .header {
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") no-repeat; background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg")
no-repeat;
width: 100%; width: 100%;
height: 3*100rpx; height: 3 * 100rpx;
background-size: 100% 100%; background-size: 100% 100%;
} }
.OrderCancellation .whiteBg { .OrderCancellation .whiteBg {
width: 6.9*100rpx; width: 6.9 * 100rpx;
background-color: #fff; background-color: #fff;
margin: -0.93*100rpx auto 0 auto; margin: -0.93 * 100rpx auto 0 auto;
padding-top: 0.8*100rpx; padding-top: 0.8 * 100rpx;
border-radius: 0.06*100rpx 0.06*100rpx 0 0; border-radius: 0.06 * 100rpx 0.06 * 100rpx 0 0;
} }
.OrderCancellation .whiteBg .input { .OrderCancellation .whiteBg .input {
width: 5.8*100rpx; width: 5.8 * 100rpx;
margin: 0 auto; margin: 0 auto;
border-bottom: 0.01*100rpx solid #eee; border-bottom: 0.01 * 100rpx solid #eee;
} }
.OrderCancellation .whiteBg .input input { .OrderCancellation .whiteBg .input input {
padding-bottom: 0.25*100rpx; padding-bottom: 0.25 * 100rpx;
font-size: 0.6*100rpx; font-size: 0.6 * 100rpx;
color: #282828; color: #282828;
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
.OrderCancellation .whiteBg .bnt { .OrderCancellation .whiteBg .bnt {
font-size: 0.32*100rpx; font-size: 0.32 * 100rpx;
color: #fff; color: #fff;
width: 5.8*100rpx; width: 5.8 * 100rpx;
height: 0.86*100rpx; height: 0.86 * 100rpx;
border-radius: 0.43*100rpx; border-radius: 0.43 * 100rpx;
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%); background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%);
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%); background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%); background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
text-align: center; text-align: center;
line-height: 0.86*100rpx; line-height: 0.86 * 100rpx;
margin: 0.55*100rpx auto 0 auto; margin: 0.55 * 100rpx auto 0 auto;
} }
.OrderCancellation .scan { .OrderCancellation .scan {
width: 3*100rpx; width: 3 * 100rpx;
height: 3*100rpx; height: 3 * 100rpx;
margin: 1.1*100rpx auto 0 auto; margin: 1.1 * 100rpx auto 0 auto;
} }
.OrderCancellation .scan image { .OrderCancellation .scan image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
</style> </style>
<script> <script>
import WriteOff from "@/components/WriteOff"; import WriteOff from "@/components/WriteOff";
import { import { isWeixin } from "@/utils";
isWeixin // import { wechatEvevt } from "@/libs/wechat";
} from "@/utils"; import { orderVerific } from "@/api/order";
// import { wechatEvevt } from "@/libs/wechat"; const NAME = "OrderCancellation";
import {
orderVerific
} from "@/api/order";
const NAME = "OrderCancellation";
export default { export default {
name: NAME, name: NAME,
components: { components: {
WriteOff WriteOff
@ -106,17 +103,17 @@
this.verify_code = ""; this.verify_code = "";
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
}) })
.catch(err => { .catch(err => {
uni.showToast({ uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message, title:
icon: 'none', err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000 duration: 2000
}); });
}); });
}, },
storeCancellation: function() { storeCancellation: function() {
@ -124,18 +121,18 @@
if (!this.verify_code) { if (!this.verify_code) {
uni.showToast({ uni.showToast({
title: "请输入核销码", title: "请输入核销码",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
return return;
} }
if (!ref.test(this.verify_code)) { if (!ref.test(this.verify_code)) {
uni.showToast({ uni.showToast({
title: "请输入正确的核销码", title: "请输入正确的核销码",
icon: 'none', icon: "none",
duration: 2000 duration: 2000
}); });
return return;
} }
uni.showLoading({ uni.showLoading({
title: "查询中" title: "查询中"
@ -155,5 +152,5 @@
// //
} }
} }
}; };
</script> </script>

40
pages/shop/StoreList/index.vue

@ -60,7 +60,7 @@
mapKey mapKey
" "
></iframe> ></iframe>
</div> --> </div>-->
</view> </view>
</template> </template>
@ -77,7 +77,7 @@ const MAPKEY = "mapKey";
export default { export default {
name: "storeList", name: "storeList",
components: { Loading }, components: { Loading },
computed: mapGetters(["location"]), computed: mapGetters(["location", "goName"]),
data() { data() {
return { return {
page: 1, page: 1,
@ -101,8 +101,8 @@ export default {
// //
checked(e) { checked(e) {
if (this.goName === "orders") { if (this.goName === "orders") {
this.$router.go(-1); // this.$store.commit("get_store", e);
this.$store.commit("GET_STORE", e); this.$yrouter.back();
} }
}, },
// //
@ -141,14 +141,14 @@ export default {
} }
.storeBox { .storeBox {
background-color: #fff; background-color: #fff;
padding: 0 0.3*100rpx; padding: 0 0.3 * 100rpx;
} }
.storeBox-box { .storeBox-box {
width: 100%; width: 100%;
height: auto; height: auto;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0.23*100rpx 0; padding: 0.23 * 100rpx 0;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
@ -159,15 +159,15 @@ export default {
} }
.store-cent-left { .store-cent-left {
width: 45%; width: 45%;
text{ text {
display: block; display: block;
} }
} }
.store-img { .store-img {
width: 1.2*100rpx; width: 1.2 * 100rpx;
height: 1.2*100rpx; height: 1.2 * 100rpx;
border-radius: 0.06*100rpx; border-radius: 0.06 * 100rpx;
margin-right: 0.22*100rpx; margin-right: 0.22 * 100rpx;
} }
.store-img img { .store-img img {
width: 100%; width: 100%;
@ -175,31 +175,31 @@ export default {
} }
.store-name { .store-name {
color: #282828; color: #282828;
font-size: 0.3*100rpx; font-size: 0.3 * 100rpx;
margin-bottom: 0.22*100rpx; margin-bottom: 0.22 * 100rpx;
font-weight: 800; font-weight: 800;
} }
.store-address { .store-address {
color: #666666; color: #666666;
font-size: 0.24*100rpx; font-size: 0.24 * 100rpx;
} }
.store-phone { .store-phone {
width: 0.5*100rpx; width: 0.5 * 100rpx;
height: 0.5*100rpx; height: 0.5 * 100rpx;
color: #fff; color: #fff;
border-radius: 50%; border-radius: 50%;
display: block; display: block;
text-align: center; text-align: center;
line-height: 0.5*100rpx; line-height: 0.5 * 100rpx;
background-color: #e83323; background-color: #e83323;
margin-bottom: 0.22*100rpx; margin-bottom: 0.22 * 100rpx;
} }
.store-distance { .store-distance {
font-size: 0.22*100rpx; font-size: 0.22 * 100rpx;
color: #e83323; color: #e83323;
} }
.iconfont { .iconfont {
font-size: 0.2*100rpx; font-size: 0.2 * 100rpx;
} }
.row-right { .row-right {
display: flex; display: flex;

6
pages/user/UserAccount/index.vue

@ -31,6 +31,12 @@
</view> </view>
<view>消费记录</view> <view>消费记录</view>
</view> </view>
<view class="item" @click="goUserBill(2)">
<view class="pictrue">
<image src="@/static/images/record3.png" />
</view>
<view>充值记录</view>
</view>
</view> </view>
<view class="advert acea-row row-between-wrapper"></view> <view class="advert acea-row row-between-wrapper"></view>
</view> </view>

1
pages/user/UserBill/index.vue

@ -3,6 +3,7 @@
<view class="nav acea-row"> <view class="nav acea-row">
<view class="item" :class="types == 0 ? 'on' : ''" @click="changeTypes(0)">全部</view> <view class="item" :class="types == 0 ? 'on' : ''" @click="changeTypes(0)">全部</view>
<view class="item" :class="types == 1 ? 'on' : ''" @click="changeTypes(1)">消费</view> <view class="item" :class="types == 1 ? 'on' : ''" @click="changeTypes(1)">消费</view>
<view class="item" :class="types == 2 ? 'on' : ''" @click="changeTypes(2)">充值</view>
</view> </view>
<view class="sign-record"> <view class="sign-record">
<view class="list"> <view class="list">

15
store/index.js

@ -26,7 +26,9 @@ const vuexStore = new Vuex.Store({
location: { location: {
latitude: '', latitude: '',
longitude: '' longitude: ''
} },
storeItems: cookie.get("storeItems") || null,
goName: cookie.get("goName") || ""
}, },
mutations: { mutations: {
login(state, token, expires_time) { login(state, token, expires_time) {
@ -64,8 +66,15 @@ const vuexStore = new Vuex.Store({
state.$deviceType = $deviceType; state.$deviceType = $deviceType;
}, },
setLocation(state, location) { setLocation(state, location) {
console.log(location, '定位')
state.location = location state.location = location
},
get_store(state, storeItems) {
state.storeItems = storeItems;
cookie.set("storeItems", storeItems);
},
get_to(state, goName) {
state.goName = goName;
cookie.set("goName", goName);
} }
}, },
actions: { actions: {
@ -139,6 +148,8 @@ const vuexStore = new Vuex.Store({
isLogin: state => !!state.token, isLogin: state => !!state.token,
userInfo: state => state.userInfo || {}, userInfo: state => state.userInfo || {},
location: state => state.location, location: state => state.location,
storeItems: state => state.storeItems,
goName: state => state.goName,
}, },
strict: debug strict: debug
}); });

Loading…
Cancel
Save