Authored by yyq

deliver

<template>
<LayoutApp class="order-deliver-page" :show-back="true">
<div class="main-content">
<div class="page-title">发货</div>
<div class="identify-center-address">
<div class="left-icon">
<i class="iconfont iconaddress"></i>
</div>
<div class="address-info">
<div class="consignee">
<span>{{stateCenterAddress.address_name}}</span>
<span class="tag">有货鉴定中心</span>
</div>
<p class="location">{{stateCenterAddress.address}}</p>
<p>{{stateCenterAddress.mobile}}</p>
</div>
</div>
<div class="deliver-express">
<div class="left-icon">
<div class="express-logo"></div>
</div>
<div class="express-info">
<span>国内顺丰快运</span>
<CubeInput class="express-input" v-model="expressCode" placeholder="请填写顺丰运单号"></CubeInput>
</div>
</div>
<div v-if="stateCenterAddress.deliverDesc" class="deliver-tip">
<span class="iconfont iconwarn"></span>
<p>{{stateCenterAddress.deliverDesc}}</p>
</div>
<div class="submit-warp">
<div class="contract-check">
<i class="iconfont" :class="readContract ? 'iconcheck_full checked' : 'iconcheck_default'" @click="changeReadContract"></i>
<span>我已阅读并同意</span>
<a href="//activity.yoho.cn/feature/4049.html?share_id=6729&title=UFO卖家商品质检标准">《UFO卖家商品质检标准》</a>
</div>
<p v-if="stateCenterAddress.warnTips" class="warn-tip">{{stateCenterAddress.warnTips}}</p>
<CubeButton class="deliver-btn" :disabled="deliverDisable" @click="submitDeliver">发货</CubeButton>
</div>
</div>
</LayoutApp>
</template>
<script>
import { get } from 'lodash';
import { Button, Input } from 'cube-ui';
import { createNamespacedHelpers } from 'vuex';
const { mapState, mapActions } = createNamespacedHelpers('order/orderDeliver');
export default {
name: 'OrderDeliver',
data() {
return {
centerAddress: {},
expressCode: '',
readContract: false
};
},
created() {
let { skup, code } = this.$route.params || {};
this.orderCode = code;
if (process.env.VUE_ENV !== 'server') {
this.fetchAppraiseAddress({
skup,
orderCode: code
});
}
},
computed: {
...mapState(['appraiseAddress']),
stateCenterAddress() {
if (!this.centerAddress.address) {
this.centerAddress = get(this.appraiseAddress, this.orderCode) || {};
}
return this.centerAddress;
},
deliverDisable() {
return !(this.expressCode && this.readContract && this.stateCenterAddress.id);
}
},
mounted() {
this.fetchAppraiseAddressChangeNotice({orderCode: this.orderCode}).then(res => {
let isChanged = get(res, 'data.isChanged');
let isForceShow = get(res, 'data.isForceShow');
if (!isChanged && !isForceShow) {
return;
}
let { title = '', tips, alert_address_name, alert_address, alert_mobile } = res.data || {};
let info = [
alert_address_name || '',
alert_address || '',
alert_mobile || ''
];
if (isChanged && tips) {
info.unshift(tips);
}
this.$createDialog({
type: 'alert',
confirmBtn: {
text: '我知道了'
},
onConfirm() {
// Todo report()
console.log('Todo Report', res.data);
}
}, (createElement) => {
return [
createElement('div', {
class: {
'dg-notice-content': true
},
slot: 'content'
}, [
createElement('div', {
class: {
'dg-notice-content-title': true
}
}, isChanged ? 'UFO仓库调整公告' : title),
...info.map(val => {
return createElement('p', {
class: {
'dg-notice-content-info': true
},
}, val);
})
])
];
}).show();
});
},
methods: {
...mapActions(['fetchAppraiseAddress', 'fetchAppraiseAddressChangeNotice', 'deliverOrderToDepot']),
toast(msg, time = 1500) {
this.$createToast && this.$createToast({
txt: msg,
type: 'txt',
time
}).show();
},
changeReadContract() {
this.readContract = !this.readContract;
},
submitDeliver() {
if (/^[a-zA-Z0-9]+$/.test(this.expressCode)) {
if (this.loading) {
return;
}
this.loading = true;
setTimeout(() => {
this.loading = false;
}, 2000);
this.deliverOrderToDepot({
orderCode: this.orderCode,
wayBillCode: this.expressCode,
depotNum: this.stateCenterAddress.id
}).then(res => {
if (res.code === 200) {
this.$router.go(-1);
// Todo report()
} else {
this.toast(res.message || '网络异常,请稍后重试');
}
});
} else {
this.toast('请输入正确的快递单号');
}
}
},
components: {
CubeButton: Button,
CubeInput: Input
}
};
</script>
<style lang="scss">
.dg-notice-content {
padding: 10px 44px 40px;
font-size: 28px;
line-height: 42px;
color: #444;
margin-bottom: -32px;
border-bottom: 1px solid #f5f5f5;
.dg-notice-content-title {
font-size: 32px;
font-weight: 500;
text-align: center;
padding-bottom: 20px;
color: #000;
}
}
</style>
<style lang="scss" scoped>
.order-deliver-page {
.main-content {
padding: 0 40px;
}
.page-title {
font-size: 68px;
font-weight: 800;
line-height: 80px;
padding-bottom: 30px;
border-bottom: 1px solid #eee;
}
.left-icon {
width: 88px;
flex-shrink: 0;
}
.identify-center-address {
padding: 40px 0;
display: flex;
align-items: center;
font-size: 28px;
border-bottom: 1px solid #eee;
.iconfont {
font-size: 48px;
}
.consignee {
font-size: 32px;
display: flex;
align-items: center;
> * {
line-height: 44px;
font-weight: 800;
display: inline-block;
vertical-align: top;
}
.tag {
font-size: 24px;
line-height: 48px;
font-weight: 300;
padding: 0 14px;
margin-left: 6px;
color: #002B47;
border: 1px solid #ccc;
box-sizing: border-box;
transform: scale(0.8);
}
}
.location {
font-size: 24px;
line-height: 1.4;
color: #999;
margin: 6px 0 12px;
}
}
.deliver-express {
display: flex;
padding: 36px 0;
border-bottom: 1px solid #eee;
align-items: center;
.express-logo {
width: 48px;
height: 48px;
background: url("~statics/image/order/sf-logo.png");
background-size: 100% 100%;
}
.express-info {
font-size: 32px;
line-height: 44px;
display: flex;
align-items: center;
flex-grow: 1;
}
.express-input {
flex-grow: 1;
&:after {
border: 0;
}
/deep/ .cube-input-field {
text-align: right;
padding: 0;
}
}
}
.deliver-tip {
color: #ccc;
display: flex;
align-items: flex-start;
padding-top: 16px;
.iconfont {
font-size: 32px;
margin-right: 10px;
margin-top: -6px;
}
p {
font-size: 24px;
line-height: 1.4;
font-weight: 300;
color: #bbb;
white-space: pre-wrap;
word-wrap: break-word;
}
}
.submit-warp {
width: 100%;
position: absolute;
left: 0;
bottom: 0;
padding: 0 38px 40px;
}
.contract-check {
font-size: 24px;
line-height: 40px;
color: #999;
display: flex;
align-items: center;
.iconfont {
margin-right: 16px;
font-size: 30px;
position: relative;
&:after {
content: "";
width: 200%;
height: 150%;
position: absolute;
top: -25%;
left: -50%;
}
}
.checked {
color: #022c46;
}
a {
color: #65ab85;
margin-left: 20px;
text-decoration: underline;
}
}
.warn-tip {
font-size: 24px;
line-height: 1.3;
color: red;
padding: 6px 0;
letter-spacing: 0;
}
.deliver-btn {
height: 120px;
background: #022c46;
margin-top: 34px;
&.cube-btn_disabled {
background: #ccc;
}
}
}
</style>
... ...
... ... @@ -33,6 +33,11 @@ export default [
path: '/xianyu/:owner/order/logistics/:code',
component: () => import('./order-logistics-info'),
},
{
name: 'order.deliver',
path: '/xianyu/order/deliver/:skup/:code',
component: () => import(/* webpackChunkName: "order.deliver" */ './deliver'),
},
...PriceChange,
...OrderList,
...OrderDetail,
... ...
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1569575909056'); /* IE9 */
src: url('iconfont.eot?t=1569575909056#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAlwAAsAAAAAEmwAAAkhAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFeAqTJI9IATYCJANYCy4ABCAFhG0HggIbmA9RlGtSTPZFgd1GbDniHuHQIg8EU2af2bZ5PlODLoPHTf9eXkJZKBWoSWZWNyidWJlpWgKlBgtQmaqwL2rtzNg3o1sCgAfivvb+fexSx3WgZWnax8ajyELZhJp/N40f0Zraerq1D6n7nAsLrLBK1OFkEpUfePu1sAxnPcDfKvDv11q9O9RCci+ZEClx/2Jf3sI9VKzSGEqBkHYRlcRQAt4YplMqJWUgwLzqJCsklVNohdfhZCAAeCSgH4jRNGQU1GChOKFDvd0mQp1JBVvjRKBOUhl2ZKeRdeCgZpYzHwFYG3w9eYo0ogYYcBTqVCPeyi0o2eQPP6HzFAqTovmYP142gIUWQAH0A8AuFJ8x9wFoxPoFgjc1Z+EFsNQ9/XQxG6taoQ6oI+qEOqPOqZuqpJ5rNVqHtqW90r78VzYWtbzWYtak3fBp7AQP7B0cWZyYnB2XUKSQqPSlWCozP65/8RqtWmc1jJMgRVSrGgKvD1Y2FgeFAVhBEVAOV4QKUAIMgCpgBNQDE6ASmAHFwCwoBeZAGbAJmgEJ7jLgn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Nk2qdjSAh4FMInJ7vi0EVGkNb1fNoZF1bje+8PlmEhuPeiK5ZsRd+DEkMhf74gWkIgkpLfQVorHViJfS3aWJTRrcIttKcPrLHBoIMIlsSb2udRDgNC9XS1LNLQk1Paqd8pAsZrK2FUmnVxq+BYG3b1T16BGEIZSwhCMqEkDUpBPhiYYEEi0JIsEkhIQSHdGTMBJOIkgkWPuLuRzjcXIWR3NjY2CzZK+yi46MzNT0dM7eX7RYgvPVLR6xsdXRT+fBqc1n1DgabRaP3ebwqKd7JJf7Sa/J1ktWNyfbbTXuTkWVVN5Z73H1b7A3eil8ax+dVNwgqpx9u0lpbJVYXRcwfhdZcrm01TVSJvxUi2QVPfVuDvjiVlZPfT0zvI4TZdnRDAAAAA==') format('woff2'),
url('iconfont.woff?t=1569575909056') format('woff'),
url('iconfont.ttf?t=1569575909056') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1569575909056#iconfont') format('svg'); /* iOS 4.1- */
src: url('iconfont.eot?t=1569655552875'); /* IE9 */
src: url('iconfont.eot?t=1569655552875#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAmQAAsAAAAAEygAAAlCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCGBgqURJBSATYCJANcCzAABCAFhG0HggkbOxAzo/aKcnIm+68PbGPp4fUeKtSViUYwFIODnnAEMqvEPexFwNOC26I7PxYOBo9j437hHv0+H55Off/+XXxhhRSDWAxMJtajOiYjWw+VJmWAgqmd09HpdgGAsA1kWN9OmwNqnk+AAILLOfN3VZ0FIGeBQBfQJnagoovnB25Cjf+fTaPW+siwxHStjWJrH4EPxwn/sFgPCAy2vn7t1TIJxewjXISMkXf36cF+2CCQIpeJjwWh7gIIKhMjqK3rdHyNrVG6EDC8dvVCTW54ABcDASBDgLpIeGTP/pCAhWKEdhPGJkRBkkkBW+NOIDGIDAeyw8lGcJAwq5jrAD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d0pFE5y2jX5WWyg5pqUr2hY6W1U51V74v6H34jdPt2cfYoVdsfEvmvfsGDg8F1A2n/HESohgQMVC4B/s+zxP4Ck0RTLamej3Mh9nfKWQhCcULQi1BtycdTBLgqBoBMzwD+0wu0KvZH795aElSSUff8GIjhT6nJOpSyWNf14yBHUyrCuoOfDHV0OVwOnWmgIKwUQG3L8CNQ2+3HQIlTlGJ9g7JYl/tx8PCBiHAu/GQYSHQnlOMA1VOtJwvUAyf7M1EMtbDTfSts/wUypNQKbWerP7BOoSbT0WRe/wYa7Dp2cQc5814QYTEjr9YOkKZIcosxMD+KqMt347EY7DpimBVaCLNAvReUE/tzTMVQi4V9q/Dzv0CGlNqaYScx/8A6tXpiamTSwvyN61bD7ktXd5AzXmQJ4vS1mBGvIgtSXYNEbl4vBuZHoiWq8p2xmE605aPt67PHgePmG1G9g2cloaiabpiWLR3X87vquptuu+u+hx5Vxl6b25VCXuV41LpzBLVXFBfL6XxeVUPKeT9fdQpUnx1zw/qp3S8RasmDkhgaJoDzl3rLSgrCV62SkW8WZaatPA1umCntJbfOy5hBUUZr+bJdYFbZU5bU19/JgnNdFkEm5j8HQUPqq9Aq7iRCmpbekyq1Fo+Vo5+tCwUA') format('woff2'),
url('iconfont.woff?t=1569655552875') format('woff'),
url('iconfont.ttf?t=1569655552875') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1569655552875#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
... ... @@ -99,3 +99,7 @@
content: "\e7c4";
}
.iconwarn:before {
content: "\e7cf";
}
... ...
... ... @@ -83,6 +83,9 @@ Created by iconfont
<glyph glyph-name="arrow" unicode="&#59332;" d="M1536 896L768-128 0 896z" horiz-adv-x="1536" />
<glyph glyph-name="warn" unicode="&#59343;" d="M512 830.016C757.92 830.016 958.016 629.952 958.016 384 958.016 138.08000000000004 757.92-62.01599999999996 512-62.01599999999996c-245.95200001 0-446.016 200.064-446.016 446.016C65.984 629.952 266.048 830.016 512 830.016zM512 1.9840000000000373C722.656 1.9840000000000373 894.016 173.34400000000005 894.016 384c0 210.624-171.36 382.016-382.016 382.016-210.624 0-382.016-171.36-382.016-382.016C129.984 173.34400000000005 301.376 1.9840000000000373 512 1.9840000000000373zM512 176m48 0a1.5 1.5 0 1 1-96 0 1.5 1.5 0 1 1 96 0ZM512 639.99999999c17.664 0 32-14.304 32-31.99999999l0-288c0-17.664-14.336-32-32-31.99999999s-32 14.336-32 31.99999999l0 288C480 625.696 494.336 640 512 639.99999999z" horiz-adv-x="1024" />
</font>
... ...
... ... @@ -3,6 +3,7 @@ import orderList from './order-list';
import orderConfirm from './order-confirm';
import orderDetail from './order-detail';
import orderLogistics from './order-logistics';
import orderDeliver from './order-deliver';
export default function() {
return {
... ... @@ -13,6 +14,7 @@ export default function() {
orderConfirm: orderConfirm(),
orderDetail: orderDetail(),
logisticsInfo: orderLogistics(),
orderDeliver: orderDeliver(),
},
};
}
... ...
export default function () {
return {
namespaced: true,
state: {
appraiseAddress: {},
appraiseAddressCodes: []
},
mutations: {
SET_APPRAISE_ADDRESS(state, { orderCode, data }) {
let addr = {
[orderCode]: data
};
state.appraiseAddressCodes.push(orderCode);
if (state.appraiseAddressCodes.length > 5) {
state.appraiseAddressCodes.shift()
}
state.appraiseAddressCodes.forEach(code => {
if (state.appraiseAddress[code]) {
addr[code] = state.appraiseAddress[code];
}
});
state.appraiseAddress = addr;
}
},
actions: {
/**
* @param {
* skup skup
* orderCode 订单编码
* }
*/
async fetchAppraiseAddress({ commit }, { skup, orderCode } = {}) {
const res = await this.$api.get('/api/order/appraiseAddress', {
skup,
orderCode: orderCode + '',
});
if (res.code === 200) {
commit('SET_APPRAISE_ADDRESS', {
orderCode,
data: res.data
});
}
return res;
},
/**
* @param {
* orderCode 订单编码
* }
*/
async fetchAppraiseAddressChangeNotice({ commit }, { orderCode } = {}) {
return await this.$api.get('/api/order/noticeAppraiseAddressChanged', {
orderCode: orderCode + '',
});
},
/**
* @param {
* orderCode 订单编码
* wayBillCode 物流快递号
* depotNum 鉴定中心id
* }
*/
async deliverOrderToDepot({ commit }, { orderCode, wayBillCode, depotNum } = {}) {
return await this.$api.post('/api/order/deliverToDepot', {
expressCompanyId: 23,
orderCode: orderCode + '',
wayBillCode,
depotNum
});
}
},
};
}
... ...
... ... @@ -93,4 +93,38 @@ module.exports = {
orderCode: { type: Number, require: true }, // 订单编号
},
},
// 鉴定中心地址
'/api/order/appraiseAddress': {
ufo: true,
auth: true,
api: 'ufo.order.appraiseAddress',
params: {
skup: { type: String, require: true },
orderCode: { type: String, require: true }, // 订单编号
},
},
// 鉴定中心地址更改公告
'/api/order/noticeAppraiseAddressChanged': {
ufo: true,
auth: true,
api: 'ufo.order.noticeAppraiseAddressChanged',
params: {
orderCode: { type: String, require: true }, // 订单编号
},
},
// 卖家发货
'/api/order/deliverToDepot': {
ufo: true,
auth: true,
api: 'ufo.order.deliverToDepot',
params: {
expressCompanyId: { type: Number, require: true }, // 快递公司id
wayBillCode: { type: String, require: true }, // 物流快递号
orderCode: { type: String, require: true }, // 订单编号
depotNum: { type: Number, require: true }, // 鉴定中心id
},
},
};
... ...