hanxuntao 3 months ago
parent c09f3d604b
commit 8468e3bf14

@ -0,0 +1,335 @@
using System;
using System.Linq;
using System.Web.Mvc;
using DSWeb.MvcShipping.DAL.MsOpSaleRptDAL;
using DSWeb.MvcShipping.Models.MsOpSaleRpt;
using DSWeb.MvcShipping.Helper;
using DSWeb.MvcShipping.Comm.Cookie;
using HcUtility.Comm;
using HcUtility.Core;
using System.Collections.Generic;
using DSWeb.MvcShipping.DAL.MsBaseInfoDAL;
using DSWeb.EntityDA;
using DSWeb.Models;
using DSWeb.Attributes;
using DSWeb.MvcShipping.Models.MsSysBillNoSet;
using DSWeb.MvcShipping.DAL.MsSysBillNoSet;
using DSWeb.MvcShipping.Models.MsCodeServiceFeeTemplate;
using System.IO;
using System.Data;
using System.Data.OleDb;
using DSWeb.MvcShipping.DAL.MsInfoClient;
using DSWeb.MvcShipping.DAL.MsSysParamSet;
using System.Web.Configuration;
using DSWeb.MvcShipping.DAL.MsCodeOpServiceDAL;
using System.Text;
using DSWeb.Areas.CommMng.DAL;
using DSWeb.Areas.RptMng.Comm;
using DSWeb.SoftMng.Filter;
using DSWeb.MvcShipping.Models.MsOpPlan;
using DSWeb.MvcShipping.DAL.MsCodeCtnEdi;
using DSWeb.MvcShipping.Models.CodeCtnEdi;
using Renci.SshNet.Common;
namespace DSWeb.MvcShipping.Controllers
{
[JsonRequestBehavior]
public class MsOpSaleRptController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult Edit()
{
return View();
}
public ActionResult ModifyEdit()
{
return View();
}
public ActionResult ModifyHisEdit()
{
return View();
}
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public ContentResult GetDataList(int start, int limit, string sort, string condition)
{
var dataList = MsOpSaleRptDAL.GetDataList(condition, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), sort);
var list = dataList.Skip(start).Take(limit);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });
return new ContentResult() { Content = json };
}
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public ContentResult GetDataListStr(string sort, string condition)
{
var dataListStr = MsOpSaleRptDAL.GetDataListStr(condition, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), sort);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataListStr });
return new ContentResult() { Content = json };
}
//public ContentResult GetDataListSum(int start, int limit, string sort, string condition)
//{
// var dataList = MsOpSeaePreDAL.GetDataListSum(condition, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), sort);
// var list = dataList.Skip(start).Take(limit);
// var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });
// return new ContentResult() { Content = json };
//}
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public ContentResult GetData(string handle, string condition)
{
MsOpSaleRpt head = null;
if (handle == "edit")
{
head = MsOpSaleRptDAL.GetData(condition);
}
if (head == null)
{
head = new MsOpSaleRpt();
// head.OP = Convert.ToString(Session["SHOWNAME"]);
// head.CREATEUSER
}
var json = JsonConvert.Serialize(
new { Success = true, Message = "查询成功", data = head });
return new ContentResult() { Content = json };
}
public ContentResult SaveDetail(string body)
{
var bodyList = JsonConvert.Deserialize<List<MsOpSaleRpt>>(body);
DBResult result = MsOpSaleRptDAL.SaveDetail(bodyList, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"]));
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult Save(string opstatus, string data)
{
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
//
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
var headData = JsonConvert.Deserialize<MsOpSaleRpt>(data);
var isPost = true;
var errorstr = "";
var iscreatecustno = false;
////分公司代码
//if (headData.CORPID == "" || headData.CORPID == null)
//{
// headData.CORPID = Convert.ToString(Session["COMPANYID"]);
//}
//分公司代码
if (headData.BSNO == "" || headData.BSNO == null)
{
headData.BSNO = "topseaepre" + Guid.NewGuid().ToString().Replace("-","");
}
var ct = MsOpSaleRptDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND MBLNO='" + headData.MBLNO + "'");
if (ct != 0)
{
var jsonRespose = new JsonResponse { Success = false, Message = "主提单号不允许重复!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
//
if (headData.ETD == "") headData.ETD = null;
string rq = T_ALL_DA.GetStrSQL("rq", "select getdate() as rq");
//
if (opstatus == "add")
{
headData.DbOperationType = DbOperationType.DbotIns;
//
headData.CREATEUSER = Convert.ToString(Session["USERID"]);//创建人
headData.CREATETIME = DateTime.Parse(rq);//创建时间
headData.MODIFIEDUSER = Convert.ToString(Session["USERID"]);//最后一次操作人
headData.MODIFIEDTIME = DateTime.Parse(rq);//最后一次操作时间
}
else if (opstatus == "edit")
{
headData.DbOperationType = DbOperationType.DbotUpd;
headData.ModelUIStatus = "E";
//
headData.MODIFIEDUSER = Convert.ToString(Session["USERID"]);//最后一次操作人
headData.MODIFIEDTIME = DateTime.Parse(rq);//最后一次操作时间
}
else
{
headData.DbOperationType = DbOperationType.DbotDel;
}
//if (headData.CTNNUM == null) { headData.CTNNUM = 0; }
if (isPost)
{
var modb = new ModelObjectDB();
DBResult result = modb.Save(headData);
var BSNO = headData.BSNO;
var jsonRespose = new JsonResponse
{
Success = result.Success,
Message = result.Message,
Data = MsOpSaleRptDAL.GetData("BSNO='" + BSNO + "'")
};
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
else {
var jsonRespose = new JsonResponse { Success = false, Message =errorstr };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
public ContentResult Delete(string data)
{
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
//
var head = JsonConvert.Deserialize<MsOpSaleRpt>(data);
var BSNO = head.BSNO;
var modb = new ModelObjectDB();
DBResult result = modb.Delete(head);
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
//
public ContentResult DeleteList(string data)
{
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
//
DBResult result = new DBResult();
var headList = JsonConvert.Deserialize<List<MsOpSaleRpt>>(data);
if (headList != null)
{
foreach (var enumValue in headList)
{
var modb = new ModelObjectDB();
result = modb.Delete(enumValue);
}
}
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult NewData()
{
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
//
var result = MsOpSaleRptDAL.NewData(Convert.ToString(Session["USERID"]));
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult SubmitAudit()
{
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
//
var result = MsOpSaleRptDAL.SubmitAudit(Convert.ToString(Session["USERID"]));
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult LockList(string data,string type="1")
{
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
//
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
DBResult result = new DBResult();
var headList = JsonConvert.Deserialize<List<MsOpSaleRpt>>(data);
if (headList != null)
{
foreach (var enumValue in headList)
{
if (type == "1")
{
var blUpSQL = " update op_sale_rpt set RPTSTATUS='锁定' where GID='" + enumValue.GID + "'";
bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL);
}
else {
var blUpSQL = " update op_sale_rpt set RPTSTATUS='发布' where GID='" + enumValue.GID + "'";
bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL);
}
}
}
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult CancelSubList(string data)
{
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
//
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
DBResult result = new DBResult();
var headList = JsonConvert.Deserialize<List<MsOpSaleRpt>>(data);
if (headList != null)
{
foreach (var enumValue in headList)
{
var blUpSQL = " update op_sale_rpt set RPTSTATUS='未发布' where GID='" + enumValue.GID + "'";
bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL);
}
}
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
}

@ -69,6 +69,7 @@ using DSWeb.Areas.MvcShipping.Models.Message.VGM;
using DSWeb.MvcShipping.DAL.MsSysThirdPartyAccount;
using DSWeb.MvcShipping.DAL.MsCodeCtnEdi;
using DSWeb.Areas.MvcShipping.DAL.DJYORDER_CONTRACTNO;
using System.Runtime.Remoting;
//using DSWeb.Common.Helper;
@ -16050,7 +16051,7 @@ namespace DSWeb.MvcShipping.Controllers
}
}
public ContentResult BookShippingOrderList(string data, string type)
public ContentResult BookShippingOrderList(string data, string type,string portype="ALL")
{
var headData = JsonConvert.Deserialize<List<MsOpSeae>>(data);
var errstr = "";
@ -16063,13 +16064,38 @@ namespace DSWeb.MvcShipping.Controllers
thirdpartyaccount = MsSysThirdPartyAccountDAL.GetData(" THIRDPARTY='大简云'");
var YZOPID = thirdpartyaccount.ACCOUNT;
if (string.IsNullOrEmpty(YZUSERKEY)|| string.IsNullOrEmpty(YZUSERPASS) || string.IsNullOrEmpty(YZOPID))
{
var jsonRespose2 = new JsonResponse { Success = false, Message ="运踪接口Key和密钥及操作员信息不能为空"};
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
var YZCUSTNAME = MsSysParamSetDAL.GetData("PARAMNAME='YZCUSTNAME'").PARAMVALUE;
var CarrierList = MsCodeCtnEdiDAL.GetCustList("EDINAME='DJY'", "");
var YZURLS = MsSysParamSetDAL.GetData("PARAMNAME='YZURLS'").PARAMVALUE;
if (string.IsNullOrEmpty(YZURLS))
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "运踪接口地址不能为空" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
string YZRTURL = MsSysParamSetDAL.GetData("PARAMNAME='YZRTURL'").PARAMVALUE;
string YZRTUSER = MsSysParamSetDAL.GetData("PARAMNAME='YZRTUSER'").PARAMVALUE;
string YZRTPSW = MsSysParamSetDAL.GetData("PARAMNAME='YZRTPSW'").PARAMVALUE;
if (string.IsNullOrEmpty(YZRTURL) || string.IsNullOrEmpty(YZRTUSER) || string.IsNullOrEmpty(YZRTPSW))
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "运踪回推接口Key和密钥及地址信息不能为空" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
var result = new DBResult();
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
@ -16079,51 +16105,78 @@ namespace DSWeb.MvcShipping.Controllers
foreach (var enumValue in headData)
{
var BSNO = enumValue.BSNO;
var MsOpSeaeYunZongBs = new MsOpSeaeYunZongBsNew();
MsOpSeaeYunZongBs.BusinessId = enumValue.BSNO;
MsOpSeaeYunZongBs.MBLNO = enumValue.MBLNO;
MsOpSeaeYunZongBs.AlertEmail = YZCUSTNAME;
MsOpSeaeYunZongBs.CARRIER = enumValue.CARRIER;
var carrier = CarrierList.Find(x => x.CTN == enumValue.CARRIER);
if (carrier != null)
{
if (!string.IsNullOrEmpty(carrier.EDICODE))
MsOpSeaeYunZongBs.CARRIERID = carrier.EDICODE;
else
errstr = errstr + "船公司:" + enumValue.CARRIER + " 没有设置代码";
if (enumValue.IsBookingYDW && (type == "1"))
{
}
else
{
errstr = errstr + "船公司:" + enumValue.CARRIER + " 没有设置代码";
}
MsOpSeaeYunZongBs.YARD = enumValue.YARD;
if (enumValue.PORTLOADID == "CNTAO")
{
var YARD = CarrierList.Find(x => x.CTN == enumValue.YARD);
if (YARD != null)
{
if (!string.IsNullOrEmpty(YARD.EDICODE))
MsOpSeaeYunZongBs.YardCode = YARD.EDICODE;
else errstr = errstr + "场站:" + enumValue.YARD + " 没有设置代码";
}
else
var BSNO = enumValue.BSNO;
var MsOpSeaeYunZongBs = new MsOpSeaeYunZongBsNew();
MsOpSeaeYunZongBs.BusinessId = enumValue.BSNO;
MsOpSeaeYunZongBs.MBLNO = enumValue.MBLNO;
MsOpSeaeYunZongBs.AlertEmail = YZCUSTNAME;
if (type == "1")
{
errstr = errstr + "场站:" + enumValue.YARD + " 没有设置代码";
if (portype == "AFTER" || portype == "ALL")
{
MsOpSeaeYunZongBs.CARRIER = enumValue.CARRIER;
var carrier = CarrierList.Find(x => x.CTN == enumValue.CARRIER);
if (carrier != null)
{
if (!string.IsNullOrEmpty(carrier.EDICODE))
MsOpSeaeYunZongBs.CARRIERID = carrier.EDICODE;
else
errstr = errstr + "船公司:" + enumValue.CARRIER + " 没有设置代码";
}
else
{
errstr = errstr + "船公司:" + enumValue.CARRIER + " 没有设置代码";
}
MsOpSeaeYunZongBs.isBook = true;
}
if (portype == "BEFORE" || portype == "ALL")
{
MsOpSeaeYunZongBs.YARD = enumValue.YARD;
if (enumValue.PORTLOADID == "CNTAO")
{
var YARD = CarrierList.Find(x => x.CTN == enumValue.YARD);
if (YARD != null)
{
if (!string.IsNullOrEmpty(YARD.EDICODE))
MsOpSeaeYunZongBs.YardCode = YARD.EDICODE;
else errstr = errstr + "场站:" + enumValue.YARD + " 没有设置代码";
}
else
{
errstr = errstr + "场站:" + enumValue.YARD + " 没有设置代码";
}
MsOpSeaeYunZongBs.IsFrontPort = true;
}
else
{
MsOpSeaeYunZongBs.IsFrontPort = false;
}
}
}
else {
MsOpSeaeYunZongBs.CARRIER = enumValue.CARRIER;
MsOpSeaeYunZongBs.CARRIERID = enumValue.CARRIER;
MsOpSeaeYunZongBs.YARD = enumValue.YARD;
MsOpSeaeYunZongBs.YardCode = enumValue.YARD;
MsOpSeaeYunZongBs.isBook = true;
MsOpSeaeYunZongBs.IsFrontPort = true;
}
MsOpSeaeYunZongBs.IsFrontPort = true;
}
else
{
MsOpSeaeYunZongBs.IsFrontPort = false;
MsOpSeaeYunZongBsList.Add(MsOpSeaeYunZongBs);
}
MsOpSeaeYunZongBs.isBook = true;
MsOpSeaeYunZongBsList.Add(MsOpSeaeYunZongBs);
}
if (!string.IsNullOrEmpty(errstr))
{

@ -0,0 +1,559 @@
using System;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;
using System.Text;
using DSWeb.MvcShipping.Models.MsOpSaleRpt;
using Microsoft.Practices.EnterpriseLibrary.Data;
using DSWeb.EntityDA;
using DSWeb.Areas.CommMng.Models;
using HcUtility.Comm;
using HcUtility.Core;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using DSWeb.MvcShipping.Models.CodeCtnEdi;
using com.sun.tools.@internal.xjc.reader.gbind;
namespace DSWeb.MvcShipping.DAL.MsOpSaleRptDAL
{
public class MsOpSaleRptDAL
{
#region Inquery DataList
static public List<MsOpSaleRpt> GetDataList(string strCondition, string userid, string usercode, string companyid, string sort = null)
{
var rangstr = "";
// GetRangDAStr("index", userid, usercode, companyid);
if (!string.IsNullOrEmpty(rangstr))
{
if (!string.IsNullOrEmpty(strCondition))
{
strCondition = strCondition + " and " + rangstr;
}
else
{
strCondition = rangstr;
}
}
//
String strSql = "SELECT [GID],[BSNO],[MBLNO],[CUSTOMERNAME],[ACCDATE],[OP],[SALE],[ETD],[REMARK],[RMBDR],[USDDR],[STLRMBDR],[STLUSDDR],[BALRMBDR],[BALUSDDR],[TTLBALDR],[CREATETIME],[MODIFIEDTIME]"
+ ",PLANDATE,RPTSTATUS,(select top 1 showname from [user] where GID=op_sale_rpt.CREATEUSER) as CREATEUSER,(select top 1 showname from [user] where GID=op_sale_rpt.MODIFIEDUSER) as MODIFIEDUSER"
+ " FROM op_sale_rpt ";
if (!string.IsNullOrEmpty(strCondition))
{
strSql += " where " + strCondition;
}
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
strSql += " order by " + sortstring;
}
else
{
strSql += " order by ETD desc";
}
return SetData(strSql);
}
static public string GetDataListStr(string strCondition, string userid, string usercode, string companyid, string sort = null)
{
var rangstr = "";
if (!string.IsNullOrEmpty(rangstr))
{
if (!string.IsNullOrEmpty(strCondition))
{
strCondition = strCondition + " and " + rangstr;
}
else
{
strCondition = rangstr;
}
}
//
String strSql = "SELECT [GID],[BSNO],[MBLNO],[CUSTOMERNAME],[ACCDATE],[OP],[SALE],[ETD],[REMARK],[RMBDR],[USDDR],[STLRMBDR],[STLUSDDR],[BALRMBDR],[BALUSDDR],[TTLBALDR],[CREATETIME],[MODIFIEDTIME]"
+ ",PLANDATE,RPTSTATUS,(select top 1 showname from [user] where GID=op_sale_rpt.CREATEUSER) as CREATEUSER,(select top 1 showname from [user] where GID=op_sale_rpt.MODIFIEDUSER) as MODIFIEDUSER"
+ " FROM op_sale_rpt ";
if (!string.IsNullOrEmpty(strCondition))
{
strSql += " where " + strCondition;
}
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
strSql += " order by " + sortstring;
}
else
{
strSql += " order by ETD desc";
}
return strSql.ToString();
}
static public MsOpSaleRpt GetData(string condition)
{
String strSql = "SELECT [GID],[BSNO],[MBLNO],[CUSTOMERNAME],[ACCDATE],[OP],[SALE],[ETD],[REMARK],[RMBDR],[USDDR],[STLRMBDR],[STLUSDDR],[BALRMBDR],[BALUSDDR],[TTLBALDR],[CREATETIME],[MODIFIEDTIME]"
+ ",PLANDATE,RPTSTATUS,(select top 1 showname from [user] where GID=op_sale_rpt.CREATEUSER) as CREATEUSER,(select top 1 showname from [user] where GID=op_sale_rpt.MODIFIEDUSER) as MODIFIEDUSER"
+ " FROM op_sale_rpt ";
if (!string.IsNullOrEmpty(condition))
{
strSql += " where " + condition;
}
var list=SetData(strSql);
if (list.Count > 0)
{
return list[0];
}
return new MsOpSaleRpt();
}
private static List<MsOpSaleRpt> SetData(String strSql)
{
var headList = new List<MsOpSaleRpt>();
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
MsOpSaleRpt data = new MsOpSaleRpt();
#region Set DB data to Object
data.GID = Convert.ToString(reader["GID"]);
data.BSNO = Convert.ToString(reader["BSNO"]);
data.CUSTOMERNAME = Convert.ToString(reader["CUSTOMERNAME"]);
data.MBLNO = Convert.ToString(reader["MBLNO"]);
if (reader["ETD"] != DBNull.Value)
data.ETD = Convert.ToDateTime(reader["ETD"]).ToString("yyyy-MM-dd");
if (reader["PLANDATE"] != DBNull.Value)
data.PLANDATE = Convert.ToDateTime(reader["PLANDATE"]).ToString("yyyy-MM-dd");
data.RPTSTATUS = Convert.ToString(reader["RPTSTATUS"]);
data.OP = Convert.ToString(reader["OP"]);
data.ACCDATE = Convert.ToString(reader["ACCDATE"]);
data.SALE = Convert.ToString(reader["SALE"]);
data.REMARK = Convert.ToString(reader["REMARK"]);
if (reader["RMBDR"] != DBNull.Value)
data.RMBDR = Convert.ToDecimal(reader["RMBDR"]);
if (reader["USDDR"] != DBNull.Value)
data.USDDR = Convert.ToDecimal(reader["USDDR"]);
if (reader["STLRMBDR"] != DBNull.Value)
data.STLRMBDR = Convert.ToDecimal(reader["STLRMBDR"]);
if (reader["STLUSDDR"] != DBNull.Value)
data.STLUSDDR = Convert.ToDecimal(reader["STLUSDDR"]);
if (reader["BALRMBDR"] != DBNull.Value)
data.BALRMBDR = Convert.ToDecimal(reader["BALRMBDR"]);
if (reader["BALUSDDR"] != DBNull.Value)
data.BALUSDDR = Convert.ToDecimal(reader["BALUSDDR"]);
if (reader["TTLBALDR"] != DBNull.Value)
data.TTLBALDR = Convert.ToDecimal(reader["TTLBALDR"]);
data.CREATEUSER = Convert.ToString(reader["CREATEUSER"]);
if (reader["CREATETIME"] != DBNull.Value)
data.CREATETIME = Convert.ToDateTime(reader["CREATETIME"]);
data.MODIFIEDUSER = Convert.ToString(reader["MODIFIEDUSER"]);
if (reader["MODIFIEDTIME"] != DBNull.Value)
data.MODIFIEDTIME = Convert.ToDateTime(reader["MODIFIEDTIME"]);
#endregion
headList.Add(data);
}
reader.Close();
}
return headList;
}
#endregion
static public List<MsOpSaleRpt> GetNewDataList()
{
String strSql = "SELECT *,(select top 1 PLANDATE from op_sale_rpt where BSNO=v_noday_fee.BSNO ORDER BY CREATETIME DESC) PLANDATE FROM v_noday_fee WHERE DATEDIFF([day],STLDATE,GETDATE())>0 ";
return SetNewData(strSql);
}
private static List<MsOpSaleRpt> SetNewData(String strSql)
{
var headList = new List<MsOpSaleRpt>();
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
MsOpSaleRpt data = new MsOpSaleRpt();
#region Set DB data to Object
data.BSNO = Convert.ToString(reader["BSNO"]);
data.CUSTOMERNAME = Convert.ToString(reader["CUSTOMERNAME"]);
data.MBLNO = Convert.ToString(reader["MBLNO"]);
if (reader["ETD"] != DBNull.Value)
data.ETD = Convert.ToDateTime(reader["ETD"]).ToString("yyyy-MM-dd");
if (reader["PLANDATE"] != DBNull.Value)
data.PLANDATE = Convert.ToDateTime(reader["PLANDATE"]).ToString("yyyy-MM-dd");
data.OP = Convert.ToString(reader["OP"]);
data.ACCDATE = Convert.ToString(reader["ACCDATE"]);
data.SALE = Convert.ToString(reader["SALE"]);
if (reader["RMBDR"] != DBNull.Value)
data.RMBDR = Convert.ToDecimal(reader["RMBDR"]);
if (reader["USDDR"] != DBNull.Value)
data.USDDR = Convert.ToDecimal(reader["USDDR"]);
if (reader["STLRMBDR"] != DBNull.Value)
data.STLRMBDR = Convert.ToDecimal(reader["STLRMBDR"]);
if (reader["STLUSDDR"] != DBNull.Value)
data.STLUSDDR = Convert.ToDecimal(reader["STLUSDDR"]);
if (reader["BALRMBDR"] != DBNull.Value)
data.BALRMBDR = Convert.ToDecimal(reader["BALRMBDR"]);
if (reader["BALUSDDR"] != DBNull.Value)
data.BALUSDDR = Convert.ToDecimal(reader["BALUSDDR"]);
if (reader["TTLBALDR"] != DBNull.Value)
data.TTLBALDR = Convert.ToDecimal(reader["TTLBALDR"]);
#endregion
headList.Add(data);
}
reader.Close();
}
return headList;
}
public static DBResult NewData(string userid)
{
var result = new DBResult();
var headList = GetNewDataList();
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
{
conn.Open();
var tran = conn.BeginTransaction();
try
{
var cmdInsert =
db.GetSqlStringCommand(
@"insert into op_sale_rpt ([GID],[BSNO],[MBLNO],[CUSTOMERNAME],[ACCDATE],[OP],[SALE],[ETD],[RMBDR],[USDDR],[STLRMBDR],[STLUSDDR]
,[BALRMBDR],[BALUSDDR],[TTLBALDR],[CREATEUSER],[CREATETIME],[PLANDATE],[RPTSTATUS])
values (NEWID(),@BSNO,@MBLNO,@CUSTOMERNAME,@ACCDATE,@OP,@SALE,@ETD,@RMBDR,@USDDR,@STLRMBDR,@STLUSDDR
,@BALRMBDR,@BALUSDDR,@TTLBALDR,@CREATEUSER,GETDATE(),@PLANDATE,'') ");
if (headList!=null&& headList.Count != 0)
{
foreach (var enumValue in headList) {
cmdInsert.Parameters.Clear();
db.AddInParameter(cmdInsert, "@BSNO", DbType.String, enumValue.BSNO);
db.AddInParameter(cmdInsert, "@MBLNO", DbType.String, enumValue.MBLNO);
db.AddInParameter(cmdInsert, "@CUSTOMERNAME", DbType.String, enumValue.CUSTOMERNAME);
db.AddInParameter(cmdInsert, "@ACCDATE", DbType.String, enumValue.ACCDATE);
db.AddInParameter(cmdInsert, "@OP", DbType.String, enumValue.OP);
db.AddInParameter(cmdInsert, "@SALE", DbType.String, enumValue.SALE);
db.AddInParameter(cmdInsert, "@ETD", DbType.String, enumValue.ETD);
db.AddInParameter(cmdInsert, "@RMBDR", DbType.Decimal, enumValue.RMBDR);
db.AddInParameter(cmdInsert, "@USDDR", DbType.Decimal, enumValue.USDDR);
db.AddInParameter(cmdInsert, "@STLRMBDR", DbType.Decimal, enumValue.STLRMBDR);
db.AddInParameter(cmdInsert, "@STLUSDDR", DbType.Decimal, enumValue.STLUSDDR);
db.AddInParameter(cmdInsert, "@BALRMBDR", DbType.Decimal, enumValue.BALRMBDR);
db.AddInParameter(cmdInsert, "@BALUSDDR", DbType.Decimal, enumValue.BALUSDDR);
db.AddInParameter(cmdInsert, "@TTLBALDR", DbType.Decimal, enumValue.TTLBALDR);
db.AddInParameter(cmdInsert, "@CREATEUSER", DbType.String, userid);
if (enumValue.PLANDATE != null&& enumValue.PLANDATE!="")
db.AddInParameter(cmdInsert, "@PLANDATE", DbType.String, enumValue.PLANDATE);
else
db.AddInParameter(cmdInsert, "@PLANDATE", DbType.String, null);
db.ExecuteNonQuery(cmdInsert, tran);
}
}
tran.Commit();
result.Success = true;
result.Message = "保存成功";
return result;
}
catch (Exception e)
{
tran.Rollback();
result.Success = false;
result.Message = "保存出现错误,请重试或联系系统管理员"+e.Message;
return result;
}
}
}
public static DBResult SubmitAudit(string userid)
{
var result = new DBResult();
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
{
conn.Open();
var tran = conn.BeginTransaction();
try
{
var cmdUpdate =
db.GetSqlStringCommand(
@"update op_sale_rpt set RPTSTATUS='发布',MODIFIEDTIME=GETDATE(),MODIFIEDUSER='" + userid + "' where RPTSTATUS='未发布' ");
cmdUpdate.Parameters.Clear();
db.ExecuteNonQuery(cmdUpdate, tran);
tran.Commit();
}
catch (Exception)
{
tran.Rollback();
result.Success = false;
result.Message = "保存出现错误,请重试或联系系统管理员";
return result;
}
}
result.Success = true;
result.Message = "保存成功" + result.Message;
return result;
}
public static DBResult SaveDetail(List<MsOpSaleRpt> bodyList,string userid, string companyid)
{
var result = new DBResult();
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
{
conn.Open();
var tran = conn.BeginTransaction();
try
{
var cmdUpdate =
db.GetSqlStringCommand(
@"update op_sale_rpt set PLANDATE=@PLANDATE,REMARK=@REMARK,MODIFIEDTIME=GETDATE(),MODIFIEDUSER='"+ userid + "' where GID=@GID ");
if (bodyList != null)
{
foreach (var enumValue in bodyList)
{
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@GID", DbType.String, enumValue.GID);
if (enumValue.PLANDATE=="")
db.AddInParameter(cmdUpdate, "@PLANDATE", DbType.String,null);
else
db.AddInParameter(cmdUpdate, "@PLANDATE", DbType.String, enumValue.PLANDATE);
db.AddInParameter(cmdUpdate, "@REMARK", DbType.String, enumValue.REMARK);
db.ExecuteNonQuery(cmdUpdate, tran);
}
}
tran.Commit();
}
catch (Exception e)
{
tran.Rollback();
result.Success = false;
result.Message = "保存出现错误,请重试或联系系统管理员"+e.Message;
return result;
}
}
result.Success = true;
result.Message = "保存成功" + result.Message;
return result;
}
#region 判断编码是否有重复
static public int GetRdCount(string strCondition)
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(" Count(BSNO) AS CT ");
strSql.Append(" from op_seae_pre ");
if (strCondition.Trim() != String.Empty)
{
strSql.Append(" where " + strCondition);
}
var ct=0;
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
ct = Convert.ToInt16(reader["CT"]);
}
reader.Close();
}
return ct;
}
#endregion
#region Rang权限范围
public static string GetRangDAStr(string tb, string userid, string username, string companyid)
{
string str = "";
var strSql = new StringBuilder();
strSql.Append("SELECT");
strSql.Append(" VISIBLERANGE,OPERATERANGE,AUTHORITYID");
strSql.Append(" from VW_User_Authority");
strSql.Append(" where [NAME]='modOpOtherList' and USERID='" + userid + "' and ISDELETE=0");
string visiblerange = "4";
string operaterange = "4";
string AUTHORITYID = "";
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
visiblerange = Convert.ToString(reader["VISIBLERANGE"]);
operaterange = Convert.ToString(reader["OPERATERANGE"]);
AUTHORITYID = Convert.ToString(reader["AUTHORITYID"]);
break;
}
reader.Close();
}
if (visiblerange == "4")
{
str = " (OP='" + username + "' OR CREATEUSER='" + userid + "' OR SALE='" + username + "' OR CUSTSERVICE='" + username + "')";
}
else if (visiblerange == "3")
{
str = " (OP='" + username + "' OR CREATEUSER='" + userid + "' OR SALE='" + username + "' OR CUSTSERVICE='" + username + "')";
}
else if (visiblerange == "2")
{
var rangeDa = new RangeDA();
var deptname = rangeDa.GetDEPTNAME(userid);
str = " (OP in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + companyid + "') and GID in (select userid from user_baseinfo where DEPTNAME='" + deptname + "'))"
+ " OR CREATEUSER in (select GID from [user] where GID in (select USERID from user_company where COMPANYID='" + companyid + "') and GID in (select userid from user_baseinfo where DEPTNAME='" + deptname + "')))";
}
else if (visiblerange == "1")
{
str = " (UPPER(op_other.Corpid)='" + companyid + "' or op_other.SALECORPID='" + companyid + "') ";
}
else if (visiblerange == "5")
{
if (tb == "index")
{
var userstr = new StringBuilder();
userstr.Append(" select COMPANYID from user_authority_range_company where userid='" + userid + "' and AUTHORITYID='" + AUTHORITYID + "' and VISIBLERANGE=1");
Database userdb = DatabaseFactory.CreateDatabase();
using (IDataReader reader = userdb.ExecuteReader(CommandType.Text, userstr.ToString()))
{
str = "";
while (reader.Read())
{
if (str == "")
{
str = " (op_other.Corpid='" + Convert.ToString(reader["COMPANYID"]) + "' or op_other.SALECORPID='" + Convert.ToString(reader["COMPANYID"]) + "' ";
}
else
{
str = str + " or op_other.Corpid='" + Convert.ToString(reader["COMPANYID"]) + "' or op_other.SALECORPID='" + Convert.ToString(reader["COMPANYID"]) + "'";
};
}
str = str + ")";
reader.Close();
}
}
else
{
str = " (UPPER(op_other.Corpid)='" + companyid + "') ";
}
}
else if (visiblerange == "6")
{
if (tb == "index")
{
var opstr = "";
var userstr = new StringBuilder();
userstr.Append(" select OPID,(select SHOWNAME from [user] where GID=user_authority_range_op.OPID) SHOWNAME from user_authority_range_op where userid='" + userid + "' and AUTHORITYID='" + AUTHORITYID + "' and VISIBLERANGE=1");
Database userdb = DatabaseFactory.CreateDatabase();
using (IDataReader reader = userdb.ExecuteReader(CommandType.Text, userstr.ToString()))
{
while (reader.Read())
{
if (opstr == "")
{
opstr = " ('" + Convert.ToString(reader["SHOWNAME"]) + "'";
}
else
{
opstr = opstr + ",'" + Convert.ToString(reader["SHOWNAME"]) + "'";
};
}
if (opstr != "") opstr = opstr + ")";
reader.Close();
}
if (opstr == "") opstr = "('" + username + "')";
str = " (OP in " + opstr + " or CREATEUSER in " + opstr + " or CUSTSERVICE IN " + opstr + " or SALE IN " + opstr + " )";
}
else
{
str = " (UPPER(op_other.Corpid)='" + companyid + "') ";
}
}
else if (visiblerange == "0")
{
str = " 1=1 ";
}
return str;
}
#endregion
}
}

@ -39430,7 +39430,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
}
#endregion
}
icount = icount + 1;
// icount = icount + 1;
r.WriteLine("UNT+" + icount.ToString() + "+" + bsno + "'");
r.WriteLine("UNZ+" + headData.Count.ToString() + "+" + bsno + "'");
r.Close();

@ -0,0 +1,136 @@
using System;
using HcUtility.Core;
using Newtonsoft.Json;
namespace DSWeb.MvcShipping.Models.MsOpSaleRpt
{
[JsonObject]
public class MsOpSaleRpt : ModelObjectBillHead
{
#region 属性
private string _GID = "topseaepre" + Guid.NewGuid().ToString();//业务编号
/// <summary>
/// 业务唯一编号
/// </summary>
[ModelDB(MDBType = ModelDBOprationType.All, IsPrimary = true)]
public string GID
{
get { return _GID; }
set { _GID = value; }
}
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string BSNO { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string MBLNO{ get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string CUSTOMERNAME { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string ACCDATE { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string OP { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string SALE { get; set; }
[ModelDB]
public string PLANDATE { get; set; }
[ModelDB]
public string RPTSTATUS { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string ETD { get; set; }
[ModelDB]
public string REMARK { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public decimal RMBDR { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public decimal USDDR { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public decimal STLRMBDR { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public decimal STLUSDDR { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public decimal BALRMBDR { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public decimal BALUSDDR { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public decimal TTLBALDR { get; set; }
private string _createuser = "";
/// <summary>
/// 创建人
/// </summary>
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string CREATEUSER
{
get { return _createuser; }
set { _createuser = value; }
}
public string CREATEUSERREF { get; set; }
private DateTime _createtime = DateTime.Now;
/// <summary>
/// 创建时间
/// </summary>
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public DateTime CREATETIME
{
get { return _createtime; }
set { _createtime = value; }
}
private string _modifieduser = "";
/// <summary>
/// 最后一次操作人
/// </summary>
[ModelDB]
public string MODIFIEDUSER
{
get { return _modifieduser; }
set { _modifieduser = value; }
}
public string MODIFIEDUSERREF { get; set; }
private DateTime _modifiedtime = DateTime.Now;
/// <summary>
/// 最后一次操作时间
/// </summary>
[ModelDB]
public DateTime MODIFIEDTIME
{
get { return _modifiedtime; }
set { _modifiedtime = value; }
}
#endregion
public MsOpSaleRpt()
{
TableName = "op_sale_rpt";
}
override public string GetBillNoFieldName()
{
return "BSNO";
}
}
}

@ -0,0 +1,33 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/MvcShipping/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
var USERID;
function getSessgion1() {
USERID = '<%= Session["USERID"] %>';
}
getSessgion1();
var usercode;
function getSessgion2() {
usercode = '<%= Session["CODENAME"] %>';
}
getSessgion2();
var SHOWNAME;
function getSessgion3() {
SHOWNAME = '<%= Session["SHOWNAME"] %>';
}
getSessgion3();
</script>
<script type="text/javascript" src="../../../../Views/../TruckMng/Scripts/ExtjsEx/exportexcel/export-all.js"></script>
<script type="text/javascript" src="../../../../Views/../TruckMng/Scripts/ExtjsEx/gridToExcel.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/MsOpSaleRpt/MsOpSaleRptModel.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/MsOpSaleRpt/MsOpSaleRptIndex.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/MsOpSaleRpt/Index.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/Comm/DsQuery.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
<div id="viewport" ></div>
</asp:Content>

@ -0,0 +1,31 @@
Ext.BLANK_IMAGE_URL = '../../TruckMng/Content/Images/s.gif';
var panelIndex = null;
Ext.onReady(function () {
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
panelIndex = new window.Shipping.MsOpSaleRptIndex({
layout: 'border'
});
var view = new Ext.Viewport({
layout: 'border',
renderTo: 'viewport',
border: false,
items: [{
region: 'center',
layout: 'fit',
items: [panelIndex]
}]
});
});
function OprationSwap() {
return panelIndex.OprationSwap();
}
function AddNewRecord(record) {
panelIndex.AddNewRecord(record);
}

@ -0,0 +1,30 @@
Ext.define('MsOpSaleRpt', {
extend: 'Ext.data.Model',
idProperty: 'GID',
fields: [
{ name: 'GID', type: 'string' }, // 业务编号
{ name: 'BSNO', type: 'string' }, // 业务编号
{ name: 'MBLNO', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' }, // 委托单位
{ name: 'ACCDATE', type: 'string' }, // 会计期间
{ name: 'ETD', type: 'string' },
{ name: 'SALE', type: 'string' }, // 揽货人
{ name: 'PLANDATE', type: 'string' }, //
{ name: 'RPTSTATUS', type: 'string' }, //
{ name: 'REMARK', type: 'string' },
{ name: 'RMBDR', type: 'number' }, //
{ name: 'RMBCR', type: 'number' }, //
{ name: 'STLRMBDR', type: 'number' }, //
{ name: 'STLRMBCR', type: 'number' }, //
{ name: 'BALRMBDR', type: 'number' }, //
{ name: 'BALRMBCR', type: 'number' }, //
{ name: 'TTLBALDR', type: 'number' }, //
{ name: 'CREATEUSER', type: 'string' }, // 创建人
{ name: 'CREATEUSERREF', type: 'string' }, // 创建人
{ name: 'CREATETIME', type: 'string' }, // 创建时间, dateFormat: 'Y-m-d H:i:s'
{ name: 'MODIFIEDUSER', type: 'string' }, // 最后一次操作人
{name: 'MODIFIEDTIME', type: 'string' }
]
});

@ -3001,14 +3001,24 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, {
text: '运踪订阅', //"退舱",
menu: [
{
text: '确认订阅', //"确认退舱",
text: '确认订阅(港前+港后)', //"确认退舱",
handler: function (menu, event) {
_this.onBookShippingOrderClick('1');
_this.onBookShippingOrderClick('1','ALL');
}
}, {
text: '确认订阅(仅港前)', //"确认退舱",
handler: function (menu, event) {
_this.onBookShippingOrderClick('1','BEFORE');
}
}, {
text: '确认订阅(仅港后)', //"确认退舱",
handler: function (menu, event) {
_this.onBookShippingOrderClick('1', 'AFTER');
}
}, {
text: '取消订阅', //"取消退舱",
handler: function (menu, event) {
_this.onBookShippingOrderClick('0');
_this.onBookShippingOrderClick('0','ALL');
}
}]
}
@ -16519,7 +16529,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, {
this.PluginCover.loadCoverWithBSNO(bsno);
},
onBookShippingOrderClick: function (type) {
onBookShippingOrderClick: function (type,porttype) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要退舱的业务
@ -16570,7 +16580,8 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, {
url: '/MvcShipping/MsOpSeae/BookShippingOrderList',
params: {
data: jsonbodyAddDatas,
type: type
type: type,
portype: porttype
},
callback: function (options, success, response) {
if (success) {

@ -1384,7 +1384,7 @@ Ext.extend(Shipping.MsRptLhRptListIndex, Ext.Panel, {
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 120000,
timeout: 1200000,
url: '/MvcShipping/MsRptLhRptList/LhRptListBsData',
reader: {
id: '',
@ -1608,6 +1608,8 @@ Ext.extend(Shipping.MsRptLhRptListIndex, Ext.Panel, {
sortable: true,
dataIndex: 'HKDAYS',
text: '实际收款结算天数',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
@ -1615,6 +1617,8 @@ Ext.extend(Shipping.MsRptLhRptListIndex, Ext.Panel, {
sortable: true,
dataIndex: 'HKDAYSCR',
text: '实际付款结算天数',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
@ -1622,6 +1626,8 @@ Ext.extend(Shipping.MsRptLhRptListIndex, Ext.Panel, {
sortable: true,
dataIndex: 'ZYDAYS',
text: '实际资金占用天数',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120

@ -380,7 +380,7 @@ namespace DSWeb.Areas.TruckMng.Controllers
}
}
if (string.IsNullOrEmpty(headData.BillNo))
if (string.IsNullOrEmpty(headData.BillNo)|| headData.BillNo=="*")
{
var billnoset = MsSysBillNoSetDAL.GetData("OPLBNAME='陆运'", Convert.ToString(Session["COMPANYID"]));
billnoset.BILLTYPE = "0111";

@ -2495,6 +2495,9 @@
<Content Include="Areas\MvcShipping\Viewsjs\MsOpLetter\TruckLSEdit2.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpLetter\Zi_en-us.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpLetter\Zi_zh-cn.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpSaleRpt\Index.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpSaleRpt\MsOpSaleRptIndex.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpSaleRpt\MsOpSaleRptModel.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpPrice\SellEdit.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpPrice\HistryIndex.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpPrice\Edit.js" />
@ -3678,6 +3681,7 @@
<Content Include="Areas\MvcShipping\Views\MsInfoClient\BlackIndex.aspx" />
<Content Include="Areas\MvcShipping\Views\MsOpLetter\HistryTruckIndex.aspx" />
<Content Include="Areas\MvcShipping\Views\MsOpLetter\TruckLSEdit2.aspx" />
<Content Include="Areas\MvcShipping\Views\MsOpSaleRpt\Index.aspx" />
<Content Include="Areas\MvcShipping\Views\MsOpPrice\SellEdit.aspx" />
<Content Include="Areas\MvcShipping\Views\MsOpPrice\HistryIndex.aspx" />
<Content Include="Areas\MvcShipping\Views\MsOpPrice\Edit.aspx" />
@ -8413,6 +8417,7 @@
<Compile Include="Areas\MvcShipping\Controllers\BookingConfirmController.cs" />
<Compile Include="Areas\MvcShipping\Controllers\DJYORDERController.cs" />
<Compile Include="Areas\MvcShipping\Controllers\MsOpPriceController.cs" />
<Compile Include="Areas\MvcShipping\Controllers\MsOpSaleRptController.cs" />
<Compile Include="Areas\MvcShipping\Controllers\OP_SERVICEBILLController.cs" />
<Compile Include="Areas\MvcShipping\Controllers\MsChFeeAgentDcController.cs" />
<Compile Include="Areas\MvcShipping\Controllers\BillCheckOutController.cs" />
@ -8461,6 +8466,7 @@
<Compile Include="Areas\MvcShipping\DAL\MsOpPrice\MsOpPriceDAL.cs" />
<Compile Include="Areas\MvcShipping\DAL\MsOpPlan\MsOpPlanDAL.cs" />
<Compile Include="Areas\MvcShipping\DAL\MsOpSeaeModule\MsOpSeaeModuleDAL.cs" />
<Compile Include="Areas\MvcShipping\DAL\MsOpSaleRpt\MsOpSaleRptDAL.cs" />
<Compile Include="Areas\MvcShipping\DAL\MsOpSeae\GetQingdaoPort.cs" />
<Compile Include="Areas\MvcShipping\DAL\MsOpSocCtn\MsOpSocCtnDAL.cs" />
<Compile Include="Areas\MvcShipping\DAL\MsOpSeaePre\MsOpSeaePreDAL.cs" />
@ -8521,6 +8527,7 @@
<Compile Include="Areas\MvcShipping\Models\MsOpPrice\MsOpPrice.cs" />
<Compile Include="Areas\MvcShipping\Models\MsOpPlan\MsOpPlan.cs" />
<Compile Include="Areas\MvcShipping\Models\MsOpSeaeModule\MsOpSeaeModule.cs" />
<Compile Include="Areas\MvcShipping\Models\MsOpSaleRpt\MsOpSaleRpt.cs" />
<Compile Include="Areas\MvcShipping\Models\MsOpSeae\MHEDI_MSC.cs" />
<Compile Include="Areas\MvcShipping\Models\MsOpSocCtn\MsOpSocCtn.cs" />
<Compile Include="Areas\MvcShipping\Models\MsOpSeaePre\MsOpSeaePre.cs" />

Loading…
Cancel
Save