...
|
...
|
@@ -6,12 +6,12 @@ |
|
|
<ImgSize class="pro-img" :src="noEntryOrderInfo.goodsInfo.goodImg || ''" :width="200" :height="200"></ImgSize>
|
|
|
<div class="pro-info">
|
|
|
<p class="pro-name">{{noEntryOrderInfo.goodsInfo.colorName}}, {{noEntryOrderInfo.goodsInfo.sizeName}}码</p>
|
|
|
<p class="stock-info ufo-font">最低售价: ¥{{noEntryOrderInfo.goodsInfo.leastPrice}}</p>
|
|
|
<p class="stock-info ufo-font">最低售价: ¥{{noEntryOrderInfo.goodsInfo.leastPrice || noEntryOrderInfo.goodsInfo.price}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="input-container">
|
|
|
<InputUfo type="number" placeholder="定价需以9结尾.例如1999"
|
|
|
:maxlength="8" class="ipt-number" v-model="chgPrice">
|
|
|
:maxlength="8" class="ipt-number ufo-font" v-model="chgPrice" @blur="onChange">
|
|
|
<span class="prepend" slot="prepend">¥</span>
|
|
|
</InputUfo>
|
|
|
</div>
|
...
|
...
|
@@ -21,8 +21,8 @@ |
|
|
</div>
|
|
|
<div class="fee-container">
|
|
|
<div class="fee-line">
|
|
|
<p class="fee-title">平台费用:</p>
|
|
|
<p class="fee-price">{{platformFee}}</p>
|
|
|
<p class="fee-title">平台费用: <i class="iconfont iconquestion" @click="showFeeDetail"></i></p>
|
|
|
<p class="fee-price">{{platformFee.amount}}</p>
|
|
|
</div>
|
|
|
<div class="fee-line">
|
|
|
<p class="fee-title">银行转账费(1%):</p>
|
...
|
...
|
@@ -47,8 +47,37 @@ |
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="submit-container">
|
|
|
<div class="agree-container">
|
|
|
<div class="checkbox">
|
|
|
<Checkbox :option="labelOption" shape="square" v-model="isAgree"></Checkbox>
|
|
|
</div>
|
|
|
<a @click="showAgreement">卖家协议</a>
|
|
|
</div>
|
|
|
|
|
|
<div :class="['submit-button', (isAgree && calced) ? 'active' : '']">
|
|
|
<button @click="changePrice">提交</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<Modal v-model="platformFeeModalVisible" :transfer="true" cancel-text="我知道了">
|
|
|
<div class="fee-dialog-container">
|
|
|
<p class="modal-title">平台费用</p>
|
|
|
|
|
|
<p class="fee-line">
|
|
|
<span class="fee-title">商品鉴定费:</span>
|
|
|
<span class="fee-price">{{platformFee.appraiseFee}}</span>
|
|
|
</p>
|
|
|
<p class="fee-line">
|
|
|
<span class="fee-title">商品包装费:</span>
|
|
|
<span class="fee-price">{{platformFee.packageFee}}</span>
|
|
|
</p>
|
|
|
<p class="fee-line total">
|
|
|
<span class="fee-title">平台服务费:</span>
|
|
|
<span class="fee-price">{{platformFee.serviceFee}}</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
</Modal>
|
|
|
</LayoutApp>
|
|
|
</template>
|
|
|
|
...
|
...
|
@@ -58,22 +87,35 @@ import ScrollView from '../../../components/layout/scroll-view'; |
|
|
import ImgSize from '../../../components/img-size';
|
|
|
import {createNamespacedHelpers} from 'vuex';
|
|
|
import InputUfo from './components/input-ufo';
|
|
|
import {Checkbox} from 'cube-ui';
|
|
|
import {get} from 'lodash';
|
|
|
import Modal from './components/modal';
|
|
|
|
|
|
const {mapState, mapActions, mapMutations} = createNamespacedHelpers('order/priceChange');
|
|
|
const {mapState, mapActions} = createNamespacedHelpers('order/priceChange');
|
|
|
|
|
|
export default {
|
|
|
name: 'noEntryDetail',
|
|
|
components: {InputUfo, ScrollView, LayoutApp, ImgSize},
|
|
|
components: {Modal, InputUfo, ScrollView, LayoutApp, ImgSize, Checkbox},
|
|
|
data() {
|
|
|
return {
|
|
|
title: '',
|
|
|
platformFee: '-¥0',
|
|
|
platformFeeModalVisible: false,
|
|
|
platformFee: {
|
|
|
amount: '-¥0',
|
|
|
appraiseFee: '¥0.00',
|
|
|
packageFee: '¥0.00',
|
|
|
serviceFee: '¥0.00'
|
|
|
},
|
|
|
bankTransferFee: '-¥0',
|
|
|
income: '¥0',
|
|
|
errorTip: '',
|
|
|
chgPrice: '',
|
|
|
calced: false,
|
|
|
earnestMoney: '¥0',
|
|
|
isAgree: false,
|
|
|
labelOption: {
|
|
|
label: '我已阅读并同意'
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
asyncData({store, router}) {
|
...
|
...
|
@@ -81,12 +123,87 @@ export default { |
|
|
},
|
|
|
mounted() {
|
|
|
// this.fetchOrder({orderCode: this.$route.params.orderCode});
|
|
|
// this.inputChange = debounce(this.onChange.bind(this), 500);
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['noEntryOrderInfo']),
|
|
|
...mapState(['noEntryOrderInfo', 'fetching']),
|
|
|
postLoading() {
|
|
|
return this.fetchingChangePrice || !this.calced;
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
chgPrice(newVal) {
|
|
|
this.calced = false;
|
|
|
this.platformFee = '-¥0';
|
|
|
this.bankTransferFee = '-¥0';
|
|
|
this.income = '¥0';
|
|
|
this.earnestMoney = '¥0';
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['fetchOrder'])
|
|
|
...mapActions(['fetchOrder', 'postNoEntryCalcPrice', 'postNoEntryChangePrice']),
|
|
|
showAgreement() {
|
|
|
console.log('showAgreement');
|
|
|
},
|
|
|
checkPrice(price) {
|
|
|
let valid = false;
|
|
|
|
|
|
if (!price) {
|
|
|
this.errorTip = '没有价格';
|
|
|
return false;
|
|
|
} else if (!/^\d+$/.test(price)) {
|
|
|
this.errorTip = '价格只能为正整数';
|
|
|
} else if (!/9$/.test(price)) {
|
|
|
this.errorTip = '出售价格必须以9结尾';
|
|
|
} else {
|
|
|
this.errorTip = '';
|
|
|
valid = true;
|
|
|
}
|
|
|
console.log(this.errorTip, valid);
|
|
|
return valid;
|
|
|
},
|
|
|
changePrice() {
|
|
|
|
|
|
},
|
|
|
async calcPrice(price) {
|
|
|
const result = await this.postNoEntryCalcPrice({
|
|
|
price: price,
|
|
|
skup: this.noEntryOrderInfo.goodsInfo.skup
|
|
|
});
|
|
|
|
|
|
console.log(result);
|
|
|
|
|
|
if (result && result.code === 200) {
|
|
|
this.platformFee = get(result, 'data.platformFee', '');
|
|
|
this.bankTransferFee = get(result, 'data.bankTransferFee', '');
|
|
|
this.income = '¥' + get(result, 'data.income', '');
|
|
|
this.earnestMoney = '¥' + get(result, 'data.earnestMoney', '');
|
|
|
this.calced = true;
|
|
|
} else {
|
|
|
if (result.message) {
|
|
|
this.errorTip = result.message;
|
|
|
}
|
|
|
this.calced = false;
|
|
|
|
|
|
this.$createToast({
|
|
|
txt: this.errorTip,
|
|
|
type: 'warn'
|
|
|
}).show();
|
|
|
}
|
|
|
},
|
|
|
onChange(price) { // 价格改变时(文本框离开焦点)
|
|
|
if (this.checkPrice(price)) {
|
|
|
this.calcPrice(price);
|
|
|
} else {
|
|
|
this.$createToast({
|
|
|
txt: this.errorTip,
|
|
|
type: 'warn'
|
|
|
}).show();
|
|
|
}
|
|
|
},
|
|
|
showFeeDetail() { // 显示平台费用详情
|
|
|
this.platformFeeModalVisible = true;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
...
|
...
|
@@ -221,6 +338,10 @@ export default { |
|
|
color: #c94353;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.iconquestion {
|
|
|
font-size: 28px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -229,7 +350,6 @@ export default { |
|
|
width: 690px;
|
|
|
margin: 40px auto 20px auto;
|
|
|
overflow: hidden;
|
|
|
border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
|
.icon-container {
|
|
|
position: absolute;
|
...
|
...
|
@@ -250,6 +370,110 @@ export default { |
|
|
.address-info {
|
|
|
overflow: hidden;
|
|
|
padding: 0 0 20px 100px;
|
|
|
|
|
|
.user-name {
|
|
|
font-size: 32px;
|
|
|
font-weight: 500;
|
|
|
line-height: 36px;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
.user-address {
|
|
|
font-size: 24px;
|
|
|
color: #999;
|
|
|
line-height: 30px;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
.user-phone {
|
|
|
font-size: 28px;
|
|
|
font-weight: bold;
|
|
|
line-height: 32px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/deep/ .modal-content {
|
|
|
width: 570px;
|
|
|
}
|
|
|
|
|
|
.fee-dialog-container {
|
|
|
width: 100%;
|
|
|
|
|
|
.modal-title {
|
|
|
line-height: 120px;
|
|
|
text-align: center;
|
|
|
font-size: 28px;
|
|
|
}
|
|
|
|
|
|
.fee-line {
|
|
|
margin-bottom: 20px;
|
|
|
color: #000;
|
|
|
font-size: 28px;
|
|
|
display: flex;
|
|
|
|
|
|
.fee-title {
|
|
|
width: 50%;
|
|
|
}
|
|
|
|
|
|
.fee-price {
|
|
|
width: 50%;
|
|
|
text-align: right;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.submit-container {
|
|
|
width: 100%;
|
|
|
height: 180px;
|
|
|
position: fixed;
|
|
|
bottom: 0;
|
|
|
z-index: 9;
|
|
|
|
|
|
.agree-container {
|
|
|
width: 100%;
|
|
|
height: 80px;
|
|
|
border-top: 1px solid #f0f0f0;
|
|
|
background-color: #fff;
|
|
|
|
|
|
a {
|
|
|
display: inline-block;
|
|
|
text-decoration: underline;
|
|
|
color: #64ad88;
|
|
|
}
|
|
|
|
|
|
.checkbox {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
/deep/ .cube-checkbox-wrap {
|
|
|
padding: 10px 0;
|
|
|
color: #999;
|
|
|
|
|
|
.cube-checkbox-label {
|
|
|
font-size: 0.6rem;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.cube-checkbox_checked .cube-checkbox-ui i {
|
|
|
color: #0c2b48;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.submit-button {
|
|
|
width: 100%;
|
|
|
height: 100px;
|
|
|
background-color: #ccc;
|
|
|
|
|
|
button {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
color: #fff;
|
|
|
}
|
|
|
|
|
|
&.active {
|
|
|
background-color: #0c2b48;
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
|