JinHanShengHang
hanxuntao 3 months ago
parent 4ecffa761c
commit d54f92cdb1

@ -3337,6 +3337,12 @@ Ext.extend(Shipping.MsChInvoicehexiaoEdit, Ext.Panel, {
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: '必须填折算汇率!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
};
if (UsdExrate < 0) {
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: '折算汇率不能小于0!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var recs = DsStoreQueryBy(me.storeCurrExrate, 'CURR', bfcurr);
if (recs.getCount() > 0) {

@ -5106,6 +5106,11 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.surezesuanhuil, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
};
if (UsdExrate < 0) {
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: '折算汇率不能小于0!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var recs = DsStoreQueryBy(me.storeCurrExrate, 'CURR', bfcurr);
if (recs.getCount() > 0) {
// var dfdata = DFrecords.getAt(0).data;

@ -6042,6 +6042,11 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.surezesuanhuil, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
};
if (UsdExrate < 0) {
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: '折算汇率不能小于0!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var recs = DsStoreQueryBy(me.storeCurrExrate, 'CURR', bfcurr);
if (recs.getCount() > 0) {

@ -16196,6 +16196,12 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose22) };
}
if (MsOpSeaeYunZongBsList == null || MsOpSeaeYunZongBsList.Count == 0) {
var jsonRespose22 = new JsonResponse { Success = false, Message = "没有要订阅的运踪"};
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose22) };
}
var MsOpSeaeYunZong = new MsOpSeaeYunZongNew();

@ -0,0 +1,306 @@
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.EntityDA;
using DSWeb.SoftMng.Filter;
using Renci.SshNet.Common;
using DSWeb.MvcShipping.DAL.MsOpVgmSendDAL;
using DSWeb.MvcShipping.Models.MsOpVgmSend;
namespace DSWeb.MvcShipping.Controllers
{
[JsonRequestBehavior]
public class MsOpVgmSendController : 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 = MsOpVgmSendDAL.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 = MsOpVgmSendDAL.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)
{
MsOpVgmSend head = null;
if (handle == "edit")
{
head = MsOpVgmSendDAL.GetData(condition);
}
if (head == null)
{
head = new MsOpVgmSend();
// 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 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<MsOpVgmSend>(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 = "topseaevgm" + Guid.NewGuid().ToString().Replace("-","");
}
string rq = T_ALL_DA.GetStrSQL("rq", "select getdate() as rq");
//
if (opstatus == "add")
{
headData.DbOperationType = DbOperationType.DbotIns;
//
headData.SENDERUSER = Convert.ToString(Session["USERID"]);//创建人
headData.SENDTIME = DateTime.Parse(rq);//创建时间
headData.VGMSTATUS = "未发送";
}
else if (opstatus == "edit")
{
headData.DbOperationType = DbOperationType.DbotUpd;
headData.ModelUIStatus = "E";
}
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) };
}
}
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public ContentResult GetVgmCtnList(string condition, string sort)
{
var dataList = MsOpVgmSendDAL.GetVgmCtnList(condition, sort);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
return new ContentResult() { Content = json };
}
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='锁定',LOCKTIME=GETDATE(),LOCKUSER='" + Convert.ToString(Session["USERID"]).ToString() + "' 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);
}
}
result.Success = true;
result.Message = "更新成功!";
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
}

@ -12,6 +12,7 @@ using HcUtility.Core;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using DSWeb.MvcShipping.Models.CodeCtnEdi;
using com.sun.tools.@internal.xjc.reader.gbind;
using org.junit.rules;
namespace DSWeb.MvcShipping.DAL.MsOpSaleRptDAL
{
@ -20,8 +21,7 @@ namespace DSWeb.MvcShipping.DAL.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);
var rangstr = GetRangDAStr("index", userid, usercode, companyid);
if (!string.IsNullOrEmpty(rangstr))
{
if (!string.IsNullOrEmpty(strCondition))
@ -55,7 +55,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSaleRptDAL
static public string GetDataListStr(string strCondition, string userid, string usercode, string companyid, string sort = null)
{
var rangstr = "";
var rangstr = GetRangDAStr("index", userid, usercode, companyid);
if (!string.IsNullOrEmpty(rangstr))
{
@ -449,7 +449,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSaleRptDAL
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");
strSql.Append(" where [NAME]='modSaleRptList' and USERID='" + userid + "' and ISDELETE=0");
string visiblerange = "4";
string operaterange = "4";
@ -469,22 +469,21 @@ namespace DSWeb.MvcShipping.DAL.MsOpSaleRptDAL
}
if (visiblerange == "4")
{
str = " (OP='" + username + "' OR CREATEUSER='" + userid + "' OR SALE='" + username + "' OR CUSTSERVICE='" + username + "')";
str = " SALE='" + username + "'";
}
else if (visiblerange == "3")
{
str = " (OP='" + username + "' OR CREATEUSER='" + userid + "' OR SALE='" + username + "' OR CUSTSERVICE='" + username + "')";
str = " SALE='" + 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 + "')))";
str = " SALE 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 + "'))";
}
else if (visiblerange == "1")
{
str = " (UPPER(op_other.Corpid)='" + companyid + "' or op_other.SALECORPID='" + companyid + "') ";
str = " SALE in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + companyid + "') ";
}
else if (visiblerange == "5")
{
@ -500,11 +499,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpSaleRptDAL
{
if (str == "")
{
str = " (op_other.Corpid='" + Convert.ToString(reader["COMPANYID"]) + "' or op_other.SALECORPID='" + Convert.ToString(reader["COMPANYID"]) + "' ";
str = " (SALE in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + 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 + " or SALE in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + Convert.ToString(reader["COMPANYID"]) + "')";
};
}
str = str + ")";
@ -513,7 +512,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSaleRptDAL
}
else
{
str = " (UPPER(op_other.Corpid)='" + companyid + "') ";
str = " SALE in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + companyid + "') ";
}
}
@ -546,7 +545,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSaleRptDAL
reader.Close();
}
if (opstr == "") opstr = "('" + username + "')";
str = " (OP in " + opstr + " or CREATEUSER in " + opstr + " or CUSTSERVICE IN " + opstr + " or SALE IN " + opstr + " )";
str = " (OP in " + opstr + " )";
}
else

@ -0,0 +1,415 @@
using System;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;
using System.Text;
using DSWeb.MvcShipping.Models.MsOpVgmSend;
using Microsoft.Practices.EnterpriseLibrary.Data;
using DSWeb.EntityDA;
using DSWeb.Areas.CommMng.Models;
using HcUtility.Comm;
using DSWeb.MvcShipping.Models.MsOpPrice;
namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL
{
public class MsOpVgmSendDAL
{
#region Inquery DataList
static public List<MsOpVgmSend> 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 *,(select top 1 showname from [user] where GID=op_seae_vgm_send.SENDERUSER) as SENDERUSERREF FROM op_seae_vgm_send ";
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 = GetRangDAStr("index", userid, usercode, companyid);
if (!string.IsNullOrEmpty(rangstr))
{
if (!string.IsNullOrEmpty(strCondition))
{
strCondition = strCondition + " and " + rangstr;
}
else
{
strCondition = rangstr;
}
}
//
String strSql = "SELECT *,(select top 1 showname from [user] where GID=op_seae_vgm_send.SENDERUSER) as SENDERUSERREF FROM op_seae_vgm_send ";
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 MsOpVgmSend GetData(string condition)
{
String strSql = "SELECT *,(select top 1 showname from [user] where GID=op_seae_vgm_send.SENDERUSER) as SENDERUSERREF FROM op_seae_vgm_send ";
if (!string.IsNullOrEmpty(condition))
{
strSql += " where " + condition;
}
var list=SetData(strSql);
if (list.Count > 0)
{
return list[0];
}
return new MsOpVgmSend();
}
private static List<MsOpVgmSend> SetData(String strSql)
{
var headList = new List<MsOpVgmSend>();
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
MsOpVgmSend data = new MsOpVgmSend();
#region Set DB data to Object
data.GID = Convert.ToString(reader["GID"]);
data.BSNO = Convert.ToString(reader["BSNO"]);
data.VGMSTATUS = Convert.ToString(reader["VGMSTATUS"]);
data.MBLNO = Convert.ToString(reader["MBLNO"]);
data.CUSTNO = Convert.ToString(reader["CUSTNO"]);
data.CARRIER = Convert.ToString(reader["CARRIER"]);
data.LOADPORT = Convert.ToString(reader["LOADPORT"]);
data.MATOU = Convert.ToString(reader["MATOU"]);
data.VESSEL = Convert.ToString(reader["VESSEL"]);
data.VOYNO = Convert.ToString(reader["VOYNO"]);
data.VGM_TIME = Convert.ToString(reader["VGM_TIME"]);
data.SENDERUSER = Convert.ToString(reader["SENDERUSER"]);
data.SENDERUSERREF = Convert.ToString(reader["SENDERUSERREF"]);
if (reader["CTNNUM"] != DBNull.Value)
data.CTNNUM = Convert.ToInt16(reader["CTNNUM"]);
if (reader["ISCARRIER"] != DBNull.Value)
data.ISCARRIER = Convert.ToBoolean(reader["ISCARRIER"]);
if (reader["ISYGT"] != DBNull.Value)
data.ISYGT = Convert.ToBoolean(reader["ISYGT"]);
if (reader["SENDTIME"] != DBNull.Value)
data.SENDTIME = Convert.ToDateTime(reader["SENDTIME"]);
#endregion
headList.Add(data);
}
reader.Close();
}
return headList;
}
#endregion
#region 明细表
static public List<MsOpVgmCtn> GetVgmCtnList(string strCondition, string sort = null)
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append("*");
strSql.Append(" from op_seae_vgm_ctn ");
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" WHERE " + strCondition);
}
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
strSql.Append(" order by " + sortstring);
}
else
{
strSql.Append(" order by CTNALL ");
}
return SetVgmCtnData(strSql);
}
private static List<MsOpVgmCtn> SetVgmCtnData(StringBuilder strSql)
{
var headList = new List<MsOpVgmCtn>();
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
MsOpVgmCtn data = new MsOpVgmCtn();
#region Set DB data to Object
data.CTN_ID = Convert.ToString(reader["CTN_ID"]);
data.BSNO = Convert.ToString(reader["BSNO"]);
data.CTNALL = Convert.ToString(reader["CTNALL"]);
data.SENDGID = Convert.ToString(reader["SENDGID"]);
data.CNTRNO = Convert.ToString(reader["CNTRNO"]);
data.SEALNO = Convert.ToString(reader["SEALNO"]);
data.WEIGHTYPE = Convert.ToString(reader["WEIGHTYPE"]);
data.YARD = Convert.ToString(reader["YARD"]);
data.WEIGHDATE = Convert.ToString(reader["WEIGHDATE"]);
if (reader["KGS"] != DBNull.Value)
data.KGS = Convert.ToDecimal(reader["KGS"]);//
if (reader["TAREWEIGHT"] != DBNull.Value)
data.TAREWEIGHT = Convert.ToDecimal(reader["TAREWEIGHT"]);//
if (reader["VGMKGS"] != DBNull.Value)
data.VGMKGS = Convert.ToDecimal(reader["VGMKGS"]);//
#endregion
headList.Add(data);
}
reader.Close();
}
return headList;
}
public static DBResult SaveDetail(string LE_ID, List<MsOpVgmCtn> bodyList)
{
var result = new DBResult();
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
{
conn.Open();
var tran = conn.BeginTransaction();
try
{
var cmddelete = db.GetSqlStringCommand(@"delete from op_seae_vgm_ctn where SENDGID='" + LE_ID + "'");
db.ExecuteNonQuery(cmddelete, tran);
var cntr = "";
if (bodyList != null)
{
foreach (var enumValue in bodyList)
{
var cmdInsert = db.GetSqlStringCommand(@"insert into op_seae_vgm_ctn ([CTN_ID],[BSNO],[SENDGID],[CTNALL],[CNTRNO],[SEALNO],[KGS],[TAREWEIGHT],[WEIGHTYPE],[VGMKGS],[YARD],[WEIGHDATE])
values (NEWID(),'" + enumValue.BSNO + "','" + LE_ID + "','" + enumValue.CTNALL + "','" + enumValue.CNTRNO + "','" + enumValue.SEALNO + "'," + enumValue.KGS + "," + enumValue.TAREWEIGHT + ",'" + enumValue.WEIGHTYPE + "'," + enumValue.VGMKGS + ",'" + enumValue.YARD + "','" + enumValue.WEIGHDATE + "')");
db.ExecuteNonQuery(cmdInsert, tran);
}
}
tran.Commit();
}
catch (Exception)
{
tran.Rollback();
result.Success = false;
result.Message = "保存出现错误,请重试或联系系统管理员";
return result;
}
}
result.Success = true;
result.Message = "保存成功" + result.Message;
return result;
}
#endregion
#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]='modSaleRptList' 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 = " SALE='" + username + "'";
}
else if (visiblerange == "3")
{
str = " SALE='" + username + "'";
}
else if (visiblerange == "2")
{
var rangeDa = new RangeDA();
var deptname = rangeDa.GetDEPTNAME(userid);
str = " SALE 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 + "'))";
}
else if (visiblerange == "1")
{
str = " SALE in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + 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 = " (SALE in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + Convert.ToString(reader["COMPANYID"]) + "') ";
}
else
{
str = str + " or SALE in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + Convert.ToString(reader["COMPANYID"]) + "')";
};
}
str = str + ")";
reader.Close();
}
}
else
{
str = " SALE in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + 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 + " )";
}
else
{
str = " (UPPER(op_other.Corpid)='" + companyid + "') ";
}
}
else if (visiblerange == "0")
{
str = " 1=1 ";
}
return str;
}
#endregion
}
}

@ -0,0 +1,158 @@
using System;
using HcUtility.Core;
using Newtonsoft.Json;
namespace DSWeb.MvcShipping.Models.MsOpVgmSend
{
[JsonObject]
public class MsOpVgmSend : ModelObjectBillHead
{
#region 属性
private string _GID = "topseaevgm" + 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 CUSTNO { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string CARRIER { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string LOADPORT { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string MATOU { get; set; }
[ModelDB]
public string VGMSTATUS { get; set; }
[ModelDB]
public bool ISCARRIER { get; set; }
[ModelDB]
public bool ISYGT { get; set; }
[ModelDB]
public string SENDTYPE { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string VESSEL { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string VOYNO { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string VGM_TIME { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public int CTNNUM { get; set; }
private string _createuser = "";
/// <summary>
/// 创建人
/// </summary>
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string SENDERUSER
{
get { return _createuser; }
set { _createuser = value; }
}
public string SENDERUSERREF { get; set; }
private DateTime _createtime = DateTime.Now;
/// <summary>
/// 创建时间
/// </summary>
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public DateTime SENDTIME
{
get { return _createtime; }
set { _createtime = value; }
}
#endregion
public MsOpVgmSend()
{
TableName = "op_seae_vgm_send";
}
override public string GetBillNoFieldName()
{
return "BSNO";
}
}
[JsonObject]
public class MsOpVgmCtn : ModelObjectBillHead
{
#region 属性
private string _GID = "topseaevgm" + Guid.NewGuid().ToString();//业务编号
/// <summary>
/// 业务唯一编号
/// </summary>
[ModelDB(MDBType = ModelDBOprationType.All, IsPrimary = true)]
public string CTN_ID
{
get { return _GID; }
set { _GID = value; }
}
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string BSNO { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string SENDGID { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string CTNALL { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string CNTRNO { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string SEALNO { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public decimal KGS { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public decimal TAREWEIGHT { get; set; }
[ModelDB]
public string WEIGHTYPE { get; set; }
[ModelDB]
public decimal VGMKGS { get; set; }
[ModelDB]
public string YARD { get; set; }
[ModelDB]
public string WEIGHDATE { get; set; }
#endregion
public MsOpVgmCtn()
{
TableName = "op_seae_vgm_ctn";
}
override public string GetBillNoFieldName()
{
return "BSNO";
}
}
}

@ -0,0 +1,37 @@
<%@ 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 GID;
function getSessgion1() {
GID = '<%= 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="../../../../Areas/MvcShipping/Viewsjs/Comm/TimePickerField.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/Comm/DateTimePicker.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/Comm/DateTimeField.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/Comm/DateTimeMenu.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/Comm/MonthField.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendModel.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendEdit.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/MsOpVgmSend/Edit.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
<div id="viewport" ></div>
</asp:Content>

@ -0,0 +1,35 @@
<%@ 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="../../../../Areas/MvcShipping/Viewsjs/MsCompanys/MsCompanysModel.js"></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/MsOpPrice/MsOpPriceModel.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/MsOpPrice/MsOpPriceIndex.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/MsOpPrice/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>

@ -1478,6 +1478,7 @@ Ext.extend(Shipping.MsOpRailwayIndex, Ext.Panel, {
var sql = this.getCondition();
this.sqlcontext = sql;
this.PageSize = this.Pagenum.getValue();
this.storeList.currentPage = 1;
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",
@ -1490,6 +1491,7 @@ Ext.extend(Shipping.MsOpRailwayIndex, Ext.Panel, {
//var girdcolums = this.gridList.getColumnMode();
var sql = this.sqlcontext;
this.PageSize = this.Pagenum.getValue();
this.storeList.currentPage = 1;
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",

@ -1245,6 +1245,8 @@ Ext.extend(Shipping.MsOpRailwayIndex, Ext.Panel, {
var sql = this.getCondition();
this.sqlcontext = sql;
this.PageSize = this.Pagenum.getValue();
this.storeList.currentPage = 1;
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",

@ -24,7 +24,8 @@ Ext.extend(Shipping.MsOpSaleRptIndex, Ext.Panel, {
this.REMARK ='';
this.OTREMARK = '';
this.BsNo = '';
this.modOpSaleRptAdd =0;
this.modOpSaleRptAdd = 0;
this.modOpSaleRptReadOnly = 0;
this.storePLList = Ext.create('Ext.data.Store', {
model: 'MsOpSaleRpt'
@ -598,7 +599,8 @@ Ext.extend(Shipping.MsOpSaleRptIndex, Ext.Panel, {
btnEdit.setVisible(false);
var btnEdit = Ext.getCmp('btnsave');
btnEdit.setVisible(true);
_thisSaleRpt.sqlcontext = " SALE='" + SHOWNAME + "'";
_thisSaleRpt.sqlcontext = " SALE='" + SHOWNAME + "' and RPTSTATUS='发布' ";
_thisSaleRpt.onDsQuery();
} else {
@ -624,6 +626,28 @@ Ext.extend(Shipping.MsOpSaleRptIndex, Ext.Panel, {
scope: this
});
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
params: {
modulename: "modOpSaleRptReadOnly"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success != true) {
} else {
_thisSaleRpt.modOpSaleRptReadOnly = 1;
}
} else {
}
},
scope: this
});
}, //end initUIComponents
@ -972,6 +996,12 @@ Ext.extend(Shipping.MsOpSaleRptIndex, Ext.Panel, {
Ext.Msg.show({ title:'提示', msg:'当前状态不允许修改!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改!
canedit = false;
}
if (_thisSaleRpt.modOpSaleRptReadOnly == 1) {
Ext.Msg.show({ title: '提示', msg: '没有修改权限!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改!
canedit = false;
}
return canedit;
},
@ -985,7 +1015,7 @@ Ext.extend(Shipping.MsOpSaleRptIndex, Ext.Panel, {
var sql = '';
if (_thisSaleRpt.modOpSaleRptAdd == '0') {
sql = " SALE='" + SHOWNAME + "'"
sql = " RPTSTATUS='发布' "
}

@ -18895,7 +18895,15 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
//#region 东胜VGM
onCreateDSVGMClick: function (menu, event) {
this.winDSVGMShow.show();
var BSNO = this.formHead.getForm().findField('BSNO').getValue();
var openSet = "height=300, width=900, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 300) / 2 + ",Left= " + (screen.width - 900) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpVgmSend/Edit?handle=check&bsno="+BSNO;
window.open(openUrl, openType, openSet);
// this.winDSVGMShow.show();
},
onSendDSVGM: function (mblno, userid, type) {
var BSNO = this.formHead.getForm().findField('BSNO').getValue();

@ -0,0 +1,26 @@

Ext.BLANK_IMAGE_URL = '../../TruckMng/Content/Images/s.gif';
var panelEdit = null;
Ext.onReady(function () {
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
panelEdit = Ext.create('Shipping.MsOpVgmSendEdit', {
id:'OpPriceEdit',
layout: 'border',
region: 'center' });
var view = new Ext.Viewport({
layout: 'border',
renderTo: 'viewport',
border: false,
items: [
panelEdit
]
});
});
function getSaved() {
return panelEdit.getIsModify();
}

@ -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,617 @@
Ext.namespace('Shipping');
Shipping.MsOpVgmSendEdit = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsOpVgmSendEdit.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
ParentWin: null,
OpStatus: 'add',
StoreList: null,
EditRecord: null,
initUIComponents: function () {
this.serialNo = 0;
this.workSerialNo = 0;
this.bodyDel = [];
//#region 编辑form
//枚举参照相关(编辑form)
//客户加载_委托单位
//客户加载_船公司
this.storeCARRIER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListCARRIER' }
});
this.storeCARRIER.load();
//船公司
this.comboxCARRIER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '船公司', //'船公司',
store: this.storeCARRIER,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'CARRIER',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeLOADPORT = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsExtEnumModel',
proxy: { url: '/CommMng/PubSys/GetEnumValueList' }
});
this.storeLOADPORT.load({ params: { enumTypeId: 96303 } });
this.comboxLOADPORT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:'口岸',
flex: 1,
store: this.storeLOADPORT,
name: 'LOADPORT',
valueField: 'EnumValueName',
displayField: 'EnumValueName'
});
this.storeMATOU = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsExtEnumModel',
proxy: { url: '/CommMng/PubSys/GetEnumValueList' }
});
this.storeMATOU.load({ params: { enumTypeId: 96304 } });
this.comboxMATOU = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:'码头',
flex: 2,
store: this.storeMATOU,
name: 'PKGTYPE',
valueField: 'EnumValueName',
displayField: 'EnumValueName'
});
this.storeCtnList = Ext.create('Ext.data.Store', {
model: 'MsOpVgmCtn',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpVgmSend/GetVgmCtnList',
reader: {
id: 'ID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//箱型_集装箱列表中的下拉框加载
this.storeCodeCtn = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeCtnModel',
proxy: { url: '/CommMng/BasicDataRef/GetCodeCtnList' }
});
this.storeCodeCtn.load();
this.comboxCTNALL = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeCodeCtn,
forceSelection: true,
name: 'CTNALL',
valueField: 'CTN',
displayField: 'CTN'
});
//客户加载_场站
this.storeYARD = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListYARD' }
});
// this.storeYARD.loadData(this.mainWin.GetPubStore("OPSEAE_YARD").data.items);
this.storeYARD.load();
//
this.comboxYARD = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeYARD,
forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'CODENAME',
name: 'YARD',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//集装箱_称重方式
this.StoreWEIGHTYPE = Ext.create('Ext.data.Store', {
fields: ['NAME']
});
this.StoreWEIGHTYPE.add({ "NAME":'SM2' });
this.StoreWEIGHTYPE.add({ "NAME":'SM1' });
this.StoreWEIGHTYPE.add({ "NAME": "" });
this.comboxWEIGHTYPE = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreWEIGHTYPE,
forceSelection: true,
name: 'WEIGHTYPE',
valueField: 'NAME',
displayField: 'NAME'
});
this.gridListCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
this.CtnGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
this.gridList = new Ext.grid.GridPanel({
store: this.storeCtnList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
plugins: [this.gridListCellEditing],
selModel: this.CtnGridCheckBoxModel,
selType: 'cellmodel',
columns: [{
sortable: true,
dataIndex: 'CTN_ID',
header: 'CTN_ID', //'编号',
hidden: true,
width: 0
}, {
sortable: true,
dataIndex: 'BSNO',
header: 'BSNO', //'业务编号',
hidden: true,
width: 0
}, {
sortable: true,
dataIndex: 'SENDGID',
header: 'SENDGID', //'业务编号',
hidden: true,
width: 0
},
{
dataIndex: 'CTNALL',
header: '箱型', //'箱型',
width: 65,
editor: this.comboxCTNALL
}, {
dataIndex: 'CNTRNO',
header: '箱号', //'箱号',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
},
renderer: function (value, cellmeta) {
return value.trim();
}
}, {
dataIndex: 'SEALNO',
header: '封号', //'封号',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
}, {
dataIndex: 'KGS',
header:'毛重', //'重量',
width: 80,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
}, {
dataIndex: 'TAREWEIGHT',
header: '箱皮重', //'箱皮重',
width: 80,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
}, {
dataIndex: 'WEIGHTYPE',
header: '称重方式', //'称重方式',
width: 80,
editor: this.comboxWEIGHTYPE
}, {
dataIndex: 'VGMKGS',
header: 'VGM重量', //'参考重量',
width: 80,
renderer: function (value, meta, record) {
return Add(record.data.KGS, record.data.TAREWEIGHT);
}
}, {
dataIndex: 'WEIGHDATE',
header: '称重时间', //'箱皮重',
width: 80,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
}, {
dataIndex: 'YARD',
header:'场站', //'箱状态',
width: 100,
editor: this.comboxYARD
}]
});
this.panelBodyCtn = new Ext.Panel({
layout: "border",
height: 150,
//margin: '5 10',
frame: true,
items: [this.gridList]
});
//表参照相关(编辑form)
//编辑form
this.formEdit = Ext.widget('form', {
region: 'center',
frame: true,
bodyPadding: 5,
autoScroll: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: 'GID',
name: 'GID', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'BSNO',
name: 'BSNO', flex: 0, hidden: true, margins: '0'
},{
fieldLabel: '船名',
name: 'VESSEL'
},{
fieldLabel: '航次',
name: 'VOYNO'
}, {
fieldLabel: '订舱编号',
name: 'CUSTNO'
}, {
fieldLabel: '截至日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'VGM_TIME'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxCARRIER, this.comboxLOADPORT, this.comboxMATOU]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '备注',
name: 'REMARK'
}]
}, this.panelBodyCtn
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}); //end this.formEdit
//#endregion
//按钮Toolbar
this.panelBtn = new Ext.Panel({
region: "south",
fbar: [ {
text: "关闭",
handler: function (button, event) {
window.close();
},
scope: this
}, {
text: "发送历史",
handler: function (button, event) {
this.LoadData('add', '');
},
scope: this
}, '-', {
text: "发送",
handler: function (button, event) {
this.winVGMShow.show();
},
scope: this
}]
}); //end 按钮Toolbar
//#region 布局
//控件布局
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 310,
items: [this.formEdit, this.panelBtn]
});
Ext.apply(this, {
items: [this.panelTop]
});
//#endregion
//绑定查询窗体
this.ParentWin = window.parent.opener;
//初始化数据
this.InitData();
//#region 东胜VGM
this.formVGMShow = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: { anchor: '100%' },
items: [{
xtype: 'checkboxgroup',
fieldLabel: '发送方', //'文件功能',
items: [{
xtype: "checkbox", //checkbox控件
name: "ISCARRIER",
boxLabel: "",
fieldLabel: "船公司",
inputValue: true, //选中的值
uncheckedValue: false, //未选中的值
checked: true //绘制时的选中状态
}, {
xtype: "checkbox", //checkbox控件
name: "ISYGT",
boxLabel: "",
fieldLabel: "运港通",
inputValue: true, //选中的值
uncheckedValue: false, //未选中的值
checked: true //绘制时的选中状态
}]
},{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
xtype: 'radiogroup',
fieldLabel:'操作类型', //'文件功能',
id: 'vGMFILEROLE',
defaults: { flex: 1 },
layout: 'hbox',
items: [{
boxLabel: "新增", //'原始',
name: 'FILEROLE',
inputValue: '9',
checked: true
}, {
boxLabel: "修改", //'更新',
name: 'FILEROLE',
inputValue: '5'
}, {
boxLabel: "取消", //'删除',
name: 'FILEROLE',
inputValue: '1'
}]
}]
}
]//end items(fieldset 1)
}]//end root items
});
me = this;
this.winVGMShow = Ext.create('Ext.window.Window', {
title: "东胜VGM", //"生成宁波电子口岸报文",
width: 450,
//height : 120,
//plain : true,
iconCls: "addicon",
resizable: false,
// 是否可以拖动
// draggable:false,
collapsible: true, // 允许缩放条
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0",
items: [this.formVGMShow],
buttons: [{
text: "发送VGM", //"生成并发送VGM报文",
minWidth: 70,
handler: function () {
var MBLNO = me.formHead.getForm().findField('MBLNO').value;
var cgFILEROLE = Ext.getCmp('vGMFILEROLE');
var FILEROLE = cgFILEROLE.getValue();
me.onSendVGM(MBLNO, USERID, FILEROLE);
}
}, {
text: "关闭", //"关闭",
minWidth: 70,
handler: function () {
me.winVGMShow.close();
}
}]
});
//#endregion
//绑定事件
}, //end initUIComponents
InitData: function () {
//this.opStatus = 'add';
//var condition = '';
//if (this.ParentWin) {
// var ret = this.ParentWin.OprationSwap();
// this.opStatus = ret[0];
// this.StoreList = ret[1];
// this.editRecord = ret[2];
//}
//if (this.opStatus == 'edit')
// condition = " GID='" + this.editRecord.get('GID') + "'";
//this.LoadData(this.opStatus, condition);
}, //end InitData
LoadData: function (opstatus, condition) {
this.serialNo = 0;
this.workSerialNo = 0;
this.bodyDel = [];
this.opStatus = opstatus;
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
url: '/MvcShipping/MsCodeFactry/GetData',
params: {
handle: opstatus,
condition: condition
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
}
var data = result.data;
this.formEdit.getForm().reset();
this.formEdit.getForm().setValues(data);
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}, // end LoadDate
Save: function (type) {
var basicForm = this.formEdit.getForm();
if (!basicForm.isValid()) {
return;
}
basicForm.findField('GID').setDisabled(false);
var data = basicForm.getValues();
basicForm.findField('GID').setDisabled(true);
if (this.opStatus == 'add') {
data.GID = NewGuid();
}
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/MvcShipping/MsCodeFactry/Save',
scope: this,
params: {
opstatus: this.opStatus,
data: Ext.JSON.encode(data)
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnData = jsonresult.Data;
this.formEdit.getForm().setValues(returnData);
if (this.opStatus == 'add') {
var arrNewRecords = this.StoreList.add(returnData);
this.editRecord = arrNewRecords[0];
}
else if (this.opStatus == 'edit') {
var editp = Ext.create('MsCodeFactry', returnData);
this.editRecord.fields.each(function (field) {
if (field.persist) {
name = field.name;
if (name != 'id')
this.editRecord.set(name, editp.get(name));
}
}, this);
this.editRecord.commit();
}
if (type == '0') {
this.opStatus = 'edit';
basicForm.findField('GID').setDisabled(true);
} else if (type == '1') {
window.close();
} else {
this.LoadData('add', '');
basicForm.findField('GID').setDisabled(false);
}
} else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
} //end save
});

@ -0,0 +1,45 @@
Ext.define('MsOpVgmSend', {
extend: 'Ext.data.Model',
idProperty: 'GID',
fields: [
{ name: 'GID', type: 'string' }, // 业务编号
{ name: 'BSNO', type: 'string' }, // 业务编号
{ name: 'MBLNO', type: 'string' },
{ name: 'VGMSTATUS', type: 'string' }, // 委托单位
{ name: 'CUSTNO', type: 'string' }, // 会计期间
{ name: 'CARRIER', type: 'string' },
{ name: 'LOADPORT', type: 'string' }, // 揽货人
{ name: 'MATOU', type: 'string' }, //
{ name: 'ISCARRIER', type: 'bool' }, //
{ name: 'ISYGT', type: 'bool' }, //
{ name: 'SENDTYPE', type: 'string' }, //
{ name: 'REMARK', type: 'string' },
{ name: 'VESSEL', type: 'string' },
{ name: 'VOYNO', type: 'string' },
{ name: 'VGM_TIME', type: 'string' },
{ name: 'CTNNUM', type: 'number' }, //
{ name: 'SENDERUSER', type: 'string' }, // 创建人
{ name: 'SENDERUSERREF', type: 'string' }, // 创建人
{ name: 'SENDTIME', type: 'string' }
]
});
Ext.define('MsOpVgmCtn', {
extend: 'Ext.data.Model',
idProperty: 'GID',
fields: [
{ name: 'CTN_ID', type: 'string' }, // 业务编号
{ name: 'BSNO', type: 'string' }, // 业务编号
{ name: 'SENDGID', type: 'string' },
{ name: 'CTNALL', type: 'string' }, // 委托单位
{ name: 'CNTRNO', type: 'string' }, // 会计期间
{ name: 'SEALNO', type: 'string' },
{ name: 'KGS', type: 'number' }, //
{ name: 'TAREWEIGHT', type: 'number' }, //
{ name: 'VGMKGS', type: 'number' }, //
{ name: 'YARD', type: 'string' }, // 创建人
{ name: 'WEIGHDATE', type: 'string' }
]
});

@ -1528,7 +1528,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
}
}, this.comboxTRUCKERQ
//, this.comboxFeeNameRef
, this.comboxPcBillType, this.comboxRtnDocStatus,
, this.comboxPcBillType, this.comboxRtnDocStatus, this.comboxOnlyMaster,
{
text: "重置条件",
iconCls: "btnreset",

@ -2495,6 +2495,11 @@
<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\MsOpVgmSend\Edit.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpVgmSend\Index.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpVgmSend\MsOpVgmSendEdit.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpVgmSend\MsOpVgmSendIndex.js" />
<Content Include="Areas\MvcShipping\Viewsjs\MsOpVgmSend\MsOpVgmSendModel.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" />
@ -3682,6 +3687,8 @@
<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\MsOpVgmSend\Edit.aspx" />
<Content Include="Areas\MvcShipping\Views\MsOpVgmSend\Index.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" />
@ -8420,6 +8427,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\MsOpVgmSendController.cs" />
<Compile Include="Areas\MvcShipping\Controllers\MsOpSaleRptController.cs" />
<Compile Include="Areas\MvcShipping\Controllers\OP_SERVICEBILLController.cs" />
<Compile Include="Areas\MvcShipping\Controllers\MsChFeeAgentDcController.cs" />
@ -8468,6 +8476,7 @@
<Compile Include="Areas\MvcShipping\DAL\MsCwVouchersGl\ObjectExtensions.cs" />
<Compile Include="Areas\MvcShipping\DAL\MsOpPrice\MsOpPriceDAL.cs" />
<Compile Include="Areas\MvcShipping\DAL\MsOpPlan\MsOpPlanDAL.cs" />
<Compile Include="Areas\MvcShipping\DAL\MsOpVgmSend\MsOpVgmSendDAL.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" />
@ -8529,6 +8538,7 @@
<Compile Include="Areas\MvcShipping\Models\MsOpBill\MsOpBillZnj.cs" />
<Compile Include="Areas\MvcShipping\Models\MsOpPrice\MsOpPrice.cs" />
<Compile Include="Areas\MvcShipping\Models\MsOpPlan\MsOpPlan.cs" />
<Compile Include="Areas\MvcShipping\Models\MsOpVgmSend\MsOpVgmSend.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" />

Loading…
Cancel
Save