Exemple #1
0
void Homepage::sltCj()
{
    if(g_transaction && !g_transaction->networkIsNormal())
    {
        YGMsgBox* box = Utility::msgBox(YGMsgBox::MsgType_Err, trUtf8("错误"), trUtf8("网络出现故障,请稍后再试."), this);
        box->show();
        return;
    }

    if(!checkTerminalConfig())
    {
        return;
    }

    if(g_appStatus & AppStatus_LockControlBoardErr)  // 锁控板模块出错;
    {
        YGMsgBox* box = Utility::msgBox(YGMsgBox::MsgType_Err, trUtf8("错误"), trUtf8("锁控板模块出错,请联系管理员.问题解决后请重启"), this);
        box->show();
        return;
    }

    if(!(g_transaction->terminalConfig().otherCmd&0x02) &&
       (!(g_transaction->terminalConfig().otherCmd&0x04)) &&
       g_transaction->openGateNum())
    {
        DoorOperateDlg *page = new DoorOperateDlg(DoorOperateDlg::DoorOperateType_CloseAll, g_home);
        page->show();
        Utility::pushPage(PageType_None, page);
        return;
    }

    LoginPage *login = new LoginPage(LoginPage::Courier_In ,g_home);
    login->show();
    //Utility::pushPage(PageType_CourierLogIn, login);
    g_pageInfo.push(PageInfo(PageType_CourierLogIn, login));
}
Exemple #2
0
void FetchPage::sltValidFetch()
{
    LoginPage *login = new LoginPage(LoginPage::Receiver_Out ,g_home);
    login->show();
    Utility::pushPage(PageType_ValidCodeFetchPage, login);
}
Exemple #3
0
void Utility::popPage()
{
    int top0 = g_pageInfo.top().type;
    g_pageInfo.pop();
    PageInfo info = g_pageInfo.top();
    if(top0 == PageType_None)
    {
        if(info.type != PageType_None)
        {
            return;
        }
        else
        {
            g_timer = g_pageInfo.top().pWgt->timerLabel();
        }
    }
    switch(info.type)
    {   
    case PageType_CourierLogIn:
        {
            LoginPage *login = new LoginPage(LoginPage::Courier_In ,g_home);
            login->show();
            g_pageInfo.top().pWgt = login;
            break;
        }
    case PageType_CourierPage:
        {
            CourierPage *courierPage = new CourierPage(g_home);
            courierPage->show();
            g_pageInfo.top().pWgt = courierPage;
            break;
        }
    case PageType_CourierVerifyPage:
        {
            CourierVerifyPage *page = new CourierVerifyPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_CourierInPage:
        {
            CourierInPage *page = new CourierInPage(false, g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_FastCourierInPage:
        {
            CourierInPage *page = new CourierInPage(true, g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_CabinetPage:
        {
//            CabinetPage *cabinetPage = new CabinetPage(g_transaction->courier().type, g_home);
//            cabinetPage->show();
//            g_pageInfo.top().pWgt = cabinetPage;
            // 无需处理;
            break;
        }
    case PageType_CourierInDoorOperatePage:
        {
            // 无需处理;
            break;
        }
    case PageType_CourierRechargePayPage:
        {
            break;
        }
    case PageType_FetchPage:
        {
            FetchPage *fetch = new FetchPage(g_home);
            fetch->show();
            g_pageInfo.top().pWgt = fetch;
            break;
        }
    case PageType_WechatQrcFetchPage:
        {
            WechatQrcFetchPage *page = new WechatQrcFetchPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_AppQrcFetchPage:
        {
            AppQrCodeFetchPage *page = new AppQrCodeFetchPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_ValidCodeFetchPage:
        {
            LoginPage *login = new LoginPage(LoginPage::Receiver_Out ,g_home);
            login->show();
            g_pageInfo.top().pWgt = login;
            break;
        }
    case PageType_QueryPage:
        {
            QueryPage *query = new QueryPage(g_home);
            query->show();
            g_pageInfo.top().pWgt = query;
            break;
        }
    case PageType_MailingPage:
        {
            MailPage *page = new MailPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_ReceiverOutDoorOperatePage:
        {
//            DoorOperateDlg *page = new DoorOperateDlg(DoorOperateDlg::DoorOperateType_ReceiverOut, g_home);
//            page->show();
//            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_ChangePasswdPage:
        {
            ModifyPasswdPage *page = new ModifyPasswdPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_None:
        {
            info.pWgt->resetTimerLbl();
            break;
        }
    case PageType_SignupPage:
        {
            SignupPage *signupPage = new SignupPage(g_home);
            signupPage->show();
            g_pageInfo.top().pWgt = signupPage;
            break;
        }
    case PageType_Help:
        {
            HelpPage *helpPage = new HelpPage(g_home);
            helpPage->show();
            g_pageInfo.top().pWgt = helpPage;
        }
    case PageType_Homepage:
    {
            break;
    }
    case PageType_LjHelp:
    {
        YGWidget * wgt =Utility::addImageWgt(QSize(GL_WIDTH, GL_HEIGHT), QPoint(0,0),
                          g_appPath + "/data/pic/mailing/mailingpostinstruction.jpg",
                          g_appPath + "/data/piceng/mailing/mailingpostinstruction.jpg",
                          g_home);
        g_pageInfo.top().pWgt = wgt;
        break;
    }
    case PageType_JjHelp:
    {
        YGWidget * wgt = Utility::addImageWgt(QSize(GL_WIDTH, GL_HEIGHT), QPoint(0,0),
                         g_appPath + "/data/pic/mailing/mailinginstruction.jpg",
                         g_appPath + "/data/piceng/mailing/mailinginstruction.jpg",
                         g_home);
        g_pageInfo.top().pWgt = wgt;
        break;
    }
    default:
        break;
    }
}