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); }
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); }
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); }
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); }
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); }
public static string SaveMzOrder(string address, string area, string city, string citycode, string colorpane, string customer, string dcode, string designer, string dname, string dtype, string id, string lxtype, string maker, string mname, string otype, string precode, string remark, string sid, string source, string telephone) { string r = ""; B_QbqqSaleOrder bms = new B_QbqqSaleOrder(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { bms.acode = ""; bms.aname = ""; bms.address = address; bms.community = area; bms.city = city; bms.citycode = citycode; bms.colorpane = colorpane; bms.customer = customer; bms.dname = dname; bms.dcode = dcode; bms.designer = designer; bms.maker = iv.u.ename; bms.mname = mname; bms.otype = otype; bms.ycode = precode; bms.remark = remark; bms.source = source; bms.telephone = telephone; bms.packtype = lxtype; bms.dtype = dtype; bms.cdate = DateTime.Now.ToString(); if (id == "0") { bms.sid = CommonBll.GetSid(); CB_OrderState cos = new CB_OrderState(); if (bmsob.Add(bms) > 0) { Sys_MzOrderType smot = smotb.Query(" and mtname='" + dtype + "'"); if (smot != null) { bwfb.CreateWorkFlow(bms.sid, smot.emcode); } cos.sid = bms.sid; cosb.Add(cos); if (!bcb.Exists(" and telephone='" + telephone + "'")) { B_Customer bc = new B_Customer(); bc.dname = bms.dname; bc.dcode = bms.dcode; bc.customer = bms.customer; bc.telephone = bms.telephone; bc.community = bms.community; bc.address = bms.address; bc.cdate = DateTime.Now.ToString(); bc.maker = bms.maker; bcb.Add(bc); } r = bms.sid; } else { r = "F"; } } else { bms.sid = sid; if (bmsob.Update(bms)) { Sys_MzOrderType smot = smotb.Query(" and mtname='" + dtype + "'"); if (smot != null) { bwfb.CreateWorkFlow(bms.sid, smot.emcode); } r = bms.sid; } else { r = "F"; } } } else { r = iv.badstr; } return(r); }