...
|
...
|
@@ -354,19 +354,22 @@ class IndexController extends AbstractAction |
|
|
$this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))));
|
|
|
}
|
|
|
$cookieData = $this->getCookie('order-info', null); //从缓存中获取电子发票信息
|
|
|
$userData = UserData::userData($uid);
|
|
|
$userMobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile']; //发票人手机
|
|
|
if (!empty($cookieData)) {
|
|
|
$orderInfo = json_decode($cookieData, true);
|
|
|
$invoiceType = $orderInfo['invoiceType']; //发票类型ID
|
|
|
$invoices_type = $orderInfo['invoicesType'] * 1; //发票类型 /**纸质 1 ,电子 2 */
|
|
|
$mobile = $orderInfo['receiverMobile']; //发票人手机
|
|
|
$mobile = isset($orderInfo['receiverMobile']) && !empty($orderInfo['receiverMobile']) ? $orderInfo['receiverMobile'] : $userMobile; //发票人手机
|
|
|
$invoices_title = $orderInfo['invoiceText']; //发票抬头
|
|
|
$invoice_Top = $orderInfo['invoiceTitle'];
|
|
|
}else{
|
|
|
$userData = UserData::userData($uid);
|
|
|
$mobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile'];//发票人手机
|
|
|
$invoiceType = '1';//发票类型ID
|
|
|
$invoices_type = '1';//发票类型 /**纸质 1 ,电子 2 */
|
|
|
$invoice_Top = '个人';
|
|
|
}
|
|
|
else {
|
|
|
$userData = UserData::userData($uid);
|
|
|
$mobile = $userMobile; //发票人手机
|
|
|
$invoiceType = '1'; //发票类型ID
|
|
|
$invoices_type = '1'; //发票类型 /**纸质 1 ,电子 2 */
|
|
|
$invoice_Top = '个人';
|
|
|
}
|
|
|
|
|
|
$data = array(
|
...
|
...
|
@@ -391,52 +394,52 @@ class IndexController extends AbstractAction |
|
|
'invoiceTitle' => array(
|
|
|
array(
|
|
|
'type' => '个人',
|
|
|
'choosed' => !isset($invoices_title) ? true : false,
|
|
|
'choosed' => !isset($invoices_title) ? true : false,
|
|
|
),
|
|
|
array(
|
|
|
'type' => '单位',
|
|
|
'choosed' => isset($invoices_title) ? true : false,
|
|
|
'choosed' => isset($invoices_title) ? true : false,
|
|
|
)
|
|
|
),
|
|
|
'content' => array(
|
|
|
array(
|
|
|
'choosed' => $invoiceType == 3 ? true : false,
|
|
|
'choosed' => $invoiceType == 3 ? true : false,
|
|
|
'id' => 3,
|
|
|
'text' => '配件'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => $invoiceType == 2 ? true : false,
|
|
|
'choosed' => $invoiceType == 2 ? true : false,
|
|
|
'id' => 2,
|
|
|
'text' => '图书'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => empty($invoices_type) || $invoiceType == 1 ? true : false,
|
|
|
'choosed' => empty($invoices_type) || $invoiceType == 1 ? true : false,
|
|
|
'id' => 1,
|
|
|
'text' => '服装'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => $invoiceType == 4 ? true : false,
|
|
|
'choosed' => $invoiceType == 4 ? true : false,
|
|
|
'id' => 4,
|
|
|
'text' => '日用品'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => $invoiceType == 7 ? true : false,
|
|
|
'choosed' => $invoiceType == 7 ? true : false,
|
|
|
'id' => 7,
|
|
|
'text' => '数码产品'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => $invoiceType == 6 ? true : false,
|
|
|
'choosed' => $invoiceType == 6 ? true : false,
|
|
|
'id' => 6,
|
|
|
'text' => '体育用品'
|
|
|
),
|
|
|
array(
|
|
|
'choosed' => $invoiceType == 5 ? true : false,
|
|
|
'choosed' => $invoiceType == 5 ? true : false,
|
|
|
'id' => 5,
|
|
|
'text' => '办公用品'
|
|
|
)
|
|
|
)
|
|
|
);
|
|
|
|
|
|
|
|
|
$this->setTitle('发票信息');
|
|
|
$this->setNavHeader('发票信息', true, false); // 不显示右上角home按钮
|
|
|
|
...
|
...
|
|