You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
3.4 KiB
C#
100 lines
3.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Services;
|
|
using TradeModel;
|
|
using TradeData;
|
|
|
|
namespace TradeManageNew
|
|
{
|
|
/// <summary>
|
|
/// SysManageNew 的摘要说明
|
|
/// </summary>
|
|
[WebService(Namespace = "http://tempuri.org/")]
|
|
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
|
|
[System.ComponentModel.ToolboxItem(false)]
|
|
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
|
|
[System.Web.Script.Services.ScriptService]
|
|
public class SysManageNew : System.Web.Services.WebService
|
|
{
|
|
|
|
[WebMethod]
|
|
public string HelloWorld()
|
|
{
|
|
return "Hello World";
|
|
}
|
|
#region 保存赔款申请
|
|
[WebMethod(EnableSession = true)]
|
|
public int SaveBackMoneyApply2(int BackState, DT_OrderBackMoneyApply model)
|
|
{
|
|
PagesNew.Login(this.Session);
|
|
|
|
int UserId = Convert.ToInt32(Session["UserId"]);
|
|
int DeptId = Convert.ToInt32(Session["DeptId"]);
|
|
string Name = Convert.ToString(Session["Name"]);
|
|
DD_OrderData obj = new DD_OrderData();
|
|
BaseService obj1 = new BaseService();
|
|
//if (model.Id == null || model.Id == 0)
|
|
//{
|
|
// int a = obj.IsOrderBackMoney(model.OrderCode);
|
|
// if (a > 0)
|
|
// return 1;
|
|
//}
|
|
//if (model.Id == null || model.Id == 0)
|
|
//{
|
|
// int orderid = obj.IsOrderBackMoney2(model.OrderCode);
|
|
// if (orderid==0)
|
|
// return 2;
|
|
// model.OrderId = orderid;
|
|
//}
|
|
model.Indate = DateTime.Now;
|
|
model.InUserId = UserId;
|
|
model.InName = Name;
|
|
|
|
//var clist = obj1.GetDeptCharge2(DeptId);
|
|
//if (clist != null && clist.Count > 0)
|
|
//{
|
|
// model.CompanyName1 = clist[0].Name;
|
|
// model.CompanyUserId = clist[0].UserId;
|
|
//}
|
|
model.OrderCode = model.OrderCode.Trim();
|
|
model.GoodsCode = model.GoodsCode.Trim();
|
|
model.BackDate = DateTime.Now;
|
|
string imgids = "";
|
|
if (model.imglist != null)
|
|
{
|
|
foreach (var md in model.imglist)
|
|
{
|
|
imgids += md.id + ",";
|
|
}
|
|
}
|
|
if (imgids != "")
|
|
model.ImageIds = imgids.Trim(',');
|
|
obj.SaveBackMoneyForOrder(model.OrderId.Value, BackState);
|
|
DataNew.SaveBackMoneyApply2(BackState, model);
|
|
//if (model.FactPrice != null && model.BackDate != null)
|
|
//{
|
|
// model.OrderCode = model.OrderCode.Trim();
|
|
// obj.SaveBackMoneyFact(model);
|
|
//}
|
|
BaseService.SendOpenMess(1, Name + "有个订单退货赔款申请需要你审批", "");
|
|
return 0;
|
|
}
|
|
#endregion
|
|
|
|
[WebMethod(EnableSession = true)]
|
|
public List<DT_OrderBackMoneyApply> GetListJC_OrderBackUnRead2()
|
|
{
|
|
PagesNew.Login(base.Session);
|
|
int num = Convert.ToInt32(base.Session["UserId"]);
|
|
|
|
if (num > 1)
|
|
{
|
|
return null;
|
|
}
|
|
return DataNew.GetListDT_OrderBackUnRead2();
|
|
}
|
|
}
|
|
}
|