|
@@ -28,421 +28,14 @@ void CHuiyuanShoukuanWnd::Notify(TNotifyUI& msg)
|
|
|
{
|
|
{
|
|
|
StartShoukuan();
|
|
StartShoukuan();
|
|
|
}
|
|
}
|
|
|
- else if (msg.pSender->GetName() == L"shoukuan_btn_saomazhifu")
|
|
|
|
|
- {
|
|
|
|
|
- CHorizontalLayoutUI* pFukuanmaLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("fukuan_input_fukuanma_layout")));
|
|
|
|
|
- pFukuanmaLayout->SetVisible(true);
|
|
|
|
|
-
|
|
|
|
|
- CHorizontalLayoutUI* pShoujihaoLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("fukuan_input_shoujihao_layout")));
|
|
|
|
|
- pShoujihaoLayout->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CHorizontalLayoutUI* pShitikaLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("fukuan_input_shitika_layout")));
|
|
|
|
|
- pShitikaLayout->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CButtonUI* pFukuanmaBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("shoukuan_btn_saomazhifu")));
|
|
|
|
|
- pFukuanmaBtn->SetTextColor(0xFF43A947);
|
|
|
|
|
-
|
|
|
|
|
- CButtonUI* pShoujihaoBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("shoukuan_btn_shoujihao")));
|
|
|
|
|
- pShoujihaoBtn->SetTextColor(0xFF555555);
|
|
|
|
|
-
|
|
|
|
|
- CButtonUI* pShitikaBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("shoukuan_btn_shitika")));
|
|
|
|
|
- pShitikaBtn->SetTextColor(0xFF555555);
|
|
|
|
|
-
|
|
|
|
|
- CControlUI* pFukuanmaLine = static_cast<CControlUI*>(m_pm.FindControl(_T("shoukuan_btn_saomazhifu_line")));
|
|
|
|
|
- pFukuanmaLine->SetVisible(true);
|
|
|
|
|
-
|
|
|
|
|
- CControlUI* pShoujihaoLine = static_cast<CControlUI*>(m_pm.FindControl(_T("shoukuan_btn_shoujihao_line")));
|
|
|
|
|
- pShoujihaoLine->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CControlUI* pShitikaLine = static_cast<CControlUI*>(m_pm.FindControl(_T("shoukuan_btn_shitika_line")));
|
|
|
|
|
- pShitikaLine->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- m_shoukuanModel = 1;
|
|
|
|
|
- }
|
|
|
|
|
- else if (msg.pSender->GetName() == L"shoukuan_btn_shoujihao")
|
|
|
|
|
- {
|
|
|
|
|
- CHorizontalLayoutUI* pFukuanmaLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("fukuan_input_fukuanma_layout")));
|
|
|
|
|
- pFukuanmaLayout->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CHorizontalLayoutUI* pShoujihaoLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("fukuan_input_shoujihao_layout")));
|
|
|
|
|
- pShoujihaoLayout->SetVisible(true);
|
|
|
|
|
-
|
|
|
|
|
- CHorizontalLayoutUI* pShitikaLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("fukuan_input_shitika_layout")));
|
|
|
|
|
- pShitikaLayout->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CButtonUI* pFukuanmaBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("shoukuan_btn_saomazhifu")));
|
|
|
|
|
- pFukuanmaBtn->SetTextColor(0xFF555555);
|
|
|
|
|
-
|
|
|
|
|
- CButtonUI* pShoujihaoBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("shoukuan_btn_shoujihao")));
|
|
|
|
|
- pShoujihaoBtn->SetTextColor(0xFF43A947);
|
|
|
|
|
-
|
|
|
|
|
- CButtonUI* pShitikaBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("shoukuan_btn_shitika")));
|
|
|
|
|
- pShitikaBtn->SetTextColor(0xFF555555);
|
|
|
|
|
-
|
|
|
|
|
- CControlUI* pFukuanmaLine = static_cast<CControlUI*>(m_pm.FindControl(_T("shoukuan_btn_saomazhifu_line")));
|
|
|
|
|
- pFukuanmaLine->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CControlUI* pShoujihaoLine = static_cast<CControlUI*>(m_pm.FindControl(_T("shoukuan_btn_shoujihao_line")));
|
|
|
|
|
- pShoujihaoLine->SetVisible(true);
|
|
|
|
|
-
|
|
|
|
|
- CControlUI* pShitikaLine = static_cast<CControlUI*>(m_pm.FindControl(_T("shoukuan_btn_shitika_line")));
|
|
|
|
|
- pShitikaLine->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- m_shoukuanModel = 2;
|
|
|
|
|
-
|
|
|
|
|
- m_pm.SetNextTabControl(false);
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- pShoujihao->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (msg.pSender->GetName() == L"shoukuan_btn_shitika")
|
|
|
|
|
- {
|
|
|
|
|
- CHorizontalLayoutUI* pFukuanmaLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("fukuan_input_fukuanma_layout")));
|
|
|
|
|
- pFukuanmaLayout->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CHorizontalLayoutUI* pShoujihaoLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("fukuan_input_shoujihao_layout")));
|
|
|
|
|
- pShoujihaoLayout->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CHorizontalLayoutUI* pShitikaLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("fukuan_input_shitika_layout")));
|
|
|
|
|
- pShitikaLayout->SetVisible(true);
|
|
|
|
|
-
|
|
|
|
|
- CButtonUI* pFukuanmaBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("shoukuan_btn_saomazhifu")));
|
|
|
|
|
- pFukuanmaBtn->SetTextColor(0xFF555555);
|
|
|
|
|
-
|
|
|
|
|
- CButtonUI* pShoujihaoBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("shoukuan_btn_shoujihao")));
|
|
|
|
|
- pShoujihaoBtn->SetTextColor(0xFF555555);
|
|
|
|
|
-
|
|
|
|
|
- CButtonUI* pShitikaBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("shoukuan_btn_shitika")));
|
|
|
|
|
- pShitikaBtn->SetTextColor(0xFF43A947);
|
|
|
|
|
-
|
|
|
|
|
- CControlUI* pFukuanmaLine = static_cast<CControlUI*>(m_pm.FindControl(_T("shoukuan_btn_saomazhifu_line")));
|
|
|
|
|
- pFukuanmaLine->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CControlUI* pShoujihaoLine = static_cast<CControlUI*>(m_pm.FindControl(_T("shoukuan_btn_shoujihao_line")));
|
|
|
|
|
- pShoujihaoLine->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CControlUI* pShitikaLine = static_cast<CControlUI*>(m_pm.FindControl(_T("shoukuan_btn_shitika_line")));
|
|
|
|
|
- pShitikaLine->SetVisible(true);
|
|
|
|
|
-
|
|
|
|
|
- m_shoukuanModel = 3;
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_1")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"1";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_2")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"2";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_3")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"3";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_4")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"4";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_5")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"5";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_6")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"6";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_7")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"7";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_8")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"8";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_9")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"9";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_0")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason += L"0";
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_x")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason = wsReason.substr(0, wsReason.length() - 1);
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"jianpan_qingkong")
|
|
|
|
|
- {
|
|
|
|
|
- CEditUI* curEdit;
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pShoujihao = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (m_inputType == 1)
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pShoujihao;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curEdit = pPassword;
|
|
|
|
|
- }
|
|
|
|
|
- wstring wsReason = curEdit->GetText();
|
|
|
|
|
-
|
|
|
|
|
- wsReason.clear();
|
|
|
|
|
-
|
|
|
|
|
- curEdit->SetText(wsReason.c_str());
|
|
|
|
|
- curEdit->SetFocus();
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
else if (msg.sType == _T("textchanged"))
|
|
else if (msg.sType == _T("textchanged"))
|
|
|
{
|
|
{
|
|
|
- if (senderName == L"shoujihao_edit")
|
|
|
|
|
- {
|
|
|
|
|
- //只能输入数字,其他的全部删除
|
|
|
|
|
- CEditUI* m_pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- if (!m_pEdit->GetText().IsEmpty())
|
|
|
|
|
- {
|
|
|
|
|
- wstring ws_Value = m_pEdit->GetText();
|
|
|
|
|
- string strValue = CLewaimaiString::UnicodeToUTF8(ws_Value);
|
|
|
|
|
-
|
|
|
|
|
- for (size_t nIndex = 0; nIndex < strValue.length(); nIndex++)
|
|
|
|
|
- {
|
|
|
|
|
- unsigned char tmp = strValue.at(nIndex);
|
|
|
|
|
- if (tmp > 57 || tmp < 48)
|
|
|
|
|
- {
|
|
|
|
|
- //ASCII码不是数字的都过滤掉
|
|
|
|
|
- strValue = strValue.substr(0, nIndex);
|
|
|
|
|
-
|
|
|
|
|
- m_pEdit->SetText(CLewaimaiString::UTF8ToUnicode(strValue).c_str());
|
|
|
|
|
- m_pEdit->SetSel(strValue.length(), strValue.length());//重设给光标设置位置
|
|
|
|
|
-
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- if (senderName == L"password_edit")
|
|
|
|
|
- {
|
|
|
|
|
- //只能输入数字,其他的全部删除
|
|
|
|
|
- CEditUI* m_pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- if (!m_pEdit->GetText().IsEmpty())
|
|
|
|
|
- {
|
|
|
|
|
- wstring ws_Value = m_pEdit->GetText();
|
|
|
|
|
- string strValue = CLewaimaiString::UnicodeToUTF8(ws_Value);
|
|
|
|
|
-
|
|
|
|
|
- for (size_t nIndex = 0; nIndex < strValue.length(); nIndex++)
|
|
|
|
|
- {
|
|
|
|
|
- unsigned char tmp = strValue.at(nIndex);
|
|
|
|
|
- if (tmp > 57 || tmp < 48)
|
|
|
|
|
- {
|
|
|
|
|
- //ASCII码不是数字的都过滤掉
|
|
|
|
|
- strValue = strValue.substr(0, nIndex);
|
|
|
|
|
-
|
|
|
|
|
- m_pEdit->SetText(CLewaimaiString::UTF8ToUnicode(strValue).c_str());
|
|
|
|
|
- m_pEdit->SetSel(strValue.length(), strValue.length());//重设给光标设置位置
|
|
|
|
|
-
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
else if (msg.sType == _T("setfocus"))
|
|
else if (msg.sType == _T("setfocus"))
|
|
|
{
|
|
{
|
|
|
- if (senderName == L"shoujihao_edit")
|
|
|
|
|
- {
|
|
|
|
|
- m_inputType = 1;
|
|
|
|
|
- }
|
|
|
|
|
- else if (senderName == L"password_edit")
|
|
|
|
|
- {
|
|
|
|
|
- m_inputType = 2;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -679,10 +272,7 @@ LRESULT CHuiyuanShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPa
|
|
|
{
|
|
{
|
|
|
if (m_shoukuan_status == 0)
|
|
if (m_shoukuan_status == 0)
|
|
|
{
|
|
{
|
|
|
- if (m_shoukuanModel == 2)
|
|
|
|
|
- {
|
|
|
|
|
- StartShoukuan();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ StartShoukuan();
|
|
|
}
|
|
}
|
|
|
else if (m_shoukuan_status == 1 || m_shoukuan_status == 2 || m_shoukuan_status == 5)
|
|
else if (m_shoukuan_status == 1 || m_shoukuan_status == 2 || m_shoukuan_status == 5)
|
|
|
{
|
|
{
|
|
@@ -695,10 +285,7 @@ LRESULT CHuiyuanShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPa
|
|
|
else if (m_shoukuan_status == 4)
|
|
else if (m_shoukuan_status == 4)
|
|
|
{
|
|
{
|
|
|
//Close(IDCANCEL);
|
|
//Close(IDCANCEL);
|
|
|
- if (m_shoukuanModel == 2)
|
|
|
|
|
- {
|
|
|
|
|
- StartShoukuan();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ StartShoukuan();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
return true;
|
|
@@ -738,13 +325,6 @@ void CHuiyuanShoukuanWnd::InitMoney(std::wstring value)
|
|
|
m_money = value;
|
|
m_money = value;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CHuiyuanShoukuanWnd::InitFukuanma(std::string fukuanma)
|
|
|
|
|
-{
|
|
|
|
|
- m_fukuanma = fukuanma;
|
|
|
|
|
-
|
|
|
|
|
- this->StartShoukuan();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
void CHuiyuanShoukuanWnd::SetCommonParams(std::map<string, string> params)
|
|
void CHuiyuanShoukuanWnd::SetCommonParams(std::map<string, string> params)
|
|
|
{
|
|
{
|
|
|
m_commonParams = params;
|
|
m_commonParams = params;
|
|
@@ -762,30 +342,6 @@ LRESULT CHuiyuanShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM
|
|
|
|
|
|
|
|
bHandled = TRUE;
|
|
bHandled = TRUE;
|
|
|
return 0;
|
|
return 0;
|
|
|
-
|
|
|
|
|
- /*
|
|
|
|
|
- CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
|
|
|
|
|
- paying_layout->SetVisible(false);
|
|
|
|
|
-
|
|
|
|
|
- CVerticalLayoutUI* pay_success_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_success_layout")));
|
|
|
|
|
- pay_success_layout->SetVisible(true);
|
|
|
|
|
-
|
|
|
|
|
- CLabelUI* pMoneyPaySuccess = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_pay_success_money")));
|
|
|
|
|
-
|
|
|
|
|
- std::wstring valueInfo = L"成功收款:¥" + m_money;
|
|
|
|
|
- pMoneyPaySuccess->SetText(valueInfo.c_str());
|
|
|
|
|
-
|
|
|
|
|
- CLabelUI* attention = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_success_attention")));
|
|
|
|
|
- std::wstring ws_attention = L"按任意键关闭窗口," + to_wstring(m_timer_now) + L" 秒后自动关闭";
|
|
|
|
|
- attention->SetText(ws_attention.c_str());
|
|
|
|
|
-
|
|
|
|
|
- SetTimer(m_hWnd, WM_TIMER_WND_CLOSE, 1000, NULL);
|
|
|
|
|
-
|
|
|
|
|
- SetFocus(m_hWnd);
|
|
|
|
|
-
|
|
|
|
|
- bHandled = TRUE;
|
|
|
|
|
- return 0;
|
|
|
|
|
- */
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
LRESULT CHuiyuanShoukuanWnd::OnShoukuanFail(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
|
LRESULT CHuiyuanShoukuanWnd::OnShoukuanFail(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
|
@@ -851,34 +407,6 @@ void CHuiyuanShoukuanWnd::StartShoukuan()
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //先判断收款码的格式是否正确
|
|
|
|
|
- CEditUI* pShoujihaoEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
|
|
|
|
|
- std::wstring ws_Shoujihao = pShoujihaoEdit->GetText();
|
|
|
|
|
- m_shoujihao = CLewaimaiString::UnicodeToUTF8(ws_Shoujihao);
|
|
|
|
|
-
|
|
|
|
|
- CEditUI* pPasswordEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
|
|
|
|
|
- std::wstring ws_Password = pPasswordEdit->GetText();
|
|
|
|
|
- m_password = CLewaimaiString::UnicodeToUTF8(ws_Password);
|
|
|
|
|
-
|
|
|
|
|
- if (m_shoukuanModel == 2)
|
|
|
|
|
- {
|
|
|
|
|
- if (ws_Shoujihao.length() == 0)
|
|
|
|
|
- {
|
|
|
|
|
- pLabel->SetText(L"手机号不能为空");
|
|
|
|
|
- pLabel->SetVisible(true);
|
|
|
|
|
-
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (ws_Password.length() == 0)
|
|
|
|
|
- {
|
|
|
|
|
- pLabel->SetText(L"密码不能为空");
|
|
|
|
|
- pLabel->SetVisible(true);
|
|
|
|
|
-
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
//全部验证通过,就可以开始修改状态了
|
|
//全部验证通过,就可以开始修改状态了
|
|
|
m_shoukuan_status = 1;
|
|
m_shoukuan_status = 1;
|
|
|
|
|
|
|
@@ -930,105 +458,10 @@ void CHuiyuanShoukuanWnd::StartClose()
|
|
|
void CHuiyuanShoukuanWnd::HandleShoukuan()
|
|
void CHuiyuanShoukuanWnd::HandleShoukuan()
|
|
|
{
|
|
{
|
|
|
//生成随机的order_no
|
|
//生成随机的order_no
|
|
|
-
|
|
|
|
|
m_commonParams["zhifu_type"] = to_string(4);
|
|
m_commonParams["zhifu_type"] = to_string(4);
|
|
|
m_commonParams["zhifu_code"] = "";
|
|
m_commonParams["zhifu_code"] = "";
|
|
|
|
|
|
|
|
- if (m_shoukuanModel == 1)
|
|
|
|
|
- {
|
|
|
|
|
- std::map<string, string> param;
|
|
|
|
|
- param["weixin_password"] = m_fukuanma;
|
|
|
|
|
-
|
|
|
|
|
- //先查询会员信息
|
|
|
|
|
- std::string response;
|
|
|
|
|
-
|
|
|
|
|
- std::string url = "/member/membercheckbyqrcode";
|
|
|
|
|
- bool ret = CZhipuziHttpClient::GetInstance()->Request(url.c_str(), param, response);
|
|
|
|
|
- if (ret == false)
|
|
|
|
|
- {
|
|
|
|
|
- m_shoukuan_status = 4;
|
|
|
|
|
-
|
|
|
|
|
- m_fail_message = L"请求服务器失败,请检查网络设置!";
|
|
|
|
|
-
|
|
|
|
|
- SendMessage(WM_SHOUKUAN_STATUS_FAIL, 0, 0);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- rapidjson::Document document;
|
|
|
|
|
- document.Parse(response.c_str());
|
|
|
|
|
-
|
|
|
|
|
- if (document.HasParseError())
|
|
|
|
|
- {
|
|
|
|
|
- LOG_INFO("parse response error!");
|
|
|
|
|
- m_shoukuan_status = 4;
|
|
|
|
|
-
|
|
|
|
|
- m_fail_message = L"服务器错误";
|
|
|
|
|
-
|
|
|
|
|
- SendMessage(WM_SHOUKUAN_STATUS_FAIL, 0, 0);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!document.HasMember("errcode") || !document.HasMember("errmsg"))
|
|
|
|
|
- {
|
|
|
|
|
- LOG_INFO("json error!");
|
|
|
|
|
- m_shoukuan_status = 4;
|
|
|
|
|
-
|
|
|
|
|
- m_fail_message = L"服务器错误";
|
|
|
|
|
-
|
|
|
|
|
- SendMessage(WM_SHOUKUAN_STATUS_FAIL, 0, 0);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- rapidjson::Value& v_errcode = document["errcode"];
|
|
|
|
|
- int errcode = v_errcode.GetInt();
|
|
|
|
|
- if (errcode != 0)
|
|
|
|
|
- {
|
|
|
|
|
- LOG_INFO("response failed! message:" << document["errmsg"].GetString());
|
|
|
|
|
- m_shoukuan_status = 4;
|
|
|
|
|
-
|
|
|
|
|
- std::string errmsg = document["errmsg"].GetString();
|
|
|
|
|
- m_fail_message = CLewaimaiString::UTF8ToUnicode(errmsg);
|
|
|
|
|
-
|
|
|
|
|
- SendMessage(WM_SHOUKUAN_STATUS_FAIL, 0, 0);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!document.HasMember("data"))
|
|
|
|
|
- {
|
|
|
|
|
- LOG_INFO("json error!");
|
|
|
|
|
- m_shoukuan_status = 4;
|
|
|
|
|
-
|
|
|
|
|
- m_fail_message = L"服务器错误";
|
|
|
|
|
-
|
|
|
|
|
- SendMessage(WM_SHOUKUAN_STATUS_FAIL, 0, 0);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- rapidjson::Value& rows = document["data"]["rows"];
|
|
|
|
|
- if (rows.Size() == 0)
|
|
|
|
|
- {
|
|
|
|
|
- //没找到会员
|
|
|
|
|
- m_shoukuan_status = 4;
|
|
|
|
|
-
|
|
|
|
|
- m_fail_message = L"未找到对应会员信息";
|
|
|
|
|
-
|
|
|
|
|
- SendMessage(WM_SHOUKUAN_STATUS_FAIL, 0, 0);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- std::string member_id = rows[0]["id"].GetString();
|
|
|
|
|
-
|
|
|
|
|
- m_commonParams["member_id"] = member_id;
|
|
|
|
|
- }
|
|
|
|
|
- else if (m_shoukuanModel == 2)
|
|
|
|
|
- {
|
|
|
|
|
- m_commonParams["phone"] = m_shoujihao;
|
|
|
|
|
- m_commonParams["pay_password"] = md5(m_password);
|
|
|
|
|
- }
|
|
|
|
|
- else if (m_shoukuanModel == 3)
|
|
|
|
|
- {
|
|
|
|
|
- m_commonParams["card_identify"] = m_card_identify;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ m_commonParams["member_id"] = m_member_id;
|
|
|
|
|
|
|
|
std::string response;
|
|
std::string response;
|
|
|
|
|
|
|
@@ -1261,16 +694,20 @@ void CHuiyuanShoukuanWnd::ReadShoukuanValue()
|
|
|
//处理键盘捕捉结果
|
|
//处理键盘捕捉结果
|
|
|
void CHuiyuanShoukuanWnd::HandleTextCapture(std::string content)
|
|
void CHuiyuanShoukuanWnd::HandleTextCapture(std::string content)
|
|
|
{
|
|
{
|
|
|
- if (m_shoukuanModel == 1)
|
|
|
|
|
- {
|
|
|
|
|
- m_fukuanma = content;
|
|
|
|
|
-
|
|
|
|
|
- StartShoukuan();
|
|
|
|
|
- }
|
|
|
|
|
- else if (m_shoukuanModel == 3)
|
|
|
|
|
- {
|
|
|
|
|
- m_card_identify = content;
|
|
|
|
|
-
|
|
|
|
|
- StartShoukuan();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+void CHuiyuanShoukuanWnd::SetMemberInfo(std::string member_id, std::string card_no, std::string balance, std::string name, std::string member_level_name)
|
|
|
|
|
+{
|
|
|
|
|
+ m_member_id = member_id;
|
|
|
|
|
+
|
|
|
|
|
+ m_card_no = card_no;
|
|
|
|
|
+ m_member_balance = balance;
|
|
|
|
|
+ m_name = name;
|
|
|
|
|
+ m_member_level_name = member_level_name;
|
|
|
|
|
+
|
|
|
|
|
+ m_pm.FindControl(L"huiyuan_num")->SetText((L"会员卡号:" + CLewaimaiString::UTF8ToUnicode(m_card_no)).c_str());
|
|
|
|
|
+ m_pm.FindControl(L"huiyuan_name")->SetText((L"会员姓名:" + CLewaimaiString::UTF8ToUnicode(m_name)).c_str());
|
|
|
|
|
+ m_pm.FindControl(L"huiyuan_levelname")->SetText((L"会员级别:" + CLewaimaiString::UTF8ToUnicode(m_member_level_name)).c_str());
|
|
|
|
|
+ m_pm.FindControl(L"huiyuan_yue")->SetText((L"当前余额:" + CLewaimaiString::UTF8ToUnicode(m_member_balance)).c_str());
|
|
|
|
|
+}
|