|
|
|
@ -369,6 +369,24 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
|
|
|
|
|
public ContentResult Save(string bsno, string chfeebody,string isyj="0")
|
|
|
|
|
{
|
|
|
|
|
string LAN = Convert.ToString(Session["LANGUAGES"]);
|
|
|
|
|
var custnamestr = "客户名称:";
|
|
|
|
|
var xitongbucunzai = "系统中不存在,请检查";
|
|
|
|
|
var yifeiyongsuoding = "已费用锁定,不允许添加修改费用!";
|
|
|
|
|
var yiyuemojiezhuan = "已月末结转,不允许添加修改费用!";
|
|
|
|
|
var yiDRfeiyongsuoding = "应收费用已锁定,不允许添加修改费用!";
|
|
|
|
|
var yiCRfeiyongsuoding = "应付费用已锁定,不允许添加修改费用!";
|
|
|
|
|
if (LAN == "en-us") {
|
|
|
|
|
custnamestr = "Customer Name:";
|
|
|
|
|
xitongbucunzai = "Not present in the system, please check";
|
|
|
|
|
yifeiyongsuoding = "Fee locked, adding or modifying fees not allowed!";
|
|
|
|
|
yiyuemojiezhuan = "Carried forward at the end of the month, adding or modifying fees is not allowed!";
|
|
|
|
|
yiDRfeiyongsuoding = "DR are locked and cannot be added or modified!";
|
|
|
|
|
yiCRfeiyongsuoding = "CR are locked and cannot be added or modified!";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int iResult = 0;
|
|
|
|
|
var bodyList = JsonConvert.Deserialize<List<MsChFee>>(chfeebody);
|
|
|
|
|
var result =new DBResult();
|
|
|
|
@ -392,7 +410,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
var jsonRespose2 = new JsonResponse
|
|
|
|
|
{
|
|
|
|
|
Success =false,
|
|
|
|
|
Message ="客户名称:"+custstr+" ,系统中不存在,请检查!",
|
|
|
|
|
Message = custnamestr + custstr+" ,"+ xitongbucunzai,
|
|
|
|
|
};
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
|
|
|
|
|
}
|
|
|
|
@ -471,7 +489,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
var jsonRespose2 = new JsonResponse
|
|
|
|
|
{
|
|
|
|
|
Success = false,
|
|
|
|
|
Message = "已费用锁定,不允许添加修改费用!",
|
|
|
|
|
Message = yifeiyongsuoding,
|
|
|
|
|
};
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
|
|
|
|
|
}
|
|
|
|
@ -485,7 +503,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
var jsonRespose2 = new JsonResponse
|
|
|
|
|
{
|
|
|
|
|
Success = false,
|
|
|
|
|
Message = "已月末结转,不允许添加修改费用!",
|
|
|
|
|
Message = yiyuemojiezhuan,
|
|
|
|
|
};
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
|
|
|
|
|
|
|
|
|
@ -503,7 +521,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
var jsonRespose2 = new JsonResponse
|
|
|
|
|
{
|
|
|
|
|
Success = false,
|
|
|
|
|
Message = "已费用锁定,不允许添加修改费用!",
|
|
|
|
|
Message = yifeiyongsuoding,
|
|
|
|
|
};
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
|
|
|
|
|
}
|
|
|
|
@ -526,7 +544,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
var jsonRespose2 = new JsonResponse
|
|
|
|
|
{
|
|
|
|
|
Success = false,
|
|
|
|
|
Message = "应收费用已锁定,不允许添加修改费用!",
|
|
|
|
|
Message = yiDRfeiyongsuoding,
|
|
|
|
|
};
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
|
|
|
|
|
}
|
|
|
|
@ -534,7 +552,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
var jsonRespose2 = new JsonResponse
|
|
|
|
|
{
|
|
|
|
|
Success = false,
|
|
|
|
|
Message = "应付费用已锁定,不允许添加修改费用!",
|
|
|
|
|
Message = yiCRfeiyongsuoding,
|
|
|
|
|
};
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
|
|
|
|
|
}
|
|
|
|
@ -719,6 +737,16 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
|
|
|
|
|
public ContentResult Delete(string bsno,string data)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string LAN = Convert.ToString(Session["LANGUAGES"]);
|
|
|
|
|
var shanchuchenggong = "删除成功!";
|
|
|
|
|
|
|
|
|
|
if (LAN == "en-us")
|
|
|
|
|
{
|
|
|
|
|
shanchuchenggong = "Successfully deleted!";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int iResult = 0;
|
|
|
|
|
var bodyList = data;
|
|
|
|
|
var result = new DBResult();
|
|
|
|
@ -732,7 +760,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
if (iResult == 1)
|
|
|
|
|
{
|
|
|
|
|
result.Success = true;
|
|
|
|
|
result.Message = "删除成功!";
|
|
|
|
|
result.Message = shanchuchenggong;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if (iResult == 0)
|
|
|
|
@ -765,6 +793,17 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
{
|
|
|
|
|
int iResult = 0;
|
|
|
|
|
var bodyList = data;
|
|
|
|
|
string LAN = Convert.ToString(Session["LANGUAGES"]);
|
|
|
|
|
var shanchuchenggong = "删除成功!";
|
|
|
|
|
|
|
|
|
|
if (LAN == "en-us")
|
|
|
|
|
{
|
|
|
|
|
shanchuchenggong = "Successfully deleted!";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var result = new DBResult();
|
|
|
|
|
|
|
|
|
|
if (bodyList != "" || bodyList != null)
|
|
|
|
@ -776,7 +815,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
if (iResult == 1)
|
|
|
|
|
{
|
|
|
|
|
result.Success = true;
|
|
|
|
|
result.Message = "删除成功!";
|
|
|
|
|
result.Message = shanchuchenggong;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if (iResult == 0)
|
|
|
|
@ -810,9 +849,16 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
var head = JsonConvert.Deserialize<MsOpAmend>(data);
|
|
|
|
|
|
|
|
|
|
T_ALL_DA T_ALL_DA = new T_ALL_DA();
|
|
|
|
|
string LAN = Convert.ToString(Session["LANGUAGES"]);
|
|
|
|
|
var genggaidancunzaifeiyong = "更改单存在费用,不允许删除!";
|
|
|
|
|
|
|
|
|
|
if (LAN == "en-us")
|
|
|
|
|
{
|
|
|
|
|
genggaidancunzaifeiyong = "fees and deletion is not allowed!";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from ch_fee WHERE BSNO='" + head.BSNO + "'");
|
|
|
|
|
var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from ch_fee WHERE BSNO='" + head.BSNO + "'");
|
|
|
|
|
if (BLCOUNT == "0")
|
|
|
|
|
{
|
|
|
|
|
var modb = new ModelObjectDB();
|
|
|
|
@ -823,7 +869,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = false, Message ="更改单存在费用,不允许删除!" };
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = false, Message = genggaidancunzaifeiyong };
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1027,7 +1073,16 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
{
|
|
|
|
|
//var headData = JsonConvert.Deserialize<List<MsOpAmend>>(data);
|
|
|
|
|
var errstr = "";
|
|
|
|
|
string LAN = Convert.ToString(Session["LANGUAGES"]);
|
|
|
|
|
var shanchuchenggong = "删除成功!";
|
|
|
|
|
var cunzaifeiyong = "存在费用,请先删除费用才能删除此票更改单!";
|
|
|
|
|
|
|
|
|
|
if (LAN == "en-us")
|
|
|
|
|
{
|
|
|
|
|
shanchuchenggong = "Successfully deleted!";
|
|
|
|
|
cunzaifeiyong = "There are fees, please delete the fees first before deleting this amend!";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (headData != null)
|
|
|
|
|
{
|
|
|
|
@ -1053,8 +1108,8 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (errstr == "") errstr = "删除成功!";
|
|
|
|
|
else errstr = "存在费用,请先删除费用才能删除此票更改单!";
|
|
|
|
|
if (errstr == "") errstr = shanchuchenggong;
|
|
|
|
|
else errstr = cunzaifeiyong;
|
|
|
|
|
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = true, Message = errstr };
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|