From b477596b2641c9649981ead0b3c040cb5a4de8ad Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期五, 15 十一月 2024 15:50:53 +0800
Subject: [PATCH] update

---
 jrj/project/business/QuoteFile.cpp |   58 +++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 47 insertions(+), 11 deletions(-)

diff --git a/jrj/project/business/QuoteFile.cpp b/jrj/project/business/QuoteFile.cpp
index c363769..278e971 100644
--- a/jrj/project/business/QuoteFile.cpp
+++ b/jrj/project/business/QuoteFile.cpp
@@ -3523,14 +3523,31 @@
 		startRow++;
 		int row = dw_cell.GetRow();
 
+		int colPurchPrice = getItemCol(dw_cell, headrow, L"价格");
 		int colPurchPrice1 = getItemCol(dw_cell, headrow, L"价格1");
 		int colPurchPrice2 = getItemCol(dw_cell, headrow, L"价格2");
 		int colPurchPrice3 = getItemCol(dw_cell, headrow, L"价格3");
 		if (colPurchPrice3 > 0) return  1;
 
-		if (colPurchPrice2 < 1)
+		if (colPurchPrice1 < 1)
 		{
-			//dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3);
+			dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3);
+			//dw_cell.SetColumnCount(dw_cell.GetValidCol()+3);
+			dw_cell.SetRowColumn(row, colPurchPrice + 1);
+			dw_cell.SetAnchorRowColumn(row, colPurchPrice + 1);
+
+			SendCtrlCmd(dw_cell, L"xmFormatCellInsertCol");
+			SendCtrlCmd(dw_cell, L"xmFormatCellInsertCol");
+			SendCtrlCmd(dw_cell, L"xmFormatCellInsertCol");
+
+			dw_cell.SetItemString(headrow, colPurchPrice + 1, L"供应商1");
+			dw_cell.SetItemString(headrow, colPurchPrice + 2, L"类型1");
+			dw_cell.SetItemString(headrow, colPurchPrice + 3, L"价格1");
+			dw_cell.SetColumnWidth(colPurchPrice + 2, 0);
+		}
+		else if (colPurchPrice2 < 1)
+		{
+			dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3);
 			//dw_cell.SetColumnCount(dw_cell.GetValidCol()+3);
 			dw_cell.SetRowColumn(row, colPurchPrice1 + 1);
 			dw_cell.SetAnchorRowColumn(row, colPurchPrice1 + 1);
@@ -3542,10 +3559,11 @@
 			dw_cell.SetItemString(headrow, colPurchPrice1 + 1, L"供应商2");
 			dw_cell.SetItemString(headrow, colPurchPrice1 + 2, L"类型2");
 			dw_cell.SetItemString(headrow, colPurchPrice1 + 3, L"价格2");
+			dw_cell.SetColumnWidth(colPurchPrice1 + 2, 0);
 		}
-		else
+		else if(colPurchPrice3 < 1)
 		{
-			//dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3);
+			dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3);
 			//dw_cell.SetColumnCount(dw_cell.GetValidCol()+3);
 			dw_cell.SetRowColumn(row, colPurchPrice2 + 1);
 			dw_cell.SetAnchorRowColumn(row, colPurchPrice2 + 1);
@@ -3557,6 +3575,7 @@
 			dw_cell.SetItemString(headrow, colPurchPrice2 + 1, L"供应商3");
 			dw_cell.SetItemString(headrow, colPurchPrice2 + 2, L"类型3");
 			dw_cell.SetItemString(headrow, colPurchPrice2 + 3, L"价格3");
+			dw_cell.SetColumnWidth(colPurchPrice2 + 2, 0);
 		}
 		return 1;
 	}
@@ -3580,6 +3599,8 @@
 			SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol");
 			SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol");
 			SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol");
+
+			dw_cell.SetColumnCount(dw_cell.GetColumnCount() - 3);
 			return 1;
 		}
 
@@ -3592,6 +3613,8 @@
 			SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol");
 			SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol");
 
+			dw_cell.SetColumnCount(dw_cell.GetColumnCount() - 3);
+
 			return 1;
 		}
 
@@ -3603,6 +3626,8 @@
 			SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol");
 			SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol");
 			SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol");
+
+			dw_cell.SetColumnCount(dw_cell.GetColumnCount() - 3);
 
 			return 1;
 		}
@@ -5029,8 +5054,6 @@
 			int colSupplier1 = getItemCol(dw_cell, startRow - 1, L"供应商1");
 			int colBuyPrice1 = getItemCol(dw_cell, startRow - 1, L"价格1");
 
-			int colSaleSendDate = getItemCol(dw_cell, startRow - 1, L"业务发送采购时间");
-
 			dw_cell.SetColumnWidth(colSKUID, 0);
 			dw_cell.SetColumnWidth(colItemNo, 0);
 			dw_cell.SetColumnWidth(colCustomerItemNo, 0);
@@ -5096,25 +5119,38 @@
 			}
 
 			dw_cell.SetRowColumn(1, 1);
-			dw_cell.SetAnchorRowColumn(startRow-1, 1);
+			dw_cell.SetAnchorRowColumn(startRow - 2, 1);
 			SendCtrlCmd(dw_cell, L"xmEditCopy");
 
 			dw_cell.SetRowColumn(1, colPhoto);
-			dw_cell.SetAnchorRowColumn(startRow - 1, colPhoto);
+			dw_cell.SetAnchorRowColumn(startRow - 2, colPhoto);
 			SendCtrlCmd(dw_cell, L"xmEditPaste");
 
 			dw_cell.SetRowColumn(1, 2);
-			dw_cell.SetAnchorRowColumn(startRow - 1, 2);
+			dw_cell.SetAnchorRowColumn(startRow - 2, 2);
 			SendCtrlCmd(dw_cell, L"xmEditCopy");
 
 			dw_cell.SetRowColumn(1, colPhoto+1);
-			dw_cell.SetAnchorRowColumn(startRow - 1, colPhoto+1);
+			dw_cell.SetAnchorRowColumn(startRow - 2, colPhoto+1);
 			SendCtrlCmd(dw_cell, L"xmEditPaste");
 
+			int colSaleSendDate = getItemCol(dw_cell, startRow - 1, L"业务发送采购时间");
 			dw_cell.SetItemString(2, colBuyerPrice, L"业务员");
 			dw_cell.SetItemString(3, colBuyerPrice, L"发送日期:");
 			dw_cell.SetItemString(2, colBuyerPrice+1, dw_cell.GetItemString(startRow, colSaler));
 			dw_cell.SetItemString(3, colBuyerPrice+1, dw_cell.GetItemString(startRow, colSaleSendDate));
+			dw_cell.SetColumnWidth(colSaleSendDate, 0);
+
+			int colMOQ = getItemCol(dw_cell, startRow - 1, L"MOQ");
+			int colSupplier = getItemCol(dw_cell, startRow - 1, L"供应商");
+			int colBuyPrice = getItemCol(dw_cell, startRow - 1, L"价格");
+
+			dw_cell.SetRowColumn(startRow, colSupplier);
+			dw_cell.SetAnchorRowColumn(startRow, colSupplier);
+
+			dw_cell.SetColumnWidth(colBuyerPrice, 50);
+			dw_cell.SetColumnWidth(colMOQ, 50);
+			dw_cell.SetColumnWidth(colBuyPrice, 50);
 		}
 		
 
@@ -5261,7 +5297,7 @@
 		{
 			xnode anode = GetAgentNode(L"tabheader");
 			anode.SetLayerFlow(0x00000100);
-			dw_cell.SetColumnCount(dw_cell.GetValidCol() + 6);
+			dw_cell.SetColumnCount(dw_cell.GetValidCol() + 9);
 			//dw_cell.SetFixedCols(7);
 			AdjustView(dw_cell);
 		}

--
Gitblit v1.9.3