public function act_changeOutOfStockToDispathBill() { $orderids = $_REQUEST['orderids']; if (empty($orderids)) { self::$errCode = "001"; self::$errMsg = "发货单号为空!"; return false; } if (!is_numeric($orderids)) { $tracknumber = $orderids; $info = orderWeighingModel::selectOrderId($tracknumber); if (!$info) { self::$errCode = 501; self::$errMsg = "此跟踪号不存在!"; return false; } $orderids = $info[0]['shipOrderId']; } $orderStatus = ShippingOrderModel::getShippingOrder("orderStatus", " where id='{$orderids}'"); $orderStatus = $orderStatus[0]['orderStatus']; if ($orderStatus == '402' || $orderStatus == '703') { $changeStatus = new printAct(); $changeStatus->act_markUnusual1(); if (empty($ret) || $changeStatus::$errCode != '200') { self::$errCode = $changeStatus::$errCode; self::$errMsg = $changeStatus::$errMsg; return false; //失败 } else { self::$errCode = $changeStatus::$errCode; self::$errMsg = $changeStatus::$errMsg; return true; } } self::$errCode = "002"; self::$errMsg = "非待配货!"; return false; }
/** * printAct::act_abnormalRestore() * 异常发货单恢复 * @return */ public function act_abnormalRestore() { $userId = $_SESSION['userId']; $orderids = isset($_POST['orderids']) ? trim($_POST['orderids']) : ''; if (empty($userId)) { self::$errCode = 0; self::$errMsg = '请重新登录!'; return false; } if (empty($orderids)) { self::$errCode = 0; self::$errMsg = '请选择发货单号!'; return false; } $order_arr = explode(',', $orderids); foreach ($order_arr as $shipOrderId) { $where = "where id={$shipOrderId}"; $order = orderPartionModel::selectOrder($where); if (!$order) { self::$errCode = 0; self::$errMsg .= "此发货单'{$shipOrderId}'不存在!"; continue; } else { $status = PKS_WIQC; $update_result = WhShippingOrderModel::update_shipping_order_by_id("id = '{$shipOrderId}' and is_delete = 0", "orderStatus = '{$status}'"); if ($update_result) { self::$errMsg .= "此发货单'{$shipOrderId}'状态还原为待复核状态!"; } else { self::$errMsg .= "此发货单'{$shipOrderId}'异常恢复失败!"; } } } self::$errCode = 200; self::$errMsg .= '操作完成'; return true; }