DS7_JingHan
hanxuntao 2 years ago
parent 4a5189bce4
commit 1a2994783a

@ -403,7 +403,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append(" SELECT GID,LINKGID,BILLSTATUS,CUSTOMERNAME,INVOICECUSTNAME,AMOUNT,CURRENCY,REMARK,CUSTRATENO,CUSTADDRTEL,CUSTBANK,CUSTTEL,CUSTADDR "); strSql.Append(" SELECT GID,LINKGID,BILLSTATUS,CUSTOMERNAME,INVOICECUSTNAME,AMOUNT,CURRENCY,REMARK,CUSTRATENO,CUSTADDRTEL,CUSTBANK,CUSTTEL,CUSTADDR ");
strSql.Append(",EMAIL,GOODSNAME,(Select GOODNAME from code_goods_inv where GID=ch_fee_invoiceapplication_detail.GOODSNAME) AS GOODSNAMEREF"); strSql.Append(",EMAIL,GOODSNAME,(Select GOODNAME from code_goods_inv where GID=ch_fee_invoiceapplication_detail.GOODSNAME) AS GOODSNAMEREF");
strSql.Append(",(SELECT TOP 1 INVOICENO FROM ch_fee_invoice WHERE BILLNO = ch_fee_invoiceapplication_detail.INVBILLNO) INVOICENO "); strSql.Append(",(SELECT TOP 1 INVOICENO FROM ch_fee_invoice WHERE BILLNO = ch_fee_invoiceapplication_detail.INVBILLNO) INVOICENO,INVOICELINE ");
strSql.Append(" FROM ch_fee_invoiceapplication_detail "); strSql.Append(" FROM ch_fee_invoiceapplication_detail ");
if (!string.IsNullOrEmpty(strCondition)) if (!string.IsNullOrEmpty(strCondition))
@ -457,6 +457,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
data.GOODSNAME = Convert.ToString(reader["GOODSNAME"]); data.GOODSNAME = Convert.ToString(reader["GOODSNAME"]);
data.GOODSNAMEREF = Convert.ToString(reader["GOODSNAMEREF"]); data.GOODSNAMEREF = Convert.ToString(reader["GOODSNAMEREF"]);
data.INVOICENO = Convert.ToString(reader["INVOICENO"]); data.INVOICENO = Convert.ToString(reader["INVOICENO"]);
data.INVOICELINE = Convert.ToString(reader["INVOICELINE"]);
#endregion #endregion
headList.Add(data); headList.Add(data);
@ -483,13 +484,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
var cmdInsert = var cmdInsert =
db.GetSqlStringCommand( db.GetSqlStringCommand(
@"insert into ch_fee_invoiceapplication_detail (GID,BILLSTATUS,LINKGID,CUSTOMERNAME,INVOICECUSTNAME,AMOUNT,CURRENCY,REMARK,CUSTRATENO,CUSTADDRTEL,CUSTBANK,CUSTTEL,CUSTADDR,EMAIL,GOODSNAME) @"insert into ch_fee_invoiceapplication_detail (GID,BILLSTATUS,LINKGID,CUSTOMERNAME,INVOICECUSTNAME,AMOUNT,CURRENCY,REMARK,CUSTRATENO,CUSTADDRTEL,CUSTBANK,CUSTTEL,CUSTADDR,EMAIL,GOODSNAME,INVOICELINE)
values (@GID,@BILLSTATUS,@LINKGID,@CUSTOMERNAME,@INVOICECUSTNAME,@AMOUNT,@CURRENCY,@REMARK,@CUSTRATENO,@CUSTADDRTEL,@CUSTBANK,@CUSTTEL,@CUSTADDR,@EMAIL,@GOODSNAME) "); values (@GID,@BILLSTATUS,@LINKGID,@CUSTOMERNAME,@INVOICECUSTNAME,@AMOUNT,@CURRENCY,@REMARK,@CUSTRATENO,@CUSTADDRTEL,@CUSTBANK,@CUSTTEL,@CUSTADDR,@EMAIL,@GOODSNAME,@INVOICELINE) ");
var cmdUpdate = var cmdUpdate =
db.GetSqlStringCommand( db.GetSqlStringCommand(
@"update ch_fee_invoiceapplication_detail set CUSTOMERNAME=@CUSTOMERNAME,INVOICECUSTNAME=@INVOICECUSTNAME,AMOUNT=@AMOUNT,CURRENCY=@CURRENCY,REMARK=@REMARK,CUSTRATENO=@CUSTRATENO @"update ch_fee_invoiceapplication_detail set CUSTOMERNAME=@CUSTOMERNAME,INVOICECUSTNAME=@INVOICECUSTNAME,AMOUNT=@AMOUNT,CURRENCY=@CURRENCY,REMARK=@REMARK,CUSTRATENO=@CUSTRATENO
,CUSTADDRTEL=@CUSTADDRTEL,CUSTBANK=@CUSTBANK,CUSTTEL=@CUSTTEL,CUSTADDR=@CUSTADDR,EMAIL=@EMAIL,GOODSNAME=@GOODSNAME ,CUSTADDRTEL=@CUSTADDRTEL,CUSTBANK=@CUSTBANK,CUSTTEL=@CUSTTEL,CUSTADDR=@CUSTADDR,EMAIL=@EMAIL,GOODSNAME=@GOODSNAME,INVOICELINE=@INVOICELINE
WHERE GID=@GID "); WHERE GID=@GID ");
@ -516,6 +517,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
db.AddInParameter(cmdInsert, "@CUSTADDR", DbType.String, enumValue.CUSTADDR); db.AddInParameter(cmdInsert, "@CUSTADDR", DbType.String, enumValue.CUSTADDR);
db.AddInParameter(cmdInsert, "@EMAIL", DbType.String, enumValue.EMAIL); db.AddInParameter(cmdInsert, "@EMAIL", DbType.String, enumValue.EMAIL);
db.AddInParameter(cmdInsert, "@GOODSNAME", DbType.String, enumValue.GOODSNAME); db.AddInParameter(cmdInsert, "@GOODSNAME", DbType.String, enumValue.GOODSNAME);
db.AddInParameter(cmdInsert, "@INVOICELINE", DbType.String, enumValue.INVOICELINE);
db.ExecuteNonQuery(cmdInsert, tran); db.ExecuteNonQuery(cmdInsert, tran);
} }
else { else {
@ -534,6 +536,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
db.AddInParameter(cmdUpdate, "@CUSTADDR", DbType.String, enumValue.CUSTADDR); db.AddInParameter(cmdUpdate, "@CUSTADDR", DbType.String, enumValue.CUSTADDR);
db.AddInParameter(cmdUpdate, "@EMAIL", DbType.String, enumValue.EMAIL); db.AddInParameter(cmdUpdate, "@EMAIL", DbType.String, enumValue.EMAIL);
db.AddInParameter(cmdUpdate, "@GOODSNAME", DbType.String, enumValue.GOODSNAME); db.AddInParameter(cmdUpdate, "@GOODSNAME", DbType.String, enumValue.GOODSNAME);
db.AddInParameter(cmdUpdate, "@INVOICELINE", DbType.String, enumValue.INVOICELINE);
db.ExecuteNonQuery(cmdUpdate, tran); db.ExecuteNonQuery(cmdUpdate, tran);
} }
@ -695,7 +698,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
head.DbOperationType = DbOperationType.DbotIns; head.DbOperationType = DbOperationType.DbotIns;
head.CURRENCY = "RMB"; head.CURRENCY = "RMB";
head.RECVCURR = body.CURRENCY; head.RECVCURR = body.CURRENCY;
head.INVOICELINE = "p"; head.INVOICELINE = body.INVOICELINE;
foreach (var bank in banklist) { foreach (var bank in banklist) {
if (bank.CURRENCY == body.CURRENCY && bank.ISDEF == "True") { if (bank.CURRENCY == body.CURRENCY && bank.ISDEF == "True") {
head.ACCOUNT = bank.BANKACCOUNT; head.ACCOUNT = bank.BANKACCOUNT;
@ -1876,7 +1879,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) ");
strSql.Append(" LEFT JOIN v_op_gain_cust_sum g ON (g.BSNO=B.BSNO and g.CUSTOMERNAME=f.CUSTOMERNAME) "); strSql.Append(" LEFT JOIN v_op_gain_cust_sum g ON (g.BSNO=B.BSNO and g.CUSTOMERNAME=f.CUSTOMERNAME) ");
strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' "); strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' ");
strSql.Append(" and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); strSql.Append(" and (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' ");
} }
else else
{ {
@ -1889,7 +1892,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append(" FROM CH_FEE f "); strSql.Append(" FROM CH_FEE f ");
strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) ");
strSql.Append(" LEFT JOIN v_op_gain_cust_sum g ON (g.BSNO=B.BSNO and g.CUSTOMERNAME=f.CUSTOMERNAME) "); strSql.Append(" LEFT JOIN v_op_gain_cust_sum g ON (g.BSNO=B.BSNO and g.CUSTOMERNAME=f.CUSTOMERNAME) ");
strSql.Append(" where f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); strSql.Append(" where (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' ");
} }
@ -1905,10 +1908,9 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append(" and " + strCondition); strSql.Append(" and " + strCondition);
} }
if (INVISNOTSTL.PARAMVALUE == "1")
{
strSql.Append(" and ISNULL(f.AMOUNT,0)<>ISNULL(f.SETTLEMENT,0) "); strSql.Append(" and ISNULL(f.AMOUNT,0)<>ISNULL(f.SETTLEMENT,0) ");
}
var isopen = MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid); var isopen = MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid);
if (isopen == false) if (isopen == false)
{ {
@ -1995,7 +1997,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append(" FROM CH_FEE f "); strSql.Append(" FROM CH_FEE f ");
strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) ");
strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' "); strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' ");
strSql.Append(" and f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); strSql.Append(" and (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' ");
} }
else else
@ -2003,7 +2005,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append("SELECT COUNT(*) FROM (select b.BSNO,f.CUSTOMERNAME "); strSql.Append("SELECT COUNT(*) FROM (select b.BSNO,f.CUSTOMERNAME ");
strSql.Append(" FROM CH_FEE f "); strSql.Append(" FROM CH_FEE f ");
strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) ");
strSql.Append(" where f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); strSql.Append(" where (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' ");
} }
if (!string.IsNullOrEmpty(strCondition)) if (!string.IsNullOrEmpty(strCondition))
@ -2576,7 +2578,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append(",(select ShowName from [user] where GID=f.EnteroPerator) as OpName"); strSql.Append(",(select ShowName from [user] where GID=f.EnteroPerator) as OpName");
strSql.Append(",f.INPUTMODE,f.UNIT,f.UNITPRICE,f.QUANTITY,d.DEBITAMOUNT from ch_fee f "); strSql.Append(",f.INPUTMODE,f.UNIT,f.UNITPRICE,f.QUANTITY,d.DEBITAMOUNT from ch_fee f ");
strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' "); strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' ");
strSql.Append(" and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); strSql.Append(" and (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' ");
} }
else else
@ -2587,7 +2589,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append(",f.feeName,f.customerName,f.amount,f.amount-isnull(f.INVOICE,0)-isnull(f.ORDERINVOICE,0)+isnull(f.ORDERINVSETTLEMENT,0) as balamount,f.currency,f.exChangerate,f.AccTaxRate,f.remark"); strSql.Append(",f.feeName,f.customerName,f.amount,f.amount-isnull(f.INVOICE,0)-isnull(f.ORDERINVOICE,0)+isnull(f.ORDERINVSETTLEMENT,0) as balamount,f.currency,f.exChangerate,f.AccTaxRate,f.remark");
strSql.Append(",(select ShowName from [user] where GID=f.EnteroPerator) as OpName"); strSql.Append(",(select ShowName from [user] where GID=f.EnteroPerator) as OpName");
strSql.Append(",f.INPUTMODE,f.UNIT,f.UNITPRICE,f.QUANTITY,0 DEBITAMOUNT from ch_fee f "); strSql.Append(",f.INPUTMODE,f.UNIT,f.UNITPRICE,f.QUANTITY,0 DEBITAMOUNT from ch_fee f ");
strSql.Append(" where f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); strSql.Append(" where (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' ");
} }
var InvAppFeeStatus = MsSysParamSetDAL.GetData("PARAMNAME='InvAppFeeStatus'"); var InvAppFeeStatus = MsSysParamSetDAL.GetData("PARAMNAME='InvAppFeeStatus'");
if (InvAppFeeStatus.PARAMVALUE != "2") if (InvAppFeeStatus.PARAMVALUE != "2")

@ -437,6 +437,9 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoiceapplication
public string EMAIL { get; set; } public string EMAIL { get; set; }
[ModelDB] [ModelDB]
public string GOODSNAME { get; set; } public string GOODSNAME { get; set; }
[ModelDB]
public string INVOICELINE { get; set; }
public string GOODSNAMEREF { get; set; } public string GOODSNAMEREF { get; set; }
public string INVBILLNO { get; set; } public string INVBILLNO { get; set; }

@ -844,6 +844,23 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
displayField: 'CURR' displayField: 'CURR'
}); });
this.StoreINVOICELINE = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsExtEnumModel',
proxy: { url: '/CommMng/PubSys/GetEnumValueList' }
});
this.StoreINVOICELINE.load({ params: { enumTypeId: 80003 } });
this.comboxINVOICELINE = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreINVOICELINE,
forceSelection: true,
name: 'INVOICELINE',
valueField: 'EnumValueName',
displayField: 'EnumValueName'
});
this.GridAppDetailCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); this.GridAppDetailCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
//明细表-数据集 //明细表-数据集
this.storeAppDetailList = Ext.create('Ext.data.Store', { this.storeAppDetailList = Ext.create('Ext.data.Store', {
@ -946,6 +963,12 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
header: '发票抬头', header: '发票抬头',
editor: this.comboxINVOICECUSTNAME2, editor: this.comboxINVOICECUSTNAME2,
width: 180 width: 180
}, {
sortable: false,
dataIndex: 'INVOICELINE',
header: '发票种类',
editor: this.comboxINVOICELINE,
width: 80
}, { }, {
sortable: false, sortable: false,
dataIndex: 'REMARK', dataIndex: 'REMARK',

@ -193,6 +193,7 @@ Ext.define('ChInvoiceapplicationDetail', {
{ name: 'GID', type: 'string' }, { name: 'GID', type: 'string' },
{ name: 'LINKGID', type: 'string' }, { name: 'LINKGID', type: 'string' },
{ name: 'BILLSTATUS', type: 'string' }, { name: 'BILLSTATUS', type: 'string' },
{ name: 'INVOICELINE', type: 'string' },
{ name: 'INVOICECUSTNAME', type: 'string' }, { name: 'INVOICECUSTNAME', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' }, { name: 'CUSTOMERNAME', type: 'string' },
{ name: 'AMOUNT', type: 'string' }, { name: 'AMOUNT', type: 'string' },

@ -1409,6 +1409,12 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, {
}); });
this.comboxINVOICELINE = getEnumcombox({
NAME: 'INVOICELINE',
enumTypeId: 80003
});
this.gridAppDetailList = new Ext.grid.GridPanel({ this.gridAppDetailList = new Ext.grid.GridPanel({
store: this.storeAppDetailList, store: this.storeAppDetailList,
enableHdMenu: false, enableHdMenu: false,
@ -1474,8 +1480,14 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, {
sortable: false, sortable: false,
dataIndex: 'INVOICECUSTNAME', dataIndex: 'INVOICECUSTNAME',
header: '发票抬头', header: '发票抬头',
editor:this.comboxINVOICECUSTNAME2, editor: this.comboxINVOICECUSTNAME2,
width: 180 width: 180
}, {
sortable: false,
dataIndex: 'INVOICELINE',
header: '发票种类',
editor: this.comboxINVOICELINE,
width: 80
}, { }, {
sortable: false, sortable: false,
dataIndex: 'REMARK', dataIndex: 'REMARK',

@ -4326,6 +4326,20 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
} }
else else
{ {
if (ctnlist.Count != 0)
{
foreach (var ctn in ctnlist)
{
if (GetCtnEDICode(ctn.CTNALL, "INTTR") == "")
{ error = error + "<br />提单号:" + bill.MBLNO + " 集装箱箱型EDI代码不能为空"; }
if (ctn.CTNNUM == 0)
{ error = error + "<br />提单号:" + bill.MBLNO + " 集装箱箱量不能为空"; }
}
}
} }
if (carrier == "YML") if (carrier == "YML")
@ -5140,9 +5154,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
} }
if (!string.IsNullOrEmpty(bill.PKGTYPE)) if (!string.IsNullOrEmpty(bill.PKGTYPE))
r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":CEL+" + bill.PKGTYPE + "'"); r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":+" + bill.PKGTYPE + "'");
else else
r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":CEL'"); r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":'");
if (string.IsNullOrEmpty(billams.ATTN)) if (string.IsNullOrEmpty(billams.ATTN))
{ {
@ -7068,6 +7082,33 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
} }
} }
#endregion #endregion
}
else {
var bsno = "";
if (isbill != 1)
bsno = bill.BSNO;
else
bsno = OpBill.AS_ID;
var ctnlist = MsOpSeaeDAL.MsOpSeaeDAL.GetBodyList("BSNO='" + bsno + "'");
if (ctnlist.Count == 0) { error = error + "<br />提单号:" + bill.MBLNO + " 集装箱信息不能为空"; }
else
{
Decimal dlPKGS = 0;
Decimal dlKGS = 0;
Decimal dlCBM = 0;
foreach (var ctn in ctnlist)
{
if (GetCtnEDICode(ctn.CTNALL, "HANJIN") == "")
{ error = error + "<br />提单号:" + bill.MBLNO + " 集装箱箱型EDI代码不能为空"; }
if (ctn.CTNNUM == 0)
{ error = error + "<br />提单号:" + bill.MBLNO + " 集装箱箱量不能为0"; }
}
}
} }
#region 收货人、通知人邮编、国家代码、税号货物NCM编码 #region 收货人、通知人邮编、国家代码、税号货物NCM编码
if (filetype == "E") if (filetype == "E")
@ -11038,6 +11079,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (ctn.CTNALL == null || ctn.CTNALL == "") if (ctn.CTNALL == null || ctn.CTNALL == "")
{ error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; } { error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; }
if (ctn.CTNNUM == 0)
{ error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; }
if (filetype != "B") if (filetype != "B")
{ {
if (ctn.CNTRNO == null || ctn.CNTRNO == "") if (ctn.CNTRNO == null || ctn.CNTRNO == "")
@ -12419,6 +12462,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (ctn.CTNALL == null || ctn.CTNALL == "") if (ctn.CTNALL == null || ctn.CTNALL == "")
{ error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; } { error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; }
if (ctn.CTNNUM == 0)
{ error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; }
if (filetype != "B") if (filetype != "B")
{ {
if (ctn.CNTRNO == null || ctn.CNTRNO == "") if (ctn.CNTRNO == null || ctn.CNTRNO == "")
@ -13288,7 +13334,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (string.IsNullOrEmpty(GetCtnEDICode(ctn.CTNALL, type))) if (string.IsNullOrEmpty(GetCtnEDICode(ctn.CTNALL, type)))
{ error = error + "|提单号:" + bill.MBLNO + "箱型代码不能为空!"; } { error = error + "|提单号:" + bill.MBLNO + "箱型代码不能为空!"; }
if (ctn.CTNNUM==0)
{ error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; }
if (filetype != "B") if (filetype != "B")
{ {
@ -16648,14 +16695,16 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
tempstr += GetSpaceStr("", 4);//12 //SCAC Code//O//X(4)//233 //236 // tempstr += GetSpaceStr("", 4);//12 //SCAC Code//O//X(4)//233 //236 //
tempstr += GetSpaceStr("", 14);//13 //Filler//M//X(14)//237 //250 //Spaces tempstr += GetSpaceStr("", 14);//13 //Filler//M//X(14)//237 //250 //Spaces
tempstr = GetSpaceStr(tempstr, 236); tempstr = GetSpaceStr(tempstr, 236);
//if (!string.IsNullOrEmpty(bill.SERVICECONTRACTNO))//运费预付
//{ tempstr += GetSpaceStr(OpAms.SalesRepCode, 14);//13 //Filler//M//X(14)//237 //250 //Spaces
// tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code if (!string.IsNullOrEmpty(bill.SERVICECONTRACTNO))//运费预付
//} {
//else tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code
//{ }
// tempstr += GetSpaceStr("CN900160", 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填 else
//} {
tempstr += GetSpaceStr("CN900160", 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填
}
r.WriteLine(GetSpaceStr(tempstr, 250)); r.WriteLine(GetSpaceStr(tempstr, 250));
#endregion #endregion
@ -17510,11 +17559,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
} }
if (OpAms.BYCOUNTRY == "USA") if (OpAms.BYCOUNTRY == "USA")
{ {
tempstr += GetSpaceStr(bill.CONTRACTNO, 10);//10//Service Contract #//C//X(10)//31//40//Applicable to US shipments only//"mandtory for US shpts---Service Contract Nbr/TAA Nbr"//美国线的S/C,TAA//服务合同#//只适用于美国装运 tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//10//Service Contract #//C//X(10)//31//40//Applicable to US shipments only//"mandtory for US shpts---Service Contract Nbr/TAA Nbr"//美国线的S/C,TAA//服务合同#//只适用于美国装运
} }
else else
{ {
tempstr += GetSpaceStr(bill.CONTRACTNO, 10);//10//Service Contract #//C//X(10)//31//40//Applicable to US shipments only//"mandtory for US shpts---Service Contract Nbr/TAA Nbr"//美国线的S/C,TAA//服务合同#//只适用于美国装运 tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//10//Service Contract #//C//X(10)//31//40//Applicable to US shipments only//"mandtory for US shpts---Service Contract Nbr/TAA Nbr"//美国线的S/C,TAA//服务合同#//只适用于美国装运
} }
tempstr += GetSpaceStr("", 5);//11//Prepaid at (Port code)//M//X(5)//41//45//Ocean Freight Payment Location//预付(港码)//海运付款地点 tempstr += GetSpaceStr("", 5);//11//Prepaid at (Port code)//M//X(5)//41//45//Ocean Freight Payment Location//预付(港码)//海运付款地点
tempstr += GetSpaceStr("", 5);//12//Payable at (Port Code)//M//X(5)//46//50//1st Collect Charge Payment Location//按(港口代码)支付//第一收取缴费地点 tempstr += GetSpaceStr("", 5);//12//Payable at (Port Code)//M//X(5)//46//50//1st Collect Charge Payment Location//按(港口代码)支付//第一收取缴费地点
@ -17611,8 +17660,18 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
tempstr += GetSpaceStr("", 6);//6//Filler//M//X(6)//36//41// tempstr += GetSpaceStr("", 6);//6//Filler//M//X(6)//36//41//
tempstr += DateTime.Now.ToString("yyyyMMddHHmm");//7//File Send time//M//9(12)//42//53//YYYYMMDDHHMM tempstr += DateTime.Now.ToString("yyyyMMddHHmm");//7//File Send time//M//9(12)//42//53//YYYYMMDDHHMM
tempstr += GetSpaceStr("", 1);//8//Filler//M//X(1)//54//54//Spaces tempstr += GetSpaceStr("", 1);//8//Filler//M//X(1)//54//54//Spaces
if (headData[0].BLFRT == "FREIGHT PREPAID")
{
tempstr += portload;//9//Sender Port Code//M//X(5)//55//59//
tempstr += portload;//10//Receiver Port Code//M//X(5)//60//64//
}
else
{
tempstr += portload;//9//Sender Port Code//M//X(5)//55//59// tempstr += portload;//9//Sender Port Code//M//X(5)//55//59//
tempstr += GetSpaceStr(GetPortEDICode(headData[0].PORTDISCHARGEID, "PIL"), 5);//10//Receiver Port Code//M//X(5)//60//64// tempstr += GetSpaceStr(GetPortEDICode(headData[0].PORTDISCHARGEID, "PIL"), 5);//10//Receiver Port Code//M//X(5)//60//64//
}
if (filetype == "E") if (filetype == "E")
{ {
tempstr += "4.02";//11//EDI Version//M//X(4) //65//68//Default to "PBK" / esi:4.01 tempstr += "4.02";//11//EDI Version//M//X(4) //65//68//Default to "PBK" / esi:4.01
@ -20435,6 +20494,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (ctn.CTNALL == null || ctn.CTNALL == "") if (ctn.CTNALL == null || ctn.CTNALL == "")
{ error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; } { error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; }
if (ctn.CTNNUM == 0)
{ error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; }
if (filetype != "B") if (filetype != "B")
{ {
if (ctn.CNTRNO == null || ctn.CNTRNO == "") if (ctn.CNTRNO == null || ctn.CNTRNO == "")

@ -1519,14 +1519,38 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
}] }]
}, this.comboxOP, { }, this.comboxOP, {
fieldLabel: Zi.LAN.CONTRACTNO, fieldLabel: Zi.LAN.CONTRACTNO,
name: 'CONTRACTNO' name: 'CONTRACTNO',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formHead.getForm().findField('CONTRACTNO')
.setValue(field.rawValue.toUpperCase());
}
}
}, { }, {
fieldLabel: Zi.LAN.SERVICECONTRACTNO, //'服务合同号', fieldLabel: Zi.LAN.SERVICECONTRACTNO, //'服务合同号',
//flex: 0.5, //flex: 0.5,
name: 'SERVICECONTRACTNO' name: 'SERVICECONTRACTNO',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formHead.getForm().findField('SERVICECONTRACTNO')
.setValue(field.rawValue.toUpperCase());
}
}
}, { }, {
fieldLabel: Zi.LAN.APPLYNO, //'申请放箱号', fieldLabel: Zi.LAN.APPLYNO, //'申请放箱号',
name: 'APPLYNO' name: 'APPLYNO',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formHead.getForm().findField('APPLYNO')
.setValue(field.rawValue.toUpperCase());
}
}
}, this.comboxDept }, this.comboxDept
] ]
}, { }, {
@ -1538,12 +1562,28 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
fieldLabel: Zi.LAN.OPERATORTEL, //'TEL', fieldLabel: Zi.LAN.OPERATORTEL, //'TEL',
//labelWidth: 25, //labelWidth: 25,
//flex: 0.6, //flex: 0.6,
name: 'OPERATORTEL' name: 'OPERATORTEL',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formHead.getForm().findField('OPERATORTEL')
.setValue(field.rawValue.toUpperCase());
}
}
}, { }, {
fieldLabel: 'EMAIL', //'发票号', fieldLabel: 'EMAIL', //'发票号',
//labelWidth: 30, //labelWidth: 30,
//flex: 0.6, //flex: 0.6,
name: 'MAILPROJECT' name: 'MAILPROJECT',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formHead.getForm().findField('MAILPROJECT')
.setValue(field.rawValue.toUpperCase());
}
}
}] }]
}, { }, {
xtype: 'container', xtype: 'container',
@ -1588,7 +1628,15 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
}] }]
}, this.comboxBLFRT, { }, this.comboxBLFRT, {
fieldLabel: Zi.LAN.INSPECTIONNO, //'商检单号', fieldLabel: Zi.LAN.INSPECTIONNO, //'商检单号',
name: 'INSPECTIONNO' name: 'INSPECTIONNO',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formHead.getForm().findField('INSPECTIONNO')
.setValue(field.rawValue.toUpperCase());
}
}
} }
//, { //, {

Loading…
Cancel
Save