...
|
...
|
@@ -8,13 +8,21 @@ |
|
|
@on-sure="onSure">
|
|
|
<div class="change-price-modal">
|
|
|
<p class="modal-title">当前{{skc.sizeName}}码最低售价:¥{{skc.leastPrice}}</p>
|
|
|
<InputUfo type="number" :maxlength="8" class="input-number" v-model="chgPrice">
|
|
|
<InputUfo type="number" placeholder="定价需以9结尾,例如1999" :maxlength="8" class="ipt-number" v-model="chgPrice">
|
|
|
<span class="prepend" slot="prepend">¥</span>
|
|
|
</InputUfo>
|
|
|
<p class="tips" v-show="errorTip">{{errorTip}}</p>
|
|
|
<p class="price-line" v-for="(price, inx) in prices" :key="inx" :class="{total: price.total}">
|
|
|
<span class="title">{{price.label}}</span>
|
|
|
<span class="price">{{price.money}}</span>
|
|
|
<p class="price-line">
|
|
|
<span class="title">平台费用:</span>
|
|
|
<span class="price">{{platformFee}}</span>
|
|
|
</p>
|
|
|
<p class="price-line">
|
|
|
<span class="title">银行转账费用:</span>
|
|
|
<span class="price">{{bankTransferFee}}</span>
|
|
|
</p>
|
|
|
<p class="price-line total">
|
|
|
<span class="title">实际收入:</span>
|
|
|
<span class="price">{{income}}</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
</Modal>
|
...
|
...
|
@@ -34,7 +42,9 @@ export default { |
|
|
return {
|
|
|
visiable: false,
|
|
|
skc: {},
|
|
|
prices: [],
|
|
|
platformFee: '-¥0',
|
|
|
bankTransferFee: '-¥0',
|
|
|
income: '¥0',
|
|
|
errorTip: '',
|
|
|
chgPrice: '',
|
|
|
};
|
...
|
...
|
@@ -52,6 +62,9 @@ export default { |
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['postCalcPrice']),
|
|
|
resetPrices() {
|
|
|
this.prices = [];
|
|
|
},
|
|
|
show({skc, product}) {
|
|
|
this.chgPrice = '';
|
|
|
this.errorTip = '';
|
...
|
...
|
@@ -68,6 +81,10 @@ export default { |
|
|
onChange(price) {
|
|
|
if (this.checkPrice(price)) {
|
|
|
this.calcPrice(price);
|
|
|
} else {
|
|
|
this.platformFee = '-¥0';
|
|
|
this.bankTransferFee = '-¥0';
|
|
|
this.income = '¥0';
|
|
|
}
|
|
|
},
|
|
|
async calcPrice(price) {
|
...
|
...
|
@@ -80,17 +97,9 @@ export default { |
|
|
});
|
|
|
|
|
|
if (result && result.code === 200) {
|
|
|
this.prices = [{
|
|
|
label: '平台费用:',
|
|
|
money: get(result, 'data.platformFee.amount', '')
|
|
|
}, {
|
|
|
label: '银行转账费用:',
|
|
|
money: get(result, 'data.bankTransferFee', '')
|
|
|
}, {
|
|
|
label: '实际收入:',
|
|
|
money: get(result, 'data.income', ''),
|
|
|
total: true
|
|
|
}];
|
|
|
this.platformFee = get(result, 'data.platformFee.amount', '');
|
|
|
this.bankTransferFee = get(result, 'data.bankTransferFee', '');
|
|
|
this.income = get(result, 'data.income', '');
|
|
|
} else {
|
|
|
if (result.message) {
|
|
|
this.errorTip = result.message;
|
...
|
...
|
@@ -172,7 +181,7 @@ export default { |
|
|
}
|
|
|
}
|
|
|
|
|
|
.input-number {
|
|
|
.ipt-number {
|
|
|
/deep/ .prepend {
|
|
|
width: 40px;
|
|
|
margin-left: 20px;
|
...
|
...
|
|