| | |
| | | SetArg(); |
| | | APID = L""; |
| | | APType = L""; |
| | | xstring positionname = publiccode::GetUser().positionname; |
| | | if (GetWinParam()) |
| | | { |
| | | xaserverarg arg=GetArg(); |
| | |
| | | dw_base.SetRowSelectorWidth(0); |
| | | dw_base.SetHScrollState(false); |
| | | dw_base.SetVScrollState(false); |
| | | |
| | | |
| | | OnAttachEvent(); |
| | | |
| | | if (APID != L"") |
| | |
| | | { |
| | | xstring sdate = publiccode::GetCurrentDate(); |
| | | dw_base.SetItemString(1, L"APDate", sdate); |
| | | dw_base.SetItemString(1, L"PayedDate", sdate); |
| | | if (positionname.find(L"跟单") < 0) |
| | | { |
| | | dw_base.SetItemString(1, L"PayedDate", sdate); |
| | | |
| | | } |
| | | dw_base.SetItemString(1, L"CreateDate", sdate); |
| | | xstring suserid = publiccode::GetUser().id; |
| | | xstring susername = publiccode::GetUser().name; |
| | |
| | | } |
| | | |
| | | |
| | | int OnItemAskStyle(TEvent* evt, LPARAM p) |
| | | { |
| | | int DMS_CSSSTYLE = 0x8; |
| | | DWASKSTYLENMHDR& hdr = *(DWASKSTYLENMHDR*)evt->notify.pnmh; |
| | | int row = hdr.row; |
| | | int col = hdr.col; |
| | | xstring colname = hdr.colname; |
| | | |
| | | int rows = dw_goods.GetRowCount(); |
| | | |
| | | if (row < 1 || row > rows) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (colname == L"Packages") |
| | | { |
| | | |
| | | int PackingRate = dw_goods.GetItemString(row, L"PackingRate").toInt(); |
| | | int Quantity = dw_goods.GetItemString(row, L"Quantity").toInt(); |
| | | alert(colname); |
| | | alert(xstring(PackingRate)); |
| | | if (PackingRate != 0) |
| | | { |
| | | if ((Quantity / PackingRate) * PackingRate != Quantity) |
| | | { |
| | | hdr.mask = DMS_CSSSTYLE; |
| | | hdr.pCssStyle = (wchar_t*)L"color:#ff0000"; |
| | | } |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | int PostOnAttachEvent() |
| | | { |
| | | AttachEvent(L"tv_folder", L"TVN_SELCHANGED", (FEvent)&ListGDN3Win::OnTreeSelChanged); //树选择 |
| | |
| | | AttachEvent(L"dw_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&ListGDN3Win::OnRowChanged); |
| | | AttachEvent(L"cbx_1", L"CBN_SELCHANGE", (FEvent)&ListGDN3Win::OnSelectDdlb); |
| | | AttachEvent(L"cbx_datashow", L"CBN_SELCHANGE", (FEvent)&ListGDN3Win::OnSelectDataShowDdlb); |
| | | AttachEvent(L"dw_goods", L"DWV_ASKSTYLE", (FEvent)&ListGDN3Win::OnItemAskStyle); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | OpenWindow(L"dev:xpage[del.vatinvoice.vx]"); |
| | | return 1; |
| | | } |
| | | |
| | | else if (comdid == L"SourceRemark") return OnSourceRemark(); |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | int OnSourceRemark() |
| | | { |
| | | xstring name = L"增值税票"; |
| | | KXMLDOMDocument x = ViewObject::RetrieveData(L"/sale/data/TradeFinance3/GetSetUpRemarks", L"Type", name); |
| | | KXMLDOMNodeList items = x.selectNodes(L"data/Item"); |
| | | KXMLDOMNode t = items.item(0); |
| | | xstring Content = L""; |
| | | if (t.selectSingleNode(L"Content")) |
| | | { |
| | | Content = t.selectSingleNode(L"Content").text(); |
| | | } |
| | | xaserverarg arg1; |
| | | |
| | | arg1.AddArg(L"value", Content); |
| | | OpenWindow(L"dev:xpage[memo.edit.new.vx]", arg1); |
| | | |
| | | return 1; |
| | | } |
| | | //命令处理事件 |
| | | int OnXCommand(TEvent* evt, LPARAM param) |
| | | { |