Example #1
0
 $this->CheckDataRight($chips);
 if (!biz_checkChipsStatus($chips, 7)) {
     message('未打印订金不能确认!', $this->createWebUrl($do), 'info');
 }
 //定单是否已确认
 $confirmed = biz_checkChipsStatus($chips, 8);
 $user_info = $chips['user'];
 if (checksubmit() && !$confirmed) {
     //定单没有确认,
     load()->web('app');
     $room = db_getRoomByGUID($chips['roomguid']);
     if (!empty($room)) {
         if ($room['Status'] == '交款') {
             $room['NewStatus'] = '认购';
             //4强制更新状态?
             APP_updateRoomStatus($room, $chips, 2);
         }
         if (empty($chips['ProtocolNO'])) {
             load()->web('print');
             biz_updateChipsProtocolNo($chips);
         }
         if (biz_insertFee($chips, $room)) {
             //更新状态为确认
             db_updateChipsStatus($chips['id'], 8);
             message('认购确定,生成供款明细成功!', $this->createWebUrl($do));
         } else {
             message('生成供款明细失败!', $this->createWebUrl($do));
         }
     } else {
         message('无效的房间数据!', $this->createWebUrl($do));
     }
Example #2
0
}
if ($func == 'nei_unselect_room') {
    $res['msg'] = '';
    //选房过期未交款;内控退房
    $room = APP_getRoomStatus($params['projguid'], $params['bldguid'], $params['roomguid']);
    //检查超时 ,状态为超时
    if (!empty($room) && !empty($room['ChooseRoomCstName'])) {
        $chips = db_getChipsByRoom($room);
        //        if (!empty($chips) && ($chips['printstatus'] >= 4)) {
        //            $res['msg'] = '房间对应认筹单已认购不能退房';
        //            returnJson($res);
        //        }
        if ($room['Status'] == '超时') {
            //认筹单没有选房
            $room['NewStatus'] = '待售';
            if (APP_updateRoomStatus($room, $chips, 0)) {
                $res['result'] = true;
                $res['msg'] = '退房成功';
            } else {
                $res['msg'] = '退房失败';
            }
        } else {
            $res['msg'] = '此单非超时状态,不能退房';
        }
    } else {
        $res['msg'] = '无效的房间信息';
    }
    returnJson($res);
}
if ($func == 'changestatus') {
    $res['msg'] = '';