示例#1
0
 function act_getGroupInfo()
 {
     $userId = $_SESSION['userId'];
     $shipOrderGroup = $_POST['order_group'];
     $group_sql = WhGoodsAssignModel::getOrderGroup("*", array('assignNumber' => $shipOrderGroup));
     //var_dump($group_sql);exit;
     if (empty($group_sql)) {
         self::$errCode = "003";
         self::$errMsg = "该调拨单号不存在,请重新输入!";
         return false;
     } else {
         if ($group_sql[0]['status'] != 102) {
             self::$errCode = "003";
             self::$errMsg = "该调拨单不在出库复核状态!";
             return false;
         }
         $scan_sql = WhGoodsAssignModel::getDetail($group_sql[0]['id'], ' and a.scanUid !=0 and a.checkUid = 0');
         if (empty($scan_sql)) {
             if ($group_sql[0]['status'] == 102) {
                 $where = array('id' => $group_sql[0]['id']);
                 $status = array('status' => 103, 'statusTime' => time());
                 WhGoodsAssignModel::updateAssignListStatus($where, $status);
             }
             self::$errCode = "003";
             self::$errMsg = "该调拨单出库复核已完成,请扫描其他清单!";
             return false;
         } else {
             self::$errMsg = "请扫描该配货清单下的料号!";
             return array('group_id' => $group_sql[0]['id']);
         }
     }
 }
示例#2
0
 function act_getGroupInfo()
 {
     $userId = $_SESSION['userId'];
     $shipOrderGroup = $_POST['order_group'];
     $group_sql = WhGoodsAssignModel::getOrderGroup("*", array('assignNumber' => $shipOrderGroup));
     //var_dump($group_sql);exit;
     if (empty($group_sql)) {
         self::$errCode = "001";
         self::$errMsg = "该调拨单号不存在,请重新输入!";
         return false;
     }
     if ($group_sql[0]['status'] != 106) {
         self::$errCode = "002";
         self::$errMsg = "调拨单只有在接收复核后才可完结!";
         return false;
     }
     $orderIds = WhGoodsAssignModel::getAssignOrderIds($group_sql[0]['id']);
     if (!$orderIds) {
         self::$errCode = "003";
         self::$errMsg = "该调拨单下没有关联的B仓订单!";
         return false;
     }
     $ids = array();
     foreach ($orderIds as $id) {
         $ids[] = $id['orderId'];
     }
     TransactionBaseModel::begin();
     //更新调拨单状态
     $info = WhGoodsAssignModel::updateAssignListStatus(array('id' => $group_sql[0]['id']), array('status' => 107));
     if (!$info) {
         self::$errCode = "004";
         self::$errMsg = "更新调拨单状态失败!";
         TransactionBaseModel::rollback();
         return false;
     }
     $ids = implode(',', $ids);
     $info = CommonModel::updateOrderStatus($ids, 745);
     if ($info['errCode'] != 200) {
         self::$errCode = "004";
         self::$errMsg = "同步旧ERP订单状态失败!";
         TransactionBaseModel::rollback();
         return false;
     }
     self::$errCode = "0";
     self::$errMsg = "调拨单完结成功!";
     TransactionBaseModel::commit();
     return TRUE;
 }
示例#3
0
 function act_getGroupInfo()
 {
     $userId = $_SESSION['userId'];
     $shipOrderGroup = $_POST['order_group'];
     $group_sql = WhGoodsAssignModel::getOrderGroup("*", array('assignNumber' => $shipOrderGroup));
     //var_dump($group_sql);exit;
     if (empty($group_sql)) {
         self::$errCode = "003";
         self::$errMsg = "该调拨单号不存在,请重新输入!";
         return false;
     } else {
         if ($group_sql[0]['status'] != 104) {
             self::$errCode = "003";
             self::$errMsg = "该调拨单不在待出库状态!";
             return false;
         }
         if ($group_sql[0]['status'] == 105) {
             self::$errCode = "0";
             self::$errMsg = "该调拨单已完成出库扫描,请扫描其他清单!";
             return false;
         }
         //$sku_info = WhGoodsAssignModel::getDetail( $group_sql[0]['id'] ," and a.checkUid = 0");
         //    		if(!empty($sku_info)){
         //    			self::$errCode = "004";
         //    			self::$errMsg  = "该调拨单仍有料号未复核!";
         //    			return FALSE;
         //    		}else{
         $where = array('id' => $group_sql[0]['id']);
         $update = array('status' => 105, 'statusTime' => time());
         $sku_info = WhGoodsAssignModel::updateAssignListStatus($where, $update);
         if (!$sku_info) {
             self::$errCode = "004";
             self::$errMsg = "调拨单出库状态变更失败!";
             return FALSE;
         } else {
             self::$errCode = "0";
             self::$errMsg = "调拨清单出库成功!";
             return TRUE;
         }
         //}
     }
 }
 function act_getGroupInfo()
 {
     $userId = $_SESSION['userId'];
     $shipOrderGroup = $_POST['order_group'];
     $group_sql = WhGoodsAssignModel::getOrderGroup("*", array('assignNumber' => $shipOrderGroup));
     //var_dump($group_sql);exit;
     if (empty($group_sql)) {
         self::$errCode = "003";
         self::$errMsg = "该调拨单号不存在,请重新输入!";
         return false;
     } else {
         if (in_array($group_sql[0]['status'], array(100))) {
             self::$errCode = "003";
             self::$errMsg = "该调拨单不在可退库状态!";
             return false;
         }
         self::$errMsg = "请扫描该要退库的料号!";
         return array('group_id' => $group_sql[0]['id']);
     }
 }
示例#5
0
 function act_endAssignList()
 {
     $assignNumber = $_POST['group'] ? $_POST['group'] : 0;
     //$goodsAssignId      =  intval($goodsAssignId);
     if (!$assignNumber) {
         self::$errCode = "014";
         self::$errMsg = "请输入调拨单号!";
         return false;
     }
     $assingInfo = WhGoodsAssignModel::getOrderGroup('id, status', array('assignNumber' => $assignNumber));
     if (empty($assingInfo)) {
         self::$errCode = "014";
         self::$errMsg = "该调拨单不存在!";
         return false;
     }
     if ($assingInfo[0]['status'] != 101) {
         self::$errCode = "015";
         self::$errMsg = "该调拨单不是待配货状态!";
         return FALSE;
     }
     $where = array('id' => $assingInfo[0]['id']);
     $update = array('status' => 102, 'statusTime' => time());
     $info = WhGoodsAssignModel::updateAssignListStatus($where, $update);
     if (!$info) {
         self::$errCode = "016";
         self::$errMsg = "更新调拨单状态失败!";
         return FALSE;
     } else {
         self::$errCode = "0";
         self::$errMsg = "该调拨单已完成配货,请输入下一调拨单号!";
         return TRUE;
     }
 }
 /**
  * InCheckPdaAssignListAct::act_inCheckEnd()
  * 调拨单接收复核完成变更状态 
  * @return void
  */
 function act_inCheckEnd()
 {
     $assignNumber = trim($_POST['group_id']);
     if (!preg_match("/AN\\d{8}/", $assignNumber)) {
         self::$errCode = '001';
         self::$errMsg = '请不要输入非调拨单号!';
         return FALSE;
     }
     $group_sql = WhGoodsAssignModel::getOrderGroup("id, status", array('assignNumber' => $assignNumber));
     if (empty($group_sql)) {
         self::$errCode = '002';
         self::$errMsg = '没有该调拨单号!';
         return FALSE;
     }
     //print_r($group_sql);exit;
     if ($group_sql[0]['status'] != 105) {
         self::$errCode = '003';
         self::$errMsg = '该调拨单不在接收复核状态!';
         return FALSE;
     }
     $assignId = $group_sql[0]['id'];
     //$assignDetail       =   WhGoodsAssignModel::getDetail($assignId, ' and inCheckNum = 0');
     //        if(empty($assignDetail)){
     //
     //        }
     $where = array('id' => $assignId);
     $update = array('status' => 106, 'statusTime' => time());
     $info = WhGoodsAssignModel::updateAssignListStatus($where, $update);
     if ($info) {
         self::$errCode = '200';
         self::$errMsg = '该调拨单复核接收完成!';
         return TRUE;
     } else {
         self::$errCode = '004';
         self::$errMsg = '该调拨单复核接收完成!';
         return FALSE;
     }
 }