Beispiel #1
0
        void GetPickSlList()
        {
            string x = HttpHelper.HttpPost("getPickSlList", @"lcCode=" + Comm.lcCode + "&pickNo=" + 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);
            }
            ms = (Model.MShowList)JsonConvert.DeserializeObject(x, typeof(Model.MShowList));
            if (ms == null)
            {
                throw new Exception("数据信息捕捉失败");
            }
            if (ms.data.Count == 0)
            {
                throw new Exception("当前库区拣货完成!");
            }
            c = 0;
            mShow();
        }
Beispiel #2
0
        void Savest()
        {
            string conn = "";

            conn = @"pickNo=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&materialCode=" + mm.data[c].materialCode + "&quantity=" + commonqty.ToString() + "&minQuantity=" + minqty.ToString() + "&updater=" + Comm.usercode + "&id=" + mm.data[c].id + "&fromTrayCode=" + mm.data[c].fromTrayCode + "&toTrayCode=" + mm.data[c].toTrayCode + "&pickType=" + mm.data[c].pickType + "&sendToCode=" + st.data[d].sendToCode;
            if (!string.IsNullOrEmpty(st.data[d].sendToDetailId))
            {
                conn += "&sendToDetailId=" + st.data[d].sendToDetailId;
            }
            string x = HttpHelper.HttpPost("sendToDetailSubmit", conn);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            //计算数量
            st.data[d].orderQuantity    -= commonqty;
            st.data[d].orderMinQuantity -= minqty;
            Model.SendToOneItem mst = (Model.SendToOneItem)JsonConvert.DeserializeObject(x, typeof(Model.SendToOneItem));
            if (mst == null || mst.data == null)
            {
                return;
            }

            st.data[d].sendToDetailId = mst.data.sendToDetailId;
        }
Beispiel #3
0
 private void txtAssister_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 27)
     {
         this.txtAssister.Text    = "";
         this.txtAssister.Enabled = false;
         //this.txtslid.Enabled = true;
         //this.txtslid.Text = "";
         //this.txtslid.Focus();
         this.labmaterialname.Text = "物料描述";
         this.labneedqty.Text      = "";
         this.labSlname.Text       = "";
         this.cbxrr.Enabled        = true;
         this.txtAssister.Enabled  = false;
         this.cbxrr.Focus();
         //this.cbxrr.Enabled = true;
         //this.cbxrr.Focus();
         return;
     }
     if (e.KeyChar != 13)
     {
         return;
     }
     if (this.txtAssister.Text == "")
     {
         ma = null;
         this.txtAssister.Enabled = false;
         this.txttraycode.Enabled = true;
         this.txttraycode.Focus();
         return;
     }
     try
     {
         string x = HttpHelper.HttpPost("getAssisterInfo", @"lcCode=" + Comm.lcCode + "&assisterCode=" + this.txtAssister.Text);
         msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
         if (msg == null)
         {
             throw new Exception("错误信息捕捉失败");
         }
         if (!msg.success)
         {
             throw new Exception(msg.msg);
         }
         ma = (Model.MAssisterInfo)JsonConvert.DeserializeObject(x, typeof(Model.MAssisterInfo));
         if (ma == null)
         {
             throw new Exception("getAssisterInfo捕捉失败");
         }
         this.txtAssister.Text = ma.data.name;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         this.txtAssister.SelectAll();
         return;
     }
     this.txtAssister.Enabled = false;
     this.txttraycode.Enabled = true;
     this.txttraycode.Focus();
 }
Beispiel #4
0
        void GetInfo()
        {
            string x = HttpHelper.HttpPost("getStockInOrderInfoByFromTray", @"lcCode=" + Comm.lcCode + "&trayCode=" + this.txttraycode.Text + "&whId=" + Comm.warehousecode);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            mt = (Model.MStockInOrderInfoByFromTray)JsonConvert.DeserializeObject(x, typeof(Model.MStockInOrderInfoByFromTray));
            if (mt == null)
            {
                throw new Exception("getStockInOrderInfoByFromTray捕捉失败");
            }



            if (mt.data == null)
            {
                //this.laberror.Text = "该托盘没有任何物品";
                MessageBox.Show("货位没有数据");
                this.txttraycode.SelectAll();
                return;
            }

            //this.txttraycode.Text = "";
            Next();
            this.txttraycode.SelectAll();
        }
Beispiel #5
0
        private void txttraycode_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar != 13)
            {
                return;
            }
            if (this.txttraycode.Text == "")
            {
                return;
            }
            //this.labcode.Text = "";
            this.labbarcode.Text      = "";
            this.labmaterialname.Text = "";
            this.labspec.Text         = "";
            this.labcommonunit.Text   = "";
            this.labminunit.Text      = "";
            this.labplate.Text        = "";
            //this.labbarcode.Text = "";
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                string x = HttpHelper.HttpPost("getMaterialsByBar", @"barCode=" + this.txttraycode.Text + "&lcCode=" + Comm.lcCode);
                msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                if (msg == null)
                {
                    throw new Exception("MgetMaterialsByBar错误信息捕捉失败");
                }
                if (!msg.success)
                {
                    throw new Exception(msg.msg);
                }
                mm = (Model.MgetMaterialsByBar)JsonConvert.DeserializeObject(x, typeof(Model.MgetMaterialsByBar));
                if (mm == null)
                {
                    throw new Exception("MgetMaterialsByBar错误信息捕捉失败1");
                }
                //this.txttraycode.Text = mm.data.trayCode;
                row = 0;

                Cursor.Current = Cursors.Default;
                if (mm.data.Count == 1)
                {
                    this.btnNext.Visible = false;
                }
                else
                {
                    this.btnNext.Visible = true;
                }
                //this.txttraycode.Text = "";
                ShowTXT();
                this.txttraycode.SelectAll();
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                this.txttraycode.SelectAll();
                MessageBox.Show(ex.Message);
                return;
            }
        }
Beispiel #6
0
 void showST()
 {
     if (st.data.Count == d)
     {
         string x = HttpHelper.HttpPost("getSendToItemList", @"pickNo=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&id=" + mm.data[c].id);
         msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
         if (msg == null)
         {
             throw new Exception("错误信息捕捉失败");
         }
         if (!msg.success)
         {
             throw new Exception(msg.msg);
         }
         st = (Model.SendToItemList)JsonConvert.DeserializeObject(x, typeof(Model.SendToItemList));
         if (st == null || st.data == null)
         {
             throw new Exception("数据信息捕捉失败");
         }
         if (st.data.Count == 0)
         {
             throw new Exception("该单据2已经操作完成");
         }
         d = 0;
     }
     //this.labstockoutno.Location = new System.Drawing.Point(3, 198);
     //this.labstockoutno.Size = new System.Drawing.Size(220, 16);
     this.labstockoutno.Location = new System.Drawing.Point(3, 174);
     this.labstockoutno.Size     = new System.Drawing.Size(220, 40);
     this.labstockoutno.Text     = "送达方   " + st.data[d].sendToName;
     this.labsoqty.Text          = "当前单据操作 " + (st.data[d].orderQuantity).ToString() + mm.data[c].commonUnitName + (st.data[d].orderMinQuantity).ToString() + mm.data[c].minUnitName;
 }
Beispiel #7
0
 void GetSOIList()
 {
     if (bst)
     {
         GetSTList();
     }
     else
     {
         if (mm.data[c].pickType == "1")
         {
             string x = HttpHelper.HttpPost("getStockOutItemList", @"pickNo=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&id=" + mm.data[c].id);
             msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
             if (msg == null)
             {
                 throw new Exception("错误信息捕捉失败");
             }
             if (!msg.success)
             {
                 throw new Exception(msg.msg);
             }
             ms = (Model.MStockOutItem)JsonConvert.DeserializeObject(x, typeof(Model.MStockOutItem));
             if (ms == null || ms.data == null)
             {
                 throw new Exception("数据信息捕捉失败");
             }
             if (ms.data.Count == 0)
             {
                 throw new Exception("该单据1已经操作完成");
             }
             d = 0;
             checkStockOut();
         }
     }
 }
Beispiel #8
0
        void GetSTList()
        {
            string x = HttpHelper.HttpPost("getSendToItemList", @"pickNo=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&id=" + mm.data[c].id);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            st = (Model.SendToItemList)JsonConvert.DeserializeObject(x, typeof(Model.SendToItemList));
            if (st == null || st.data == null)
            {
                throw new Exception("数据信息捕捉失败");
            }
            if (st.data.Count == 0)
            {
                throw new Exception("该单据2已经操作完成");
            }
            d = 0;
            //checkStockOut();
            showST();
        }
Beispiel #9
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (this.txtcarton.Enabled)
            {
                return;
            }
            DialogResult dr = MessageBox.Show("确定要删除托盘数据?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);

            if (dr != DialogResult.Yes)
            {
                //this.txtshelve.SelectAll();
                return;
            }
            try
            {
                string x = HttpHelper.HttpPost("unbindRefundTray", @"lcCode=" + Comm.lcCode + "&trayCode=" + this.txtcarton.Text + "&whId=" + Comm.warehousecode + "&updater=" + Comm.usercode);
                msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                if (msg == null)
                {
                    throw new Exception("unbindRefundTray错误信息捕捉失败");
                }
                if (!msg.success)
                {
                    throw new Exception(msg.msg);
                }
                //getmaterial = (Model.MgetMaterial)JsonConvert.DeserializeObject(x, typeof(Model.MgetMaterial));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                this.txtshelve.SelectAll();
                return;
            }
            Init();
        }
Beispiel #10
0
        void getNewOrder(string shippercode)
        {
            string x = HttpHelper.HttpPost("createNoOrderTransfer", @"shipperCode=" + shippercode + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&updater=" + Comm.usercode);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            Model.Mccode m = (Model.Mccode)JsonConvert.DeserializeObject(x, typeof(Model.Mccode));
            if (m == null)
            {
                throw new Exception("数据信息捕捉失败");
            }
            if (m.data == "")
            {
                throw new Exception("没有该对应的单据");
            }

            ccode = m.data;
        }
Beispiel #11
0
 void checkStockOut()
 {
     //int mi = -2;
     if (ms.data.Count == d)
     {
         string x = HttpHelper.HttpPost("getStockOutItemList", @"pickNo=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&id=" + mm.data[c].id);
         msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
         if (msg == null)
         {
             throw new Exception("错误信息捕捉失败");
         }
         if (!msg.success)
         {
             throw new Exception(msg.msg);
         }
         ms = (Model.MStockOutItem)JsonConvert.DeserializeObject(x, typeof(Model.MStockOutItem));
         if (ms == null || ms.data == null)
         {
             throw new Exception("数据信息捕捉失败");
         }
         if (ms.data.Count == 0)
         {
             throw new Exception("该单据1已经操作完成");
         }
         d = 0;
     }
     this.labstockoutno.Location = new System.Drawing.Point(3, 198);
     this.labstockoutno.Size     = new System.Drawing.Size(220, 16);
     this.labstockoutno.Text     = "提单号    " + ms.data[d].blNo;
     this.labsoqty.Text          = "当前单据操作:" + (ms.data[d].orderQuantity).ToString() + mm.data[c].commonUnitName + (ms.data[d].orderMinQuantity).ToString() + mm.data[c].minUnitName;
 }
Beispiel #12
0
        void Saveso()
        {
            string conn = "";

            conn = @"pickNo=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&trayCode=" + this.txttraycode.Text + "&materialCode=" + mm.data[c].materialCode + "&quantity=" + commonqty.ToString() + "&minQuantity=" + minqty.ToString() + "&updater=" + Comm.usercode + "&id=" + mm.data[c].id + "&fromTrayCode=" + mm.data[c].fromTrayCode + "&toTrayCode=" + mm.data[c].toTrayCode + "&pickType=" + mm.data[c].pickType;
            if (ms != null)
            {
                conn += "&stockOutNo=" + ms.data[d].stockOutNo + "&stockOutItemId=" + ms.data[d].stockOutItemId;
                if (!string.IsNullOrEmpty(ms.data[d].stockOutDetailId))
                {
                    conn += "&stockOutDetailId=" + ms.data[d].stockOutDetailId;
                }
            }
            string x = HttpHelper.HttpPost("stockOutDetailSubmit", conn);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            if (ms != null)//取ID
            {
                Model.MStockOutItems mmm = (Model.MStockOutItems)JsonConvert.DeserializeObject(x, typeof(Model.MStockOutItems));
                if (mmm == null || mmm.data == null)
                {
                    return;
                }
                ms.data[d].stockOutDetailId = mmm.data.stockOutDetailId;
            }
        }
Beispiel #13
0
 private void txtorderid_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar != 13)
     {
         return;
     }
     try
     {
         string x = HttpHelper.HttpPost("getCheckItem", @"lcCode=" + Comm.lcCode + "&orderId=" + this.txtorderid.Text);
         msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
         if (msg == null)
         {
             throw new Exception("错误信息捕捉失败");
         }
         if (!msg.success)
         {
             throw new Exception(msg.msg);
         }
         return;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         this.txtorderid.SelectAll();
         return;
     }
     //this.labbatchNo.Text = mtrans.data.batchNo;
     this.txtorderid.Enabled = false;
     this.txtSlId.Enabled    = true;
     this.txtSlId.Focus();
 }
Beispiel #14
0
        void Save()
        {
            string con = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&materialCode=" + materialbody.code + "&quantity=" + commonqty + "&minQuantity=" + minqty + "&pDate=" + this.dtdate.Value.ToString("yyyy-MM-dd") + "&batchNo=" + this.txtbatch.Text + "&materialStatus=" + this.cmbmaterialCondition.SelectedValue.ToString() + "&trayCode=" + this.txttraycode.Text + "&updater=" + Comm.usercode;

            if (getmaterial != null && getmaterial.data.Count > 0)
            {
                con += "&itemId=" + getmaterial.data[row].itemId.ToString();
            }
            con += "&isQt=false";
            string x = HttpHelper.HttpPost("submitRefundOperate", con);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }

            traycode = this.txttraycode.Text;
            //this.btnShelve.Visible = true;
            //getmaterial.data.minQuantity -= minqty;
            //getmaterial.data.quantity -= commonqty;
            Clear();
        }
Beispiel #15
0
        void Save()
        {
            string conn = @"lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&updater=" + Comm.usercode + "&fromSlId=" + ml.data[row].slId + "&toTrayCode=" + this.txttotraycode.Text + "&quantity=" + commonqty.ToString() + "&minQuantity=" + minqty.ToString() + "&materialCode=" + ml.data[row].materialCode + "&orderId=" + this.labccode.Text + "&batchNo=" + ml.data[row].batchNo + "&pdate=" + ml.data[row].pDate + "&inDate=" + ml.data[row].inDate + "&shipperCode=" + ml.data[row].shipperCode + "&oldMaterialStatus=" + ml.data[row].materialStatusCode;

            if (nmt.data != null)
            {
                conn += "&materialStatus=" + nmt.data.materialStatus;
            }
            if (this.txttoslid.Text != "")
            {
                conn += "&toSlId=" + slid.ToString();
            }
            string x = HttpHelper.HttpPost("submitBalanceTransferOrder", conn);

            //string xx = HttpHelper.HttpPost("submitBalanceTransferOrder", x);
            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("submitBalanceTransferOrder错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
        }
Beispiel #16
0
        private void frmBalTranMove_Load(object sender, EventArgs e)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                string x = HttpHelper.HttpPost("getZcqSlList", "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode);
                msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                if (msg == null)
                {
                    throw new Exception("错误信息捕捉失败");
                }
                if (!msg.success)
                {
                    throw new Exception(msg.msg);
                }
                mz = (Model.MZcqSlList)JsonConvert.DeserializeObject(x, typeof(Model.MZcqSlList));
                //var v = from q in mz.data where q.status == "EFFECTIVE" select q;
                List <Model.zcq> zcql = new List <Rf_Wms.Model.zcq>();
                foreach (Model.zcq v in mz.data)
                {
                    if (v.status == "EFFECTIVE")
                    {
                        zcql.Add(v);
                    }
                }
                if (zcql.Count == 0)
                {
                    throw new Exception("没有可用的转储区信息");
                }
                this.cmbtoslname.DataSource    = zcql;
                this.cmbtoslname.ValueMember   = "slId";
                this.cmbtoslname.DisplayMember = "slName";

                x   = HttpHelper.HttpPost("getBalanceTransferOrderNumber", "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&updater=" + Comm.usercode);
                msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                if (msg == null)
                {
                    throw new Exception("错误信息捕捉失败");
                }
                if (!msg.success)
                {
                    throw new Exception(msg.msg);
                }
                Model.Mccode mc = (Model.Mccode)JsonConvert.DeserializeObject(x, typeof(Model.Mccode));
                this.labccode.Text = mc.data;
                Cursor.Current     = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message);

                return;
            }
            init();
            this.txtbarcode.Text     = "";
            this.txttoslname.Enabled = true;
            this.cmbtoslname.Enabled = true;
            this.txttoslname.Focus();
        }
        void Save()
        {
            string fun = "storeOperate";
            string con = @"lcCode=" + Comm.lcCode + "&fromTrayCode=" + this.txtcarton.Text + "&whId=" + Comm.warehousecode + "&updater=" + Comm.usercode + "&recommendSlId=" + mRec.data.recommendSlId;

            if (!string.IsNullOrEmpty(this.txtshelve.Text))
            {
                con += "&slId=" + slid.ToString();
                //fun = "storeOperate";
            }
            else
            {
                con += "&toTrayCode=" + this.txttotraycode.Text;
                //fun = "storeRefundOperate";
            }
            string x = HttpHelper.HttpPost(fun, con);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception(fun + "错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
        }
Beispiel #18
0
        void GetMultiMaterialList()
        {
            string x = HttpHelper.HttpPost("getMultiMaterialList", @"lcCode=" + Comm.lcCode + "&pickNo=" + this.txtorderid.Text + "&whId=" + Comm.warehousecode + "&toTrayCode=" + this.txttraycode.Text);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            mm = (Model.MultiMaterialList)JsonConvert.DeserializeObject(x, typeof(Model.MultiMaterialList));
            if (mm == null)
            {
                throw new Exception("数据信息捕捉失败");
            }
            if (mm.data.Count == 0)
            {
                throw new Exception("该单据已经操作完成");
            }
            if (bst)//发送方
            {
                for (int i = mm.data.Count - 1; i >= 0; i--)
                {
                    if (mm.data[i].quantity - mm.data[i].outletQuantity <= 0 && mm.data[i].minQuantity - mm.data[i].outletMinQuantity <= 0)
                    {
                        mm.data.Remove(mm.data[i]);
                        //studentList.RemoveAt(i);
                    }
                }
            }
            else
            {
                for (int i = mm.data.Count - 1; i >= 0; i--)
                {
                    if (mm.data[i].quantity - mm.data[i].sumRealQuantity <= 0 && mm.data[i].minQuantity - mm.data[i].sumRealMinQuantity <= 0)
                    {
                        mm.data.Remove(mm.data[i]);
                        //studentList.RemoveAt(i);
                    }
                }
            }
            if (mm.data.Count == 0)
            {
                Clear();
                this.labsoqty.Text      = "";
                this.labstockoutno.Text = "";
                this.txttraycode.Text   = "";
                this.txtorderid.Enabled = true;
                this.txtorderid.Focus();
                throw new Exception("当前托盘的物料已分拣完成!");
            }
            c = 0;
            GetSOIList();
            //checkMul();
            MyShow();
        }
Beispiel #19
0
 private void cbxrr_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 27)
     {
         this.cbxrr.Enabled      = false;
         this.txtorderid.Enabled = true;
         this.txtorderid.Focus();
         this.txtorderid.SelectAll();
         return;
     }
     if (e.KeyChar != 13)
     {
         return;
     }
     try
     {
         string 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捕捉失败");
         }
         if (mc.data == null)
         {
             throw new Exception("该库区盘点完成");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return;
     }
     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.txtcommonqty.Text = mc.data.quantity.ToString();
         this.txtminqty.Text    = mc.data.minQuantity.ToString();
     }
     //commonqty = mc.data.quantity;
     //minqty = mc.data.minQuantity;
     this.cbxrr.Enabled   = false;
     this.txtSlId.Enabled = true;
     this.txtSlId.Focus();
 }
Beispiel #20
0
        void Save()
        {
            string con = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&materialCode=" + materialbody.code + "&quantity=" + commonqty + "&minQuantity=" + minqty + "&pDate=" + this.dtdate.Value.ToString("yyyy-MM-dd") + "&batchNo=" + this.txtbatch.Text + "&materialStatus=" + this.cmbmaterialCondition.SelectedValue.ToString() + "&trayCode=" + this.txttraycode.Text + "&updater=" + Comm.usercode;

            if (getmaterial != null && getmaterial.data.Count > 0)
            {
                con += "&itemId=" + getmaterial.data[row].itemId.ToString();
            }
            if (!isNew)
            {
                con += "&noOrder=false";
            }
            else
            {
                con += "&noOrder=true";
            }
            if (panel1.Visible)
            {
                string isqt = "false";
                if (this.cmbisqt.Text == "是")
                {
                    isqt = "true";
                }
                con += "&isQt=" + isqt;
            }
            //if (mm == null || mm.data == null || string.IsNullOrEmpty(mm.data.boxcode))
            //{
            //    if (string.IsNullOrEmpty(batchno))
            //    {
            //        con += "&checkBatchNo=false";
            //    }
            //    else
            //    {
            //        con += "&checkBatchNo=true";
            //    }
            //}
            //else
            //{
            //    con += "&checkBatchNo=false";
            //}
            string x = HttpHelper.HttpPost("submitOperate", con);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }

            traycode = this.txttraycode.Text;
            //this.btnShelve.Visible = true;
            //getmaterial.data.minQuantity -= minqty;
            //getmaterial.data.quantity -= commonqty;
            Clear();
        }
Beispiel #21
0
        private void btnData_Click(object sender, EventArgs e)
        {
            if (this.txtorderid.Enabled)
            {
                MessageBox.Show("请先扫描单据");
                this.txtorderid.Focus();
                this.txtorderid.SelectAll();
                return;
            }
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                string x = HttpHelper.HttpPost("getPickSlList", @"lcCode=" + Comm.lcCode + "&pickNo=" + 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);
                }
                ms1 = (Model.MShowList)JsonConvert.DeserializeObject(x, typeof(Model.MShowList));
                if (ms1 == null)
                {
                    throw new Exception("数据信息捕捉失败");
                }
                if (ms1.data.Count == 0)
                {
                    throw new Exception("当前库区拣货完成!");
                }
                Cursor.Current = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message);
                return;
            }

            DataTable dt = GetDT(ms1.data);

            Ot.frmList frm = new Rf_Wms.Ot.frmList();
            frm.dt      = dt;
            frm.txtname = "待拣货列表";
            frm.ShowDialog();
            foreach (Control v in this.Controls)
            {
                if (v is TextBox)
                {
                    if (v.Enabled)
                    {
                        v.Focus();
                    }
                }
            }
        }
Beispiel #22
0
        //Model.Mpick mp = null;
        void GetPick(bool benter)
        {
            string con = @"pickNo=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode;

            if (!this.cbxrr.Enabled && !benter)
            {
                //con += "&recommendSlId=" + ms.data[c].recommendSlId.ToString() + "&quantity=" + commonqty.ToString() + "&minQuantity=" + minqty.ToString() + "&fromTrayCode=" + this.txttraycode.Text + "&toSlId=" + this.cmbtoslname.SelectedValue.ToString() + "&updater=" + Comm.usercode + "&toTrayCode="+this.txtToTraycode.Text;
                con += "&recommendSlId=" + ms.data[c].recommendSlId.ToString() + "&quantity=" + commonqty.ToString() + "&minQuantity=" + minqty.ToString() + "&fromTrayCode=" + this.txttraycode.Text + "&toSlId=" + this.cmbtoslname.SelectedValue.ToString() + "&updater=" + Comm.usercode + "&toTrayCode=" + this.txtToTraycode.Text + "&materialCode=" + ms.data[c].materialCode;
                if (ma != null)
                {
                    con += "&assister=" + ma.data.code;
                }
            }
            if (benter)
            {
                con += "&recommendSlId=" + ms.data[c].recommendSlId.ToString();
            }
            con += "&rrId=" + this.cbxrr.SelectedValue.ToString();
            string x = HttpHelper.HttpPost("pickOperate", con);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            //mp = (Model.Mpick)JsonConvert.DeserializeObject(x, typeof(Model.Mpick));
            //if (mp == null)
            //{
            //    throw new Exception("数据信息捕捉失败");
            //}
            //Clear();
            //if (ms.data[c] == null)
            //{
            //    this.txtorderid.Enabled = true;
            //    this.txtorderid.Focus();
            //    this.txtorderid.SelectAll();
            //    throw new Exception("当前库区拣货完成!");
            //    return;

            //}
            //this.btnAssistance.Text = ms.data[c].assistance;
            //this.labSlname.Text = ms.data[c].slName.ToString();
            //this.labmaterialname.Text = "物料描述  "+ms.data[c].materialName;
            //this.labneedqty.Text = ms.data[c].quantity.ToString() + ms.data[c].commonUnitName + ms.data[c].minQuantity.ToString() + ms.data[c].minUnitName + " " +ms.data[c].pdate;
            //this.labcommonUnit.Text = ms.data[c].commonUnitName;
            //this.labminunit.Text = ms.data[c].minUnitName;
            //this.labtoslidname.Text = mtrans.data.toSlIdName;
            //this.txtSlId.Enabled = true;
            //this.txtSlId.Focus();
        }
Beispiel #23
0
        //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;
        }
Beispiel #24
0
        void GetTrans(bool benter)
        {
            string con = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode;

            if (mtrans != null && mtrans.data != null && !benter)
            {
                con += "&orderItemId=" + mtrans.data.orderItemId.ToString() + "&quantity=" + commonqty.ToString() + "&minQuantity=" + minqty.ToString() + "&fromTrayCode=" + this.txttraycode.Text + "&toTrayCode=" + this.txttotraycode.Text + "&updater=" + Comm.usercode + "&fromSlId=" + this.mtrans.data.fromSlId + "&materialCode=" + mtrans.data.materialCode + "&recommendId=" + mtrans.data.recommendId;
            }
            if (benter)
            {
                con += "&orderItemId=" + mtrans.data.orderItemId.ToString() + "&recommendId=" + mtrans.data.recommendId;
            }
            string x = HttpHelper.HttpPost("replenishOrder/processorSourceOperate", con);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            mtrans = (Model.Mreplenish)JsonConvert.DeserializeObject(x, typeof(Model.Mreplenish));
            if (mtrans == null)
            {
                throw new Exception("数据信息捕捉失败");
            }
            Clear();
            if (mtrans.data == null)
            {
                MessageBox.Show("该单据已经操作完成");
                this.txtorderid.Enabled = true;
                this.txtorderid.Text    = "";
                this.txtorderid.Focus();
            }
            else
            {
                this.btnAssistance.Text   = mtrans.data.assistanceName;
                this.labfromsIId.Text     = mtrans.data.fromSlIdName.ToString();
                this.labmaterialname.Text = "物料描述  " + mtrans.data.materialName;
                //this.labneedqty.Text = mtrans.data.quantity.ToString() + mtrans.data.commonUnitName + mtrans.data.minQuantity.ToString() + mtrans.data.minUnitName + " " + mtrans.data.batchNo;
                this.labneedqty.Text    = "应补数量 " + mtrans.data.quantity.ToString() + mtrans.data.commonUnitName + " " + mtrans.data.pdate;
                this.labcommonUnit.Text = mtrans.data.commonUnitName;
                //this.labminunit.Text = mtrans.data.minUnitName;
                this.labtoslidname.Text = mtrans.data.toSlIdName;
                //this.txtSlId.Enabled = true;
                //this.txtSlId.Focus();
                this.txttraycode.Enabled = true;
                this.txttraycode.Focus();
            }
        }
Beispiel #25
0
        private void txtorderid_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar != 13)
            {
                return;
            }
            if (this.txtorderid.Text == "")
            {
                return;
            }
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                string con = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode;

                string x = HttpHelper.HttpPost("packOrder/getProductPackOrder", con);
                msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                if (msg == null)
                {
                    throw new Exception("错误信息捕捉失败");
                }
                if (!msg.success)
                {
                    throw new Exception(msg.msg);
                }
                mp = (Model.MproductPackorder)JsonConvert.DeserializeObject(x, typeof(Model.MproductPackorder));
                if (mp == null)
                {
                    throw new Exception("数据信息捕捉失败");
                }

                Cursor.Current = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message);
                this.txtorderid.SelectAll();
                return;
            }
            //this.labbatchNo.Text = mtrans.data.batchNo;
            this.labmaterialname.Text = mp.data.materialName;
            this.labqty.Text          = mp.data.quantity.ToString() + mp.data.commonUnitName + mp.data.minQuantity.ToString() + mp.data.minUnitName;
            this.labcommonUnit.Text   = mp.data.commonUnitName;
            this.labminunit.Text      = mp.data.minUnitName;
            this.labslname.Text       = mp.data.toSlIdName;
            this.txtorderid.Enabled   = false;
            this.txtbarcode.Enabled   = true;
            this.txtbarcode.Focus();
        }
Beispiel #26
0
        private void txtorderid_KeyPress(object sender, KeyPressEventArgs e)
        {
            //MessageBox.Show(e.KeyChar.ToString());
            if (e.KeyChar != 13)
            {
                return;
            }
            this.txtorderid.Text = this.txtorderid.Text.Trim();

            if (this.txtorderid.Text == "")
            {
                return;
            }

            try
            {
                Cursor.Current = Cursors.WaitCursor;
                string conn = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode;

                string x = HttpHelper.HttpPost("mergeRefundValidate", conn);
                msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                if (msg == null)
                {
                    throw new Exception("错误信息捕捉失败");
                }
                if (!msg.success)
                {
                    throw new Exception(msg.msg);
                }
                stockin = (Model.MstockIn)JsonConvert.DeserializeObject(x, typeof(Model.MstockIn));
                if (stockin == null)
                {
                    throw new Exception("数据信息捕捉失败");
                }
                this.labcustomer.Text = stockin.data.shipperInfo.shipperCode + " " + stockin.data.shipperInfo.shipperName;
                Cursor.Current        = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message);
                return;
            }
            //if(1==2)
            //{
            this.txtorderid.Enabled  = false;
            this.txttraycode.Enabled = true;
            this.txttraycode.Focus();
            //}
        }
Beispiel #27
0
 private void cmboperation_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 27)
     {
         malist = null;
         this.cmboperation.Enabled = false;
         this.txtorderid.Enabled   = true;
         this.txtorderid.Focus();
         this.txtorderid.SelectAll();
         return;
     }
     if (e.KeyChar != 13)
     {
         return;
     }
     try
     {
         string x = HttpHelper.HttpPost("getAssisterByOperation", @"operatorCode=" + this.cmboperation.SelectedValue.ToString() + "&orderNo=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode);
         msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
         if (msg == null)
         {
             throw new Exception("错误信息捕捉失败");
         }
         if (!msg.success)
         {
             throw new Exception(msg.msg);
         }
         malist = (Model.MAssisterByOperation)JsonConvert.DeserializeObject(x, typeof(Model.MAssisterByOperation));
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return;
     }
     if (malist == null)
     {
         malist = new Rf_Wms.Model.MAssisterByOperation();
     }
     if (malist.data == null)
     {
         malist.data = new List <Rf_Wms.Model.Assisters>();
     }
     else
     {
         ShowInfo();
     }
     this.cmboperation.Enabled = false;
     this.cmbunit.Enabled      = true;
     this.cmbunit.Focus();
 }
Beispiel #28
0
        void Save()
        {
            string con = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&materialCode=" + materialbody.code + "&quantity=" + commonqty + "&minQuantity=" + minqty + "&toTrayCode=" + this.txttraycode.Text + "&fromTrayCode=" + this.txttraycode.Text + "&operatorCode=" + Comm.usercode + "&fromSlId=" + mp.data.toSlId + "&assistance=" + this.labassistance.Text;;

            string x = HttpHelper.HttpPost("packOrder/machineingPackOrder", con);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
        }
Beispiel #29
0
 private void txtassistance_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 27)
     {
         this.txtassistance.Enabled = false;
         this.txtslname.Enabled     = true;;
         this.txtassistance.Text    = "";
         this.txtslname.Text        = "";
         this.txtslname.Focus();
         return;
     }
     if (e.KeyChar != 13)
     {
         return;
     }
     Model.MUserInfo mu = null;
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         string x = HttpHelper.HttpPost("getUserInfo", @"lcCode=" + Comm.lcCode + "&account=" + this.txtassistance.Text);
         msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
         if (msg == null)
         {
             throw new Exception("错误信息捕捉失败");
         }
         if (!msg.success)
         {
             throw new Exception(msg.msg);
         }
         mu = (Model.MUserInfo)JsonConvert.DeserializeObject(x, typeof(Model.MUserInfo));
         if (mu == null || mu.data == null || mu.data.userCode == "")
         {
             throw new Exception("错误信息捕捉失败");
         }
         this.labassistance.Text = mu.data.userCode;
         Cursor.Current          = Cursors.Default;
     }
     catch (Exception ex)
     {
         Cursor.Current = Cursors.Default;
         MessageBox.Show(ex.Message);
         return;
     }
     this.txtassistance.Enabled = false;
     this.txtcommonqty.Enabled  = true;
     this.txtcommonqty.Focus();
 }
Beispiel #30
0
 private void txtorderid_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar != 13)
     {
         return;
     }
     this.labstockUpConfirmMsg.Text = "";
     this.labpick.Text       = "";
     this.labcheck.Text      = "";
     this.labcheckorder.Text = "";
     this.txtorderid.Text    = this.txtorderid.Text.Trim();
     if (this.txtorderid.Text == "")
     {
         return;
     }
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         string x = HttpHelper.HttpPost("doStockUpConfirm", @"pickNo=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&updater=" + Comm.usercode + "&whId=" + Comm.warehousecode);
         msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
         if (msg == null)
         {
             throw new Exception("错误信息捕捉失败");
         }
         if (!msg.success)
         {
             throw new Exception(msg.msg);
         }
         Model.MdoStockUpConfirm v = (Model.MdoStockUpConfirm)JsonConvert.DeserializeObject(x, typeof(Model.MdoStockUpConfirm));
         if (v == null)
         {
             throw new Exception("数据信息捕捉失败");
         }
         this.labstockUpConfirmMsg.Text = v.data.stockUpConfirmMsg;
         this.labpick.Text       = v.data.pickQuantity + "箱" + v.data.pickMinQuantity + "个";
         this.labcheck.Text      = v.data.checkQuantity + "箱" + v.data.checkMinQuantity + "个";
         this.labcheckorder.Text = v.data.checkOrderQuantity + "箱" + v.data.checkOrderMinQuantity + "个";
         Cursor.Current          = Cursors.Default;
     }
     catch (Exception ex)
     {
         Cursor.Current = Cursors.Default;
         MessageBox.Show(ex.Message);
         this.txtorderid.SelectAll();
         return;
     }
 }