|
@@ -6,12 +6,12 @@ |
|
@@ -6,12 +6,12 @@ |
6
|
<ImgSize class="pro-img" :src="noEntryOrderInfo.goodsInfo.goodImg || ''" :width="200" :height="200"></ImgSize>
|
6
|
<ImgSize class="pro-img" :src="noEntryOrderInfo.goodsInfo.goodImg || ''" :width="200" :height="200"></ImgSize>
|
7
|
<div class="pro-info">
|
7
|
<div class="pro-info">
|
8
|
<p class="pro-name">{{noEntryOrderInfo.goodsInfo.colorName}}, {{noEntryOrderInfo.goodsInfo.sizeName}}码</p>
|
8
|
<p class="pro-name">{{noEntryOrderInfo.goodsInfo.colorName}}, {{noEntryOrderInfo.goodsInfo.sizeName}}码</p>
|
9
|
- <p class="stock-info ufo-font">最低售价: ¥{{noEntryOrderInfo.goodsInfo.leastPrice}}</p>
|
9
|
+ <p class="stock-info ufo-font">最低售价: ¥{{noEntryOrderInfo.goodsInfo.leastPrice || noEntryOrderInfo.goodsInfo.price}}</p>
|
10
|
</div>
|
10
|
</div>
|
11
|
</div>
|
11
|
</div>
|
12
|
<div class="input-container">
|
12
|
<div class="input-container">
|
13
|
<InputUfo type="number" placeholder="定价需以9结尾.例如1999"
|
13
|
<InputUfo type="number" placeholder="定价需以9结尾.例如1999"
|
14
|
- :maxlength="8" class="ipt-number" v-model="chgPrice">
|
14
|
+ :maxlength="8" class="ipt-number ufo-font" v-model="chgPrice" @blur="onChange">
|
15
|
<span class="prepend" slot="prepend">¥</span>
|
15
|
<span class="prepend" slot="prepend">¥</span>
|
16
|
</InputUfo>
|
16
|
</InputUfo>
|
17
|
</div>
|
17
|
</div>
|
|
@@ -21,8 +21,8 @@ |
|
@@ -21,8 +21,8 @@ |
21
|
</div>
|
21
|
</div>
|
22
|
<div class="fee-container">
|
22
|
<div class="fee-container">
|
23
|
<div class="fee-line">
|
23
|
<div class="fee-line">
|
24
|
- <p class="fee-title">平台费用:</p>
|
|
|
25
|
- <p class="fee-price">{{platformFee}}</p>
|
24
|
+ <p class="fee-title">平台费用: <i class="iconfont iconquestion" @click="showFeeDetail"></i></p>
|
|
|
25
|
+ <p class="fee-price">{{platformFee.amount}}</p>
|
26
|
</div>
|
26
|
</div>
|
27
|
<div class="fee-line">
|
27
|
<div class="fee-line">
|
28
|
<p class="fee-title">银行转账费(1%):</p>
|
28
|
<p class="fee-title">银行转账费(1%):</p>
|
|
@@ -47,8 +47,37 @@ |
|
@@ -47,8 +47,37 @@ |
47
|
</p>
|
47
|
</p>
|
48
|
</div>
|
48
|
</div>
|
49
|
</div>
|
49
|
</div>
|
|
|
50
|
+ </div>
|
|
|
51
|
+ <div class="submit-container">
|
|
|
52
|
+ <div class="agree-container">
|
|
|
53
|
+ <div class="checkbox">
|
|
|
54
|
+ <Checkbox :option="labelOption" shape="square" v-model="isAgree"></Checkbox>
|
|
|
55
|
+ </div>
|
|
|
56
|
+ <a @click="showAgreement">卖家协议</a>
|
|
|
57
|
+ </div>
|
50
|
|
58
|
|
|
|
59
|
+ <div :class="['submit-button', (isAgree && calced) ? 'active' : '']">
|
|
|
60
|
+ <button @click="changePrice">提交</button>
|
|
|
61
|
+ </div>
|
51
|
</div>
|
62
|
</div>
|
|
|
63
|
+ <Modal v-model="platformFeeModalVisible" :transfer="true" cancel-text="我知道了">
|
|
|
64
|
+ <div class="fee-dialog-container">
|
|
|
65
|
+ <p class="modal-title">平台费用</p>
|
|
|
66
|
+
|
|
|
67
|
+ <p class="fee-line">
|
|
|
68
|
+ <span class="fee-title">商品鉴定费:</span>
|
|
|
69
|
+ <span class="fee-price">{{platformFee.appraiseFee}}</span>
|
|
|
70
|
+ </p>
|
|
|
71
|
+ <p class="fee-line">
|
|
|
72
|
+ <span class="fee-title">商品包装费:</span>
|
|
|
73
|
+ <span class="fee-price">{{platformFee.packageFee}}</span>
|
|
|
74
|
+ </p>
|
|
|
75
|
+ <p class="fee-line total">
|
|
|
76
|
+ <span class="fee-title">平台服务费:</span>
|
|
|
77
|
+ <span class="fee-price">{{platformFee.serviceFee}}</span>
|
|
|
78
|
+ </p>
|
|
|
79
|
+ </div>
|
|
|
80
|
+ </Modal>
|
52
|
</LayoutApp>
|
81
|
</LayoutApp>
|
53
|
</template>
|
82
|
</template>
|
54
|
|
83
|
|
|
@@ -58,22 +87,35 @@ import ScrollView from '../../../components/layout/scroll-view'; |
|
@@ -58,22 +87,35 @@ import ScrollView from '../../../components/layout/scroll-view'; |
58
|
import ImgSize from '../../../components/img-size';
|
87
|
import ImgSize from '../../../components/img-size';
|
59
|
import {createNamespacedHelpers} from 'vuex';
|
88
|
import {createNamespacedHelpers} from 'vuex';
|
60
|
import InputUfo from './components/input-ufo';
|
89
|
import InputUfo from './components/input-ufo';
|
|
|
90
|
+import {Checkbox} from 'cube-ui';
|
|
|
91
|
+import {get} from 'lodash';
|
|
|
92
|
+import Modal from './components/modal';
|
61
|
|
93
|
|
62
|
-const {mapState, mapActions, mapMutations} = createNamespacedHelpers('order/priceChange');
|
94
|
+const {mapState, mapActions} = createNamespacedHelpers('order/priceChange');
|
63
|
|
95
|
|
64
|
export default {
|
96
|
export default {
|
65
|
name: 'noEntryDetail',
|
97
|
name: 'noEntryDetail',
|
66
|
- components: {InputUfo, ScrollView, LayoutApp, ImgSize},
|
98
|
+ components: {Modal, InputUfo, ScrollView, LayoutApp, ImgSize, Checkbox},
|
67
|
data() {
|
99
|
data() {
|
68
|
return {
|
100
|
return {
|
69
|
title: '',
|
101
|
title: '',
|
70
|
- platformFee: '-¥0',
|
102
|
+ platformFeeModalVisible: false,
|
|
|
103
|
+ platformFee: {
|
|
|
104
|
+ amount: '-¥0',
|
|
|
105
|
+ appraiseFee: '¥0.00',
|
|
|
106
|
+ packageFee: '¥0.00',
|
|
|
107
|
+ serviceFee: '¥0.00'
|
|
|
108
|
+ },
|
71
|
bankTransferFee: '-¥0',
|
109
|
bankTransferFee: '-¥0',
|
72
|
income: '¥0',
|
110
|
income: '¥0',
|
73
|
errorTip: '',
|
111
|
errorTip: '',
|
74
|
chgPrice: '',
|
112
|
chgPrice: '',
|
75
|
calced: false,
|
113
|
calced: false,
|
76
|
earnestMoney: '¥0',
|
114
|
earnestMoney: '¥0',
|
|
|
115
|
+ isAgree: false,
|
|
|
116
|
+ labelOption: {
|
|
|
117
|
+ label: '我已阅读并同意'
|
|
|
118
|
+ }
|
77
|
};
|
119
|
};
|
78
|
},
|
120
|
},
|
79
|
asyncData({store, router}) {
|
121
|
asyncData({store, router}) {
|
|
@@ -81,12 +123,87 @@ export default { |
|
@@ -81,12 +123,87 @@ export default { |
81
|
},
|
123
|
},
|
82
|
mounted() {
|
124
|
mounted() {
|
83
|
// this.fetchOrder({orderCode: this.$route.params.orderCode});
|
125
|
// this.fetchOrder({orderCode: this.$route.params.orderCode});
|
|
|
126
|
+ // this.inputChange = debounce(this.onChange.bind(this), 500);
|
84
|
},
|
127
|
},
|
85
|
computed: {
|
128
|
computed: {
|
86
|
- ...mapState(['noEntryOrderInfo']),
|
129
|
+ ...mapState(['noEntryOrderInfo', 'fetching']),
|
|
|
130
|
+ postLoading() {
|
|
|
131
|
+ return this.fetchingChangePrice || !this.calced;
|
|
|
132
|
+ }
|
|
|
133
|
+ },
|
|
|
134
|
+ watch: {
|
|
|
135
|
+ chgPrice(newVal) {
|
|
|
136
|
+ this.calced = false;
|
|
|
137
|
+ this.platformFee = '-¥0';
|
|
|
138
|
+ this.bankTransferFee = '-¥0';
|
|
|
139
|
+ this.income = '¥0';
|
|
|
140
|
+ this.earnestMoney = '¥0';
|
|
|
141
|
+ }
|
87
|
},
|
142
|
},
|
88
|
methods: {
|
143
|
methods: {
|
89
|
- ...mapActions(['fetchOrder'])
|
144
|
+ ...mapActions(['fetchOrder', 'postNoEntryCalcPrice', 'postNoEntryChangePrice']),
|
|
|
145
|
+ showAgreement() {
|
|
|
146
|
+ console.log('showAgreement');
|
|
|
147
|
+ },
|
|
|
148
|
+ checkPrice(price) {
|
|
|
149
|
+ let valid = false;
|
|
|
150
|
+
|
|
|
151
|
+ if (!price) {
|
|
|
152
|
+ this.errorTip = '没有价格';
|
|
|
153
|
+ return false;
|
|
|
154
|
+ } else if (!/^\d+$/.test(price)) {
|
|
|
155
|
+ this.errorTip = '价格只能为正整数';
|
|
|
156
|
+ } else if (!/9$/.test(price)) {
|
|
|
157
|
+ this.errorTip = '出售价格必须以9结尾';
|
|
|
158
|
+ } else {
|
|
|
159
|
+ this.errorTip = '';
|
|
|
160
|
+ valid = true;
|
|
|
161
|
+ }
|
|
|
162
|
+ console.log(this.errorTip, valid);
|
|
|
163
|
+ return valid;
|
|
|
164
|
+ },
|
|
|
165
|
+ changePrice() {
|
|
|
166
|
+
|
|
|
167
|
+ },
|
|
|
168
|
+ async calcPrice(price) {
|
|
|
169
|
+ const result = await this.postNoEntryCalcPrice({
|
|
|
170
|
+ price: price,
|
|
|
171
|
+ skup: this.noEntryOrderInfo.goodsInfo.skup
|
|
|
172
|
+ });
|
|
|
173
|
+
|
|
|
174
|
+ console.log(result);
|
|
|
175
|
+
|
|
|
176
|
+ if (result && result.code === 200) {
|
|
|
177
|
+ this.platformFee = get(result, 'data.platformFee', '');
|
|
|
178
|
+ this.bankTransferFee = get(result, 'data.bankTransferFee', '');
|
|
|
179
|
+ this.income = '¥' + get(result, 'data.income', '');
|
|
|
180
|
+ this.earnestMoney = '¥' + get(result, 'data.earnestMoney', '');
|
|
|
181
|
+ this.calced = true;
|
|
|
182
|
+ } else {
|
|
|
183
|
+ if (result.message) {
|
|
|
184
|
+ this.errorTip = result.message;
|
|
|
185
|
+ }
|
|
|
186
|
+ this.calced = false;
|
|
|
187
|
+
|
|
|
188
|
+ this.$createToast({
|
|
|
189
|
+ txt: this.errorTip,
|
|
|
190
|
+ type: 'warn'
|
|
|
191
|
+ }).show();
|
|
|
192
|
+ }
|
|
|
193
|
+ },
|
|
|
194
|
+ onChange(price) { // 价格改变时(文本框离开焦点)
|
|
|
195
|
+ if (this.checkPrice(price)) {
|
|
|
196
|
+ this.calcPrice(price);
|
|
|
197
|
+ } else {
|
|
|
198
|
+ this.$createToast({
|
|
|
199
|
+ txt: this.errorTip,
|
|
|
200
|
+ type: 'warn'
|
|
|
201
|
+ }).show();
|
|
|
202
|
+ }
|
|
|
203
|
+ },
|
|
|
204
|
+ showFeeDetail() { // 显示平台费用详情
|
|
|
205
|
+ this.platformFeeModalVisible = true;
|
|
|
206
|
+ }
|
90
|
}
|
207
|
}
|
91
|
};
|
208
|
};
|
92
|
</script>
|
209
|
</script>
|
|
@@ -221,6 +338,10 @@ export default { |
|
@@ -221,6 +338,10 @@ export default { |
221
|
color: #c94353;
|
338
|
color: #c94353;
|
222
|
}
|
339
|
}
|
223
|
}
|
340
|
}
|
|
|
341
|
+
|
|
|
342
|
+ .iconquestion {
|
|
|
343
|
+ font-size: 28px;
|
|
|
344
|
+ }
|
224
|
}
|
345
|
}
|
225
|
}
|
346
|
}
|
226
|
|
347
|
|
|
@@ -229,7 +350,6 @@ export default { |
|
@@ -229,7 +350,6 @@ export default { |
229
|
width: 690px;
|
350
|
width: 690px;
|
230
|
margin: 40px auto 20px auto;
|
351
|
margin: 40px auto 20px auto;
|
231
|
overflow: hidden;
|
352
|
overflow: hidden;
|
232
|
- border-bottom: 1px solid #f0f0f0;
|
|
|
233
|
|
353
|
|
234
|
.icon-container {
|
354
|
.icon-container {
|
235
|
position: absolute;
|
355
|
position: absolute;
|
|
@@ -250,6 +370,110 @@ export default { |
|
@@ -250,6 +370,110 @@ export default { |
250
|
.address-info {
|
370
|
.address-info {
|
251
|
overflow: hidden;
|
371
|
overflow: hidden;
|
252
|
padding: 0 0 20px 100px;
|
372
|
padding: 0 0 20px 100px;
|
|
|
373
|
+
|
|
|
374
|
+ .user-name {
|
|
|
375
|
+ font-size: 32px;
|
|
|
376
|
+ font-weight: 500;
|
|
|
377
|
+ line-height: 36px;
|
|
|
378
|
+ margin-bottom: 10px;
|
|
|
379
|
+ }
|
|
|
380
|
+
|
|
|
381
|
+ .user-address {
|
|
|
382
|
+ font-size: 24px;
|
|
|
383
|
+ color: #999;
|
|
|
384
|
+ line-height: 30px;
|
|
|
385
|
+ margin-bottom: 10px;
|
|
|
386
|
+ }
|
|
|
387
|
+
|
|
|
388
|
+ .user-phone {
|
|
|
389
|
+ font-size: 28px;
|
|
|
390
|
+ font-weight: bold;
|
|
|
391
|
+ line-height: 32px;
|
|
|
392
|
+ }
|
|
|
393
|
+ }
|
|
|
394
|
+ }
|
|
|
395
|
+ }
|
|
|
396
|
+
|
|
|
397
|
+ /deep/ .modal-content {
|
|
|
398
|
+ width: 570px;
|
|
|
399
|
+ }
|
|
|
400
|
+
|
|
|
401
|
+ .fee-dialog-container {
|
|
|
402
|
+ width: 100%;
|
|
|
403
|
+
|
|
|
404
|
+ .modal-title {
|
|
|
405
|
+ line-height: 120px;
|
|
|
406
|
+ text-align: center;
|
|
|
407
|
+ font-size: 28px;
|
|
|
408
|
+ }
|
|
|
409
|
+
|
|
|
410
|
+ .fee-line {
|
|
|
411
|
+ margin-bottom: 20px;
|
|
|
412
|
+ color: #000;
|
|
|
413
|
+ font-size: 28px;
|
|
|
414
|
+ display: flex;
|
|
|
415
|
+
|
|
|
416
|
+ .fee-title {
|
|
|
417
|
+ width: 50%;
|
|
|
418
|
+ }
|
|
|
419
|
+
|
|
|
420
|
+ .fee-price {
|
|
|
421
|
+ width: 50%;
|
|
|
422
|
+ text-align: right;
|
|
|
423
|
+ }
|
|
|
424
|
+ }
|
|
|
425
|
+ }
|
|
|
426
|
+
|
|
|
427
|
+ .submit-container {
|
|
|
428
|
+ width: 100%;
|
|
|
429
|
+ height: 180px;
|
|
|
430
|
+ position: fixed;
|
|
|
431
|
+ bottom: 0;
|
|
|
432
|
+ z-index: 9;
|
|
|
433
|
+
|
|
|
434
|
+ .agree-container {
|
|
|
435
|
+ width: 100%;
|
|
|
436
|
+ height: 80px;
|
|
|
437
|
+ border-top: 1px solid #f0f0f0;
|
|
|
438
|
+ background-color: #fff;
|
|
|
439
|
+
|
|
|
440
|
+ a {
|
|
|
441
|
+ display: inline-block;
|
|
|
442
|
+ text-decoration: underline;
|
|
|
443
|
+ color: #64ad88;
|
|
|
444
|
+ }
|
|
|
445
|
+
|
|
|
446
|
+ .checkbox {
|
|
|
447
|
+ display: inline-block;
|
|
|
448
|
+ }
|
|
|
449
|
+
|
|
|
450
|
+ /deep/ .cube-checkbox-wrap {
|
|
|
451
|
+ padding: 10px 0;
|
|
|
452
|
+ color: #999;
|
|
|
453
|
+
|
|
|
454
|
+ .cube-checkbox-label {
|
|
|
455
|
+ font-size: 0.6rem;
|
|
|
456
|
+ }
|
|
|
457
|
+ }
|
|
|
458
|
+
|
|
|
459
|
+ .cube-checkbox_checked .cube-checkbox-ui i {
|
|
|
460
|
+ color: #0c2b48;
|
|
|
461
|
+ }
|
|
|
462
|
+ }
|
|
|
463
|
+
|
|
|
464
|
+ .submit-button {
|
|
|
465
|
+ width: 100%;
|
|
|
466
|
+ height: 100px;
|
|
|
467
|
+ background-color: #ccc;
|
|
|
468
|
+
|
|
|
469
|
+ button {
|
|
|
470
|
+ width: 100%;
|
|
|
471
|
+ height: 100%;
|
|
|
472
|
+ color: #fff;
|
|
|
473
|
+ }
|
|
|
474
|
+
|
|
|
475
|
+ &.active {
|
|
|
476
|
+ background-color: #0c2b48;
|
253
|
}
|
477
|
}
|
254
|
}
|
478
|
}
|
255
|
}
|
479
|
}
|