Authored by lzhy

一件代发

import orderGoodsInfo from './order-goods-info';
import orderUserInfo from './order-user-info.vue';
export { orderGoodsInfo, orderUserInfo };
... ...
<template>
<table cellspacing="0" cellpadding="0" class="order-detail">
<thead>
<tr>
<template v-for="(cols, index) in tableCols">
<th :key="index" :style="'width: ' + cols.width">{{ cols.title }}</th>
</template>
</tr>
<tr>
<template v-for="(cols, index) in tableCols">
<th :key="index" :style="'width: ' + cols.width">{{ cols.title }}</th>
</template>
</tr>
</thead>
<tbody>
<template v-for="(goods, index) in tableData">
<tr :key="index">
<td>{{ goods.productSku }}</td>
<td>
<img
<template v-for="(goods, index) in tableData">
<tr :key="index">
<td>{{ goods.productSku }}</td>
<td>
<img
:src="
'http://shopmanage.yohobuy.com/platform/product/getRemoteImageUrlBySku?sku_id=' +
goods.productSku +
'&size=40x60'
"
/>
</td>
<td style="text-align: left">
<p>{{ goods.productName }}</p>
<p>{{ goods.prodcutCode }}</p>
<p>尺码:{{ goods.sizeName }} 颜色:{{ goods.colorName }}</p>
</td>
<td>{{ goods.buyNumber }}</td>
<td>{{ goods.retailPrice }}</td>
<td>{{ goods.salePrice }}</td>
<td>{{ goods.lastPrice }}</td>
<td>
{{
goodsPromos[goods.id] && goodsPromos[goods.id].couponsDiscountAmount
? goodsPromos[goods.id].couponsDiscountAmount
: 0
}}
</td>
<td>{{ goodsPromos[goods.id] && goodsPromos[goods.id].yohoCoin ? goodsPromos[goods.id].yohoCoin : 0 }}</td>
<td>
{{ goodsPromos[goods.id] && goodsPromos[goods.id].redPackage ? goodsPromos[goods.id].redPackage : 0 }}
</td>
<td>
{{
goodsPromos[goods.id] && goodsPromos[goods.id].giftCardAmount ? goodsPromos[goods.id].giftCardAmount : 0
}}
</td>
<td>
{{
goodsPromos[goods.id] && goodsPromos[goods.id].activityAmount ? goodsPromos[goods.id].activityAmount : 0
}}
</td>
<td>{{ goods.subtotal }}</td>
</tr>
</template>
/>
</td>
<td style="text-align: left">
<p>{{ goods.productName }}</p>
<p>{{ goods.prodcutCode }}</p>
<p>尺码:{{ goods.sizeName }} 颜色:{{ goods.colorName }}</p>
</td>
<td>{{ goods.buyNumber }}</td>
<td>{{ goods.retailPrice }}</td>
<td>{{ goods.salePrice }}</td>
<td>{{ goods.lastPrice }}</td>
<td>
{{
goodsPromos[goods.id] && goodsPromos[goods.id].couponsDiscountAmount
? goodsPromos[goods.id].couponsDiscountAmount
: 0
}}
</td>
<td>{{ goodsPromos[goods.id] && goodsPromos[goods.id].yohoCoin ? goodsPromos[goods.id].yohoCoin : 0 }}</td>
<td>
{{ goodsPromos[goods.id] && goodsPromos[goods.id].redPackage ? goodsPromos[goods.id].redPackage : 0 }}
</td>
<td>
{{
goodsPromos[goods.id] && goodsPromos[goods.id].giftCardAmount ? goodsPromos[goods.id].giftCardAmount : 0
}}
</td>
<td>
{{
goodsPromos[goods.id] && goodsPromos[goods.id].activityAmount ? goodsPromos[goods.id].activityAmount : 0
}}
</td>
<td>{{ goods.subtotal }}</td>
</tr>
</template>
</tbody>
<tfoot>
<tr>
<td colspan="13" style="text-align: left">
<span>实付金额:¥{{ orderInfo.lastOrderAmount }}</span>
<span>快递费:¥{{ orderInfo.shippingCost }}</span>
</td>
</tr>
<tr>
<td td colspan="13">
<div class="ivu-card">
<div class="ivu-card-head" style="text-align: left">
<p slot="title">使用优惠券</p>
<tr>
<td colspan="13" style="text-align: left">
<span>实付金额:¥{{ orderInfo.lastOrderAmount }}</span>
<span>快递费:¥{{ orderInfo.shippingCost }}</span>
</td>
</tr>
<tr>
<td td colspan="13">
<div class="ivu-card">
<div class="ivu-card-head" style="text-align: left">
<p slot="title">使用优惠券</p>
</div>
<i-table border :columns="couponsTableCols" :data="couponsData"></i-table>
</div>
<i-table border :columns="couponsTableCols" :data="couponsData"></i-table>
</div>
</td>
</tr>
<tr>
<td colspan="13">
<template v-if="orderPromos">
<template v-for="(item, index) in orderPromos">
<Row :key="index">{{ item.promotionTitle }} {{ item.beginTime }} — {{ item.endTime }}</Row>
</td>
</tr>
<tr>
<td colspan="13">
<template v-if="orderPromos">
<template v-for="(item, index) in orderPromos">
<Row :key="index">{{ item.promotionTitle }} {{ item.beginTime }} — {{ item.endTime }}</Row>
</template>
</template>
</template>
<template v-else>
<span>没有参加活动.</span>
</template>
</td>
</tr>
<template v-else>
<span>没有参加活动.</span>
</template>
</td>
</tr>
</tfoot>
</table>
</template>
<script>
export default {
name: 'orderGoodsInfo',
name: 'OrderGoodsInfo',
props: ['orderInfo', 'tableData', 'couponsData', 'goodsPromos', 'orderPromos'],
data() {
return {
... ... @@ -166,4 +166,4 @@ table.order-detail {
}
}
}
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -34,7 +34,7 @@ export default {
name: 'OrderUserInfo',
props: ['orderInfo'],
data() {
return {}
return {};
},
};
</script>
... ...
... ... @@ -26,4 +26,13 @@ export default {
1: '已支付',
2: '部分支付',
},
//费用分摊类型
feeSharingType: {
0: '未知',
1: '我司承担',
2: '供应商承担',
3: '分摊-合同结算',
4: '分摊-我司承担比例',
5: '会员营销券-阶梯折扣',
},
};
... ...
... ... @@ -2,11 +2,11 @@
<div>
<Row>
<order-goods-info
:table-data="tableData"
:coupons-data="couponsData"
:goods-promos="goodsPromos"
:order-info="orderInfo"
:order-promos="orderPromos"
:table-data="tableData"
:coupons-data="couponsData"
:goods-promos="goodsPromos"
:order-info="orderInfo"
:order-promos="orderPromos"
>
</order-goods-info>
</Row>
... ... @@ -15,18 +15,19 @@
</template>
<script>
import {orderGoodsInfo} from '../../components';
import { orderGoodsInfo } from '../../components';
import OrderService from 'services/order/order-service';
import _ from 'lodash';
export default {
components: { orderGoodsInfo },
props: ['current', 'orderCode', 'orderInfo'],
components: {orderGoodsInfo},
data() {
return {
couponsData: [],
tableData: [],
goodsPromos: [],
orderPromos: [],
}
};
},
created() {
this.$emit('nextStep', 0);
... ... @@ -74,6 +75,5 @@ export default {
});
},
},
};
</script>
... ...
... ... @@ -33,10 +33,13 @@
<script>
import { orderUserInfo } from '../../components';
export default {
props: ['current', 'orderCode', 'orderInfo'],
components: { orderUserInfo },
props: ['current', 'orderCode', 'orderInfo'],
data() {
return {}
return {};
},
created() {
this.$emit('nextStep', 1);
},
methods: {
nextStep(code) {
... ... @@ -56,15 +59,7 @@ export default {
orderCode: code,
},
});
}
},
},
created() {
this.$emit('nextStep', 1);
}
};
</script>
<style lang="scss" scoped>
</style>
... ...
... ... @@ -5,7 +5,7 @@
<p slot="title" style="height: 35px">
当前订单状态:{{ orderStatus[orderInfo.orderStatus] }}
<template v-if="orderInfo.orderStatus >= 100 && orderInfo.orderStatus < 600">
<i-button size="large" type="success" style="margin-left: 50px;" @click="deliver(123)">发货</i-button>
<i-button size="large" type="success" style="margin-left: 50px;" @click="deliver(orderCode)">发货</i-button>
</template>
</p>
</div>
... ... @@ -36,61 +36,33 @@
</Row>
</div>
</div>
<div class="ivu-card">
<div class="ivu-card-head">
<p slot="title">物流信息</p>
</div>
<div class="ivu-card-body">
<Row>
<i-col span="4">收货人:{{ orderInfo.consigneeName }}</i-col>
<i-col span="4">手机号:{{ orderInfo.mobile }} </i-col>
</Row>
<Row>
<i-col span="24">
送货地址:{{ orderInfo.province }} {{ orderInfo.city }} {{ orderInfo.district }}
{{ orderInfo.street }}
</i-col>
</Row>
<Row>
<i-col span="24">详细地址:{{ orderInfo.address }}</i-col>
</Row>
<Row>
<i-col span="24">邮政编码:{{ orderInfo.zipCode }}</i-col>
</Row>
<Row>
<i-col span="24">物流公司:{{ orderInfo.expressName }} </i-col>
</Row>
<Row>
<i-col span="24">运单号:{{ orderInfo.expressNumber }} </i-col>
</Row>
</div>
</div>
<order-user-info :order-info="orderInfo"></order-user-info>
<div class="ivu-card">
<div class="ivu-card-head">
<p slot="title">商品信息</p>
</div>
<div class="ivu-card-body">
<goods-info
<order-goods-info
:table-data="tableData"
:coupons-data="couponsData"
:goods-promos="goodsPromos"
:order-info="orderInfo"
:order-promos="orderPromos"
>
</goods-info>
</order-goods-info>
</div>
</div>
</div>
</template>
<script>
import { GoodsInfo } from './components';
import { orderGoodsInfo, orderUserInfo } from '../components';
import { OrderConfig } from '../configs';
import OrderService from 'services/order/order-service';
import _ from 'lodash';
export default {
components: { GoodsInfo },
components: { orderGoodsInfo, orderUserInfo },
data() {
return {
orderCode: this.$route.query.orderCode,
... ...
... ... @@ -17,23 +17,23 @@ export default {
return {
tab1: {
label: '全部订单',
name: '1',
name: '0',
},
tab2: {
label: '待发货订单',
name: '2',
name: '1',
},
tab3: {
label: '已发货订单',
name: '3',
name: '2',
},
tab4: {
label: '已完成订单',
name: '4',
name: '3',
},
tab5: {
label: '换货订单',
name: '5',
name: '4',
},
activate: '',
};
... ...
... ... @@ -63,7 +63,7 @@ export default {
pageSize: 20,
pageNo: 1,
orderStatusStr: '',
queryType: 1,
orderStatusType: 0,
},
tableData: [],
orderStatusArr: OrderConfig.orderStatus,
... ... @@ -79,7 +79,7 @@ export default {
},
methods: {
onChangeTabs(type) {
this.query.queryType = +type;
this.query.orderStatusType = +type;
this.reset();
},
search() {
... ...
... ... @@ -7,6 +7,7 @@ const apiUrl = {
orderGoodsPromos: '/erp/queryOrderGoodsPromos',
orderCoupons: '/erp/queryOrderCoupons',
orderPromos: '/erp/queryOrderPromos',
confirmExpress: '/erp/confirmExpress',
};
class OrderService extends Service {
... ... @@ -60,6 +61,14 @@ class OrderService extends Service {
queryOrderPromos(params) {
return this.post(apiUrl.orderPromos, params);
}
/**
* 订单确认物流信息
* @param params
*/
confirmExpress(params) {
return this.post(apiUrl.confirmExpress, params);
}
}
export default OrderService;
... ...