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


PHP CommonModel::getEubAccounts方法代码示例

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


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

示例1: view_printGroupOrder100

 public function view_printGroupOrder100()
 {
     $groupsn = isset($_GET['groupsn']) ? trim($_GET['groupsn']) : 0;
     if (empty($groupsn)) {
         echo "请指定配货清单!";
         exit;
     }
     $group_list = OmAvailableModel::getTNameList("wh_shipping_order_group", "*", "where shipOrderGroup='{$groupsn}' order by id asc");
     if (!$group_list) {
         echo "该配货清单不存在!";
         exit;
     }
     $time = time();
     $userName = $_SESSION['userName'];
     //更新今日清单打印表
     OmAvailableModel::updateTNameRow("wh_shipping_order_group_print", "set status='1',orderPrintUser='{$userName}',orderPrintTime='{$time}'", "where shipOrderGroup='{$groupsn}'");
     //获取订单对应的车号
     $orderids = array();
     foreach ($group_list as $group) {
         if (!isset($orderids[$group['shipOrderId']])) {
             $orderids[$group['shipOrderId']] = $group['carNumber'];
         }
     }
     $o_arr = array();
     foreach ($orderids as $order => $car_number) {
         $o_arr[] = $order;
     }
     $oids = implode(',', $o_arr);
     $po_obj = new PackingOrderModel();
     $ordersinfo = $po_obj->getaSetOfOrderInfo($oids);
     if (empty($ordersinfo)) {
         $data = array('data' => array('没有可打印内容!'), 'link' => 'index.php?mod=orderWaitforPrint&act=printList');
         goErrMsgPage($data);
         exit;
     }
     $sod_obj = new ShipingOrderDetailModel();
     $acc_id_arr = array();
     foreach ($ordersinfo as &$orinfval) {
         $locationinfo = array();
         $totalnum = 0;
         $package_type = '';
         $iscard = '';
         $carrier = CommonModel::getShipingNameById($orinfval['transportId']);
         if ($carrier == 'EUB' || $carrier == 'Global Mail' || $carrier == '德国邮政') {
             $goods_title = array();
             $skulisttemp = $sod_obj->getSkuListByOrderId($orinfval['id'], "order by pName");
             $eubtotal = 0;
             $totalweight = 0;
             $detailcount = count($skulisttemp);
             $height = $detailcount > 1 ? intval(123 / $detailcount) : 123;
             foreach ($skulisttemp as &$tmval) {
                 if ($carrier == 'EUB') {
                     //EUB热敏打印处理
                     $sku_info = printLabelModel::getSkuInfo($tmval['sku']);
                     if (!empty($sku_info)) {
                         $materName = CommonModel::getMaterInfoById($sku_info['pmId']);
                         //包材
                         list($goodsName) = strpos($sku_info['goodsName'], '--') !== false ? explode('--', $sku_info['goodsName']) : array($sku_info['goodsName']);
                         $price = rand(300, 600) / 100;
                         $eubtotal += $price;
                         $weight = $sku_info['goodsWeight'] * $tmval['amount'];
                         $totalweight += $weight;
                         $locationinfo['skuinfo'][] = array('sku' => $tmval['sku'], 'itemTitle' => $tmval['itemTitle'], 'goodsName' => $goodsName, 'isPacking' => $sku_info['isPacking'], 'materName' => $materName, 'pName' => $tmval['pName'], 'amount' => $tmval['amount'], 'price' => $price, 'weight' => $weight, 'height' => $height);
                         $locationinfo['eubtotal'] = $eubtotal;
                         $locationinfo['eubweight'] = $totalweight;
                     }
                     $zip = $orinfval['zipCode'];
                     $zip0 = explode("-", $zip);
                     if (count($zip0) >= 2) {
                         $zip = $zip0[0];
                         $orinfval['zipCode'] = $zip;
                     }
                     $isd = intval(substr($zip, 0, 2));
                     if ($isd >= 0 && $isd <= 34) {
                         $isd = '1';
                     } else {
                         if ($isd >= 35 && $isd <= 74) {
                             $isd = '3';
                         } else {
                             if ($isd >= 75 && $isd <= 93) {
                                 $isd = '4';
                             } else {
                                 if ($isd >= 94 && $isd <= 99) {
                                     $isd = '2';
                                 } else {
                                     $isd = '1';
                                 }
                             }
                         }
                     }
                     $orinfval['isd'] = $isd;
                     //回邮信息
                     $orinfval['pinfo'] = CommonModel::getEubAccounts($orinfval['accountId']);
                     //跟踪号
                     $orinfval['tracknumber'] = printLabelModel::getTracknumber($orinfval['id']);
                 } else {
                     if ($carrier == 'Global Mail' || $carrier == '德国邮政') {
                         //Global Mail-100*100打印
                         $title_nums = 0;
                         $title_nums = count($goods_title);
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:printOrder.view.php

示例2: get_EUBReturnAdress

 /**
  * OrderPrintAct::get_EUBReturnAdress()
  * 获取EUB回邮地址
  * @param int $accountId
  * @return void
  */
 public function get_EUBReturnAdress($accountId)
 {
     $key = 'returnAccountId' . $accountId;
     $data = WhBaseModel::cache($key);
     if (!$data) {
         $data = CommonModel::getEubAccounts($accountId);
         if (!empty($data)) {
             WhBaseModel::cache($key, $data, 24 * 3600);
         }
     }
     return $data;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:18,代码来源:orderPrint.action.php

示例3: printDispatchOrder

 private function printDispatchOrder($oids, $type)
 {
     $po_obj = new PackingOrderModel();
     $ordersinfo = $po_obj->getaSetOfOrderInfo($oids);
     //echo "<pre>";print_r($ordersinfo);exit;
     if (empty($ordersinfo)) {
         $data = array('data' => array('没有可打印内容!'), 'link' => 'index.php?mod=orderWaitforPrint&act=printList');
         goErrMsgPage($data);
         exit;
     }
     $sod_obj = new ShipingOrderDetailModel();
     $acc_id_arr = array();
     foreach ($ordersinfo as &$orinfval) {
         $locationinfo = array();
         $totalnum = 0;
         $package_type = '';
         $iscard = '';
         $carrier = CommonModel::getShipingNameById($orinfval['transportId']);
         if ($type == 1 || $type == 6 || $type == 7) {
             //标签打印-50*100处理
             if ($type == 7) {
                 $tag = 0;
             } else {
                 $tag = 1;
             }
             $skulisttemp = $sod_obj->getAllSkuListByOrderId($orinfval['id'], "order by pName,combineSku", $tag);
             $totalnum = $skulisttemp['totalnum'];
             $locationinfo = $skulisttemp['skuinfo'];
             if (isset($locationinfo['notcombine']) && count($locationinfo['notcombine']['info']) == 1) {
                 $package_type = $skulisttemp['packagetype'];
             }
             $iscard = printLabelModel::checkprintcard($orinfval['id']);
         } elseif ($type == 8) {
             if ($carrier == 'EUB' || $carrier == 'Global Mail' || $carrier == '德国邮政') {
                 $goods_title = array();
                 $skulisttemp = $sod_obj->getSkuListByOrderId($orinfval['id'], "order by pName");
                 $eubtotal = 0;
                 $totalweight = 0;
                 $detailcount = count($skulisttemp);
                 $height = $detailcount > 1 ? intval(123 / $detailcount) : 123;
                 foreach ($skulisttemp as &$tmval) {
                     if ($carrier == 'EUB') {
                         //EUB热敏打印处理
                         $sku_info = printLabelModel::getSkuInfo($tmval['sku']);
                         if (!empty($sku_info)) {
                             $materName = CommonModel::getMaterInfoById($sku_info['pmId']);
                             //包材
                             list($goodsName) = strpos($sku_info['goodsName'], '--') !== false ? explode('--', $sku_info['goodsName']) : array($sku_info['goodsName']);
                             $price = rand(300, 600) / 100;
                             $eubtotal += $price;
                             $weight = $sku_info['goodsWeight'] * $tmval['amount'];
                             $totalweight += $weight;
                             $locationinfo['skuinfo'][] = array('sku' => $tmval['sku'], 'itemTitle' => $tmval['itemTitle'], 'goodsName' => $goodsName, 'isPacking' => $sku_info['isPacking'], 'materName' => $materName, 'pName' => $tmval['pName'], 'amount' => $tmval['amount'], 'price' => $price, 'weight' => $weight, 'height' => $height);
                             $locationinfo['eubtotal'] = $eubtotal;
                             $locationinfo['eubweight'] = $totalweight;
                         }
                         $zip = $orinfval['zipCode'];
                         $zip0 = explode("-", $zip);
                         if (count($zip0) >= 2) {
                             $zip = $zip0[0];
                             $orinfval['zipCode'] = $zip;
                         }
                         $isd = intval(substr($zip, 0, 2));
                         if ($isd >= 0 && $isd <= 34) {
                             $isd = '1';
                         } else {
                             if ($isd >= 35 && $isd <= 74) {
                                 $isd = '3';
                             } else {
                                 if ($isd >= 75 && $isd <= 93) {
                                     $isd = '4';
                                 } else {
                                     if ($isd >= 94 && $isd <= 99) {
                                         $isd = '2';
                                     } else {
                                         $isd = '1';
                                     }
                                 }
                             }
                         }
                         $orinfval['isd'] = $isd;
                         //回邮信息
                         $orinfval['pinfo'] = CommonModel::getEubAccounts($orinfval['accountId']);
                         //跟踪号
                         $orinfval['tracknumber'] = printLabelModel::getTracknumber($orinfval['id']);
                     } else {
                         if ($carrier == 'Global Mail' || $carrier == '德国邮政') {
                             //Global Mail-100*100打印
                             $title_nums = 0;
                             $title_nums = count($goods_title);
                             if ($detailcount > 3 && $title_nums < 2) {
                                 $goods_title[] = !empty($tmval['itemTitle']) ? $title_nums + 1 . ' ' . $tmval['itemTitle'] : '';
                             } else {
                                 if ($detailcount <= 3 && $title_nums == 0) {
                                     $goods_title[] = !empty($tmval['itemTitle']) ? $title_nums + 1 . ' ' . $tmval['itemTitle'] : '';
                                 }
                             }
                             $sku_info = printLabelModel::getSkuInfo($tmval['sku']);
                             if (!empty($sku_info)) {
                                 $weight = $sku_info['goodsWeight'] * $tmval['amount'];
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:orderWaitforPrint.view.php


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