|
|
@@ -637,7 +637,6 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
if (!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
|
|
|
SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
|
|
|
- // SingleReport.Load(@"C:\打印标签\立景创新LP.frx");
|
|
|
for (int j = 0; j < SingleReport.Parameters.Count; j++)
|
|
|
{
|
|
|
SingleReport.SetParameterValue(SingleReport.Parameters[j].Name, "");
|
|
|
@@ -663,8 +662,14 @@ namespace UAS_LabelMachine
|
|
|
sql.Append("to_char(ADD_MONTHS(to_date(week_to_date(pib_datecode),'yyyy-mm-dd'),36),'yyyy-iw')有效期三年_年周,");
|
|
|
sql.Append("wh_ppmc_user 中文品牌,em_code 装箱员编号,em_name 装箱员名称 from prodiobarcode left join prodinout on pib_piid=pi_id left join product on pib_prodcode=pr_code left join ProdIODetail on pd_id=PIB_PDID ");
|
|
|
sql.Append("left join PRODJOINVENDDETAIL on pjd_brand=pib_brand and pjd_prodcode=pib_prodcode left join customer on pi_cardcode=cu_code left join productcustomer on pc_custid=cu_id and pc_prodcode=pd_prodcode ");
|
|
|
- sql.Append("and pc_custprodcode=pd_custprodcode left join WareHouse on wh_code=pd_whcode left join employee on em_code=pib_inman where pib_id='" + pibid + "' order by pib_custbarcode)prodiosingleinfo_view");
|
|
|
- //DataTable dt = (DataTable)dh.ExecuteSql("select * from PRODIOSINGLEINFO_VIEW where 主键ID in (" + pibid + ")", "select");
|
|
|
+ if (pibid.IndexOf(",") > 0)
|
|
|
+ {
|
|
|
+ sql.Append("and pc_custprodcode=pd_custprodcode left join WareHouse on wh_code=pd_whcode left join employee on em_code=pib_inman where pib_id in (" + pibid + ") order by pib_custbarcode)prodiosingleinfo_view");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ sql.Append("and pc_custprodcode=pd_custprodcode left join WareHouse on wh_code=pd_whcode left join employee on em_code=pib_inman where pib_id='" + pibid + "' order by pib_custbarcode)prodiosingleinfo_view");
|
|
|
+ }
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
|
|
|
SingleReport.RegisterData(dt, "prodiosingleinfo_view");
|
|
|
@@ -1254,7 +1259,12 @@ namespace UAS_LabelMachine
|
|
|
MidReport.PrintSettings.Printer = MidLabelPrinter.Text;
|
|
|
MidReport.Print();
|
|
|
dh.UpdateByCondition("prodiobarcode", "pib_midifprint=-1", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1 in (" + pib_outboxcode1 + ")");
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("update prodiobarcode set pib_midboxweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
|
|
|
+ sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "' and pib_outboxcode1=" + pib_outboxcode1 + "");
|
|
|
+ dh.ExecuteSql(sql.ToString(), "update");
|
|
|
SelectRowIndex = -1;
|
|
|
+ LoadGridData(new object(), new EventArgs());
|
|
|
LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "打印中盒" + pib_outboxcode1.Replace("'", ""), "打印成功");
|
|
|
}
|
|
|
Properties.Settings.Default.MPrinter = MidLabelPrinter.Text;
|
|
|
@@ -1422,7 +1432,7 @@ namespace UAS_LabelMachine
|
|
|
if (OutBoxNum.Text != "全部")
|
|
|
{
|
|
|
//LogicHandler.GetDataSQL(PI_ID, "and pib_outboxcode2='" + OutBoxNum.Text + "'", out SQL);
|
|
|
- SQL = "select pib_boxweight,pib_totalweight,pd_custprodcode,pd_custprodspec,nvl(pib_midifprint,0)pib_midifprint,pib_custmidboxcode,pd_pocode,pjd_orispeccode," +
|
|
|
+ SQL = "select pib_boxweight,pib_midboxweight,pib_totalweight,pd_custprodcode,pd_custprodspec,nvl(pib_midifprint,0)pib_midifprint,pib_custmidboxcode,pd_pocode,pjd_orispeccode," +
|
|
|
"pib_madein,pib_custbarcode,pib_custoutboxcode,pib_id,pib_datecode1,pib_pdid,pib_piid,pib_pdno,pib_prodcode,pib_brand,pr_vendprodcode,pib_lotno,pib_datecode," +
|
|
|
"week_to_date(pib_datecode) datecode1,pib_qty,pr_spec,pr_zxbzs,pr_unit,pib_barcode,pib_outboxcode1,pib_outboxcode2,nvl(pib_ifprint, 0)pib_ifprint,pd_remark,pd_remark2 from prodiobarcode left join " +
|
|
|
"prodiodetail on pib_piid = pd_piid and pd_pdno = pib_pdno and pd_prodcode = pib_prodcode left join product on pr_code = pib_prodcode left join sale on sa_code = pib_ordercode left join " +
|
|
|
@@ -1430,7 +1440,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- SQL = "select pib_boxweight,pib_totalweight,pd_custprodcode,pd_custprodspec,nvl(pib_midifprint,0)pib_midifprint,pib_custmidboxcode,pd_pocode,pjd_orispeccode," +
|
|
|
+ SQL = "select pib_boxweight,pib_midboxweight,pib_totalweight,pd_custprodcode,pd_custprodspec,nvl(pib_midifprint,0)pib_midifprint,pib_custmidboxcode,pd_pocode,pjd_orispeccode," +
|
|
|
"pib_madein,pib_custbarcode,pib_custoutboxcode,pib_id,pib_datecode1,pib_pdid,pib_piid,pib_pdno,pib_prodcode,pib_brand,pr_vendprodcode,pib_lotno,pib_datecode," +
|
|
|
"week_to_date(pib_datecode) datecode1,pib_qty,pr_spec,pr_zxbzs,pr_unit,pib_barcode,pib_outboxcode1,pib_outboxcode2,nvl(pib_ifprint, 0)pib_ifprint,pd_remark,pd_remark2 from prodiobarcode left join " +
|
|
|
"prodiodetail on pib_piid = pd_piid and pd_pdno = pib_pdno and pd_prodcode = pib_prodcode left join product on pr_code = pib_prodcode left join sale on sa_code = pib_ordercode left join " +
|
|
|
@@ -3055,5 +3065,22 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ private void ButtonMidWeigh_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ if (Weight.Text != "" && Weight.Text != "0.000")
|
|
|
+ {
|
|
|
+ string pib_outboxcode1 = LabelInf.Rows[SelectRowIndex].Cells["pib_outboxcode1"].Value.ToString();
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("update prodiobarcode set pib_midboxweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
|
|
|
+ sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "' and pib_outboxcode1='" + pib_outboxcode1 + "'");
|
|
|
+ dh.ExecuteSql(sql.ToString(), "update");
|
|
|
+ LoadGridData(sender, e);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show("请先连接电子秤!");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|