Exemple #1
0
 public function act_handSplitOrder()
 {
     global $memc_obj;
     $skus = isset($_POST['skus']) ? $_POST['skus'] : "";
     $orderid = isset($_POST['orderid']) ? $_POST['orderid'] : "";
     $type = isset($_POST['type']) ? $_POST['type'] : "";
     //$userId = $_SESSION['sysUserId'];
     $sku_arr = explode(",", $skus);
     if (empty($orderid)) {
         die(json_encode(array('errCode' => '1', 'status' => 'error', 'errMsg' => '订单号为空')));
     }
     $origin_orderData = M('Order')->getFullUnshippedOrderById(array($orderid));
     if (empty($origin_orderData)) {
         //订单号不存在
         die(json_encode(array('errCode' => '1', 'status' => 'error', 'errMsg' => '拆分失败:' . get_promptmsg(10080))));
     }
     $origin_orderData = $origin_orderData[$orderid];
     $isExpressDelivery = $origin_orderData['order']['isExpressDelivery'];
     if ($isExpressDelivery != 1) {
         $return_result = array('errCode' => '1', 'status' => 'error', 'errMsg' => '非快递订单,禁止手动拆分');
         die(json_encode($return_result));
     }
     $flag = SplitOrderModel::handSplitOrder($orderid, $skus);
     //拆分订单
     if (!$flag) {
         self::$errCode = SplitOrderModel::$errCode;
         self::$errMsg = SplitOrderModel::$errMsg;
         return false;
     }
     self::$errCode = SplitOrderModel::$errCode;
     self::$errMsg = SplitOrderModel::$errMsg;
     return true;
 }
Exemple #2
0
 public function act_handSplitOrder()
 {
     global $memc_obj;
     $skus = isset($_POST['skus']) ? $_POST['skus'] : "";
     $orderid = isset($_POST['orderid']) ? $_POST['orderid'] : "";
     $type = isset($_POST['type']) ? $_POST['type'] : "";
     //$userId = $_SESSION['sysUserId'];
     $sku_arr = explode(",", $skus);
     if (empty($orderid)) {
         self::$errCode = '0061';
         self::$errMsg = "empty orderid";
         return false;
     }
     $flag = SplitOrderModel::handSplitOrder($orderid, $skus);
     //拆分订单
     if (!$flag) {
         self::$errCode = SplitOrderModel::$errCode;
         self::$errMsg = SplitOrderModel::$errMsg;
         return false;
     }
     self::$errCode = SplitOrderModel::$errCode;
     self::$errMsg = SplitOrderModel::$errMsg;
     return true;
 }