|
|
@@ -220,18 +220,19 @@ namespace UAS_LabelMachine
|
|
|
ArrayList<string> midcode = new ArrayList<string>();
|
|
|
ArrayList<string> barcode = new ArrayList<string>();
|
|
|
ArrayList<string> custbarcode = new ArrayList<string>();
|
|
|
- int restqty1 = 0;
|
|
|
+ decimal restqty1 = 0;
|
|
|
if (ProdIoInfDGV.Rows[i].Cells["pib_restqty1"].Value != null && ProdIoInfDGV.Rows[i].Cells["pib_restqty1"].Value.ToString() != "")
|
|
|
{
|
|
|
string[] restqty = ProdIoInfDGV.Rows[i].Cells["pib_restqty1"].Value.ToString().Split(',');
|
|
|
for (int k = 0; k < restqty.Length; k++)
|
|
|
{
|
|
|
string mid_code = dh.getFieldDataByCondition("PRODIOBARCODE", "nvl(max(to_number(PIB_OUTBOXCODE1)),0)+1", "PIB_INOUTNO='" + pi_inoutno.Text + "'").ToString();
|
|
|
- int.TryParse(restqty[k], out restqty1);
|
|
|
+ decimal.TryParse(restqty[k], out restqty1);
|
|
|
barcode.Add(BarcodeMethod1(pd_id, pr_id, pib_barcode));
|
|
|
custbarcode.Add(BarcodeMethod1(PrefixFixed, Suffix, SerialNumIndex, SerialNumLength, Radix));
|
|
|
midcode.Add(mid_code);
|
|
|
pib_inqty.Add(restqty1.ToString());
|
|
|
+ //剩余生成的数量需要减掉尾数
|
|
|
}
|
|
|
}
|
|
|
//循环中盒号的个数,取当前出入库单最大 的中盒号+1
|
|
|
@@ -408,19 +409,19 @@ namespace UAS_LabelMachine
|
|
|
object pd_qty = ProdIoInfDGV.Rows[e.RowIndex].Cells["pd_qty"].Value;
|
|
|
object mid_qty = ProdIoInfDGV.Rows[e.RowIndex].Cells["mid_qty"].Value;
|
|
|
object pd_totalqty = ProdIoInfDGV.Rows[e.RowIndex].Cells["pd_totalqty"].Value;
|
|
|
- int restqty1 = 0;
|
|
|
+ decimal restqty1 = 0;
|
|
|
if (ProdIoInfDGV.Rows[e.RowIndex].Cells["pib_restqty1"].Value != null && ProdIoInfDGV.Rows[e.RowIndex].Cells["pib_restqty1"].Value.ToString() != "")
|
|
|
{
|
|
|
string[] restqty = ProdIoInfDGV.Rows[e.RowIndex].Cells["pib_restqty1"].Value.ToString().Split(',');
|
|
|
for (int k = 0; k < restqty.Length; k++)
|
|
|
{
|
|
|
- int qty = 0;
|
|
|
- int.TryParse(restqty[k], out qty);
|
|
|
+ decimal qty = 0;
|
|
|
+ decimal.TryParse(restqty[k], out qty);
|
|
|
restqty1 += qty;
|
|
|
}
|
|
|
}
|
|
|
- ProdIoInfDGV.Rows[e.RowIndex].Cells["pd_qty"].Value = decimal.Parse(pd_totalqty.ToString()) - restqty1;
|
|
|
- pd_qty = ProdIoInfDGV.Rows[e.RowIndex].Cells["pd_qty"].Value;
|
|
|
+ //ProdIoInfDGV.Rows[e.RowIndex].Cells["pd_qty"].Value = decimal.Parse(pd_qty.ToString()) - restqty1;
|
|
|
+ pd_qty = decimal.Parse(pd_qty.ToString()) - restqty1;
|
|
|
if (pr_zxbzs != null && pd_qty != null && mid_qty != null)
|
|
|
{
|
|
|
decimal 最小包装量 = decimal.Parse(pr_zxbzs.ToString());
|
|
|
@@ -449,14 +450,14 @@ namespace UAS_LabelMachine
|
|
|
for (int i = 0; i < ProdIoInfDGV.Rows.Count; i++)
|
|
|
{
|
|
|
ProdIoInfDGV.Rows[i].Cells["mid_qty"].Value = MidCapacity.Text;
|
|
|
- int restqty1 = 0;
|
|
|
+ decimal restqty1 = 0;
|
|
|
if (ProdIoInfDGV.Rows[i].Cells["pib_restqty1"].Value != null && ProdIoInfDGV.Rows[i].Cells["pib_restqty1"].Value.ToString() != "")
|
|
|
{
|
|
|
string[] restqty = ProdIoInfDGV.Rows[i].Cells["pib_restqty1"].Value.ToString().Split(',');
|
|
|
for (int k = 0; k < restqty.Length; k++)
|
|
|
{
|
|
|
- int qty = 0;
|
|
|
- int.TryParse(restqty[k], out qty);
|
|
|
+ decimal qty = 0;
|
|
|
+ decimal.TryParse(restqty[k], out qty);
|
|
|
restqty1 += qty;
|
|
|
}
|
|
|
}
|