Beispiel #1
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);
        }
Beispiel #2
0
        public static string QueryMzOrder(string sid)
        {
            string              r   = "";
            B_QbqqSaleOrder     bms = new B_QbqqSaleOrder();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (sid == "")
                {
                    Sys_Depment sd = sdb.Query(" and dcode='" + iv.u.dcode + "'");
                    bms.id       = 0;
                    bms.city     = sd.dpname;
                    bms.citycode = sd.dpcode;
                    bms.dcode    = iv.u.dcode;
                    bms.dname    = iv.u.dname;
                    bms.maker    = iv.u.ename;
                }
                else
                {
                    bms = bmsob.Query("and sid='" + sid + "'");
                    //bms.ztimg = bosb.QueryOrderStateImg(sid);
                }
                r = js.Serialize(bms);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Beispiel #3
0
        public static string MzProductionOrder(string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                VProduceOrder   vpo = new VProduceOrder();
                B_QbqqSaleOrder bso = bsob.Query(" and sid='" + sid + "'");
                CB_OrderFlow    cof = bwfb.QueryAttrExWorkFlow(sid, "sc");
                B_OrderFacotory bof = bofb.Query(" and sid='" + sid + "'");
                vpo.code     = bso.scode;
                vpo.ycode    = bso.ycode;
                vpo.customer = bso.customer;
                vpo.address  = bso.address;
                vpo.dname    = bso.dname;
                vpo.otype    = bso.otype;
                vpo.fname    = bof == null ? "" : bof.dname;
                vpo.scdate   = cof != null? cof.edate:"";
                vpo.overdate = bof == null ? "" : bof.overdate;
                vpo.bz       = bso.remark;
                r            = js.Serialize(vpo);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Beispiel #4
0
        public static string QueryMzOrderPrice(string sid)
        {
            string              r   = "";
            B_QbqqSaleOrder     bms = new B_QbqqSaleOrder();
            VMzOrderPrice       vmp = new VMzOrderPrice();
            StringBuilder       djh = new StringBuilder();
            StringBuilder       omh = new StringBuilder();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                bms        = bmsob.Query("and sid='" + sid + "'");
                vmp.omoney = bms.omoney.ToString("#0.00");
                vmp.dmoney = bms.dmoney.ToString("#0.00");
                B_MzPriceFile bmpf = bmpfb.Query(" and sid='" + sid + "'");
                if (bmpf != null)
                {
                    vmp.pfname = bmpf.fname;
                    vmp.bshow  = "1";
                    vmp.pfid   = bmpf.id.ToString();
                }
                List <B_PayImg> ldbpi = bpib.QueryList(" and sid='" + sid + "' and ptype='dj'");
                if (ldbpi != null)
                {
                    djh.Append("<table style='width:100%;border:none'>");
                    foreach (B_PayImg bpi in ldbpi)
                    {
                        djh.AppendFormat("<tr><td><img id='{0}' src='{1}' alt='' onclick='nck(this.id)'/></td></tr>", bpi.id, bpi.url);
                    }
                    djh.Append("<table>");
                }
                List <B_PayImg> lobpi = bpib.QueryList(" and sid='" + sid + "' and ptype='o'");
                if (lobpi != null)
                {
                    omh.Append("<table style='width:100%;border:none'>");
                    foreach (B_PayImg bpi in lobpi)
                    {
                        omh.AppendFormat("<tr><td><img id='{0}' src='{1}' alt='' onclick='nck(this.id)'/></td></tr>", bpi.id, bpi.url);
                    }
                    omh.Append("<table>");
                }
                vmp.djhtm = djh.ToString();
                vmp.omhtm = omh.ToString();
                r         = js.Serialize(vmp);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Beispiel #5
0
        public static string MzInHouseOrder(string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                VInHouseOrder   vpo  = new VInHouseOrder();
                B_QbqqSaleOrder bso  = bsob.Query(" and sid='" + sid + "'");
                B_OrderFacotory bof  = bofb.Query(" and sid='" + sid + "'");
                CB_OrderState   cos  = cosb.Query(" and sid='" + sid + "'");
                int             bnum = bohrb.GetRecordCount(" sid='" + sid + "'");
                string          zt   = "";
                if (cos != null)
                {
                    if (cos.istoreget == 0)
                    {
                        zt = "未入库";
                    }
                    if (cos.istoreget == 1)
                    {
                        zt = "部分入库";
                    }
                    if (cos.istoreget == 2)
                    {
                        zt = "全部入库";
                    }
                }
                vpo.code      = bso.scode;
                vpo.ycode     = bso.ycode;
                vpo.customer  = bso.customer;
                vpo.address   = bso.address;
                vpo.dname     = bso.dname;
                vpo.fname     = bof == null ? "" : bof.dname;
                vpo.bz        = bso.remark;
                vpo.city      = bso.city;
                vpo.telephone = bso.telephone;
                vpo.bnum      = bnum.ToString();
                vpo.zt        = zt;
                r             = js.Serialize(vpo);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Beispiel #6
0
        public static ArrayList QueryMzReceiptList(string bdate, string city, string code, string curpage, string customer, string dname, string edate, string emcode, string pagesize, string tabcode)
        {
            ArrayList r   = new ArrayList();
            DataTable lsr = new DataTable();

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

            if (iv.f)
            {
                r.Add(iv.badstr);
                int rcount = 0;
                int pcount = 0;
                if (customer != "")
                {
                    where.AppendFormat(" and customer like '%{0}%'", customer);
                }
                if (code != "")
                {
                    where.AppendFormat(" and scode like '%{0}%'", code);
                }
                if (city != "")
                {
                    where.AppendFormat(" and e_city like '%{0}%'", city);
                }
                if (dname != "")
                {
                    where.AppendFormat(" and dname like '%{0}%'", dname);
                }
                //if (telephone != "")
                //{
                //    where.AppendFormat(" and telephone like '%{0}%'", telephone);
                //}
                if (bdate != "" && bdate != null)
                {
                    where.AppendFormat(" and cdate >='{0}'", bdate);
                }
                if (edate != "" && edate != null)
                {
                    where.AppendFormat(" and cdate <='{0}'", edate);
                }
                Sys_ViewTable svt = svtb.QuerySelCols(emcode, tabcode, iv.u.rcode);
                if (svt == null)
                {
                }
                else
                {
                    where.Append(CommonBll.SqlWhereReplace(iv.u, svt.sqlcondition));
                    string sfield = svt.sqlcols;
                    lsr = bsob.QueryList(Convert.ToInt32(curpage), Convert.ToInt32(pagesize), sfield, where.ToString(), "id desc", ref rcount, ref pcount);
                    if (lsr != null)
                    {
                        r.Add(pcount);
                        foreach (DataRow dr in lsr.Rows)
                        {
                            ArrayList al = new ArrayList();
                            al.Add(bebb.QueryBtnListItems(emcode, iv.u.rcode, "LX", dr[1].ToString()));
                            foreach (DataColumn column in lsr.Columns)
                            {
                                switch (column.Caption)
                                {
                                case "ysmoney":
                                    al.Add(0);
                                    break;

                                case "symoney":
                                    al.Add(bsob.Query(" and sid='" + dr[1].ToString() + "'").omoney - bprb.GetSkMoneyEx(" and sid='" + dr[1].ToString() + "'"));
                                    break;

                                case "zt":
                                    al.Add("<span style='color:blue; font-weight:bolder'>" + cbeb.GetOrderState(dr[1].ToString()) + "</span>");
                                    break;

                                default:
                                    al.Add(dr[column].ToString());
                                    break;
                                }
                            }
                            r.Add(al);
                        }
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }