|
|
@@ -305,14 +305,15 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
private void LabelFormClose(object sender, EventArgs e)
|
|
|
{
|
|
|
- if (GetGridOnly.Checked)
|
|
|
- GetInOutInfAndLabelFile();
|
|
|
- else
|
|
|
- {
|
|
|
- GetGridOnly.Checked = true;
|
|
|
- GetInOutInfAndLabelFile();
|
|
|
- GetGridOnly.Checked = false;
|
|
|
- }
|
|
|
+ GetInOutInfAndLabelFile();
|
|
|
+ //if (GetGridOnly.Checked)
|
|
|
+ // GetInOutInfAndLabelFile();
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // //GetGridOnly.Checked = true;
|
|
|
+ // GetInOutInfAndLabelFile();
|
|
|
+ // //GetGridOnly.Checked = false;
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -1141,7 +1142,7 @@ namespace UAS_LabelMachine
|
|
|
if (e.KeyCode == Keys.Enter)
|
|
|
{
|
|
|
sql.Clear();
|
|
|
- sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date from prodinout where pi_inoutno='" + pi_inoutno.Text + "'");
|
|
|
+ sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date from prodinout where pi_inoutno='" + pi_inoutno.Text + "' and pi_invostatus='已审核'");
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
@@ -1190,7 +1191,7 @@ namespace UAS_LabelMachine
|
|
|
LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
|
|
|
}
|
|
|
else
|
|
|
- MessageBox.Show("当前出入库单号不存在!");
|
|
|
+ MessageBox.Show("当前出入库单号不存在或者未审核!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1969,6 +1970,12 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (OutBoxCombox.Text != "")
|
|
|
{
|
|
|
+ if (OutBoxDoc != null)
|
|
|
+ OutBoxDoc.Close();
|
|
|
+ if (OutBoxCombox.Text != "" && OutBoxCombox.SelectedValue != null && !GetGridOnly.Checked)
|
|
|
+ {
|
|
|
+ OutBoxDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + OutBoxCombox.Text);
|
|
|
+ }
|
|
|
thread = new Thread(OutBoxPrint);
|
|
|
stw = new SetLoadingWindow(thread, "正在打印外箱");
|
|
|
BaseUtil.SetFormCenter(stw);
|
|
|
@@ -2238,20 +2245,23 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (e.RowIndex >= 0)
|
|
|
{
|
|
|
- if (LabelInf.Columns[e.ColumnIndex].Name == "pib_datecode")
|
|
|
+ if (!(DataHelper.DBConnectionString.Contains("richwell") || DataHelper.DBConnectionString.Contains("192.168.0.88")))
|
|
|
{
|
|
|
- string datecode = LabelInf.Rows[e.RowIndex].Cells["pib_datecode"].Value.ToString();
|
|
|
- try
|
|
|
+ if (LabelInf.Columns[e.ColumnIndex].Name == "pib_datecode")
|
|
|
{
|
|
|
- System.DateTime dt = System.DateTime.ParseExact(datecode, "yyyyMMdd", CultureInfo.CurrentCulture);
|
|
|
- GregorianCalendar gc = new GregorianCalendar();
|
|
|
- int weekOfYear = gc.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Monday);
|
|
|
- if (weekOfYear < 10)
|
|
|
- LabelInf.Rows[e.RowIndex].Cells["pib_datecode1"].Value = dt.Year.ToString().Substring(2, 2) + "0" + weekOfYear;
|
|
|
- else
|
|
|
- LabelInf.Rows[e.RowIndex].Cells["pib_datecode1"].Value = dt.Year.ToString().Substring(2, 2) + weekOfYear;
|
|
|
+ string datecode = LabelInf.Rows[e.RowIndex].Cells["pib_datecode"].Value.ToString();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ System.DateTime dt = System.DateTime.ParseExact(datecode, "yyyyMMdd", CultureInfo.CurrentCulture);
|
|
|
+ GregorianCalendar gc = new GregorianCalendar();
|
|
|
+ int weekOfYear = gc.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Monday);
|
|
|
+ if (weekOfYear < 10)
|
|
|
+ LabelInf.Rows[e.RowIndex].Cells["pib_datecode1"].Value = dt.Year.ToString().Substring(2, 2) + "0" + weekOfYear;
|
|
|
+ else
|
|
|
+ LabelInf.Rows[e.RowIndex].Cells["pib_datecode1"].Value = dt.Year.ToString().Substring(2, 2) + weekOfYear;
|
|
|
+ }
|
|
|
+ catch (Exception) { }
|
|
|
}
|
|
|
- catch (Exception) { }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2749,5 +2759,41 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
Properties.Settings.Default.Save();
|
|
|
}
|
|
|
+
|
|
|
+ private void SingleDocRefresh_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
|
|
+ {
|
|
|
+ switch ((sender as Control).Name)
|
|
|
+ {
|
|
|
+ case "SingleDocRefresh":
|
|
|
+ if (SingleDoc != null)
|
|
|
+ SingleDoc.Close();
|
|
|
+ if (SingleLabelCombox.Text != "" && SingleLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
|
|
|
+ {
|
|
|
+ System.DateTime time = Convert.ToDateTime(SingleLabelCombox.SelectedValue.ToString().Split('#')[2]);
|
|
|
+ SingleDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(SingleLabelCombox.SelectedValue.ToString().Split('#')[1], SingleLabelCombox.Text, time));
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "MidDocRefresh":
|
|
|
+ if (MidDoc != null)
|
|
|
+ MidDoc.Close();
|
|
|
+ if (MidLabelCombox.Text != "" && MidLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
|
|
|
+ {
|
|
|
+ System.DateTime time = Convert.ToDateTime(MidLabelCombox.SelectedValue.ToString().Split('#')[2]);
|
|
|
+ MidDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(MidLabelCombox.SelectedValue.ToString().Split('#')[1], MidLabelCombox.Text, time));
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "OutDocRefresh":
|
|
|
+ if (OutBoxDoc != null)
|
|
|
+ OutBoxDoc.Close();
|
|
|
+ if (OutBoxCombox.Text != "" && OutBoxCombox.SelectedValue != null && !GetGridOnly.Checked)
|
|
|
+ {
|
|
|
+ System.DateTime time = Convert.ToDateTime(OutBoxCombox.SelectedValue.ToString().Split('#')[2]);
|
|
|
+ OutBoxDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(OutBoxCombox.SelectedValue.ToString().Split('#')[1], OutBoxCombox.Text, time));
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|