Authored by 陈峰

commit

@@ -36,7 +36,7 @@ export default { @@ -36,7 +36,7 @@ export default {
36 margin-bottom: 15px; 36 margin-bottom: 15px;
37 background-color: #f5f5f5; 37 background-color: #f5f5f5;
38 border-radius: 10px; 38 border-radius: 10px;
39 - font-size: 40px; 39 + font-size: 32px;
40 40
41 &:after { 41 &:after {
42 border-radius: 20px; 42 border-radius: 20px;
@@ -44,7 +44,6 @@ export default { @@ -44,7 +44,6 @@ export default {
44 } 44 }
45 45
46 /deep/ .cube-input-field { 46 /deep/ .cube-input-field {
47 - font-weight: bold;  
48 color: #000; 47 color: #000;
49 } 48 }
50 } 49 }
@@ -8,13 +8,21 @@ @@ -8,13 +8,21 @@
8 @on-sure="onSure"> 8 @on-sure="onSure">
9 <div class="change-price-modal"> 9 <div class="change-price-modal">
10 <p class="modal-title">当前{{skc.sizeName}}码最低售价:¥{{skc.leastPrice}}</p> 10 <p class="modal-title">当前{{skc.sizeName}}码最低售价:¥{{skc.leastPrice}}</p>
11 - <InputUfo type="number" :maxlength="8" class="input-number" v-model="chgPrice"> 11 + <InputUfo type="number" placeholder="定价需以9结尾,例如1999" :maxlength="8" class="ipt-number" v-model="chgPrice">
12 <span class="prepend" slot="prepend">¥</span> 12 <span class="prepend" slot="prepend">¥</span>
13 </InputUfo> 13 </InputUfo>
14 <p class="tips" v-show="errorTip">{{errorTip}}</p> 14 <p class="tips" v-show="errorTip">{{errorTip}}</p>
15 - <p class="price-line" v-for="(price, inx) in prices" :key="inx" :class="{total: price.total}">  
16 - <span class="title">{{price.label}}</span>  
17 - <span class="price">{{price.money}}</span> 15 + <p class="price-line">
  16 + <span class="title">平台费用:</span>
  17 + <span class="price">{{platformFee}}</span>
  18 + </p>
  19 + <p class="price-line">
  20 + <span class="title">银行转账费用:</span>
  21 + <span class="price">{{bankTransferFee}}</span>
  22 + </p>
  23 + <p class="price-line total">
  24 + <span class="title">实际收入:</span>
  25 + <span class="price">{{income}}</span>
18 </p> 26 </p>
19 </div> 27 </div>
20 </Modal> 28 </Modal>
@@ -34,7 +42,9 @@ export default { @@ -34,7 +42,9 @@ export default {
34 return { 42 return {
35 visiable: false, 43 visiable: false,
36 skc: {}, 44 skc: {},
37 - prices: [], 45 + platformFee: '-¥0',
  46 + bankTransferFee: '-¥0',
  47 + income: '¥0',
38 errorTip: '', 48 errorTip: '',
39 chgPrice: '', 49 chgPrice: '',
40 }; 50 };
@@ -52,6 +62,9 @@ export default { @@ -52,6 +62,9 @@ export default {
52 }, 62 },
53 methods: { 63 methods: {
54 ...mapActions(['postCalcPrice']), 64 ...mapActions(['postCalcPrice']),
  65 + resetPrices() {
  66 + this.prices = [];
  67 + },
55 show({skc, product}) { 68 show({skc, product}) {
56 this.chgPrice = ''; 69 this.chgPrice = '';
57 this.errorTip = ''; 70 this.errorTip = '';
@@ -68,6 +81,10 @@ export default { @@ -68,6 +81,10 @@ export default {
68 onChange(price) { 81 onChange(price) {
69 if (this.checkPrice(price)) { 82 if (this.checkPrice(price)) {
70 this.calcPrice(price); 83 this.calcPrice(price);
  84 + } else {
  85 + this.platformFee = '-¥0';
  86 + this.bankTransferFee = '-¥0';
  87 + this.income = '¥0';
71 } 88 }
72 }, 89 },
73 async calcPrice(price) { 90 async calcPrice(price) {
@@ -80,17 +97,9 @@ export default { @@ -80,17 +97,9 @@ export default {
80 }); 97 });
81 98
82 if (result && result.code === 200) { 99 if (result && result.code === 200) {
83 - this.prices = [{  
84 - label: '平台费用:',  
85 - money: get(result, 'data.platformFee.amount', '')  
86 - }, {  
87 - label: '银行转账费用:',  
88 - money: get(result, 'data.bankTransferFee', '')  
89 - }, {  
90 - label: '实际收入:',  
91 - money: get(result, 'data.income', ''),  
92 - total: true  
93 - }]; 100 + this.platformFee = get(result, 'data.platformFee.amount', '');
  101 + this.bankTransferFee = get(result, 'data.bankTransferFee', '');
  102 + this.income = get(result, 'data.income', '');
94 } else { 103 } else {
95 if (result.message) { 104 if (result.message) {
96 this.errorTip = result.message; 105 this.errorTip = result.message;
@@ -172,7 +181,7 @@ export default { @@ -172,7 +181,7 @@ export default {
172 } 181 }
173 } 182 }
174 183
175 - .input-number { 184 + .ipt-number {
176 /deep/ .prepend { 185 /deep/ .prepend {
177 width: 40px; 186 width: 40px;
178 margin-left: 20px; 187 margin-left: 20px;