|
@@ -5,7 +5,7 @@ namespace Home; |
|
@@ -5,7 +5,7 @@ namespace Home; |
5
|
use LibModels\Web\Home\ReturnsData;
|
5
|
use LibModels\Web\Home\ReturnsData;
|
6
|
use WebPlugin\Helpers;
|
6
|
use WebPlugin\Helpers;
|
7
|
use WebPlugin\HelperSearch;
|
7
|
use WebPlugin\HelperSearch;
|
8
|
-use Plugin\Images;
|
8
|
+use WebPlugin\Images;
|
9
|
use LibModels\Wap\Home\OrderData;
|
9
|
use LibModels\Wap\Home\OrderData;
|
10
|
use Api\Yohobuy;
|
10
|
use Api\Yohobuy;
|
11
|
|
11
|
|
|
@@ -314,25 +314,31 @@ class ReturnsModel |
|
@@ -314,25 +314,31 @@ class ReturnsModel |
314
|
$result['goods'][$key]['goods_type_id'] = $value['goods_type_id'];
|
314
|
$result['goods'][$key]['goods_type_id'] = $value['goods_type_id'];
|
315
|
$result['goods'][$key]['goods_type'] = $value['goods_type'];
|
315
|
$result['goods'][$key]['goods_type'] = $value['goods_type'];
|
316
|
$amount += $value['last_price'];//所以商品价格加起来,等于订单总价
|
316
|
$amount += $value['last_price'];//所以商品价格加起来,等于订单总价
|
|
|
317
|
+
|
|
|
318
|
+ $result['goods'][$key]['reason'] = $data['data']['return_reason'];
|
|
|
319
|
+
|
|
|
320
|
+ // tar note 为每个特殊商品都添加标识
|
|
|
321
|
+ if ($value['is_limit_skn'] === 'Y') {
|
|
|
322
|
+ $result['goods'][$key]['specialNoticeBo'] = $data['data']['special_notice'];
|
|
|
323
|
+ // tar note 对数组做处理,为不显示的添加 inactive
|
|
|
324
|
+ if (isset($data['data']['special_return_reason'])) {
|
|
|
325
|
+ foreach ($result['goods'][$key]['reason'] as $subKey => $item) {
|
|
|
326
|
+ if (!in_array($item, $data['data']['special_return_reason'])) {
|
|
|
327
|
+ $result['goods'][$key]['reason'][$subKey]['inactive'] = true;
|
|
|
328
|
+ }
|
|
|
329
|
+ }
|
|
|
330
|
+ }
|
|
|
331
|
+ }
|
|
|
332
|
+
|
|
|
333
|
+ // 对原因排序
|
|
|
334
|
+ asort($result['goods'][$key]['reason']);
|
|
|
335
|
+
|
317
|
//商品中有鞋类,传给前端标识
|
336
|
//商品中有鞋类,传给前端标识
|
318
|
if ($value['hasShoes']) {
|
337
|
if ($value['hasShoes']) {
|
319
|
$result['tips']['footwear'] = true;
|
338
|
$result['tips']['footwear'] = true;
|
320
|
}
|
339
|
}
|
321
|
}
|
340
|
}
|
322
|
$result['orderCode'] = $orderCode;
|
341
|
$result['orderCode'] = $orderCode;
|
323
|
- $result['reason'] = $data['data']['return_reason'];
|
|
|
324
|
-
|
|
|
325
|
- // tar note 对数组做处理,为不显示的添加 inactive
|
|
|
326
|
- if (isset($data['data']['special_exchange_reason'])) {
|
|
|
327
|
- foreach ($result['reason'] as $key => $item) {
|
|
|
328
|
- if (!in_array($item, $data['data']['special_exchange_reason'])) {
|
|
|
329
|
- $result['reason'][$key]['inactive'] = true;
|
|
|
330
|
- }
|
|
|
331
|
- }
|
|
|
332
|
- }
|
|
|
333
|
-
|
|
|
334
|
- // 对原因排序
|
|
|
335
|
- asort($result['reason']);
|
|
|
336
|
|
342
|
|
337
|
//计算相关支付细节
|
343
|
//计算相关支付细节
|
338
|
$result['amount'] = $amount - $data['data']['yoho_coin_num'] - $data['data']['coupon_amount'];
|
344
|
$result['amount'] = $amount - $data['data']['yoho_coin_num'] - $data['data']['coupon_amount'];
|
|
@@ -374,6 +380,8 @@ class ReturnsModel |
|
@@ -374,6 +380,8 @@ class ReturnsModel |
374
|
//调用接口,根据订单号获取订单可换货商品信息
|
380
|
//调用接口,根据订单号获取订单可换货商品信息
|
375
|
$data = ReturnsData::getChangeGoodsData($orderCode, $uid);
|
381
|
$data = ReturnsData::getChangeGoodsData($orderCode, $uid);
|
376
|
|
382
|
|
|
|
383
|
+ $isLimited = false;
|
|
|
384
|
+
|
377
|
$productSkn = array();
|
385
|
$productSkn = array();
|
378
|
//数据获取成功,封装数据
|
386
|
//数据获取成功,封装数据
|
379
|
if (isset($data['code']) && $data['code'] == 200 && isset($data['data']) && !empty($data['data'])) {
|
387
|
if (isset($data['code']) && $data['code'] == 200 && isset($data['data']) && !empty($data['data'])) {
|
|
@@ -393,30 +401,30 @@ class ReturnsModel |
|
@@ -393,30 +401,30 @@ class ReturnsModel |
393
|
$result['goods'][$key]['sku'] = $value['product_sku'];
|
401
|
$result['goods'][$key]['sku'] = $value['product_sku'];
|
394
|
$result['goods'][$key]['goods_type_id'] = $value['goods_type_id'];
|
402
|
$result['goods'][$key]['goods_type_id'] = $value['goods_type_id'];
|
395
|
|
403
|
|
|
|
404
|
+ $result['goods'][$key]['reason'] = $data['data']['exchange_reason'];
|
|
|
405
|
+
|
396
|
// tar note 为每个特殊商品都添加标识
|
406
|
// tar note 为每个特殊商品都添加标识
|
397
|
if ($value['is_limit_skn'] === 'Y') {
|
407
|
if ($value['is_limit_skn'] === 'Y') {
|
398
|
$result['goods'][$key]['specialNoticeBo'] = $data['data']['specialNoticeBo'];
|
408
|
$result['goods'][$key]['specialNoticeBo'] = $data['data']['specialNoticeBo'];
|
|
|
409
|
+ // tar note 对数组做处理,为不显示的添加 inactive
|
|
|
410
|
+ if (isset($data['data']['special_exchange_reason'])) {
|
|
|
411
|
+ foreach ($result['goods'][$key]['reason'] as $subKey => $item) {
|
|
|
412
|
+ if (!in_array($item, $data['data']['special_exchange_reason'])) {
|
|
|
413
|
+ $result['goods'][$key]['reason'][$subKey]['inactive'] = true;
|
|
|
414
|
+ }
|
|
|
415
|
+ }
|
|
|
416
|
+ }
|
399
|
}
|
417
|
}
|
400
|
|
418
|
|
|
|
419
|
+ // 对原因排序
|
|
|
420
|
+ asort($result['goods'][$key]['reason']);
|
|
|
421
|
+
|
401
|
//给前端标识出鞋类
|
422
|
//给前端标识出鞋类
|
402
|
if ($value['hasShoes']) {
|
423
|
if ($value['hasShoes']) {
|
403
|
$result['tips']['footwear'] = true;
|
424
|
$result['tips']['footwear'] = true;
|
404
|
}
|
425
|
}
|
405
|
$productSkn[] += $value['product_skn'];
|
426
|
$productSkn[] += $value['product_skn'];
|
406
|
}
|
427
|
}
|
407
|
- $result['reason'] = $data['data']['exchange_reason'];
|
|
|
408
|
-
|
|
|
409
|
- // tar note 对数组做处理,为不显示的添加 inactive
|
|
|
410
|
- if (isset($data['data']['special_exchange_reason'])) {
|
|
|
411
|
- foreach ($result['reason'] as $key => $item) {
|
|
|
412
|
- if (!in_array($item, $data['data']['special_exchange_reason'])) {
|
|
|
413
|
- $result['reason'][$key]['inactive'] = true;
|
|
|
414
|
- }
|
|
|
415
|
- }
|
|
|
416
|
- }
|
|
|
417
|
-
|
|
|
418
|
- // 对原因排序
|
|
|
419
|
- asort($result['reason']);
|
|
|
420
|
|
428
|
|
421
|
$result['orderCode'] = $orderCode;
|
429
|
$result['orderCode'] = $orderCode;
|
422
|
|
430
|
|