Commit 6ed3258a92eab89f2537d2dc26ca59293fc56366
1 parent
3dae8957
feat<central_clearing_system>:完成下单流程和打印功能的调试
喜大普奔!!!
Showing
21 changed files
with
171 additions
and
75 deletions
central_clearing_system/Config/application_config.json
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | "pwd_machine_port": 54102, | 4 | "pwd_machine_port": 54102, |
5 | "pwd_machine_timeout": 10000, | 5 | "pwd_machine_timeout": 10000, |
6 | "pin_pad_pwd_len": 6, | 6 | "pin_pad_pwd_len": 6, |
7 | - "pin_pad_timeout": 2, | 7 | + "pin_pad_timeout": 30, |
8 | "client_cert_store": "MY", | 8 | "client_cert_store": "MY", |
9 | "client_cert_subject": "*.diligrp.com", | 9 | "client_cert_subject": "*.diligrp.com", |
10 | "client_cert_filename": "", | 10 | "client_cert_filename": "", |
central_clearing_system/Config/url_cfg.json
1 | { | 1 | { |
2 | "protocol": "http", | 2 | "protocol": "http", |
3 | "host": "xtrade.esc.diligrp.com", | 3 | "host": "xtrade.esc.diligrp.com", |
4 | - "port": 8080, | 4 | + "port": 8082, |
5 | "main_path": "/iset/oauth/clientInitMain.iset", | 5 | "main_path": "/iset/oauth/clientInitMain.iset", |
6 | "login_path": "/iset/oauth/login.auth", | 6 | "login_path": "/iset/oauth/login.auth", |
7 | "logout_path": "/iset/oauth/logout.auth", | 7 | "logout_path": "/iset/oauth/logout.auth", |
central_clearing_system/ETradeClient.rc
@@ -148,9 +148,14 @@ IDR_ACCELERATOR_ORDER ACCELERATORS | @@ -148,9 +148,14 @@ IDR_ACCELERATOR_ORDER ACCELERATORS | ||
148 | BEGIN | 148 | BEGIN |
149 | VK_DOWN, ID_ACCELERATOR_DOWN, VIRTKEY, NOINVERT | 149 | VK_DOWN, ID_ACCELERATOR_DOWN, VIRTKEY, NOINVERT |
150 | VK_RETURN, ID_ACCELERATOR_ENTER, VIRTKEY, NOINVERT | 150 | VK_RETURN, ID_ACCELERATOR_ENTER, VIRTKEY, NOINVERT |
151 | + VK_F11, ID_ACCELERATOR_F11, VIRTKEY, NOINVERT | ||
151 | VK_TAB, ID_ACCELERATOR_TAB, VIRTKEY, NOINVERT | 152 | VK_TAB, ID_ACCELERATOR_TAB, VIRTKEY, NOINVERT |
152 | VK_UP, ID_ACCELERATOR_UP, VIRTKEY, NOINVERT | 153 | VK_UP, ID_ACCELERATOR_UP, VIRTKEY, NOINVERT |
153 | - VK_F11, ID_ACCELERATOR_F11, VIRTKEY, NOINVERT | 154 | + "S", ID_ACCELERATOR_S, VIRTKEY, NOINVERT |
155 | + "S", ID_ACCELERATOR_ALT_S, VIRTKEY, ALT, NOINVERT | ||
156 | + "A", ID_ACCELERATOR_A, VIRTKEY, NOINVERT | ||
157 | + "F", ID_ACCELERATOR_F, VIRTKEY, NOINVERT | ||
158 | + "X", ID_ACCELERATOR_X, VIRTKEY, NOINVERT | ||
154 | END | 159 | END |
155 | 160 | ||
156 | 161 | ||
@@ -259,7 +264,7 @@ BEGIN | @@ -259,7 +264,7 @@ BEGIN | ||
259 | LTEXT "",IDC_PAY_STATIC_MONEY,73,20,8,8 | 264 | LTEXT "",IDC_PAY_STATIC_MONEY,73,20,8,8 |
260 | LTEXT "密 码:",IDC_PAY_STATIC_PASSWORD,18,50,31,8 | 265 | LTEXT "密 码:",IDC_PAY_STATIC_PASSWORD,18,50,31,8 |
261 | EDITTEXT IDC_PAY_EDIT_PASSWORD,56,46,40,14,ES_PASSWORD | ES_AUTOHSCROLL | 266 | EDITTEXT IDC_PAY_EDIT_PASSWORD,56,46,40,14,ES_PASSWORD | ES_AUTOHSCROLL |
262 | - PUSHBUTTON "输入密码(&A)",IDC_PAY_BUTTON_PASSWORD,151,51,71,18 | 267 | + PUSHBUTTON "输入密码(&X)",IDC_PAY_BUTTON_PASSWORD,151,51,71,18 |
263 | PUSHBUTTON "关闭(&S)",IDC_PAY_BUTTON_CLOSE,155,94,67,17 | 268 | PUSHBUTTON "关闭(&S)",IDC_PAY_BUTTON_CLOSE,155,94,67,17 |
264 | PUSHBUTTON "付款(&F)",IDC_PAY_BUTTON_PAY,72,94,67,17 | 269 | PUSHBUTTON "付款(&F)",IDC_PAY_BUTTON_PAY,72,94,67,17 |
265 | LTEXT "",IDC_PAY_STATIC_REAL_MONEY,65,20,57,8 | 270 | LTEXT "",IDC_PAY_STATIC_REAL_MONEY,65,20,57,8 |
@@ -337,6 +342,7 @@ BEGIN | @@ -337,6 +342,7 @@ BEGIN | ||
337 | 342 | ||
338 | IDD_DIALOG_PLACE_ORDER, DIALOG | 343 | IDD_DIALOG_PLACE_ORDER, DIALOG |
339 | BEGIN | 344 | BEGIN |
345 | + MOCKUP, 1, 50, -25, -30, "C:\Users\WangGY\Desktop\TIM图片20180918183513.png" | ||
340 | RIGHTMARGIN, 337 | 346 | RIGHTMARGIN, 337 |
341 | HORZGUIDE, 67 | 347 | HORZGUIDE, 67 |
342 | END | 348 | END |
central_clearing_system/ETradeClient/hardware/hardware_cmd.cpp
@@ -1327,7 +1327,7 @@ int StylusPrinterCmd::Print(std::vector<OrderInfo> &order_vector) | @@ -1327,7 +1327,7 @@ int StylusPrinterCmd::Print(std::vector<OrderInfo> &order_vector) | ||
1327 | const int NormalPageCommCount = 10; //非第一页和最后一页,其他页的商品数目 | 1327 | const int NormalPageCommCount = 10; //非第一页和最后一页,其他页的商品数目 |
1328 | const int LastPageCommCount = 9; //最后一页最多商品数量 | 1328 | const int LastPageCommCount = 9; //最后一页最多商品数量 |
1329 | 1329 | ||
1330 | - const int TitleCtrlHIBig = 900; //表头不同组别控件横向间隔 | 1330 | + const int TitleCtrlHIBig = 700; //表头不同组别控件横向间隔 |
1331 | const int TitleCtrlHISmall = 150; //表头同组别控件横向间隔 | 1331 | const int TitleCtrlHISmall = 150; //表头同组别控件横向间隔 |
1332 | const int TitleCtrlVI = 50; //表头控件纵向间隔 | 1332 | const int TitleCtrlVI = 50; //表头控件纵向间隔 |
1333 | const int LineStartX = 100; //横线起点x坐标 | 1333 | const int LineStartX = 100; //横线起点x坐标 |
@@ -1542,22 +1542,22 @@ std::string StylusPrinterCmd::ParseInput(std::string &input, std::vector<OrderIn | @@ -1542,22 +1542,22 @@ std::string StylusPrinterCmd::ParseInput(std::string &input, std::vector<OrderIn | ||
1542 | { | 1542 | { |
1543 | OrderInfo order; | 1543 | OrderInfo order; |
1544 | order.doc_name = title.c_str(); | 1544 | order.doc_name = title.c_str(); |
1545 | - order.statements_no = str_2_wstr(v.second.get<std::string>(JSON_TAG_STATEMENT_ID)).c_str(); | ||
1546 | - order.trade_time = str_2_wstr(v.second.get<std::string>(JSON_TAG_TRADE_TIME)).c_str(); | ||
1547 | - order.buyer_name = str_2_wstr(v.second.get<std::string>(JSON_TAG_TRADE_BUYER_NAME)).c_str(); | ||
1548 | - order.seller_name = str_2_wstr(v.second.get<std::string>(JSON_TAG_TRADE_SELLER_NAME)).c_str(); | ||
1549 | - order.settlement_clerk = str_2_wstr(v.second.get<std::string>(JSON_TAG_TRADE_USER_NAME)).c_str(); | ||
1550 | - order.total_money = str_2_wstr(v.second.get<std::string>(JSON_TAG_TRADE_TOTAL_MONEY)).c_str(); | 1545 | + order.statements_no = v.second.get<std::string>(JSON_TAG_STATEMENT_ID).c_str(); |
1546 | + order.trade_time = v.second.get<std::string>(JSON_TAG_TRADE_TIME).c_str(); | ||
1547 | + order.buyer_name = v.second.get<std::string>(JSON_TAG_TRADE_BUYER_NAME).c_str(); | ||
1548 | + order.seller_name = v.second.get<std::string>(JSON_TAG_TRADE_SELLER_NAME).c_str(); | ||
1549 | + order.settlement_clerk = v.second.get<std::string>(JSON_TAG_TRADE_USER_NAME).c_str(); | ||
1550 | + order.total_money = v.second.get<std::string>(JSON_TAG_TRADE_TOTAL_MONEY).c_str(); | ||
1551 | 1551 | ||
1552 | PT::ptree products_ptree = v.second.get_child(JSON_TAG_TRADE_PRODUCTS); | 1552 | PT::ptree products_ptree = v.second.get_child(JSON_TAG_TRADE_PRODUCTS); |
1553 | BOOST_FOREACH(PT::ptree::value_type &v, products_ptree) | 1553 | BOOST_FOREACH(PT::ptree::value_type &v, products_ptree) |
1554 | { | 1554 | { |
1555 | CommInfo comm_info; | 1555 | CommInfo comm_info; |
1556 | comm_info.comm_id = v.second.get<long>(JSON_TAG_ORDER_ID); | 1556 | comm_info.comm_id = v.second.get<long>(JSON_TAG_ORDER_ID); |
1557 | - comm_info.comm_name = str_2_wstr(v.second.get<std::string>(JSON_TAG_PRODUCT_NAME)).c_str(); | ||
1558 | - comm_info.price = str_2_wstr(v.second.get<std::string>(JSON_TAG_PRICE)).c_str(); | ||
1559 | - comm_info.count = str_2_wstr(v.second.get<std::string>(JSON_TAG_AMOUNT)).c_str(); | ||
1560 | - comm_info.total_money = str_2_wstr(v.second.get<std::string>(JSON_TAG_MONEY)).c_str(); | 1557 | + comm_info.comm_name = v.second.get<std::string>(JSON_TAG_PRODUCT_NAME).c_str(); |
1558 | + comm_info.price = v.second.get<std::string>(JSON_TAG_PRICE).c_str(); | ||
1559 | + comm_info.count = v.second.get<std::string>(JSON_TAG_AMOUNT).c_str(); | ||
1560 | + comm_info.total_money = v.second.get<std::string>(JSON_TAG_MONEY).c_str(); | ||
1561 | order.comm_vector.push_back(comm_info); | 1561 | order.comm_vector.push_back(comm_info); |
1562 | } | 1562 | } |
1563 | order_vector.push_back(order); | 1563 | order_vector.push_back(order); |
central_clearing_system/ETradeClient/hardware/hardware_cmd.h
@@ -123,7 +123,7 @@ public: | @@ -123,7 +123,7 @@ public: | ||
123 | virtual Reply Execute(const std::string& input) override; | 123 | virtual Reply Execute(const std::string& input) override; |
124 | 124 | ||
125 | private: | 125 | private: |
126 | - bool ParseInput(std::string &input, std::vector<OrderInfo> &order_vector); | 126 | + std::string ParseInput(std::string &input, std::vector<OrderInfo> &order_vector); |
127 | int Print(std::vector<OrderInfo> &order_vector); | 127 | int Print(std::vector<OrderInfo> &order_vector); |
128 | }; | 128 | }; |
129 | // | 129 | // |
central_clearing_system/ETradeClient/mfc_ui/ETradeClient.cpp
@@ -55,7 +55,7 @@ LONG WINAPI ExceptionHandler(PEXCEPTION_POINTERS ExceptionPointer) | @@ -55,7 +55,7 @@ LONG WINAPI ExceptionHandler(PEXCEPTION_POINTERS ExceptionPointer) | ||
55 | stuDump.ThreadId = GetCurrentThreadId(); | 55 | stuDump.ThreadId = GetCurrentThreadId(); |
56 | stuDump.ExceptionPointers = ExceptionPointer; | 56 | stuDump.ExceptionPointers = ExceptionPointer; |
57 | stuDump.ClientPointers = FALSE; | 57 | stuDump.ClientPointers = FALSE; |
58 | - MINIDUMP_TYPE emDumpType = MiniDumpWithFullMemory; | 58 | + MINIDUMP_TYPE emDumpType = MiniDumpNormal; |
59 | BOOL bCreateDump = MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, emDumpType, (ExceptionPointer != 0) ? &stuDump : 0, 0, 0); | 59 | BOOL bCreateDump = MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, emDumpType, (ExceptionPointer != 0) ? &stuDump : 0, 0, 0); |
60 | 60 | ||
61 | if (!bCreateDump) | 61 | if (!bCreateDump) |
@@ -79,7 +79,7 @@ LONG WINAPI ExceptionHandler(PEXCEPTION_POINTERS ExceptionPointer) | @@ -79,7 +79,7 @@ LONG WINAPI ExceptionHandler(PEXCEPTION_POINTERS ExceptionPointer) | ||
79 | 79 | ||
80 | // Replace application ID string below with unique ID string; recommended | 80 | // Replace application ID string below with unique ID string; recommended |
81 | // format for string is CompanyName.ProductName.SubProduct.VersionInformation | 81 | // format for string is CompanyName.ProductName.SubProduct.VersionInformation |
82 | -static const wchar_t* APP_ID = L"DILIGROUP.CentralClearingSystem.V1.0"; | 82 | +static const wchar_t* APP_ID = L"DILIGROUP.CentralClearingSystem.V2.0"; |
83 | 83 | ||
84 | 84 | ||
85 | // CETradeClientApp | 85 | // CETradeClientApp |
central_clearing_system/ETradeClient/mfc_ui/GridCellBase.cpp
@@ -77,7 +77,7 @@ void CGridCellBase::Reset() | @@ -77,7 +77,7 @@ void CGridCellBase::Reset() | ||
77 | m_MergeCellID.row=-1; | 77 | m_MergeCellID.row=-1; |
78 | m_MergeCellID.col=-1; | 78 | m_MergeCellID.col=-1; |
79 | 79 | ||
80 | - product_id.clear(); | 80 | + product_id = 0; |
81 | data_id = 0; | 81 | data_id = 0; |
82 | } | 82 | } |
83 | //Used for merge cells,remove const | 83 | //Used for merge cells,remove const |
central_clearing_system/ETradeClient/mfc_ui/GridCellBase.h
central_clearing_system/ETradeClient/mfc_ui/GridCtrl.cpp
@@ -4625,7 +4625,7 @@ BOOL CGridCtrl::GetItem(GV_ITEM* pItem) | @@ -4625,7 +4625,7 @@ BOOL CGridCtrl::GetItem(GV_ITEM* pItem) | ||
4625 | return TRUE; | 4625 | return TRUE; |
4626 | } | 4626 | } |
4627 | 4627 | ||
4628 | -BOOL CGridCtrl::SetItemText(int nRow, int nCol, LPCTSTR str, int data_id, std::string product_id) | 4628 | +BOOL CGridCtrl::SetItemText(int nRow, int nCol, LPCTSTR str, int data_id, long product_id) |
4629 | { | 4629 | { |
4630 | if (GetVirtualMode()) | 4630 | if (GetVirtualMode()) |
4631 | return FALSE; | 4631 | return FALSE; |
central_clearing_system/ETradeClient/mfc_ui/GridCtrl.h
@@ -366,7 +366,7 @@ public: | @@ -366,7 +366,7 @@ public: | ||
366 | 366 | ||
367 | BOOL SetItem(const GV_ITEM* pItem); | 367 | BOOL SetItem(const GV_ITEM* pItem); |
368 | BOOL GetItem(GV_ITEM* pItem); | 368 | BOOL GetItem(GV_ITEM* pItem); |
369 | - BOOL SetItemText(int nRow, int nCol, LPCTSTR str, int data_id = 0, std::string product_id = ""); | 369 | + BOOL SetItemText(int nRow, int nCol, LPCTSTR str, int data_id = 0, long product_id = 0); |
370 | // The following was virtual. If you want to override, use | 370 | // The following was virtual. If you want to override, use |
371 | // CGridCellBase-derived class's GetText() to accomplish same thing | 371 | // CGridCellBase-derived class's GetText() to accomplish same thing |
372 | CString GetItemText(int nRow, int nCol) const; | 372 | CString GetItemText(int nRow, int nCol) const; |
central_clearing_system/ETradeClient/mfc_ui/etrade_edit_control.cpp
@@ -221,6 +221,17 @@ bool CEditBox::CheckHeavy(CString heavy) | @@ -221,6 +221,17 @@ bool CEditBox::CheckHeavy(CString heavy) | ||
221 | result = false; | 221 | result = false; |
222 | break; | 222 | break; |
223 | } | 223 | } |
224 | + | ||
225 | + //首位为0时,次首位只能是小数点 | ||
226 | + if (length == 2 && heavy.Left(1) == "0") | ||
227 | + { | ||
228 | + if (heavy.Right(1) != ".") | ||
229 | + { | ||
230 | + result = false; | ||
231 | + break; | ||
232 | + } | ||
233 | + } | ||
234 | + | ||
224 | //只有一个小数点 | 235 | //只有一个小数点 |
225 | if (heavy.Replace(L".", L".") > 1) | 236 | if (heavy.Replace(L".", L".") > 1) |
226 | { | 237 | { |
@@ -272,6 +283,17 @@ bool CEditBox::CheckPrice(CString price) | @@ -272,6 +283,17 @@ bool CEditBox::CheckPrice(CString price) | ||
272 | result = false; | 283 | result = false; |
273 | break; | 284 | break; |
274 | } | 285 | } |
286 | + | ||
287 | + //首位为0时,次首位只能是小数点 | ||
288 | + if (length == 2 && price.Left(1) == "0") | ||
289 | + { | ||
290 | + if (price.Right(1) != ".") | ||
291 | + { | ||
292 | + result = false; | ||
293 | + break; | ||
294 | + } | ||
295 | + } | ||
296 | + | ||
275 | //只有一个小数点 | 297 | //只有一个小数点 |
276 | if (price.Replace(L".", L".") > 1) | 298 | if (price.Replace(L".", L".") > 1) |
277 | { | 299 | { |
central_clearing_system/ETradeClient/mfc_ui/pay_dlg.cpp
@@ -56,6 +56,9 @@ BEGIN_MESSAGE_MAP(PayDlg, CDialogEx) | @@ -56,6 +56,9 @@ BEGIN_MESSAGE_MAP(PayDlg, CDialogEx) | ||
56 | ON_BN_CLICKED(IDC_PAY_BUTTON_PAY, &PayDlg::OnBnClickedPayButtonPay) | 56 | ON_BN_CLICKED(IDC_PAY_BUTTON_PAY, &PayDlg::OnBnClickedPayButtonPay) |
57 | ON_WM_CTLCOLOR() | 57 | ON_WM_CTLCOLOR() |
58 | ON_BN_CLICKED(IDC_PAY_BUTTON_PASSWORD, &PayDlg::OnBnClickedPayButtonPassword) | 58 | ON_BN_CLICKED(IDC_PAY_BUTTON_PASSWORD, &PayDlg::OnBnClickedPayButtonPassword) |
59 | + ON_COMMAND(ID_ACCELERATOR_A, &PayDlg::OnBnClickedPayButtonPassword) | ||
60 | + ON_COMMAND(ID_ACCELERATOR_F, &PayDlg::OnBnClickedPayButtonPay) | ||
61 | + ON_COMMAND(ID_ACCELERATOR_X, &PayDlg::OnBnClickedPayButtonClose) | ||
59 | END_MESSAGE_MAP() | 62 | END_MESSAGE_MAP() |
60 | 63 | ||
61 | 64 | ||
@@ -82,6 +85,8 @@ BOOL PayDlg::OnInitDialog() | @@ -82,6 +85,8 @@ BOOL PayDlg::OnInitDialog() | ||
82 | password_button_.ShowWindow(SW_SHOW); | 85 | password_button_.ShowWindow(SW_SHOW); |
83 | } | 86 | } |
84 | 87 | ||
88 | + acce_ = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR_ORDER)); | ||
89 | + | ||
85 | return TRUE; // return TRUE unless you set the focus to a control | 90 | return TRUE; // return TRUE unless you set the focus to a control |
86 | // 异常: OCX 属性页应返回 FALSE | 91 | // 异常: OCX 属性页应返回 FALSE |
87 | } | 92 | } |
@@ -157,21 +162,30 @@ void PayDlg::OnBnClickedPayButtonClose() | @@ -157,21 +162,30 @@ void PayDlg::OnBnClickedPayButtonClose() | ||
157 | 162 | ||
158 | void PayDlg::OnBnClickedPayButtonPay() | 163 | void PayDlg::OnBnClickedPayButtonPay() |
159 | { | 164 | { |
160 | - | 165 | + LOG_TRACE(L"支付订单"); |
161 | CString error_msg; | 166 | CString error_msg; |
162 | 167 | ||
163 | std::string statement_data; | 168 | std::string statement_data; |
164 | do | 169 | do |
165 | { | 170 | { |
171 | + CString pass_word; | ||
172 | + password_edit_.GetWindowText(pass_word); | ||
173 | + if (card_type_ != 30) | ||
174 | + { | ||
175 | + if (pass_word.IsEmpty() || pass_word.GetLength() < 6) | ||
176 | + { | ||
177 | + SetErrorMsg(L"错误提示:密码为空或密码长度不足!"); | ||
178 | + break; | ||
179 | + } | ||
180 | + | ||
181 | + } | ||
182 | + | ||
166 | const uint32_t kHTTPOK = 200; | 183 | const uint32_t kHTTPOK = 200; |
167 | WinHttp win_http; | 184 | WinHttp win_http; |
168 | auto& url_cfg = URLConfig::Instance(); | 185 | auto& url_cfg = URLConfig::Instance(); |
169 | win_http.ConnectHost(url_cfg.Host(), url_cfg.Port(), url_cfg.IsHttps()); | 186 | win_http.ConnectHost(url_cfg.Host(), url_cfg.Port(), url_cfg.IsHttps()); |
170 | - std::string url = url_cfg.GetSubmitOrdersPath(); | ||
171 | - auto& request = win_http.OpenRequest(WinHttp::Method::POST, url); | ||
172 | - | ||
173 | - CString pass_word; | ||
174 | - password_edit_.GetWindowText(pass_word); | 187 | + std::string url = url_cfg.GetFinishStatementPath(); |
188 | + auto& request = win_http.OpenRequest(WinHttp::Method::JSONPOST, url); | ||
175 | 189 | ||
176 | std::ostringstream os; | 190 | std::ostringstream os; |
177 | os << statement_id_; | 191 | os << statement_id_; |
@@ -179,7 +193,7 @@ void PayDlg::OnBnClickedPayButtonPay() | @@ -179,7 +193,7 @@ void PayDlg::OnBnClickedPayButtonPay() | ||
179 | std::istringstream is(os.str()); | 193 | std::istringstream is(os.str()); |
180 | is >> statement_id_str; | 194 | is >> statement_id_str; |
181 | 195 | ||
182 | - std::string post_data = "{\"statementId\":" + statement_id_str + "\"password\":\"" + wstr_2_str(pass_word) + "\"}"; | 196 | + std::string post_data = "{\"statementId\":" + statement_id_str + ",\"password\":\"" + wstr_2_str(pass_word) + "\"}"; |
183 | 197 | ||
184 | request.SetPostData(post_data); | 198 | request.SetPostData(post_data); |
185 | if (url_cfg.IsHttps()) | 199 | if (url_cfg.IsHttps()) |
@@ -193,7 +207,7 @@ void PayDlg::OnBnClickedPayButtonPay() | @@ -193,7 +207,7 @@ void PayDlg::OnBnClickedPayButtonPay() | ||
193 | if (kHTTPOK != status_code) | 207 | if (kHTTPOK != status_code) |
194 | { | 208 | { |
195 | std::string err_msg = "网络请求错误! 错误码: " + std::to_string(status_code); | 209 | std::string err_msg = "网络请求错误! 错误码: " + std::to_string(status_code); |
196 | - LOG_ERROR(str_2_wstr(err_msg.c_str())); | 210 | + LOG_ERROR(CString(err_msg.c_str()).GetBuffer()); |
197 | error_msg = err_msg.c_str(); | 211 | error_msg = err_msg.c_str(); |
198 | break; | 212 | break; |
199 | } | 213 | } |
@@ -215,7 +229,11 @@ void PayDlg::OnBnClickedPayButtonPay() | @@ -215,7 +229,11 @@ void PayDlg::OnBnClickedPayButtonPay() | ||
215 | PT::read_json(ss, ptree); | 229 | PT::read_json(ss, ptree); |
216 | if (ptree.get<long>("code") == 0) | 230 | if (ptree.get<long>("code") == 0) |
217 | { | 231 | { |
218 | - statement_data = ptree.get<std::string>("data"); | 232 | + PT::ptree data_child = ptree.get_child("data"); |
233 | + std::ostringstream os; | ||
234 | + PT::write_json(os, data_child); | ||
235 | + CString data = str_2_wstr(std::string(os.str())).c_str(); | ||
236 | + statement_data = CT2A(data); | ||
219 | } | 237 | } |
220 | else | 238 | else |
221 | { | 239 | { |
@@ -268,6 +286,7 @@ HBRUSH PayDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) | @@ -268,6 +286,7 @@ HBRUSH PayDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) | ||
268 | 286 | ||
269 | void PayDlg::OnBnClickedPayButtonPassword() | 287 | void PayDlg::OnBnClickedPayButtonPassword() |
270 | { | 288 | { |
289 | + password_edit_.SetWindowTextW(L""); | ||
271 | auto pin_pad = ReadPINPadCmd(); | 290 | auto pin_pad = ReadPINPadCmd(); |
272 | HardwareCmd::Reply reply = pin_pad.Execute(""); | 291 | HardwareCmd::Reply reply = pin_pad.Execute(""); |
273 | CString error_msg; | 292 | CString error_msg; |
@@ -307,5 +326,22 @@ void PayDlg::OnBnClickedPayButtonPassword() | @@ -307,5 +326,22 @@ void PayDlg::OnBnClickedPayButtonPassword() | ||
307 | if (!error_msg.IsEmpty()) | 326 | if (!error_msg.IsEmpty()) |
308 | { | 327 | { |
309 | SetErrorMsg(error_msg); | 328 | SetErrorMsg(error_msg); |
329 | + password_edit_.SetWindowTextW(L""); | ||
330 | + } | ||
331 | + else | ||
332 | + { | ||
333 | + SetErrorMsg(CString(L"")); | ||
310 | } | 334 | } |
311 | } | 335 | } |
336 | + | ||
337 | + | ||
338 | +BOOL PayDlg::PreTranslateMessage(MSG* pMsg) | ||
339 | +{ | ||
340 | + if (WM_KEYFIRST <= pMsg->message&&pMsg->message <= WM_KEYLAST) | ||
341 | + { | ||
342 | + if (acce_ && ::TranslateAccelerator(m_hWnd, acce_, pMsg)) | ||
343 | + return TRUE; | ||
344 | + } | ||
345 | + | ||
346 | + return CDialogEx::PreTranslateMessage(pMsg); | ||
347 | +} |
central_clearing_system/ETradeClient/mfc_ui/pay_dlg.h
@@ -43,6 +43,9 @@ private: | @@ -43,6 +43,9 @@ private: | ||
43 | long statement_id_; | 43 | long statement_id_; |
44 | CString total_money_; | 44 | CString total_money_; |
45 | int card_type_; | 45 | int card_type_; |
46 | + | ||
47 | + HACCEL acce_; | ||
46 | public: | 48 | public: |
47 | afx_msg void OnBnClickedPayButtonPassword(); | 49 | afx_msg void OnBnClickedPayButtonPassword(); |
50 | + virtual BOOL PreTranslateMessage(MSG* pMsg); | ||
48 | }; | 51 | }; |
central_clearing_system/ETradeClient/mfc_ui/place_order_dlg.cpp
@@ -28,6 +28,7 @@ PlaceOrderDlg::PlaceOrderDlg(CWnd* pParent /*=NULL*/) | @@ -28,6 +28,7 @@ PlaceOrderDlg::PlaceOrderDlg(CWnd* pParent /*=NULL*/) | ||
28 | line_pen_.CreatePen(PS_SOLID, 1, RGB(0, 0, 0)); | 28 | line_pen_.CreatePen(PS_SOLID, 1, RGB(0, 0, 0)); |
29 | edit_brush_.CreateSolidBrush(RGB(245, 247, 250)); | 29 | edit_brush_.CreateSolidBrush(RGB(245, 247, 250)); |
30 | comm_id_index_ = 1; | 30 | comm_id_index_ = 1; |
31 | + product_id_ = 0; | ||
31 | } | 32 | } |
32 | 33 | ||
33 | PlaceOrderDlg::~PlaceOrderDlg() | 34 | PlaceOrderDlg::~PlaceOrderDlg() |
@@ -70,6 +71,7 @@ BEGIN_MESSAGE_MAP(PlaceOrderDlg, CDialogEx) | @@ -70,6 +71,7 @@ BEGIN_MESSAGE_MAP(PlaceOrderDlg, CDialogEx) | ||
70 | ON_WM_PAINT() | 71 | ON_WM_PAINT() |
71 | ON_WM_CTLCOLOR() | 72 | ON_WM_CTLCOLOR() |
72 | ON_BN_CLICKED(IDC_BUTTON_PAY, &PlaceOrderDlg::OnBnClickedButtonPay) | 73 | ON_BN_CLICKED(IDC_BUTTON_PAY, &PlaceOrderDlg::OnBnClickedButtonPay) |
74 | + ON_COMMAND(ID_ACCELERATOR_S, &PlaceOrderDlg::OnBnClickedButtonPay) | ||
73 | ON_COMMAND(ID_ACCELERATOR_TAB, &PlaceOrderDlg::OnAcceleratorTab) | 75 | ON_COMMAND(ID_ACCELERATOR_TAB, &PlaceOrderDlg::OnAcceleratorTab) |
74 | ON_COMMAND(ID_ACCELERATOR_ENTER, &PlaceOrderDlg::OnAcceleratorEnter) | 76 | ON_COMMAND(ID_ACCELERATOR_ENTER, &PlaceOrderDlg::OnAcceleratorEnter) |
75 | ON_MESSAGE(WM_ORDER_KILL_FOCUS, &PlaceOrderDlg::OnEditKillFocus) | 77 | ON_MESSAGE(WM_ORDER_KILL_FOCUS, &PlaceOrderDlg::OnEditKillFocus) |
@@ -356,6 +358,7 @@ HBRUSH PlaceOrderDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) | @@ -356,6 +358,7 @@ HBRUSH PlaceOrderDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) | ||
356 | 358 | ||
357 | void PlaceOrderDlg::OnBnClickedButtonPay() | 359 | void PlaceOrderDlg::OnBnClickedButtonPay() |
358 | { | 360 | { |
361 | + LOG_TRACE(L"Ìá½»¶©µ¥"); | ||
359 | SetErrorMsg(CString(L"")); | 362 | SetErrorMsg(CString(L"")); |
360 | int row_count = product_list_.GetRowCount(); | 363 | int row_count = product_list_.GetRowCount(); |
361 | if (row_count == 1) | 364 | if (row_count == 1) |
@@ -394,7 +397,7 @@ void PlaceOrderDlg::OnBnClickedButtonPay() | @@ -394,7 +397,7 @@ void PlaceOrderDlg::OnBnClickedButtonPay() | ||
394 | 397 | ||
395 | Comm comm_info; | 398 | Comm comm_info; |
396 | CGridCellBase* product_cell = product_list_.GetCell(row, 2); | 399 | CGridCellBase* product_cell = product_list_.GetCell(row, 2); |
397 | - comm_info.product_id = product_cell->product_id; | 400 | + comm_info.product_id = std::to_string(product_cell->product_id); |
398 | comm_info.price = wstr_2_str(product_list_.GetItemText(row, 3)); | 401 | comm_info.price = wstr_2_str(product_list_.GetItemText(row, 3)); |
399 | comm_info.amount = wstr_2_str(product_list_.GetItemText(row, 4)); | 402 | comm_info.amount = wstr_2_str(product_list_.GetItemText(row, 4)); |
400 | comm_info.unit = product_list_.GetItemText(row, 5).Compare(L"½ï") == 0 ? "1" : "2"; | 403 | comm_info.unit = product_list_.GetItemText(row, 5).Compare(L"½ï") == 0 ? "1" : "2"; |
@@ -497,7 +500,7 @@ void PlaceOrderDlg::OnBnClickedButtonPay() | @@ -497,7 +500,7 @@ void PlaceOrderDlg::OnBnClickedButtonPay() | ||
497 | EmptyCtrl(true); | 500 | EmptyCtrl(true); |
498 | SetCtrlInitData(); | 501 | SetCtrlInitData(); |
499 | InitList(); | 502 | InitList(); |
500 | - comm_id_index_; | 503 | + comm_id_index_ = 1; |
501 | comm_vec_.clear(); | 504 | comm_vec_.clear(); |
502 | 505 | ||
503 | PayDlg pay_dlg(statement_id, CString(total_money.c_str()), buyer_card_type_); | 506 | PayDlg pay_dlg(statement_id, CString(total_money.c_str()), buyer_card_type_); |
@@ -590,60 +593,63 @@ void PlaceOrderDlg::OnAcceleratorEnter() | @@ -590,60 +593,63 @@ void PlaceOrderDlg::OnAcceleratorEnter() | ||
590 | break; | 593 | break; |
591 | } | 594 | } |
592 | 595 | ||
593 | - int row_index = product_list_.InsertRow(L"", -1); | ||
594 | - product_list_.Invalidate(); | ||
595 | CString text; | 596 | CString text; |
596 | double price = 0, count = 0; | 597 | double price = 0, count = 0; |
597 | card_edit_.GetWindowText(text); | 598 | card_edit_.GetWindowText(text); |
598 | CommInfo comm; | 599 | CommInfo comm; |
599 | comm.comm_id = GetCommIndex(); | 600 | comm.comm_id = GetCommIndex(); |
600 | comm.seller_card = text; | 601 | comm.seller_card = text; |
601 | - product_list_.SetItemText(row_index, 0, text, comm.comm_id); | ||
602 | text.Empty(); | 602 | text.Empty(); |
603 | - | ||
604 | name_edit_.GetWindowText(text); | 603 | name_edit_.GetWindowText(text); |
605 | comm.seller_name = text; | 604 | comm.seller_name = text; |
606 | - product_list_.SetItemText(row_index, 1, text, comm.comm_id); | ||
607 | text.Empty(); | 605 | text.Empty(); |
608 | - | ||
609 | comm_name_edit_.GetWindowText(text); | 606 | comm_name_edit_.GetWindowText(text); |
610 | comm.comm_name = text; | 607 | comm.comm_name = text; |
611 | - product_list_.SetItemText(row_index, 2, text, comm.comm_id, wstr_2_str(product_id_)); | 608 | + comm.product_id = product_id_; |
612 | text.Empty(); | 609 | text.Empty(); |
613 | - | ||
614 | price_edit_.GetWindowText(text); | 610 | price_edit_.GetWindowText(text); |
615 | price = _ttof(text); | 611 | price = _ttof(text); |
616 | comm.price = text; | 612 | comm.price = text; |
617 | - product_list_.SetItemText(row_index, 3, text, comm.comm_id); | ||
618 | text.Empty(); | 613 | text.Empty(); |
619 | - | ||
620 | count_edit_.GetWindowText(text); | 614 | count_edit_.GetWindowText(text); |
621 | count = _ttof(text); | 615 | count = _ttof(text); |
622 | comm.count = text; | 616 | comm.count = text; |
623 | - product_list_.SetItemText(row_index, 4, text, comm.comm_id); | ||
624 | text.Empty(); | 617 | text.Empty(); |
625 | - | ||
626 | real_unit_static.GetWindowText(text); | 618 | real_unit_static.GetWindowText(text); |
627 | comm.unit = text; | 619 | comm.unit = text; |
628 | - product_list_.SetItemText(row_index, 5, text, comm.comm_id); | ||
629 | text.Empty(); | 620 | text.Empty(); |
630 | - | ||
631 | heavy_edit_.GetWindowText(text); | 621 | heavy_edit_.GetWindowText(text); |
632 | comm.weight = text; | 622 | comm.weight = text; |
633 | - product_list_.SetItemText(row_index, 6, text, comm.comm_id); | ||
634 | text.Empty(); | 623 | text.Empty(); |
635 | 624 | ||
636 | - text.Format(_T("%.1f"), price * count); | ||
637 | - comm.total_money = text; | ||
638 | - product_list_.SetItemText(row_index, 7, text, comm.comm_id); | 625 | + double money = price * count * 100; |
626 | + money = std::round(money) / 100; | ||
639 | 627 | ||
628 | + text.Format(_T("%.2f"), money); | ||
629 | + comm.total_money = text; | ||
640 | comm_vec_.push_back(comm); | 630 | comm_vec_.push_back(comm); |
641 | - | ||
642 | - for (int index = 0; index < 8; ++index) | 631 | + |
632 | + product_list_.DeleteAllItems(); | ||
633 | + | ||
634 | + InitList(); | ||
635 | + | ||
636 | + for (int index = 0; index != comm_vec_.size(); ++index) | ||
643 | { | 637 | { |
644 | - product_list_.SetItemFormat(row_index, index, DT_CENTER | DT_VCENTER | DT_SINGLELINE); | 638 | + int row_index = product_list_.InsertRow(L"", -1); |
639 | + product_list_.SetItemText(row_index, 0, comm_vec_[index].seller_card, comm_vec_[index].comm_id); | ||
640 | + product_list_.SetItemText(row_index, 1, comm_vec_[index].seller_name, comm_vec_[index].comm_id); | ||
641 | + product_list_.SetItemText(row_index, 2, comm_vec_[index].comm_name, comm_vec_[index].comm_id, comm_vec_[index].product_id); | ||
642 | + product_list_.SetItemText(row_index, 3, comm_vec_[index].price, comm_vec_[index].comm_id); | ||
643 | + product_list_.SetItemText(row_index, 4, comm_vec_[index].count, comm_vec_[index].comm_id); | ||
644 | + product_list_.SetItemText(row_index, 5, comm_vec_[index].unit, comm_vec_[index].comm_id); | ||
645 | + product_list_.SetItemText(row_index, 6, comm_vec_[index].weight, comm_vec_[index].comm_id); | ||
646 | + product_list_.SetItemText(row_index, 7, comm_vec_[index].total_money, comm_vec_[index].comm_id); | ||
647 | + for (int index = 0; index < 8; ++index) | ||
648 | + { | ||
649 | + product_list_.SetItemFormat(row_index, index, DT_CENTER | DT_VCENTER | DT_SINGLELINE); | ||
650 | + } | ||
645 | } | 651 | } |
646 | - | 652 | + |
647 | EmptyCtrl(false); | 653 | EmptyCtrl(false); |
648 | SortList(); | 654 | SortList(); |
649 | 655 | ||
@@ -670,7 +676,7 @@ void PlaceOrderDlg::OnAcceleratorEnter() | @@ -670,7 +676,7 @@ void PlaceOrderDlg::OnAcceleratorEnter() | ||
670 | { | 676 | { |
671 | pay_button_.EnableWindow(FALSE); | 677 | pay_button_.EnableWindow(FALSE); |
672 | } | 678 | } |
673 | - | 679 | + product_list_.Invalidate(TRUE); |
674 | UpdateWindow(); | 680 | UpdateWindow(); |
675 | } | 681 | } |
676 | 682 | ||
@@ -713,11 +719,11 @@ LRESULT PlaceOrderDlg::OnEditKillFocus(WPARAM wParam, LPARAM lParam) | @@ -713,11 +719,11 @@ LRESULT PlaceOrderDlg::OnEditKillFocus(WPARAM wParam, LPARAM lParam) | ||
713 | case IDC_EDIT_CARD: | 719 | case IDC_EDIT_CARD: |
714 | { | 720 | { |
715 | CString name; | 721 | CString name; |
716 | - /*if (text.GetLength() < 12) | 722 | + if (text.IsEmpty()) |
717 | { | 723 | { |
718 | - card_edit_.SetEditRed(true); | ||
719 | - break; | ||
720 | - }*/ | 724 | + card_edit_.SetEditRed(true); |
725 | + break; | ||
726 | + } | ||
721 | 727 | ||
722 | bool result = GetCardName(text, name, 2); | 728 | bool result = GetCardName(text, name, 2); |
723 | if (result) | 729 | if (result) |
@@ -785,6 +791,10 @@ LRESULT PlaceOrderDlg::OnEditKillFocus(WPARAM wParam, LPARAM lParam) | @@ -785,6 +791,10 @@ LRESULT PlaceOrderDlg::OnEditKillFocus(WPARAM wParam, LPARAM lParam) | ||
785 | { | 791 | { |
786 | break; | 792 | break; |
787 | } | 793 | } |
794 | + else if(!(_ttof(text) > 0)) | ||
795 | + { | ||
796 | + ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true); | ||
797 | + } | ||
788 | } | 798 | } |
789 | case IDC_EDIT_PRICE: | 799 | case IDC_EDIT_PRICE: |
790 | case IDC_EDIT_COUNT: | 800 | case IDC_EDIT_COUNT: |
@@ -797,10 +807,16 @@ LRESULT PlaceOrderDlg::OnEditKillFocus(WPARAM wParam, LPARAM lParam) | @@ -797,10 +807,16 @@ LRESULT PlaceOrderDlg::OnEditKillFocus(WPARAM wParam, LPARAM lParam) | ||
797 | { | 807 | { |
798 | ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true); | 808 | ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true); |
799 | } | 809 | } |
810 | + else if (!(_ttof(text) > 0)) | ||
811 | + { | ||
812 | + ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(true); | ||
813 | + } | ||
800 | else | 814 | else |
801 | { | 815 | { |
802 | ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(false); | 816 | ((CEditBox*)GetDlgItem(dlg_id))->SetEditRed(false); |
803 | } | 817 | } |
818 | + | ||
819 | + | ||
804 | 820 | ||
805 | break; | 821 | break; |
806 | } | 822 | } |
@@ -870,6 +886,7 @@ bool PlaceOrderDlg::GetCardName(CString &num, CString &name, int type) | @@ -870,6 +886,7 @@ bool PlaceOrderDlg::GetCardName(CString &num, CString &name, int type) | ||
870 | else | 886 | else |
871 | { | 887 | { |
872 | std::wstring error_msg = str_2_wstr(ptree.get<std::string>("message")); | 888 | std::wstring error_msg = str_2_wstr(ptree.get<std::string>("message")); |
889 | + LOG_ERROR(error_msg); | ||
873 | name = error_msg.c_str(); | 890 | name = error_msg.c_str(); |
874 | result = false; | 891 | result = false; |
875 | break; | 892 | break; |
@@ -888,7 +905,7 @@ bool PlaceOrderDlg::GetCardName(CString &num, CString &name, int type) | @@ -888,7 +905,7 @@ bool PlaceOrderDlg::GetCardName(CString &num, CString &name, int type) | ||
888 | return result; | 905 | return result; |
889 | } | 906 | } |
890 | 907 | ||
891 | -bool PlaceOrderDlg::GetCommName(CString &num, CString& card, CString &name, CString &product_id) | 908 | +bool PlaceOrderDlg::GetCommName(CString &num, CString& card, CString &name, long &product_id) |
892 | { | 909 | { |
893 | SetErrorMsg(CString(L"")); | 910 | SetErrorMsg(CString(L"")); |
894 | bool result = true; | 911 | bool result = true; |
@@ -942,13 +959,13 @@ bool PlaceOrderDlg::GetCommName(CString &num, CString& card, CString &name, CStr | @@ -942,13 +959,13 @@ bool PlaceOrderDlg::GetCommName(CString &num, CString& card, CString &name, CStr | ||
942 | { | 959 | { |
943 | PT::ptree card_data = ptree.get_child("data"); | 960 | PT::ptree card_data = ptree.get_child("data"); |
944 | name = str_2_wstr(card_data.get<std::string>("name")).c_str(); | 961 | name = str_2_wstr(card_data.get<std::string>("name")).c_str(); |
945 | - long id = card_data.get<long>("id"); | ||
946 | - product_id.Format(L"%ld", id); | 962 | + product_id = card_data.get<long>("id"); |
947 | } | 963 | } |
948 | else | 964 | else |
949 | { | 965 | { |
950 | - std::wstring error_msg = str_2_wstr(ptree.get<std::string>("message")); | ||
951 | - error_msg = CString(error_msg.c_str()); | 966 | + std::wstring err_msg = str_2_wstr(ptree.get<std::string>("message")); |
967 | + LOG_ERROR(err_msg); | ||
968 | + error_msg = CString(err_msg.c_str()); | ||
952 | result = false; | 969 | result = false; |
953 | break; | 970 | break; |
954 | } | 971 | } |
@@ -1210,6 +1227,8 @@ void PlaceOrderDlg::OnBnClickedButtonSwipCard() | @@ -1210,6 +1227,8 @@ void PlaceOrderDlg::OnBnClickedButtonSwipCard() | ||
1210 | else | 1227 | else |
1211 | { | 1228 | { |
1212 | SetErrorMsg(CString(L"")); | 1229 | SetErrorMsg(CString(L"")); |
1230 | + card_edit_.SetFocus(); | ||
1231 | + card_edit_.SetSel(4, 4); | ||
1213 | } | 1232 | } |
1214 | 1233 | ||
1215 | 1234 | ||
@@ -1258,7 +1277,7 @@ afx_msg LRESULT PlaceOrderDlg::DeleteComm(WPARAM wParam, LPARAM lParam) | @@ -1258,7 +1277,7 @@ afx_msg LRESULT PlaceOrderDlg::DeleteComm(WPARAM wParam, LPARAM lParam) | ||
1258 | int row_index = product_list_.InsertRow(L"", -1); | 1277 | int row_index = product_list_.InsertRow(L"", -1); |
1259 | product_list_.SetItemText(row_index, 0, comm_vec_[index].seller_card, comm_vec_[index].comm_id); | 1278 | product_list_.SetItemText(row_index, 0, comm_vec_[index].seller_card, comm_vec_[index].comm_id); |
1260 | product_list_.SetItemText(row_index, 1, comm_vec_[index].seller_name, comm_vec_[index].comm_id); | 1279 | product_list_.SetItemText(row_index, 1, comm_vec_[index].seller_name, comm_vec_[index].comm_id); |
1261 | - product_list_.SetItemText(row_index, 2, comm_vec_[index].comm_name, comm_vec_[index].comm_id); | 1280 | + product_list_.SetItemText(row_index, 2, comm_vec_[index].comm_name, comm_vec_[index].comm_id, comm_vec_[index].product_id); |
1262 | product_list_.SetItemText(row_index, 3, comm_vec_[index].price, comm_vec_[index].comm_id); | 1281 | product_list_.SetItemText(row_index, 3, comm_vec_[index].price, comm_vec_[index].comm_id); |
1263 | product_list_.SetItemText(row_index, 4, comm_vec_[index].count, comm_vec_[index].comm_id); | 1282 | product_list_.SetItemText(row_index, 4, comm_vec_[index].count, comm_vec_[index].comm_id); |
1264 | product_list_.SetItemText(row_index, 5, comm_vec_[index].unit, comm_vec_[index].comm_id); | 1283 | product_list_.SetItemText(row_index, 5, comm_vec_[index].unit, comm_vec_[index].comm_id); |
central_clearing_system/ETradeClient/mfc_ui/place_order_dlg.h
@@ -27,6 +27,7 @@ class PlaceOrderDlg : public CDialogEx | @@ -27,6 +27,7 @@ class PlaceOrderDlg : public CDialogEx | ||
27 | struct CommInfo | 27 | struct CommInfo |
28 | { | 28 | { |
29 | int comm_id; | 29 | int comm_id; |
30 | + long product_id; | ||
30 | CString seller_card; | 31 | CString seller_card; |
31 | CString seller_name; | 32 | CString seller_name; |
32 | CString comm_name; | 33 | CString comm_name; |
@@ -80,9 +81,7 @@ private: | @@ -80,9 +81,7 @@ private: | ||
80 | bool GetUserName(CString &name); | 81 | bool GetUserName(CString &name); |
81 | void SetErrorMsg(CString &error); | 82 | void SetErrorMsg(CString &error); |
82 | bool GetCardName(CString &num, CString &name, int type); //type =1ÊÇÂò¼Ò£¬2ÊÇÂò¼Ò | 83 | bool GetCardName(CString &num, CString &name, int type); //type =1ÊÇÂò¼Ò£¬2ÊÇÂò¼Ò |
83 | - bool GetCommName(CString &num, CString& card, CString &name, CString &product_id); | ||
84 | - | ||
85 | - | 84 | + bool GetCommName(CString &num, CString& card, CString &name, long &product_id); |
86 | private: | 85 | private: |
87 | CStatic owner_static_; | 86 | CStatic owner_static_; |
88 | CEditBox card_edit_; | 87 | CEditBox card_edit_; |
@@ -115,7 +114,7 @@ private: | @@ -115,7 +114,7 @@ private: | ||
115 | 114 | ||
116 | HACCEL acce_; | 115 | HACCEL acce_; |
117 | 116 | ||
118 | - CString product_id_; | 117 | + long product_id_; |
119 | int buyer_card_type_; | 118 | int buyer_card_type_; |
120 | 119 | ||
121 | std::vector<CommInfo> comm_vec_; | 120 | std::vector<CommInfo> comm_vec_; |
central_clearing_system/ETradeClient/utility/url_config.cpp
@@ -192,4 +192,8 @@ std::string URLConfig::GetSubmitOrdersPath() const | @@ -192,4 +192,8 @@ std::string URLConfig::GetSubmitOrdersPath() const | ||
192 | std::string URLConfig::GetSellerCardPath() const | 192 | std::string URLConfig::GetSellerCardPath() const |
193 | { | 193 | { |
194 | return m_get_seller_card_path; | 194 | return m_get_seller_card_path; |
195 | +} | ||
196 | +std::string URLConfig::GetFinishStatementPath() const | ||
197 | +{ | ||
198 | + return m_finish_order_path; | ||
195 | } | 199 | } |
196 | \ No newline at end of file | 200 | \ No newline at end of file |
central_clearing_system/ETradeClient/utility/url_config.h
@@ -33,6 +33,7 @@ public: | @@ -33,6 +33,7 @@ public: | ||
33 | std::string GetCommNamePath() const; | 33 | std::string GetCommNamePath() const; |
34 | std::string GetSubmitOrdersPath() const; | 34 | std::string GetSubmitOrdersPath() const; |
35 | std::string GetSellerCardPath() const; | 35 | std::string GetSellerCardPath() const; |
36 | + std::string GetFinishStatementPath() const; | ||
36 | private: | 37 | private: |
37 | URLConfig(); | 38 | URLConfig(); |
38 | URLConfig(const URLConfig&); | 39 | URLConfig(const URLConfig&); |
central_clearing_system/Resource.h
@@ -86,6 +86,11 @@ | @@ -86,6 +86,11 @@ | ||
86 | #define ID_ACCELERATOR_UP 32854 | 86 | #define ID_ACCELERATOR_UP 32854 |
87 | #define ID_ACCELERATOR_DOWN 32855 | 87 | #define ID_ACCELERATOR_DOWN 32855 |
88 | #define ID_ACCELERATOR_F11 32857 | 88 | #define ID_ACCELERATOR_F11 32857 |
89 | +#define ID_ACCELERATOR_S 32883 | ||
90 | +#define ID_ACCELERATOR_ALT_S 32884 | ||
91 | +#define ID_ACCELERATOR_A 32885 | ||
92 | +#define ID_ACCELERATOR_F 32886 | ||
93 | +#define ID_ACCELERATOR_X 32887 | ||
89 | #define ID_POINT_RULE 40001 | 94 | #define ID_POINT_RULE 40001 |
90 | #define ID_CATEGORY_RULE 40002 | 95 | #define ID_CATEGORY_RULE 40002 |
91 | #define ID_AGREEMENT 40003 | 96 | #define ID_AGREEMENT 40003 |
@@ -101,7 +106,7 @@ | @@ -101,7 +106,7 @@ | ||
101 | #ifdef APSTUDIO_INVOKED | 106 | #ifdef APSTUDIO_INVOKED |
102 | #ifndef APSTUDIO_READONLY_SYMBOLS | 107 | #ifndef APSTUDIO_READONLY_SYMBOLS |
103 | #define _APS_NEXT_RESOURCE_VALUE 332 | 108 | #define _APS_NEXT_RESOURCE_VALUE 332 |
104 | -#define _APS_NEXT_COMMAND_VALUE 32883 | 109 | +#define _APS_NEXT_COMMAND_VALUE 32889 |
105 | #define _APS_NEXT_CONTROL_VALUE 1055 | 110 | #define _APS_NEXT_CONTROL_VALUE 1055 |
106 | #define _APS_NEXT_SYMED_VALUE 311 | 111 | #define _APS_NEXT_SYMED_VALUE 311 |
107 | #endif | 112 | #endif |
etrade_card_client/Config/menu_res_auth_cfg.json
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | {"res_id":50190, "auth_id":5517, "icon":"about.ico", "index":[3, 4]}, | 26 | {"res_id":50190, "auth_id":5517, "icon":"about.ico", "index":[3, 4]}, |
27 | {"res_id":4, "auth_id":60, "icon":"", "index":[4]}, | 27 | {"res_id":4, "auth_id":60, "icon":"", "index":[4]}, |
28 | {"res_id":50180, "auth_id":6004, "icon":"customer_query.ico", "index":[4, 0]}, | 28 | {"res_id":50180, "auth_id":6004, "icon":"customer_query.ico", "index":[4, 0]}, |
29 | - {"res_id":50190, "auth_id":6008, "icon":"oper_log_query.ico", "index":[4, 1]}, | 29 | + {"res_id":50185, "auth_id":6008, "icon":"oper_log_query.ico", "index":[4, 1]}, |
30 | {"res_id":50181, "auth_id":6009, "icon":"about.ico", "index":[4, 2]}, | 30 | {"res_id":50181, "auth_id":6009, "icon":"about.ico", "index":[4, 2]}, |
31 | {"res_id":5, "auth_id":70, "icon":"", "index":[5]}, | 31 | {"res_id":5, "auth_id":70, "icon":"", "index":[5]}, |
32 | {"res_id":50182, "auth_id":7002, "icon":"about.ico", "index":[5, 0]}, | 32 | {"res_id":50182, "auth_id":7002, "icon":"about.ico", "index":[5, 0]}, |
etrade_card_client/ETradeClient.rc
@@ -122,7 +122,7 @@ BEGIN | @@ -122,7 +122,7 @@ BEGIN | ||
122 | POPUP "查询业务(&C)" | 122 | POPUP "查询业务(&C)" |
123 | BEGIN | 123 | BEGIN |
124 | MENUITEM "客户查询", ID_CUSTOMER_QUERY | 124 | MENUITEM "客户查询", ID_CUSTOMER_QUERY |
125 | - MENUITEM "操作记录", ID_ACCOUNT_TRANSFER | 125 | + MENUITEM "操作记录", ID_OPERATING_RECORD |
126 | MENUITEM "客户管理", ID_CUS_MANAGE | 126 | MENUITEM "客户管理", ID_CUS_MANAGE |
127 | END | 127 | END |
128 | POPUP "市场业务(&F)" | 128 | POPUP "市场业务(&F)" |
etrade_card_client/resource.h
@@ -58,12 +58,13 @@ | @@ -58,12 +58,13 @@ | ||
58 | #define ID_CASH_WITHDRAW 50150 | 58 | #define ID_CASH_WITHDRAW 50150 |
59 | #define ID_FEE_PAYMENT 50160 | 59 | #define ID_FEE_PAYMENT 50160 |
60 | #define ID_SETTLE_ACCOUNTS_APPLY 50170 | 60 | #define ID_SETTLE_ACCOUNTS_APPLY 50170 |
61 | -#define ID_ACCOUNT_TRANSFER 50190 | ||
62 | #define ID_CUSTOMER_QUERY 50180 | 61 | #define ID_CUSTOMER_QUERY 50180 |
62 | +#define ID_OPERATING_RECORD 50185 | ||
63 | #define ID_CUS_MANAGE 50181 | 63 | #define ID_CUS_MANAGE 50181 |
64 | #define ID_ETC_QUERY 50182 | 64 | #define ID_ETC_QUERY 50182 |
65 | #define ID_ETC_SERVICE 50183 | 65 | #define ID_ETC_SERVICE 50183 |
66 | #define ID_KING_CARD 50184 | 66 | #define ID_KING_CARD 50184 |
67 | +#define ID_ACCOUNT_TRANSFER 50190 | ||
67 | #define ID_OPER_LOG_QUERY 50190 | 68 | #define ID_OPER_LOG_QUERY 50190 |
68 | #define ID_INDICATOR_TIME 59142 | 69 | #define ID_INDICATOR_TIME 59142 |
69 | 70 | ||
@@ -72,7 +73,7 @@ | @@ -72,7 +73,7 @@ | ||
72 | #ifdef APSTUDIO_INVOKED | 73 | #ifdef APSTUDIO_INVOKED |
73 | #ifndef APSTUDIO_READONLY_SYMBOLS | 74 | #ifndef APSTUDIO_READONLY_SYMBOLS |
74 | #define _APS_NEXT_RESOURCE_VALUE 326 | 75 | #define _APS_NEXT_RESOURCE_VALUE 326 |
75 | -#define _APS_NEXT_COMMAND_VALUE 32840 | 76 | +#define _APS_NEXT_COMMAND_VALUE 32842 |
76 | #define _APS_NEXT_CONTROL_VALUE 1018 | 77 | #define _APS_NEXT_CONTROL_VALUE 1018 |
77 | #define _APS_NEXT_SYMED_VALUE 311 | 78 | #define _APS_NEXT_SYMED_VALUE 311 |
78 | #endif | 79 | #endif |