public static string ProductionOrder(string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { VProduceOrder vpo = new VProduceOrder(); B_YqSaleOrder 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.edate; vpo.overdate = bof == null ? "" : CommonBll.GetBdate(bof.overdate); vpo.bz = bso.remark; r = js.Serialize(vpo); } else { r = iv.badstr; } return(r); }
public static string SalePayOperator(string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { B_SaleMaterielOrder bso = bsob.Query(" and sid='" + sid + "'"); VPayOrder vpo = new VPayOrder(); VOrderMoney vm = bomb.DoorOrderMoney(sid, 1, bso.gdiscount, 1); CB_OrderFlow cof = bwfb.QueryAttrExWorkFlow(sid, "bj"); vpo.code = bso.scode; vpo.dname = bso.dname; vpo.city = bso.city; vpo.dcode = bso.citycode; vpo.bjr = cof != null ? cof.maker : ""; vpo.yingshou = vm.godhjmoney.ToString(); vpo.yishou = vm.pmoney.ToString(); vpo.weishou = (vm.godhjmoney - vm.pmoney).ToString(); r = js.Serialize(vpo); } else { r = iv.badstr; } return(r); }
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 CommonManPlatList(string msdate, string mtdate, string qtdate, string sid) { string r = ""; StringBuilder where = new StringBuilder(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string[] sids = sid.Split(';'); if (bppb.CommonManProduce(sids, msdate, mtdate, qtdate)) { 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); }
public JsonResult QueryMEmcodeById(string sid) { 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='' order by id asc"); d.d = cbf != null?cbf.emcode:""; } else { d.d = iv.badstr; } return(Json(d)); }
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); }