本文整理匯總了PHP中CommonModel::getShipingNameById方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonModel::getShipingNameById方法的具體用法?PHP CommonModel::getShipingNameById怎麽用?PHP CommonModel::getShipingNameById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CommonModel
的用法示例。
在下文中一共展示了CommonModel::getShipingNameById方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: act_orderWeighingCheck
public function act_orderWeighingCheck()
{
$orderid = isset($_POST['orderid']) ? $_POST['orderid'] : "";
$where = "where id={$orderid}";
$orderinfo = orderWeighingModel::selectRecord($where);
if (!orderinfo) {
self::$errCode = 502;
self::$errMsg = "此發貨單號不存在!";
return false;
}
if ($orderinfo[0]['orderStatus'] != PKS_WWEIGHING) {
if ($orderinfo[0]['orderStatus'] == PKS_WDISTRICT) {
self::$errCode = 514;
self::$errMsg = "此發貨單已在待分區,不用再掃描!";
return false;
} else {
if ($orderinfo[0]['orderStatus'] == PKS_WAITING_SORTING) {
self::$errCode = 514;
self::$errMsg = "此發貨單還在待分揀中!";
return false;
} else {
self::$errCode = 514;
self::$errMsg = "此發貨單在" . LibraryStatusModel::getStatusNameByStatusCode($orderinfo[0]['orderStatus']) . "狀態,請確認!";
return false;
}
}
}
$flat_transport = C('flat_transport');
$carrier = CommonModel::getShipingNameById($orderinfo[0]['transportId']);
if (in_array($carrier, $flat_transport)) {
$arr['type'] = "flat";
} else {
self::$errCode = 503;
self::$errMsg = "此發貨單運輸方式不屬於小包,請確認!";
return false;
}
$partionId = CommonModel::getChannelIdByIds($orderinfo[0]['transportId'], $orderinfo[0]['countryName']);
$account = CommonModel::getAccountNameById($orderinfo[0]['accountId']);
//運輸公司
$channelId = printLabelModel::getMcFromCarrier($orderinfo[0]['id'], $carrier, $orderinfo[0]['countryName'], $account);
$arr['channelId'] = $channelId;
$arr['transportId'] = $orderinfo[0]['transportId'];
$arr['partionId'] = $partionId;
$arr['countryName'] = $orderinfo[0]['countryName'];
$arr['orderid'] = $orderid;
return $arr;
}
示例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: strtotime
} else {
echo "error: 未找對應的config文件!\n";
exit;
}
$debug_mode = 'false';
$user = 'vipchen';
$start = strtotime("-72 hour");
$account_info = get_account_id($account);
$omAvailableAct = new OmAvailableAct();
$where = " WHERE accountId = '{$account_info['accountid']}' AND is_delete = 0 AND b.weighTime>{$start}";
$alldata = $omAvailableAct->act_getTNameList('om_shipped_order as a left join om_shipped_order_warehouse as b on a.id=b.omOrderId', 'a.id,a.recordNumber,a.accountId,a.transportId', $where);
$sum = sizeof($alldata);
if ($sum > 0) {
foreach ($alldata as $val) {
$log_data = array();
$carrier = CommonModel::getShipingNameById($val['transportId']);
$where = " WHERE omOrderId = '{$val['id']}' AND is_delete = 0 ";
$res = $omAvailableAct->act_getTNameList('om_order_tracknumber', 'tracknumber', $where);
$log_data['time'] = date("Y-m-d H:i:s");
$log_data['recordnumber'] = $recordnumber = $val['recordnumber'];
$log_data['ebay_carrier'] = $carrier;
$log_data['tracknumber'] = $tracknumber = $res[0]['tracknumber'];
$log_data['ebay_id'] = $val['id'];
$company_code = getLogisticCode($carrier);
$log_data['company_code'] = $company_code;
if (empty($res)) {
$log_data['errcode'] = 11;
$log_data['msg'] = "empty ebay_tracknumber";
$log = json_encode($log_data) . "\r\n";
@file_put_contents($logfile, $log, FILE_APPEND);
continue;
示例4: 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');
}
示例5: act_orderPartion
public function act_orderPartion()
{
$orderid = isset($_POST['orderid']) ? trim($_POST['orderid']) : "";
if (!is_numeric($orderid)) {
$tracknumber = $orderid;
$info = orderWeighingModel::selectOrderId($tracknumber);
if (!$info) {
self::$errCode = 501;
self::$errMsg = "此跟蹤號不存在!";
return false;
}
$orderid = $info[0]['shipOrderId'];
}
$where = "where id={$orderid}";
$order = orderPartionModel::selectOrder($where);
if (!$order) {
self::$errCode = 601;
self::$errMsg = "此發貨單不存在!";
return false;
}
if (!is_numeric($orderid)) {
$orderid = $order[0]['id'];
}
$msg = orderPartionModel::selectPartionRecord($orderid);
if ($msg) {
self::$errCode = 603;
self::$errMsg = "此發貨單已掃描!";
return false;
}
if ($order[0]['orderStatus'] != 406) {
self::$errCode = 602;
self::$errMsg = "此發貨單不在待分區!";
return false;
}
$shipping = CommonModel::getShipingNameById($order[0]['transportId']);
if (!in_array($shipping, array('中國郵政平郵', '中國郵政掛號', 'EUB', 'Global Mail', '香港小包平郵', '香港小包掛號', '德國郵政'))) {
self::$errCode = 604;
self::$errMsg = "此發貨單不是小包!";
return false;
}
$partion = $shipping;
$platformName = CommonModel::getPlatformInfo($order[0]['platformId']);
if ($shipping == 'Global Mail') {
if ($platformName == '亞馬遜') {
$partion = "非德國Global Mail";
} elseif ($platformName == '海外銷售平台') {
if ($order[0]['countryName'] == 'Deutschland') {
$partion = "Global Mail";
} else {
$partion = "非德國Global Mail";
}
}
} elseif ($shipping == '中國郵政平郵') {
$partion = printLabelModel::showPartionScan($orderid, $order[0]['accountId'], $shipping, $order[0]['countryName']);
} elseif ($shipping == '中國郵政掛號') {
$partion = printLabelModel::showPartionScan($orderid, $order[0]['accountId'], $shipping, $order[0]['countryName']);
}
/*
$lists = $memc_obj->get_extral('trans_system_carrierinfo');
//print_r($lists);
foreach($lists as $list){
foreach($list as $value){
if($record[0]['channelId']==$value['channelId']){
$countries = $value['countries'];
$country_arr = explode("','",$countries);
$country_arr[0] = str_replace("'","",$country_arr[0]);
$country_arr[count($country_arr)-1] = str_replace("'","",$country_arr[count($country_arr)-1]);
if(in_array($record[0]['countryName'],$country_arr)){
$partionId = $value['id'];
}
}
}
}*/
TransactionBaseModel::begin();
$weight = orderPartionModel::selectWeight($orderid);
if (!$weight) {
self::$errCode = 605;
self::$errMsg = "此發貨單無重量!";
return false;
}
$userId = $_SESSION['userId'];
$result = orderPartionModel::insertRecord($orderid, $partion, $weight, $userId);
if (!result) {
self::$errCode = 606;
self::$errMsg = "插入分區記錄失敗!";
TransactionBaseModel::rollback();
return false;
}
$ret = orderPartionModel::updateOrderRecords($orderid, $userId);
if (!ret) {
self::$errCode = 607;
self::$errMsg = "更新操作記錄失敗!";
TransactionBaseModel::rollback();
return false;
}
$ostatus = orderPartionModel::updateOrderStatus($orderid);
if (!ostatus) {
//.........這裏部分代碼省略.........
示例6: checkprintcard
public static function checkprintcard($shipOrderId)
{
self::initDB();
$sql = "select a.platformUsername,a.transportId,a.accountId,b.recordNumber from wh_shipping_order as a \n\t\t\t\t\tleft join wh_shipping_order_relation as b on a.id=b.shipOrderId \n\t\t\t\t\twhere a.id={$shipOrderId}";
$result = self::$dbConn->fetch_first($sql);
$account = CommonModel::getAccountNameById($result['accountId']);
$shipingname = CommonModel::getShipingNameById($result['transportId']);
$ebayAccArr = CommonModel::getEbayAccountList();
if (!in_array($shipingname, array('中國郵政掛號', '中國郵政平郵', '香港小包掛號', '香港小包平郵', 'EUB'))) {
return '';
}
if (in_array($account, $ebayAccArr)) {
return '';
}
if (!in_array($account, $ebayAccArr) && preg_match("/[a-z]+/i", $result['recordnumber'])) {
return '';
}
if ($account == 'dresslink.com') {
return '';
}
$sql = "SELECT street FROM wh_shipping_order WHERE platformUsername='{$result['platformUsername']}' AND orderStatus!=900";
$query = self::$dbConn->query($sql);
$orders = self::$dbConn->fetch_array_all($query);
$streets = array_unique(array_filter(multi2single('street', $orders)));
if (count($streets) == 1) {
return 'KP';
} else {
return '';
}
}
示例7: act_searchSku
function act_searchSku()
{
$order_id = $_POST['ebay_id'];
$sku = trim($_POST['sku']);
$sku = get_goodsSn($sku);
$now_pname = trim($_POST['now_pname']);
$state_status = array(402);
//準備狀態
$final_status = array(403);
//配貨完成狀態
$no_express_delivery = array('中國郵政平郵', '中國郵政掛號', '香港小包平郵', '香港小包掛號', '德國郵政', '新加坡郵政', 'EUB', 'Global Mail');
//先核對訂單
//兼容 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, $order_id)) {
} else {
if (preg_match($p_trackno_eub, $order_id)) {
$is_eub_package_type = true;
} else {
self::$errCode = "001";
self::$errMsg = "訂單號[" . $order_id . "]格式有誤";
return false;
}
}
if ($is_eub_package_type === true) {
$ordercheck = ShippingOrderModel::getShippingOrderInfo("b.*", "where a.tracknumber='{$order_id}' and a.is_delete=0");
} else {
$ordercheck = ShippingOrderModel::getShippingOrder("*", "where id='{$order_id}'");
}
if (empty($ordercheck)) {
self::$errCode = '001';
self::$errMsg = '未找到訂單/跟蹤號[' . $order_id . ']';
return false;
} else {
$ebay_carrier = CommonModel::getShipingNameById($ordercheck[0]['transportId']);
//$ebay_carrier = '中國郵政平郵';
if (!in_array($ebay_carrier, $no_express_delivery)) {
self::$errCode = '001';
self::$errMsg = '請選擇非快遞訂單!';
return false;
}
}
if ($ordercheck[0]['orderStatus'] == 900) {
self::$errCode = '002';
self::$errMsg = "該發貨單[{$order_id}][已經廢棄]!";
return false;
} else {
if (in_array($ordercheck[0]['orderStatus'], $final_status)) {
self::$errCode = '005';
self::$errMsg = "該發貨單已經掃描完成!";
return false;
}
}
if (!in_array($ordercheck[0]['orderStatus'], $state_status)) {
self::$errCode = '002';
self::$errMsg = "該發貨單[{$order_id}][不在待配貨]!";
return false;
}
//配貨單所有料號及數量
$skuinfos = array();
$skuinfo = GroupRouteModel::getOrderPositionID($ordercheck[0]['id']);
foreach ($skuinfo as $info) {
$s_key = $info['sku'] . "-" . $info['pName'];
$skuinfos[$s_key] = $info['amount'];
}
$eosr_arr = OrderPickingRecordsModel::getPickingRecords("*", "where shipOrderId={$ordercheck[0]['id']} and sku='{$sku}' and is_delete=0");
if (!$eosr_arr) {
self::$errCode = "012";
self::$errMsg = "請掃描正確料號!";
return false;
} else {
$sku_stock = GroupRouteModel::getSkuPosition("where a.sku='{$sku}' and c.pName='{$now_pname}' and b.is_delete=0");
$s_key = $sku . "-" . $now_pname;
$goods_sn = array();
//$gsi = get_sku_info($sku);
$goods_sn['sku'] = $sku;
//$goods_sn['gc'] = $gsi['realnums'];
$goods_sn['gc'] = isset($sku_stock[0]['nums']) ? $sku_stock[0]['nums'] : 0;
//$goods_sn['day']= floor($gsi['realnums']/$gsi['everyday_sale']); //庫存天數
$goods_sn['day'] = "";
//庫存天數
$goods_sn['nums'] = $skuinfos[$s_key];
$goods_sn['is_scan'] = $eosr_arr[0]['isScan'] == 1 ? "已掃描" : "未掃描";
//$eg = GroupRouteModel::getSkuPosition("where a.sku='$sku'");
$goods_sn['gl'] = $now_pname;
self::$errCode = "400";
self::$errMsg = '成功搜索該料號信息!' . $sku;
return $goods_sn;
}
}
示例8: 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'];
//.........這裏部分代碼省略.........
示例9: act_pda_loading_express
public function act_pda_loading_express()
{
$userId = $_SESSION['userId'];
$packageId = trim($_POST['order_group']);
//發貨單號1000013
//這裏是裝車掃描快遞的
$shipOrderId = $packageId;
$where = "where id ='{$shipOrderId}'";
$order = orderPartionModel::selectOrder($where);
if (!$order) {
self::$errCode = 0;
self::$errMsg = "此發貨單不存在!";
return false;
}
if ($order[0]['isExpressDelivery'] == 0) {
self::$errCode = 10;
self::$errMsg = "此發貨單為非快遞單號!";
return false;
}
//運輸方式
$shipping = CommonModel::getShipingNameById($order[0]['transportId']);
$no_express_delivery = array('俄速通平郵', '俄速通掛號', '中國郵政平郵', '中國郵政掛號', 'EUB', 'UPS美國專線', 'Global Mail', '香港小包平郵', '香港小包掛號', '德國郵政掛號', '新加坡小包掛號', '新加坡DHL GM平郵', '新加坡DHL GM掛號', '瑞士小包平郵', '瑞士小包掛號', 'USPS FirstClass', 'UPS SurePost', 'UPS Ground Commercia', '比利時小包EU');
if (in_array($shipping, $no_express_delivery)) {
self::$errCode = 604;
self::$errMsg = "此發貨單不是快遞!";
return false;
}
if ($order[0]['orderStatus'] != PKS_WAITING_LOADING) {
self::$errCode = 0;
self::$errMsg = "此發貨單狀態不是在待裝車掃描狀態!";
return false;
}
self::$errCode = '400';
self::$errMsg = '掃描' . $packageId . '成功!';
$res['shipOrderId'] = $shipOrderId;
return $res;
}