Authored by zhangxiaoru

线下店订单

... ... @@ -280,7 +280,8 @@ const getOrders = (params) => {
goods: _formatOrderGoods(value.order_goods, count, false, isTickets),
detailUrl: helpers.urlFormat('/home/orderdetail', {order_code: value.order_code}),
count: value.buy_total,
isVirtual: isTickets
isVirtual: isTickets,
orderTitle: value.order_title
});
/* 如果运费大于0,会显示运费 */
... ...
... ... @@ -153,6 +153,8 @@ const orderDetailData = (uid, orderCode) => {
let orderDetail = camelCase(result.data);
let goods = [];
let status = _getOrderStatus(orderDetail, true);
let offlinestore; // 线下店订单
let deliveryOffline; // 门店取货
orderDetail = _.assign(orderDetail, status);
... ... @@ -219,6 +221,25 @@ const orderDetailData = (uid, orderCode) => {
});
}
if (parseInt(orderDetail.paymentType, 10) !== 2) {
if (_.get(orderDetail, 'isOfflineshops', 'N') === 'Y') {
offlinestore = orderDetail.offlineStore !== '' ? orderDetail.offlineStore : false;
deliveryOffline = _.get(orderDetail, 'isDeliveryOffline', 'N') === 'Y' ? true : false;
} else {
offlinestore = false;
deliveryOffline = false;
}
orderDetail = _.assign(orderDetail, {
offlinestore: offlinestore,
deliveryOffline: deliveryOffline
});
} else {
orderDetail.paymentName = orderDetail.paymentName !== '' ? orderDetail.paymentName : '货到付款';
}
if (orderDetail.invoice) {
orderDetail.invoice.type = (orderDetail.invoice.type + '' === '2');
}
... ...
... ... @@ -34,6 +34,9 @@
{{#if paymentName}}
<span>支付方式:{{paymentName}}</span>
{{/if}}
{{#if offlinestore}}
<span>下单门店: {{offlinestore}}</span>
{{/if}}
</p>
<a href="{{serviceUrl}}" target="_blank" class="iconfont icon-right">&#xe63c;</a>
</div>
... ... @@ -52,6 +55,17 @@
</a>
{{/if}}
{{/orderBtn}}
{{#if deliveryOffline}}
<div class="offline-delivery">
<span class="iconfont">&#xe630;</span>
<p class="beside-left">
<span class="delivery-title">配送信息</span>
<span class="delivery-content">配送方式:门店取货</span>
</p>
</div>
{{/if}}
</section>
<section class="goods block">
... ...
... ... @@ -10,15 +10,21 @@ const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
const domains = {
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
api: 'http://dev-api.yohops.com:9999/',
service: 'http://dev-service.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
imSocket: 'ws://socket.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api'
};
... ...
<div class="order" data-id="{{orderNum}}" data-href="{{detailUrl}}">
<header class="header">
订单编号:{{orderNum}}
{{orderTitle}}
{{!-- 订单编号:{{orderNum}} --}}
<span class="order-status">{{orderStatus}}</span>
</header>
<section class="order-goods">
... ...
... ... @@ -72,6 +72,33 @@
}
}
.offline-delivery {
position: relative;
.iconfont {
left: 0;
}
.beside-left {
border-top: 1px solid #e0e0e0;
margin-top: 20px;
padding-top: 20px;
margin-left: 60px;
.delivery-title {
display: block;
color: #000;
font-size: 28px;
}
span {
display: block;
color: #b0b0b0;
font-size: 0.6rem;
}
}
}
.owner-info {
line-height: 1.5;
}
... ...