當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonModel::getMaterInfoById方法代碼示例

本文整理匯總了PHP中CommonModel::getMaterInfoById方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonModel::getMaterInfoById方法的具體用法?PHP CommonModel::getMaterInfoById怎麽用?PHP CommonModel::getMaterInfoById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonModel的用法示例。


在下文中一共展示了CommonModel::getMaterInfoById方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: view_printGroupOrder2

 public function view_printGroupOrder2()
 {
     $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 = '';
         $skulisttemp = $sod_obj->getAllSkuListByOrderId($orinfval['id'], "order by pName,combineSku");
         $totalnum = $skulisttemp['totalnum'];
         $locationinfo = $skulisttemp['skuinfo'];
         if (isset($locationinfo['notcombine']) && count($locationinfo['notcombine']['info']) == 1) {
             $package_type = $skulisttemp['packagetype'];
         }
         $iscard = printLabelModel::checkprintcard($orinfval['id']);
         $pmNameStr = CommonModel::getMaterInfoById($orinfval['pmId']);
         $orinfval['finalposition'] = $locationinfo;
         $totalStr = $totalnum . " " . $pmNameStr . " " . $orinfval['calcWeight'] . "KG";
         if (!empty($package_type)) {
             $totalStr = $totalStr . " " . $package_type;
         }
         if (!empty($iscard)) {
             $totalStr = $totalStr . "  " . $iscard;
         }
         $totalStr = $totalStr . "  " . $orinfval['platformUsername'];
         $carrier = CommonModel::getShipingNameById($orinfval['transportId']);
         $orinfval['abbrshipname'] = CommonModel::getShipingAbbrNameById($orinfval['transportId']);
         $orinfval['totalStr'] = $totalStr;
         $orinfval['notes'] = $po_obj->getOrderNotesInfo($orinfval['id']);
         $orinfval['countryZh'] = CommonModel::getCountryNameCn($orinfval['countryName']);
         $orinfval['partionFromAddress'] = printLabelModel::getPartionFromAddress($orinfval['id'], $carrier, $orinfval['countryName']);
         if (!in_array($orinfval['accountId'], $acc_id_arr)) {
             array_push($acc_id_arr, $orinfval['accountId']);
         }
     }
     $salesaccountinfo = CommonModel::getAccountInfo($acc_id_arr);
     $this->smarty->assign('salesaccountinfo', $salesaccountinfo);
     $totalCount = count($ordersinfo);
     $this->smarty->assign('totalCount', $totalCount);
     $this->smarty->assign('orderids', $orderids);
     $this->smarty->assign('ordersinfo', $ordersinfo);
     $this->smarty->display('label50x100_22.htm');
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:77,代碼來源:printOrder.view.php

示例2: foreach

		<td width="64%" height="20" align="center"  style="border-bottom: 1px solid #000; border-right:#000 1px solid"><span class="STYLE2">Description of Contents</span></td>
		<td width="9%" align="center"  style="border-bottom: 1px solid #000; border-right:#000 1px solid"><span class="STYLE2">Kg.</span></td>
		<td width="9%" align="center"  style="border-bottom: 1px solid #000; border-right:#000 1px solid"><span class="STYLE2">Val(us$) </span></td>
		<td width="10%" align="center"  style="border-bottom: 1px solid #000; "><span class="STYLE2">Goods Origin</span></td>
	  </tr>
	   <?php 
    $i = 1;
    $totalweight = 0;
    $total = 0;
    foreach ($all_sku_info as $sku => $skuInfo) {
        $price = rand(300, 600) / 100;
        $total += $price;
        $goods_count = $skuInfo['amount'];
        $goods_weight = $skuInfo['goodsWeight'] * $goods_count;
        $totalweight += $goods_weight;
        $ebay_packingmaterial = CommonModel::getMaterInfoById($skuInfo['pmId']);
        ?>
	    <tr>
        <td align="center" valign="top" style="border-right:#000 1px solid; border-bottom:#000 1px solid; font-size:9px;"><?php 
        echo $i;
        ?>
&nbsp;</td>
        <td align="center" valign="top" style="border-right:#000 1px solid; border-bottom:#000 1px solid;font-size:9px; "><?php 
        echo $goods_count;
        ?>
&nbsp;</td>
        <td height="<?php 
        echo $height;
        ?>
" align="left" valign="top" style="border-bottom:#000 1px solid;">
            <div style=" font-size:8px;color#000;">
開發者ID:ohjack,項目名稱:newErp,代碼行數:31,代碼來源:printlabel_eub.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

示例4: intval

global $dbConn;
$shipOrderId = intval($_SESSION['shipOrderId']);
$transport = trim($_SESSION['transport']);
$shipOrderInfo = WhShippingOrderModel::get_order_info_union_table($shipOrderId);
//獲取發貨單基本信息
$transportId = $shipOrderInfo['transportId'];
//運輸方式ID
if (in_array($transportId, array(53))) {
    $ebay_id = $shipOrderInfo['id'];
    $ebay_tracknumber = $shipOrderInfo['tracknumber'];
    $ebay_userid = $shipOrderInfo['platformUsername'];
    $ebay_total = $shipOrderInfo['total'];
    //	$ebay_total    =   $ebay_total >= 10 ? 10 : ($ebay_total == 0 ? rand(5,10) : $ebay_total);
    $ebay_usermail = $shipOrderInfo['email'];
    $packingtype = $shipOrderInfo['packingtype'];
    $pmName = CommonModel::getMaterInfoById($shipOrderInfo['pmId']);
    $orderweight = round($shipOrderInfo['actualWeight'] / 1000, 3);
    $ordershipfee = $shipOrderInfo['actualShipping'];
    $ebay_account = CommonModel::getAccountNameById($shipOrderInfo['accountId']);
    $cname = $shipOrderInfo['username'];
    $street1 = $shipOrderInfo['street'];
    $street2 = $shipOrderInfo['address2'] ? $shipOrderInfo['address2'] : '';
    $street2 .= $shipOrderInfo['address3'] ? $shipOrderInfo['address3'] : '';
    $city = $shipOrderInfo['city'];
    $state = $shipOrderInfo['state'];
    $countryname = $shipOrderInfo['countryName'];
    $countrySn = $shipOrderInfo['countrySn'];
    $ebay_currency = $shipOrderInfo['currency'];
    $countryCn = self::get_countryNameCn($countryname);
    //根據國家英文名獲取國家中文名
    $zip = $shipOrderInfo['zipCode'];
開發者ID:ohjack,項目名稱:newErp,代碼行數:31,代碼來源:printlabel_global_mail.php


注:本文中的CommonModel::getMaterInfoById方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。