当前位置: 首页>>代码示例>>PHP>>正文


PHP Prefs::translatestatus方法代码示例

本文整理汇总了PHP中Prefs::translatestatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Prefs::translatestatus方法的具体用法?PHP Prefs::translatestatus怎么用?PHP Prefs::translatestatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Prefs的用法示例。


在下文中一共展示了Prefs::translatestatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getIndex


//.........这里部分代码省略.........
     $device = Input::get('device');
     $courier = Input::get('courier');
     $logistic = Input::get('logistic');
     $position = Input::get('position');
     $trip = Input::get('trip');
     $status = Input::get('status');
     $courierstatus = Input::get('courier-status');
     if ($period_to == '' || is_null($period_to)) {
         $period_to = date('Y0m', time());
     }
     $this->def_order_by = 'TRANS_DATETIME';
     $this->def_order_dir = 'DESC';
     $this->place_action = 'none';
     $this->show_select = false;
     /* Start custom queries */
     $model = $this->model;
     if ($status == '' || is_null($status)) {
         $status = Config::get('jayon.manifest_default_status');
         $status[] = Config::get('jayon.trans_status_mobile_return');
     } else {
         $status = explode(',', $status);
     }
     if (empty($status)) {
         $exstatus = Config::get('jayon.manifest_default_excl_status');
         if (!empty($exstatus)) {
             $model = $model->whereNotIn('status', $exstatus);
         }
     } else {
         $model = $model->whereIn('status', $status);
     }
     if ($courierstatus == '' || is_null($courierstatus)) {
         $courierstatus = Config::get('jayon.manifest_default_courier_status');
     } else {
         $courierstatus = explode(',', $courierstatus);
     }
     if (empty($courierstatus)) {
         $excrstatus = Config::get('jayon.manifest_default_excl_courier_status');
         if (!empty($excrstatus)) {
             $model = $model->whereNotIn('courier_status', $excrstatus);
         }
     } else {
         $model = $model->whereIn('courier_status', $courierstatus);
     }
     if ($period_from == '' || is_null($period_from)) {
         $def_from = date('Y-m-d', time());
         $model = $model->where('pick_up_date', '=', new MongoDate(strtotime($def_from)));
     } else {
         $model = $model->where('pick_up_date', '=', new MongoDate(strtotime($period_from)));
     }
     if ($device == '' || is_null($device)) {
     } else {
         $model = $model->where('device_key', '=', $device);
     }
     if ($courier == '' || is_null($courier)) {
     } else {
         $model = $model->where('courier_id', '=', $courier);
     }
     if ($logistic == '' || is_null($logistic)) {
     } else {
         $model = $model->where('logistic', '=', $logistic);
     }
     if ($position == '' || is_null($position)) {
     } else {
         $model = $model->where('position', '=', $position);
     }
     if ($trip == '' || is_null($trip)) {
     } else {
         $model = $model->where(function ($t) use($trip) {
             $t->where('trip', '=', intval($trip))->orWhere('trip', '=', strval($trip));
         });
     }
     $actualresult = $model->get();
     $tattrs = array('width' => '100%', 'class' => 'table table-bordered table-striped');
     $thead = array();
     //No. Kota Type Status  KEPADA  ALAMAT  Phone   Order ID Fulfillment ID Jumlah Box PENERIMA PAKET
     //TANDA TANGAN    NAMA
     $thead[] = array(array('value' => '#', 'attr' => 'rowspan=2'), array('value' => 'Delivery Date', 'attr' => 'rowspan="2" '), array('value' => 'Kota', 'attr' => 'rowspan="2" class="center"'), array('value' => 'Type', 'attr' => 'rowspan="2" '), array('value' => 'Logistic', 'attr' => 'rowspan="2" '), array('value' => 'Device', 'attr' => 'rowspan="2" '), array('value' => 'Status', 'attr' => 'rowspan="2" '), array('value' => 'KEPADA / CUSTOMER', 'attr' => 'rowspan="2" '), array('value' => 'ALAMAT', 'attr' => 'rowspan="2" style="min-width:200px;"'), array('value' => 'Telepon', 'attr' => 'rowspan="2" '), array('value' => 'Order ID', 'attr' => 'rowspan="2" '), array('value' => 'Fulfillment ID', 'attr' => 'rowspan="2" '), array('value' => 'Nilai COD', 'attr' => 'rowspan="2" '), array('value' => 'Jumlah Paket', 'attr' => 'rowspan="2" '), array('value' => 'PENERIMA', 'attr' => 'colspan="4"'));
     $thead[] = array(array('value' => 'JUMLAH DITERIMA DI HUB', 'attr' => ''), array('value' => 'TANGGAL / JAM TERIMA', 'attr' => ''), array('value' => 'TANDA TANGAN', 'attr' => ''), array('value' => 'NAMA', 'attr' => 'class="bold center" style="width:50px" '));
     $seq = 1;
     $tabdata = array();
     foreach ($actualresult as $m) {
         if ($m->pick_up_date instanceof MongoDate) {
             $pick_up_date = date('Y-m-d H:i:s', $m->pick_up_date->sec);
             $dattr = '';
         } else {
             $pick_up_date = $m->pick_up_date;
             $dattr = 'class="red"';
         }
         $tabdata[] = array(array('value' => $seq, 'attr' => ''), array('value' => $pick_up_date, 'attr' => $dattr), array('value' => $m->consignee_olshop_city, 'attr' => ''), array('value' => $m->delivery_type, 'attr' => ''), array('value' => $m->logistic, 'attr' => ''), array('value' => $m->device_name, 'attr' => ''), array('value' => Prefs::translatestatus($m->status, 'delivery'), 'attr' => ''), array('value' => $m->consignee_olshop_name, 'attr' => ''), array('value' => $m->consignee_olshop_addr, 'attr' => ''), array('value' => $m->consignee_olshop_phone, 'attr' => ''), array('value' => $m->no_sales_order, 'attr' => ''), array('value' => $m->consignee_olshop_orderid, 'attr' => ''), array('value' => Ks::idr($m->cod), 'attr' => 'style="text-align:right;"'), array('value' => $m->number_of_package, 'attr' => ''), array('value' => '', 'attr' => ''), array('value' => '', 'attr' => ''), array('value' => '', 'attr' => ''), array('value' => '', 'attr' => ''));
         $seq++;
     }
     $mtable = new HtmlTable($tabdata, $tattrs, $thead);
     $tables[] = $mtable->build();
     $this->table_raw = $tables;
     if ($this->print == true || $this->pdf == true || $this->xls == true) {
         return $tables;
     } else {
         return parent::reportPageGenerator();
     }
 }
开发者ID:awidarto,项目名称:bilnatracker,代码行数:101,代码来源:RetmanifestController.php


注:本文中的Prefs::translatestatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。