本文整理匯總了PHP中CommonModel::getChannelNameByIds方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonModel::getChannelNameByIds方法的具體用法?PHP CommonModel::getChannelNameByIds怎麽用?PHP CommonModel::getChannelNameByIds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CommonModel
的用法示例。
在下文中一共展示了CommonModel::getChannelNameByIds方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: view_orderWeighing
public function view_orderWeighing()
{
$config_path = 'images/cz';
$time = date("Y/m/d", time());
$dirPath = $config_path . '/' . $time;
if (!is_dir($dirPath)) {
mkdirs($dirPath, 0777);
}
$this->smarty->assign('time', $time);
$navlist = array(array('url' => '', 'title' => '出庫'), array('url' => 'index.php?mod=waitWeighing&act=waitWeighingList', 'title' => '待稱重'), array('url' => '', 'title' => '稱重掃描<小包>'));
$secnev = 3;
$toplevel = 2;
$secondlevel = 26;
//$userName = $_SESSION['username'];
//$this->smarty->assign('secnev','1');
$this->smarty->assign('navlist', $navlist);
$this->smarty->assign('secnev', $secnev);
$this->smarty->assign('toplevel', $toplevel);
$this->smarty->assign('secondlevel', $secondlevel);
$partion_list = CommonModel::getChannelNameByIds('all');
//$channel_list = CommonModel::getCarrierChannelByIds('all');
$channel_list = C('MAILWAYCONFIG');
$this->smarty->assign("partion_list", $partion_list);
$this->smarty->assign("channel_list", $channel_list);
//$this->smarty->assign('toptitle', '貨品資料管理');
$this->smarty->display('orderWeighing.htm');
}
示例2: act_packingTracknumber
public function act_packingTracknumber()
{
$orderid = isset($_POST['orderid']) ? $_POST['orderid'] : "";
$tracknumber = isset($_POST['tracknumber']) ? $_POST['tracknumber'] : "";
$userId = $_SESSION['userId'];
//先核對訂單
//兼容 EUB或者 包裹 掃描的是 trackno 而非ebayid
$p_real_ebayid = '#^\\d+$#';
$p_trackno_eub = '#^(LK|RA|RB|RC|RR|RF|LN)\\d+(CN|HK|DE200)$#';
$is_eub_package_type = false;
if (preg_match($p_real_ebayid, $orderid)) {
} else {
if (preg_match($p_trackno_eub, $orderid)) {
$is_eub_package_type = true;
} else {
self::$errCode = "001";
self::$errMsg = "訂單號[" . $orderid . "]格式有誤";
return false;
}
}
if ($is_eub_package_type === true) {
$record = ShippingOrderModel::getShippingOrderInfo("b.*", "where a.tracknumber='{$orderid}' and a.is_delete=0");
} else {
$record = ShippingOrderModel::getShippingOrder("*", "where id='{$orderid}'");
}
//驗證發貨單號 以及所屬狀態
if (!$record) {
self::$errCode = 404;
self::$errMsg = "發貨單號不存在!";
return false;
}
if ($record[0]['orderStatus'] != 404) {
self::$errCode = 405;
self::$errMsg = "此發貨單不在待包裝!";
if ($record[0]['orderStatus'] == 900) {
self::$errMsg = "此發貨單已廢棄!";
}
return false;
}
//掛號的單需要再輸入掛號條碼
$carrier = CommonModel::getShipingNameById($record[0]['transportId']);
$partion = CommonModel::getChannelNameByIds($record[0]['transportId'], $record[0]['countryName']);
$total_num = 0;
$skuinfos = get_realskunum($record[0]['id']);
foreach ($skuinfos as $or_sku => $or_nums) {
$total_num += $or_nums;
}
if (carrier == '中國郵政掛號' && !preg_match("/^(RA|RB|RC|RR)\\d+(CN)\$/", $tracknumber)) {
self::$errCode = 111;
self::$errMsg = "錄入失敗,中國郵政掛號跟蹤碼不符合規範";
return false;
}
if ($carrier == '香港小包掛號' && !preg_match("/^(RA|RB|RC|RR)\\d+(HK)\$/", $tracknumber)) {
self::$errCode = 111;
self::$errMsg = "錄入失敗,香港小包掛號跟蹤碼不符合規範";
return false;
}
$p_str = "掛號條碼:" . "<font color='#FF0000'>" . $tracknumber . "</font> <br>";
TransactionBaseModel::begin();
//更新訂單狀態
$msg = OmAvailableModel::updateTNameRow("wh_shipping_order", "set orderStatus=405", "where id={$record[0]['id']}");
if (!$msg) {
self::$errCode = 409;
self::$errMsg = "更新發貨單狀態記錄失敗!";
$arr['partion'] = $partion;
$arr['carrier'] = $carrier;
TransactionBaseModel::rollback();
return json_encode($arr);
exit;
}
//更新操作記錄
$msg = packingScanOrderModel::updateOrderRecord($record[0]['id'], $userId);
if (!$msg) {
self::$errCode = 406;
self::$errMsg = "更新發貨單操作記錄失敗!";
TransactionBaseModel::rollback();
return false;
}
//插入包裝記錄
$msg = packingScanOrderModel::insertPackingRecord($record[0]['id'], $userId);
if (!$msg) {
self::$errCode = 407;
self::$errMsg = "插入包裝記錄失敗!";
TransactionBaseModel::rollback();
return false;
}
$msg = packingScanOrderModel::deleteTrackRecord($record[0]['id']);
if (!$msg) {
self::$errCode = 409;
self::$errMsg = "刪除跟蹤記錄失敗!";
TransactionBaseModel::rollback();
return false;
}
//錄入掛號條碼
$msg = packingScanOrderModel::insertTrackRecord($tracknumber, $record[0]['id']);
if (!$msg) {
self::$errCode = 408;
self::$errMsg = "插入包裝記錄失敗!";
TransactionBaseModel::rollback();
return false;
//.........這裏部分代碼省略.........
示例3: showPartionScan
public static function showPartionScan($shipOrderId, $accountId, $carrier, $countryName)
{
$sz_array = $sz_name_array = array();
$account = CommonModel::getAccountNameById($accountId);
$partions = CommonModel::getChannelNameByIds('all');
foreach ($partions as $partion) {
$sz_array[$partion['partitionCode']] = $partion['countries'];
$sz_name_array[$partion['partitionCode']] = htmlspecialchars_decode($partion['partitionName']);
}
//匹配回郵地址信息
$returnvalue = $carrier;
foreach ($sz_array as $sz_key => $sz_value) {
$sz_value_arr = explode("],[", $sz_value);
$sz_value_arr[0] = str_replace("[", "", $sz_value_arr[0]);
$sz_value_arr[count($sz_value_arr) - 1] = str_replace("]", "", $sz_value_arr[count($sz_value_arr) - 1]);
if (!empty($countryName) && in_array(trim($countryName), $sz_value_arr)) {
$returnvalue .= $sz_name_array[$sz_key];
break;
}
}
//增加因缺少國家直接為福七區的邏輯 add by guanyongjun 2014/03/07
if (!in_array($countryName, array('Australia', 'Australla')) && empty($returnvalue)) {
$returnvalue = $carrier . $sz_name_array[7];
}
return $returnvalue;
// if(strpos($carrier, '中國郵政')!==false){
// if(in_array(trim($countryName), array('Albania','Algeria','Argentina','Egypt','Ethiopia','Estonia','Anguilla','Austria','Bahrain','Panama','Belarus','Bulgaria','Benin','Belgium','Iceland','Bosnia and Herzegovina','Bolivia','Botswana','Burkina Faso','Burundi','Denmark','Togo','Dominica','Russian Federation','Ecuador','Falkland Islands(Malvinas)','Gambia','Colombia','Costa Rica','Greenland','Georgia','Guyana','Haiti','Djibouti','Guinea','Guinea','Ghana','Cambodia','Czech Republic','Zimbabwe','Cameroon','Qatar','Cote d Ivoire (Ivory Coast)','Kuwait','Kenya','Latvia','Lesotho','Laos','Lebanon','Lithuania','Liberia','Libya','Rwanda','Romania','Madagascar','Malta','Malawi','Mali','Mauritania','Mongolia','Bangladesh','Peru','Morocco','Mozambique','Namibia','Nepal','Niger','Nigeria','Palau','Portugal','Sweden','Senegal','Cyprus','Seychelles','Slovakia','Sudan','Suriname','Tanzania','Trinidad and Tobago','Tunisia','Turkey','Venezuela','Uganda','Uruguay','Western Sahara','Greece','Hungary','Syria','Jamaica','Armenia','Yemen','Iraq','Iran','India','Zambia','Zaire','Chad','Chile','Cuba,Republic of','Congo, Republic of the','Congo, Democratic Republic of the','Russia','Azerbaijan Republic','Azerbaijan','Dominica','Dominican Republic','Equatorial Guinea','Gabon Republic','Papua New Guinea')) || in_array($account, array('taotaocart','arttao','taochains','etaosky','tmallbasket','mucheer','lantao','direttao','hitao','taolink'))){
// return $carrier.$sz_name_array[7];
// }else{
// $mailways = self::getOrderGoodsMailwayIds($shipOrderId);
// if(in_array(2,$mailways) || in_array(5,$mailways) || in_array(trim($countryName), array('Saudi Arabia','Malaysia'))){
// $returnvalue = $carrier;
// foreach($sz_array as $sz_key => $sz_value){
// $sz_value_arr = explode("],[",$sz_value);
// $sz_value_arr[0] = str_replace("[","",$sz_value_arr[0]);
// $sz_value_arr[count($sz_value_arr)-1] = str_replace("]","",$sz_value_arr[count($sz_value_arr)-1]);
// if(!empty($countryName) && in_array(trim($countryName),$sz_value_arr)){
// $returnvalue .= $sz_name_array[$sz_key];
// break;
// }
// }
// return $returnvalue;
// }else if(in_array(1,$mailways)){
// return $carrier.$sz_name_array[7];
// } else {
// return $carrier.$sz_name_array[7];
// }
// }
// }
}