Authored by 王洪广

修改退换货

@@ -43,13 +43,15 @@ @@ -43,13 +43,15 @@
43 <td class="return-goods-info"> 43 <td class="return-goods-info">
44 <a href="{{href}}">{{name}}</a> 44 <a href="{{href}}">{{name}}</a>
45 <span>颜色:{{color}} 尺码:{{size}}</span> 45 <span>颜色:{{color}} 尺码:{{size}}</span>
  46 + {{#if specialNoticeBo}}
46 <div class="special-tip"> 47 <div class="special-tip">
47 - <span>商品七天无理由退换 <i class="doubt"></i></span> 48 + <span>{{specialNoticeBo.title}} <i class="doubt"></i></span>
48 <div class="special-content"> 49 <div class="special-content">
49 - <span>{{specialNoticeBo}}</span> 50 + <span>{{specialNoticeBo.remark}}</span>
50 <i class="arrow"></i> 51 <i class="arrow"></i>
51 </div> 52 </div>
52 </div> 53 </div>
  54 + {{/if}}
53 </td> 55 </td>
54 56
55 {{#if banMsg}} 57 {{#if banMsg}}
@@ -171,13 +173,15 @@ @@ -171,13 +173,15 @@
171 <td class="return-goods-info"> 173 <td class="return-goods-info">
172 <a href="{{href}}">{{name}}</a> 174 <a href="{{href}}">{{name}}</a>
173 <span>颜色:{{color}} 尺码:{{size}}</span> 175 <span>颜色:{{color}} 尺码:{{size}}</span>
  176 + {{#if specialNoticeBo}}
174 <div class="special-tip"> 177 <div class="special-tip">
175 - <span>商品七天无理由退换 <i class="doubt"></i></span> 178 + <span>{{specialNoticeBo.title}} <i class="doubt"></i></span>
176 <div class="special-content"> 179 <div class="special-content">
177 - <span>{{specialNoticeBo}}</span> 180 + <span>{{specialNoticeBo.remark}}</span>
178 <i class="arrow"></i> 181 <i class="arrow"></i>
179 </div> 182 </div>
180 </div> 183 </div>
  184 + {{/if}}
181 </td> 185 </td>
182 <td class="refund-price"> 186 <td class="refund-price">
183 {{price}} 187 {{price}}
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 </div> 23 </div>
24 {{#if canCancelUrl}} 24 {{#if canCancelUrl}}
25 <div class="cancel-return"> 25 <div class="cancel-return">
26 - 如果您不想退货了,您可以 <a href="javascript:;" data-id="{{returnId}}">取消申请</a> 26 + 如果您不想退货了,您可以 <a href="javascript:;" data-id="{{returnId}}" class="cancel-trigger" data-url="{{canCancelUrl}}">取消申请</a>
27 </div> 27 </div>
28 {{/if}} 28 {{/if}}
29 <div class="detail-container"> 29 <div class="detail-container">
@@ -65,8 +65,9 @@ @@ -65,8 +65,9 @@
65 <div class="return-status"> 65 <div class="return-status">
66 {{returnStatus}} 66 {{returnStatus}}
67 </div> 67 </div>
68 - <div class="operation">  
69 - <a class="op-item" href="{{moreHref}}" target="_blank">查看详情</a> 68 + <div class="operation {{#if canCancelUrl}}cancel-return{{/if}}">
  69 + {{#if canCancelUrl}}<a class="op-item cancel-trigger" href="javascript:;" data-id="{{returnId}}" data-url="{{canCancelUrl}}">取消申请</a>{{/if}}
  70 + <a class="op-item" href="{{moreHref}}" target="_blank">查看详情</a>
70 </div> 71 </div>
71 </div> 72 </div>
72 </div> 73 </div>
@@ -80,7 +80,7 @@ function sendExpressCode() { @@ -80,7 +80,7 @@ function sendExpressCode() {
80 }); 80 });
81 } 81 }
82 82
83 -function cancelApply(id) { 83 +function cancelApply(id, url) {
84 var template = Handlebars.compile(cancelApplyDialog); 84 var template = Handlebars.compile(cancelApplyDialog);
85 var html = template({messageIcon: 'icon-warn', messageTitle: '取消申请', messageSummary: '您确定要请取消申请吗?'}); 85 var html = template({messageIcon: 'icon-warn', messageTitle: '取消申请', messageSummary: '您确定要请取消申请吗?'});
86 var options = { 86 var options = {
@@ -93,7 +93,7 @@ function cancelApply(id) { @@ -93,7 +93,7 @@ function cancelApply(id) {
93 cb: function() { 93 cb: function() {
94 $.ajax({ 94 $.ajax({
95 type: 'POST', 95 type: 'POST',
96 - url: '/home/returns/cancelChange', 96 + url: url,
97 data: { 97 data: {
98 id: id 98 id: id
99 } 99 }
@@ -143,7 +143,7 @@ $('#submit-btn').click(function() { @@ -143,7 +143,7 @@ $('#submit-btn').click(function() {
143 sendExpressCode(); 143 sendExpressCode();
144 }); 144 });
145 145
146 -$('.cancel-return').on('click', 'a', function() {  
147 - active = cancelApply($(this).data('id')); 146 +$('.cancel-return').on('click', '.cancel-trigger', function() {
  147 + active = cancelApply($(this).data('id'), $(this).data('url'));
148 active.show(); 148 active.show();
149 }) 149 })
@@ -31,9 +31,12 @@ @@ -31,9 +31,12 @@
31 } 31 }
32 } 32 }
33 .cancel-return{ 33 .cancel-return{
34 - margin-left: 40px;  
35 - height:26px; 34 + height: 26px;
  35 + margin: 0 10px;
  36 + padding-top: 10px;
  37 + padding-left: 10px;
36 line-height: 26px; 38 line-height: 26px;
  39 + border-top: 1px solid #e0e0e0;
37 a{ 40 a{
38 display: inline-block; 41 display: inline-block;
39 padding: 0 10px; 42 padding: 0 10px;