From 53b6f7ad5895724e7db403283516775eeee7f5d8 Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期二, 25 六月 2024 17:32:03 +0800 Subject: [PATCH] uddate layersheet --- jrj/project/business/Customer3.maint.cpp | 164 +++++++++++++++++++++++++++--------------------------- 1 files changed, 82 insertions(+), 82 deletions(-) diff --git a/jrj/project/business/Customer3.maint.cpp b/jrj/project/business/Customer3.maint.cpp index 3bf21bd..05fec26 100644 --- a/jrj/project/business/Customer3.maint.cpp +++ b/jrj/project/business/Customer3.maint.cpp @@ -24,7 +24,7 @@ xdwgrid dw_account; - int iLayer;//椤甸潰Index + int iLayer;//页面Index int APP=1; HWND CustomerGoodsHWND; @@ -120,18 +120,18 @@ dw_detail.SetItemString(1,L"CreateDate",publiccode::GetCurrentDate()); dw_detail.SetItemString(1,L"ModifyDate",publiccode::GetCurrentDate()); dw_detail.SetItemString(1,L"Status",L"1"); - dw_detail.SetItemString(1,L"PAStatus",L"1"); //鍦板潃鐘舵�� - dw_detail.SetItemString(1,L"PrimaryFlag",L"Y"); //涓诲湴鍧� - dw_detail.SetItemString(1,L"Type",L"1"); //瀹㈡埛涓� 1 - dw_detail.SetItemString(1,L"IdentifyAddressFlag",L"Y"); //娌″繀瑕侊紝鏆傛椂鐣欑潃 + dw_detail.SetItemString(1,L"PAStatus",L"1"); //地址状态 + dw_detail.SetItemString(1,L"PrimaryFlag",L"Y"); //主地址 + dw_detail.SetItemString(1,L"Type",L"1"); //客户为 1 + dw_detail.SetItemString(1,L"IdentifyAddressFlag",L"Y"); //没必要,暂时留着 xstring sdate = publiccode::GetCurrentDate(); dw_detail.SetItemString(1,L"ApplyDate",sdate); - dw_detail.SetItemString(1,L"ApplyStatus",L"鏂板缓"); + dw_detail.SetItemString(1,L"ApplyStatus",L"新建"); dw_detail.SetItemString(1,L"Level",L""); - //dw_detail.SetItemDisplayString(1,L"瀹㈡埛璧勬枡",L"瀹㈡埛璧勬枡闄勪欢"); - dw_detail.SetItemString(1,L"瀹㈡埛璧勬枡",L"瀹㈡埛璧勬枡闄勪欢"); + //dw_detail.SetItemDisplayString(1,L"客户资料",L"客户资料附件"); + dw_detail.SetItemString(1,L"客户资料",L"客户资料附件"); xstring guid = publiccode::GetGuid(); dw_detail.SetGuid(1,guid); dw_detail.Redraw(); @@ -166,7 +166,7 @@ int row = hdr->row; - //鏍规嵁鍥藉埆鏄剧ず鍦板尯浠g爜 + //根据国别显示地区代码 if (colname == L"CountryCode") { xaserverarg arg ; @@ -189,7 +189,7 @@ } } - //鍙兘閫変竴涓富鑱旂郴浜� + //只能选一个主联系人 if (colname == L"PrimaryFlag" && coldata == L"Y") { xdwtable dw_pc; @@ -209,72 +209,72 @@ } } - //瀹㈡埛鍚嶇浉鍚屻�� + //客户名相同。 if (colname == L"Name") { //alert(coldata); /* xstring sguid = GetPartyID(coldata,colname); if (sguid != L"") { - alert(L"瀹㈡埛鍚嶇О涓庣郴缁熷凡鏈夊鎴烽噸澶嶏紝璇蜂簬绠$悊鍛樿仈绯昏В鍐筹紒"); + alert(L"客户名称与系统已有客户重复,请于管理员联系解决!"); }*/ //alert(L"ccc"); } - //瀹㈡埛绠�绉� + //客户简称 if (colname == L"ShortName") { xstring sguid1 = GetPartyID(coldata,colname); //trace(sguid1); if (sguid1 != L"") { - alert(L"瀹㈡埛绠�绉伴噸澶嶏紝璇锋敼鐢ㄥ叾浠栫畝绉帮紒"); + alert(L"客户简称重复,请改用其他简称!"); } } - //鏍规嵁瀹㈡埛鏉ユ簮濉啓瀹㈡埛澶囨敞 + //根据客户来源填写客户备注 /*if (colname == L"Source") { if(coldata==L"025") - alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓瀹㈡埛濡備綍鐭ラ亾鎴戜滑鍏徃"); + alert(L"来源备注对应填写客户如何知道我们公司"); if(coldata==L"017" || coldata==L"018") - alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓鍝釜瀹㈡埛浠嬬粛鐨�"); + alert(L"来源备注对应填写哪个客户介绍的"); if(coldata==L"019") - alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓鍝釜娴峰鍔炰簨澶勬垨鑰呰仈缁滅偣浠嬬粛"); + alert(L"来源备注对应填写哪个海外办事处或者联络点介绍"); if(coldata==L"020") - alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓鍝釜闂ㄥ簵浠嬬粛"); + alert(L"来源备注对应填写哪个门店介绍"); if(coldata==L"021") - alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓璋佷粙缁�"); + alert(L"来源备注对应填写谁介绍"); if(coldata==L"026") - alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓璋佽�冨療甯傚満浜夊彇鍒扮殑瀹㈡埛"); + alert(L"来源备注对应填写谁考察市场争取到的客户"); if(coldata==L"028") - alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓鍥藉灞曚細鍚嶇О"); + alert(L"来源备注对应填写国外展会名称"); if(coldata==L"034") - alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓璋佺殑浠g悊涓氬姟"); + alert(L"来源备注对应填写谁的代理业务"); if(coldata==L"001" || coldata==L"002" ) - alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓瀹㈡埛濡備綍鐭ラ亾鎴戜滑鍏徃"); + alert(L"来源备注对应填写客户如何知道我们公司"); if(coldata==L"0052" || coldata==L"0053" || coldata==L"0054" || coldata==L"0055" || coldata==L"0051") - dw_detail.SetItemString(1,L"SourceRemark",L"闃块噷宸村反"); + dw_detail.SetItemString(1,L"SourceRemark",L"阿里巴巴"); if(coldata==L"0161" || coldata==L"0162" ) - dw_detail.SetItemString(1,L"SourceRemark",L"鐜悆璧勬簮"); + dw_detail.SetItemString(1,L"SourceRemark",L"环球资源"); if(coldata==L"0061" || coldata==L"0062" ) - dw_detail.SetItemString(1,L"SourceRemark",L"涓浗鍒堕�犵綉"); + dw_detail.SetItemString(1,L"SourceRemark",L"中国制造网"); if(coldata==L"022" || coldata==L"023" || coldata==L"037" || coldata==L"038" || coldata==L"039" || coldata==L"040" || coldata==L"007" || coldata==L"024" ) - dw_detail.SetItemString(1,L"SourceRemark",L"MH缃戠珯"); + dw_detail.SetItemString(1,L"SourceRemark",L"MH网站"); }*/ - //鑱旂郴浜篢itle閫夋嫨銆� + //联系人Title选择。 if (colname == L"Title") { xdwtable dw_PartyContact; dw_PartyContact = dw_detail.FindDwTable(L"PartyContact"); if(coldata==L"MR") - dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),L"Gender",L"鐢�"); + dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),L"Gender",L"男"); else if(coldata==L"MS" || coldata==L"MADAM" || coldata==L"MRS" ) - dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),L"Gender",L"濂�"); + dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),L"Gender",L"女"); else dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),L"Gender",L""); } - if (colname==L"SalesPersonID" && coldata != L"")//璁剧疆浜哄憳褰掑睘 + if (colname==L"SalesPersonID" && coldata != L"")//设置人员归属 { trace(L"asdasd"); xstring ls_deptname,ls_teamname,ls_groupname,ls_unitname; @@ -285,7 +285,7 @@ trace(ls_unitname); dw_detail.SetItemString(1,L"OrgName",ls_deptname+xstring(ls_teamname)+ xstring(ls_groupname)+ xstring(ls_unitname) ); } - //鏍规嵁鐢熸棩鑷姩璁剧疆骞撮緞銆� + //根据生日自动设置年龄。 /*if (colname == L"Birthday") { xdwtable dw_PartyContact1; @@ -467,65 +467,65 @@ trace(xxx.xml()); //return 0; - //瀹㈡埛鍚嶇О + //客户名称 xstring sName; sName = dw_detail.GetItemString(1,L"Name"); if (sName == L"") { - alert(L"瀹㈡埛鍚嶇О涓嶈兘涓虹┖锛�"); + alert(L"客户名称不能为空!"); return 0; } xstring sShortName = dw_detail.GetItemString(1,L"ShortName"); if (sShortName == L"") { - alert(L"瀹㈡埛绠�绉颁笉鑳戒负绌猴紒"); + alert(L"客户简称不能为空!"); return 0; } xstring Level = dw_detail.GetItemString(1,L"Level"); /*if (Level == L"") { - alert(L"瀹㈡埛绛夌骇涓嶈兘涓虹┖锛�"); + alert(L"客户等级不能为空!"); return 0; }*/ /* if(dw_detail.GetItemString(1,L"Address")==L"") { - alert(L"瀹㈡埛鍦板潃涓嶈兘涓虹┖锛�"); + alert(L"客户地址不能为空!"); return 0; } if(dw_detail.GetItemString(1,L"Source")==L"") { - alert(L"瀹㈡埛鏉ユ簮涓嶈兘涓虹┖锛�"); + alert(L"客户来源不能为空!"); return 0; } if(dw_detail.GetItemString(1,L"CountryCode")==L"") { - alert(L"瀹㈡埛鍥藉埆涓嶈兘涓虹┖锛�"); + alert(L"客户国别不能为空!"); return 0; } if(dw_detail.GetItemString(1,L"TEL")==L"") { - alert(L"鍏徃鐢佃瘽涓嶈兘涓虹┖锛�"); + alert(L"公司电话不能为空!"); return 0; }*/ - //瀹㈡埛绠�绉颁笉鑳介噸澶� + //客户简称不能重复 /* xstring sPartyID = GetPartyID(sShortName,L"ShortName"); if (sPartyID != L"") { - alert(L"姝ゅ鎴风畝绉板凡缁忓瓨鍦紒"); + alert(L"此客户简称已经存在!"); } */ - //瀹㈡埛浠g爜 + //客户代码 xstring sPartyNo; sPartyNo = dw_detail.GetItemString(1,L"PartyNo"); if (sPartyNo == L"" ) { - //alert(L"瀹㈡埛浠g爜涓嶈兘涓虹┖锛�"); + //alert(L"客户代码不能为空!"); //return 0; xstring sNo = publiccode::GetIdentityNo(L"Party1"); @@ -535,14 +535,14 @@ } - //鎴愮珛鏃堕棿YearEstablished - //闆囧憳鏁伴噺Employees + //成立时间YearEstablished + //雇员数量Employees //xstring sYearEstablished = dw_detail.GetItemString(1,L"YearEstablished"); //xstring sEmployees = dw_detail.GetItemString(1,L"Employees"); //sYearEstablished.toInt(); - //鑱旂郴浜哄鍚峃ame-PCName锛岃缃姸鎬� + //联系人姓名Name-PCName,设置状态 xdwtable dw_PartyContact; dw_PartyContact = dw_detail.FindDwTable(L"PartyContact"); xdwtable PC_OtherInfo; @@ -571,7 +571,7 @@ xstring sAll = sPCTitle + sPCJobTitle + sPCGender + sPCMobile + sPCTEL + sPCEmail; /*if (sAll != L"") { - alert(L"鑱旂郴浜哄鍚嶄笉鑳戒负绌�"); + alert(L"联系人姓名不能为空"); return 0; }*/ } @@ -606,7 +606,7 @@ } } - //閾惰甯愬彿BankName-BankName锛汢ankAccountNo-PBABankAccountNo 锛� 璁剧疆鐘舵�� + //银行帐号BankName-BankName;BankAccountNo-PBABankAccountNo ; 设置状态 xdwtable dw_PartyBankAccount; dw_PartyBankAccount =dw_detail.FindDwTable(L"PartyBankAccount"); if (dw_PartyBankAccount) @@ -623,12 +623,12 @@ { /*if (sPBABankName == L"") { - alert(L"閾惰鍚嶇О涓嶈兘涓虹┖"); + alert(L"银行名称不能为空"); return 0; } if (sPBABankAccountNo == L"") { - alert(L"閾惰璐︽埛涓嶈兘涓虹┖"); + alert(L"银行账户不能为空"); return 0; }*/ dw_PartyBankAccount.SetItemString(j,L"Status",L"1"); @@ -636,7 +636,7 @@ } } - //鍦板潃锛岃缃姸鎬� + //地址,设置状态 xdwtable dw_PartyAddress; dw_PartyAddress =dw_detail.FindDwTable(L"PartyAddress"); if (dw_PartyAddress) @@ -667,7 +667,7 @@ return 1; } - int CustomerModify()//璺冲埌瀹㈡埛淇敼鐣岄潰 + int CustomerModify()//跳到客户修改界面 { //trace(L"asdsad"); xaserverarg& arg = *new xaserverarg; @@ -692,7 +692,7 @@ if(row < 1) return 0; xstring PartyID = dw_detail.GetItemString(row,L"PartyID"); arg.AddArg(L"EntityID",PartyID); - arg.AddArg(L"EntityName", L"瀹㈡埛鍏变韩"); + arg.AddArg(L"EntityName", L"客户共享"); OpenWindow(L"dev:xpage[UserGroupShare.vx]", (LPARAM) & arg); return 1; } @@ -776,7 +776,7 @@ return 1; } - //閫夋嫨tab椤甸潰 + //选择tab页面 int OnSelectedSheet(TEvent* evt,int p) { iLayer = m_layer.GetSheetIndex(); @@ -796,11 +796,11 @@ arg.AddArg(L"CustomerID",m_EntityID); arg.AddArg(L"FROM", L"Customer"); arg.AddArg(L"CustomerName", dw_detail.GetItemString(1,L"Name")); - arg.AddArg(L"config", L"瀹㈡埛浜у搧.vface/config/CustomerGoodsVdVd/view"); + arg.AddArg(L"config", L"客户产品.vface/config/CustomerGoodsVdVd/view"); //arg.AddArg(L"CustomerHWND",GetHWND().toString()); arg.SetParam(L"CustomerHWND", (LPARAM)GetHWND()); - int nIndex = xsheet.InsertSheet(-1, L"瀹㈡埛ID璐у彿搴�", xp, (void *) &arg); + int nIndex = xsheet.InsertSheet(-1, L"客户ID货号库", xp, (void *) &arg); xsheet.SelectSheet(nIndex); } //win32::SendMessage(CustomerGoodsHWND.toInt(),0x401, L"SetFocus", nil); @@ -811,7 +811,7 @@ int OnSourceRemark() { - xstring name = L"瀹㈡埛绠$悊"; + xstring name = L"客户管理"; xml x = ViewObject::RetrieveData(L"/sale/data/TradeFinance3/GetSetUpRemarks",L"Type",name); KXMLDOMNodeList items = x.selectNodes(L"data/Item"); KXMLDOMNode t = items.item(0); @@ -858,31 +858,31 @@ //alert(value); xaserverarg& arg=* new xaserverarg; - if(value == L"涓昏鑱旂郴浜哄叾瀹冧俊鎭�") + if(value == L"主要联系人其它信息") { dw_detail.ExpandCellRow(start +m +5,start +m+7); } - else if(value == L"鍏跺畠鍦板潃") + else if(value == L"其它地址") { dw_detail.ExpandCellRow(start +m+9,start +m+9+n); //dw_base.ExpandMarginRow(-22,-20); } - else if(value == L"閾惰淇℃伅") + else if(value == L"银行信息") { dw_detail.ExpandCellRow(start +m+11+n,start +m+11+n+k); //dw_base.ExpandMarginRow(-22,-20); } - else if(value == L"涓氬姟姒傝堪") + else if(value == L"业务概述") { dw_detail.ExpandCellRow(start +m+13+n+k,start +m+13+n+k+2); //dw_base.ExpandMarginRow(-22,-20); } - else if(value == L"瀹㈡埛鎺堜俊") + else if(value == L"客户授信") { dw_detail.ExpandCellRow(start +m+15+n+k +2,start +m+15+n+k +2+1); //dw_base.ExpandMarginRow(-22,-20); } - if(value == L"瀹㈡埛璧勬枡闄勪欢") + if(value == L"客户资料附件") { if(userno == L"admin" || userno == L"00601" || userno == L"00701") @@ -894,7 +894,7 @@ return 1; } } - if(value == L"瀹㈡埛鍩烘湰淇℃伅") + if(value == L"客户基本信息") { xaserverarg& arg1 = *new xaserverarg; xstring str = dw_detail.GetItemString(1,L"BasicInformation"); @@ -925,11 +925,11 @@ xaserverarg& arg=*new xaserverarg; arg.setNativePointer(arg.CreateInstance()); - if(value == L"涓婁紶") + if(value == L"上传") { if(dw.GetGuid(dw.GetRow())==L"") { - alert(L"淇濆瓨鍚庡湪涓婁紶锛�"); + alert(L"保存后在上传!"); return 1; } @@ -954,11 +954,11 @@ xaserverarg& arg=*new xaserverarg; - if(value == L"闄勪欢涓婁紶") + if(value == L"附件上传") { if(dw.GetGuid(dw.GetRow())==L"") { - alert(L"淇濆瓨鍚庡湪涓婁紶锛�"); + alert(L"保存后在上传!"); return 1; } @@ -968,7 +968,7 @@ return 1; } - if(value == L"浜哄憳") + if(value == L"人员") { xaserverarg& arg2 =* new xaserverarg; @@ -1023,11 +1023,11 @@ xaserverarg& arg=*new xaserverarg; - if(value == L"闄勪欢涓婁紶") + if(value == L"附件上传") { if(dw.GetGuid(dw.GetRow())==L"") { - alert(L"淇濆瓨鍚庡湪涓婁紶锛�"); + alert(L"保存后在上传!"); return 1; } @@ -1037,7 +1037,7 @@ return 1; } - if(value == L"浜哄憳") + if(value == L"人员") { xaserverarg& arg2 = *new xaserverarg; @@ -1107,21 +1107,21 @@ dw_visit = GetControl(L"dw_visit"); dw_Meetings = GetControl(L"dw_Meetings"); dw_MeetingsEx = GetControl(L"dw_MeetingsEx"); - //娣诲姞瀹㈡埛浜у搧闄勯〉 + //添加客户产品附页 xsheet = GetControl(L"tab_1"); //xstring xp = L"<xframe src='dev:xpage[CustomerGoodsVd.vx]' />"; /*xaserverarg arg = new xaserverarg; arg.setNativePointer(arg.CreateInstance()); arg.AddArg(L"CustomerID", this.m_EntityID); arg.AddArg(L"CustomerName", dw_detail.GetItemString(1,L"Name")); - arg.AddArg(L"config", L"瀹㈡埛浜у搧.vface/config/CustomerGoodsNewVd/view"); + arg.AddArg(L"config", L"客户产品.vface/config/CustomerGoodsNewVd/view"); arg.AddArg(L"CustomerHWND",this.GetHWND().toString()); //trace(this.m_EntityID); int p =arg.__nativept;*/ - //int nIndex = xsheet.InsertSheet(-1, L"瀹㈡埛ID璐у彿搴�", xp, 0); + //int nIndex = xsheet.InsertSheet(-1, L"客户ID货号库", xp, 0); //xsheet.SelectSheet(nIndex); //xsheet.SelectSheet(0); - //榛樿鏀剁缉 + //默认收缩 /*xdwtable dw = new xdwtable; dw.setNativePointer(dw_detail.FindDwTable(L"PartyAddress",0)); xdwtable dw1 = new xdwtable; @@ -1139,7 +1139,7 @@ int start4=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex(L"CompanyCredit")); dw_detail.ExpandCellRow(start4,start4 +1); */ - //榛樿鏀剁缉 + //默认收缩 xdwtable dw = dw_detail.FindDwTable(L"item1",0); xdwtable dw1 = dw_detail.FindDwTable(L"item2",0); xdwtable dw2 = dw_detail.FindDwTable(L"item3",0); @@ -1205,11 +1205,11 @@ arg.AddArg(L"CustomerID", m_EntityID); arg.AddArg(L"FROM", L"Customer"); arg.AddArg(L"CustomerName", dw_detail.GetItemString(1,L"Name")); - arg.AddArg(L"config", L"瀹㈡埛浜у搧.vface/config/CustomerGoodsVdVd/view"); + arg.AddArg(L"config", L"客户产品.vface/config/CustomerGoodsVdVd/view"); //arg.AddArg(L"CustomerHWND",GetHWND().toString()); arg.SetParam(L"CustomerHWND", (LPARAM)GetHWND()); - int nIndex = xsheet.InsertSheet(-1, L"瀹㈡埛ID璐у彿搴�", xp, (void*)&arg); + int nIndex = xsheet.InsertSheet(-1, L"客户ID货号库", xp, (void*)&arg); xsheet.SelectSheet(nIndex); //xsheet.SetSheetState(0, 0); } @@ -1219,7 +1219,7 @@ if(userno !=L"00601" && userno !=L"admin" && userno !=L"00701") { - if(ApplyStatus ==L"璐㈠姟宸插鏍�") + if(ApplyStatus ==L"财务已审核") { dw_detail.SetReadOnly(true); } -- Gitblit v1.9.3