Merge branch 'feature/return' of git.yoho.cn:fe/yoho-blk into feature/return
Showing
16 changed files
with
437 additions
and
32 deletions
@@ -83,7 +83,29 @@ const refundDetail = (req, res, next) => { | @@ -83,7 +83,29 @@ const refundDetail = (req, res, next) => { | ||
83 | }; | 83 | }; |
84 | 84 | ||
85 | const exchange = (req, res, next) => { | 85 | const exchange = (req, res, next) => { |
86 | - next(); | 86 | + const code = req.params.orderCode; |
87 | + const uid = req.user.uid || '8050560'; | ||
88 | + | ||
89 | + returns.getChangeGoodsList(code, uid).then(result => { | ||
90 | + res.display('index', { | ||
91 | + page: 'returns-change', | ||
92 | + isMe: true, | ||
93 | + content: Object.assign({ | ||
94 | + nav: mcHandler.getMeCrumb('我的退/换货'), | ||
95 | + navigation: mcHandler.getSideMenu('我的退/换货'), | ||
96 | + banner: 'http://placehold.it/{width}x{height}' | ||
97 | + }, result) | ||
98 | + }); | ||
99 | + }).catch(next); | ||
100 | +}; | ||
101 | + | ||
102 | +const getProductInfo = (req, res, next) => { | ||
103 | + const productId = req.query.productId; | ||
104 | + const productSkn = req.query.productSkn; | ||
105 | + | ||
106 | + returns.getProductInfo(productId, productSkn).then(result => { | ||
107 | + res.json(result); | ||
108 | + }).catch(next); | ||
87 | }; | 109 | }; |
88 | 110 | ||
89 | const detailExchange = (req, res) => { | 111 | const detailExchange = (req, res) => { |
@@ -96,12 +118,47 @@ const detailExchange = (req, res) => { | @@ -96,12 +118,47 @@ const detailExchange = (req, res) => { | ||
96 | content: { | 118 | content: { |
97 | nav: mcHandler.getMeCrumb('我的退/换货'), | 119 | nav: mcHandler.getMeCrumb('我的退/换货'), |
98 | navigation: mcHandler.getSideMenu('我的退/换货'), | 120 | navigation: mcHandler.getSideMenu('我的退/换货'), |
99 | - banner: 'http://placehold.it/{width}x{height}' | ||
100 | - | ||
101 | - // exchange: { | ||
102 | - | ||
103 | - | ||
104 | - // } | 121 | + banner: 'http://placehold.it/{width}x{height}', |
122 | + | ||
123 | + exchange: { | ||
124 | + // audit: true, | ||
125 | + // through: false, | ||
126 | + // send: true, | ||
127 | + finish: true, | ||
128 | + way: '上门送货', | ||
129 | + goods: [ | ||
130 | + { | ||
131 | + img: '', | ||
132 | + name: 'fdefwfwefwrefverfref', | ||
133 | + color: '', | ||
134 | + size: '', | ||
135 | + num: '', | ||
136 | + reason: '', | ||
137 | + exchangeColor: '蓝色', | ||
138 | + exchangeSize: 'M' | ||
139 | + }, | ||
140 | + { | ||
141 | + img: '', | ||
142 | + name: 'fdefwfwefwrefverfref', | ||
143 | + color: '', | ||
144 | + size: '', | ||
145 | + num: '', | ||
146 | + reason: '', | ||
147 | + exchangeColor: '蓝色', | ||
148 | + exchangeSize: 'M' | ||
149 | + } | ||
150 | + ], | ||
151 | + reasonInfo: [ | ||
152 | + { | ||
153 | + problem: '太小了', | ||
154 | + img: '' | ||
155 | + }, | ||
156 | + { | ||
157 | + problem: '太小了', | ||
158 | + img: '' | ||
159 | + } | ||
160 | + ] | ||
161 | + } | ||
105 | } | 162 | } |
106 | }); | 163 | }); |
107 | }; | 164 | }; |
@@ -111,7 +168,8 @@ module.exports = { | @@ -111,7 +168,8 @@ module.exports = { | ||
111 | detail, | 168 | detail, |
112 | refund, | 169 | refund, |
113 | refundApply, | 170 | refundApply, |
114 | - refundDetail, | ||
115 | exchange, | 171 | exchange, |
172 | + getProductInfo, | ||
173 | + refundDetail, | ||
116 | detailExchange | 174 | detailExchange |
117 | }; | 175 | }; |
@@ -42,9 +42,27 @@ const refundSubmitAsync = (orderCode, uid, goods, payment) => { | @@ -42,9 +42,27 @@ const refundSubmitAsync = (orderCode, uid, goods, payment) => { | ||
42 | }, {code: 200}); | 42 | }, {code: 200}); |
43 | }; | 43 | }; |
44 | 44 | ||
45 | +const getChangeGoodsListAsync = (orderCode, uid) => { | ||
46 | + return api.get('', { | ||
47 | + method: 'app.change.goodsList', | ||
48 | + order_code: orderCode, | ||
49 | + uid: uid | ||
50 | + }); | ||
51 | +}; | ||
52 | + | ||
53 | +const getProductInfoAsync = (productId, productSkn) => { | ||
54 | + return api.get('', { | ||
55 | + method: 'app.product.data', | ||
56 | + product_id: productId, | ||
57 | + product_skn: productSkn | ||
58 | + }); | ||
59 | +}; | ||
60 | + | ||
45 | module.exports = { | 61 | module.exports = { |
46 | getOrderInfoAsync, | 62 | getOrderInfoAsync, |
47 | getRefundGoodsAsync, | 63 | getRefundGoodsAsync, |
64 | + getChangeGoodsListAsync, | ||
65 | + getProductInfoAsync, | ||
48 | getRefundDetailAsync, | 66 | getRefundDetailAsync, |
49 | refundSubmitAsync | 67 | refundSubmitAsync |
50 | }; | 68 | }; |
@@ -16,6 +16,20 @@ const helpers = global.yoho.helpers; | @@ -16,6 +16,20 @@ const helpers = global.yoho.helpers; | ||
16 | 16 | ||
17 | const pageSize = 10; | 17 | const pageSize = 10; |
18 | 18 | ||
19 | +const _reduceArrByProductSku = data => { | ||
20 | + const d = []; | ||
21 | + | ||
22 | + d.push(data[0]); | ||
23 | + | ||
24 | + data.reduce((p, c) => { //eslint-disable-line | ||
25 | + if (p && c && p.productSku !== c.productSku) { | ||
26 | + d.push[c]; | ||
27 | + } | ||
28 | + }); | ||
29 | + | ||
30 | + return d; | ||
31 | +}; | ||
32 | + | ||
19 | const getUserReturn = (uid, page) => { | 33 | const getUserReturn = (uid, page) => { |
20 | 34 | ||
21 | return api.get('', { | 35 | return api.get('', { |
@@ -263,9 +277,53 @@ const saveRefund = (orderCode, uid, goods, payment) => { | @@ -263,9 +277,53 @@ const saveRefund = (orderCode, uid, goods, payment) => { | ||
263 | }); | 277 | }); |
264 | }; | 278 | }; |
265 | 279 | ||
280 | +const getProductInfo = (productId, productSkn) => { | ||
281 | + return returnsAPI.getProductInfoAsync(productId, productSkn).then(result => { | ||
282 | + if (result.code === 200) { | ||
283 | + camelCase(result); | ||
284 | + result.data.goodsList.forEach(good => { | ||
285 | + good.colorImage = helpers.image(good.colorImage, 20, 20); | ||
286 | + }); | ||
287 | + } | ||
288 | + return result; | ||
289 | + }); | ||
290 | +}; | ||
291 | + | ||
292 | +const getChangeGoodsList = (orderCode, uid) => { | ||
293 | + return returnsAPI.getChangeGoodsListAsync(orderCode, uid).then(result => { | ||
294 | + const basicData = { | ||
295 | + title: '申请退货' | ||
296 | + }; | ||
297 | + let data; | ||
298 | + | ||
299 | + console.log(result); | ||
300 | + | ||
301 | + if (result && result.data) { | ||
302 | + data = camelCase(result.data); | ||
303 | + | ||
304 | + | ||
305 | + data.goodsList = _reduceArrByProductSku(data.goodsList); | ||
306 | + data.hidePrice = true; | ||
307 | + | ||
308 | + data.goodsList.forEach(good => { | ||
309 | + good.showCheckbox = true; | ||
310 | + good.hidePrice = true; | ||
311 | + good.buyNumber = good.num; | ||
312 | + }); | ||
313 | + } | ||
314 | + | ||
315 | + | ||
316 | + return { | ||
317 | + returnsChange: Object.assign(basicData, data) | ||
318 | + }; | ||
319 | + }); | ||
320 | +}; | ||
321 | + | ||
266 | module.exports = { | 322 | module.exports = { |
267 | getUserReturn, | 323 | getUserReturn, |
268 | getRefundGoodsData, | 324 | getRefundGoodsData, |
325 | + getChangeGoodsList, | ||
326 | + getProductInfo, | ||
269 | getRefundDetailData, | 327 | getRefundDetailData, |
270 | saveRefund | 328 | saveRefund |
271 | }; | 329 | }; |
@@ -34,6 +34,7 @@ router.get('/return/refund/detail/:applyId', returns.refundDetail); | @@ -34,6 +34,7 @@ router.get('/return/refund/detail/:applyId', returns.refundDetail); | ||
34 | router.get('/return/exchange/detail', returns.detailExchange); | 34 | router.get('/return/exchange/detail', returns.detailExchange); |
35 | router.get('/return/:returnId', returns.detail); | 35 | router.get('/return/:returnId', returns.detail); |
36 | router.post('/return/refund/apply', returns.refundApply); | 36 | router.post('/return/refund/apply', returns.refundApply); |
37 | +router.get('/return/getProductInfo', returns.getProductInfo); | ||
37 | 38 | ||
38 | // 个人中心首页/收货地址 | 39 | // 个人中心首页/收货地址 |
39 | router.get('/address', address.index); | 40 | router.get('/address', address.index); |
@@ -46,6 +46,11 @@ | @@ -46,6 +46,11 @@ | ||
46 | {{> returns-list}} | 46 | {{> returns-list}} |
47 | {{/if}} | 47 | {{/if}} |
48 | 48 | ||
49 | + {{!-- 发起换货申请 --}} | ||
50 | + {{#if returnsChange}} | ||
51 | + {{> returns-change}} | ||
52 | + {{/if}} | ||
53 | + | ||
49 | {{!-- 我的收藏 --}} | 54 | {{!-- 我的收藏 --}} |
50 | {{#if collection}} | 55 | {{#if collection}} |
51 | {{> collection}} | 56 | {{> collection}} |
1 | -{{!-- {{# exchange}} --}} | 1 | +{{# exchange}} |
2 | <div class="exchange-detail-page"> | 2 | <div class="exchange-detail-page"> |
3 | + {{#if audit}} | ||
3 | <p class="state"><span class="iconfont"></span>换货申请审核中</p> | 4 | <p class="state"><span class="iconfont"></span>换货申请审核中</p> |
5 | + {{/if}} | ||
6 | + | ||
7 | + {{#if through}} | ||
8 | + <p class="state"><span class="iconfont"></span>换货申请已通过</p> | ||
9 | + {{/if}} | ||
10 | + | ||
11 | + {{#if send}} | ||
12 | + <p class="state"><span class="iconfont"></span>换货商品已发出</p> | ||
13 | + {{/if}} | ||
14 | + | ||
15 | + {{#if finish}} | ||
16 | + <p class="state"><span class="iconfont"></span>换货完成</p> | ||
17 | + {{/if}} | ||
4 | 18 | ||
5 | <div class="way"> | 19 | <div class="way"> |
20 | + | ||
21 | + {{#if finish}} | ||
22 | + <p class="contact">如有疑问,请联系<span class="iconfont"></span>在线客服</p> | ||
23 | + {{else}} | ||
6 | <p class="way-title">您已选择{{way}}</p> | 24 | <p class="way-title">您已选择{{way}}</p> |
7 | <p>请将商品连同吊牌、包装、发货单(如无发货单,您可找张白纸上注明订单编号,收货人姓名及手机号码)、发票(如有)、赠品(如有)一并保存, | 25 | <p>请将商品连同吊牌、包装、发货单(如无发货单,您可找张白纸上注明订单编号,收货人姓名及手机号码)、发票(如有)、赠品(如有)一并保存, |
8 | 如有遗漏将影响您的退换货进度,敬请谅解 | 26 | 如有遗漏将影响您的退换货进度,敬请谅解 |
9 | </p> | 27 | </p> |
28 | + {{/if}} | ||
29 | + | ||
30 | + {{#if audit}} | ||
10 | <p class="cancel">如果您不想换货了,您可以<span class="cancel-btn">取消申请</span></p> | 31 | <p class="cancel">如果您不想换货了,您可以<span class="cancel-btn">取消申请</span></p> |
32 | + {{/if}} | ||
33 | + | ||
34 | + {{#if finish}} | ||
35 | + <div class="order"> | ||
36 | + <span class="check">查看</span> | ||
37 | + <span class="exchange-order">换货订单</span> | ||
38 | + </div> | ||
39 | + {{/if}} | ||
11 | </div> | 40 | </div> |
12 | 41 | ||
13 | <div class="adress"> | 42 | <div class="adress"> |
@@ -20,6 +49,8 @@ | @@ -20,6 +49,8 @@ | ||
20 | </div> | 49 | </div> |
21 | </div> | 50 | </div> |
22 | 51 | ||
52 | + <span class="exchange-goods">换货商品</span> | ||
53 | + | ||
23 | <div class="good-info"> | 54 | <div class="good-info"> |
24 | <div class="table"> | 55 | <div class="table"> |
25 | <ul class="header"> | 56 | <ul class="header"> |
@@ -30,11 +61,12 @@ | @@ -30,11 +61,12 @@ | ||
30 | </div> | 61 | </div> |
31 | 62 | ||
32 | <div class="table"> | 63 | <div class="table"> |
64 | + {{# goods}} | ||
33 | <div class="table-body"> | 65 | <div class="table-body"> |
34 | <div class="goods-info"> | 66 | <div class="goods-info"> |
35 | <img class="lazy" data-original="{{image img 70 90}}"> | 67 | <img class="lazy" data-original="{{image img 70 90}}"> |
36 | <div class="info"> | 68 | <div class="info"> |
37 | - <p class="good-name">{{!-- {{name}} --}}fdefwfwefwrefverfref</p> | 69 | + <p class="good-name">{{name}}</p> |
38 | <p>颜色:{{color}} 尺码:{{size}}</p> | 70 | <p>颜色:{{color}} 尺码:{{size}}</p> |
39 | <p>×{{num}}</p> | 71 | <p>×{{num}}</p> |
40 | </div> | 72 | </div> |
@@ -43,18 +75,21 @@ | @@ -43,18 +75,21 @@ | ||
43 | <p class="reason">{{reason}}发错货</p> | 75 | <p class="reason">{{reason}}发错货</p> |
44 | </div> | 76 | </div> |
45 | <div class="common-column special-border operation"> | 77 | <div class="common-column special-border operation"> |
46 | - <p class="subtext">color: 蓝色<br>size: M</p> | 78 | + <p class="subtext">color: {{exchangeColor}}<br>size: {{exchangeSize}}</p> |
47 | </div> | 79 | </div> |
48 | </div> | 80 | </div> |
81 | + {{/ goods}} | ||
82 | + {{# reasonInfo}} | ||
49 | <div class="reason-info"> | 83 | <div class="reason-info"> |
50 | - <span>问题描述:太小了</span> | 84 | + <span>问题描述:{{problem}}</span> |
51 | <div class="reason-img">照片凭证: | 85 | <div class="reason-img">照片凭证: |
52 | <div class="evidence"> | 86 | <div class="evidence"> |
53 | <img src="{{image img 70 90}}"> | 87 | <img src="{{image img 70 90}}"> |
54 | </div> | 88 | </div> |
55 | </div> | 89 | </div> |
56 | </div> | 90 | </div> |
91 | + {{/ reasonInfo}} | ||
57 | </div> | 92 | </div> |
58 | </div> | 93 | </div> |
59 | </div> | 94 | </div> |
60 | -{{!-- {{/ exchange}} --}} | ||
95 | +{{/ exchange}} |
apps/me/views/partial/order/good-info.hbs
0 → 100644
1 | +<div class="good-info {{#if @last}}last{{/if}}"> | ||
2 | + <img src="{{image goodsImage 65 90}}"> | ||
3 | + <div class="detail"> | ||
4 | + <p class="with-bottom-space">{{productName}}</p> | ||
5 | + <span class="with-space">颜色:{{colorName}}</span> | ||
6 | + <span>尺码: | ||
7 | + <span class="bold">{{sizeName}}</span> | ||
8 | + </span> | ||
9 | + <p class="bold buy-number">{{> icon/error-round}}{{buyNumber}}</p> | ||
10 | + </div> | ||
11 | +</div> |
1 | <div class="goods-container special-border {{#if hidePrice}}no-price{{/if}}"> | 1 | <div class="goods-container special-border {{#if hidePrice}}no-price{{/if}}"> |
2 | {{#orderGoods}} | 2 | {{#orderGoods}} |
3 | - <div class="good-info {{#if @last}}last{{/if}}"> | ||
4 | - <img src="{{image goodsImage 65 90}}"> | ||
5 | - <div class="detail"> | ||
6 | - <p class="with-bottom-space">{{productName}}</p> | ||
7 | - <span class="with-space">颜色:{{colorName}}</span> | ||
8 | - <span>尺码: | ||
9 | - <span class="bold">{{sizeName}}</span> | ||
10 | - </span> | ||
11 | - <p class="bold buy-number">{{> icon/error-round}}{{buyNumber}}</p> | ||
12 | - </div> | ||
13 | - </div> | 3 | + {{> order/good-info}} |
14 | {{#unless hidePrice}} | 4 | {{#unless hidePrice}} |
15 | <div class="sub-column right-border bold"> | 5 | <div class="sub-column right-border bold"> |
16 | <p class="{{#if @last}}last{{/if}}">¥{{goodsPrice}}</p> | 6 | <p class="{{#if @last}}last{{/if}}">¥{{goodsPrice}}</p> |
17 | </div> | 7 | </div> |
18 | - {{/unless}} | ||
19 | <div class="sub-column right-border special-column bold"> | 8 | <div class="sub-column right-border special-column bold"> |
20 | <p class="bold">{{buyNumber}}</p> | 9 | <p class="bold">{{buyNumber}}</p> |
21 | </div> | 10 | </div> |
22 | <div class="sub-column special-column bold"> | 11 | <div class="sub-column special-column bold"> |
23 | <p class="bold">¥{{goodsAmount}}</p> | 12 | <p class="bold">¥{{goodsAmount}}</p> |
24 | </div> | 13 | </div> |
14 | + {{/unless}} | ||
25 | {{/orderGoods}} | 15 | {{/orderGoods}} |
26 | </div> | 16 | </div> |
@@ -28,7 +28,9 @@ | @@ -28,7 +28,9 @@ | ||
28 | {{#if showEditOption}} | 28 | {{#if showEditOption}} |
29 | <p class="subtext">评价晒单</p> | 29 | <p class="subtext">评价晒单</p> |
30 | <p class="subtext">申请退货</p> | 30 | <p class="subtext">申请退货</p> |
31 | - <p class="subtext">申请换货</p> | 31 | + <a href="/return/exchange?code={{orderCode}}&id={{productId}}&skn={{productSkn}}"> |
32 | + <p class="subtext">申请换货</p> | ||
33 | + </a> | ||
32 | <p class="subtext delete">删除订单</p> | 34 | <p class="subtext delete">删除订单</p> |
33 | {{/if}} | 35 | {{/if}} |
34 | {{#if showGetBtn}} | 36 | {{#if showGetBtn}} |
apps/me/views/partial/returns-change.hbs
0 → 100644
1 | +<div class="return-wrap user-order change"> | ||
2 | + {{#returnsChange}} | ||
3 | + {{> common/subtitle}} | ||
4 | + <div class="order"> | ||
5 | + <div class="table returns"> | ||
6 | + <ul class="header"> | ||
7 | + <li class="info">商品信息</li> | ||
8 | + <li class="change-reason">换货原因</li> | ||
9 | + <li class="change-num">换货数量</li> | ||
10 | + </ul> | ||
11 | + {{#goodsList}} | ||
12 | + <div class="table-body"> | ||
13 | + <div class="goods-container no-price" data-id="{{productId}}" data-skn="{{productSkn}}"> | ||
14 | + {{# showCheckbox}} | ||
15 | + {{> icon/checkbox}} | ||
16 | + <!-- | ||
17 | + <span class="iconfont checkbox {{#if checked}}checked{{/if}}">{{#if checked}}{{^}}{{/if}}</span> | ||
18 | + --> | ||
19 | + {{/ showCheckbox}} | ||
20 | + {{> order/good-info}} | ||
21 | + <div class="sub-column"> | ||
22 | + 退货原因 | ||
23 | + </div> | ||
24 | + <div class="sub-column"> | ||
25 | + 数量 | ||
26 | + </div> | ||
27 | + </div> | ||
28 | + </div> | ||
29 | + <div class="form"> | ||
30 | + <div class="group color"> | ||
31 | + <span class="title"> | ||
32 | + <span class="artirisk">*</span> | ||
33 | + 换货Color: <span class="color-text" data-color={{colorId}}>{{colorName}}</span> | ||
34 | + </span> | ||
35 | + </div> | ||
36 | + <div class="group size"> | ||
37 | + <span class="title"> | ||
38 | + <span class="artirisk">*</span> | ||
39 | + 换货Size: <span class="size-text" data-size="{{sizeId}}">{{sizeName}}</span> | ||
40 | + </span> | ||
41 | + </div> | ||
42 | + </div> | ||
43 | + {{/goodsList}} | ||
44 | + </div> | ||
45 | + </div> | ||
46 | + {{/returnsChange}} | ||
47 | +</div> |
@@ -19,7 +19,7 @@ module.exports = { | @@ -19,7 +19,7 @@ module.exports = { | ||
19 | }, | 19 | }, |
20 | cookieDomain: 'yohoblk.com', | 20 | cookieDomain: 'yohoblk.com', |
21 | domains: { | 21 | domains: { |
22 | - api: 'http://testapi.yoho.cn:28078/', // devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078 | 22 | + api: 'http://devapi.yoho.cn:58078/', // devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078 |
23 | service: 'http://testservice.yoho.cn:28077/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077 | 23 | service: 'http://testservice.yoho.cn:28077/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077 |
24 | search: 'http://192.168.102.216:8080/yohosearch/' | 24 | search: 'http://192.168.102.216:8080/yohosearch/' |
25 | }, | 25 | }, |
public/js/me/returns-change.page.js
0 → 100644
1 | +var colorTpl = require('../../tpl/me/color-list.hbs'); | ||
2 | +var sizeTpl = require('../../tpl/me/size-list.hbs'); | ||
3 | + | ||
4 | +// var scope = { | ||
5 | +// 1: { | ||
6 | +// min: true, | ||
7 | +// do: function() { | ||
8 | +// console.log('min'); | ||
9 | +// } | ||
10 | +// } | ||
11 | +// } | ||
12 | + | ||
13 | +function renderList(data) { | ||
14 | + var cTpl; | ||
15 | + var sTpl; | ||
16 | + var $c = $('.group.color'); | ||
17 | + var $s = $('.group.size'); | ||
18 | + | ||
19 | + if (data) { | ||
20 | + cTpl = colorTpl(data); | ||
21 | + sTpl = sizeTpl(data); | ||
22 | + $c.append(cTpl); | ||
23 | + $s.append(sTpl); | ||
24 | + } | ||
25 | +} | ||
26 | + | ||
27 | +function bindColorEvent() { | ||
28 | + $('.color-list img').on('click', function() { | ||
29 | + var $this = $(this); | ||
30 | + var $sizeList = $('.size-list'); | ||
31 | + var index = $this.data('index'); | ||
32 | + var colorId = $this.data('color'); | ||
33 | + var colorText = $this.attr('alt'); | ||
34 | + var $c = $('.group.color .color-text'); | ||
35 | + | ||
36 | + $c.text(colorText); | ||
37 | + $c.attr('data-color', colorId); | ||
38 | + | ||
39 | + | ||
40 | + $sizeList.removeClass('hide'); | ||
41 | + $sizeList.addClass('hide'); | ||
42 | + | ||
43 | + $sizeList.eq(index).removeClass('hide'); | ||
44 | + }); | ||
45 | +} | ||
46 | + | ||
47 | +function initSizeId() { | ||
48 | + var s = $('.size-list:not("hide")').find('span').eq(0).data('size'); | ||
49 | + | ||
50 | + $('.group.size .size-text').eq(0).attr('data-size', s); | ||
51 | +} | ||
52 | + | ||
53 | +function bindSizeEvent() { | ||
54 | + $('.size-list span').on('click', function() { | ||
55 | + var $this = $(this); | ||
56 | + var s = $this.text(); | ||
57 | + var id = $this.data('size'); | ||
58 | + var $s = $('.group.size .size-text'); | ||
59 | + | ||
60 | + $s.text(s); | ||
61 | + $s.attr('data-size', id); | ||
62 | + }); | ||
63 | +} | ||
64 | + | ||
65 | +// function bindNumberEvent() { | ||
66 | +// $('.number .minus').on('click', function() { | ||
67 | +// var val = $('.number .value').text(); | ||
68 | +// | ||
69 | +// if (scope[val].min) { | ||
70 | +// scope[val].do(); | ||
71 | +// } | ||
72 | +// }); | ||
73 | +// } | ||
74 | + | ||
75 | +function getProductInfo() { | ||
76 | + var $el = $('.goods-container'); | ||
77 | + var id = $el.data('id'); | ||
78 | + var skn = $el.data('skn'); | ||
79 | + | ||
80 | + if (id && skn) { | ||
81 | + $.ajax({ | ||
82 | + url: '/me/return/getProductInfo', | ||
83 | + data: { | ||
84 | + productId: id, | ||
85 | + productSkn: skn | ||
86 | + } | ||
87 | + }).done(function(result) { | ||
88 | + console.log(result); | ||
89 | + if (result.code === 200) { | ||
90 | + renderList(result.data); | ||
91 | + initSizeId(); | ||
92 | + bindColorEvent(); | ||
93 | + bindSizeEvent(); | ||
94 | + } | ||
95 | + }); | ||
96 | + } | ||
97 | +} | ||
98 | + | ||
99 | +getProductInfo(); |
@@ -45,11 +45,44 @@ | @@ -45,11 +45,44 @@ | ||
45 | text-align: center; | 45 | text-align: center; |
46 | margin-top: 10px; | 46 | margin-top: 10px; |
47 | } | 47 | } |
48 | + | ||
49 | + .contact { | ||
50 | + line-height: 50px; | ||
51 | + | ||
52 | + span { | ||
53 | + margin-left: 20px; | ||
54 | + } | ||
55 | + | ||
56 | + .iconfont { | ||
57 | + font-size: 12px; | ||
58 | + margin-right: 5px; | ||
59 | + } | ||
60 | + } | ||
61 | + } | ||
62 | + | ||
63 | + .order { | ||
64 | + margin: 23px 0 10px; | ||
65 | + height: 50px; | ||
66 | + line-height: 50px; | ||
67 | + overflow: hidden; | ||
68 | + } | ||
69 | + | ||
70 | + .check { | ||
71 | + display: block; | ||
72 | + height: 25px; | ||
73 | + width: 70px; | ||
74 | + background: #1b1b1b; | ||
75 | + color: #fff; | ||
76 | + line-height: 25px; | ||
77 | + text-align: center; | ||
78 | + margin-top: 10px; | ||
79 | + float: left; | ||
80 | + margin-right: 20px; | ||
48 | } | 81 | } |
49 | 82 | ||
50 | .adress { | 83 | .adress { |
51 | overflow: hidden; | 84 | overflow: hidden; |
52 | - margin-top: 30px; | 85 | + margin: 30px 0 20px; |
53 | font-size: 14px; | 86 | font-size: 14px; |
54 | border-bottom: 1px solid #eee; | 87 | border-bottom: 1px solid #eee; |
55 | 88 | ||
@@ -84,6 +117,12 @@ | @@ -84,6 +117,12 @@ | ||
84 | } | 117 | } |
85 | } | 118 | } |
86 | 119 | ||
120 | + .exchange-goods { | ||
121 | + font-size: 16px; | ||
122 | + height: 50px; | ||
123 | + line-height: 50px; | ||
124 | + } | ||
125 | + | ||
87 | .table { | 126 | .table { |
88 | width: 100%; | 127 | width: 100%; |
89 | 128 | ||
@@ -170,7 +209,7 @@ | @@ -170,7 +209,7 @@ | ||
170 | 209 | ||
171 | .reason-info { | 210 | .reason-info { |
172 | overflow: hidden; | 211 | overflow: hidden; |
173 | - padding: 25px 0 0 20px; | 212 | + padding: 25px 0 30px 20px; |
174 | width: 100%; | 213 | width: 100%; |
175 | border: 1px solid #eee; | 214 | border: 1px solid #eee; |
176 | border-top: none; | 215 | border-top: none; |
1 | .return-wrap { | 1 | .return-wrap { |
2 | .table { | 2 | .table { |
3 | width: 100%; | 3 | width: 100%; |
4 | + max-width: 990px; | ||
4 | 5 | ||
5 | .header { | 6 | .header { |
6 | .info { | 7 | .info { |
@@ -9,12 +10,26 @@ | @@ -9,12 +10,26 @@ | ||
9 | } | 10 | } |
10 | 11 | ||
11 | .st, | 12 | .st, |
12 | - .op { | 13 | + .op, |
14 | + .change-reason, | ||
15 | + .change-num { | ||
13 | width: 206px; | 16 | width: 206px; |
14 | } | 17 | } |
15 | } | 18 | } |
16 | 19 | ||
20 | + &.returns { | ||
21 | + .good-info { | ||
22 | + border: none; | ||
23 | + | ||
24 | + .detail { | ||
25 | + width: 380px !important; | ||
26 | + } | ||
27 | + } | ||
28 | + } | ||
29 | + | ||
17 | .goods-container { | 30 | .goods-container { |
31 | + width: 990px; | ||
32 | + | ||
18 | .for-return { | 33 | .for-return { |
19 | display: block; | 34 | display: block; |
20 | } | 35 | } |
@@ -23,24 +38,36 @@ | @@ -23,24 +38,36 @@ | ||
23 | .no-price { | 38 | .no-price { |
24 | .good-info { | 39 | .good-info { |
25 | border-right: none; | 40 | border-right: none; |
26 | - } | ||
27 | 41 | ||
28 | - .good-info { | ||
29 | .detail { | 42 | .detail { |
30 | width: 408px; | 43 | width: 408px; |
31 | } | 44 | } |
32 | } | 45 | } |
33 | } | 46 | } |
34 | 47 | ||
48 | + .sub-column { | ||
49 | + width: 204px !important; | ||
50 | + } | ||
51 | + | ||
52 | + .checkbox-column { | ||
53 | + display: table-cell; | ||
54 | + width: 100px; | ||
55 | + } | ||
56 | + | ||
35 | .common-column { | 57 | .common-column { |
36 | width: 208px; | 58 | width: 208px; |
37 | 59 | ||
38 | .refund-status { | 60 | .refund-status { |
39 | margin-bottom: 10px; | 61 | margin-bottom: 10px; |
40 | } | 62 | } |
63 | + | ||
41 | .refund-type { | 64 | .refund-type { |
42 | position: static; | 65 | position: static; |
43 | } | 66 | } |
67 | + | ||
68 | + &.no-border { | ||
69 | + width: 204px !important; | ||
70 | + } | ||
44 | } | 71 | } |
45 | } | 72 | } |
46 | 73 |
public/tpl/me/color-list.hbs
0 → 100644
-
Please register or login to post a comment