You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pdd-order-api/app/libs/widget/order/class.FooterExpressTplSelec...

35 lines
1.1 KiB
PHP

<?php
class FooterExpressTplSelectorWidget extends ZcWidget {
/**
* @var OrderPrintService
*/
private $orderPrintService;
/**
* @var OrderPrintUtil
*/
private $orderPrintUtil;
public function __construct() {
$this->orderPrintService = Zc::singleton('OrderPrintService');
$this->orderPrintUtil = Zc::singleton('OrderPrintUtil');
}
public function render($data = array()) {
$mallId = $_SESSION[SessionConst::mallId];
if (empty($data['opSetting'])) {
$data['opSetting'] = $this->orderPrintService->getUserOpSetting($mallId);
}
if (!isset($data['expressTplList'])) {
$expressTplList = $this->orderPrintUtil->getAllExpressTplList($mallId, $data['isFds']);
foreach ($expressTplList[OrderPrintConst::expressTypePtmd] as &$expressTpl){
$expressTpl['waybill_type'] = 0;
}
$expressTplList = array_merge($expressTplList[OrderPrintConst::expressTypePtmd], $expressTplList[OrderPrintConst::expressTypeDzmd]);
$data['expressTplList'] = ZcArrayHelper::changeKeyRow($expressTplList, 'op_user_express_tpl_id');
}
return $this->renderFile('order/footer_express_tpl_selector', $data);
}
}