|
@@ -252,9 +252,12 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
}
|
|
|
if (Data["BRAND"] != CurrentBrand)
|
|
if (Data["BRAND"] != CurrentBrand)
|
|
|
{
|
|
{
|
|
|
- MessageBox.Show("当前采集【品牌】不对应,请重新采集", "提示");
|
|
|
|
|
- Input.SelectAll();
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ string close = MessageBox.Show(this.ParentForm, "当前采集【品牌】不对应,是否继续采集", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
|
|
|
|
|
+ if (close != "Yes")
|
|
|
|
|
+ {
|
|
|
|
|
+ Input.SelectAll();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
int CodeCount = 0;
|
|
int CodeCount = 0;
|
|
|
//如果单位是KPCS则需要除1000
|
|
//如果单位是KPCS则需要除1000
|
|
@@ -340,7 +343,7 @@ namespace UAS_LabelMachine
|
|
|
sql.Append("insert into prodiobarcode(PIB_ID,PIB_PRODCODE,PIB_INDATE,PIB_INOUTNO,PIB_PIID,PIB_PDNO, PIB_PDID,PIB_PICLASS,");
|
|
sql.Append("insert into prodiobarcode(PIB_ID,PIB_PRODCODE,PIB_INDATE,PIB_INOUTNO,PIB_PIID,PIB_PDNO, PIB_PDID,PIB_PICLASS,");
|
|
|
sql.Append("PIB_BARCODE,PIB_CUSTBARCODE,PIB_QTY,pib_brand,pib_datecode,pib_lotno,PIB_OUTBOXCODE2,pib_inman,PIB_IFPRINT,PIB_ORDERCODE,PIB_CUSTPO,pib_remark) ");
|
|
sql.Append("PIB_BARCODE,PIB_CUSTBARCODE,PIB_QTY,pib_brand,pib_datecode,pib_lotno,PIB_OUTBOXCODE2,pib_inman,PIB_IFPRINT,PIB_ORDERCODE,PIB_CUSTPO,pib_remark) ");
|
|
|
sql.Append("select :PIB_ID,pd_prodcode,sysdate,pi_inoutno,pi_id,pd_pdno,pd_id,pi_class,");
|
|
sql.Append("select :PIB_ID,pd_prodcode,sysdate,pi_inoutno,pi_id,pd_pdno,pd_id,pi_class,");
|
|
|
- sql.Append("'" + pib_barcode + "',:PIB_CUSTBARCODE,'" + CurrentZXBZ + "',pjd_brand,'" + Data["DATECODE"] + "','" + Data["LOTNO"] + "','" + pib_outboxcode2 + "','" + User.UserCode + "','" + (EnablePrint && SingleLabelAutoPrint.Checked ? 1 : 0).ToString() + "',pd_ordercode,pd_pocode,pd_remark ");
|
|
|
|
|
|
|
+ sql.Append("'" + pib_barcode + "',:PIB_CUSTBARCODE,'" + CurrentZXBZ + "','" + Data["BRAND"] + "','" + Data["DATECODE"] + "','" + Data["LOTNO"] + "','" + pib_outboxcode2 + "','" + User.UserCode + "','" + (EnablePrint && SingleLabelAutoPrint.Checked ? 1 : 0).ToString() + "',pd_ordercode,pd_pocode,pd_remark ");
|
|
|
sql.Append("from prodinout left join prodiodetail on pi_id=pd_piid left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode where pi_id='" + PI_ID + "' and pd_prodcode='" + CurrentPrCode + "' and pd_pdno='" + CurrentPDNO + "'");
|
|
sql.Append("from prodinout left join prodiodetail on pi_id=pd_piid left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode where pi_id='" + PI_ID + "' and pd_prodcode='" + CurrentPrCode + "' and pd_pdno='" + CurrentPDNO + "'");
|
|
|
dh.BatchInsert(sql.ToString(), new string[] { "PIB_ID", "PIB_CUSTBARCODE" }, PIBID, CustBarCode.ToArray());
|
|
dh.BatchInsert(sql.ToString(), new string[] { "PIB_ID", "PIB_CUSTBARCODE" }, PIBID, CustBarCode.ToArray());
|
|
|
//更新流水号
|
|
//更新流水号
|
|
@@ -422,7 +425,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
|
|
|
|
|
|
|
+ if (!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
|
|
|
SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
|
|
SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql("select * from prodiosingleinfo_view where 主键ID in (" + pibid + ")", "select");
|
|
DataTable dt = (DataTable)dh.ExecuteSql("select * from prodiosingleinfo_view where 主键ID in (" + pibid + ")", "select");
|
|
|
SingleReport.RegisterData(dt, "prodiosingleinfo_view");
|
|
SingleReport.RegisterData(dt, "prodiosingleinfo_view");
|
|
@@ -637,7 +640,7 @@ namespace UAS_LabelMachine
|
|
|
for (int i = 0; i < LabelInf.RowCount; i++)
|
|
for (int i = 0; i < LabelInf.RowCount; i++)
|
|
|
{
|
|
{
|
|
|
//勾选了并且未打印
|
|
//勾选了并且未打印
|
|
|
- if (LabelInf.Rows[i].Cells["Choose"].FormattedValue != null && LabelInf.Rows[i].Cells["Choose"].FormattedValue.ToString().ToLower() == "true" )
|
|
|
|
|
|
|
+ if (LabelInf.Rows[i].Cells["Choose"].FormattedValue != null && LabelInf.Rows[i].Cells["Choose"].FormattedValue.ToString().ToLower() == "true")
|
|
|
{
|
|
{
|
|
|
pibid += LabelInf.Rows[i].Cells["pib_id1"].Value.ToString() + ",";
|
|
pibid += LabelInf.Rows[i].Cells["pib_id1"].Value.ToString() + ",";
|
|
|
LabelInf.Rows[i].Cells["pib_ifprint"].Value = true;
|
|
LabelInf.Rows[i].Cells["pib_ifprint"].Value = true;
|
|
@@ -1039,7 +1042,7 @@ namespace UAS_LabelMachine
|
|
|
AllChecked = false;
|
|
AllChecked = false;
|
|
|
sql.Clear();
|
|
sql.Clear();
|
|
|
sql.Append("select pd_custprodcode,pd_custprodspec,pib_custmidboxcode,pd_pocode,pjd_orispeccode,pib_madein,pib_custbarcode,pib_custoutboxcode,pib_id,pib_datecode1,pib_pdid,pib_piid,");
|
|
sql.Append("select pd_custprodcode,pd_custprodspec,pib_custmidboxcode,pd_pocode,pjd_orispeccode,pib_madein,pib_custbarcode,pib_custoutboxcode,pib_id,pib_datecode1,pib_pdid,pib_piid,");
|
|
|
- sql.Append("pib_pdno,pib_prodcode,nvl(nvl(pd_brand,pib_brand),pr_brand)pib_brand,pr_vendprodcode,pib_lotno,pib_datecode,pib_qty,pr_spec,");
|
|
|
|
|
|
|
+ sql.Append("pib_pdno,pib_prodcode,pib_brand,pr_vendprodcode,pib_lotno,pib_datecode,pib_qty,pr_spec,");
|
|
|
sql.Append("pr_zxbzs,pr_unit,pib_barcode,pib_outboxcode1,pib_outboxcode2,nvl(pib_ifprint,0)pib_ifprint from prodiobarcode left join ");
|
|
sql.Append("pr_zxbzs,pr_unit,pib_barcode,pib_outboxcode1,pib_outboxcode2,nvl(pib_ifprint,0)pib_ifprint from prodiobarcode left join ");
|
|
|
sql.Append("prodiodetail on pib_piid=pd_piid and pd_pdno=pib_pdno and pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode ");
|
|
sql.Append("prodiodetail on pib_piid=pd_piid and pd_pdno=pib_pdno and pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode ");
|
|
|
sql.Append("left join sale on sa_code=pib_ordercode left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode where pib_piid='" + PI_ID + "' ");
|
|
sql.Append("left join sale on sa_code=pib_ordercode left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode where pib_piid='" + PI_ID + "' ");
|
|
@@ -1587,7 +1590,7 @@ namespace UAS_LabelMachine
|
|
|
int tencount = 0;
|
|
int tencount = 0;
|
|
|
for (int j = 0; j < dt1.Rows.Count; j++)
|
|
for (int j = 0; j < dt1.Rows.Count; j++)
|
|
|
{
|
|
{
|
|
|
- if (tencount % 10 == 0||(dt1.Rows[j]["pib_prodcode"].ToString()!=dt1.Rows[j-1]["pib_prodcode"].ToString()))
|
|
|
|
|
|
|
+ if (tencount % 10 == 0 || (dt1.Rows[j]["pib_prodcode"].ToString() != dt1.Rows[j - 1]["pib_prodcode"].ToString()))
|
|
|
{
|
|
{
|
|
|
pib_outboxcode1 = pib_outboxcode1 + 1;
|
|
pib_outboxcode1 = pib_outboxcode1 + 1;
|
|
|
MaxNum = MaxNum + 1;
|
|
MaxNum = MaxNum + 1;
|