Exemple #1
0
        public static string CommonAutoPlatList(string sid)
        {
            string r = "";

            StringBuilder where = new StringBuilder();
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                string[] sids = sid.Split(';');
                if (bppb.CommonAutoProduce(sids))
                {
                    foreach (string id in sids)
                    {
                        CB_OrderFlow cof = cbfb.Query(" and sid='" + id + "' order by id asc");
                        if (cof != null)
                        {
                            switch (cof.emcode)
                            {
                            case "0001":
                                EventBtnDo.FireEventBtn(id, "0385", "1", "自动排产");
                                break;

                            case "0009":
                                EventBtnDo.FireEventBtn(id, "0342", "1", "自动排产");
                                break;

                            case "0143":
                                EventBtnDo.FireEventBtn(id, "0416", "1", "自动排产");
                                break;

                            case "0163":
                                EventBtnDo.FireEventBtn(id, "0365", "1", "自动排产");
                                break;

                            case "0177":
                                break;

                            case "0192":
                                break;

                            case "0213":
                                break;
                            }
                        }
                    }
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemple #2
0
        public static string MzCustomePayOperator(string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                VPayOrder       vpo      = new VPayOrder();
                B_QbqqSaleOrder bso      = bsob.Query(" and sid='" + sid + "'");
                decimal         yingshou = bso.dmoney;
                decimal         yishou   = bprb.GetSkMoneyEx(" and sid='" + sid + "' and ptype='dj'");
                CB_OrderFlow    cof      = cofb.Query(" and sid='" + sid + "' and wcode='0046'");
                vpo.code     = bso.scode;
                vpo.customer = bso.customer;
                vpo.dname    = bso.dname;
                //vpo.settlment = bso.sname;
                vpo.bjr       = cof != null ? cof.maker : "";
                vpo.yingshou  = yingshou.ToString("#0.00");
                vpo.yishou    = yishou.ToString();
                vpo.weishou   = (yingshou - yishou).ToString("#0.00");
                vpo.telephone = bso.telephone;
                r             = js.Serialize(vpo);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemple #3
0
        public JsonResult QueryEmcodeById(string sid, string wrtype)
        {
            JsonData            d  = new JsonData();
            ArrayList           r  = new ArrayList();
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                CB_OrderFlow cbf = cofb.Query(" and sid='" + sid + "' and wrtype='" + wrtype + "' order by id asc");
                d.d = cbf != null?cbf.emcode:"";
            }
            else
            {
                d.d = iv.badstr;
            }
            return(Json(d));
        }
Exemple #4
0
        public static string QueryOrder(string sid)
        {
            string r = "";
            SessionUserValidate  iv = SysValidateBll.ValidateSession();
            B_AfterReModifyOrder ao = new B_AfterReModifyOrder();

            if (iv.f)
            {
                ao        = basob.Query(" and sid='" + sid + "'");
                ao.rcode  = iv.u.rcode;
                ao.tsdate = cofb.Query(" and sid='" + sid + "' and wcode='0096'").edate;
                r         = js.Serialize(ao);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemple #5
0
        public static string LoadSaleOrder(string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_SaleOrder bco = bsob.Query(" and sid='" + sid + "'");
                if (bco != null)
                {
                    B_CustormOrder bdj = bcob.Query(" and csid='" + bco.csid + "'");
                    CB_OrderFlow   cof = cofb.Query(" and sid='" + sid + "' and state=1 and wcode='0003'");
                    if (cof != null)
                    {
                        //bco.state = true;
                    }
                    bco.ztimg = bosb.QueryOrderStateImg(sid);
                    r         = js.Serialize(bco);
                }
                else
                {
                    Sys_Depment sd  = sdb.Query(" and dcode='" + iv.u.dcode + "'");
                    B_SaleOrder kco = new B_SaleOrder();
                    if (sd != null)
                    {
                        if (sd.dattr == "cs")
                        {
                            Sys_DepmentDpt sdd = sddb.Query(" and dcode='" + sd.dcode + "'");
                            kco.city       = sd.dpname;
                            kco.citycode   = sd.dpcode;
                            kco.dname      = sd.dname;
                            kco.dcode      = sd.dcode;
                            kco.stelephone = sdd != null ? sdd.dcontact : "";
                        }
                        else if (sd.dattr == "dm")
                        {
                            Sys_DepmentDpt sdd = sddb.Query(" and dcode='" + sd.dcode.Substring(0, sd.dcode.Length - 4) + "'");
                            kco.city       = sd.dpname;
                            kco.citycode   = sd.dpcode;
                            kco.dname      = sd.dname;
                            kco.dcode      = sd.dcode;
                            kco.stelephone = sdd != null ? sdd.dcontact : "";
                        }
                        else
                        {
                            kco.city     = "";
                            kco.citycode = "";
                            kco.dname    = "";
                            kco.dcode    = "";
                        }
                    }
                    kco.maker = iv.u.ename;
                    r         = js.Serialize(kco);
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }