1
|
<template>
|
1
|
<template>
|
2
|
<div class="edit-logistics-page">
|
2
|
<div class="edit-logistics-page">
|
3
|
- <form class="edit-logistics">
|
3
|
+ <div class="edit-logistics">
|
4
|
<label @click="companylist">
|
4
|
<label @click="companylist">
|
5
|
选择快递公司<input class="company-val" type="text" value="{{company_name}}" readonly>
|
5
|
选择快递公司<input class="company-val" type="text" value="{{company_name}}" readonly>
|
6
|
<span class="icon icon-right"></span>
|
6
|
<span class="icon icon-right"></span>
|
|
@@ -9,7 +9,7 @@ |
|
@@ -9,7 +9,7 @@ |
9
|
快递单号
|
9
|
快递单号
|
10
|
<input class="num" maxlength="20" v-model='num'>
|
10
|
<input class="num" maxlength="20" v-model='num'>
|
11
|
</label>
|
11
|
</label>
|
12
|
- </form>
|
12
|
+ </div>
|
13
|
<div class="submit" @click="submit">确认</div>
|
13
|
<div class="submit" @click="submit">确认</div>
|
14
|
</div>
|
14
|
</div>
|
15
|
</template>
|
15
|
</template>
|
|
@@ -18,6 +18,7 @@ |
|
@@ -18,6 +18,7 @@ |
18
|
const $ = require('jquery');
|
18
|
const $ = require('jquery');
|
19
|
const tip = require('common/tip');
|
19
|
const tip = require('common/tip');
|
20
|
const yoho = require('yoho');
|
20
|
const yoho = require('yoho');
|
|
|
21
|
+ const modal = require('common/modal');
|
21
|
|
22
|
|
22
|
module.exports = {
|
23
|
module.exports = {
|
23
|
props: ['applyid', 'type', 'company_id', 'company_name'],
|
24
|
props: ['applyid', 'type', 'company_id', 'company_name'],
|
|
@@ -42,27 +43,34 @@ |
|
@@ -42,27 +43,34 @@ |
42
|
return false;
|
43
|
return false;
|
43
|
}
|
44
|
}
|
44
|
|
45
|
|
45
|
- $.ajax({
|
|
|
46
|
- method: 'POST',
|
|
|
47
|
- url: '/me/return/save-logistics',
|
|
|
48
|
- data: {
|
|
|
49
|
- applyid: this.applyid,
|
|
|
50
|
- type: this.type,
|
|
|
51
|
- expressId: this.company_id,
|
|
|
52
|
- expressCompany: this.company_name,
|
|
|
53
|
- expressNumber: this.num
|
|
|
54
|
- }
|
|
|
55
|
- }).then(res => {
|
|
|
56
|
- if ($.type(res) !== 'object') {
|
|
|
57
|
- res = {};
|
|
|
58
|
- }
|
|
|
59
|
- if (res.code !== 200) {
|
|
|
60
|
- tip(res.message || '网络错误');
|
|
|
61
|
- } else {
|
|
|
62
|
- yoho.goBack();
|
|
|
63
|
- }
|
46
|
+ const text = `快递公司:${this.company_name} <br>单号:${this.num}`;
|
|
|
47
|
+ const _this = this;
|
|
|
48
|
+
|
|
|
49
|
+ modal.confirm(text, '请确认寄回信息是否正确?', function() {
|
|
|
50
|
+ this.hide();
|
|
|
51
|
+ $.ajax({
|
|
|
52
|
+ url: '/me/return/save-logistics',
|
|
|
53
|
+ type: 'post',
|
|
|
54
|
+ data: {
|
|
|
55
|
+ applyid: _this.applyid,
|
|
|
56
|
+ type: _this.type,
|
|
|
57
|
+ expressId: _this.company_id,
|
|
|
58
|
+ expressCompany: _this.company_name,
|
|
|
59
|
+ expressNumber: _this.num
|
|
|
60
|
+ }
|
|
|
61
|
+ }).then(res => {
|
|
|
62
|
+ if ($.type(res) !== 'object') {
|
|
|
63
|
+ res = {};
|
|
|
64
|
+ }
|
|
|
65
|
+ if (res.code !== 200) {
|
|
|
66
|
+ tip(res.message || '网络错误');
|
|
|
67
|
+ } else {
|
|
|
68
|
+ yoho.goBack();
|
|
|
69
|
+ yoho.store.set('refundStatus', true);
|
|
|
70
|
+ return false;
|
|
|
71
|
+ }
|
|
|
72
|
+ });
|
64
|
});
|
73
|
});
|
65
|
- return false;
|
|
|
66
|
}
|
74
|
}
|
67
|
}
|
75
|
}
|
68
|
};
|
76
|
};
|