Authored by 郭成尧

'特殊品类限制调整'

存放PC模板的预编译文件
\ No newline at end of file
... ... @@ -294,8 +294,6 @@ class ReturnsModel
//调用接口,根据订单号获取可退货商品信息
$data = ReturnsData::getRefundGoodsData($orderCode, $uid);
$isLimited = false;
//调用接口成功,封装数据
if (isset($data['code']) && $data['code'] == 200 && isset($data['data']['goods_list']) && !empty($data['data']['goods_list'])) {
$amount = '';
... ... @@ -317,31 +315,30 @@ class ReturnsModel
$result['goods'][$key]['goods_type'] = $value['goods_type'];
$amount += $value['last_price'];//所以商品价格加起来,等于订单总价
$result['goods'][$key]['reason'] = $data['data']['return_reason'];
// tar note 为每个特殊商品都添加标识
if ($value['is_limit_skn'] === 'Y') {
$result['goods'][$key]['specialNoticeBo'] = $data['data']['special_notice'];
$isLimited = true;
// tar note 对数组做处理,为不显示的添加 inactive
if (isset($data['data']['special_return_reason'])) {
foreach ($result['goods'][$key]['reason'] as $subKey => $item) {
if (!in_array($item, $data['data']['special_return_reason'])) {
$result['goods'][$key]['reason'][$subKey]['inactive'] = true;
}
}
}
}
// 对原因排序
asort($result['goods'][$key]['reason']);
//商品中有鞋类,传给前端标识
if ($value['hasShoes']) {
$result['tips']['footwear'] = true;
}
}
$result['orderCode'] = $orderCode;
$result['reason'] = $data['data']['return_reason'];
// tar note 对数组做处理,为不显示的添加 inactive
if (isset($data['data']['special_return_reason']) && $isLimited) {
foreach ($result['reason'] as $key => $item) {
if (!in_array($item, $data['data']['special_return_reason'])) {
$result['reason'][$key]['inactive'] = true;
}
}
}
// 对原因排序
asort($result['reason']);
//计算相关支付细节
$result['amount'] = $amount - $data['data']['yoho_coin_num'] - $data['data']['coupon_amount'];
... ... @@ -404,11 +401,23 @@ class ReturnsModel
$result['goods'][$key]['sku'] = $value['product_sku'];
$result['goods'][$key]['goods_type_id'] = $value['goods_type_id'];
$result['goods'][$key]['reason'] = $data['data']['exchange_reason'];
// tar note 为每个特殊商品都添加标识
if ($value['is_limit_skn'] === 'Y') {
$result['goods'][$key]['specialNoticeBo'] = $data['data']['specialNoticeBo'];
$isLimited = true;
// tar note 对数组做处理,为不显示的添加 inactive
if (isset($data['data']['special_exchange_reason'])) {
foreach ($result['goods'][$key]['reason'] as $subKey => $item) {
if (!in_array($item, $data['data']['special_exchange_reason'])) {
$result['goods'][$key]['reason'][$subKey]['inactive'] = true;
}
}
}
}
// 对原因排序
asort($result['goods'][$key]['reason']);
//给前端标识出鞋类
if ($value['hasShoes']) {
... ... @@ -416,19 +425,6 @@ class ReturnsModel
}
$productSkn[] += $value['product_skn'];
}
$result['reason'] = $data['data']['exchange_reason'];
// tar note 对数组做处理,为不显示的添加 inactive
if (isset($data['data']['special_exchange_reason']) && $isLimited) {
foreach ($result['reason'] as $key => $item) {
if (!in_array($item, $data['data']['special_exchange_reason'])) {
$result['reason'][$key]['inactive'] = true;
}
}
}
// 对原因排序
asort($result['reason']);
$result['orderCode'] = $orderCode;
... ...