|
@@ -350,30 +350,30 @@ namespace UAS_LabelMachine
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (box[j].Name.ToLower() == "percent" && !box[j].Checked)
|
|
|
|
|
- {
|
|
|
|
|
- if (DataTable.Columns[i].ColumnName.ToLower().Contains("chw_percent1") || DataTable.Columns[i].ColumnName.ToLower().Contains("chw_percent2") || DataTable.Columns[i].ColumnName.ToLower().Contains("chw_itemname1") || DataTable.Columns[i].ColumnName.ToLower().Contains("chw_itemname2"))
|
|
|
|
|
- {
|
|
|
|
|
- DataTable.Columns.RemoveAt(i);
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if (box[j].Name.ToLower() == "ts" && !box[j].Checked)
|
|
|
|
|
- {
|
|
|
|
|
- if (DataTable.Columns[i].ColumnName.ToLower() == ("ts1") || DataTable.Columns[i].ColumnName.ToLower() == ("ts2") || DataTable.Columns[i].ColumnName.ToLower() == ("ts3"))
|
|
|
|
|
- {
|
|
|
|
|
- DataTable.Columns.RemoveAt(i);
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if (box[j].Name.ToLower() == "bvceo" && !box[j].Checked)
|
|
|
|
|
- {
|
|
|
|
|
- if (DataTable.Columns[i].ColumnName.ToLower() == "bvceo1" || DataTable.Columns[i].ColumnName.ToLower() == ("bvceo2") || DataTable.Columns[i].ColumnName.ToLower() == ("bvceo3"))
|
|
|
|
|
- {
|
|
|
|
|
- DataTable.Columns.RemoveAt(i);
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //if (box[j].Name.ToLower() == "percent" && !box[j].Checked)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // if (DataTable.Columns[i].ColumnName.ToLower().Contains("chw_percent1") || DataTable.Columns[i].ColumnName.ToLower().Contains("chw_percent2") || DataTable.Columns[i].ColumnName.ToLower().Contains("chw_itemname1") || DataTable.Columns[i].ColumnName.ToLower().Contains("chw_itemname2"))
|
|
|
|
|
+ // {
|
|
|
|
|
+ // DataTable.Columns.RemoveAt(i);
|
|
|
|
|
+ // break;
|
|
|
|
|
+ // }
|
|
|
|
|
+ //}
|
|
|
|
|
+ //if (box[j].Text.ToLower() == "ts" && !box[j].Checked)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // if (DataTable.Columns[i].ColumnName.ToLower() == ("ts1") || DataTable.Columns[i].ColumnName.ToLower() == ("ts2") || DataTable.Columns[i].ColumnName.ToLower() == ("ts3"))
|
|
|
|
|
+ // {
|
|
|
|
|
+ // DataTable.Columns.RemoveAt(i);
|
|
|
|
|
+ // break;
|
|
|
|
|
+ // }
|
|
|
|
|
+ //}
|
|
|
|
|
+ //if (box[j].Text.ToLower() == "bvceo" && !box[j].Checked)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // if (DataTable.Columns[i].ColumnName.ToLower() == "bvceo1" || DataTable.Columns[i].ColumnName.ToLower() == ("bvceo2") || DataTable.Columns[i].ColumnName.ToLower() == ("bvceo3"))
|
|
|
|
|
+ // {
|
|
|
|
|
+ // DataTable.Columns.RemoveAt(i);
|
|
|
|
|
+ // break;
|
|
|
|
|
+ // }
|
|
|
|
|
+ //}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//获取行数量和列数量
|
|
//获取行数量和列数量
|
|
@@ -389,7 +389,7 @@ namespace UAS_LabelMachine
|
|
|
//row.RowStyle.IsLocked=true;
|
|
//row.RowStyle.IsLocked=true;
|
|
|
//给第一行的标签赋值样式和值
|
|
//给第一行的标签赋值样式和值
|
|
|
row.CreateCell(0);
|
|
row.CreateCell(0);
|
|
|
- row.Cells[0].SetCellValue(" 深爱半导体有限公司芯片出货清单");
|
|
|
|
|
|
|
+ row.Cells[0].SetCellValue(" 深爱半导体股份有限公司芯片出货清单");
|
|
|
row.GetCell(0).CellStyle = style;
|
|
row.GetCell(0).CellStyle = style;
|
|
|
//开始绘制的Index
|
|
//开始绘制的Index
|
|
|
int PaintIndex = 1;
|
|
int PaintIndex = 1;
|
|
@@ -416,9 +416,9 @@ namespace UAS_LabelMachine
|
|
|
First_OrderCode += DataTable.Rows[i]["pd_ordercode"].ToString() + " ";
|
|
First_OrderCode += DataTable.Rows[i]["pd_ordercode"].ToString() + " ";
|
|
|
}
|
|
}
|
|
|
//不包含的物料型号
|
|
//不包含的物料型号
|
|
|
- if (DataTable.Columns.Contains("pr_spec1") && !First_Prspec.Contains(DataTable.Rows[i]["pr_spec1"].ToString()))
|
|
|
|
|
|
|
+ if (DataTable.Columns.Contains("pr_orispeccode1") && !First_Prspec.Contains(DataTable.Rows[i]["pr_orispeccode1"].ToString()))
|
|
|
{
|
|
{
|
|
|
- First_Prspec += DataTable.Rows[i]["pr_spec1"].ToString() + " ";
|
|
|
|
|
|
|
+ First_Prspec += DataTable.Rows[i]["pr_orispeccode1"].ToString() + " ";
|
|
|
}
|
|
}
|
|
|
//不包含扩撒批号
|
|
//不包含扩撒批号
|
|
|
if (DataTable.Columns.Contains("ch_splitbatch") && !First_Batch.Contains(DataTable.Rows[i]["ch_splitbatch"].ToString()))
|
|
if (DataTable.Columns.Contains("ch_splitbatch") && !First_Batch.Contains(DataTable.Rows[i]["ch_splitbatch"].ToString()))
|
|
@@ -433,13 +433,13 @@ namespace UAS_LabelMachine
|
|
|
if (i / PageSize >= 1 && i % PageSize == 0)
|
|
if (i / PageSize >= 1 && i % PageSize == 0)
|
|
|
{
|
|
{
|
|
|
DataRow dr = FirstDT.NewRow();
|
|
DataRow dr = FirstDT.NewRow();
|
|
|
- dr["pr_spec"] = DataTable.Rows[i]["pr_spec"].ToString();
|
|
|
|
|
|
|
+ dr["pr_orispeccode"] = DataTable.Rows[i]["pr_orispeccode"].ToString();
|
|
|
dr["pi_inoutno"] = DataTable.Rows[i]["pi_inoutno"].ToString();
|
|
dr["pi_inoutno"] = DataTable.Rows[i]["pi_inoutno"].ToString();
|
|
|
pi_inoutno = DataTable.Rows[i]["pi_inoutno"].ToString();
|
|
pi_inoutno = DataTable.Rows[i]["pi_inoutno"].ToString();
|
|
|
dr["pi_title"] = DataTable.Rows[i]["pi_title"].ToString();
|
|
dr["pi_title"] = DataTable.Rows[i]["pi_title"].ToString();
|
|
|
dr["pi_date"] = DataTable.Rows[i]["pi_date"].ToString();
|
|
dr["pi_date"] = DataTable.Rows[i]["pi_date"].ToString();
|
|
|
dr["pd_ordercode"] = First_OrderCode;
|
|
dr["pd_ordercode"] = First_OrderCode;
|
|
|
- dr["pr_spec1"] = First_Prspec;
|
|
|
|
|
|
|
+ dr["pr_orispeccode1"] = First_Prspec;
|
|
|
dr["ch_splitbatch"] = First_Batch;
|
|
dr["ch_splitbatch"] = First_Batch;
|
|
|
dr["ch_waterid"] = BaseUtil.GetArrStr(First_WID, " ");
|
|
dr["ch_waterid"] = BaseUtil.GetArrStr(First_WID, " ");
|
|
|
dr["num"] = PageSize;
|
|
dr["num"] = PageSize;
|
|
@@ -510,7 +510,7 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
if (j == 0)
|
|
|
{
|
|
{
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i]["pr_spec"].ToString());
|
|
|
|
|
|
|
+ row1.Cells[j].SetCellValue(DataTable.Rows[i]["pr_orispeccode"].ToString());
|
|
|
}
|
|
}
|
|
|
else if (columnNum > 5 && j == columnNum - 5)
|
|
else if (columnNum > 5 && j == columnNum - 5)
|
|
|
{
|
|
{
|
|
@@ -546,7 +546,7 @@ namespace UAS_LabelMachine
|
|
|
else
|
|
else
|
|
|
row1.Cells[j - 4].SetCellValue(DataTable.Columns[j].Caption);
|
|
row1.Cells[j - 4].SetCellValue(DataTable.Columns[j].Caption);
|
|
|
//如果chw_itemname1的值为空,则值为100和0,其中一列不显示,不显示
|
|
//如果chw_itemname1的值为空,则值为100和0,其中一列不显示,不显示
|
|
|
- if (DataTable.Columns[j].ColumnName.ToLower().Contains("chw_itemname") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_spec") || DataTable.Columns[j].ColumnName.ToLower().Contains("pd_ordercode"))
|
|
|
|
|
|
|
+ if (DataTable.Columns[j].ColumnName.ToLower().Contains("chw_itemname") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_orispeccode") || DataTable.Columns[j].ColumnName.ToLower().Contains("pd_ordercode"))
|
|
|
{
|
|
{
|
|
|
sheet.SetColumnHidden(j - 4, true);
|
|
sheet.SetColumnHidden(j - 4, true);
|
|
|
}
|
|
}
|
|
@@ -576,12 +576,12 @@ namespace UAS_LabelMachine
|
|
|
if (i == rowNum - 1)
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
{
|
|
|
DataRow dr = FirstDT.NewRow();
|
|
DataRow dr = FirstDT.NewRow();
|
|
|
- dr["pr_spec"] = DataTable.Rows[i]["pr_spec"].ToString();
|
|
|
|
|
|
|
+ dr["pr_orispeccode"] = DataTable.Rows[i]["pr_orispeccode"].ToString();
|
|
|
dr["pi_inoutno"] = DataTable.Rows[i]["pi_inoutno"].ToString();
|
|
dr["pi_inoutno"] = DataTable.Rows[i]["pi_inoutno"].ToString();
|
|
|
dr["pi_title"] = DataTable.Rows[i]["pi_title"].ToString();
|
|
dr["pi_title"] = DataTable.Rows[i]["pi_title"].ToString();
|
|
|
dr["pi_date"] = DataTable.Rows[i]["pi_date"].ToString();
|
|
dr["pi_date"] = DataTable.Rows[i]["pi_date"].ToString();
|
|
|
dr["pd_ordercode"] = First_OrderCode;
|
|
dr["pd_ordercode"] = First_OrderCode;
|
|
|
- dr["pr_spec1"] = First_Prspec;
|
|
|
|
|
|
|
+ dr["pr_orispeccode1"] = First_Prspec;
|
|
|
dr["ch_splitbatch"] = First_Batch;
|
|
dr["ch_splitbatch"] = First_Batch;
|
|
|
dr["ch_waterid"] = BaseUtil.GetArrStr(First_WID, " ");
|
|
dr["ch_waterid"] = BaseUtil.GetArrStr(First_WID, " ");
|
|
|
dr["num"] = (i % PageSize) + 1;
|
|
dr["num"] = (i % PageSize) + 1;
|
|
@@ -724,7 +724,7 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
if (j == 0)
|
|
|
{
|
|
{
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i]["pr_spec"].ToString());
|
|
|
|
|
|
|
+ row1.Cells[j].SetCellValue(DataTable.Rows[i]["pr_orispeccode"].ToString());
|
|
|
}
|
|
}
|
|
|
else if (j == columnNum - 4)
|
|
else if (j == columnNum - 4)
|
|
|
{
|
|
{
|
|
@@ -754,7 +754,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
row1.Cells[j - 4].SetCellValue(DataTable.Columns[j].Caption);
|
|
row1.Cells[j - 4].SetCellValue(DataTable.Columns[j].Caption);
|
|
|
- if (DataTable.Columns[j].ColumnName.ToLower().Contains("chw_itemname") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_spec") || DataTable.Columns[j].ColumnName.ToLower().Contains("pd_ordercode"))
|
|
|
|
|
|
|
+ if (DataTable.Columns[j].ColumnName.ToLower().Contains("chw_itemname") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_orispeccode") || DataTable.Columns[j].ColumnName.ToLower().Contains("pd_ordercode"))
|
|
|
{
|
|
{
|
|
|
sheet.SetColumnHidden(j - 4, true);
|
|
sheet.SetColumnHidden(j - 4, true);
|
|
|
}
|
|
}
|
|
@@ -924,7 +924,7 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
if (j == 0)
|
|
|
{
|
|
{
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i]["pr_spec"].ToString());
|
|
|
|
|
|
|
+ row1.Cells[j].SetCellValue(DataTable.Rows[i]["pr_orispeccode"].ToString());
|
|
|
}
|
|
}
|
|
|
else if (j > 5 && j == columnNum - 5)
|
|
else if (j > 5 && j == columnNum - 5)
|
|
|
{
|
|
{
|
|
@@ -960,7 +960,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
row1.Cells[j - 4].SetCellValue(DataTable.Columns[j].Caption);
|
|
row1.Cells[j - 4].SetCellValue(DataTable.Columns[j].Caption);
|
|
|
- if (DataTable.Columns[j].ColumnName.ToLower().Contains("chw_itemname") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_spec") || DataTable.Columns[j].ColumnName.ToLower().Contains("pd_ordercode"))
|
|
|
|
|
|
|
+ if (DataTable.Columns[j].ColumnName.ToLower().Contains("chw_itemname") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_orispeccode") || DataTable.Columns[j].ColumnName.ToLower().Contains("pd_ordercode"))
|
|
|
{
|
|
{
|
|
|
sheet.SetColumnHidden(j - 4, true);
|
|
sheet.SetColumnHidden(j - 4, true);
|
|
|
}
|
|
}
|
|
@@ -1140,7 +1140,7 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
if (j == 0)
|
|
|
{
|
|
{
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(FirstDT.Rows[i]["pr_spec"].ToString());
|
|
|
|
|
|
|
+ row1.Cells[j].SetCellValue(FirstDT.Rows[i]["pr_orispeccode"].ToString());
|
|
|
}
|
|
}
|
|
|
else if (j > 5 && j == columnNum - 5)
|
|
else if (j > 5 && j == columnNum - 5)
|
|
|
{
|
|
{
|