DS7_JingHan
hanxuntao 2 years ago
parent 045798da93
commit b3bea05d55

@ -354,6 +354,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_bankdata
string[] aryLine;
//标示列数
int columnCount=0;
int headcount = 0;
int startline = 8;
int line = 0;
//标示是否是读取的第一行
@ -372,9 +373,9 @@ namespace DSWeb.Areas.Account.DAL.Chfee_bankdata
{
aryLine = strLine.Split(',');
IsFirst = false;
columnCount = aryLine.Length;
headcount = aryLine.Length;
//创建列
for (int i = 0; i < columnCount; i++)
for (int i = 0; i < headcount; i++)
{
DataColumn dc = new DataColumn(aryLine[i]);
dt.Columns.Add(dc);
@ -384,6 +385,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_bankdata
{
string[] stringSeparators = new string[] { "\",\"" };
aryLine = strLine.Split(stringSeparators, StringSplitOptions.None);
columnCount = aryLine.Length;
if (columnCount < headcount) {
aryLine = strLine.Split(',');
columnCount = aryLine.Length;
}
DataRow dr = dt.NewRow();
for (int j = 0; j < columnCount; j++)
{

@ -4543,6 +4543,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
detail.LINKGID = "*";
detail.INVOICECUSTNAME = headData.INVOICECUSTNAME;
detail.CURRENCY = "USD";
detail.INVOICELINE = "p";
detail.AMOUNT = headData.OTCURRAMOUNT;
detail.CUSTRATENO = headData.CUSTRATENO;
detail.CUSTTEL = GetTelephoneList(headData.CUSTADDRTEL);
@ -4588,6 +4589,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
detail.LINKGID = "*";
detail.INVOICECUSTNAME = headData.INVOICECUSTNAME;
detail.CURRENCY = "RMB";
detail.INVOICELINE = "p";
detail.AMOUNT = headData.APPLYAMOUNT;
detail.CUSTRATENO = headData.CUSTRATENO;
detail.CUSTTEL = GetTelephoneList(headData.CUSTADDRTEL);
@ -4636,6 +4638,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
detail.LINKGID = "*";
detail.INVOICECUSTNAME = headData.INVOICECUSTNAME;
detail.CURRENCY = "RMB";
detail.INVOICELINE = "p";
detail.AMOUNT = headData.AMOUNT;
detail.CUSTRATENO = headData.CUSTRATENO;
detail.CUSTTEL = GetTelephoneList(headData.CUSTADDRTEL);
@ -4684,6 +4687,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
detail.LINKGID = "*";
detail.INVOICECUSTNAME = headData.INVOICECUSTNAME;
detail.CURRENCY = "USD";
detail.INVOICELINE = "p";
detail.AMOUNT = headData.AMOUNT;
detail.CUSTRATENO = headData.CUSTRATENO;
detail.CUSTTEL = GetTelephoneList(headData.CUSTADDRTEL);

@ -636,6 +636,14 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
this.PrintSelect();
},
scope: this
}, '-', {
id: 'btnSubmitBack',
text: '撤销未开票申请',
tooltip: '驳回未开票申请',
handler: function (button, event) {
this.onSubmitBackClick();
},
scope: this
}
]
});
@ -826,33 +834,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
store: this.storeListINVCLIENT2,
name: 'INVOICECUSTNAME',
valueField: 'INVOICECUSTNAME',
displayField: 'INVOICECUSTNAME',
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
var recs = DsStoreQueryBy(this.storeListINVCLIENT, 'INVOICECUSTNAME', records[0].data.INVOICECUSTNAME);
var CUSTRATENO = this.formEdit.getForm().findField('CUSTRATENO');
var CUSTADDRTEL = this.formEdit.getForm().findField('CUSTADDRTEL');
var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK');
var CURR = this.formEdit.getForm().findField('RECVCURR').getValue();
if (recs.getCount() > 0) {
var data = recs.getAt(0).data;
CUSTRATENO.setValue(data.CUSTRATENO);
CUSTADDRTEL.setValue(data.CUSTADDRTEL);
if (CURR == 'RMB') {
CUSTBANK.setValue(data.CUSTBANK);
} else if (CURR == 'USD') {
CUSTBANK.setValue(data.CUSTUSDBANK);
}
} else {
CUSTRATENO.setValue('');
CUSTADDRTEL.setValue('');
CUSTBANK.setValue('');
}
}
}
}
displayField: 'INVOICECUSTNAME'
});
@ -1536,7 +1518,6 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
if (r.length == 0) {
var sql = " BILLNO='11111111' ";
this.formEdit.getForm().reset();
this.storeBodyListdetail.load({ params: { condition: sql} });
this.storeBodySum.load({ params: { condition: sql} });
this.storeDetailList.load({ params: { condition: " PID='11'"} });
@ -1561,8 +1542,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
if (r.length == 0) {
var sql = " BILLNO='11111111' ";
this.formEdit.getForm().reset();
this.storeBodyListdetail.load({ params: { condition: sql} });
this.storeBodyListdetail.load({ params: { condition: sql} });
this.storeBodySum.load({ params: { condition: sql} });
this.storeDetailList.load({ params: { condition: " PID='11'"} });
@ -1607,12 +1587,23 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
}
} else if (e.field == 'INVOICELINE') {
var INVOICELINE = e.record.data['INVOICELINE'];
var records = DsStoreQueryBy(this.StoreINVOICELINE, 'EnumValueId', e.value);
var INVOICELINEREF = '';
if (records.getCount() > 0) {
var data = records.getAt(0).data;
var CLIENTNAME = data.EnumValueName;
e.record.set('INVOICELINEREF', CLIENTNAME);
INVOICELINEREF = data.EnumValueName;
e.record.set('INVOICELINEREF', INVOICELINEREF);
}
for (var j = 0; j < this.storeAppDetailList.getCount(); j += 1) {
var memberbody = this.storeAppDetailList.getAt(j);
if (memberbody.data.INVOICELINE == "") {
memberbody.set("INVOICELINE", INVOICELINE);
memberbody.set("INVOICELINEREF", INVOICELINEREF);
memberbody.commit();
}
};
}
},
@ -1646,12 +1637,15 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
var CUSTBANK = selections[0].data.CUSTBANK;
var record = Ext.create('ChInvoiceapplicationDetail', {
GID: NewGuid(),
LINKGID: '*',
INVOICECUSTNAME: INVOICECUSTNAME,
CURRENCY: CURRENCY,
AMOUNT: 0,
INVOICELINE:'p',
INVOICELINEREF: '普通发票(电票)',
REMARK: REMARK,
CUSTRATENO: CUSTRATENO,
CUSTADDRTEL: CUSTADDRTEL,
@ -1995,6 +1989,49 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
winExrateShow.show();
},
onSubmitBackClick: function () {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var billNo = record.data.BILLNO;
Ext.Ajax.request({
waitMsg: '正在添加数据...',
url: '/Account/Chfee_invoiceapplication/SubmitBack',
params: {
bill: billNo
},
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;
} else {
_this.storeBodyListdetail.reload();
_this.storeBodySum.reload();
_this.storeAppDetailList.reload();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
},
PrintSelect: function () {

@ -3368,7 +3368,7 @@ LoadData: function (opstatus, condition) {
_this.addBill();
} else {
Ext.MessageBox.alert('提示', '无添加发票申请费用明细!');
//Ext.MessageBox.alert('提示', '无添加发票申请费用明细!');
}
}
}
@ -4390,42 +4390,21 @@ addBill: function () {
var Duino = this.formEdit.getForm().findField('BILLNO').getValue();
_this = this;
if (this.bsnosql != undefined) {
if (this.bsCust != undefined) {
//var recs = DsStoreQueryBy(this.storeInvCustCodeAdd, 'CustName', this.bsCust);
//var INVOICECUSTNAME = this.formEdit.getForm().findField('INVOICECUSTNAME');
//var CUSTRATENO = this.formEdit.getForm().findField('CUSTRATENO');
//var CUSTADDRTEL = this.formEdit.getForm().findField('CUSTADDRTEL');
//var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK');
//var CURRFIELD = this.formEdit.getForm().findField('CURRENCY');
//var CURR = CURRFIELD.getValue();
//if (recs.getCount() > 0) {
// var data = recs.getAt(0).data;
// INVOICECUSTNAME.setValue(data.BillRises1);
// CUSTRATENO.setValue(data.TaxNo);
// if (data.INVADDRTEL == '')
// CUSTADDRTEL.setValue(data.Addr + ' ' + data.Tel);
// else
// CUSTADDRTEL.setValue(data.INVADDRTEL);
// CUSTBANK.setValue(data.RMBBank);
//} else {
// INVOICECUSTNAME.setValue('');
// CUSTRATENO.setValue('');
// CUSTADDRTEL.setValue('');
// CUSTBANK.setValue('');
//}
//if (this.bsnosql != undefined) {
// if (this.bsCust != undefined) {
}
// }
this.Save('0', '1');
return;
}
// this.Save('0', '1');
// return;
//}
if ((Duino == '*') || basicForm.isDirty()) {
@ -4434,7 +4413,7 @@ addBill: function () {
var CURR = this.formEdit.getForm().findField('CURRENCY').getValue();
if ((CUSTOMERNAME == '') || (CUSTOMERNAME == null) || (CURR == '') || (CURR == null)) {
if ((CUSTOMERNAME == '') || (CUSTOMERNAME == null)) {
if (this.storeAddFeeList.getCount() > 0) {
var rec = this.storeAddFeeList.getAt(0);
var cust = rec.data.CustomerName;
@ -4510,17 +4489,17 @@ addBill: function () {
} else {
btnEAddbill.enable();
btnEAddDetail.enable();
Ext.Msg.show({ title: '提示', msg: '结算客户和币别不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
Ext.Msg.show({ title: '提示', msg: '开票客户不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
if (!basicForm.isValid()) {
btnEAddbill.enable();
btnEAddDetail.enable();
return;
}
//if (!basicForm.isValid()) {
// btnEAddbill.enable();
// btnEAddDetail.enable();
// return;
//}
var type = 0;
var PAYCOMPANYID = Ext.getCmp('PAYCOMPANYID').getValue();

@ -192,7 +192,7 @@ namespace DSWeb.Areas.CommMng.DAL
strSql.Append("SELECT ");
strSql.Append("l.USERID GID,u.CODENAME UserCode,u.SHOWNAME UserName,u.CODENAME+'-'+u.SHOWNAME CodeAndName,");
strSql.Append("l.OFFICEPHONE Tel,l.FAX Fax,l.EMAIL1 Email,l.DEPTNAME,c.COMPANYID");
strSql.Append(",(select TEAM from user_team where ISDEF='1' AND USERID=u.GID) TEAM");
strSql.Append(",(select top 1 TEAM from user_team where ISDEF='1' AND USERID=u.GID) TEAM");
strSql.Append(" from [user] u left join user_baseinfo l on (u.gid=l.USERID) ");
strSql.Append(" left join user_company c on (u.gid=c.USERID) ");
@ -213,7 +213,7 @@ namespace DSWeb.Areas.CommMng.DAL
strSql.Append("SELECT ");
strSql.Append("l.USERID GID,u.USERNAME UserCode,u.SHOWNAME UserName,u.CODENAME+'-'+u.SHOWNAME CodeAndName,");
strSql.Append("l.OFFICEPHONE Tel,l.FAX Fax,l.EMAIL1 Email,l.DEPTNAME,c.COMPANYID");
strSql.Append(",(select TEAM from user_team where ISDEF='1' AND USERID=u.GID) TEAM");
strSql.Append(",(select top 1 TEAM from user_team where ISDEF='1' AND USERID=u.GID) TEAM");
strSql.Append(" from [user] u left join user_baseinfo l on (u.gid=l.USERID) ");
strSql.Append(" left join user_company c on (u.gid=c.USERID) ");
strSql.Append(" where c.companyid='" + COMPANYID + "' ");

@ -966,12 +966,12 @@ namespace DSWeb.MvcShipping.Controllers
public ContentResult GetMblIsRepeat(string bsno, string mblno)
{
var dept = Convert.ToString(Session["DEPTNAME"]).ToString().Trim();
var user = BasicDataRefDAL.GetUserLinkRef("u.GID='" + Convert.ToString(Session["USERID"]).ToString().Trim() + "'", Convert.ToString(Session["COMPANYID"]));
if (dept == "市场部") {
var json = JsonConvert.Serialize(new { Success = false, Message = "查询成功" });
return new ContentResult() { Content = json };
}
var ct = MsOpSeaeDAL.GetRdCount("MASTERNO<>'" + bsno + "' AND MBLNO='" + mblno + "' and CORPID='" + Convert.ToString(Session["COMPANYID"]) + "' and SALEDEPT='"+ dept + "'");
var ct = MsOpSeaeDAL.GetRdCount("MASTERNO<>'" + bsno + "' AND MBLNO='" + mblno + "' and CORPID='" + Convert.ToString(Session["COMPANYID"]) + "' and SALEDEPT='"+ dept + "' AND SALECORPID='"+ user.TEAM+"'");
if (ct != 0)
{
var json = JsonConvert.Serialize(new { Success = true, Message = "提单号重复!" });

@ -887,7 +887,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
}
else
{
strSql.Append(" order by BSDATE desc");
var SeaeDefaultSort = MsSysParamSetDAL.GetData("PARAMNAME='SeaeDefaultSort'");
if (SeaeDefaultSort.PARAMVALUE != "")
strSql.Append(" order by " + SeaeDefaultSort.PARAMVALUE);
else
strSql.Append(" order by BSDATE desc");
}
result.Data = strSql.ToString();
result.Message = strCondition;
@ -1877,6 +1881,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
var iscreatecustno = false;
var custno = "";
var billnoset = MsSysBillNoSetDAL.GetData("OPLBNAME='海运出口' AND RULEBLNO='委托编号' ", companyid);
if (billnoset.BILLTYPE != "")
isuse = true;
else
@ -1902,16 +1907,16 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
var HBLCUSTOMHEAD = billnoset.CUSTOMHEAD;
if ((HBLCUSTOMHEAD.IndexOf("[SALE]") >= 0) && !string.IsNullOrEmpty(headData.SALE))
{
var user = SysUserDAL.GetData("u.SHOWNAME='" + headData.SALE + "'");
if (!string.IsNullOrEmpty(user.NOCODE))
HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[SALE]", user.NOCODE);
var Saleuser = SysUserDAL.GetData("u.SHOWNAME='" + headData.SALE + "'");
if (!string.IsNullOrEmpty(Saleuser.NOCODE))
HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[SALE]", Saleuser.NOCODE);
}
if ((HBLCUSTOMHEAD.IndexOf("[OP]") >= 0) && !string.IsNullOrEmpty(headData.OP))
{
var user = SysUserDAL.GetData("u.SHOWNAME='" + headData.OP + "'");
if (!string.IsNullOrEmpty(user.NOCODE))
HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[OP]", user.NOCODE);
var Opuser = SysUserDAL.GetData("u.SHOWNAME='" + headData.OP + "'");
if (!string.IsNullOrEmpty(Opuser.NOCODE))
HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[OP]", Opuser.NOCODE);
}
CUSTOMHEAD = HBLCUSTOMHEAD;
var CUST = MsInfoClientDAL.GetData("SHORTNAME='" + headData.CUSTOMERNAME + "'");
@ -1967,8 +1972,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
headData.SALEDEPT = OPUSER.DEPTNAME;
}
var user = BasicDataRefDAL.GetUserLinkRef("u.GID='" + userid + "'", companyid);
if (headData.MBLNO != "" && headData.MBLNO != null && headData.BLTYPE != "拼箱分票"&&headData.SALEDEPT!= "市场部")
{
@ -1976,7 +1981,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
if (OPLISTNOCANCEL == "1")
{
var ct = MsOpSeaeDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND ISCANCEL<>'1' AND MBLNO='" + headData.MBLNO + "' and SALEDEPT='" + headData.SALEDEPT + "' ");
var ct = MsOpSeaeDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND ISCANCEL<>'1' AND MBLNO='" + headData.MBLNO + "' and SALEDEPT='" + headData.SALEDEPT + "' AND SALECORPID='"+user.TEAM+"' ");
if (ct != 0)
{
isPost = false;
@ -1986,7 +1991,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
else
{
var ct = MsOpSeaeDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND MBLNO='" + headData.MBLNO + "' and SALEDEPT='" + headData.SALEDEPT + "' ");
var ct = MsOpSeaeDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND MBLNO='" + headData.MBLNO + "' and SALEDEPT='" + headData.SALEDEPT + "' AND SALECORPID='"+user.TEAM+"' ");
if (ct != 0)
{
isPost = false;
@ -2045,7 +2050,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
if (headData.SALEDEPT != "市场部")
{
var ct = MsOpSeaeDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND HBLNO='" + headData.HBLNO + "' and SALEDEPT='" + headData.SALEDEPT + "' ");
var ct = MsOpSeaeDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND HBLNO='" + headData.HBLNO + "' and SALEDEPT='" + headData.SALEDEPT + "' AND SALECORPID='"+user.TEAM+"' ");
if (ct != 0)
{
isPost = false;
@ -2062,7 +2067,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
{
if (headData.SALEDEPT != "市场部")
{
var ct = MsOpSeaeDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND APPLYNO='" + headData.APPLYNO + "' and SALEDEPT='" + headData.SALEDEPT + "' ");
var ct = MsOpSeaeDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND APPLYNO='" + headData.APPLYNO + "' and SALEDEPT='" + headData.SALEDEPT + "' AND SALECORPID='"+user.TEAM+"' ");
if (ct != 0)
{
isPost = false;
@ -2104,7 +2109,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
headData.FEESTATUS = false;
headData.DbOperationType = DbOperationType.DbotIns;
headData.ISCANCEL = "0";
var user = BasicDataRefDAL.GetUserLinkRef("u.GID='"+userid+"'", companyid);
headData.SALECORPID = user.TEAM;
if (Convert.ToDateTime(nowperiod.PERIOD + "-01") > Convert.ToDateTime(headData.ACCDATE + "-01"))
{

@ -7238,233 +7238,50 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount++;
#endregion
string sSHIPPERID = "";
if (isbill != 1)
{
if (billams.BYCOUNTRY != "")
{
Shipping = formatEdiStr("txt", billams.AMSSHIPPER);
}
else
{
Shipping = formatEdiStr("txt", bill.SHIPPER);
sSHIPPERID = bill.SHIPPERID;
}
}
else
{
Shipping = formatEdiStr("txt", OpBill.SHIPPER);
sSHIPPERID = OpBill.SHIPPERID;
}
List<System.String> DescriptionShipper = new List<System.String>();
var shipperstr = "";
var isshipper = false;
List<System.String> ShippingList = formatlengthStr(Shipping, 35);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
for (var i = 0; i < ShippingList.Count; i++)
{
if (i == 0) Shipping = "NAD+CZ+++" + ShippingList[0] + "+";
if (i == 1) Shipping = Shipping + ShippingList[i];
if (i == 2 || i == 3) Shipping = Shipping + ":" + ShippingList[i];
if (i >= 4 && ShippingList.Count > 5)
{
if (i == 4)
{
if (ShippingList[i].Length > 34)
{
Shipping = Shipping + ":" + ShippingList[i].Substring(0, 34);
//DescriptionShipper = ShippingList[i].Substring(34);
DescriptionShipper.Add("*" + ShippingList[i].Substring(34));
isshipper = true;
}
else
Shipping = Shipping + ":" + ShippingList[i];
//if (carrier == "HLCU")
//{
// Shipping = Shipping + "-";
// DescriptionShipper = "-" + DescriptionShipper;
//}
//else
//{
Shipping = Shipping + "*";
//DescriptionShipper = "*" + DescriptionShipper;
//}
}
else if (i > 4)
{
if (isshipper)
DescriptionShipper.Add(ShippingList[i]);
else
{
DescriptionShipper.Add("*" + ShippingList[i]);
isshipper = true;
}
//DescriptionShipper.Add("*" + ShippingList[i]);
//DescriptionShipper = DescriptionShipper + " " + ShippingList[i];
}
}
else
if (i == 4) Shipping = Shipping + ":" + ShippingList[i];
}
}
shipperstr = Shipping + "'";
string sCONSIGNEEID = "";
if (isbill != 1)
{
if (billams.BYCOUNTRY != "")
{
Shipping = formatEdiStr("txt", billams.AMSCONSIGNEE);
}
else
{
Shipping = formatEdiStr("txt", bill.CONSIGNEE);
sCONSIGNEEID = bill.CONSIGNEEID;
}
}
else
{
Shipping = formatEdiStr("txt", OpBill.CONSIGNEE);
sCONSIGNEEID = OpBill.CONSIGNEEID;
}
//var DescriptionConsignee = "";
var Consigneestr = "";
isshipper = false;
ShippingList = formatlengthStr(Shipping, 35);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
for (var i = 0; i < ShippingList.Count; i++)
{
if (i == 0) Shipping = "NAD+CN+++" + ShippingList[0] + "+";
if (i == 1) Shipping = Shipping + ShippingList[i];
if (i == 2 || i == 3) Shipping = Shipping + ":" + ShippingList[i];
if (i >= 4 && ShippingList.Count > 5)
{
if (i == 4)
{
if (ShippingList[i].Length > 33)
{
Shipping = Shipping + ":" + ShippingList[i].Substring(0, 33);
DescriptionShipper.Add("**" + ShippingList[i].Substring(33));
isshipper = true;
//DescriptionConsignee = ShippingList[i].Substring(33);
}
else
Shipping = Shipping + ":" + ShippingList[i];
//if (carrier == "HLCU")
//{
// Shipping = Shipping + "--";
// DescriptionConsignee = "--" + DescriptionConsignee;
//}
//else
//{
Shipping = Shipping + "**";
//DescriptionConsignee = "**" + DescriptionConsignee;
//}
}
else if (i > 4)
{
if (isshipper)
DescriptionShipper.Add(ShippingList[i]);
else
{
DescriptionShipper.Add("**" + ShippingList[i]);
isshipper = true;
}
//DescriptionShipper.Add("**" + ShippingList[i]);
//DescriptionConsignee = DescriptionConsignee + " " + ShippingList[i];
}
#region NAD_FW 代理
}
else
if (i == 4) Shipping = Shipping + ":" + ShippingList[i];
}
}
Consigneestr = Shipping + "'";
//if (ftpset.SENDNAME.Length > 35)
// strR += "NAD+FW+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME.Substring(0, 35) + "+" + ftpset.SENDNAME.Substring(35) + "'";
//else
// strR += "NAD+FW+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME + "'";
//icount++;
string sNOTIFYPARTYID = "";
if (isbill != 1)
{
if (billams.BYCOUNTRY != "")
{
Shipping = formatEdiStr("txt", billams.AMSNOTIFYPARTY);
}
else
{
Shipping = formatEdiStr("txt", bill.NOTIFYPARTY);
sNOTIFYPARTYID = bill.NOTIFYPARTYID;
}
}
else
{
Shipping = formatEdiStr("txt", OpBill.NOTIFYPARTY);
sNOTIFYPARTYID = OpBill.NOTIFYPARTYID;
}
//var DescriptionNotifyparty = "";
var Notifypartystr = "";
isshipper = false;
ShippingList = formatlengthStr(Shipping, 35);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
//string sAGENTID = "";
//if (isbill != 1)
//{
// Shipping = formatEdiStr("txt", bill.AGENT);
// sAGENTID = bill.AGENTID;
//}
//else
//{
// Shipping = formatEdiStr("txt", OpBill.AGENT);
// sAGENTID = OpBill.AGENTID;
//}
//List<System.String> ShippingList4 = formatlengthStr(Shipping, 35);
//if (ShippingList4.Count != 0)
//{
// Shipping = "NAD+FW++";
// for (var i = 0; i < ShippingList4.Count; i++)
// {
// if (i == 0)
// {
// Shipping += ShippingList4[i];
// }
// else
// {
// Shipping += ":" + ShippingList4[i];
// }
// }
// strR += Shipping + sAGENTID + "'";
// icount++;
//}
for (var i = 0; i < ShippingList.Count; i++)
{
if (i == 0) Shipping = "NAD+P1+++" + ShippingList[0] + "+";
if (i == 1) Shipping = Shipping + ShippingList[i];
if (i == 2 || i == 3) Shipping = Shipping + ":" + ShippingList[i];
if (i >= 4 && ShippingList.Count > 5)
{
if (i == 4)
{
if (ShippingList[i].Length > 32)
{
Shipping = Shipping + ":" + ShippingList[i].Substring(0, 32);
DescriptionShipper.Add("***" + ShippingList[i].Substring(32));
isshipper = true;
//DescriptionNotifyparty = ShippingList[i].Substring(32);
}
else
Shipping = Shipping + ":" + ShippingList[i];
//if (carrier == "HLCU")
//{
// Shipping = Shipping + "---";
// DescriptionNotifyparty = "---" + DescriptionNotifyparty;
//}
//else
//{
Shipping = Shipping + "***";
//DescriptionNotifyparty = "***" + DescriptionNotifyparty;
//}
}
else if (i > 4)
{
if (isshipper)
DescriptionShipper.Add(ShippingList[i]);
else
{
DescriptionShipper.Add("***" + ShippingList[i]);
isshipper = true;
}
//DescriptionNotifyparty = DescriptionNotifyparty + " " + ShippingList[i];
}
#endregion
}
else
if (i == 4) Shipping = Shipping + ":" + ShippingList[i];
}
}
Notifypartystr = Shipping + "'";
#region FTX_AAA 货描
@ -7497,17 +7314,17 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount++;
}
if (DescriptionShipper != null && DescriptionShipper.Count != 0)
{
foreach (var shipper in DescriptionShipper)
{
if (!string.IsNullOrEmpty(shipper))
{
strR += "FTX+AAA+++" + shipper + "'";
icount = icount + 1;
}
}
}
//if (DescriptionShipper != null && DescriptionShipper.Count != 0)
//{
// foreach (var shipper in DescriptionShipper)
// {
// if (!string.IsNullOrEmpty(shipper))
// {
// strR += "FTX+AAA+++" + shipper + "'";
// icount = icount + 1;
// }
// }
//}
//if (DescriptionShipper != "")
//{
// strR += "FTX+AAA+++" + DescriptionShipper + "'";
@ -7599,17 +7416,96 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount++;
#endregion
#region NAD_CZ 发货人
//#region NAD_CZ 发货人
strR += shipperstr;
icount = icount + 1;
//strR += shipperstr;
//icount = icount + 1;
//#endregion
//#region NAD_CN 收件人
//strR += Consigneestr;
//icount = icount + 1;
//#endregion
#region NAD_CZ 发货人
string sSHIPPERID = "";
if (isbill != 1)
{
if (billams.BYCOUNTRY != "")
{
Shipping = formatEdiStr("txt", billams.AMSSHIPPER);
}
else
{
Shipping = formatEdiStr("txt", bill.SHIPPER);
sSHIPPERID = bill.SHIPPERID;
}
}
else
{
Shipping = formatEdiStr("txt", OpBill.SHIPPER);
sSHIPPERID = OpBill.SHIPPERID;
}
List<System.String> ShippingList = formatlengthStr(Shipping, 35);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
Shipping = "NAD+CZ++";
for (var i = 0; i < ShippingList.Count; i++)
{
if (i == 0)
{
Shipping += ShippingList[i];
}
else
{
Shipping += ":" + ShippingList[i];
}
}
strR += Shipping + sSHIPPERID + "'";
icount++;
}
#endregion
#region NAD_CN 收件人
string sCONSIGNEEID = "";
if (isbill != 1)
{
if (billams.BYCOUNTRY != "")
{
Shipping = formatEdiStr("txt", billams.AMSCONSIGNEE);
}
else
{
Shipping = formatEdiStr("txt", bill.CONSIGNEE);
sCONSIGNEEID = bill.CONSIGNEEID;
}
}
else
{
Shipping = formatEdiStr("txt", OpBill.CONSIGNEE);
sCONSIGNEEID = OpBill.CONSIGNEEID;
}
strR += Consigneestr;
icount = icount + 1;
List<System.String> ShippingList2 = formatlengthStr(Shipping, 35);
if (ShippingList2.Count != 0)
{
Shipping = "NAD+CN++";
for (var i = 0; i < ShippingList2.Count; i++)
{
if (i == 0)
{
Shipping += ShippingList2[i];
}
else
{
Shipping += ":" + ShippingList2[i];
}
}
strR += Shipping + sCONSIGNEEID + "'";
icount++;
}
#endregion
#region NAD_FW 代理
@ -7654,10 +7550,42 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
#endregion
#region NAD_P1 通知人
strR += Notifypartystr;
// r.WriteLine();
icount = icount + 1;
string sNOTIFYPARTYID = "";
if (isbill != 1)
{
if (billams.BYCOUNTRY != "")
{
Shipping = formatEdiStr("txt", billams.AMSNOTIFYPARTY);
}
else
{
Shipping = formatEdiStr("txt", bill.NOTIFYPARTY);
sNOTIFYPARTYID = bill.NOTIFYPARTYID;
}
}
else
{
Shipping = formatEdiStr("txt", OpBill.NOTIFYPARTY);
sNOTIFYPARTYID = OpBill.NOTIFYPARTYID;
}
List<System.String> ShippingList3 = formatlengthStr(Shipping, 35);
if (ShippingList3.Count != 0)
{
Shipping = "NAD+P1++";
for (var i = 0; i < ShippingList3.Count; i++)
{
if (i == 0)
{
Shipping += ShippingList3[i];
}
else
{
Shipping += ":" + ShippingList3[i];
}
}
strR += Shipping + sNOTIFYPARTYID + "'";
icount++;
}
#endregion
#region CPI 付费方式 + LOC 付款地址
@ -20652,6 +20580,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
var contractno = bill.CONTRACTNO;
if (string.IsNullOrEmpty(contractno) && ftpset.SENDCODE == "QJM") contractno = "081546";
//var sendcode = ftpset.SENDCODE;
//if (sendcode == "JMD") sendcode = "QJM";
//提单号
r.WriteLine("02:" + bill.CUSTNO.Trim() + ":" + bill.MBLNO.Trim() + ":" + bill.SERVICE + ":" + ftpset.SENDCODE + ":HMM::::::::"+ contractno + "::" + bill.SERVICECONTRACTNO + "::'");
icount++;
@ -20956,7 +20887,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount++;
}
r.WriteLine("90:" + ftpset.SENDCODE + ":" + ftpset.SENDNAME + ":" + ftpset.SENDCOMPANYCODE + ":" + ftpset.SENDATTN + ":" + ftpset.SENDTEL + ":" + ftpset.SENDTEL + ":" + ftpset.SENDEMAIL + "'");
r.WriteLine("90:" + ftpset.SENDCOMPANYCODE + ":" + ftpset.SENDNAME + ":" + ftpset.SENDCOMPANYCODE + ":" + ftpset.SENDATTN + ":" + ftpset.SENDTEL + ":" + ftpset.SENDTEL + ":" + ftpset.SENDEMAIL + "'");
icount++;
}
icount++;
@ -20994,7 +20925,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (string.IsNullOrEmpty(contractno)&&ftpset.SENDCODE== "QJM") contractno = "081546";
//提单号
r.WriteLine("02:" + bill.MBLNO.Trim() + ":" + bill.MBLNO.Trim() + ":" + bill.SERVICE + ":" + ftpset.SENDCODE + ":HMM::::::::" + contractno + "::" + bill.SERVICECONTRACTNO + "::'");
r.WriteLine("02:" + bill.MBLNO.Trim() + ":" + bill.MBLNO.Trim() + ":" + bill.SERVICE + ":" + ftpset.SENDCOMPANYCODE + ":HMM::::::::" + contractno + "::" + bill.SERVICECONTRACTNO + "::'");
@ -21389,7 +21320,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount++;
}
r.WriteLine("90:" + ftpset.SENDCODE + ":" + ftpset.SENDNAME + ":" + ftpset.SENDCOMPANYCODE + ":" + ftpset.SENDATTN + ":" + ftpset.SENDTEL + ":" + ftpset.SENDTEL + ":" + ftpset.SENDEMAIL + "'");
r.WriteLine("90:" + ftpset.SENDSUBCOMPANYCODE + ":" + ftpset.SENDNAME + ":" + ftpset.SENDSUBCOMPANYCODE + ":" + ftpset.SENDATTN + ":" + ftpset.SENDTEL + ":" + ftpset.SENDTEL + ":" + ftpset.SENDEMAIL + "'");
icount++;
}
icount++;

@ -141,13 +141,20 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
displayField: 'Frt'
});
this.storeFeeNameRefAll = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.FeeTypeRefModel',
proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefListNew' }
});
this.storeFeeNameRefAll.load();
this.storeFeeNameRef = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.FeeTypeRefModel',
proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefListNew' }
});
// this.storeFeeNameRef.load();
//this.storeFeeNameRef.load();
this.comboxFeeNameRef = Ext.create('DsExt.ux.DCombox', {
store: this.storeFeeNameRef,
@ -3199,20 +3206,27 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
this.storeFeeNameRefModify = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.FeeTypeRefModel',
proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefList' }
proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefListNew' }
});
this.storeFeeNameRefModify.load({ params: { condition: ""} });
//this.storeFeeNameRefModify.load({ params: { condition: ""} });
this.comboxFeeNameRefModify = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeFeeNameRefModify,
fieldLabel: Zi.LAN.FEE.FeeName3, //'费用名称',
forceSelection: true,
minChars: 1,
matchFieldWidth: false,
queryMode: 'remote',
lazyRender: false,
queryParam: 'Name',
name: 'FeeName',
valueField: 'Name',
displayField: 'CodeAndName',
listeners: {
beforequery: function (e) {
return FilterCombox(e);
var port = _thisfee.comboxFeeNameRefModify.rawValue;
if (port != '')
e.query = port;
},
specialkey: function (field, e) {
//将回车13转义成tab9
@ -6217,7 +6231,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
var memberyf = selectedRecords[i];
var custtype = '';
var custname = '';
var records = DsStoreQueryBy(this.storeFeeNameRef, 'Name', memberyf.data.FeeName);
var records = DsStoreQueryBy(this.storeFeeNameRefAll, 'Name', memberyf.data.FeeName);
if (records.getCount() > 0) {
var data = records.getAt(0).data;
if (type == 1)
@ -6569,7 +6583,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
var memberyf = store.getAt(i);
var custtype = '';
var custname = '';
var records = DsStoreQueryBy(this.storeFeeNameRef, 'Name', memberyf.data.FeeName);
var records = DsStoreQueryBy(this.storeFeeNameRefAll, 'Name', memberyf.data.FeeName);
if (records.getCount() > 0) {
var data = records.getAt(0).data;
if (type == 1)
@ -9077,10 +9091,10 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
if (e.value =='') return;
}
if (e.field == 'FeeDescription'){
var records = DsStoreQueryBy(this.storeFeeNameRef, 'Description', e.value);
var records = DsStoreQueryBy(this.storeFeeNameRefAll, 'Description', e.value);
} else {
var records = DsStoreQueryBy(this.storeFeeNameRef, 'Name', e.value);
var records = DsStoreQueryBy(this.storeFeeNameRefAll, 'Name', e.value);
var FEENAME = e.value;
}

@ -663,7 +663,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.storeCodeDisport10.load({ params: { PORT: TRANSPORT } });
}
if (combo.value == '太平船务') {
if (combo.value == '太平船务' || combo.value =='大连太平船务') {
this.formAMSPIL.getForm().findField('ShipperEdiCode').setValue('CN900160');
this.formAMSPIL.getForm().findField('ConsigneeEdiCode').setValue('CN900160');
this.formAMSPIL.getForm().findField('NotifypartyEdiCode').setValue('CN900160');
@ -675,14 +675,14 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.formEdit.getForm().findField('COPYNOBILL').setValue('ONE');
}
} else if (combo.value == '现代') {
} else if (combo.value == '现代' || combo.value == '大连现代商船') {
this.formHead.getForm().findField('CONTRACTNO').setValue('081546');
if (ISSUETYPE != '电放') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('ZERO');
}
} else if (combo.value == '海洋网联') {
} else if (combo.value == '海洋网联' || combo.value =="DLONE") {
var ISSUETYPE = this.formEdit.getForm().findField('ISSUETYPE').getValue();
if (ISSUETYPE == '正本') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
@ -695,11 +695,15 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.formEdit.getForm().findField('COPYNOBILL').setValue('ONE');
}
} else if (combo.value == '以星') {
} else if (combo.value == '以星' || combo.value =='大连以星') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('ZERO');
} else if (combo.value == '达飞' || combo.value == '正利航运' || combo.value == 'ANL CONTAINER LINE'
|| combo.value == '赫伯罗特' || combo.value == '汉堡南美' || combo.value == 'MCC' || combo.value == '青岛马士基') {
} else if (combo.value == '达飞' || combo.value == '大连达飞' || combo.value == '正利航运'
|| combo.value == 'ANL CONTAINER LINE'
|| combo.value == '赫伯罗特' || combo.value == '大连赫伯罗特'
|| combo.value == '汉堡南美' || combo.value == 'DLHAMBURG-SUD'
|| combo.value == 'MCC' || combo.value == 'DLMCC'
|| combo.value == '青岛马士基' || combo.value =='DLMSK') {
var ISSUETYPE = this.formEdit.getForm().findField('ISSUETYPE').getValue();
if (ISSUETYPE == '正本' || ISSUETYPE == '电放') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
@ -709,17 +713,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.formEdit.getForm().findField('COPYNOBILL').setValue('ZERO');
}
} else if (combo.value == '海洋网联') {
var ISSUETYPE = this.formEdit.getForm().findField('ISSUETYPE').getValue();
if (ISSUETYPE == '正本') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('THREE');
} else if (ISSUETYPE == '电放') {
this.formEdit.getForm().findField('NOBILL').setValue('ONE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('ONE');
}
} else {
} else {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('ZERO');
}
@ -3784,19 +3778,19 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
'select': function (combo, records, eOpts) {
if (records.length > 0) {
var CARRIER = this.formEdit.getForm().findField('CARRIER').getValue();
if (CARRIER== '太平船务') {
if (CARRIER == '太平船务' || CARRIER == '大连太平船务') {
if (combo.value == '正本') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('ONE');
}
} else if (CARRIER == '现代') {
} else if (CARRIER == '现代' || CARRIER == '大连现代商船') {
if (combo.value != '电放') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('ZERO');
}
} else if (CARRIER == '海洋网联') {
} else if (CARRIER == '海洋网联' || CARRIER == 'DLONE') {
if (combo.value== '正本') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('THREE');
@ -3808,11 +3802,14 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.formEdit.getForm().findField('COPYNOBILL').setValue('ONE');
}
} else if (CARRIER == '以星') {
} else if (CARRIER == '以星' || CARRIER == '大连以星') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('ZERO');
} else if (CARRIER == '达飞' || CARRIER == '正利航运' || CARRIER== 'ANL CONTAINER LINE'
|| CARRIER == '赫伯罗特' || CARRIER == '汉堡南美' || CARRIER == 'MCC' || CARRIER == '青岛马士基') {
} else if (CARRIER == '达飞' || CARRIER == '大连达飞' ||CARRIER == '正利航运' || CARRIER== 'ANL CONTAINER LINE'
|| CARRIER == '赫伯罗特' || CARRIER == '大连赫伯罗特'
|| CARRIER == '汉堡南美' || CARRIER == 'DLHAMBURG-SUD'
|| CARRIER == 'MCC' || CARRIER == 'DLMCC'
|| CARRIER == '青岛马士基' || CARRIER == 'DLMSK') {
if (combo.value == '正本' || combo.value == '电放') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('THREE');
@ -3821,16 +3818,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.formEdit.getForm().findField('COPYNOBILL').setValue('ZERO');
}
} else if (CARRIER == '海洋网联') {
if (combo.value == '正本') {
this.formEdit.getForm().findField('NOBILL').setValue('THREE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('THREE');
} else if (combo.value == '电放') {
this.formEdit.getForm().findField('NOBILL').setValue('ONE');
this.formEdit.getForm().findField('COPYNOBILL').setValue('ONE');
}
} else {
} else {
if (records[0].data.NOBILL != '') {
this.formEdit.getForm().findField('NOBILL').setValue(records[0].data.NOBILL);
this.formEdit.getForm().findField('COPYNOBILL').setValue(records[0].data.COPYNOBILL);

@ -14523,7 +14523,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, {
}
var sortstr = 'BSDATE desc ';
var sortstr = 'CUSTNO ';
if (this.sortfield != '' && this.sortdire != '') {

Loading…
Cancel
Save