Authored by 郝肖肖

订单详情电子发票接口

... ... @@ -92,27 +92,27 @@
</p>
{{/if}}
{{#invoiceInfo}}
{{#invoice}}
<ul class="invoice-info">
<li>
<span>发票信息</span>
<span class="invoice-fr">{{#if invoiceType}}电子发票{{else}}纸质发票{{/if}}</span>
<span class="invoice-fr">{{#if type}}电子发票{{else}}纸质发票{{/if}}</span>
</li>
<li>
<span>发票抬头</span>
<span class="invoice-fr">{{invoiceTop}}</span>
<span class="invoice-fr">{{title}}</span>
</li>
<li>
<span>发票内容</span>
<span class="invoice-fr">{{invoiceCont}}</span>
</li>
{{#if invoiceType}}
<li>
<a href="{{invoiceSee}}"><span class="invoice-fr invoice-see">点击查看电子发票</span></a>
<span class="invoice-fr">{{contentValue}}</span>
</li>
{{#if pdfUrl}}
<li>
<a href="{{pdfUrl}}"><span class="invoice-fr invoice-see">点击下载PDF发票</span></a>
</li>
{{/if}}
</ul>
{{/invoiceInfo}}
{{/invoice}}
<div class="opt block">
{{#unless unreceived}}
... ...
... ... @@ -1073,12 +1073,7 @@ class HomeController extends AbstractAction
$this->_view->display('order-detail', array(
'orderDetailPage' => true,
'invoiceInfo' => array(
'invoiceType' => true,
'invoiceTop' => '有货(商贸)服务有限公司',
'invoiceCont' => '服装',
'invoiceSee' => ''
),
'invoice' => empty($orderDetail['invoice']) ? array() : $orderDetail['invoice'],
'serviceUrl' => 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=',
'orderDetail' => $orderDetail,
'orderCode' => $orderCode,
... ...
... ... @@ -240,6 +240,21 @@ class OrderModel
$result['isJit'] = true;
$result['jitDetailUrl'] = Helpers::url('/cart/index/jitDetail', array('orderCode' => $orderCode, 'sessionKey' => $sessionKey));
}
//电子发票
if (!empty($orderDetail['data']['invoice'])) {
$result['invoice'] = $orderDetail['data']['invoice'];
//纸质 1,电子 2
$result['invoice']['type'] = $result['invoice']['type'] * 1 === 2 ? true : false;
}
$result['invoice'] = array(
'type' => true,//-- 纸质 false,电子 true
'title' => '发票抬头',// --发票抬头
'contentValue' => '服饰',//-- 发票内容
'mobilePhone' => '13651898702',//--电话
'pdfUrl' => 'http://redmine.yoho.cn/attachments/download/2732/%E7%94%B5%E5%AD%90%E5%8F%91%E7%A5%A8-wap%E7%AB%AF.pdf',//--pdf下载地址
);
}
//取消订单原因列表
$resons = OrderData::closeReasons();
... ...