From d27e8f1c8b5310814e46bc55d1ff869b0c62ec67 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期一, 16 九月 2024 10:03:48 +0800
Subject: [PATCH] update

---
 jrj/project/business/QuoteFile.cpp |  204 +++++++++++++++++++++++++++-----------------------
 1 files changed, 111 insertions(+), 93 deletions(-)

diff --git a/jrj/project/business/QuoteFile.cpp b/jrj/project/business/QuoteFile.cpp
index d2a5bce..8cc020a 100644
--- a/jrj/project/business/QuoteFile.cpp
+++ b/jrj/project/business/QuoteFile.cpp
@@ -277,18 +277,18 @@
 
 		int colBuyerRemark = getItemCol(cell, startRow - 1, L"采购To业务备注");
 		int colFactoryImage = getItemCol(cell, startRow - 1, L"工厂图片");
-		int colGWT = getItemCol(cell, startRow - 1, L"毛重,毛重(KG)L");
-		int colNWT = getItemCol(cell, startRow - 1, L"净重,净重(KG)L");
-		int colVolDesc = getItemCol(cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L");
-		int colVol = getItemCol(cell, startRow - 1, L"体积,体积(M3)L");
-		int col40HQ = getItemCol(cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int colGWT = getItemCol(cell, startRow - 1, L"毛重,毛重(KG)");
+		int colNWT = getItemCol(cell, startRow - 1, L"净重,净重(KG)");
+		int colVolDesc = getItemCol(cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)");
+		int colVol = getItemCol(cell, startRow - 1, L"体积,体积(M3)");
+		int col40HQ = getItemCol(cell, startRow - 1, L"40HQ,QTY(40HQ)");
 
 		int colSupplier1 = getItemCol(cell, startRow - 1, L"供应商1");
 		int colSupplier = getItemCol(cell, startRow - 1, L"供应商");
 		int colPOPrice1 = getItemCol(cell, startRow - 1, L"价格1");
 		int colPOPrice = getItemCol(cell, startRow - 1, L"价格");
 
-		int colInnerOuter = getItemCol(cell, startRow - 1, L"装箱数(内/外)L");
+		int colInnerOuter = getItemCol(cell, startRow - 1, L"装箱数(内/外)");
 		int colItemQty = getItemCol(cell, startRow - 1, L"数量,Qty");
 		int colPackage = getItemCol(cell, startRow - 1, L"Package,包装方式");
 		int colBuyer = getItemCol(cell, startRow - 1, L"采购人员");
@@ -377,11 +377,11 @@
 
 		int colBuyerRemark = getItemCol(cell, startRow - 1, L"采购To业务备注");
 		int colFactoryImage = getItemCol(cell, startRow - 1, L"工厂图片");
-		int colGWT = getItemCol(cell, startRow - 1, L"毛重,毛重(KG)L");
-		int colNWT = getItemCol(cell, startRow - 1, L"净重,净重(KG)L");
-		int colVolDesc = getItemCol(cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L");
-		int colVol = getItemCol(cell, startRow - 1, L"体积,体积(M3)L");
-		int col40HQ = getItemCol(cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int colGWT = getItemCol(cell, startRow - 1, L"毛重,毛重(KG)");
+		int colNWT = getItemCol(cell, startRow - 1, L"净重,净重(KG)");
+		int colVolDesc = getItemCol(cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)");
+		int colVol = getItemCol(cell, startRow - 1, L"体积,体积(M3)");
+		int col40HQ = getItemCol(cell, startRow - 1, L"40HQ,QTY(40HQ)");
 
 		int colPOPrice = getItemCol(cell, startRow - 1, L"价格");
 		int colSupplier = getItemCol(cell, startRow - 1, L"供应商");
@@ -396,7 +396,7 @@
 		int colBOMType2 = getItemCol(cell, startRow - 1, L"类型2");
 		int colBOMType3 = getItemCol(cell, startRow - 1, L"类型3");
 
-		int colInnerOuter = getItemCol(cell, startRow - 1, L"装箱数(内/外)L");
+		int colInnerOuter = getItemCol(cell, startRow - 1, L"装箱数(内/外)");
 		int colItemQty = getItemCol(cell, startRow - 1, L"数量,Qty");
 		int colPackage = getItemCol(cell, startRow - 1, L"Package,包装方式");
 		int colBuyer = getItemCol(cell, startRow - 1, L"采购人员");
@@ -507,10 +507,9 @@
 
 		xaserverarg argx;
 		argx.AddArg(L"QuoteNo", dw_base.GetItemString(1, L"QuoteNo"));
-		int p1 = argx;
 		if (dw_base.GetItemString(1, L"QuoteNo") != L"")
 		{
-			OpenWindow(L"dev:xpage[xmQuoteBillList.vx]", p1);
+			OpenWindow(L"dev:xpage[xmQuoteBillList.vx]", argx);
 		}
 		if (argx.GetArgString(L"action") != L"ok") return 1;
 
@@ -830,11 +829,11 @@
 
 		int colBuyerRemark = getItemCol(dw_cell, startRow - 1, L"采购To业务备注");
 		int colFactoryImage = getItemCol(dw_cell, startRow - 1, L"工厂图片");
-		int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)L");
-		int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)L");
-		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L");
-		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)");
+		int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)");
+		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)");
+		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
 
 		int colSupplier = getItemCol(dw_cell, startRow - 1, L"供应商");
 		int colSupplier1 = getItemCol(dw_cell, startRow - 1, L"供应商1");
@@ -1022,11 +1021,11 @@
 		int colItemSpec = getItemCol(dw_cell, startRow - 1, L"Specifications,规格,产品规格");
 		int colBuyer = getItemCol(dw_cell, startRow - 1, L"采购人员");
 		int colPackage = getItemCol(dw_cell, startRow - 1, L"Package,包装方式");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
 
-		int colGW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L");
-		int colNW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L");
-		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"长X宽X高(CM)L");
+		int colGW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)");
+		int colNW = getItemCol(dw_cell, startRow - 1, L"净重(KG)");
+		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"长X宽X高(CM)");
 
 		int colPrice = getItemCol(dw_cell, startRow - 1, L"采购价");
 
@@ -1096,11 +1095,11 @@
 		int colItemSpec = getItemCol(dw_cell, startRow - 1, L"Specifications,规格,产品规格");
 		int colBuyer = getItemCol(dw_cell, startRow - 1, L"采购人员");
 		int colPackage = getItemCol(dw_cell, startRow - 1, L"Package,包装方式");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
 
-		int colGW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L");
-		int colNW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L");
-		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"长X宽X高(CM)L");
+		int colGW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)");
+		int colNW = getItemCol(dw_cell, startRow - 1, L"净重(KG)");
+		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"长X宽X高(CM)");
 
 		int colProductInfo = getItemCol(dw_cell, startRow - 1, L"业务部产品信息");
 		int colProductInfo1 = getItemCol(dw_cell, startRow - 1, L"采购部产品信息");
@@ -1156,7 +1155,7 @@
 		int colItemSpec = getItemCol(dw_cell,startRow - 1,L"Specifications,规格,产品规格");
 		int colBuyer = getItemCol(dw_cell,startRow - 1,L"采购人员");
 		int colPackage = getItemCol(dw_cell,startRow - 1,L"Package,包装方式");
-		int col40HQ= getItemCol(dw_cell,startRow - 1,L"40HQ,QTY(40HQ)L");
+		int col40HQ= getItemCol(dw_cell,startRow - 1,L"40HQ,QTY(40HQ)");
 		int colBuyer = getItemCol(dw_cell,startRow - 1,L"采购人员");
 
 		xstring items=L"<data>";
@@ -1221,11 +1220,11 @@
 
 		int colBuyerRemark = getItemCol(dw_cell, startRow - 1, L"采购To业务备注");
 		int colFactoryImage = getItemCol(dw_cell, startRow - 1, L"工厂图片");
-		int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)L");
-		int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)L");
-		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L");
-		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)");
+		int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)");
+		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)");
+		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
 
 		int colSupplier1 = getItemCol(dw_cell, startRow - 1, L"供应商1");
 		int colPOPrice1 = getItemCol(dw_cell, startRow - 1, L"价格1");
@@ -1320,7 +1319,7 @@
 		{
 			head = dw_cell.GetItemString(row, col);
 			if (head == L"Product Name" || head == L"Product Description") namecol = col;
-			if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)L") pricecol = col;
+			if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)") pricecol = col;
 			if (head == L"采购To业务备注") purchremarkcol = col;
 			if (head == L"采购人员") purchercol = col;
 		}
@@ -1507,8 +1506,8 @@
 		int colItemQty = getItemCol(dw_cell, headrow, L"数量,Qty");
 		//int colItemSpec = getItemCol(dw_cell,headrow,L"Specifications,规格,产品规格");
 		int colItemPurchDate = getItemCol(dw_cell, headrow, L"业务发送采购时间");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
-		int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)L");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
+		int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)");
 		int col = 0;
 		int namecol = 0;
 		int pricecol = 0;
@@ -1520,7 +1519,7 @@
 		{
 			head = dw_cell.GetItemString(row, col);
 			if (head == L"Product Name" || head == L"Product Description") namecol = col;
-			if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)L") pricecol = col;
+			if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)") pricecol = col;
 			if (head == L"采购To业务备注") purchremarkcol = col;
 			if (head == L"采购人员") purchercol = col;
 		}
@@ -1573,8 +1572,8 @@
 		int colItemQty = getItemCol(dw_cell, headrow, L"数量,Qty");
 		//int colItemSpec = getItemCol(dw_cell,headrow,L"Specifications,规格,产品规格");
 		int colItemPurchDate = getItemCol(dw_cell, headrow, L"业务发送采购时间");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
-		int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)L");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
+		int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)");
 		int colSalebackDate = getItemCol(dw_cell, startRow - 1, L"采购提交业务时间");
 
 		int col = 0;
@@ -1588,7 +1587,7 @@
 		{
 			head = dw_cell.GetItemString(row, col);
 			if (head == L"Product Name" || head == L"Product Description") namecol = col;
-			if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)L") pricecol = col;
+			if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)") pricecol = col;
 			if (head == L"采购To业务备注") purchremarkcol = col;
 			if (head == L"采购人员") purchercol = col;
 		}
@@ -1932,8 +1931,8 @@
 		int colItemQty = getItemCol(dw_cell, headrow, L"数量,Qty");
 		//int colItemSpec = getItemCol(dw_cell,headrow,L"Specifications,规格,产品规格");
 		int colItemPurchDate = getItemCol(dw_cell, headrow, L"业务发送采购时间");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
-		int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)L");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
+		int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)");
 
 		int col = 0;
 		int namecol = 0;
@@ -1946,7 +1945,7 @@
 		{
 			head = dw_cell.GetItemString(row, col);
 			if (head == L"Product Name" || head == L"Product Description") namecol = col;
-			if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)L") pricecol = col;
+			if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)") pricecol = col;
 			if (head == L"采购To业务备注") purchremarkcol = col;
 			if (head == L"采购人员") purchercol = col;
 		}
@@ -2831,17 +2830,17 @@
 		//int colToPODate = getItemCol(dw_cell,startRow - 1,L"业务发送采购时间");
 
 
-		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L");
-		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L");
-		int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)L");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)");
+		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)");
+		int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
 		int colSKUID = getItemCol(dw_cell, startRow - 1, L"SKUID");
 
 		int colPONote = getItemCol(dw_cell, startRow - 1, L"采购To业务备注");
 		int colPOPhoto = getItemCol(dw_cell, startRow - 1, L"工厂图片");
 		int colPOPrice = getItemCol(dw_cell, startRow - 1, L"采购价");
-		int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L");
-		int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L");
+		int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)");
+		int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)");
 		int colSKUNo = getItemCol(dw_cell, startRow - 1, L"SKUID,SKUNo");
 
 		if (col == colFOBPrice)
@@ -3015,14 +3014,14 @@
 						if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1)
 						{
 							alert(L"价格中没指定ABC");
-							if (pricea == L"") pricea = price; else pricea += L"+L" + price;
+							if (pricea == L"") pricea = price; else pricea += L"+" + price;
 						}
 						else if (price.find(L"A") > 0 || price.find(L"a") > 0)
-							if (pricea == L"") pricea = price; else pricea += L"+L" + price;
+							if (pricea == L"") pricea = price; else pricea += L"+" + price;
 						else if (price.find(L"B") > 0 || price.find(L"b") > 0)
-							if (priceb == L"") priceb = price; else priceb += L"+L" + price;
+							if (priceb == L"") priceb = price; else priceb += L"+" + price;
 						else if (price.find(L"C") > 0 || price.find(L"c") > 0)
-							if (pricec == L"") pricec = price; else pricec += L"+L" + price;
+							if (pricec == L"") pricec = price; else pricec += L"+" + price;
 					}
 					if (price1 != L"")
 					{
@@ -3030,14 +3029,14 @@
 						if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1)
 						{
 							alert(L"价格中没指定ABC");
-							if (pricea == L"") pricea = price; else pricea += L"+L" + price;
+							if (pricea == L"") pricea = price; else pricea += L"+" + price;
 						}
 						else if (price.find(L"A") > 0 || price.find(L"a") > 0)
-							if (pricea == L"") pricea = price; else pricea += L"+L" + price;
+							if (pricea == L"") pricea = price; else pricea += L"+" + price;
 						else if (price.find(L"B") > 0 || price.find(L"b") > 0)
-							if (priceb == L"") priceb = price; else priceb += L"+L" + price;
+							if (priceb == L"") priceb = price; else priceb += L"+" + price;
 						else if (price.find(L"C") > 0 || price.find(L"c") > 0)
-							if (pricec == L"") pricec = price; else pricec += L"+L" + price;
+							if (pricec == L"") pricec = price; else pricec += L"+" + price;
 					}
 					if (price2 != L"")
 					{
@@ -3045,14 +3044,14 @@
 						if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1)
 						{
 							alert(L"价格中没指定ABC");
-							if (pricea == L"") pricea = price; else pricea += L"+L" + price;
+							if (pricea == L"") pricea = price; else pricea += L"+" + price;
 						}
 						else if (price.find(L"A") > 0 || price.find(L"a") > 0)
-							if (pricea == L"") pricea = price; else pricea += L"+L" + price;
+							if (pricea == L"") pricea = price; else pricea += L"+" + price;
 						else if (price.find(L"B") > 0 || price.find(L"b") > 0)
-							if (priceb == L"") priceb = price; else priceb += L"+L" + price;
+							if (priceb == L"") priceb = price; else priceb += L"+" + price;
 						else if (price.find(L"C") > 0 || price.find(L"c") > 0)
-							if (pricec == L"") pricec = price; else pricec += L"+L" + price;
+							if (pricec == L"") pricec = price; else pricec += L"+" + price;
 					}
 					if (price3 != L"")
 					{
@@ -3060,14 +3059,14 @@
 						if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1)
 						{
 							alert(L"价格中没指定ABC");
-							if (pricea == L"") pricea = price; else pricea += L"+L" + price;
+							if (pricea == L"") pricea = price; else pricea += L"+" + price;
 						}
 						else if (price.find(L"A") > 0 || price.find(L"a") > 0)
-							if (pricea == L"") pricea = price; else pricea += L"+L" + price;
+							if (pricea == L"") pricea = price; else pricea += L"+" + price;
 						else if (price.find(L"B") > 0 || price.find(L"b") > 0)
-							if (priceb == L"") priceb = price; else priceb += L"+L" + price;
+							if (priceb == L"") priceb = price; else priceb += L"+" + price;
 						else if (price.find(L"C") > 0 || price.find(L"c") > 0)
-							if (pricec == L"") pricec = price; else pricec += L"+L" + price;
+							if (pricec == L"") pricec = price; else pricec += L"+" + price;
 					}
 					price = pricec;
 					if (priceb != L"")
@@ -3075,14 +3074,14 @@
 						if (price == L"")
 							price = priceb;
 						else
-							price += L"+L" + priceb;
+							price += L"+" + priceb;
 					}
 					if (pricea != L"")
 					{
 						if (price == L"")
 							price = pricea;
 						else
-							price += L"+L" + pricea;
+							price += L"+" + pricea;
 					}
 					dw_cell.SetItemString(row, colPrice, price);
 					dw_cell.Redraw();
@@ -3144,17 +3143,17 @@
 		int colBuyerPrice = getItemCol(dw_cell, startRow - 1, L"采购价,采购价格");
 		int colPackage = getItemCol(dw_cell, startRow - 1, L"Package");
 		int colPurchor = getItemCol(dw_cell, startRow - 1, L"采购员,采购人员");
-		int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)L");
+		int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)");
 		int colFOBPrice = getItemCol(dw_cell, startRow - 1, L"FOB Price,FOB Price(USD),Fob Price");
 		int colQuantity = getItemCol(dw_cell, startRow - 1, L"数量,Qty");
 
 		int colBuyerRemark = getItemCol(dw_cell, startRow - 1, L"采购To业务备注");
 		int colFactoryImage = getItemCol(dw_cell, startRow - 1, L"工厂图片");
-		int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)L");
-		int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)L");
-		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L");
-		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L");
-		int colHQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)");
+		int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)");
+		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)");
+		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)");
+		int colHQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
 		int colSKUNo = getItemCol(dw_cell, startRow - 1, L"SKUID,SKUNo");
 
 
@@ -4074,10 +4073,10 @@
 
 		int colSaler = getItemCol(dw_cell, startRow - 1, L"业务员");
 
-		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L");
-		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L");
-		int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)L");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)");
+		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)");
+		int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
 		int colSKUID = getItemCol(dw_cell, startRow - 1, L"SKUID");
 
 		int colPONote = getItemCol(dw_cell, startRow - 1, L"采购To业务备注");
@@ -4087,8 +4086,8 @@
 
 		int colPOPhoto = getItemCol(dw_cell, startRow - 1, L"工厂图片");
 		int colPOPrice = getItemCol(dw_cell, startRow - 1, L"采购价");
-		int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L");
-		int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L");
+		int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)");
+		int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)");
 		int colSKUNo = getItemCol(dw_cell, startRow - 1, L"SKUID,SKUNo");
 
 		int purchremarkcol = getItemCol(dw_cell, startRow - 1, L"采购To业务备注");
@@ -4260,17 +4259,17 @@
 		//int colToPODate = getItemCol(dw_cell,startRow - 1,L"业务发送采购时间");
 
 
-		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L");
-		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L");
-		int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)L");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)");
+		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)");
+		int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
 		int colSKUID = getItemCol(dw_cell, startRow - 1, L"SKUID");
 
 		int colPONote = getItemCol(dw_cell, startRow - 1, L"采购To业务备注");
 		int colPOPhoto = getItemCol(dw_cell, startRow - 1, L"工厂图片");
 		int colPOPrice = getItemCol(dw_cell, startRow - 1, L"采购价");
-		int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L");
-		int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L");
+		int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)");
+		int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)");
 		int colSKUNo = getItemCol(dw_cell, startRow - 1, L"SKUID,SKUNo");
 
 		dwhdr.idFrom = 0;
@@ -4492,7 +4491,7 @@
 						{
 							alert(L"价格中没指定ABC");
 						}
-						price = price0 + L"+L" + price1;
+						price = price0 + L"+" + price1;
 					}
 					dw_cell.SetItemString(ARow, colPrice, price);
 				}
@@ -4604,11 +4603,11 @@
 
 		int colBuyerRemark = getItemCol(dw_cell, startRow - 1, L"采购To业务备注");
 		int colFactoryImage = getItemCol(dw_cell, startRow - 1, L"工厂图片");
-		int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)L");
-		int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)L");
-		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L");
-		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L");
-		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L");
+		int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)");
+		int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)");
+		int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)");
+		int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)");
+		int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)");
 		int colPurchedDate = getItemCol(dw_cell, startRow - 1, L"采购提交业务时间");
 		int colPhoto1 = getItemCol(dw_cell, startRow - 1, L"工厂图片");
 		//int colProductInfo = getItemCol(dw_cell,startRow - 1,L"产品信息");
@@ -4724,6 +4723,21 @@
 		return 1;
 	}
 
+	xstring GetTryFirstAttr(xstring str, xstring term)
+	{
+		xstring foundStr = L" " + term + L"=";
+		wchar quote = L'"';
+		int pos = str.find(foundStr);
+		if (pos < 0) return L"";
+		pos += foundStr.length();
+		while (str.at(pos) == L' ')pos++;
+		if (str.at(pos) == L'\'')quote = L'\'';
+		int epos = ++pos;
+		while (str.at(epos) && str.at(epos) != quote)epos++;
+		if (!str.at(epos))return L"";
+		return str.mid(pos, epos - pos);
+	}
+
 	int onload()
 	{
 		SetArg();
@@ -4755,7 +4769,11 @@
 			x.loadXML(templ);
 			*/
 			action = L"purch";
-
+			action = GetTryFirstAttr(templ, L"action");
+			if (action == L"") action = L"purch";
+			entityItemID = GetTryFirstAttr(templ, L"TemplateItemID");
+			if (entityItemID == L"")entityItemID = GetTryFirstAttr(templ, L"ItemID");
+#if 0
 			if (templ.find(L"action=\"") >= 0)
 			{
 				action = templ.mid(templ.find(L"action=\"") + 8, templ.find(L"\"", templ.find(L"action=\"") + 8) - (templ.find(L"action=\"") + 8));
@@ -4772,7 +4790,7 @@
 					entityItemID = templ.mid(templ.find(L" ItemID=\"") + 9, templ.find(L"\"", templ.find(L" ItemID=\"") + 9) - (templ.find(L" ItemID=\"") + 9));
 				}
 			}
-
+#endif
 			/*action = x.documentElement.getAttribute(L"action");
 			if(action==L"") action=L"purch";
 			entityItemID = x.documentElement.getAttribute(L"TemplateItemID");

--
Gitblit v1.9.3