Authored by 沈志敏

fix bug

1 <div class="modal {{styleClass}}"> 1 <div class="modal {{styleClass}}">
2 <h2>{{title}}</h2> 2 <h2>{{title}}</h2>
3 - <p>{{text}}</p> 3 + <p>{{{text}}}</p>
4 <hr> 4 <hr>
5 <div class="button-group"> 5 <div class="button-group">
6 {{#each buttons}} 6 {{#each buttons}}
@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 7
8 .edit-logistics { 8 .edit-logistics {
9 display: inline-block; 9 display: inline-block;
10 - margin-top: 20px;  
11 padding: 0 30px; 10 padding: 0 30px;
12 width: 100%; 11 width: 100%;
13 background: #fff; 12 background: #fff;
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 </div> 13 </div>
14 </li> 14 </li>
15 </ul> 15 </ul>
16 - <div v-if="detail.status == 20" 16 + <div v-if="detail.status == 20 && detail.deliveryTpye != 20"
17 class="logistics-detail"> 17 class="logistics-detail">
18 <template v-if="detail.notice"> 18 <template v-if="detail.notice">
19 <a href="/me/logistic?order_code={{sourceOrderCode}}&id={{applyid}}&type={{type}}"> 19 <a href="/me/logistic?order_code={{sourceOrderCode}}&id={{applyid}}&type={{type}}">
@@ -131,6 +131,7 @@ @@ -131,6 +131,7 @@
131 this.show = false; 131 this.show = false;
132 this.detail = {}; 132 this.detail = {};
133 133
  134 + yoho.store.remove('refundStatus');
134 $.ajax({ 135 $.ajax({
135 url: '/me/return/status-detail', 136 url: '/me/return/status-detail',
136 data: { 137 data: {
@@ -170,7 +171,6 @@ @@ -170,7 +171,6 @@
170 url = '/me/return/exchange/cancel-apply'; 171 url = '/me/return/exchange/cancel-apply';
171 } 172 }
172 173
173 -  
174 Modal.confirm('', '确认取消吗?', function() { 174 Modal.confirm('', '确认取消吗?', function() {
175 this.hide(); 175 this.hide();
176 $.ajax({ 176 $.ajax({
@@ -193,7 +193,7 @@ @@ -193,7 +193,7 @@
193 this.reload(); 193 this.reload();
194 194
195 document.addEventListener('visibilitychange', () => { 195 document.addEventListener('visibilitychange', () => {
196 - if (!document.hidden) { 196 + if (!document.hidden && yoho.store.get('refundStatus')) {
197 this.reload(); 197 this.reload();
198 } 198 }
199 }); 199 });
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 };