...
|
...
|
@@ -353,73 +353,83 @@ class IndexController extends AbstractAction |
|
|
if (!$uid) {
|
|
|
$this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))));
|
|
|
}
|
|
|
$cookieData = $this->getCookie('order-info', null); //从缓存中获取电子发票信息
|
|
|
if (!empty($cookieData)) {
|
|
|
$orderInfo = json_decode($cookieData, true);
|
|
|
$invoiceType = $orderInfo['invoiceType']; //发票类型ID
|
|
|
$invoices_type = $orderInfo['invoicesType'] * 1; //发票类型 /**纸质 1 ,电子 2 */
|
|
|
$mobile = $orderInfo['receiverMobile']; //发票人手机
|
|
|
$invoices_title = $orderInfo['invoiceText']; //发票抬头
|
|
|
}else{
|
|
|
$userData = UserData::userData($uid);
|
|
|
$mobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile'];
|
|
|
|
|
|
$mobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile'];//发票人手机
|
|
|
$invoiceType = '1';//发票类型ID
|
|
|
$invoices_type = '1';//发票类型 /**纸质 1 ,电子 2 */
|
|
|
}
|
|
|
$data = array(
|
|
|
'invoiceInfoPage' => true,
|
|
|
'invoiceNotice' => '发票须知',
|
|
|
'phone' => $mobile ? substr_replace($mobile, '****', 3, 4) : '',
|
|
|
'completeTel' => $mobile,
|
|
|
'invoiceCont' => '服装',
|
|
|
'invoiceId' => '1',
|
|
|
// 'invoiceCont' => '服装',
|
|
|
// 'invoiceId' => $invoices_type,
|
|
|
'isCompany' => true,
|
|
|
'companyName' => '南京新与力文化传媒有限公司',
|
|
|
'companyName' => $invoices_title,
|
|
|
'invoicesType' => array(
|
|
|
array(
|
|
|
'id' => '1',
|
|
|
'type' => '电子发票',
|
|
|
'choosed' => true
|
|
|
'choosed' => empty($invoices_type) || $invoices_type == 1 ? true : false,
|
|
|
),
|
|
|
array(
|
|
|
'id' => '2',
|
|
|
'type' => '纸质发票',
|
|
|
'choosed' => false
|
|
|
'choosed' => $invoices_type == 2 ? true : false,
|
|
|
)
|
|
|
),
|
|
|
'invoiceTitle' => array(
|
|
|
array(
|
|
|
'type' => '个人',
|
|
|
'choosed' => false
|
|
|
'choosed' => !isset($invoices_title) ? true : false,
|
|
|
),
|
|
|
array(
|
|
|
'type' => '单位',
|
|
|
'choosed' => true
|
|
|
'choosed' => isset($invoices_title) ? true : false,
|
|
|
)
|
|
|
),
|
|
|
'content' => array(
|
|
|
array(
|
|
|
'choosed' => false,
|
|
|
'choosed' => $invoiceType == 3 ? true : false,
|
|
|
'id' => 3,
|
|
|
'text' => '配件'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => false,
|
|
|
'choosed' => $invoiceType == 2 ? true : false,
|
|
|
'id' => 2,
|
|
|
'text' => '图书'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => true,
|
|
|
'choosed' => $invoiceType == 1 ? true : false,
|
|
|
'id' => 1,
|
|
|
'text' => '服装'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => false,
|
|
|
'choosed' => $invoiceType == 4 ? true : false,
|
|
|
'id' => 4,
|
|
|
'text' => '日用品'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => false,
|
|
|
'choosed' => $invoiceType == 7 ? true : false,
|
|
|
'id' => 7,
|
|
|
'text' => '数码产品'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => false,
|
|
|
'choosed' => $invoiceType == 6 ? true : false,
|
|
|
'id' => 6,
|
|
|
'text' => '体育用品'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => false,
|
|
|
'choosed' => $invoiceType == 5 ? true : false,
|
|
|
'id' => 5,
|
|
|
'text' => '办公用品'
|
|
|
)
|
...
|
...
|
@@ -547,15 +557,15 @@ class IndexController extends AbstractAction |
|
|
$couponCode = $this->post('couponCode', null);
|
|
|
$yohoCoin = $this->post('yohoCoin', 1);
|
|
|
$skuList = $this->post('skuList', '');
|
|
|
$cookieData = $this->getCookie('order-info', null);//获取电子发票信息
|
|
|
$cookieData = $this->getCookie('order-info', null); //获取电子发票信息
|
|
|
//电子发票信息数组
|
|
|
$invoices = array();
|
|
|
if (!empty($cookieData)) {
|
|
|
$orderInfo = json_decode($cookieData, true);
|
|
|
$invoices['invoices_type_id'] = $orderInfo['invoiceType'];//发票类型ID
|
|
|
$invoices['invoices_type'] = $orderInfo['invoicesType'];//发票类型 /**纸质 1 ,电子 2 */
|
|
|
$invoices['receiverMobile'] = $orderInfo['receiverMobile'];//发票人手机
|
|
|
$invoices['invoices_title'] = $orderInfo['invoiceText'];//发票抬头
|
|
|
$invoices['invoices_type_id'] = $orderInfo['invoiceType']; //发票类型ID
|
|
|
$invoices['invoices_type'] = $orderInfo['invoicesType']; //发票类型 /**纸质 1 ,电子 2 */
|
|
|
$invoices['receiverMobile'] = $orderInfo['receiverMobile']; //发票人手机
|
|
|
$invoices['invoices_title'] = $orderInfo['invoiceText']; //发票抬头
|
|
|
}
|
|
|
|
|
|
/* 判断是否是友盟过来的用户 */
|
...
|
...
|
@@ -576,7 +586,7 @@ class IndexController extends AbstractAction |
|
|
$message = 'uid:' . $uid . ',addressId:' . $addressId . ',cartType:' . $cartType . ',deliveryTime:' . $deliveryTime
|
|
|
. ',deliveryWay:' . $deliveryWay . ',yohoCoin:' . $yohoCoin
|
|
|
. ',paymentId:' . $paymentId . ',paymentType:' . $paymentType . ',remark:' . $remark . ',couponCode:' . $couponCode . "\n";
|
|
|
UdpLog::info('【下单】下单异常数据','message:'.$message,'返回:'.json_encode($result));
|
|
|
UdpLog::info('【下单】下单异常数据', 'message:' . $message, '返回:' . json_encode($result));
|
|
|
}
|
|
|
// 返回数据
|
|
|
else {
|
...
|
...
|
|