Merge branch 'DS7_HYRD' of http://60.209.125.238:20010/dengyu/DS7 into DS7_HYRD

DS7_HYRD
hanxuntao 2 days ago
commit 9dece7c97c

@ -88,7 +88,7 @@ namespace DSWeb.MvcShipping.Controllers
#endregion
#region 引入 EXCEL
#region 运价管理 运价维护 导入excel 引入 EXCEL
[HttpPost]
public ContentResult onImportClick()
{
@ -170,216 +170,242 @@ namespace DSWeb.MvcShipping.Controllers
if(table.Rows.Count>0)
if(table.Rows.Count>0)
{
iheadList = table.Rows.Count; //执行条数
#region 获取动态 集装箱列名
List<XiaLaKuangModel> ctnList = MsCrmPriceCarrierDAL.GetCtn();
string sXG = "";
string sDG = "";
string sCG = "";
string sXKD = "";
string sDKD = "";
string sXKJ = "";
string sDKJ = "";
string sXGBJ = "";
string sDGBJ = "";
string sCGBJ = "";
string sXKDBJ = "";
string sDKDBJ = "";
string sXKJBJ = "";
string sDKJBJ = "";
foreach (var enumValue in ctnList)
{
iheadList = table.Rows.Count; //执行条数
#region 获取动态 集装箱列名
List<XiaLaKuangModel> ctnList = MsCrmPriceCarrierDAL.GetCtn();
string sXG = "";
string sDG = "";
string sCG = "";
string sXD = "";
string sCD = "";
string sXGBJ = "";
string sDGBJ = "";
string sCGBJ = "";
string sXDBJ = "";
string sCDBJ = "";
foreach (var enumValue in ctnList)
if (enumValue.NAME.ToString().Trim() == "小柜")
{
if (enumValue.NAME.ToString().Trim() == "小柜")
{
sXG = enumValue.VALUE.ToString().Trim() + "0";
sXGBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "大柜")
{
sDG = enumValue.VALUE.ToString().Trim() + "0";
sDGBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "超高")
{
sCG = enumValue.VALUE.ToString().Trim() + "0";
sCGBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "小冻")
{
sXD = enumValue.VALUE.ToString().Trim() + "0";
sXDBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "超冻")
{
sCD = enumValue.VALUE.ToString().Trim() + "0";
sCDBJ = enumValue.VALUE.ToString().Trim() + "2";
}
sXG = enumValue.VALUE.ToString().Trim() + "0";
sXGBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "大柜")
{
sDG = enumValue.VALUE.ToString().Trim() + "0";
sDGBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "超高")
{
sCG = enumValue.VALUE.ToString().Trim() + "0";
sCGBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "小开顶")
{
sXKD = enumValue.VALUE.ToString().Trim() + "0";
sXKDBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "大开顶")
{
sDKD = enumValue.VALUE.ToString().Trim() + "0";
sDKDBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "小框架")
{
sXKJ = enumValue.VALUE.ToString().Trim() + "0";
sXKJBJ = enumValue.VALUE.ToString().Trim() + "2";
}
else if (enumValue.NAME.ToString().Trim() == "大框架")
{
sDKJ = enumValue.VALUE.ToString().Trim() + "0";
sDKJBJ = enumValue.VALUE.ToString().Trim() + "2";
}
}
#endregion
#endregion
#region 获取动态 费用列名
List<XiaLaKuangModel> feeList = MsCrmPriceCarrierDAL.GetFeeName();
string sFJF = "";
foreach (var enumValue in feeList)
#region 获取动态 费用列名
List<XiaLaKuangModel> feeList = MsCrmPriceCarrierDAL.GetFeeName();
string sFJF = "";
foreach (var enumValue in feeList)
{
if (enumValue.NAME.ToString().Trim() == "附加费")
{
if (enumValue.NAME.ToString().Trim() == "附加费")
{
sFJF = enumValue.VALUE.ToString().Trim();
}
sFJF = enumValue.VALUE.ToString().Trim();
}
#endregion
//
string sGID = "";
sError = "";
for(int i=0;i< table.Rows.Count;i++)
{
bool isAdd = false;
}
#endregion
//
string sGID = "";
sError = "";
for(int i=0;i< table.Rows.Count;i++)
{
bool isAdd = false;
#region 获取是否有重复数据
string condition = "[LANE]='" + table.Rows[i]["航线"].ToString() + "' and [PODLOAD]='" + table.Rows[i]["装货港"].ToString() + "' and [PORTDISCHARGEID]='" + table.Rows[i]["卸货港"].ToString() + "' and [PORTDISCHARGE]='" + table.Rows[i]["卸货港中文"].ToString() + "' and [CARRIER]='" + table.Rows[i]["船公司"].ToString() + "' and [VIA]='" + table.Rows[i]["中转港"].ToString() + "' and [ETD]='" + table.Rows[i]["船期"].ToString() + "' and [TT]='" + table.Rows[i]["航程"].ToString() + "' and [EFFECTIVEDATE]='" + table.Rows[i]["开始日期"].ToString() + "' and [VALIDDATE]='" + table.Rows[i]["结束日期"].ToString() + "' and [COMMODITY]='" + table.Rows[i]["特殊商品"].ToString() + "'";
List<MsCrmPriceCarrier> dataList = MsCrmPriceCarrierDAL.GetDataList(condition,0,1000, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), null);
#endregion
#region 获取是否有重复数据
string condition = "[LANE]='" + table.Rows[i]["航线"].ToString() + "' and [PODLOAD]='" + table.Rows[i]["装货港"].ToString() + "' and [PORTDISCHARGEID]='" + table.Rows[i]["卸货港"].ToString() + "' and [PORTDISCHARGE]='" + table.Rows[i]["卸货港中文"].ToString() + "' and [CARRIER]='" + table.Rows[i]["船公司"].ToString() + "' and [VIA]='" + table.Rows[i]["中转港"].ToString() + "' and [ETD]='" + table.Rows[i]["船期"].ToString() + "' and [TT]='" + table.Rows[i]["航程"].ToString() + "' and [EFFECTIVEDATE]='" + table.Rows[i]["开始日期"].ToString() + "' and [VALIDDATE]='" + table.Rows[i]["结束日期"].ToString() + "' and [COMMODITY]='" + table.Rows[i]["特殊商品"].ToString() + "'";
List<MsCrmPriceCarrier> dataList = MsCrmPriceCarrierDAL.GetDataList(condition,0,1000, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), null);
#endregion
if (dataList != null)//edit
if (dataList != null)//edit
{
if (dataList.Count > 0)
{
if (dataList.Count > 0)
MsCrmPriceCarrier headRow = dataList[0];
if (!headRow.LOCKFLAG && !headRow.ISISSUE)//判断是否锁定或发布的数据,不是则覆盖数据
{
MsCrmPriceCarrier headRow = dataList[0];
if (!headRow.LOCKFLAG && !headRow.ISISSUE)//判断是否锁定或发布的数据,不是则覆盖数据
{
sGID = headRow.GID.ToString();
UpdateCount++; //更新条数
}
else
{
iError++; //失败(更新)条数
continue;
}
sGID = headRow.GID.ToString();
UpdateCount++; //更新条数
}
else//add
else
{
isAdd = true;
iError++; //失败(更新)条数
continue;
}
}
else//add
{
isAdd = true;
}
if (isAdd)//add
}
else//add
{
isAdd = true;
}
if (isAdd)//add
{
MsCrmPriceCarrier headRow = new MsCrmPriceCarrier();
#region 默认值
headRow.LANE = table.Rows[i]["航线"].ToString();//航线
headRow.PODLOAD = table.Rows[i]["装货港"].ToString();//装货港
headRow.PORTDISCHARGEID = table.Rows[i]["卸货港"].ToString();//卸货港ID
headRow.PORTDISCHARGE = table.Rows[i]["卸货港中文"].ToString();//卸货港中文
headRow.CARRIER = table.Rows[i]["船公司"].ToString();//船公司
headRow.VIA = table.Rows[i]["中转港"].ToString();//中转港
headRow.ETD = table.Rows[i]["船期"].ToString();//开航日/船期
headRow.TT = table.Rows[i]["航程"].ToString();//航程
headRow.REMARK = table.Rows[i]["备注"].ToString();//备注
if (table.Rows[i]["开始日期"].ToString() != "")
{
MsCrmPriceCarrier headRow = new MsCrmPriceCarrier();
#region 默认值
headRow.LANE = table.Rows[i]["航线"].ToString();//航线
headRow.PODLOAD = table.Rows[i]["装货港"].ToString();//装货港
headRow.PORTDISCHARGEID = table.Rows[i]["卸货港"].ToString();//卸货港ID
headRow.PORTDISCHARGE = table.Rows[i]["卸货港中文"].ToString();//卸货港中文
headRow.CARRIER = table.Rows[i]["船公司"].ToString();//船公司
headRow.VIA = table.Rows[i]["中转港"].ToString();//中转港
headRow.ETD = table.Rows[i]["船期"].ToString();//开航日/船期
headRow.TT = table.Rows[i]["航程"].ToString();//航程
headRow.REMARK = table.Rows[i]["备注"].ToString();//备注
if (table.Rows[i]["开始日期"].ToString() != "")
{
headRow.EFFECTIVEDATE = DateTime.Parse(table.Rows[i]["开始日期"].ToString());//生效期/开始日期
}
else
{
if (sError.IndexOf("不能导入“开始日期”为空的数据!") < 0)
{
sError += "不能导入“开始日期”为空的数据!";
}
}
if (table.Rows[i]["结束日期"].ToString() != "")
{
headRow.VALIDDATE = DateTime.Parse(table.Rows[i]["结束日期"].ToString());//有效期/结束日期
}
else
{
if (sError.IndexOf("不能导入“结束日期”为空的数据!") < 0)
{
sError += "不能导入“结束日期”为空的数据!";
}
}
headRow.COMMODITY = table.Rows[i]["特殊商品"].ToString();//品名/特殊商品
headRow.LOCKFLAG = false;
headRow.ISISSUE = false;
headRow.INPUTBY = Convert.ToString(Session["USERID"]);//制单人GID
headRow.INPUTTIME = DateTime.Now;//创建时间
headRow.MODIFIEDUSER = Convert.ToString(Session["USERID"]);//最后一次更改操作人GID
headRow.MODIFYTIME = DateTime.Now;//最后一次更改操作时间
headRow.GID = Guid.NewGuid().ToString();
sGID = headRow.GID.ToString();
headRow.DbOperationType = DbOperationType.DbotIns;
#endregion
var modb = new ModelObjectDB();
DBResult result = modb.Save(headRow);
if (!result.Success)
headRow.EFFECTIVEDATE = DateTime.Parse(table.Rows[i]["开始日期"].ToString());//生效期/开始日期
}
else
{
if (sError.IndexOf("不能导入“开始日期”为空的数据!") < 0)
{
iError++; //失败(更新)条数
continue;
sError += "不能导入“开始日期”为空的数据!";
}
else
}
if (table.Rows[i]["结束日期"].ToString() != "")
{
headRow.VALIDDATE = DateTime.Parse(table.Rows[i]["结束日期"].ToString());//有效期/结束日期
}
else
{
if (sError.IndexOf("不能导入“结束日期”为空的数据!") < 0)
{
InsertCount++; //新增条数
sError += "不能导入“结束日期”为空的数据!";
}
}
var XGYJ = table.Rows[i]["小柜"].ToString();
if (XGYJ == "") XGYJ = "0";
var DGYJ = table.Rows[i]["大柜"].ToString();
if (DGYJ == "") DGYJ = "0";
var CGYJ = table.Rows[i]["超高"].ToString();
if (CGYJ == "") CGYJ = "0";
var XDYJ = table.Rows[i]["小冻"].ToString();
if (XDYJ == "") XDYJ = "0";
var CDYJ = table.Rows[i]["超冻"].ToString();
if (CDYJ == "") CDYJ = "0";
var XGYJBJ = table.Rows[i]["小柜报价"].ToString();
if (XGYJBJ == "") XGYJBJ = "0";
var DGYJBJ = table.Rows[i]["大柜报价"].ToString();
if (DGYJBJ == "") DGYJBJ = "0";
var CGYJBJ = table.Rows[i]["超高报价"].ToString();
if (CGYJBJ == "") CGYJBJ = "0";
var XDYJBJ = table.Rows[i]["小冻报价"].ToString();
if (XDYJBJ == "") XDYJBJ = "0";
var CDYJBJ = table.Rows[i]["超冻报价"].ToString();
if (CDYJBJ == "") CDYJBJ = "0";
#region 根据动态字段名,更新集装箱与费用信息
string sSQL = "update crm_price_carrier_2 set [" + sXG + "]='" + XGYJ + "',[" + sDG + "]='" + DGYJ + "',[" + sCG + "]='" + CGYJ + "',[" + sXD + "]='"
+ XDYJ + "',[" + sCD + "]='" + CDYJ + "',[" + sXGBJ + "]='" + XGYJBJ + "',[" + sDGBJ + "]='" + DGYJBJ + "',[" + sCGBJ + "]='" + CGYJBJ + "',[" + sXDBJ + "]='"
+ XDYJBJ + "',[" + sCDBJ + "]='" + CDYJBJ + "',[" + sFJF + "]='" + table.Rows[i]["附加费"].ToString() + "' where gid='" + sGID + "'";
// string sSQL = "update crm_price_carrier_2 set [" + sXG + "]='" + ds.Tables[0].Rows[i]["小柜"].ToString() + "',[" + sDG + "]='" + ds.Tables[0].Rows[i]["大柜"].ToString() + "',[" + sCG + "]='" + ds.Tables[0].Rows[i]["超高"].ToString() + "',[" + sFJF + "]='" + ds.Tables[0].Rows[i]["附加费"].ToString() + "' where gid='" + sGID + "'";
headRow.COMMODITY = table.Rows[i]["特殊商品"].ToString();//品名/特殊商品
headRow.LOCKFLAG = false;
headRow.ISISSUE = false;
headRow.INPUTBY = Convert.ToString(Session["USERID"]);//制单人GID
headRow.INPUTTIME = DateTime.Now;//创建时间
headRow.MODIFIEDUSER = Convert.ToString(Session["USERID"]);//最后一次更改操作人GID
headRow.MODIFYTIME = DateTime.Now;//最后一次更改操作时间
headRow.GID = Guid.NewGuid().ToString();
sGID = headRow.GID.ToString();
headRow.DbOperationType = DbOperationType.DbotIns;
#endregion
bool bl = T_ALL_DA.GetExecuteSqlCommand(sSQL);
if (!bl)
var modb = new ModelObjectDB();
DBResult result = modb.Save(headRow);
if (!result.Success)
{
iError++; //失败(更新)条数
continue;
}
else
{
InsertCount++; //新增条数
}
}
}
//
if (System.IO.File.Exists(fileName))
{
System.IO.File.Delete(fileName);
}
if (sError.Trim() != "")
{
jsonRespose.Success = false;
jsonRespose.Message = "操作完成,共处理" + Convert.ToString(iheadList) + "条数据,其中新增" + Convert.ToString(InsertCount) + "条,覆盖" + Convert.ToString(UpdateCount) + "条,出错" + Convert.ToString(iError) + "条!错误原因:" + sError;
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
else
{
jsonRespose.Success = true;
jsonRespose.Message = "操作完成,共处理" + Convert.ToString(iheadList) + "条数据,其中新增" + Convert.ToString(InsertCount) + "条,覆盖" + Convert.ToString(UpdateCount) + "条,出错" + Convert.ToString(iError) + "条!";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
var XGYJ = table.Rows[i]["小柜"].ToString();
if (XGYJ == "") XGYJ = "0";
var DGYJ = table.Rows[i]["大柜"].ToString();
if (DGYJ == "") DGYJ = "0";
var CGYJ = table.Rows[i]["超高"].ToString();
if (CGYJ == "") CGYJ = "0";
var XKDYJ = table.Rows[i]["小开顶"].ToString();
if (XKDYJ == "") XKDYJ = "0";
var DKDYJ = table.Rows[i]["大开顶"].ToString();
if (DKDYJ == "") DKDYJ = "0";
var XKJYJ = table.Rows[i]["小框架"].ToString();
if (XKJYJ == "") XKJYJ = "0";
var DKJYJ = table.Rows[i]["大框架"].ToString();
if (DKJYJ == "") DKJYJ = "0";
var XGYJBJ = table.Rows[i]["小柜报价"].ToString();
if (XGYJBJ == "") XGYJBJ = "0";
var DGYJBJ = table.Rows[i]["大柜报价"].ToString();
if (DGYJBJ == "") DGYJBJ = "0";
var CGYJBJ = table.Rows[i]["超高报价"].ToString();
if (CGYJBJ == "") CGYJBJ = "0";
var XKDYJBJ = table.Rows[i]["小开顶报价"].ToString();
if (XKDYJBJ == "") XKDYJBJ = "0";
var DKDYJBJ = table.Rows[i]["小开顶报价"].ToString();
if (DKDYJBJ == "") DKDYJBJ = "0";
var XKJYJBJ = table.Rows[i]["小框架报价"].ToString();
if (XKJYJBJ == "") XKJYJBJ = "0";
var DKJYJBJ = table.Rows[i]["大框架报价"].ToString();
if (DKJYJBJ == "") DKJYJBJ = "0";
#region 根据动态字段名,更新集装箱与费用信息
string sSQL = "";
sSQL = $"update crm_price_carrier_2 set " +
$"[{sXG}]='{XGYJ }',[{sDG }]='{DGYJ }',[{sCG }]='{CGYJ }',[{sXKD}]='{XKDYJ}',[{sDKD}]='{DKDYJ}',[{sXKJ}]= '{XKJYJ}',[{sDKJ}]='{DKJYJ}'" +
$",[{sXGBJ }]='{XGYJBJ }',[{sDGBJ }]='{DGYJBJ }',[{sCGBJ }]='{CGYJBJ }',[{sXKDBJ}]='{XKDYJBJ}',[{sDKDBJ}]='{DKDYJBJ}',[{sXKJBJ}]='{XKJYJBJ}',[{sDKJBJ}]='{DKJYJBJ}'" +
$",[{sFJF }]='{table.Rows[i][""].ToString() }' where gid='{sGID }'";
#endregion
bool bl = T_ALL_DA.GetExecuteSqlCommand(sSQL);
if (!bl)
{
continue;
}
}
}
//
if (System.IO.File.Exists(fileName))
{
System.IO.File.Delete(fileName);
}
if (sError.Trim() != "")
{
jsonRespose.Success = false;
jsonRespose.Message = "操作完成,共处理" + Convert.ToString(iheadList) + "条数据,其中新增" + Convert.ToString(InsertCount) + "条,覆盖" + Convert.ToString(UpdateCount) + "条,出错" + Convert.ToString(iError) + "条!错误原因:" + sError;
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
else
{
jsonRespose.Success = true;
jsonRespose.Message = "操作完成,共处理" + Convert.ToString(iheadList) + "条数据,其中新增" + Convert.ToString(InsertCount) + "条,覆盖" + Convert.ToString(UpdateCount) + "条,出错" + Convert.ToString(iError) + "条!";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
#endregion

@ -117,7 +117,7 @@ namespace DSWeb.MvcShipping.Helper
//long lTime = long.Parse(timestamp + "0000");
//TimeSpan timeSpan = new TimeSpan(lTime);
//DateTime targetDt = dtStart.Add(timeSpan).AddHours(8);
DateTime dtStart = Convert.ToDateTime("1970-01-01");
DateTime dtStart = Convert.ToDateTime("1900-01-01");
DateTime targetDt = dtStart.AddDays(timestamp-1);
return targetDt;
}
@ -335,7 +335,15 @@ namespace DSWeb.MvcShipping.Helper
{
try
{
dataRow[i] = GetDateTime((int)cellData.NumericCellValue);
var _datetime = GetDateTime((int)cellData.NumericCellValue);
//if (_datetime > Convert.ToDateTime("2070-1-1") && DateTime.Now< Convert.ToDateTime("2069-1-1"))
//{
// _datetime=_datetime.AddDays(-25567);
//}
dataRow[i] = _datetime;
}
catch {

@ -189,7 +189,7 @@ var zlcolumn = [
},
{
dataIndex: 'CTN3DETENTION',
text: '目的港免箱期_小',
text: '目的港免箱期_小开顶',
width: 100,
editor: {
xtype: 'textfield',
@ -198,7 +198,25 @@ var zlcolumn = [
},
{
dataIndex: 'CTN4DETENTION',
text: '目的港免箱期_超冻',
text: '目的港免箱期_大开顶',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN5DETENTION',
text: '目的港免箱期_小框架',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN6DETENTION',
text: '目的港免箱期_大框架',
width: 100,
editor: {
xtype: 'textfield',

@ -246,7 +246,96 @@ Ext.extend(Shipping.MsCrmPriceCarrierIndex, Ext.Panel, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxPODLOAD_2, this.comboxPORTDISCHARGE_2, this.comboxVIA_2, this.comboxCARRIER_2, this.comboxLANE_2]//, { xtype: 'hiddenfield', flex: 1}
items: [
//this.comboxPODLOAD_2,
//this.comboxPORTDISCHARGE_2,
//this.comboxVIA_2,
//this.comboxCARRIER_2,
//this.comboxLANE_2
{
fieldLabel: '启运港',
name: 'PODLOAD_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
},
{
fieldLabel: '卸货港',
name: 'PORTDISCHARGEID_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
},
{
fieldLabel: '中转港',
name: 'VIA_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
},
{
fieldLabel: '船公司',
name: 'CARRIER_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
},
{
fieldLabel: '航线',
name: 'LANE_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
}
]//, { xtype: 'hiddenfield', flex: 1}
}, {
xtype: 'container',
layout: 'hbox',
@ -784,7 +873,7 @@ Ext.extend(Shipping.MsCrmPriceCarrierIndex, Ext.Panel, {
},
{
dataIndex: 'CTN3DETENTION',
text: '目的港免箱期_小',
text: '目的港免箱期_小开顶',
width: 100,
editor: {
xtype: 'textfield',
@ -793,7 +882,25 @@ Ext.extend(Shipping.MsCrmPriceCarrierIndex, Ext.Panel, {
},
{
dataIndex: 'CTN4DETENTION',
text: '目的港免箱期_超冻',
text: '目的港免箱期_大开顶',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN5DETENTION',
text: '目的港免箱期_小框架',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN6DETENTION',
text: '目的港免箱期_大框架',
width: 100,
editor: {
xtype: 'textfield',
@ -1335,7 +1442,7 @@ Ext.extend(Shipping.MsCrmPriceCarrierIndex, Ext.Panel, {
},
{
dataIndex: 'CTN3DETENTION',
text: '目的港免箱期_小',
text: '目的港免箱期_小开顶',
width: 100,
editor: {
xtype: 'textfield',
@ -1344,7 +1451,25 @@ Ext.extend(Shipping.MsCrmPriceCarrierIndex, Ext.Panel, {
},
{
dataIndex: 'CTN4DETENTION',
text: '目的港免箱期_超冻',
text: '目的港免箱期_大开顶',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN5DETENTION',
text: '目的港免箱期_小框架',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN6DETENTION',
text: '目的港免箱期_大框架',
width: 100,
editor: {
xtype: 'textfield',
@ -1679,35 +1804,35 @@ Ext.extend(Shipping.MsCrmPriceCarrierIndex, Ext.Panel, {
var strPORTLOADID = form.findField('PODLOAD_2').getValue();
if (strPORTLOADID != null) {
if (strPORTLOADID != "") {
sql = sql + getAndConSql(sql, strPORTLOADID, "[PODLOAD]='" + strPORTLOADID.toString().trim() + "'");
sql = sql + getAndConSql(sql, strPORTLOADID, "[PODLOAD] like '%" + strPORTLOADID.toString().trim() + "%'");
}
}
var strPORTDISCHARGEID_2 = form.findField('PORTDISCHARGEID_2').getValue();
if (strPORTDISCHARGEID_2 != null) {
if (strPORTDISCHARGEID_2 != "") {
sql = sql + getAndConSql(sql, strPORTDISCHARGEID_2, " (PORTDISCHARGE='" + strPORTDISCHARGEID_2.toString().trim() + "' or [PORTDISCHARGEID]='" + strPORTDISCHARGEID_2.toString().trim() + "') ");
sql = sql + getAndConSql(sql, strPORTDISCHARGEID_2, " (PORTDISCHARGE like '%" + strPORTDISCHARGEID_2.toString().trim() + "%' or [PORTDISCHARGEID] like '%" + strPORTDISCHARGEID_2.toString().trim() + "%') ");
}
}
var strVIA_2 = form.findField('VIA_2').getValue();
if (strVIA_2 != null) {
if (strVIA_2 != "") {
sql = sql + getAndConSql(sql, strVIA_2, "[VIA]='" + strVIA_2.toString().trim() + "'");
sql = sql + getAndConSql(sql, strVIA_2, "[VIA] like '%" + strVIA_2.toString().trim() + "%'");
}
}
var strCARRIER = form.findField('CARRIER_2').getValue();
if (strCARRIER != null) {
if (strCARRIER != "") {
sql = sql + getAndConSql(sql, strCARRIER, "[CARRIER]='" + strCARRIER.toString().trim() + "'");
sql = sql + getAndConSql(sql, strCARRIER, "[CARRIER] like '%" + strCARRIER.toString().trim() + "%'");
}
}
var strLANE = form.findField('LANE_2').getValue();
if (strLANE != null) {
if (strLANE != "") {
sql = sql + getAndConSql(sql, strLANE, "[LANE]='" + strLANE.toString().trim() + "'");
sql = sql + getAndConSql(sql, strLANE, "[LANE] like '%" + strLANE.toString().trim() + "%'");
}
}

@ -234,7 +234,80 @@ Ext.extend(Shipping.MsCrmPriceCarrierListIndex, Ext.Panel, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxPODLOAD_2, this.comboxPORTDISCHARGE_2, this.comboxVIA_2, this.comboxCARRIER_2, this.comboxISISSUE, {
items: [
//this.comboxPODLOAD_2,
//this.comboxPORTDISCHARGE_2,
//this.comboxVIA_2,
//this.comboxCARRIER_2,
{
fieldLabel: '启运港',
name: 'PODLOAD_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
},
{
fieldLabel: '卸货港',
name: 'PORTDISCHARGEID_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
},
{
fieldLabel: '中转港',
name: 'VIA_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
},
{
fieldLabel: '船公司',
name: 'CARRIER_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
},
this.comboxISISSUE
, {
fieldLabel: '特殊商品',
name: 'COMMODITY_2',
enableKeyEvents: true, //激活键盘事件
@ -304,7 +377,26 @@ Ext.extend(Shipping.MsCrmPriceCarrierListIndex, Ext.Panel, {
scope: this
}
}
}, this.comboxLANE_2, {
}
//, this.comboxLANE_2
,{
fieldLabel: '航线',
name: 'LANE_2',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
}
, {
fieldLabel: '船期',
name: 'ETD_2',
enableKeyEvents: true, //激活键盘事件
@ -653,7 +745,7 @@ Ext.extend(Shipping.MsCrmPriceCarrierListIndex, Ext.Panel, {
},
{
dataIndex: 'CTN3DETENTION',
text: '目的港免箱期_小',
text: '目的港免箱期_小开顶',
width: 100,
editor: {
xtype: 'textfield',
@ -662,7 +754,25 @@ Ext.extend(Shipping.MsCrmPriceCarrierListIndex, Ext.Panel, {
},
{
dataIndex: 'CTN4DETENTION',
text: '目的港免箱期_超冻',
text: '目的港免箱期_大开顶',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN5DETENTION',
text: '目的港免箱期_小框架',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN6DETENTION',
text: '目的港免箱期_大框架',
width: 100,
editor: {
xtype: 'textfield',
@ -1097,62 +1207,70 @@ Ext.extend(Shipping.MsCrmPriceCarrierListIndex, Ext.Panel, {
dataIndex: 'CONTRACTBSNO',
text: 'CONTRACTBSNO',
width: 80
},
{
dataIndex: 'CTN0DETENTION',
text: '目的港免箱期_小柜',
align: 'center',
pack: 'center',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN1DETENTION',
text: '大柜',
align: 'center',
pack: 'center',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN2DETENTION',
text: '超高',
align: 'center',
pack: 'center',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN3DETENTION',
text: '小冻',
align: 'center',
pack: 'center',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN4DETENTION',
text: '超冻',
align: 'center',
pack: 'center',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
},
{
dataIndex: 'CTN0DETENTION',
text: '目的港免箱期_小柜',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN1DETENTION',
text: '目的港免箱期_大柜',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN2DETENTION',
text: '目的港免箱期_超高',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN3DETENTION',
text: '目的港免箱期_小开顶',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN4DETENTION',
text: '目的港免箱期_大开顶',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN5DETENTION',
text: '目的港免箱期_小框架',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CTN6DETENTION',
text: '目的港免箱期_大框架',
width: 100,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'REMARK',
text: '备注',
@ -1587,7 +1705,8 @@ Ext.extend(Shipping.MsCrmPriceCarrierListIndex, Ext.Panel, {
sql = sql + getAndConSql(sql, ISISSUE_2, "[ISISSUE]=1");
}
}
sql = sql + getAndConSql(sql, "1=1", "[ISISSUE]=1");
//sql = sql + getAndConSql(sql, "1=1", "[ISISSUE]=1");
// sql = sql + " and [LOCKFLAG]=1";
var CONTRACTNO = form.findField('CONTRACTNO').getValue();

@ -323,8 +323,10 @@ function getPriceCtnTypeStore() {
var CTN0 = Ext.create('PriceCTNTYPE', { 'NAME': '小柜', 'ID': 'CTN0' });
var CTN1 = Ext.create('PriceCTNTYPE', { 'NAME': '大柜', 'ID': 'CTN1' });
var CTN2 = Ext.create('PriceCTNTYPE', { 'NAME': '超高', 'ID': 'CTN2' });
var CTN3 = Ext.create('PriceCTNTYPE', { 'NAME': '小冻', 'ID': 'CTN3' });
var CTN4 = Ext.create('PriceCTNTYPE', { 'NAME': '超冻', 'ID': 'CTN4' });
var CTN3 = Ext.create('PriceCTNTYPE', { 'NAME': '小开顶', 'ID': 'CTN3' });
var CTN4 = Ext.create('PriceCTNTYPE', { 'NAME': '大开顶', 'ID': 'CTN4' });
var CTN5 = Ext.create('PriceCTNTYPE', { 'NAME': '小框架', 'ID': 'CTN5' });
var CTN6 = Ext.create('PriceCTNTYPE', { 'NAME': '大框架', 'ID': 'CTN6' });
var _blank = Ext.create('PriceCTNTYPE', { 'NAME': '', 'ID': '' });
storeCT.add(_blank);
storeCT.add(CTN0);
@ -332,7 +334,8 @@ function getPriceCtnTypeStore() {
storeCT.add(CTN2);
storeCT.add(CTN3);
storeCT.add(CTN4);
storeCT.add(CTN5);
storeCT.add(CTN6);
return storeCT;
}

@ -15,6 +15,7 @@ using System.Web;
using System.IO;
using System.Globalization;
using System.Web.Script.Serialization;
using DSWeb.Areas.CommMng.DAL;
namespace DSWeb.Areas.TruckMng.Controllers
{
@ -197,6 +198,16 @@ namespace DSWeb.Areas.TruckMng.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
string name = Request.Files[0].FileName;
string ext = Path.GetExtension(name).ToLower();
string[] allowExt = new string[] { ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".pdf" };
if (!allowExt.Contains(ext))
{
var result = new DBResult();
result.SetErrorInfo("不允许上传此类文件");
return BasicDataRefDAL.GetContentResult(result);
}
var imgFile = Request.Files["file"];
var truckNo = Request.Form["TruckNo"].ToString().Trim();
var Cert_Type = Request.Form["Cert_Type"].ToString().Trim();

@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>D:\DONGSHENG7\DS7HYRD\DSWeb\Properties\PublishProfiles\配置文件1.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\DS7_HYRD\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 178 KiB

Loading…
Cancel
Save