//Model.McheckResult mc = null; void GetVouch() { //m = null; string conn = @"lcCode=" + Comm.lcCode + "&orderId=" + this.txtorderid.Text + "&whId=" + Comm.warehousecode; if (m != null) { conn += "&orderItemId=" + m.data.nextItemId; } //if (isSave) //{ // conn += "&orderItemId=" + o.orderItemId + "&updater=" + Comm.usercode + "&quantity=" + commonqty + "&minQuantity=" + minqty; ; //} string x = HttpHelper.HttpPost("repeatInfos", conn); msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg)); if (msg == null) { throw new Exception("错误信息捕捉失败"); } if (!msg.success) { throw new Exception(msg.msg); } m = (Model.MrepeatInfos)JsonConvert.DeserializeObject(x, typeof(Model.MrepeatInfos)); if (m == null || m.data == null) { this.txtminqty.Enabled = false; this.txttraycode.Text = ""; this.txtcommonqty.Text = ""; this.txtminqty.Text = ""; this.labminunit.Text = ""; this.labmaterialcode.Text = ""; this.labbatch.Text = ""; this.labcommonUnit.Text = ""; this.labsIname.Text = ""; this.labinfo.Text = ""; this.labqtyall.Text = ""; this.txtorderid.Enabled = true; this.txtorderid.Focus(); this.txtorderid.SelectAll(); //return; m = null; throw new Exception("没有可复盘的复盘明细"); } //this.labsIname.Text = m.data.slName; //this.labmaterialname.Text = m.data.materialName; //this.labcommonUnit.Text = m.data.commonUnitName; //this.labminunit.Text = m.data.minUnitName; //this.labinfo.Text = m.data.pdate; ShowLAB(); //this.labinfo.Text += " " + m.data.quantity.ToString() + m.data.commonUnitName +m.data.minQuantity.ToString() + m.data.minUnitName; }
void checkAgain() { string con = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&orderItemId=" + mc.data.orderItemId + "&updater=" + Comm.usercode; con += "&exception=1"; try { if (string.IsNullOrEmpty(this.txtcommonqty.Text)) { commonqty = -1; } else { commonqty = Convert.ToInt32(this.txtcommonqty.Text); } if (string.IsNullOrEmpty(this.txtminqty.Text)) { minqty = -1; } else { minqty = Convert.ToInt32(this.txtminqty.Text); } } catch (Exception ex) { MessageBox.Show(ex.Message); } if (commonqty != -1 || minqty != -1) { con += "&quantity=" + commonqty + "&minQuantity=" + minqty; } con += "&rrId=" + this.cbxrr.SelectedValue.ToString(); //if (k.Count != 0) //{ // con += "&repeatReason=["; // foreach (Model.MCVreason y in k) // { // con += "{\"trayCode\":\"" + y.code + "\","; // con += "\"repeatReason\":" + y.des + "},"; // } // con = con.Substring(0, con.Length - 1) + "]"; //} string x = HttpHelper.HttpPost("checkRepeats", con); msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg)); if (msg == null) { throw new Exception("错误信息捕捉失败"); } if (!msg.success) { throw new Exception(msg.msg); } m = (Model.MrepeatInfos)JsonConvert.DeserializeObject(x, typeof(Model.MrepeatInfos)); if (m == null) { throw new Exception("Mcheckrepeats捕捉失败"); } Cursor.Current = Cursors.Default; frmCheckVoSecond frm = new frmCheckVoSecond(); frm.m = m; frm.orderid = this.txtorderid.Text; frm.ShowDialog(); x = HttpHelper.HttpPost("checkResult", @"lcCode=" + Comm.lcCode + "&orderId=" + this.txtorderid.Text + "&whId=" + Comm.warehousecode + "&rrId=" + this.cbxrr.SelectedValue.ToString()); msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg)); if (msg == null) { throw new Exception("错误信息捕捉失败"); } if (!msg.success) { throw new Exception(msg.msg); } mc = (Model.McheckResult)JsonConvert.DeserializeObject(x, typeof(Model.McheckResult)); if (mc == null) { throw new Exception("checkResult捕捉失败"); } Clear(); //k.Clear(); if (mc.data == null) { this.txtorderid.Enabled = true; this.txtorderid.Focus(); this.txtorderid.SelectAll(); throw new Exception("该库区盘点完成"); } this.labsIname.Text = mc.data.slName; this.labmaterialcode.Text = "物料信息 " + mc.data.materialCode + " " + mc.data.materialName; //this.labmaterialname.Text = mc.data.materialName; this.labcommonUnit.Text = mc.data.commonUnitName; this.labminunit.Text = mc.data.minUnitName; this.labinfo.Text = mc.data.pdate + " " + mc.data.batchNo; if (!mc.data.blind) { this.labinfo.Text += " " + mc.data.quantity.ToString() + mc.data.commonUnitName + mc.data.minQuantity.ToString() + mc.data.minUnitName; this.btnCheckAgain.Visible = true; } else { this.btnCheckAgain.Visible = false; } this.txtorderid.Enabled = false; this.txtSlId.Enabled = true; this.txtSlId.Focus(); }