| | |
| | | } |
| | | |
| | | public: |
| | | xstring m_sType; //树选中的类型 |
| | | xstring m_sTypeTxt; //树选中的数据 |
| | | xstring m_sType; //树选中的类型 |
| | | xstring m_sTypeTxt; //树选中的数据 |
| | | xstring urlTree; |
| | | xstring myDataUrl; |
| | | xstring myDataUrl1; |
| | |
| | | } |
| | | |
| | | //process tree |
| | | //查找当前树项的顶级目录 |
| | | //查找当前树项的顶级目录 |
| | | HTREEITEM LookupTopFolder(HTREEITEM hItem) |
| | | { |
| | | HTREEITEM hRoot = tv_folder.GetRootItem(); |
| | |
| | | return 1; |
| | | } |
| | | |
| | | //树展开 |
| | | //树展开 |
| | | int OnTreeExpanding(TEvent* evt, int p) |
| | | { |
| | | NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh; |
| | |
| | | xstring str = x.documentElement().getAttribute(L"text"); |
| | | if(str == L"true") |
| | | { |
| | | alert(L"保存成功!"); |
| | | alert(L"保存成功!"); |
| | | dw_pricelistshare.ResetUpdateStatus(); |
| | | }else |
| | | { |
| | | alert(L"保存失败!"); |
| | | alert(L"保存失败!"); |
| | | } |
| | | } |
| | | |
| | |
| | | KXMLDOMElement xitem = nlist.item(0); |
| | | |
| | | xstring Reciever = xitem.selectSingleNode(L"userno").text(); |
| | | xstring Subject = L"价格单已共享["+CName+L"]"; |
| | | xstring Category = L"价格单共享"; |
| | | xstring Subject = L"价格单已共享["+CName+L"]"; |
| | | xstring Category = L"价格单共享"; |
| | | xstring Content = L""; |
| | | ViewObject::AddMessage(Category, Reciever, NO, EntityID, Subject, Content); |
| | | ViewObject::AddMessage(GetServerUrl(),Category, Reciever, NO, EntityID, Subject, Content); |
| | | return 1; |
| | | } |
| | | int SendNotice(xml content) |
| | |
| | | dw_pricelistex.ResetUpdateStatus(); |
| | | }else |
| | | { |
| | | alert(L"成品价格单保存失败!"); |
| | | alert(L"成品价格单保存失败!"); |
| | | return 1; |
| | | } |
| | | } |
| | |
| | | dw_priceitem.ResetUpdateStatus(); |
| | | }else |
| | | { |
| | | alert(L"组件价格单保存失败!"); |
| | | alert(L"组件价格单保存失败!"); |
| | | return 1; |
| | | } |
| | | } |
| | |
| | | if(str == L"true") |
| | | { |
| | | dw_pricelistshare.ResetUpdateStatus(); |
| | | alert(L"保存成功!"); |
| | | OnProductPriceShareRetrieve();//刷新数据 |
| | | SendNotice(x2);//发送通知 |
| | | alert(L"保存成功!"); |
| | | OnProductPriceShareRetrieve();//刷新数据 |
| | | SendNotice(x2);//发送通知 |
| | | }else |
| | | { |
| | | alert(L"共享数据保存失败!"); |
| | | alert(L"共享数据保存失败!"); |
| | | } |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | //检索 |
| | | //检索 |
| | | int OnPreRetrieve() |
| | | { |
| | | |
| | | HTREEITEM hItem = tv_folder.GetSelectedItem(); |
| | | if(hItem <=0) return 1; |
| | | if(!hItem) return 1; |
| | | |
| | | HCURSOR hCursor = xutil::SetCursorWait(); |
| | | KXMLDOMElement e1 = tv_folder.GetItemData(hItem); |
| | |
| | | return 1; |
| | | } |
| | | |
| | | //历史数据 |
| | | //历史数据 |
| | | int Onhistroydata() |
| | | { |
| | | return 1; |
| | |
| | | dw_pricelistshare.SetItemString(crow,L"NO",No); |
| | | dw_pricelistshare.SetItemString(crow,L"GroupOrEmp",GroupOrEmp); |
| | | dw_pricelistshare.SetItemString(crow,L"EntityID",EntityID); |
| | | dw_pricelistshare.SetItemString(crow,L"EntityName",L"产品价格单"); |
| | | dw_pricelistshare.SetItemString(crow,L"EntityName",L"产品价格单"); |
| | | if(node.selectSingleNode(L"UserGroupID")) |
| | | dw_pricelistshare.SetItemString(crow,L"UserGroupID",node.selectSingleNode(L"UserGroupID").text()); |
| | | if(node.selectSingleNode(L"PersonID")) |
| | |
| | | xml supplier_x = ViewObject::RetrieveData(L"/sale/data/SupplierV3/entity/FindBySaleType",L"id", s); |
| | | if(supplier_x) |
| | | { |
| | | if((xstring)supplier_x.text() == L"采购经理") |
| | | if((xstring)supplier_x.text() == L"采购经理") |
| | | { |
| | | alert(L"当前角色不是采购员不能新增单子,请重新选择角色"); |
| | | alert(L"当前角色不是采购员不能新增单子,请重新选择角色"); |
| | | return 0; |
| | | } |
| | | } |
| | |
| | | return 1; |
| | | } |
| | | |
| | | //xcombobox下拉 |
| | | //xcombobox下拉 |
| | | int OnSelectDdlb(TEvent* evt,int p) |
| | | { |
| | | changeddlb=1; |
| | |
| | | xutil::RestoreCursor(hCursor); |
| | | return 1; |
| | | } |
| | | int OnDoubleClicked(TEvent* evt, LPARAM pr) |
| | | { |
| | | HCURSOR hCursor = xutil::SetCursorWait(); |
| | | OnCmdDispatch(L"action:bill.open"); |
| | | xutil::RestoreCursor(hCursor); |
| | | return 1; |
| | | } |
| | | |
| | | int AttachListon() |
| | | { |
| | | AttachEvent(L"tv_folder", L"TVN_SELCHANGED",(FEvent)&Enquiry3list::OnTreeSelChanged); //树选择 |
| | | AttachEvent(L"tv_folder", L"TVN_ITEMEXPANDING", (FEvent)&Enquiry3list::OnTreeExpanding); //树展开 |
| | | AttachEvent(L"tv_folder", L"TVN_SELCHANGED",(FEvent)&Enquiry3list::OnTreeSelChanged); //树选择 |
| | | AttachEvent(L"tv_folder", L"TVN_ITEMEXPANDING", (FEvent)&Enquiry3list::OnTreeExpanding); //树展开 |
| | | AttachEvent(L"dw_list",L"DWV_ROWFOCUSCHANGED", (FEvent)&Enquiry3list::OnRowChanged); |
| | | AttachEvent(L"dw_list2",L"DWV_ROWFOCUSCHANGED", (FEvent)&Enquiry3list::OnRowChanged2); |
| | | AttachEvent(L"dw_list1",L"DWV_ROWFOCUSCHANGED", (FEvent)&Enquiry3list::OnRowChanged1); |
| | |
| | | AttachEvent(L"WM_COMMAND", (FEvent)&Enquiry3list::OnCkbCLick); |
| | | AttachEvent(L"dw_list",L"DWV_ASKSTYLE", (FEvent)&Enquiry3list::OnItemAskStyle); |
| | | AttachEvent(L"dw_pricelist",L"DWV_ROWFOCUSCHANGED", (FEvent)&Enquiry3list::OnPriceListRowChanged); |
| | | AttachEvent(L"tv_folder_pricebill", L"TVN_SELCHANGED", (FEvent)&Enquiry3list::OnPriceBillTreeSelChanged); //树选择 |
| | | AttachEvent(L"tv_folder_pricebill", L"TVN_SELCHANGED", (FEvent)&Enquiry3list::OnPriceBillTreeSelChanged); //树选择 |
| | | AttachEvent(L"tv_folder_pricebill", L"TVN_ITEMEXPANDING", (FEvent)&Enquiry3list::OnPriceBillTreeExpanding); |
| | | |
| | | AttachEvent(L"dw_pricelistex",L"DWV_DOUBLECLICKED", (FEvent)&Enquiry3list::OnPriceListDoubleClicked); |
| | |
| | | |
| | | tv_folder_pricebill = GetControl(L"tv_folder_pricebill"); |
| | | InitialFolderPriceBill(); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | int onloaded() |
| | |
| | | { |
| | | HTREEITEM hItem = tv_folder.GetCaretItem(); |
| | | arg.AddArg(L"sheetname",sheetname); |
| | | if(hItem > 0) |
| | | if(!hItem) |
| | | { |
| | | KXMLDOMElement e = tv_folder.GetItemData(hItem); |
| | | |