From bbb854310857eb994c107fb0b42a44121d2d09cc Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期四, 25 七月 2024 11:27:11 +0800
Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/mis-prj

---
 jrj/project/business/Expense/TestExpense.GDNInvoiceno.cpp      |    0 
 jrj/project/business/Customer/XmShare.Custumer.v3.cpp          |    0 
 jrj/project/business/ProductSample/ProductNewItem.cpp          |    0 
 jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp      |   10 +-
 jrj/project/business/Enquiry/ViewPictures.cpp                  |    4 
 jrj/project/business/GDN3.list.cpp                             |    2 
 jrj/project/business/GDN/SelectItem.New.GDN.cpp                |    0 
 jrj/project/business/Expense/FreightExpenseList.cpp            |    0 
 jrj/project/business/PO/Maint.PurcherItem.cpp                  |    0 
 jrj/project/business/Enquiry/Entity.Product.Select.cpp         |  150 +++++++++++++++++++------------------
 jrj/project/business/PO/PO.maint.base.cpp                      |    0 
 jrj/project/business/PO/MakeAllPOEx.PO.cpp                     |    0 
 jrj/project/vindexmenu.cpp                                     |    2 
 jrj/ext-jrj/ext-jrj.vcxproj.filters                            |   17 ++++
 jrj/project/business/PO/Maint.PaperCard.PO.hpp                 |    0 
 jrj/project/business/Customer/maint.Document.Customer.v3.cpp   |    0 
 jrj/project/business/EnquiryEx3.list.cpp                       |    0 
 jrj/project/business/Enquiry/Enquiry.maint.cpp                 |    2 
 jrj/project/business/Enquiry/PriceList.PurcharItemSelect.cpp   |    7 +
 jrj/project/business/Enquiry/PriceList.PurcharItemSelectEx.cpp |    3 
 jrj/ext-jrj/ext-jrj.vcxproj                                    |    6 +
 jrj/project/business/Expense/FactoryTempDeduct.cpp             |    0 
 jrj/project/business/Public/message.business.cpp               |    0 
 23 files changed, 111 insertions(+), 92 deletions(-)

diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj
index 3643beb..29756db 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj
+++ b/jrj/ext-jrj/ext-jrj.vcxproj
@@ -459,6 +459,8 @@
     <ClCompile Include="..\project\business\Customer3.maint.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\project\business\Customer\maint.Document.Customer.v3.cpp" />
+    <ClCompile Include="..\project\business\Customer\XmShare.Custumer.v3.cpp" />
     <ClCompile Include="..\project\business\Enquiry.list.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
@@ -473,7 +475,7 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\Enquiry\Entity.Product.Select.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\Enquiry\PriceList.PurcharItemSelect.cpp">
@@ -543,6 +545,7 @@
     <ClCompile Include="..\project\business\Expense\FreightExpenseItem.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\project\business\Expense\FreightExpenseList.cpp" />
     <ClCompile Include="..\project\business\Expense\GdnSourceSplit.cpp" />
     <ClCompile Include="..\project\business\Expense\list.expense.ap.cpp" />
     <ClCompile Include="..\project\business\Expense\list.manage.ap.cpp" />
@@ -598,6 +601,7 @@
     <ClCompile Include="..\project\business\Expense\TestExpense.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\project\business\Expense\TestExpense.GDNInvoiceno.cpp" />
     <ClCompile Include="..\project\business\Expense\TestExpenseBase.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
diff --git a/jrj/ext-jrj/ext-jrj.vcxproj.filters b/jrj/ext-jrj/ext-jrj.vcxproj.filters
index 05fb0bd..5c5be77 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj.filters
+++ b/jrj/ext-jrj/ext-jrj.vcxproj.filters
@@ -124,6 +124,9 @@
     <Filter Include="project\business\Quote">
       <UniqueIdentifier>{8b3b4162-bfac-425e-b44d-ae8482f17564}</UniqueIdentifier>
     </Filter>
+    <Filter Include="project\business\Customer">
+      <UniqueIdentifier>{1a6cab16-6910-4b7a-a805-80b24ceac7ac}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="framework.h">
@@ -1247,8 +1250,20 @@
     <ClCompile Include="..\project\vindexmenu.cpp">
       <Filter>vbusiness\wface</Filter>
     </ClCompile>
+    <ClCompile Include="..\project\business\Customer\maint.Document.Customer.v3.cpp">
+      <Filter>project\business\Customer</Filter>
+    </ClCompile>
     <ClCompile Include="..\project\total3\ViewEx1.total.cpp">
-      <Filter>婧愭枃浠�</Filter>
+      <Filter>vbusiness\total</Filter>
+    </ClCompile>
+    <ClCompile Include="..\project\business\Customer\XmShare.Custumer.v3.cpp">
+      <Filter>project\business\Customer</Filter>
+    </ClCompile>
+    <ClCompile Include="..\project\business\Expense\TestExpense.GDNInvoiceno.cpp">
+      <Filter>project\business\Expense</Filter>
+    </ClCompile>
+    <ClCompile Include="..\project\business\Expense\FreightExpenseList.cpp">
+      <Filter>project\business\Expense</Filter>
     </ClCompile>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/jrj/project/business/Customer/XmShare.Custumer.v3.cpp b/jrj/project/business/Customer/XmShare.Custumer.v3.cpp
new file mode 100644
index 0000000..2c9826e
--- /dev/null
+++ b/jrj/project/business/Customer/XmShare.Custumer.v3.cpp
Binary files differ
diff --git a/jrj/project/business/Customer/maint.Document.Customer.v3.cpp b/jrj/project/business/Customer/maint.Document.Customer.v3.cpp
new file mode 100644
index 0000000..1921f60
--- /dev/null
+++ b/jrj/project/business/Customer/maint.Document.Customer.v3.cpp
Binary files differ
diff --git a/jrj/project/business/Enquiry/Enquiry.maint.cpp b/jrj/project/business/Enquiry/Enquiry.maint.cpp
index 8bbc0a0..030fdc9 100644
--- a/jrj/project/business/Enquiry/Enquiry.maint.cpp
+++ b/jrj/project/business/Enquiry/Enquiry.maint.cpp
@@ -1077,7 +1077,7 @@
 				if (str == L"")
 				{
 					xaserverarg arg1;
-					arg1.setNativePointer(arg1.CreateInstance());
+					
 					arg1.SetParam(L"HWND", GetHWND());
 					arg1.AddArg(L"CustomerID", dw_base.GetItemString(1, L"CustomerID"));
 					OpenWindow(L"dev:xpage[Entity.Product.Select.vx]",arg1);
diff --git a/jrj/project/business/Enquiry/Entity.Product.Select.cpp b/jrj/project/business/Enquiry/Entity.Product.Select.cpp
index 499ca5b..99ce155 100644
--- a/jrj/project/business/Enquiry/Entity.Product.Select.cpp
+++ b/jrj/project/business/Enquiry/Entity.Product.Select.cpp
@@ -28,8 +28,8 @@
 		xdwgrid	dwc_list;
 
 		//产品缓存对象
-		xdataset g_xdoc_product;
-		xdataset g_xdoc_shoppingcart;
+		//xdataset dw_list;
+		//xdataset dwc_list;
 
 		xcombobox  cbx_goodscar;
 		//是否多选
@@ -101,7 +101,7 @@
 		{
 			if (row < 1) row = dwc_list.GetRow();
 			if (row < 1 || row > dwc_list.GetRowCount()) return KXMLDOMElement();
-			KXMLDOMElement e = g_xdoc_shoppingcart.getRowElement(L"data/Item", row);
+			KXMLDOMElement e = dwc_list.GetRowElement(row);
 			return e;
 		}
 
@@ -189,7 +189,7 @@
 			xs.SetContent(html);
 			xs.Redraw();
 
-			xstring id = g_xdoc_product.getData(0, L"data/Item", row, L"@guid");
+			xstring id = dw_list.GetItemString(row, L"@guid");
 			OnShowImage(id);
 
 			return 1;
@@ -204,10 +204,10 @@
 			xstring html = makeGoodscarHtml(row);
 			xs.SetContent(html);
 			xs.Redraw();
-			xstring id = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"SKUID");
+			xstring id = dwc_list.GetItemString(row, L"SKUID");
 			if (m_customer != L"")
 			{
-				xstring customerItemNo = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"CustomerItemNo");
+				xstring customerItemNo = dwc_list.GetItemString(row, L"CustomerItemNo");
 				OnShowImage(id, customerItemNo);
 			}
 			else
@@ -218,18 +218,22 @@
 			return 1;
 		}
 
+#if 0
+
+
+
 		int DeleteRow(int row)
 		{
 			int IDOK = 1;
 			int MB_OKCANCEL = 1;
 			int MB_ICONQUESTION = 32;
 			if (MessageBox(GetHWND(), L"确认删除指定的项,删除后将不能恢复?", L"提示", MB_OKCANCEL | MB_ICONQUESTION) != IDOK) return 1;
-			xstring id = g_xdoc_product.getData(0, L"data/Item", row, L"@guid");
+			xstring id = dw_list.GetItemString(row, L"@guid");
 
 			if (ProductLibraryView::DeleteItem(id) == 1)	dw_list.DeleteRow(0);
 			return 1;
 		}
-
+#endif // 0
 		int SetSelectState(xdwgrid dw_obj, int state)
 		{
 			dw_obj.SetSelectionMode(3);
@@ -279,9 +283,9 @@
 			if (row < 1) row = dw_list.GetRow();
 			if (row < 1 || row > dw_list.GetRowCount()) return 0;
 
-			KXMLDOMElement e = g_xdoc_product.getRowElement(L"data/Item", row);
-			xstring skuid = g_xdoc_product.getData(0, L"data/Item", row, L"@guid");
-			xstring SKUNo = g_xdoc_product.getData(0, L"data/Item", row, L"SKUNo");
+			KXMLDOMElement e = dw_list.GetRowElement(row);
+			xstring skuid = dw_list.GetItemString(row, L"@guid");
+			xstring SKUNo = dw_list.GetItemString(row, L"SKUNo");
 			xstring id = ViewObject::GetGuid();
 			xstring ret1 = Up(id);
 			if (ret1 == L"-1") return -1;
@@ -331,11 +335,11 @@
 			if (row < 1) row = dwc_list.GetRow();
 			if (row < 1 || row > dwc_list.GetRowCount()) return 0;
 
-			KXMLDOMElement e = g_xdoc_shoppingcart.getRowElement(L"data/Item", row);
-			xstring skuid = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"SKUID");
-			xstring SKUNo = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"SKUID/@__displaystring");
+			KXMLDOMElement e = dwc_list.GetRowElement(row);
+			xstring skuid = dwc_list.GetItemString(row, L"SKUID");
+			xstring SKUNo = dwc_list.GetItemString(row, L"SKUID/@__displaystring");
 			CustomerID = m_customer;
-			xstring CustomerItemNo = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"CustomerItemNo");
+			xstring CustomerItemNo = dwc_list.GetItemString(row, L"CustomerItemNo");
 			xstring id = ViewObject::GetGuid();
 			xstring ret1 = Up(id);
 			if (ret1 == L"-1") return -1;
@@ -420,10 +424,10 @@
 				dwc_list.Redraw();
 			}
 
-			xstring skuid = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"SKUID");
-			xstring SKUNo = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"SKUID/@__displaystring");
+			xstring skuid = dwc_list.GetItemString(row, L"SKUID");
+			xstring SKUNo = dwc_list.GetItemString(row, L"SKUID/@__displaystring");
 			CustomerID = m_customer;
-			xstring CustomerItemNo = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"CustomerItemNo");
+			xstring CustomerItemNo = dwc_list.GetItemString(row, L"CustomerItemNo");
 			OnShowImage(skuid, CustomerItemNo);
 
 			return 1;
@@ -469,7 +473,7 @@
 				dw_list.Redraw();
 			}
 
-			KXMLDOMElement e1 = g_xdoc_product.getRowElement(L"data/Item", row);
+			KXMLDOMElement e1 = dw_list.GetRowElement(row);
 			xstring skuid = e1.getAttribute(L"guid");
 			OnShowImage(skuid);
 
@@ -509,7 +513,7 @@
 
 		xstring makeHtml(int row)
 		{
-			xstring id = g_xdoc_product.getData(0, L"data/Item", row, L"@guid");
+			xstring id = dw_list.GetItemString(row, L"@guid");
 			xml x = GetGoodsPropList(id);
 			xml x1 = GetGoodsPropListEx(id);
 
@@ -541,7 +545,7 @@
 				{
 					name = fieldsEx.item(i).selectSingleNode(L"@name").text();
 					label = fieldsEx.item(i).selectSingleNode(L"@label").text();
-					ls_item += L"<td>" + label + L"</td>" + L"<td style='text-align:center'>" + g_xdoc_product.getData(0, L"data/Item", row, name) + L"</td>";
+					ls_item += L"<td>" + label + L"</td>" + L"<td style='text-align:center'>" + dw_list.GetItemString(row, name) + L"</td>";
 					cnt++;
 					i++;
 					if (i == len)break;
@@ -577,7 +581,7 @@
 						if (i >= len)count = 2;
 						continue;
 					}
-					else if (g_xdoc_product.getData(0, L"data/Item", row, name) == L"")
+					else if (dw_list.GetItemString(row, name) == L"")
 					{
 						KXMLDOMNodeList options = fields.item(i).selectNodes(L"item");
 						int tlen = options.length();
@@ -594,7 +598,7 @@
 					}
 					else
 					{
-						ls_item = L"<td>" + label + L"</td>" + L"<td>" + g_xdoc_product.getData(0, L"data/Item", row, name) + L"</td>";
+						ls_item = L"<td>" + label + L"</td>" + L"<td>" + dw_list.GetItemString(row, name) + L"</td>";
 						count++;
 					}
 					i++;
@@ -623,10 +627,10 @@
 				html += L"<div ><span style='margin-left:8px;margin-right:16px;font-weight:400;font-size:10pt' >" + dw_list.GetItemString(row, L"PackTerm") + L"</span></div>";
 			}
 
-			if (g_xdoc_product.getData(0, L"data/Item", row, L"Remark") != L"" && id == L"23A8BBA2-DEF1-4C00-978E-646151A6082E")
+			if (dw_list.GetItemString(row, L"Remark") != L"" && id == L"23A8BBA2-DEF1-4C00-978E-646151A6082E")
 			{
 				html += L"<div ><span style='font-weight:700;width:50;font-size:10pt'  >备注:</span></div>";
-				html += L"<div ><span style='margin-left:8px;margin-right:16px;font-weight:400;font-size:10pt' >" + g_xdoc_product.getData(0, L"data/Item", row, L"Remark") + L"</span></div>";
+				html += L"<div ><span style='margin-left:8px;margin-right:16px;font-weight:400;font-size:10pt' >" + dw_list.GetItemString(row, L"Remark") + L"</span></div>";
 			}
 
 			html += L"<div style='height:24px'/>";
@@ -676,24 +680,24 @@
 				if (i == 0)
 					html += L"<td rowspan='" + xstring(len) + L"'>" + No + L"</td><td >" + label + L"</td><td >" + L"</td>";
 				else
-					html += L"<td >" + label + L"</td><td >" + g_xdoc_shoppingcart.getData(0, L"data/Item", row, name) + L"</td>";
+					html += L"<td >" + label + L"</td><td >" + dwc_list.GetItemString(row, name) + L"</td>";
 				html += L"</tr>";
 			}
 
 			html += L"<tr>";
-			html += L"<td rowspan='3'>" + g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"PackCode") + L"</td><td >包装方式</td><td >" +
-				g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"CPack") + L"</td>";
+			html += L"<td rowspan='3'>" + dwc_list.GetItemString(row, L"PackCode") + L"</td><td >包装方式</td><td >" +
+				dwc_list.GetItemString(row, L"CPack") + L"</td>";
 			html += L"</tr>";
 			html += L"<tr height='48'>";
-			html += L"<td >包装要求</td><td >" + g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"PackQualityTerm") + L"</td>";
+			html += L"<td >包装要求</td><td >" + dwc_list.GetItemString(row, L"PackQualityTerm") + L"</td>";
 			html += L"</tr>";
 			html += L"<tr>";
 			html += L"<td >侧唛</td><td ></td>";
 			html += L"</tr>";
 
 			html += L"<tr height='72'>";
-			html += L"<td>" + g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"QualityCode") + L"</td><td >质量要求</td><td >" +
-				g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"QualityTerm") + L"</td>";
+			html += L"<td>" + dwc_list.GetItemString(row, L"QualityCode") + L"</td><td >质量要求</td><td >" +
+				dwc_list.GetItemString(row, L"QualityTerm") + L"</td>";
 			html += L"</tr>";
 
 			html += L"</table>";
@@ -748,7 +752,7 @@
 			dw_list.Redraw();
 			impStr = L"";
 
-			SendMessage(hObject, 0x401, (LPARAM)ls_nos, 0);
+			SendMessage(hObject, 0x401, (LPARAM)ls_nos.c_str(), 0);
 			alert(L"转入完成!");
 
 			return 1;
@@ -766,7 +770,7 @@
 			int MB_OKCANCEL = 1;
 			int MB_ICONQUESTION = 32;
 			if (MessageBox(GetHWND(), L"确认删除指定的项,删除后将不能恢复?", L"提示", MB_OKCANCEL | MB_ICONQUESTION) != IDOK) return 1;
-			xstring id = g_xdoc_product.getData(0, L"data/Item", row, L"@guid");
+			xstring id = dw_list.GetItemString(row, L"@guid");
 
 			if (ProductLibraryView::DeleteItem(id) == 1) dw_list.DeleteRow(0);
 
@@ -865,14 +869,14 @@
 				OpenWindow(L"dev:xpage[PackSchemaMaint.goodslib.vx]");
 			}else
 			{
-				int pr = g_xdoc_product;
+				int pr = dw_list;
 				OpenWindow(L"dev:xpage[ProductLibraryItemMaint.vx]",pr);
 			}
 			*/
-			//KXMLDOMElement ele = g_xdoc_product.getRowElement(L"data/Item", 1);
+			//KXMLDOMElement ele = dw_list.getRowElement(L"data/Item", 1);
 			//alert(ele.xml);
 
-			int pr = g_xdoc_product;
+			int pr = dw_list;
 			OpenWindow(L"dev:xpage[ProductLibraryItemMaint3.vx]", pr);
 
 			return 1;
@@ -959,7 +963,7 @@
 		}
 		int MakeGoodCarFolderItem(HTREEITEM hItem)
 		{
-			xml x = ShoppingCartView::GetRoleList();
+			xml x = ShoppingCartView::GetSupplierRoleList(SupplierID);
 			if (!x) return 0;
 			KXMLDOMNodeList nlist = x.selectNodes(L"/data/item");
 			int len = nlist.length();
@@ -1031,7 +1035,7 @@
 		{
 			while (true)
 			{
-				KXMLDOMElement& e1 = tv_folder.GetItemData(hItem);
+				KXMLDOMElement e1 = tv_folder.GetItemData(hItem);
 				xstring str = e1.getAttribute(L"no");
 				if (str.find(L"Customer:") >= 0) return hItem;
 				hItem = tv_folder.GetParentItem(hItem);
@@ -1044,12 +1048,12 @@
 		{
 			hItem = LookupCustomerFolder(hItem);
 			if (hItem == 0) return L"";
-			KXMLDOMElement& e1 = tv_folder.GetItemData(hItem);
+			KXMLDOMElement e1 = tv_folder.GetItemData(hItem);
 			xstring str = e1.getAttribute(L"no");
 			return str.mid(xstring(L"Customer:").length(), 9999);
 		}
 
-		HTREEITEM RetrieveItem(HTREEITEM hItem)
+		int RetrieveItem(HTREEITEM hItem)
 		{
 			HTREEITEM hTopItem = LookupTopFolder(hItem);
 			tname = tv_folder.GetItemLabel(hTopItem);
@@ -1071,9 +1075,12 @@
 				ResetAgent(L"goodscar");
 				if (selectname != tname)
 				{
-					KXMLDOMElement e1 = cast(tv_folder.GetItemData(hItem) as KXMLDOMElement);
+					KXMLDOMElement e1 =tv_folder.GetItemData(hItem);
 					str = e1.getAttribute(L"no");
-					if (str == L"Supplier") return 1;
+					if (str == L"Supplier")
+					{
+						return 1;
+					}
 					if (str.find(L"Customer:") == 0 || str.find(L"SO:") == 0 || str.find(L"Supplier:") == 0 || str.find(L"Enquiry:") == 0)
 					{
 						m_customer = LookupCustomer(hItem);
@@ -1084,9 +1091,9 @@
 						dwc_list.Reset();
 						dwc_list.SetReadOnly(true);
 						if (queryString == L"")
-							g_xdoc_shoppingcart.Retrieve(ShoppingCartView::GetGoodsList(str));
+							dwc_list.Retrieve(ShoppingCartView::GetGoodsList(str));
 						else
-							g_xdoc_shoppingcart.Retrieve(ShoppingCartView::GetGoodsList(str, queryString));
+							dwc_list.Retrieve(ShoppingCartView::GetGoodsList(str, queryString));
 						if (str.find(L"Supplier:") == 0)
 						{
 							if (dwc_list.GetRowCount() > 0)
@@ -1103,9 +1110,9 @@
 						dwc_list.SetReadOnly(true);
 						dwc_list.Reset();
 						if (queryString == L"")
-							g_xdoc_shoppingcart.Retrieve(ProductLibraryView::GetMaintList3(categoryid));
+							dwc_list.Retrieve(ProductLibraryView::GetMaintList3(categoryid));
 						else
-							g_xdoc_shoppingcart.Retrieve(ProductLibraryView::GetMaintList3(categoryid, queryString, L""));
+							dwc_list.Retrieve(ProductLibraryView::GetMaintList3(categoryid, queryString, L""));
 					}
 					else
 					{
@@ -1113,9 +1120,9 @@
 						dwc_list.SetReadOnly(true);
 						dwc_list.Reset();
 						if (queryString == L"")
-							g_xdoc_shoppingcart.Retrieve(ShoppingCartView::GetGoodsList(selectname));
+							dwc_list.Retrieve(ShoppingCartView::GetGoodsList(selectname));
 						else
-							g_xdoc_shoppingcart.Retrieve(ShoppingCartView::GetGoodsList(selectname, queryString));
+							dwc_list.Retrieve(ShoppingCartView::GetGoodsList(selectname, queryString));
 					}
 					dwc_list.Redraw();
 
@@ -1126,8 +1133,8 @@
 
 						if (m_customer != L"")
 						{
-							xstring skuid = g_xdoc_shoppingcart.getData(0, L"data/Item", 1, L"SKUID");
-							xstring customerItemNo = g_xdoc_shoppingcart.getData(0, L"data/Item", 1, L"CustomerItemNo");
+							xstring skuid = dwc_list.GetItemString(1, L"SKUID");
+							xstring customerItemNo = dwc_list.GetItemString(1, L"CustomerItemNo");
 							OnShowImage(skuid, customerItemNo);
 						}
 					}
@@ -1149,8 +1156,8 @@
 					else
 					{
 						str = L"Supplier:All";
-						g_xdoc_shoppingcart.Retrieve(ShoppingCartView::GetGoodsList(str, queryString));
-						dwc_list.PostRetrieve();
+						dwc_list.Retrieve(ShoppingCartView::GetGoodsList(str, queryString));
+						//dwc_list.PostRetrieve();
 						dwc_list.Redraw();
 					}
 				}
@@ -1190,7 +1197,7 @@
 							x = ProductLibraryView::GetMaintList3(no);
 						if (x)
 						{
-							g_xdoc_product.Retrieve(x);
+							dw_list.Retrieve(x);
 							
 						}
 					}
@@ -1212,16 +1219,16 @@
 							else
 								x = ProductLibraryView::GetMaintList3(no);
 						}
-						if (x)g_xdoc_product.Retrieve(x);
+						if (x)dw_list.Retrieve(x);
 					}
-					dw_list.PostRetrieve();
+					//dw_list.PostRetrieve();
 					dw_list.Redraw();
 
 					if (dw_list.GetRowCount() > 0)
 					{
 						xs = GetControl(L"html_detail");
 						xs.SetContent(makeHtml(1));
-						xstring id = g_xdoc_product.getData(0, L"data/Item", 1, L"@guid");
+						xstring id = dw_list.GetItemString(1, L"@guid");
 						OnShowImage(id);
 					}
 					else
@@ -1237,6 +1244,7 @@
 				}
 			}
 			impStr = L"";
+			return 1;
 		}
 
 		int OnTreeSelChanged(TEvent* evt, int p)
@@ -1304,7 +1312,7 @@
 			char ch;
 			int row = hdr.row;
 			xstring col = hdr.colname;
-			xstring str = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"SOLineID");
+			xstring str = dwc_list.GetItemString(row, L"SOLineID");
 			if (str != L"")
 				str = L"sl:" + str;
 			else if (dwc_list.GetItemString(row, L"SKUNo") != L"")
@@ -1333,8 +1341,8 @@
 			DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
 			int row = hdr.row;
 			xstring ls_nos = L"ImportXml:";
-			xstring str = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"SOLineID");
-			xstring str1 = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"EnquiryPriceListID");
+			xstring str = dwc_list.GetItemString(row, L"SOLineID");
+			xstring str1 = dwc_list.GetItemString(row, L"EnquiryPriceListID");
 			if (str1 != L"")
 				str += L"el:" + str1;
 			else if (str != L"")
@@ -1350,7 +1358,7 @@
 			dw_list.Redraw();
 			dwc_list.Redraw();
 			impStr = L"";
-			SendMessage(hObject, 0x401, (LPARAM)ls_nos, 0);
+			SendMessage(hObject, 0x401, (LPARAM)ls_nos.c_str(), 0);
 			xutil::RestoreCursor(hCursor);
 			CloseWindow();
 			return 1;
@@ -1380,7 +1388,7 @@
 			dw_list.Redraw();
 			dwc_list.Redraw();
 			impStr = L"";
-			SendMessage(hObject, 0x401, (LPARAM)ls_nos, 0);
+			SendMessage(hObject, 0x401, (LPARAM)ls_nos.c_str(), 0);
 			xutil::RestoreCursor(hCursor);
 			CloseWindow();
 			return 1;
@@ -1414,7 +1422,7 @@
 			impStr = L"";
 
 			OnAttachEvent();
-			imageElement = 0;
+			//imageElement = 0;
 
 			tv_folder = GetControl(L"tv_folder");
 			dw_list = GetControl(L"dw_list");
@@ -1433,17 +1441,7 @@
 			}
 			InitialFolder();
 
-			g_xdoc_product = new xdataset;
-			g_xdoc_product.Init();
-			xbind bindproduct = new xbind;
-			bindproduct.bindEx(dw_list, g_xdoc_product, L"");
-
-			g_xdoc_shoppingcart = new xdataset;
-			g_xdoc_shoppingcart.Init();
-
-			xbind bindcart = new xbind;
-			bindcart.bindEx(dwc_list, g_xdoc_shoppingcart, L"");
-
+			
 			dw_list.SetDataObject(ProductLibraryView::GetMaintListForm3(L""));
 			dw_list = GetControl(L"dw_list");
 			dw_list.SetReadOnly(true);
@@ -1459,11 +1457,17 @@
 				xs.SetContent(makeHtml(1));
 			}
 
+			tv_folder.ExpandItem(tv_folder.GetNextItem(tv_folder.GetRootItem()));
+			tv_folder.ExpandItem(tv_folder.GetNextItem(tv_folder.GetNextItem(tv_folder.GetRootItem())));
+#if 0
 			xtreeview::ExpandItem(tv_folder.GetId(),
 				xtreeview::GetNextItem(tv_folder.GetId(), xtreeview::GetRootItem(tv_folder.GetId())));
 			xtreeview::ExpandItem(tv_folder.GetId(),
 				xtreeview::GetNextItem(tv_folder.GetId(), xtreeview::GetNextItem(tv_folder.GetId(), xtreeview::GetRootItem(tv_folder.GetId()))));
 
+#endif // 0
+
+			
 			dw_list.SetSelectionMode(3);
 			dwc_list.SetSelectionMode(3);
 
diff --git a/jrj/project/business/Enquiry/PriceList.PurcharItemSelect.cpp b/jrj/project/business/Enquiry/PriceList.PurcharItemSelect.cpp
index dd32ebb..53337d1 100644
--- a/jrj/project/business/Enquiry/PriceList.PurcharItemSelect.cpp
+++ b/jrj/project/business/Enquiry/PriceList.PurcharItemSelect.cpp
@@ -71,7 +71,7 @@
 				rw = dw_list.GetNextSelectRow(rw + 1);
 			}
 			content += L"</data>";
-			xaserverarg  arg ;
+			xaserverarg arg =GetArg();
 			arg.AddArg(L"process", L"ok");
 			arg.AddArg(L"result", content);
 
@@ -134,7 +134,7 @@
 		{
 			xml x ;
 			
-			xaserverarg  arg;
+			xaserverarg  arg=GetArg();
 			if (getUrl(L"/sale/data/Enquiry/PriceList/ItemSelect", arg.GetString(), x) != 1)
 			{
 				trace(x.text());
@@ -151,13 +151,14 @@
 
 		int onload()
 		{
+			SetArg();
 			dw_list = GetControl(L"dw_list");
 			dw_list.openUrl(L"/sale/view/Enquiry3/template/purcharpricelist/item");
 			dw_list.SetReadOnly(true);
 			OnAttachEvent();
 			OnRetrieve();
 			dw_list.SetSelectionMode(3);
-			xaserverarg  arg ;
+			xaserverarg  arg =GetArg();
 			arg.AddArg(L"process", L"");
 			return 1;
 		}
diff --git a/jrj/project/business/Enquiry/PriceList.PurcharItemSelectEx.cpp b/jrj/project/business/Enquiry/PriceList.PurcharItemSelectEx.cpp
index c5c8d58..ddc94d2 100644
--- a/jrj/project/business/Enquiry/PriceList.PurcharItemSelectEx.cpp
+++ b/jrj/project/business/Enquiry/PriceList.PurcharItemSelectEx.cpp
@@ -119,8 +119,7 @@
 		int  OnRetrieve()
 		{
 			xml x ;
-			
-			xaserverarg  arg;
+			xaserverarg  arg=GetArg();
 			if (getUrl(L"/sale/data/Enquiry/folder/listitems", arg.GetString(), x) != 1)
 			{
 				trace(x.text());
diff --git a/jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp b/jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp
index 01123d4..fca596d 100644
--- a/jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp
+++ b/jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp
@@ -50,14 +50,14 @@
 			else
 				src=src.mid(src.find(L"Thumbs", 0)+6, 50);
 			*/
-			xaserverarg& arg = *new xaserverarg;
+			xaserverarg arg;
 			
 			//arg.AddArg(L"src",L"/business/products/chanpin"+src);	
 			arg.AddArg(L"src", src);
 
 			//win::OpenWindow(L"dev:xpage[BigPicture.vx]",arg);	
 
-			int h = openUrl(L"/sale/view/ProductLibrary/xpage/bigpictureview", &arg);
+			int h = openUrl(L"/sale/view/ProductLibrary/xpage/bigpictureview", arg);
 			return 1;
 
 			/*xwin x = new xwin;
@@ -175,9 +175,7 @@
 
 			if (GetWinParam())
 			{
-				xaserverarg arg;
-				//	
-				arg = GetArg();
+				xaserverarg arg = GetArg();
 				ParentHWND  = (HWND)arg.GetParam(L"ParentHWND");
 				xstring openflag = arg.GetArgString(L"OpenFlag");
 				//alert(openflag);
@@ -193,7 +191,7 @@
 					return 0;
 				}
 				doc = x;
-				//alert(x.GetXml());		
+				//alert(x.xml());		
 				KXMLDOMElement e = x.selectSingleNode(L"ImageList");
 				KXMLDOMNodeList  nlist = e.selectNodes(L"image");
 				int i;
diff --git a/jrj/project/business/Enquiry/ViewPictures.cpp b/jrj/project/business/Enquiry/ViewPictures.cpp
index 55b3b0c..677bffd 100644
--- a/jrj/project/business/Enquiry/ViewPictures.cpp
+++ b/jrj/project/business/Enquiry/ViewPictures.cpp
@@ -86,9 +86,7 @@
 		{
 			SetArg();
 			OnAttachEvent();
-			xaserverarg arg;
-			
-			int p = GetArg();
+			xaserverarg arg= GetArg();
 		
 			xstring skuid = arg.GetArgString(L"guid");
 			xstring customerItemNo = arg.GetArgString(L"CustomerItemNo");
diff --git a/jrj/project/business/EnquiryEx3.list.cpp b/jrj/project/business/EnquiryEx3.list.cpp
index 9d37420..d55ea7f 100644
--- a/jrj/project/business/EnquiryEx3.list.cpp
+++ b/jrj/project/business/EnquiryEx3.list.cpp
Binary files differ
diff --git a/jrj/project/business/Expense/FactoryTempDeduct.cpp b/jrj/project/business/Expense/FactoryTempDeduct.cpp
index 694e7eb..e198508 100644
--- a/jrj/project/business/Expense/FactoryTempDeduct.cpp
+++ b/jrj/project/business/Expense/FactoryTempDeduct.cpp
Binary files differ
diff --git a/jrj/project/business/Expense/FreightExpenseList.cpp b/jrj/project/business/Expense/FreightExpenseList.cpp
new file mode 100644
index 0000000..6a53577
--- /dev/null
+++ b/jrj/project/business/Expense/FreightExpenseList.cpp
Binary files differ
diff --git a/jrj/project/business/Expense/TestExpense.GDNInvoiceno.cpp b/jrj/project/business/Expense/TestExpense.GDNInvoiceno.cpp
new file mode 100644
index 0000000..a3cbc56
--- /dev/null
+++ b/jrj/project/business/Expense/TestExpense.GDNInvoiceno.cpp
Binary files differ
diff --git a/jrj/project/business/GDN/SelectItem.New.GDN.cpp b/jrj/project/business/GDN/SelectItem.New.GDN.cpp
index c06cc2c..cc16690 100644
--- a/jrj/project/business/GDN/SelectItem.New.GDN.cpp
+++ b/jrj/project/business/GDN/SelectItem.New.GDN.cpp
Binary files differ
diff --git a/jrj/project/business/GDN3.list.cpp b/jrj/project/business/GDN3.list.cpp
index a3637f5..18475f1 100644
--- a/jrj/project/business/GDN3.list.cpp
+++ b/jrj/project/business/GDN3.list.cpp
@@ -420,7 +420,7 @@
 				KXMLDOMDocument supplier_x = ViewObject::RetrieveData(L"/sale/data/SupplierV3/entity/FindBySaleType", L"id", s);
 				if (supplier_x)
 				{
-					if (supplier_x.text() != L"跟单")
+					if ((xstring)supplier_x.text() != L"跟单")
 					{
 						alert(L"当前角色不是跟单员不能新增单子,请重新选择角色");
 						return 0;
diff --git a/jrj/project/business/PO/Maint.PaperCard.PO.hpp b/jrj/project/business/PO/Maint.PaperCard.PO.hpp
index fb87dec..5f259b7 100644
--- a/jrj/project/business/PO/Maint.PaperCard.PO.hpp
+++ b/jrj/project/business/PO/Maint.PaperCard.PO.hpp
Binary files differ
diff --git a/jrj/project/business/PO/Maint.PurcherItem.cpp b/jrj/project/business/PO/Maint.PurcherItem.cpp
index 7a7eaa7..1fabb53 100644
--- a/jrj/project/business/PO/Maint.PurcherItem.cpp
+++ b/jrj/project/business/PO/Maint.PurcherItem.cpp
Binary files differ
diff --git a/jrj/project/business/PO/MakeAllPOEx.PO.cpp b/jrj/project/business/PO/MakeAllPOEx.PO.cpp
index e4b0cdb..7c50d9c 100644
--- a/jrj/project/business/PO/MakeAllPOEx.PO.cpp
+++ b/jrj/project/business/PO/MakeAllPOEx.PO.cpp
Binary files differ
diff --git a/jrj/project/business/PO/PO.maint.base.cpp b/jrj/project/business/PO/PO.maint.base.cpp
index e73db3f..bf6bcda 100644
--- a/jrj/project/business/PO/PO.maint.base.cpp
+++ b/jrj/project/business/PO/PO.maint.base.cpp
Binary files differ
diff --git a/jrj/project/business/ProductSample/ProductNewItem.cpp b/jrj/project/business/ProductSample/ProductNewItem.cpp
index af6dbbf..1f0b244 100644
--- a/jrj/project/business/ProductSample/ProductNewItem.cpp
+++ b/jrj/project/business/ProductSample/ProductNewItem.cpp
Binary files differ
diff --git a/jrj/project/business/Public/message.business.cpp b/jrj/project/business/Public/message.business.cpp
index 092ebc6..5a86bbc 100644
--- a/jrj/project/business/Public/message.business.cpp
+++ b/jrj/project/business/Public/message.business.cpp
Binary files differ
diff --git a/jrj/project/vindexmenu.cpp b/jrj/project/vindexmenu.cpp
index de87d5f..c8ebe19 100644
--- a/jrj/project/vindexmenu.cpp
+++ b/jrj/project/vindexmenu.cpp
@@ -370,7 +370,7 @@
 	int OnMenuAgent()
 	{
 		xstring s = L"menuAgent:Y";
-		SendMessage(m_nHwnd, 0x401, (LPARAM)s, 0);
+		SendMessage(m_nHwnd, 0x401, (LPARAM)s.c_str(), 0);
 		OnHideWin();
 		return 1;
 	}

--
Gitblit v1.9.3