| | |
| | | xdwgrid dw_supgoods; |
| | | xlayersheet m_layer; |
| | | xlayersheet xsheet; |
| | | //string xpage; |
| | | string m_diffstr; |
| | | //xstring xpage; |
| | | xstring m_diffstr; |
| | | vcontrol vc; |
| | | |
| | | string str_replace(string s, string a, string b, int k) |
| | | xstring str_replace(xstring s, xstring a, xstring b, int k) |
| | | { |
| | | int i = s.find(a,k); |
| | | if (i > -1) |
| | | { |
| | | string tmp; |
| | | xstring tmp; |
| | | if(i==0) |
| | | tmp = b + s.mid(i + a.length(), s.length()); |
| | | else if (i + a.length() == s.length()) |
| | | tmp = b + s.mid(i + a.length()(), s.length()()); |
| | | else if (i + a.length()() == s.length()()) |
| | | tmp = s.mid(0, i) + b; |
| | | else |
| | | tmp = s.mid(0, i) + b + s.mid(i + a.length(), s.length()); |
| | | str_replace(tmp, a, b, i + b.length() + 1); |
| | | tmp = s.mid(0, i) + b + s.mid(i + a.length()(), s.length()()); |
| | | str_replace(tmp, a, b, i + b.length()() + 1); |
| | | } |
| | | else |
| | | return ""+s; |
| | | return L""+s; |
| | | } |
| | | string str_replace(string s, string a, string b) |
| | | xstring str_replace(xstring s, xstring a, xstring b) |
| | | { |
| | | return str_replace( s, a, b, 0); |
| | | } |
| | | |
| | | int SetAttributeByxml(xml x,string nodename,string action,string status) |
| | | int SetAttributeByxml(xml x,xstring nodename,xstring action,xstring status) |
| | | { |
| | | msxml::IXMLDOMElement e; |
| | | msxml::IXMLDOMNodeList nlist = x.GetXmlDoc().selectNodes("//"+nodename+""); |
| | | KXMLDOMElement e; |
| | | KXMLDOMNodeList nlist = x.GetXmlDoc().selectNodes(L"//"+nodename+L""); |
| | | if(nlist) |
| | | { |
| | | |
| | | int nlen = nlist.length; |
| | | int nlen = nlist.length(); |
| | | int i; |
| | | for(i=0; i<nlen; i++) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | int SetAttributeByaddress(xml x,string nodename,string action,string status) |
| | | int SetAttributeByaddress(xml x,xstring nodename,xstring action,xstring status) |
| | | { |
| | | msxml::IXMLDOMElement e; |
| | | msxml::IXMLDOMNodeList nlist = x.GetXmlDoc().selectNodes("//"+nodename+""); |
| | | KXMLDOMElement e; |
| | | KXMLDOMNodeList nlist = x.selectNodes(L"//"+nodename+L""); |
| | | if(nlist) |
| | | { |
| | | |
| | | int nlen = nlist.length; |
| | | int nlen = nlist.length(); |
| | | int i; |
| | | for(i=0; i<nlen; i++) |
| | | { |
| | |
| | | dw_kpinfo.AcceptText(); |
| | | dw_visitp.AcceptText(); |
| | | //xdwtable__ dw_base = new xdwtable__; |
| | | //dw_base.setNativePointer(this.GetControl("dw_base")); |
| | | xdwtable dw = dw_base.FindDwTable("Supplier",0); |
| | | string sStatus = dw.GetItemString(1,"Status",0); |
| | | //dw_base.setNativePointer(this.GetControl(L"dw_base")); |
| | | xdwtable dw = dw_base.FindDwTable(L"Supplier",0); |
| | | xstring sStatus = dw.GetItemString(1,L"Status"); |
| | | int slen = sStatus.length(); |
| | | |
| | | //if (slen >1) |
| | | |
| | | string AdvantageProduct = dw_base.GetItemString(1,"AdvantageProduct"); |
| | | if(AdvantageProduct.rtrim()=="" ) |
| | | xstring AdvantageProduct = dw_base.GetItemString(1,L"AdvantageProduct"); |
| | | if(AdvantageProduct.rtrim()==L"" ) |
| | | { |
| | | alert("优势产品为空!"); |
| | | alert(L"优势产品为空!"); |
| | | return -1; |
| | | } |
| | | string FactoryForPaperCard = dw_base.GetItemString(1,"FactoryForPaperCard"); |
| | | string FactoryForPart = dw_base.GetItemString(1,"FactoryForPart"); |
| | | string FactoryForPacking = dw_base.GetItemString(1,"FactoryForPacking"); |
| | | string FactoryForItem = dw_base.GetItemString(1,"FactoryForItem"); |
| | | string FactoryForMake = dw_base.GetItemString(1,"FactoryForMake"); |
| | | xstring FactoryForPaperCard = dw_base.GetItemString(1,L"FactoryForPaperCard"); |
| | | xstring FactoryForPart = dw_base.GetItemString(1,L"FactoryForPart"); |
| | | xstring FactoryForPacking = dw_base.GetItemString(1,L"FactoryForPacking"); |
| | | xstring FactoryForItem = dw_base.GetItemString(1,L"FactoryForItem"); |
| | | xstring FactoryForMake = dw_base.GetItemString(1,L"FactoryForMake"); |
| | | |
| | | if(FactoryForPaperCard !="Y" && FactoryForPart !="Y" && FactoryForPacking !="Y" && FactoryForItem !="Y" && FactoryForMake !="Y") |
| | | if(FactoryForPaperCard !=L"Y" && FactoryForPart !=L"Y" && FactoryForPacking !=L"Y" && FactoryForItem !=L"Y" && FactoryForMake !=L"Y") |
| | | { |
| | | alert("供应商分组为空!"); |
| | | alert(L"供应商分组为空!"); |
| | | return -1; |
| | | } |
| | | |
| | | if(sStatus=="") |
| | | if(sStatus==L"") |
| | | { |
| | | alert("供应商状态输入有误!"); |
| | | alert(L"供应商状态输入有误!"); |
| | | return -1; |
| | | } |
| | | string sPartyNo = dw.GetItemString(1,"PartyNo",0); |
| | | if (sPartyNo=="" ) |
| | | xstring sPartyNo = dw.GetItemString(1,L"PartyNo"); |
| | | if (sPartyNo==L"" ) |
| | | { |
| | | //sPartyNo = publiccode::GetIdentityNo("Party2"); |
| | | sPartyNo = publiccode::GetIdentityNo("Party2"); |
| | | dw.SetItemString(1,"PartyNo",sPartyNo); |
| | | //alert("供应商编号为空!"); |
| | | //sPartyNo = publiccode::GetIdentityNo(L"Party2"); |
| | | sPartyNo = publiccode::GetIdentityNo(L"Party2"); |
| | | dw.SetItemString(1,L"PartyNo",sPartyNo); |
| | | //alert(L"供应商编号为空!"); |
| | | //return -1; |
| | | } |
| | | |
| | | string ShortName = dw.GetItemString(1,"ShortName",0); |
| | | if(ShortName.rtrim()=="" ) |
| | | xstring ShortName = dw.GetItemString(1,L"ShortName"); |
| | | if(ShortName.rtrim()==L"" ) |
| | | { |
| | | alert("供应商简称为空!"); |
| | | alert(L"供应商简称为空!"); |
| | | return -1; |
| | | } |
| | | string YearEstablished = dw_base.GetItemString(1,"YearEstablished"); |
| | | if(YearEstablished.rtrim()=="" ) |
| | | xstring YearEstablished = dw_base.GetItemString(1,L"YearEstablished"); |
| | | if(YearEstablished.rtrim()==L"" ) |
| | | { |
| | | alert("成立时间为空!"); |
| | | alert(L"成立时间为空!"); |
| | | return -1; |
| | | } |
| | | string LegalPerson = dw_base.GetItemString(1,"LegalPerson"); |
| | | if(LegalPerson.rtrim()=="" ) |
| | | xstring LegalPerson = dw_base.GetItemString(1,L"LegalPerson"); |
| | | if(LegalPerson.rtrim()==L"" ) |
| | | { |
| | | alert("法人代表为空!"); |
| | | alert(L"法人代表为空!"); |
| | | return -1; |
| | | } |
| | | |
| | | string ThirdPartyReport = dw_base.GetItemString(1,"ThirdPartyReport"); |
| | | if(ThirdPartyReport.rtrim()=="" ) |
| | | xstring ThirdPartyReport = dw_base.GetItemString(1,L"ThirdPartyReport"); |
| | | if(ThirdPartyReport.rtrim()==L"" ) |
| | | { |
| | | alert("验厂报告为空!"); |
| | | alert(L"验厂报告为空!"); |
| | | return -1; |
| | | } |
| | | string SupplierSource = dw_base.GetItemString(1,"SupplierSource"); |
| | | if(SupplierSource.rtrim()=="" ) |
| | | xstring SupplierSource = dw_base.GetItemString(1,L"SupplierSource"); |
| | | if(SupplierSource.rtrim()==L"" ) |
| | | { |
| | | alert("供应商来源为空!"); |
| | | alert(L"供应商来源为空!"); |
| | | return -1; |
| | | } |
| | | string Address = dw_base.GetItemString(1,"Address"); |
| | | if(Address.rtrim()=="" ) |
| | | xstring Address = dw_base.GetItemString(1,L"Address"); |
| | | if(Address.rtrim()==L"" ) |
| | | { |
| | | alert("供应商地址为空!"); |
| | | alert(L"供应商地址为空!"); |
| | | return -1; |
| | | } |
| | | string bAddress = dw_base.GetItemString(1,"bAddress"); |
| | | if(bAddress.rtrim()=="" ) |
| | | xstring bAddress = dw_base.GetItemString(1,L"bAddress"); |
| | | if(bAddress.rtrim()==L"" ) |
| | | { |
| | | alert("寄件地址为空!"); |
| | | alert(L"寄件地址为空!"); |
| | | return -1; |
| | | } |
| | | |
| | | |
| | | string sName = dw.GetItemString(1,"Name",0)+""; |
| | | xstring sName = dw.GetItemString(1,L"Name")+L""; |
| | | sName.rtrim(); |
| | | |
| | | //sName = str_replace(sName," ",""); |
| | | if (sName=="") |
| | | //sName = str_replace(sName,L" ",L""); |
| | | if (sName==L"") |
| | | { |
| | | alert("供应商名称为空!"); |
| | | alert(L"供应商名称为空!"); |
| | | return -1; |
| | | } |
| | | else |
| | | { |
| | | xaserverarg arg=new xaserverarg; |
| | | xaserverarg arg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("stype", "Party2"); |
| | | arg.AddArg("svalue", sName); |
| | | arg.AddArg(L"stype", L"Party2"); |
| | | arg.AddArg(L"svalue", sName); |
| | | |
| | | xml x = new xml; |
| | | x.setNativePointer(x.CreateInstance()); |
| | | msxml::IXMLDOMDocument xdoc = x.GetXmlDoc(); |
| | | xml x ; |
| | | |
| | | KXMLDOMDocument xdoc = x; |
| | | dw_base.DwUpdateAllTo(xdoc); |
| | | //msxml::IXMLDOMElement e= x.GetXmlDoc().documentElement; |
| | | //var n = x.GetXmlDoc().selectSingleNode("Supplier[@update.new='1']"); |
| | | //KXMLDOMElement e= x.GetXmlDoc().documentElement; |
| | | //var n = x.GetXmlDoc().selectSingleNode(L"Supplier[@update.new='1']"); |
| | | //if (n) |
| | | if (!maint::m_EntityID) |
| | | { |
| | | arg.AddArg("operate", "update.new"); |
| | | arg.AddArg(L"operate", L"update.new"); |
| | | } |
| | | else |
| | | { |
| | | arg.AddArg("operate", "update.modify"); |
| | | arg.AddArg(L"operate", L"update.modify"); |
| | | } |
| | | string sguid=x.GetXmlDoc().selectSingleNode("Supplier/@guid").text; |
| | | arg.AddArg("sguid", sguid); |
| | | //alert(sguid,"->",maint::m_EntityID); |
| | | xstring sguid=x.selectSingleNode(L"Supplier/@guid").text(); |
| | | arg.AddArg(L"sguid", sguid); |
| | | //alert(sguid,L"->",maint::m_EntityID); |
| | | bool lbRepeated = publiccode::IsRepeated(arg); |
| | | if (lbRepeated) |
| | | { |
| | | alert("供应商名称有重复!"); |
| | | alert(L"供应商名称有重复!"); |
| | | return -1; |
| | | } |
| | | } |
| | | |
| | | /*dw = dw_basegy.FindDwTable("Supplier",0); |
| | | string suserid = xaserver::GetUserId();//publiccode::GetUserInfo().id; |
| | | string susername = publiccode::GetUser(suserid).name; |
| | | string sdate = publiccode::GetCurrentDate(); |
| | | dw.SetItemString(1,"ModifierID",suserid);//Party |
| | | dw.SetItemDisplayString(1,"ModifierID",susername);//Party |
| | | dw.SetItemString(1,"ModifyDate",sdate);*/ |
| | | /*dw = dw_basegy.FindDwTable(L"Supplier",0); |
| | | xstring suserid = xaserver::GetUserId();//publiccode::GetUserInfo().id; |
| | | xstring susername = publiccode::GetUser(suserid).name; |
| | | xstring sdate = publiccode::GetCurrentDate(); |
| | | dw.SetItemString(1,L"ModifierID",suserid);//Party |
| | | dw.SetItemDisplayString(1,L"ModifierID",susername);//Party |
| | | dw.SetItemString(1,L"ModifyDate",sdate);*/ |
| | | |
| | | int i; |
| | | dw = dw_base.FindDwTable("item",0); |
| | | dw = dw_base.FindDwTable(L"item",0); |
| | | for(i=1;i<=dw.GetRowCount();i++) |
| | | { |
| | | string aTemp; |
| | | string aName = dw.GetItemString(i,"Name",0); |
| | | if (aName=="" ) |
| | | xstring aTemp; |
| | | xstring aName = dw.GetItemString(i,L"Name"); |
| | | if (aName==L"" ) |
| | | { |
| | | aTemp=dw.GetItemString(i,"JobTitle",0)+dw.GetItemString(i,"Gender",0)+dw.GetItemString(i,"Mobile",0)+dw.GetItemString(i,"TEL",0)+dw.GetItemString(i,"Email",0)+dw.GetItemString(i,"IM",0)+dw.GetItemString(i,"Remark",0); |
| | | if(aTemp !="") |
| | | aTemp=dw.GetItemString(i,L"JobTitle")+dw.GetItemString(i,L"Gender")+dw.GetItemString(i,L"Mobile")+dw.GetItemString(i,L"TEL")+dw.GetItemString(i,L"Email")+dw.GetItemString(i,L"IM")+dw.GetItemString(i,L"Remark"); |
| | | if(aTemp !=L"") |
| | | { |
| | | alert("联系人名称必填!"); |
| | | alert(L"联系人名称必填!"); |
| | | return -1; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | string aStatus; |
| | | aStatus = dw.GetItemString(i,"Status",0); |
| | | if (aStatus=="") |
| | | xstring aStatus; |
| | | aStatus = dw.GetItemString(i,L"Status"); |
| | | if (aStatus==L"") |
| | | { |
| | | dw.SetItemString(i,"Status","1"); |
| | | dw.SetItemString(i,L"Status",L"1"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /*dw.setNativePointer(dw_base.FindDwTable("item2",0)); |
| | | /*dw.setNativePointer(dw_base.FindDwTable(L"item2",0)); |
| | | for(i=1;i<=dw.GetRowCount();i++) |
| | | { |
| | | string bTemp; |
| | | bTemp=dw.GetItemString(i,"AddressName",0)+dw.GetItemString(i,"Address",0); |
| | | if(bTemp !="" && bTemp != nil) |
| | | xstring bTemp; |
| | | bTemp=dw.GetItemString(i,L"AddressName",0)+dw.GetItemString(i,L"Address",0); |
| | | if(bTemp !=L"" && bTemp != nil) |
| | | { |
| | | if (dw.GetItemString(i,"Status",0)=="" || dw.GetItemString(i,"Status",0)==nil) |
| | | dw.SetItemString(i,"Status","1"); |
| | | if (dw.GetItemString(i,"IdentifyAddressFlag",0)=="" || dw.GetItemString(i,"IdentifyAddressFlag",0)==nil) |
| | | dw.SetItemString(i,"IdentifyAddressFlag","N"); |
| | | if (dw.GetItemString(i,"PrimaryFlag",0)=="" || dw.GetItemString(i,"PrimaryFlag",0)==nil) |
| | | dw.SetItemString(i,"PrimaryFlag","N"); |
| | | if (dw.GetItemString(i,L"Status",0)==L"" || dw.GetItemString(i,L"Status",0)==nil) |
| | | dw.SetItemString(i,L"Status",L"1"); |
| | | if (dw.GetItemString(i,L"IdentifyAddressFlag",0)==L"" || dw.GetItemString(i,L"IdentifyAddressFlag",0)==nil) |
| | | dw.SetItemString(i,L"IdentifyAddressFlag",L"N"); |
| | | if (dw.GetItemString(i,L"PrimaryFlag",0)==L"" || dw.GetItemString(i,L"PrimaryFlag",0)==nil) |
| | | dw.SetItemString(i,L"PrimaryFlag",L"N"); |
| | | } |
| | | }*/ |
| | | |
| | | dw = dw_kpinfo.FindDwTable("item3",0); |
| | | dw = dw_kpinfo.FindDwTable(L"item3",0); |
| | | for(i=1;i<=dw.GetRowCount();i++) |
| | | { |
| | | string cTemp; |
| | | string cName = dw.GetItemString(i,"BankName",0); |
| | | if (cName=="" ) |
| | | xstring cTemp; |
| | | xstring cName = dw.GetItemString(i,L"BankName"); |
| | | if (cName==L"" ) |
| | | { |
| | | cTemp=dw.GetItemString(i,"BankAccountNo",0)+dw.GetItemString(i,"City",0); |
| | | if(cTemp !="") |
| | | cTemp=dw.GetItemString(i,L"BankAccountNo")+dw.GetItemString(i,L"City"); |
| | | if(cTemp !=L"") |
| | | { |
| | | alert("银行名称必填!"); |
| | | alert(L"银行名称必填!"); |
| | | return -1; |
| | | } |
| | | } |
| | | cName = dw.GetItemString(i,"BankAccountNo",0); |
| | | if (cName=="" ) |
| | | cName = dw.GetItemString(i,L"BankAccountNo"); |
| | | if (cName==L"" ) |
| | | { |
| | | cTemp=dw.GetItemString(i,"BankName",0)+dw.GetItemString(i,"City",0); |
| | | if(cTemp !="" ) |
| | | cTemp=dw.GetItemString(i,L"BankName")+dw.GetItemString(i,L"City"); |
| | | if(cTemp !=L"" ) |
| | | { |
| | | alert("银行账号必填!"); |
| | | alert(L"银行账号必填!"); |
| | | return -1; |
| | | } |
| | | } |
| | | else { |
| | | if (dw.GetItemString(i,"Status",0)=="" ) |
| | | dw.SetItemString(i,"Status","1"); |
| | | if (dw.GetItemString(i,L"Status")==L"" ) |
| | | dw.SetItemString(i,L"Status",L"1"); |
| | | } |
| | | } |
| | | |
| | | dw = dw_kpinfo.FindDwTable("Party",0); |
| | | dw = dw_kpinfo.FindDwTable(L"Party",0); |
| | | if (dw) |
| | | { |
| | | xdwtable dw_b = dw_kpinfo.FindDwTable("item3",0); |
| | | xdwtable dw_b = dw_kpinfo.FindDwTable(L"item3",0); |
| | | for(i=1;i<=dw.GetRowCount();i++) |
| | | { |
| | | string skName = dw.GetItemString(i,"Name",0); |
| | | if (skName=="" ) |
| | | xstring skName = dw.GetItemString(i,L"Name"); |
| | | if (skName==L"" ) |
| | | { |
| | | int j; |
| | | for(j=1;j<=dw_b.GetRowCount();j++) |
| | | { |
| | | string kTemp = dw_b.GetItemString(j,"BankName",0)+dw_b.GetItemString(j,"BankAccountNo",0)+""; |
| | | if(kTemp !="" ) |
| | | xstring kTemp = dw_b.GetItemString(j,L"BankName")+dw_b.GetItemString(j,L"BankAccountNo")+L""; |
| | | if(kTemp !=L"" ) |
| | | { |
| | | alert("开票单位名称为空!"); |
| | | alert(L"开票单位名称为空!"); |
| | | return -1; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | xdwtable dw_pc = dw_base.FindDwTable("item"); |
| | | xdwtable dw_pc = dw_base.FindDwTable(L"item"); |
| | | for(int h =1; h <= dw_pc.GetRowCount();h++) |
| | | { |
| | | if(dw_pc.GetItemString(h,"Name")=="") |
| | | if(dw_pc.GetItemString(h,L"Name")==L"") |
| | | { |
| | | alert("请输入联系人姓名!"); |
| | | alert(L"请输入联系人姓名!"); |
| | | return -1; |
| | | } |
| | | if(dw_pc.GetItemString(h,"Mobile")=="") |
| | | if(dw_pc.GetItemString(h,L"Mobile")==L"") |
| | | { |
| | | alert("请输入联系人手机号!"); |
| | | alert(L"请输入联系人手机号!"); |
| | | return -1; |
| | | } |
| | | if(dw_pc.GetItemString(h,"IM")=="") |
| | | if(dw_pc.GetItemString(h,L"IM")==L"") |
| | | { |
| | | alert("请输入联系人QQ号!"); |
| | | alert(L"请输入联系人QQ号!"); |
| | | return -1; |
| | | } |
| | | } |
| | |
| | | |
| | | int OnChangeRowNo(xdwtable dw,int row) |
| | | { |
| | | dw.SetItemString(1, "SeqNo", "1"); |
| | | dw.SetItemString(1, L"SeqNo", L"1"); |
| | | int i; |
| | | for (i=row; i<=dw.GetRowCount(); i++) |
| | | dw.SetItemString(i, "SeqNo", i.toString()); |
| | | dw.SetItemString(i, L"SeqNo", xstring(i)); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | if (!m_layer) return 0; |
| | | int h=m_layer.GetSheetIndex(); |
| | | int nindex = h+1; |
| | | msxml::IXMLDOMElement n = maint::m_configDoc.selectSingleNode("//maint/group[@for='dwviev']/dwview["+nindex.toString()+"]"); |
| | | string sname= n.selectSingleNode("@name").text; |
| | | string stype=n.selectSingleNode("@type").text; |
| | | if (stype == "dwtable") |
| | | KXMLDOMElement n = maint::m_configDoc.selectSingleNode(L"//maint/group[@for='dwviev']/dwview["+xstring(nindex)+L"]"); |
| | | xstring sname= n.selectSingleNode(L"@name").text(); |
| | | xstring stype=n.selectSingleNode(L"@type").text(); |
| | | if (stype == L"dwtable") |
| | | { |
| | | int row; |
| | | int crow; |
| | | xdwtable dw_obj = this.GetControl(sname); |
| | | xdwtable dw_obj = GetControl(sname); |
| | | xdwtable dw = dw_obj.GetCurTable(); |
| | | string dw_n=dw.GetDwName(); |
| | | if(dw_n=="item" || dw_n=="item2" || dw_n=="item3" || dw_n=="item4") |
| | | xstring dw_n=dw.GetDwName(); |
| | | if(dw_n==L"item" || dw_n==L"item2" || dw_n==L"item3" || dw_n==L"item4") |
| | | { |
| | | row = dw.InsertRow(-1); |
| | | if(dw_n=="item2" || dw_n=="item3" || dw_n=="item4") |
| | | if(dw_n==L"item2" || dw_n==L"item3" || dw_n==L"item4") |
| | | { |
| | | OnChangeRowNo(dw,dw.GetRowCount()); |
| | | } |
| | | |
| | | //alert(row.toString()); |
| | | //dw.SetItemString(row,"Status","Y"); |
| | | //dw.SetItemString(row,L"Status",L"Y"); |
| | | } |
| | | if (dw_n=="item3ooo") |
| | | if (dw_n==L"item3ooo") |
| | | { |
| | | dw = dw_obj.FindDwTable("Party",0); |
| | | dw = dw_obj.FindDwTable(L"Party",0); |
| | | crow = dw.GetRow(); |
| | | string scName; |
| | | xstring scName; |
| | | if (crow >0) |
| | | scName = dw.GetItemString(crow,"Name",0); |
| | | scName = dw.GetItemString(crow,L"Name"); |
| | | row = dw.InsertRow(-1); |
| | | if (scName !="" ) |
| | | dw.SetItemString(dw.GetRowCount(),"Name",scName); |
| | | if (scName !=L"" ) |
| | | dw.SetItemString(dw.GetRowCount(),L"Name",scName); |
| | | } |
| | | if (dw_n=="Party") |
| | | if (dw_n==L"Party") |
| | | { |
| | | row = dw.InsertRow(-1); |
| | | crow = dw.GetRow(); |
| | | //alert(crow.toString()); |
| | | dw.SetItemString(crow,"loadpic","上传图片"); |
| | | dw.SetItemString(crow,"dispic","查看"); |
| | | dw.SetItemString(crow,L"loadpic",L"上传图片"); |
| | | dw.SetItemString(crow,L"dispic",L"查看"); |
| | | } |
| | | } |
| | | else if (stype=="dwgrid") |
| | | else if (stype==L"dwgrid") |
| | | { |
| | | xdwgrid dw_objx = new xdwgrid; |
| | | dw_objx = this.GetControl(sname); |
| | | dw_objx = GetControl(sname); |
| | | int xrow = dw_objx.InsertRow(-1); |
| | | //dw_objx.SetItemString(xrow,"Status","Y"); |
| | | //dw_objx.SetItemString(xrow,L"Status",L"Y"); |
| | | } |
| | | |
| | | return 1; |
| | |
| | | if (!m_layer) return 0; |
| | | int h=m_layer.GetSheetIndex(); |
| | | int nindex = h+1; |
| | | msxml::IXMLDOMElement n = maint::m_configDoc.selectSingleNode("//maint/group[@for='dwviev']/dwview["+nindex.toString()+"]"); |
| | | string sname= n.selectSingleNode("@name").text; |
| | | string stype=n.selectSingleNode("@type").text; |
| | | if (stype=="dwtable") |
| | | KXMLDOMElement n = maint::m_configDoc.selectSingleNode(L"//maint/group[@for='dwviev']/dwview["+ xstring(nindex) +L"]"); |
| | | xstring sname= n.selectSingleNode(L"@name").text(); |
| | | xstring stype=n.selectSingleNode(L"@type").text(); |
| | | if (stype==L"dwtable") |
| | | { |
| | | int row; |
| | | int crow; |
| | | xdwtable dw_obj = this.GetControl(sname); |
| | | xdwtable dw_obj = GetControl(sname); |
| | | xdwtable dw = dw_obj.GetCurTable(); |
| | | string dw_n=dw.GetDwName(); |
| | | if(dw_n=="item" || dw_n=="item2" || dw_n=="item3" || dw_n=="item4") |
| | | xstring dw_n=dw.GetDwName(); |
| | | if(dw_n==L"item" || dw_n==L"item2" || dw_n==L"item3" || dw_n==L"item4") |
| | | { |
| | | row=dw.GetRow(); |
| | | if (row == 1) row = 0; |
| | | crow = dw.InsertRow(row); |
| | | //dw.SetItemString(crow,"Status","Y"); |
| | | //dw.SetItemString(crow,L"Status",L"Y"); |
| | | } |
| | | if (dw_n=="Party") |
| | | if (dw_n==L"Party") |
| | | { |
| | | row=dw.GetRow(); |
| | | if (row == 1) row = 0; |
| | | crow = dw.InsertRow(row); |
| | | crow = dw.GetRow(); |
| | | dw.SetItemString(crow,"loadpic","上传图片"); |
| | | dw.SetItemString(crow,"dispic","查看"); |
| | | dw.SetItemString(crow,L"loadpic",L"上传图片"); |
| | | dw.SetItemString(crow,L"dispic",L"查看"); |
| | | } |
| | | } |
| | | return 1; |
| | |
| | | if (!m_layer) return 0; |
| | | int h=m_layer.GetSheetIndex(); |
| | | int nindex = h+1; |
| | | msxml::IXMLDOMElement n = maint::m_configDoc.selectSingleNode("//maint/group[@for='dwviev']/dwview["+nindex.toString()+"]"); |
| | | string sname= n.selectSingleNode("@name").text; |
| | | string stype=n.selectSingleNode("@type").text; |
| | | if (stype=="dwtable") |
| | | KXMLDOMElement n = maint::m_configDoc.selectSingleNode(L"//maint/group[@for='dwviev']/dwview["+ xstring(nindex) +L"]"); |
| | | xstring sname= n.selectSingleNode(L"@name").text(); |
| | | xstring stype=n.selectSingleNode(L"@type").text(); |
| | | if (stype==L"dwtable") |
| | | { |
| | | int row; |
| | | |
| | | xdwtable dw_obj = this.GetControl(sname); |
| | | xdwtable dw_obj = GetControl(sname); |
| | | xdwtable dw = dw_obj.GetCurTable(); |
| | | string dw_n=dw.GetDwName(); |
| | | if(dw_n=="item" || dw_n=="item2" || dw_n=="item3" || dw_n=="item4"|| dw_n=="Party") |
| | | xstring dw_n=dw.GetDwName(); |
| | | if(dw_n==L"item" || dw_n==L"item2" || dw_n==L"item3" || dw_n==L"item4"|| dw_n==L"Party") |
| | | { |
| | | row=dw.GetRow(); |
| | | //if(row != 1) |
| | |
| | | dw.DeleteRow(row); |
| | | //} |
| | | } |
| | | if (dw_n=="Party0") |
| | | if (dw_n==L"Party0") |
| | | { |
| | | row=dw.GetRow(); |
| | | //if(row != 1) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | string onpartyadjust(string val) |
| | | xstring onpartyadjust(xstring val) |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(x.CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | xml x; |
| | | |
| | | xaserverarg arg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("content",val); |
| | | arg.AddArg(L"content",val); |
| | | //alert(val); |
| | | //string sguid = xdoc.selectSingleNode("@guid").text; |
| | | string suserid = xaserver::GetUserId(); |
| | | string sdate = publiccode::GetCurrentDate(); |
| | | //arg.AddArg("sguid",sguid); |
| | | arg.AddArg("suserid",suserid); |
| | | arg.AddArg("sdate",sdate); |
| | | if (url::post("/sale/data/"+GetEntityName(1)+"/pref/partyadjust",arg.GetString(),x) != 1) |
| | | //xstring sguid = xdoc.selectSingleNode(L"@guid").text(); |
| | | xstring suserid = xaserver::GetUserId(); |
| | | xstring sdate = publiccode::GetCurrentDate(); |
| | | //arg.AddArg(L"sguid",sguid); |
| | | arg.AddArg(L"suserid",suserid); |
| | | arg.AddArg(L"sdate",sdate); |
| | | if (xurl::post(L"/sale/data/"+GetEntityName(1)+L"/pref/partyadjust",arg.GetString(),x) != 1) |
| | | { |
| | | alert(x.GetXmlDoc().text); |
| | | alert(x.text()); |
| | | return val; |
| | | }else |
| | | { |
| | | string s = x.GetXml(); |
| | | xstring s = x.xml(); |
| | | //alert(s); |
| | | return s; |
| | | } |
| | | } |
| | | |
| | | string GetEntityData(int pr) |
| | | xstring GetEntityData(LPARAM pr) |
| | | { |
| | | string val; |
| | | xml x = new xml; |
| | | x.setNativePointer(x.CreateInstance()); |
| | | msxml::IXMLDOMDocument xdoc = x.GetXmlDoc(); |
| | | msxml::IXMLDOMNodeList nlist = maint::m_configDoc.SelectNodes("//maint/group[@for='dwviev']/dwview[@name !='dw_check' and @name !='dw_supgoods']"); |
| | | xstring val; |
| | | xml x ; |
| | | |
| | | KXMLDOMDocument xdoc = x; |
| | | KXMLDOMNodeList nlist = maint::m_configDoc.selectNodes(L"//maint/group[@for='dwviev']/dwview[@name !='dw_check' and @name !='dw_supgoods']"); |
| | | int index; |
| | | int nlen = nlist.length; |
| | | int nlen = nlist.length(); |
| | | if(nlen>0) |
| | | { |
| | | for(index=0;index<nlen;index++) |
| | | { |
| | | msxml::IXMLDOMElement e = nlist.item(index); |
| | | string sname= e.selectSingleNode("@name").text; |
| | | string stype=e.selectSingleNode("@type").text; |
| | | if (stype=="dwtable") |
| | | KXMLDOMElement e = nlist.item(index); |
| | | xstring sname= e.selectSingleNode(L"@name").text(); |
| | | xstring stype=e.selectSingleNode(L"@type").text(); |
| | | if (stype==L"dwtable") |
| | | { |
| | | xdwtable dw_obj = this.GetControl(sname); |
| | | xdwtable dw_obj = GetControl(sname); |
| | | dw_obj.AcceptText(); |
| | | if (index==0) |
| | | { |
| | | //Address |
| | | xml xdd = new xml; |
| | | xdd.setNativePointer(xdd.CreateInstance()); |
| | | string bAddressID = ""+dw_base.GetItemString(1,"bAddressID"); |
| | | if (bAddressID==" ") |
| | | xml xdd ; |
| | | |
| | | xstring bAddressID = L""+dw_base.GetItemString(1,L"bAddressID"); |
| | | if (bAddressID==L" ") |
| | | { |
| | | dw_base.SetItemString(1,"bAddressID",publiccode::GetGuid()); |
| | | dw_base.SetItemString(1,"bAddressName","邮寄地址"); |
| | | dw_base.SetItemString(1,"bStatus","1"); |
| | | dw_base.SetItemString(1,"bPrimaryFlag","N"); |
| | | dw_base.SetItemString(1,"bIdentifyAddressFlag","N"); |
| | | dw_base.DwUpdateAllTo(xdd.GetXmlDoc()); |
| | | string bAddress = ""+dw_base.GetItemString(1,"bAddress"); |
| | | if ( bAddress !="") |
| | | SetAttributeByaddress(xdd,"bAddress","update.new","1"); |
| | | xdoc = xdd.GetXmlDoc(); |
| | | dw_base.SetItemString(1,L"bAddressID",publiccode::GetGuid()); |
| | | dw_base.SetItemString(1,L"bAddressName",L"邮寄地址"); |
| | | dw_base.SetItemString(1,L"bStatus",L"1"); |
| | | dw_base.SetItemString(1,L"bPrimaryFlag",L"N"); |
| | | dw_base.SetItemString(1,L"bIdentifyAddressFlag",L"N"); |
| | | dw_base.DwUpdateAllTo(xdd); |
| | | xstring bAddress = L""+dw_base.GetItemString(1,L"bAddress"); |
| | | if ( bAddress !=L"") |
| | | SetAttributeByaddress(xdd,L"bAddress",L"update.new",L"1"); |
| | | KXMLDOMDocument xdoc = xdd; |
| | | } |
| | | else |
| | | {dw_obj.DwUpdateAllTo(xdoc); |
| | |
| | | xml__ xchk = new xml__; |
| | | xchk.setNativePointer(xchk.CreateInstance()); |
| | | dw_obj.DwUpdateAllTo(xchk.GetXmlDoc()); |
| | | SetAttributeByaddress(xchk,"item3","update.modify","1"); |
| | | SetAttributeByaddress(xchk,"isdeleted","update.modify","1"); |
| | | SetAttributeByaddress(xchk,L"item3",L"update.modify",L"1"); |
| | | SetAttributeByaddress(xchk,L"isdeleted",L"update.modify",L"1"); |
| | | xdoc = xchk.GetXmlDoc(); |
| | | }*/ |
| | | else |
| | |
| | | } |
| | | else |
| | | { |
| | | xdwgrid dw_objx = this.GetControl(sname); |
| | | xdwgrid dw_objx = GetControl(sname); |
| | | dw_objx.AcceptText(); |
| | | dw_objx.DwUpdateAllTo(xdoc); |
| | | } |
| | |
| | | return ""; |
| | | /*xml__ x1 = new xml__; |
| | | x1.setNativePointer(x1.CreateInstance()); |
| | | x1.LoadXml("<a/>"); |
| | | msxml::IXMLDOMElement ele = x1.GetXmlDoc(); |
| | | var root = xdoc.getElementsByTagName("Name").item(0); |
| | | x1.LoadXml(L"<a/>"); |
| | | KXMLDOMElement ele = x1.GetXmlDoc(); |
| | | var root = xdoc.getElementsByTagName(L"Name").item(0); |
| | | root.appendChild(ele);*/ |
| | | val = xdoc.xml ; |
| | | val = xdoc.xml() ; |
| | | //alert(val); |
| | | val = onpartyadjust(xdoc.xml); |
| | | val = onpartyadjust(xdoc.xml()); |
| | | //alert(val); |
| | | return val; |
| | | } |
| | |
| | | return 0; |
| | | } |
| | | |
| | | int ProcessFlowAction0(string comdid, int pr) |
| | | int ProcessFlowAction0(xstring comdid, int pr) |
| | | { |
| | | string action = comdid.mid(comdid.find("action:",0)+7,9999); |
| | | xaserverarg arg = new xaserverarg ; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | xml x = new xml; |
| | | x.setNativePointer(xml ::CreateInstance()); |
| | | xstring action = comdid.mid(comdid.find(L"action:",0)+7,9999); |
| | | xaserverarg& arg = *new xaserverarg; |
| | | |
| | | xml x ; |
| | | |
| | | |
| | | string aurl = "/workflow/query/actioninfo/"+action; |
| | | xstring aurl = L"/workflow/query/actioninfo/"+action; |
| | | |
| | | if(url::get(aurl, "", x) != 1) |
| | | if(xurl::get(aurl, L"", x) != 1) |
| | | return -1; |
| | | int nlen ; |
| | | int i = 0; |
| | | string name; |
| | | string worknode; |
| | | string how; |
| | | string state; |
| | | msxml::IXMLDOMElement e; |
| | | xstring name; |
| | | xstring worknode; |
| | | xstring how; |
| | | xstring state; |
| | | KXMLDOMElement e; |
| | | //参数要求 |
| | | msxml::IXMLDOMNodeList nlist = x.GetXmlDoc().selectNodes("//params/param"); |
| | | nlen = nlist.length; |
| | | KXMLDOMNodeList nlist = x.selectNodes(L"//params/param"); |
| | | nlen = nlist.length(); |
| | | for(i=0; i<nlen; i++) |
| | | { |
| | | e = nlist.item(i); |
| | | name = e.selectSingleNode("@name").text; |
| | | how = e.selectSingleNode("@how").text; |
| | | if(how=="EntityID") |
| | | name = e.selectSingleNode(L"@name").text(); |
| | | how = e.selectSingleNode(L"@how").text(); |
| | | if(how==L"EntityID") |
| | | arg.AddArg(name, GetEntityID(pr)); |
| | | else if(how=="Entity" || how == "EntityData") |
| | | else if(how==L"Entity" || how == L"EntityData") |
| | | arg.AddArg(name, GetEntityData(pr)); |
| | | //"CHeckAskMsg" |
| | | //"CHeckMsg" |
| | | } |
| | | arg.AddArg("action.entity",GetEntityName(pr)); |
| | | arg.AddArg(L"action.entity",GetEntityName(pr)); |
| | | //动作 |
| | | if (x.GetXmlDoc().selectSingleNode("//view.action[1]")) |
| | | if (x.selectSingleNode(L"//view.action[1]")) |
| | | { |
| | | msxml::IXMLDOMElement n = x.GetXmlDoc().selectSingleNode("//view.action[1]"); |
| | | KXMLDOMElement n = x.selectSingleNode(L"//view.action[1]"); |
| | | if(n) |
| | | { |
| | | |
| | | name = n.selectSingleNode("@name").text; |
| | | //worknode = n.selectSingleNode("@worknode").text; |
| | | name = n.selectSingleNode(L"@name").text(); |
| | | //worknode = n.selectSingleNode(L"@worknode").text(); |
| | | worknode = GetEntityWorkNode(pr,name); |
| | | arg.AddArg("do",name); |
| | | arg.AddArg(L"do",name); |
| | | |
| | | if(worknode !="") |
| | | if(worknode !=L"") |
| | | { |
| | | openUrl(worknode,arg); |
| | | openUrl(worknode,&arg); |
| | | } |
| | | else |
| | | { |
| | | alert("Warn: Please configure worknode for action "+ name +"."); |
| | | alert(L"Warn: Please configure worknode for action "+ name +L"."); |
| | | return 1; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //url::post("/workflow/action/Supplier/bill.update",arg.GetString(),x); |
| | | xml x1 = new xml; |
| | | x1.setNativePointer(x1.CreateInstance()); |
| | | //if (url::post("/workflow/action/"+GetEntityName(pr)+"/"+action,arg.GetString(),x1) != 1) |
| | | if(url::post("/sale/data/SupplierV3/entity/owner/save", arg.GetString(),x)!=1) |
| | | //url::post(L"/workflow/action/Supplier/bill.update",arg.GetString(),x); |
| | | xml x1 ; |
| | | |
| | | //if (url::post(L"/workflow/action/"+GetEntityName(pr)+L"/"+action,arg.GetString(),x1) != 1) |
| | | if(xurl::post(L"/sale/data/SupplierV3/entity/owner/save", arg.GetString(),x)!=1) |
| | | { |
| | | if (x1.GetXmlDoc()) |
| | | if (x1.xml()) |
| | | { |
| | | string error = x1.GetXmlDoc().text; |
| | | xstring error = x1.text(); |
| | | //alert(error); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //alert(x1.GetXml()); |
| | | if(x1.GetXmlDoc().selectSingleNode("error")) |
| | | if(x1.selectSingleNode(L"error")) |
| | | { |
| | | alert("保存出错2!"); |
| | | alert(L"保存出错2!"); |
| | | return 0; |
| | | } |
| | | } |
| | | win32::MessageBox(GetHWND(),"保存成功!","提示",0); |
| | | MessageBoxW(GetHWND(),L"保存成功!",L"提示",0); |
| | | dw_base.ResetUpdateStatus(); |
| | | dw_kpinfo.ResetUpdateStatus(); |
| | | dw_visitp.ResetUpdateStatus(); |
| | |
| | | |
| | | int r1() |
| | | { |
| | | msxml::IXMLDOMNodeList nlist = maint::m_configDoc.SelectNodes("//maint/group[@for='dwviev']/dwview"); |
| | | KXMLDOMNodeList nlist = maint::m_configDoc.selectNodes(L"//maint/group[@for='dwviev']/dwview"); |
| | | int index; |
| | | int nlen = nlist.length; |
| | | int nlen = nlist.length(); |
| | | if(nlen>0) |
| | | { |
| | | for(index=0;index<nlen;index++) |
| | | { |
| | | msxml::IXMLDOMElement e = nlist.item(index); |
| | | string sname= e.selectSingleNode("@name").text; |
| | | string stype=e.selectSingleNode("@type").text; |
| | | if (stype=="dwtable") |
| | | KXMLDOMElement e = nlist.item(index); |
| | | xstring sname= e.selectSingleNode(L"@name").text(); |
| | | xstring stype=e.selectSingleNode(L"@type").text(); |
| | | if (stype==L"dwtable") |
| | | { |
| | | xdwtable dw_obj = this.GetControl(sname); |
| | | xdwtable dw_obj = GetControl(sname); |
| | | |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("EntityID", this.GetEntityID(1)); |
| | | xaserverarg& arg = *new xaserverarg; |
| | | |
| | | arg.AddArg(L"EntityID", GetEntityID(1)); |
| | | |
| | | xml x1 = new xml; |
| | | x1.setNativePointer(xml ::CreateInstance()); |
| | | string dataUrl = "/sale/data/"+GetEntityName(1)+"/entity/maint" ; |
| | | xml x1 ; |
| | | |
| | | xstring dataUrl = L"/sale/data/"+GetEntityName(1)+L"/entity/maint" ; |
| | | getUrl(dataUrl,arg.GetString(),x1); |
| | | dw_obj.Retrieve(x1); |
| | | |
| | |
| | | |
| | | int r2() |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(x.CreateInstance()); |
| | | msxml::IXMLDOMDocument xdoc = x.GetXmlDoc(); |
| | | xml x; |
| | | |
| | | KXMLDOMDocument xdoc = x; |
| | | |
| | | //dw_base.DwUpdateAllTo(xdoc); |
| | | msxml::IXMLDOMNodeList nlist = maint::m_configDoc.SelectNodes("//maint/group[@for='dwviev']/dwview"); |
| | | KXMLDOMNodeList nlist = maint::m_configDoc.selectNodes(L"//maint/group[@for='dwviev']/dwview"); |
| | | int index; |
| | | int nlen = nlist.length; |
| | | int nlen = nlist.length(); |
| | | if(nlen>0) |
| | | { |
| | | for(index=0;index<nlen;index++) |
| | | { |
| | | msxml::IXMLDOMElement e = nlist.item(index); |
| | | string sname= e.selectSingleNode("@name").text; |
| | | string stype=e.selectSingleNode("@type").text; |
| | | if (stype=="dwtable") |
| | | KXMLDOMElement e = nlist.item(index); |
| | | xstring sname= e.selectSingleNode(L"@name").text(); |
| | | xstring stype=e.selectSingleNode(L"@type").text(); |
| | | if (stype==L"dwtable") |
| | | { |
| | | xdwtable dw_obj = this.GetControl(sname); |
| | | xdwtable dw_obj = GetControl(sname); |
| | | dw_obj.DwUpdateAllToDiff(xdoc); |
| | | m_diffstr = xdoc.xml; |
| | | m_diffstr = xdoc.xml(); |
| | | //alert(m_diffstr); |
| | | break; |
| | | } |
| | |
| | | |
| | | int r3() |
| | | { |
| | | if(m_diffstr=="") return 1; |
| | | xml x = new xml; |
| | | x.setNativePointer(x.CreateInstance()); |
| | | x.LoadXml(m_diffstr); |
| | | msxml::IXMLDOMDocument xdoc = x.GetXmlDoc(); |
| | | if(m_diffstr==L"") return 1; |
| | | xml x ; |
| | | |
| | | x.loadXML(m_diffstr); |
| | | KXMLDOMDocument xdoc = x; |
| | | |
| | | //dw_base.DwUpdateAllTo(xdoc); |
| | | msxml::IXMLDOMNodeList nlist = maint::m_configDoc.SelectNodes("//maint/group[@for='dwviev']/dwview"); |
| | | KXMLDOMNodeList nlist = maint::m_configDoc.selectNodes(L"//maint/group[@for='dwviev']/dwview"); |
| | | int index; |
| | | int nlen = nlist.length; |
| | | int nlen = nlist.length(); |
| | | if(nlen>0) |
| | | { |
| | | for(index=0;index<nlen;index++) |
| | | { |
| | | msxml::IXMLDOMElement e = nlist.item(index); |
| | | string sname= e.selectSingleNode("@name").text; |
| | | string stype=e.selectSingleNode("@type").text; |
| | | if (stype=="dwtable") |
| | | KXMLDOMElement e = nlist.item(index); |
| | | xstring sname= e.selectSingleNode(L"@name").text(); |
| | | xstring stype=e.selectSingleNode(L"@type").text(); |
| | | if (stype==L"dwtable") |
| | | { |
| | | xdwtable dw_obj = this.GetControl(sname); |
| | | xdwtable dw_obj = GetControl(sname); |
| | | dw_obj.RetrieveDiff(xdoc); |
| | | dw_obj.Redraw(); |
| | | break; |
| | |
| | | |
| | | int test() |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(x.CreateInstance()); |
| | | dw_kpinfo.DwUpdateAllTo(x.GetXmlDoc()); |
| | | xml x ; |
| | | |
| | | dw_kpinfo.DwUpdateAllTo(x); |
| | | //dw_visitp.dwUpdateAllTo(x.GetXmlDoc()); |
| | | //dw_kpinfo.ClearAdvanceString(1,1); |
| | | //dw_kpinfo.ClearNoteString(1,1); |
| | |
| | | //dw_kpinfo.ExpandMarginRow(2,1); |
| | | //dw_kpinfo.ExpandRow(2,3); |
| | | //dw_kpinfo.GetDwType(); ??? |
| | | //string s = dw_kpinfo.GetDwXPath(); //Supplier |
| | | //msxml::IXMLDOMElement e = dw_kpinfo.GetElement(); //alert(e.xml); <xcell state="run" name="dw_kpinfo"/> |
| | | //string s = dw_kpinfo.GetGuid(1); |
| | | //string s = dw_kpinfo.GetHtml(); ??? |
| | | //xstring s = dw_kpinfo.GetDwXPath(); //Supplier |
| | | //KXMLDOMElement e = dw_kpinfo.GetElement(); //alert(e.xml); <xcell state=L"run" name=L"dw_kpinfo"/> |
| | | //xstring s = dw_kpinfo.GetGuid(1); |
| | | //xstring s = dw_kpinfo.GetHtml(); ??? |
| | | //int i = dw_kpinfo.GetId(); |
| | | //int i = dw_kpinfo.GetXNode(); |
| | | //dw_kpinfo.SetGuid(1,"5CF56D30-C02C-4CC0-971B-57894236816A"); |
| | | //dw_kpinfo.SetGuid(1,L"5CF56D30-C02C-4CC0-971B-57894236816A"); |
| | | } |
| | | |
| | | int OnMoveup() |
| | |
| | | if (!m_layer) return 0; |
| | | int h=m_layer.GetSheetIndex(); |
| | | int nindex = h+1; |
| | | msxml::IXMLDOMElement n = maint::m_configDoc.selectSingleNode("//maint/group[@for='dwviev']/dwview["+nindex.toString()+"]"); |
| | | string sname= n.selectSingleNode("@name").text; |
| | | string stype=n.selectSingleNode("@type").text; |
| | | if (stype=="dwtable") |
| | | KXMLDOMElement n = maint::m_configDoc.selectSingleNode(L"//maint/group[@for='dwviev']/dwview["+xstring(nindex)+L"]"); |
| | | xstring sname= n.selectSingleNode(L"@name").text(); |
| | | xstring stype=n.selectSingleNode(L"@type").text(); |
| | | if (stype==L"dwtable") |
| | | { |
| | | xdwtable dw_obj = this.GetControl(sname); |
| | | xdwtable dw_obj = GetControl(sname); |
| | | xdwtable dw = dw_obj.GetCurTable(); |
| | | string dw_n=dw.GetDwName(); |
| | | if(dw_n=="item3") |
| | | xstring dw_n=dw.GetDwName(); |
| | | if(dw_n==L"item3") |
| | | { |
| | | int row=dw.GetRow(); |
| | | if (row == 1) row = 0; |
| | | int crow = dw.InsertRow(row); |
| | | //dw. |
| | | //dw.SetItemString(crow,"Status","Y"); |
| | | //dw.SetItemString(crow,L"Status",L"Y"); |
| | | } |
| | | } |
| | | return 1; |
| | |
| | | |
| | | int xxx() |
| | | { |
| | | //msxml::IXMLDOMElement xframeElement = GetElement(); |
| | | //msxml::IXMLDOMNode xpage = xframeElement.selectSingleNode("//xpage"); |
| | | //KXMLDOMElement xframeElement = GetElement(); |
| | | //KXMLDOMNode xpage = xframeElement.selectSingleNode(L"//xpage"); |
| | | //alert(xframeElement.xml); |
| | | /*string xfNodeAgentArea = "layers"; |
| | | /*xstring xfNodeAgentArea = L"layers"; |
| | | xnode__ anode = GetAgentNode(xfNodeAgentArea); |
| | | msxml::IXMLDOMElement xframeElement = GetElement(); |
| | | KXMLDOMElement xframeElement = GetElement(); |
| | | alert(anode.GetXml()); |
| | | msxml::IXMLDOMNode layers = xframeElement.selectSingleNode("//layers"); |
| | | msxml::IXMLDOMNodeList nlist; |
| | | KXMLDOMNode layers = xframeElement.selectSingleNode(L"//layers"); |
| | | KXMLDOMNodeList nlist; |
| | | int index; |
| | | int nlen; |
| | | msxml::IXMLDOMElement ele; |
| | | KXMLDOMElement ele; |
| | | if(layers) |
| | | { |
| | | nlist = layers.SelectNodes(".//layer"); |
| | | nlen = nlist.length; |
| | | alert("nlen=",nlen.toString()); |
| | | nlist = layers.SelectNodes(L".//layer"); |
| | | nlen = nlist.length(); |
| | | alert(L"nlen=L",nlen.toString()); |
| | | } |
| | | |
| | | //string tools; |
| | | //xstring tools; |
| | | //SetAgentNodeContent(anode, tools);*/ |
| | | return 1; |
| | | } |
| | |
| | | { |
| | | int rec =OnPreSave(); |
| | | if (rec== -1) return 0; |
| | | ProcessFlowAction0("action:bill.update",1); |
| | | ProcessFlowAction0(L"action:bill.update",1); |
| | | return 1; |
| | | } |
| | | int PreOnCmdDispatch(string comdid) |
| | | int PreOnCmdDispatch(xstring comdid) |
| | | { |
| | | if(comdid=="action:xxx") return xxx(); |
| | | if(comdid=="retrieve") return r1(); |
| | | if(comdid=="retrievediff") return r3(); |
| | | if(comdid=="updatediff") return r2(); |
| | | if(comdid=="test") return test(); |
| | | if(comdid==L"action:xxx") return xxx(); |
| | | if(comdid==L"retrieve") return r1(); |
| | | if(comdid==L"retrievediff") return r3(); |
| | | if(comdid==L"updatediff") return r2(); |
| | | if(comdid==L"test") return test(); |
| | | |
| | | //<action id="bill.update" caption="保存" scene="maint"/> |
| | | if(comdid.find("action:bill.update",0)>=0) |
| | | //<action id=L"bill.update" caption=L"保存" scene=L"maint"/> |
| | | if(comdid.find(L"action:bill.update",0)>=0) |
| | | { |
| | | string suserid = xaserver::GetUserId(); |
| | | xstring suserid = xaserver::GetUserId(); |
| | | PUser pp = publiccode::GetUser(suserid); |
| | | string userno = pp.no; |
| | | if(userno !="admin") |
| | | xstring userno = pp.no; |
| | | if(userno !=L"admin") |
| | | { |
| | | int rec =OnPreSave(); |
| | | if (rec== -1) return 0;//返回0——不在执行以下代码;返回其他——执行以下代码。 |
| | |
| | | ProcessFlowAction0(comdid,1); |
| | | return 1; |
| | | } |
| | | if(comdid.find("action:bill.addrow",0)>=0) OnAddRow(); |
| | | if(comdid.find("action:bill.insertrow",0)>=0) OnInsertRow(); |
| | | if(comdid.find("action:bill.deleterow",0)>=0) OnDeleteRow(); |
| | | if(comdid.find("action:bill.moveup",0)>=0) OnMoveup(); |
| | | if(comdid.find("action:bill.movedown",0)>=0) OnMovedown(); |
| | | if(comdid.find(L"action:bill.addrow",0)>=0) OnAddRow(); |
| | | if(comdid.find(L"action:bill.insertrow",0)>=0) OnInsertRow(); |
| | | if(comdid.find(L"action:bill.deleterow",0)>=0) OnDeleteRow(); |
| | | if(comdid.find(L"action:bill.moveup",0)>=0) OnMoveup(); |
| | | if(comdid.find(L"action:bill.movedown",0)>=0) OnMovedown(); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | int OnDoubleClicked(ref TNotifyEvent evt,int p) |
| | | int OnDoubleClicked(TEvent* evt,int p) |
| | | { |
| | | ref DWNMHDR hdr = evt.pnmh; |
| | | int row = hdr.row; |
| | | DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; |
| | | int row = hdr->row; |
| | | |
| | | |
| | | /*if(row < 1 || row > list::dw_list.GetRowCount()) |
| | | return 1; |
| | | |
| | |
| | | int i; |
| | | for (i=0; i < s; i++){ |
| | | combobox cb = new combobox; |
| | | cb.setNativePointer(this.GetControl("value"+i.ToString())); |
| | | cb.setNativePointer(this.GetControl(L"value"+i.ToString())); |
| | | if(hwnd == cb.GetId()) |
| | | break; |
| | | }*/ |
| | | return 1; |
| | | } |
| | | |
| | | int OnItemChangedkp(ref TNotifyEvent evt,int p) |
| | | int OnItemChangedkp(TEvent* evt,int p) |
| | | { |
| | | ref DWNMHDR hdr = evt.pnmh; |
| | | string colname=hdr.colname; |
| | | string coldata = hdr.data; |
| | | int row = hdr.row; |
| | | DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; |
| | | xstring colname = hdr->colname; |
| | | xstring value = hdr->data; |
| | | int row = hdr->row; |
| | | |
| | | xdwtable dw = dw_kpinfo.FindDwTable("item3",0); |
| | | |
| | | xdwtable dw = dw_kpinfo.FindDwTable(L"item3",0); |
| | | if (dw) |
| | | { |
| | | row=dw.GetRow(); |
| | | string sdate = publiccode::GetCurrentDate(); |
| | | dw.SetItemString(row,"ModifyDate",sdate); |
| | | xstring sdate = publiccode::GetCurrentDate(); |
| | | dw.SetItemString(row,L"ModifyDate",sdate); |
| | | } |
| | | |
| | | } |
| | | |
| | | int OnItemChanged3(ref TNotifyEvent evt,int p) |
| | | int OnItemChanged3(TEvent* evt,int p) |
| | | { |
| | | ref DWNMHDR hdr = evt.pnmh; |
| | | string colname=hdr.colname; |
| | | string coldata = hdr.data; |
| | | int row = hdr.row; |
| | | if(colname=="DeveloperID") |
| | | |
| | | DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; |
| | | xstring colname = hdr->colname; |
| | | xstring coldata = hdr->data; |
| | | xstring value = hdr->data; |
| | | int row = hdr->row; |
| | | |
| | | if(colname==L"DeveloperID") |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(xml ::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | |
| | | xaserverarg arg ; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("guid",coldata); |
| | | if (url::get("/sale/data/"+GetEntityName(1)+"/pref/getAssignment",arg.GetString(),x) == 1) |
| | | arg.AddArg(L"guid",coldata); |
| | | if (xurl::get(L"/sale/data/"+GetEntityName(1)+L"/pref/getAssignment",arg.GetString(),x) == 1) |
| | | { |
| | | msxml::IXMLDOMElement e=x.GetXmlDoc().documentElement; |
| | | string sOrgID = e.selectSingleNode("OrgID").text; |
| | | string sOrgName = e.selectSingleNode("OrgName").text; |
| | | dw_basegy.SetItemString(1,"devOrgID",sOrgID); |
| | | dw_basegy.SetItemDisplayString(1,"devOrgID",sOrgName); |
| | | KXMLDOMElement e=x.documentElement(); |
| | | xstring sOrgID = e.selectSingleNode(L"OrgID").text(); |
| | | xstring sOrgName = e.selectSingleNode(L"OrgName").text(); |
| | | dw_basegy.SetItemString(1,L"devOrgID",sOrgID); |
| | | dw_basegy.SetItemDisplayString(1,L"devOrgID",sOrgName); |
| | | } |
| | | } |
| | | if(colname=="CreatorID") |
| | | if(colname==L"CreatorID") |
| | | { |
| | | xml x2 = new xml; |
| | | x2.setNativePointer(xml ::CreateInstance()); |
| | | xaserverarg arg2 = new xaserverarg; |
| | | xml x2 ; |
| | | |
| | | xaserverarg arg2 ; |
| | | arg2.setNativePointer(arg2.CreateInstance()); |
| | | arg2.AddArg("guid",coldata); |
| | | if (url::get("/sale/data/"+GetEntityName(1)+"/pref/getAssignment",arg2.GetString(),x2) == 1) |
| | | arg2.AddArg(L"guid",coldata); |
| | | if (xurl::get(L"/sale/data/"+GetEntityName(1)+L"/pref/getAssignment",arg2.GetString(),x2) == 1) |
| | | { |
| | | msxml::IXMLDOMElement e2=x2.GetXmlDoc().documentElement; |
| | | string sOrgID2 = e2.selectSingleNode("OrgID").text; |
| | | string sOrgName2 = e2.selectSingleNode("OrgName").text; |
| | | dw_basegy.SetItemString(1,"OrgID",sOrgID2); |
| | | dw_basegy.SetItemDisplayString(1,"OrgID",sOrgName2); |
| | | KXMLDOMElement e2=x2.documentElement(); |
| | | xstring sOrgID2 = e2.selectSingleNode(L"OrgID").text(); |
| | | xstring sOrgName2 = e2.selectSingleNode(L"OrgName").text(); |
| | | dw_basegy.SetItemString(1,L"OrgID",sOrgID2); |
| | | dw_basegy.SetItemDisplayString(1,L"OrgID",sOrgName2); |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | int OnItemChanged(ref TNotifyEvent evt,int p) |
| | | int OnItemChanged(TEvent* evt, int p) |
| | | { |
| | | ref DWNMHDR hdr = evt.pnmh; |
| | | string colname=hdr.colname; |
| | | string coldata = hdr.data; |
| | | int row = hdr.row; |
| | | if(colname=="DeveloperID") |
| | | |
| | | DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; |
| | | xstring colname = hdr->colname; |
| | | xstring coldata = hdr->data; |
| | | xstring value = hdr->data; |
| | | int row = hdr->row; |
| | | |
| | | if(colname==L"DeveloperID") |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(xml ::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | xml x ; |
| | | |
| | | xaserverarg arg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("guid",coldata); |
| | | if (url::get("/sale/data/"+GetEntityName(1)+"/pref/getAssignment",arg.GetString(),x) == 1) |
| | | arg.AddArg(L"guid",coldata); |
| | | if (xurl::get(L"/sale/data/"+GetEntityName(1)+L"/pref/getAssignment",arg.GetString(),x) == 1) |
| | | { |
| | | msxml::IXMLDOMElement e=x.GetXmlDoc().documentElement; |
| | | string sOrgID = e.selectSingleNode("OrgID").text; |
| | | string sOrgName = e.selectSingleNode("OrgName").text; |
| | | dw_base.SetItemString(1,"devOrgID",sOrgID); |
| | | dw_base.SetItemDisplayString(1,"devOrgID",sOrgName); |
| | | KXMLDOMElement e=x.documentElement(); |
| | | xstring sOrgID = e.selectSingleNode(L"OrgID").text(); |
| | | xstring sOrgName = e.selectSingleNode(L"OrgName").text(); |
| | | dw_base.SetItemString(1,L"devOrgID",sOrgID); |
| | | dw_base.SetItemDisplayString(1,L"devOrgID",sOrgName); |
| | | } |
| | | } |
| | | if(colname=="CreatorID") |
| | | if(colname==L"CreatorID") |
| | | { |
| | | xml x2 = new xml; |
| | | x2.setNativePointer(xml ::CreateInstance()); |
| | | xaserverarg arg2 = new xaserverarg; |
| | | xml x2; |
| | | |
| | | xaserverarg arg2 ; |
| | | arg2.setNativePointer(arg2.CreateInstance()); |
| | | arg2.AddArg("guid",coldata); |
| | | if (url::get("/sale/data/"+GetEntityName(1)+"/pref/getAssignment",arg2.GetString(),x2) == 1) |
| | | arg2.AddArg(L"guid",coldata); |
| | | if (xurl::get(L"/sale/data/"+GetEntityName(1)+L"/pref/getAssignment",arg2.GetString(),x2) == 1) |
| | | { |
| | | msxml::IXMLDOMElement e2=x2.GetXmlDoc().documentElement; |
| | | string sOrgID2 = e2.selectSingleNode("OrgID").text; |
| | | string sOrgName2 = e2.selectSingleNode("OrgName").text; |
| | | dw_base.SetItemString(1,"OrgID",sOrgID2); |
| | | dw_base.SetItemDisplayString(1,"OrgID",sOrgName2); |
| | | KXMLDOMElement e2=x2.documentElement(); |
| | | xstring sOrgID2 = e2.selectSingleNode(L"OrgID").text(); |
| | | xstring sOrgName2 = e2.selectSingleNode(L"OrgName").text(); |
| | | dw_base.SetItemString(1,L"OrgID",sOrgID2); |
| | | dw_base.SetItemDisplayString(1,L"OrgID",sOrgName2); |
| | | } |
| | | } |
| | | if(colname=="isdeleted") |
| | | if(colname==L"isdeleted") |
| | | { |
| | | //xml xchk = new xml; |
| | | //xchk.setNativePointer(xchk.CreateInstance()); |
| | | //var xdoc = xchk.GetXmlDoc(); |
| | | // dw_kpinfo.DwUpdateAllTo(xdoc); |
| | | //SetAttributeByxml(xchk,"isdeleted","update.modify","1"); |
| | | //dw_kpinfo.SetColumnProp("isdeleted","update.modify","1"); |
| | | //SetAttributeByxml(xchk,L"isdeleted",L"update.modify",L"1"); |
| | | //dw_kpinfo.SetColumnProp(L"isdeleted",L"update.modify",L"1"); |
| | | //xdwtable dw = new xdwtable; |
| | | //dw.setNativePointer(dw_kpinfo.FindDwTable("item3",0)); |
| | | //dw.SetItemString(row,"isdeleted",coldata); |
| | | //dw.setNativePointer(dw_kpinfo.FindDwTable(L"item3",0)); |
| | | //dw.SetItemString(row,L"isdeleted",coldata); |
| | | } |
| | | if(colname == "ProvinceCode" || colname == "City" || colname == "District") |
| | | if(colname == L"ProvinceCode" || colname == L"City" || colname == L"District") |
| | | { |
| | | if(colname == "ProvinceCode") |
| | | if(colname == L"ProvinceCode") |
| | | { |
| | | dw_base.SetItemString(row,"City",""); |
| | | dw_base.SetItemString(row,"District",""); |
| | | dw_base.SetItemDisplayString(row,"City",""); |
| | | dw_base.SetItemDisplayString(row,"District",""); |
| | | dw_base.SetItemString(row,L"City",L""); |
| | | dw_base.SetItemString(row,L"District",L""); |
| | | dw_base.SetItemDisplayString(row,L"City",L""); |
| | | dw_base.SetItemDisplayString(row,L"District",L""); |
| | | } |
| | | if(colname == "City") |
| | | if(colname == L"City") |
| | | { |
| | | dw_base.SetItemString(row,"District",""); |
| | | dw_base.SetItemDisplayString(row,"District",""); |
| | | dw_base.SetItemString(row,L"District",L""); |
| | | dw_base.SetItemDisplayString(row,L"District",L""); |
| | | } |
| | | string provinceCode = dw_base.GetItemDisplayString(row,"ProvinceCode"); |
| | | string city = dw_base.GetItemDisplayString(row,"City"); |
| | | string district = dw_base.GetItemDisplayString(row,"District"); |
| | | dw_base.SetItemString(row,"Address",provinceCode+city+district); |
| | | dw_base.SetItemString(row,"bAddress",provinceCode+city+district); |
| | | xstring provinceCode = dw_base.GetItemDisplayString(row,L"ProvinceCode"); |
| | | xstring city = dw_base.GetItemDisplayString(row,L"City"); |
| | | xstring district = dw_base.GetItemDisplayString(row,L"District"); |
| | | dw_base.SetItemString(row,L"Address",provinceCode+city+district); |
| | | dw_base.SetItemString(row,L"bAddress",provinceCode+city+district); |
| | | } |
| | | if(colname == "Address") |
| | | if(colname == L"Address") |
| | | { |
| | | dw_base.SetItemString(row,"bAddress",dw_base.GetItemString(1,"Address")); |
| | | dw_base.SetItemString(row,L"bAddress",dw_base.GetItemString(1,L"Address")); |
| | | } |
| | | |
| | | xdwtable dw = dw_base.FindDwTable("Supplier",0); |
| | | xdwtable dw = dw_base.FindDwTable(L"Supplier",0); |
| | | if (dw) |
| | | { |
| | | string suserid = xaserver::GetUserId();//publiccode::GetUserInfo().id; |
| | | string susername = publiccode::GetUser(suserid).name; |
| | | string sdate = publiccode::GetCurrentDate(); |
| | | dw.SetItemString(1,"ModifierID",suserid);//Party |
| | | dw.SetItemDisplayString(1,"ModifierID",susername);//Party |
| | | dw.SetItemString(1,"ModifyDate",sdate); |
| | | xstring suserid = xaserver::GetUserId();//publiccode::GetUserInfo().id; |
| | | xstring susername = publiccode::GetUser(suserid).name; |
| | | xstring sdate = publiccode::GetCurrentDate(); |
| | | dw.SetItemString(1,L"ModifierID",suserid);//Party |
| | | dw.SetItemDisplayString(1,L"ModifierID",susername);//Party |
| | | dw.SetItemString(1,L"ModifyDate",sdate); |
| | | } |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | //--------- |
| | | int UpLoad(string name) |
| | | int UpLoad(xstring name) |
| | | { |
| | | string str = name.mid(0,2); |
| | | xstring str = name.mid(0,2); |
| | | str = str.upper(); |
| | | //alert(str); |
| | | int ret1 = xaserver::Upload("supplier"+str, name+".jpg", this.GetHWND(),"",false); |
| | | int ret1 = xaserver::Upload(L"supplier"+str, name+L".jpg", GetHWND(),L"",false); |
| | | //alert(ret1); |
| | | return ret1; |
| | | } |
| | | |
| | | int OnkpItemClick(ref TNotifyEvent evt,int p) |
| | | int OnkpItemClick(TEvent* evt, int p) |
| | | { |
| | | xdwtable dw = dw_kpinfo.FindDwTable("Party",0); |
| | | xdwtable dw = dw_kpinfo.FindDwTable(L"Party",0); |
| | | /*xdwtable__ dw1 = new xdwtable__; |
| | | dw1.setNativePointer(dw_base.FindDwTable("item3",0)); */ |
| | | ref DWNMHDR hdr = evt.pnmh; |
| | | string value = hdr.data; |
| | | dw1.setNativePointer(dw_base.FindDwTable(L"item3",0)); */ |
| | | DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; |
| | | xstring value = hdr->data; |
| | | int row = dw.GetRow();// hdr.row; |
| | | string xrow = row.toString(); |
| | | xaserverarg arg=new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | xstring xrow = xstring(row); |
| | | xaserverarg& arg=*new xaserverarg; |
| | | |
| | | if(value == "上传图片") |
| | | |
| | | if(value == L"上传图片") |
| | | { |
| | | string strguid = publiccode::GetGuid(); |
| | | xstring strguid = publiccode::GetGuid(); |
| | | //alert(strguid); |
| | | int ret1 =UpLoad(strguid); |
| | | if(ret1 == -1) |
| | |
| | | |
| | | if(ret1 == 0) |
| | | { |
| | | alert("上传图片失败"); |
| | | alert(L"上传图片失败"); |
| | | return -1; |
| | | } |
| | | else |
| | | { |
| | | alert("上传图片成功"); |
| | | string strimage=dw.GetItemString(row,"ImageList1"); |
| | | alert(L"上传图片成功"); |
| | | xstring strimage=dw.GetItemString(row,L"ImageList1"); |
| | | //alert(strimage); |
| | | if(strimage=="") |
| | | strimage="<ImageList></ImageList>"; |
| | | xml y=new xml; |
| | | y.setNativePointer(xml::CreateInstance()); |
| | | y.LoadXml(strimage); |
| | | if(strimage==L"") |
| | | strimage=L"<ImageList></ImageList>"; |
| | | xml y; |
| | | |
| | | y.loadXML(strimage); |
| | | |
| | | msxml::IXMLDOMElement ele= y.GetXmlDoc().documentElement; |
| | | KXMLDOMElement ele= y.documentElement(); |
| | | |
| | | xml x=new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | string xx = "<ImageList><image>"+strguid+".jpg</image></ImageList>"; |
| | | x.LoadXml(xx); |
| | | msxml::IXMLDOMElement e= x.GetXmlDoc().selectSingleNode("//image"); |
| | | xml x; |
| | | |
| | | xstring xx = L"<ImageList><image>"+strguid+L".jpg</image></ImageList>"; |
| | | x.loadXML(xx); |
| | | KXMLDOMElement e= x.selectSingleNode(L"//image"); |
| | | ele.appendChild(e); |
| | | dw.SetItemString(row,"ImageList1",ele.xml); |
| | | dw.SetItemString(row,L"ImageList1",ele.xml()); |
| | | //dw.Redraw(); |
| | | } |
| | | } |
| | | if(value == "查看") |
| | | if(value == L"查看") |
| | | { |
| | | arg.AddArg("src",dw.GetItemString(row,"ImageList1")); |
| | | arg.AddArg(L"src",dw.GetItemString(row,L"ImageList1")); |
| | | int pa = arg.getNativePointer(); |
| | | openUrl("/sale/view/"+GetEntityName(1)+"/xpage/supplierattachment/picture", pa); |
| | | //alert(arg.GetArgString("src")); |
| | | dw.SetItemString(row,"ImageList1",arg.GetArgString("src")); |
| | | openUrl(L"/sale/view/"+GetEntityName(1)+L"/xpage/supplierattachment/picture", pa); |
| | | //alert(arg.GetArgString(L"src")); |
| | | dw.SetItemString(row,L"ImageList1",arg.GetArgString(L"src")); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | int OnItemClick(ref TNotifyEvent evt,int p) |
| | | int OnItemClick(TEvent* evt, int p) |
| | | { |
| | | ref DWNMHDR hdr1 = trust(evt.pnmh as ref DWNMHDR); |
| | | string colname1= hdr1.colname; |
| | | xstring colname1= hdr1.colname; |
| | | |
| | | ref DWNMHDR hdr = evt.pnmh; |
| | | string value = hdr.data; |
| | | DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; |
| | | xstring value = hdr->data; |
| | | //alert(value); |
| | | //xdwtable dw = dw_base.FindDwTable("item2",0); |
| | | //xdwtable dw1 = dw_base.FindDwTable("item3",0); |
| | | //xdwtable dw = dw_base.FindDwTable(L"item2",0); |
| | | //xdwtable dw1 = dw_base.FindDwTable(L"item3",0); |
| | | xaserverarg arg=new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | |
| | | /*if(value == "上传附件") |
| | | /*if(value == L"上传附件") |
| | | { |
| | | string strguid = publiccode::GetGuid(); |
| | | xstring strguid = publiccode::GetGuid(); |
| | | //alert(strguid); |
| | | int ret1 = UpLoad(strguid); |
| | | if(ret1 == -1) |
| | |
| | | |
| | | if(ret1 == 0) |
| | | { |
| | | alert("上传附件失败"); |
| | | alert(L"上传附件失败"); |
| | | return -1; |
| | | } |
| | | else |
| | | { |
| | | alert("上传附件成功"); |
| | | string strimage=dw_base.GetItemString(1,"ImageList1"); |
| | | alert(L"上传附件成功"); |
| | | xstring strimage=dw_base.GetItemString(1,L"ImageList1"); |
| | | //alert(strimage); |
| | | if(strimage=="") |
| | | strimage="<ImageList></ImageList>"; |
| | | if(strimage==L"") |
| | | strimage=L"<ImageList></ImageList>"; |
| | | xml y=new xml; |
| | | y.setNativePointer(xml::CreateInstance()); |
| | | y.LoadXml(strimage); |
| | | |
| | | msxml::IXMLDOMElement ele= y.GetXmlDoc().documentElement; |
| | | KXMLDOMElement ele= y.GetXmlDoc().documentElement; |
| | | |
| | | xml x=new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | string xx = "<ImageList><image>"+strguid+".jpg</image></ImageList>"; |
| | | xstring xx = L"<ImageList><image>"+strguid+L".jpg</image></ImageList>"; |
| | | x.LoadXml(xx); |
| | | msxml::IXMLDOMElement e= x.GetXmlDoc().selectSingleNode("//image"); |
| | | KXMLDOMElement e= x.GetXmlDoc().selectSingleNode(L"//image"); |
| | | ele.appendChild(e); |
| | | dw_base.SetItemString(1,"ImageList1",ele.xml); |
| | | dw_base.SetItemString(1,L"ImageList1",ele.xml); |
| | | dw_base.Redraw(); |
| | | //alert(ele.xml); |
| | | } |
| | | } |
| | | if(value == "查看") |
| | | if(value == L"查看") |
| | | { |
| | | arg.AddArg("src",dw_base.GetItemString(1,"ImageList1")); |
| | | //alert(dw_base.GetItemString(1,"ImageList1")); |
| | | arg.AddArg(L"src",dw_base.GetItemString(1,L"ImageList1")); |
| | | //alert(dw_base.GetItemString(1,L"ImageList1")); |
| | | int pa = arg.getNativePointer(); |
| | | //alert(GetEntityName(1)); |
| | | openUrl("/sale/view/"+GetEntityName(1)+"/xpage/supplierattachment/picture", pa); |
| | | //alert(arg.GetArgString("src")); |
| | | openUrl(L"/sale/view/"+GetEntityName(1)+L"/xpage/supplierattachment/picture", pa); |
| | | //alert(arg.GetArgString(L"src")); |
| | | arg.setNativePointer(pa); |
| | | dw_base.SetItemString(1,"ImageList1",arg.GetArgString("src")); |
| | | dw_base.SetItemString(1,L"ImageList1",arg.GetArgString(L"src")); |
| | | }*/ |
| | | /*else if(value == "产品信息") |
| | | /*else if(value == L"产品信息") |
| | | { |
| | | int start=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex("MainProducts")); |
| | | int start=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex(L"MainProducts")); |
| | | dw_base.ExpandCellRow(start,start + dw.GetRowCount() +1); |
| | | } |
| | | else if(value == "设备产能") |
| | | else if(value == L"设备产能") |
| | | { |
| | | int start1=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex("MainProducts")); |
| | | int begin=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex("DeveloperID")); |
| | | int start1=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex(L"MainProducts")); |
| | | int begin=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex(L"DeveloperID")); |
| | | dw_base.ExpandCellRow(start1 + dw.GetRowCount() +3,begin -2); |
| | | //dw_base.ExpandMarginRow(-22,-20); |
| | | }*/ |
| | | if(value == "供应商资料附件") |
| | | if(value == L"供应商资料附件") |
| | | { |
| | | arg.AddArg("entityid",dw_base.GetGuid(1)); |
| | | arg.AddArg("ApplyStatus",dw_base.GetItemString(1,"ApplyStatus")); |
| | | arg.AddArg(L"entityid",dw_base.GetGuid(1)); |
| | | arg.AddArg(L"ApplyStatus",dw_base.GetItemString(1,L"ApplyStatus")); |
| | | int p3=cast(arg as int) ; |
| | | OpenWindow("dev:xpage[maint.Document.Supplier.v3.vx]", p3); |
| | | OpenWindow(L"dev:xpage[maint.Document.Supplier.v3.vx]", p3); |
| | | } |
| | | if(value == "验厂报告附件") |
| | | if(value == L"验厂报告附件") |
| | | { |
| | | arg.AddArg("entityid",dw_base.GetGuid(1)); |
| | | arg.AddArg("ApplyStatus",dw_base.GetItemString(1,"ApplyStatus")); |
| | | arg.AddArg(L"entityid",dw_base.GetGuid(1)); |
| | | arg.AddArg(L"ApplyStatus",dw_base.GetItemString(1,L"ApplyStatus")); |
| | | int p7=cast(arg as int) ; |
| | | OpenWindow("dev:xpage[maint.Document.SupplierEx.v3.vx]", p7); |
| | | OpenWindow(L"dev:xpage[maint.Document.SupplierEx.v3.vx]", p7); |
| | | } |
| | | else if(value == "合作信息") |
| | | else if(value == L"合作信息") |
| | | { |
| | | int start2=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex("Status")); |
| | | int start2=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex(L"Status")); |
| | | dw_base.ExpandCellRow(start2,start2 +1); |
| | | //dw_base.ExpandMarginRow(-22,-20); |
| | | } |
| | | if (colname1 == "ThirdPartyReport") |
| | | if (colname1 == L"ThirdPartyReport") |
| | | { |
| | | xaserverarg arg1 = new xaserverarg; |
| | | arg1.setNativePointer(arg.CreateInstance()); |
| | | int p2=cast(arg1 as int) ; |
| | | dw_base.SetItemString(1,"ThirdPartyReport",""); |
| | | OpenWindow("dev:xpage[Inspection.Supplie.vx]", p2); |
| | | string str1 = arg1.GetArgString("ThirdPartyReport"); |
| | | if(str1 != ""){ |
| | | dw_base.SetItemString(1,"ThirdPartyReport",str1); |
| | | dw_base.SetItemString(1,L"ThirdPartyReport",L""); |
| | | OpenWindow(L"dev:xpage[Inspection.Supplie.vx]", p2); |
| | | xstring str1 = arg1.GetArgString(L"ThirdPartyReport"); |
| | | if(str1 != L""){ |
| | | dw_base.SetItemString(1,L"ThirdPartyReport",str1); |
| | | dw_base.Redraw(); |
| | | } |
| | | } |
| | | if (colname1 == "PayType") |
| | | if (colname1 == L"PayType") |
| | | { |
| | | xaserverarg arg2 = new xaserverarg; |
| | | arg2.setNativePointer(arg.CreateInstance()); |
| | | int p1=cast(arg2 as int) ; |
| | | OpenWindow("dev:xpage[paymen.Supplier.vx]", p1); |
| | | string str = arg2.GetArgString("PayType"); |
| | | if(str != ""){ |
| | | dw_base.SetItemString(1,"PayType",str); |
| | | OpenWindow(L"dev:xpage[paymen.Supplier.vx]", p1); |
| | | xstring str = arg2.GetArgString(L"PayType"); |
| | | if(str != L""){ |
| | | dw_base.SetItemString(1,L"PayType",str); |
| | | dw_base.Redraw(); |
| | | } |
| | | } |
| | |
| | | |
| | | int OnSheetChanged(ref TNotifyEvent evt,int p) |
| | | { |
| | | string suserid = xaserver::GetUserId(); |
| | | xstring suserid = xaserver::GetUserId(); |
| | | PUser pp = publiccode::GetUser(suserid); |
| | | string userno = pp.no; |
| | | if (userno == "admin" ) |
| | | xstring userno = pp.no; |
| | | if (userno == L"admin" ) |
| | | { |
| | | dw_base.SetReadOnly(false); |
| | | dw_kpinfo.SetReadOnly(false); |
| | |
| | | |
| | | int OnItemClickExS(ref TNotifyEvent evt,int p) |
| | | { |
| | | xdwtable dw = dw_visitp.FindDwTable("item4",0); |
| | | xdwtable dw = dw_visitp.FindDwTable(L"item4",0); |
| | | |
| | | |
| | | ref DWNMHDR hdr = cast(evt.pnmh as ref DWNMHDR); |
| | | string value = hdr.data; |
| | | xstring value = hdr.data; |
| | | int row = hdr.row; |
| | | //alert(value); |
| | | xaserverarg arg=new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | |
| | | if(value == "附件上传") |
| | | if(value == L"附件上传") |
| | | { |
| | | if(dw.GetGuid(dw.GetRow())=="") |
| | | if(dw.GetGuid(dw.GetRow())==L"") |
| | | { |
| | | alert("保存后在上传!"); |
| | | alert(L"保存后在上传!"); |
| | | return 1; |
| | | } |
| | | |
| | | arg.AddArg("entityid",dw.GetGuid(dw.GetRow())); |
| | | //arg.AddArg("ApplyStatus",dw_base.GetItemString(1,"ApplyStatus")); |
| | | arg.AddArg(L"entityid",dw.GetGuid(dw.GetRow())); |
| | | //arg.AddArg(L"ApplyStatus",dw_base.GetItemString(1,L"ApplyStatus")); |
| | | int p4=cast(arg as int) ; |
| | | OpenWindow("dev:xpage[maint.Document.Customer.v3.vx]", p4); |
| | | OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]", p4); |
| | | return 1; |
| | | } |
| | | |
| | | if(value == "人员") |
| | | if(value == L"人员") |
| | | { |
| | | xaserverarg arg2 = new xaserverarg; |
| | | arg2.setNativePointer(arg2.CreateInstance()); |
| | | xaserverarg parg2 = GetParam(); |
| | | OpenWindow("dev:xpage[SupplierUserGroupPersonSelect.vx]",cast(arg2 as int)); |
| | | OpenWindow(L"dev:xpage[SupplierUserGroupPersonSelect.vx]",cast(arg2 as int)); |
| | | |
| | | if(arg2.GetArgString("comdid")=="xmOk") |
| | | if(arg2.GetArgString(L"comdid")==L"xmOk") |
| | | { |
| | | string data = arg2.GetArgString("data"); |
| | | xstring data = arg2.GetArgString(L"data"); |
| | | xml x2 = new xml; |
| | | x2.setNativePointer(xml::CreateInstance()); |
| | | x2.LoadXml(data); |
| | | msxml::IXMLDOMNodeList nodes = x2.GetXmlDoc().selectNodes("/root/item"); |
| | | KXMLDOMNodeList nodes = x2.GetXmlDoc().selectNodes(L"/root/item"); |
| | | trace(x2.GetXml()); |
| | | |
| | | int len = nodes.length; |
| | | int len = nodes.length(); |
| | | |
| | | string Names = ""; |
| | | xstring Names = L""; |
| | | for(int i=0;i<len; i++) |
| | | { |
| | | msxml::IXMLDOMElement t= nodes.item(i); |
| | | KXMLDOMElement t= nodes.item(i); |
| | | |
| | | if(t.getAttribute("Name")) |
| | | if(t.getAttribute(L"Name")) |
| | | { |
| | | string Name = t.getAttribute("Name"); |
| | | if(Names=="") |
| | | xstring Name = t.getAttribute(L"Name"); |
| | | if(Names==L"") |
| | | Names = Name; |
| | | else if(Names.find(Name) < 0) Names+=","+Name; |
| | | else if(Names.find(Name) < 0) Names+=L",L"+Name; |
| | | } |
| | | } |
| | | dw.SetItemString(dw.GetRow(),"ItemType",Names); |
| | | dw.SetItemString(dw.GetRow(),L"ItemType",Names); |
| | | |
| | | } |
| | | return 1; |
| | |
| | | |
| | | int PostOnAttachEvent() |
| | | { |
| | | AttachEvent("dw_base","DWV_CLICKED",OnItemClick); |
| | | //AttachEvent("tab_1", "LYSN_SELECTEDSHEET",OnSheetChanged); |
| | | AttachEvent("dw_kpinfo","DWV_CLICKED",OnkpItemClick); |
| | | AttachEvent("dw_kpinfo","DWV_ITEMCHANGED",OnItemChangedkp); |
| | | AttachEvent("dw_base","DWV_ITEMCHANGED",OnItemChanged); |
| | | AttachEvent("dw_basegy","DWV_ITEMCHANGED",OnItemChanged3); |
| | | AttachEvent("dw_visitp","DWV_CLICKED",OnItemClickExS); |
| | | AttachEvent(L"dw_base",L"DWV_CLICKED",OnItemClick); |
| | | //AttachEvent(L"tab_1", L"LYSN_SELECTEDSHEET",OnSheetChanged); |
| | | AttachEvent(L"dw_kpinfo",L"DWV_CLICKED",OnkpItemClick); |
| | | AttachEvent(L"dw_kpinfo",L"DWV_ITEMCHANGED",OnItemChangedkp); |
| | | AttachEvent(L"dw_base",L"DWV_ITEMCHANGED",OnItemChanged); |
| | | AttachEvent(L"dw_basegy",L"DWV_ITEMCHANGED",OnItemChanged3); |
| | | AttachEvent(L"dw_visitp",L"DWV_CLICKED",OnItemClickExS); |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | int OnInit() |
| | | { |
| | | dw_base = this.GetControl("dw_base"); |
| | | dw_base = this.GetControl(L"dw_base"); |
| | | dw_base.SetColHeaderHeight(16); |
| | | dw_kpinfo = this.GetControl("dw_kpinfo"); |
| | | dw_kpinfo = this.GetControl(L"dw_kpinfo"); |
| | | dw_kpinfo.SetColHeaderHeight(16); |
| | | dw_visitp = this.GetControl("dw_visitp"); |
| | | dw_visitp = this.GetControl(L"dw_visitp"); |
| | | dw_visitp.SetColHeaderHeight(16); |
| | | |
| | | //xdwtable dw_check = this.GetControl("dw_check"); |
| | | //xdwtable dw_check = this.GetControl(L"dw_check"); |
| | | //dw_check.SetColHeaderHeight(16); |
| | | //dw_check.SetReadOnly(true); |
| | | dw_basegy = this.GetControl("dw_basegy"); |
| | | dw_supgoods = this.GetControl("dw_supgoods"); |
| | | m_layer = GetControl("tab_1"); |
| | | xsheet = GetControl("tab_1"); |
| | | dw_basegy = this.GetControl(L"dw_basegy"); |
| | | dw_supgoods = this.GetControl(L"dw_supgoods"); |
| | | m_layer = GetControl(L"tab_1"); |
| | | xsheet = GetControl(L"tab_1"); |
| | | |
| | | //string userno = xaserver::GetUserNo(); |
| | | string ApplyStatus=dw_base.GetItemString(1,"ApplyStatus"); |
| | | //xstring userno = xaserver::GetUserNo(); |
| | | xstring ApplyStatus=dw_base.GetItemString(1,L"ApplyStatus"); |
| | | |
| | | //if(userno !="00601" && userno !="admin" && userno !="00701") |
| | | //if(userno !=L"00601" && userno !=L"admin" && userno !=L"00701") |
| | | //{ |
| | | //alert(ApplyStatus); |
| | | if(ApplyStatus =="已批准") |
| | | if(ApplyStatus ==L"已批准") |
| | | { |
| | | dw_visitp.SetReadOnly(false); |
| | | } |
| | |
| | | |
| | | if (!maint::m_EntityID) |
| | | { |
| | | string suserid = xaserver::GetUserId(); |
| | | string susername = publiccode::GetUser(suserid).name; |
| | | string sdate = publiccode::GetCurrentDate(); |
| | | string sAddressID = publiccode::GetGuid(); |
| | | dw_base.SetItemString(1,"CreatorID",suserid);//Party |
| | | dw_base.SetItemDisplayString(1,"CreatorID",susername); |
| | | dw_base.SetItemString(1,"CreateDate",sdate); |
| | | //string sCountryCode = dw.GetItemString(1,"CountryCode",0); |
| | | //if (sCountryCode=="" || sCountryCode== nil) |
| | | dw_base.SetItemString(1,"CountryCode","142"); |
| | | dw_base.SetItemDisplayString(1,"CountryCode","中国"); |
| | | dw_base.SetItemString(1,"Status","1"); |
| | | dw_base.SetItemString(1,"Type","2");//PartyAccount 供应商 |
| | | dw_base.SetItemString(1,"aIdentifyAddressFlag","Y");//PartyAddress 主地址 |
| | | dw_base.SetItemString(1,"aPrimaryFlag","Y"); |
| | | dw_base.SetItemString(1,"aStatus","1"); |
| | | dw_base.SetItemString(1,"bAddressID",sAddressID);//PartyAddress 寄件地址 |
| | | dw_base.SetItemString(1,"bAddressName","寄件地址"); |
| | | dw_base.SetItemString(1,"bIdentifyAddressFlag","N"); |
| | | dw_base.SetItemString(1,"bPrimaryFlag","N"); |
| | | dw_base.SetItemString(1,"bStatus","1"); |
| | | xstring suserid = xaserver::GetUserId(); |
| | | xstring susername = publiccode::GetUser(suserid).name; |
| | | xstring sdate = publiccode::GetCurrentDate(); |
| | | xstring sAddressID = publiccode::GetGuid(); |
| | | dw_base.SetItemString(1,L"CreatorID",suserid);//Party |
| | | dw_base.SetItemDisplayString(1,L"CreatorID",susername); |
| | | dw_base.SetItemString(1,L"CreateDate",sdate); |
| | | //xstring sCountryCode = dw.GetItemString(1,L"CountryCode",0); |
| | | //if (sCountryCode==L"" || sCountryCode== nil) |
| | | dw_base.SetItemString(1,L"CountryCode",L"142"); |
| | | dw_base.SetItemDisplayString(1,L"CountryCode",L"中国"); |
| | | dw_base.SetItemString(1,L"Status",L"1"); |
| | | dw_base.SetItemString(1,L"Type",L"2");//PartyAccount 供应商 |
| | | dw_base.SetItemString(1,L"aIdentifyAddressFlag",L"Y");//PartyAddress 主地址 |
| | | dw_base.SetItemString(1,L"aPrimaryFlag",L"Y"); |
| | | dw_base.SetItemString(1,L"aStatus",L"1"); |
| | | dw_base.SetItemString(1,L"bAddressID",sAddressID);//PartyAddress 寄件地址 |
| | | dw_base.SetItemString(1,L"bAddressName",L"寄件地址"); |
| | | dw_base.SetItemString(1,L"bIdentifyAddressFlag",L"N"); |
| | | dw_base.SetItemString(1,L"bPrimaryFlag",L"N"); |
| | | dw_base.SetItemString(1,L"bStatus",L"1"); |
| | | //dw_base.ResetUpdateStatus(); |
| | | //dw_check.SetItemDisplayString(1,"BusinessLicenceFlag","营业执照"); |
| | | //dw_check.SetItemDisplayString(1,"TaxRegistrationFlag","税务登记证复印件"); |
| | | //dw_check.SetItemDisplayString(1,"OrganizationCodeFlag","组织机构代码"); |
| | | //dw_check.SetItemDisplayString(1,L"BusinessLicenceFlag",L"营业执照"); |
| | | //dw_check.SetItemDisplayString(1,L"TaxRegistrationFlag",L"税务登记证复印件"); |
| | | //dw_check.SetItemDisplayString(1,L"OrganizationCodeFlag",L"组织机构代码"); |
| | | } |
| | | //dw_base.SetColHeaderHeight(0); |
| | | //dw_base.SetRowSelectorWidth(0); |
| | |
| | | //PostOnAttachEvent(); |
| | | maint::onloaded(); |
| | | OnInit(); |
| | | string suserid = xaserver::GetUserId(); |
| | | xstring suserid = xaserver::GetUserId(); |
| | | PUser p = publiccode::GetUser(suserid); |
| | | string deptname = p.deptname; |
| | | string userno = p.no; |
| | | string jobname=p.jobname; |
| | | string ApplyStatusEx=dw_base.GetItemString(1,"ApplyStatus"); |
| | | xstring deptname = p.deptname; |
| | | xstring userno = p.no; |
| | | xstring jobname=p.jobname; |
| | | xstring ApplyStatusEx=dw_base.GetItemString(1,L"ApplyStatus"); |
| | | //alert(ApplyStatusEx); |
| | | if (userno == "admin" ||userno == "00601" || userno == "00701" || ApplyStatusEx=="修改") |
| | | if (userno == L"admin" ||userno == L"00601" || userno == L"00701" || ApplyStatusEx==L"修改") |
| | | { |
| | | dw_base.SetReadOnly(false); |
| | | dw_kpinfo.SetReadOnly(false); |
| | |
| | | dw_kpinfo.SetReadOnly(true); |
| | | //dw_visitp.SetReadOnly(true); |
| | | } |
| | | /*if(deptname != "产品供应部" && userno != "admin") |
| | | /*if(deptname != L"产品供应部" && userno != L"admin") |
| | | { |
| | | xdwtable dw = dw_base.FindDwTable("item2",0); |
| | | int start=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex("MainProducts")); |
| | | xdwtable dw = dw_base.FindDwTable(L"item2",0); |
| | | int start=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex(L"MainProducts")); |
| | | alert(start.toString()); |
| | | //dw_base.ExpandCellRow(start,dw.GetRowCount()); |
| | | alert("2"); |
| | | int start1=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex("MainProducts")); |
| | | int begin=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex("DeveloperID")); |
| | | alert("2"); |
| | | alert(L"2"); |
| | | int start1=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex(L"MainProducts")); |
| | | int begin=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex(L"DeveloperID")); |
| | | alert(L"2"); |
| | | //dw_base.ExpandCellRow(start1 + dw.GetRowCount() +3,begin -2); |
| | | int start2=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex("Status")); |
| | | alert("2"); |
| | | int start2=dw_base.GetCellRowFromRowColumn(1,dw_base.GetColumnIndex(L"Status")); |
| | | alert(L"2"); |
| | | //dw_base.ExpandCellRow(start2,start2 +1); |
| | | |
| | | //dw_kpinfo.openUrl("/sale/view/Supplier/template/supplier/kpinfo2"); |
| | | //dw_kpinfo.openUrl(L"/sale/view/Supplier/template/supplier/kpinfo2"); |
| | | //maint::OnRetrieve(); |
| | | }*/ |
| | | |
| | | /*if (userno == "admin" ) |
| | | /*if (userno == L"admin" ) |
| | | { |
| | | dw_base.SetReadOnly(false); |
| | | dw_kpinfo.SetReadOnly(false); |
| | |
| | | dw_kpinfo.SetReadOnly(true); |
| | | } |
| | | dw_supgoods.SetReadOnly(true); |
| | | if(jobname=="业务部经理" || jobname == "业务经理" || jobname == "业务主管" || jobname == "业务组长" || userno == "admin") |
| | | if(jobname==L"业务部经理" || jobname == L"业务经理" || jobname == L"业务主管" || jobname == L"业务组长" || userno == L"admin") |
| | | { |
| | | xsheet.SetSheetState(4,1);//显示产品库 |
| | | } |