Commit 45d59ace2a3a63575e0db28aa4d816e013a78dcf

Authored by liuye
1 parent d4ce78b1

bugfix<central_clearing_system>:#15101&15095

修复临时卡支付时需要输入密码的问题;
下单时增加对库存的检测;
central_clearing_system/ETradeClient.rc
... ... @@ -277,8 +277,8 @@ END
277 277 //
278 278  
279 279 VS_VERSION_INFO VERSIONINFO
280   - FILEVERSION 2,0,0,2
281   - PRODUCTVERSION 2,0,0,2
  280 + FILEVERSION 2,0,0,3
  281 + PRODUCTVERSION 2,0,0,3
282 282 FILEFLAGSMASK 0x3fL
283 283 #ifdef _DEBUG
284 284 FILEFLAGS 0x1L
... ... @@ -295,12 +295,12 @@ BEGIN
295 295 BEGIN
296 296 VALUE "CompanyName", "地利集团【DILI GROUP】"
297 297 VALUE "FileDescription", "电子交易结算综合业务系统"
298   - VALUE "FileVersion", "2.0.0.2"
299   - VALUE "InternalName", "Central-Clearing-System_2.0.1.181024_beta"
  298 + VALUE "FileVersion", "2.0.0.3"
  299 + VALUE "InternalName", "Central-Clearing-System_2.0.3.181029_beta"
300 300 VALUE "LegalCopyright", "(C) 地利集团。 保留所有权利。"
301   - VALUE "OriginalFilename", "Central-Clearing-System_2.0.1.181024_beta"
302   - VALUE "ProductName", "Central-Clearing-System_2.0.1.181024_beta"
303   - VALUE "ProductVersion", "2.0.0.2"
  301 + VALUE "OriginalFilename", "Central-Clearing-System_2.0.3.181029_beta"
  302 + VALUE "ProductName", "Central-Clearing-System_2.0.3.181029_beta"
  303 + VALUE "ProductVersion", "2.0.0.3"
304 304 END
305 305 END
306 306 BLOCK "VarFileInfo"
... ... @@ -341,12 +341,14 @@ BEGIN
341 341  
342 342 IDD_DIALOG_PLACE_ORDER, DIALOG
343 343 BEGIN
  344 + MOCKUP, 1, 50, -25, -30, "C:\Users\WangGY\Desktop\TIM图片20180918183513.png"
344 345 RIGHTMARGIN, 337
345 346 HORZGUIDE, 67
346 347 END
347 348  
348 349 IDD_DIALOG_PAY, DIALOG
349 350 BEGIN
  351 + MOCKUP, 1, 50, -5, -34, "C:\Users\WangGY\Desktop\无标题.png"
350 352 LEFTMARGIN, 7
351 353 RIGHTMARGIN, 222
352 354 TOPMARGIN, 7
... ...
central_clearing_system/ETradeClient/mfc_ui/pay_dlg.cpp
... ... @@ -376,3 +376,4 @@ LRESULT PayDlg::OnSessionExpired(WPARAM wParam, LPARAM lParam)
376 376 Session::Instance().OnValid(); // If login succeeded, recover the session state to be "not expired".
377 377 return 0;
378 378 }
  379 +
... ...
central_clearing_system/ETradeClient/mfc_ui/place_order_dlg.cpp
... ... @@ -30,6 +30,7 @@ PlaceOrderDlg::PlaceOrderDlg(CWnd* pParent /*=NULL*/)
30 30 edit_brush_.CreateSolidBrush(RGB(245, 247, 250));
31 31 comm_id_index_ = 1;
32 32 product_id_ = 0;
  33 + stock_amount_ = 0;
33 34 }
34 35  
35 36 PlaceOrderDlg::~PlaceOrderDlg()
... ... @@ -812,9 +813,9 @@ LRESULT PlaceOrderDlg::OnEditKillFocus(WPARAM wParam, LPARAM lParam)
812 813 {
813 814 ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true);
814 815 }
  816 +
815 817 }
816 818 case IDC_EDIT_PRICE:
817   - case IDC_EDIT_COUNT:
818 819 {
819 820 if (text.IsEmpty())
820 821 {
... ... @@ -833,8 +834,48 @@ LRESULT PlaceOrderDlg::OnEditKillFocus(WPARAM wParam, LPARAM lParam)
833 834 ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(false);
834 835 }
835 836  
836   -
837   -
  837 + break;
  838 + }
  839 + case IDC_EDIT_COUNT:
  840 + {
  841 + if (text.IsEmpty())
  842 + {
  843 + ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true);
  844 + }
  845 + else if (text.Right(1).Compare(L".") == 0)
  846 + {
  847 + ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true);
  848 + }
  849 + else if (!(_ttof(text) > 0))
  850 + {
  851 + ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true);
  852 + }
  853 + else
  854 + {
  855 + CString unit;
  856 + unit_edit_.GetWindowText(unit);
  857 + CString count;
  858 + count_edit_.GetWindowText(count);
  859 + if (unit.Compare(L"1") == 0 && _ttof(count) > stock_amount_)
  860 + {
  861 + SetErrorMsg(CString(L"错误信息:库存不足"));
  862 + ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true);
  863 + }
  864 + else if (unit.Compare(L"2") == 0)
  865 + {
  866 + CString heavy;
  867 + heavy_edit_.GetWindowText(heavy);
  868 + if (_ttof(count) * _ttof(heavy) > stock_amount_)
  869 + {
  870 + SetErrorMsg(CString(L"错误信息:库存不足"));
  871 + ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true);
  872 + }
  873 + }
  874 + else
  875 + {
  876 + ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(false);
  877 + }
  878 + }
838 879 break;
839 880 }
840 881 }
... ... @@ -915,7 +956,11 @@ bool PlaceOrderDlg::GetCardName(CString &amp;num, CString &amp;name, int type)
915 956 {
916 957 PT::ptree card_data = ptree.get_child("data");
917 958 name = str_2_wstr(card_data.get<std::string>("name")).c_str();
918   - buyer_card_type_ = card_data.get<int>("category");
  959 + if (type == 1)
  960 + {
  961 + buyer_card_type_ = card_data.get<int>("category");
  962 + }
  963 +
919 964 }
920 965 else
921 966 {
... ... @@ -1012,6 +1057,7 @@ bool PlaceOrderDlg::GetCommName(CString &amp;num, CString&amp; card, CString &amp;name, long
1012 1057 PT::ptree card_data = ptree.get_child("data");
1013 1058 name = str_2_wstr(card_data.get<std::string>("name")).c_str();
1014 1059 product_id = card_data.get<long>("id");
  1060 + stock_amount_ = card_data.get<double>("stockAmount");
1015 1061 }
1016 1062 else
1017 1063 {
... ...
central_clearing_system/ETradeClient/mfc_ui/place_order_dlg.h
... ... @@ -117,6 +117,7 @@ private:
117 117  
118 118 long product_id_;
119 119 int buyer_card_type_;
  120 + double stock_amount_;
120 121  
121 122 std::vector<CommInfo> comm_vec_;
122 123 int comm_id_index_;
... ...
central_clearing_system/out/Win32/综合业务系统.zip deleted 100644 → 0
No preview for this file type