Merge branch 'DS7_JingHan' of http://60.209.125.238:13080/dengyu/DS7 into DS7_JingHan

DS7_JingHan
ddlucky 2 years ago
commit f0cc1c8523

@ -231,12 +231,12 @@ namespace DSWeb.Areas.Account.Controllers
}
public ContentResult AddDetail(string bill, string data, string curr)
public ContentResult AddDetail(string bill, string data, string curr,string isdd="0")
{
var bodyList = JsonConvert.Deserialize<List<BillChfeeDetail>>(data);
var modb = new ModelObjectDB();
DBResult result = ChrecvapplicationDAL.AddDetail(bill, bodyList, curr, Convert.ToString(Session["COMPANYID"]));
DBResult result = ChrecvapplicationDAL.AddDetail(bill, bodyList, curr, Convert.ToString(Session["COMPANYID"]), isdd);
if (result.Success) { ChrecvapplicationDAL.p_update_Amount(bill); }
@ -244,7 +244,7 @@ namespace DSWeb.Areas.Account.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult AddBill(string billno, string billcust, string billcurr, string feesql, string storeCurrExrate, bool custgroup = false)
public ContentResult AddBill(string billno, string billcust, string billcurr, string feesql, string storeCurrExrate, bool custgroup = false, string isdd = "0")
{
var exrateList = JsonConvert.Deserialize<List<ChFeeExrate>>(storeCurrExrate);
@ -255,7 +255,7 @@ namespace DSWeb.Areas.Account.Controllers
if ((exrateList == null) || (exrateList.Count == 0))
{
var modb = new ModelObjectDB();
DBResult result = ChrecvapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), custgroup);
DBResult result = ChrecvapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), custgroup, isdd);
if (result.Success) { ChrecvapplicationDAL.p_update_Amount(billno); }
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
@ -276,7 +276,7 @@ namespace DSWeb.Areas.Account.Controllers
{
var modb = new ModelObjectDB();
DBResult result = ChrecvapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]));
DBResult result = ChrecvapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]),false,isdd);
if (result.Success) { ChrecvapplicationDAL.p_update_Amount(billno); }
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };

@ -96,6 +96,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin
strSql.Append(",(select ADDRESS from [company] where gid=cm.SALECORPID) ADDRESS");
strSql.Append(",(select BILLRISES from [company] where gid=cm.SALECORPID) BILLRISES");
strSql.Append(",PAYEE,CHECKER,SETRED,INVITERFACE");
strSql.Append(",(select top 1 REMARK from [info_client_inv] where CUSTNAME=cm.CUSTOMERNAME) INVREMARK");
strSql.Append(" FROM ch_fee_invoice cm where 1=1 ");
if (!string.IsNullOrEmpty(strCondition))
@ -184,7 +185,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin
strSql.Append(",(select OFFICEPHONE from [company] where gid=cm.SALECORPID) OFFICEPHONE");
strSql.Append(",(select ADDRESS from [company] where gid=cm.SALECORPID) ADDRESS");
strSql.Append(",(select BILLRISES from [company] where gid=cm.SALECORPID) BILLRISES");
strSql.Append(",(select top 1 REMARK from [info_client_inv] where CUSTNAME=cm.CUSTOMERNAME) INVREMARK");
strSql.Append(",PAYEE,CHECKER,SETRED,INVITERFACE");
strSql.Append(" FROM ch_fee_invoice cm where 1=1 ");
@ -336,6 +337,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin
data.CREATEUSERREF = Convert.ToString(reader["CREATEUSERREF"]);
if (reader["CREATETIME"] != DBNull.Value)
data.CREATETIME = Convert.ToDateTime(reader["CREATETIME"]).ToString("yyyy-MM-dd HH:mm:ss");
data.INVREMARK= Convert.ToString(reader["INVREMARK"]);
#endregion
headList.Add(data);
}

@ -403,7 +403,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
var strSql = new StringBuilder();
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(",(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(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=80003 and EnumValueID=ch_fee_invoiceapplication_detail.INVOICELINE) as INVOICELINEREF");
strSql.Append(" FROM ch_fee_invoiceapplication_detail ");
if (!string.IsNullOrEmpty(strCondition))
@ -457,7 +458,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
data.GOODSNAME = Convert.ToString(reader["GOODSNAME"]);
data.GOODSNAMEREF = Convert.ToString(reader["GOODSNAMEREF"]);
data.INVOICENO = Convert.ToString(reader["INVOICENO"]);
data.INVOICELINE = Convert.ToString(reader["INVOICELINE"]);
#endregion
headList.Add(data);
}
@ -483,13 +485,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
var cmdInsert =
db.GetSqlStringCommand(
@"insert into ch_fee_invoiceapplication_detail (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) ");
@"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,@INVOICELINE) ");
var cmdUpdate =
db.GetSqlStringCommand(
@"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 ");
@ -516,6 +518,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
db.AddInParameter(cmdInsert, "@CUSTADDR", DbType.String, enumValue.CUSTADDR);
db.AddInParameter(cmdInsert, "@EMAIL", DbType.String, enumValue.EMAIL);
db.AddInParameter(cmdInsert, "@GOODSNAME", DbType.String, enumValue.GOODSNAME);
db.AddInParameter(cmdInsert, "@INVOICELINE", DbType.String, enumValue.INVOICELINE);
db.ExecuteNonQuery(cmdInsert, tran);
}
else {
@ -534,6 +537,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
db.AddInParameter(cmdUpdate, "@CUSTADDR", DbType.String, enumValue.CUSTADDR);
db.AddInParameter(cmdUpdate, "@EMAIL", DbType.String, enumValue.EMAIL);
db.AddInParameter(cmdUpdate, "@GOODSNAME", DbType.String, enumValue.GOODSNAME);
db.AddInParameter(cmdUpdate, "@INVOICELINE", DbType.String, enumValue.INVOICELINE);
db.ExecuteNonQuery(cmdUpdate, tran);
}
@ -695,7 +699,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
head.DbOperationType = DbOperationType.DbotIns;
head.CURRENCY = "RMB";
head.RECVCURR = body.CURRENCY;
head.INVOICELINE = "p";
head.INVOICELINE = body.INVOICELINE;
foreach (var bank in banklist) {
if (bank.CURRENCY == body.CURRENCY && bank.ISDEF == "True") {
head.ACCOUNT = bank.BANKACCOUNT;
@ -1876,7 +1880,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
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 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.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' ");
}
else
{
@ -1889,7 +1893,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append(" FROM CH_FEE f ");
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(" 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.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' ");
}
@ -1905,10 +1909,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append(" and " + strCondition);
}
if (INVISNOTSTL.PARAMVALUE == "1")
{
strSql.Append(" and ISNULL(f.AMOUNT,0)<>ISNULL(f.SETTLEMENT,0) ");
}
var isopen = MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid);
if (isopen == false)
{
@ -1995,7 +2002,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append(" FROM CH_FEE f ");
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(" 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.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
@ -2003,7 +2010,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
strSql.Append("SELECT COUNT(*) FROM (select b.BSNO,f.CUSTOMERNAME ");
strSql.Append(" FROM CH_FEE f ");
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.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))
@ -2576,7 +2583,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
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(" 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.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' ");
}
else
@ -2587,7 +2594,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(",(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(" 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.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'");
if (InvAppFeeStatus.PARAMVALUE != "2")

@ -1200,7 +1200,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
public static DBResult AddDetail(string billno, List<BillChfeeDetail> bodyList, string curr, string companyid)
public static DBResult AddDetail(string billno, List<BillChfeeDetail> bodyList, string curr, string companyid, string isdd = "0")
{
var result = new DBResult();
@ -1228,6 +1228,14 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
@"UPDATE CH_FEE SET ORDERAMOUNT=ISNULL(ORDERAMOUNT,0)+@ORDERAMOUNT WHERE GID=@GID AND ((AMOUNT>=0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT2)>=0)
OR (AMOUNT<0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT3)<=0))");
if (isdd == "1")
{
cmdUpdate =
db.GetSqlStringCommand(
@"UPDATE CH_FEE SET ORDERAMOUNT=ISNULL(ORDERAMOUNT,0)+@ORDERAMOUNT,ORDERINVOICE=isnull(ORDERINVOICE,0)+@ORDERAMOUNT WHERE GID=@GID AND ((AMOUNT>=0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT2)>=0)
OR (AMOUNT<0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT3)<=0))");
}
if (bodyList != null)
{
@ -1310,7 +1318,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
}
public static DBResult AddBill(string billno, string billcust, string billcurr, string feesql, List<ChFeeExrate> exratelist, string companyid,string userid,string username, bool custgroup = false)
public static DBResult AddBill(string billno, string billcust, string billcurr, string feesql, List<ChFeeExrate> exratelist, string companyid,string userid,string username, bool custgroup = false, string isdd = "0")
{
var result = new DBResult();
var recapp = GetData("BILLNO='"+billno+"'");
@ -1346,7 +1354,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
@"UPDATE CH_FEE SET ORDERAMOUNT=ISNULL(ORDERAMOUNT,0)+@ORDERAMOUNT WHERE GID=@GID AND ((AMOUNT>=0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT2)>=0)
OR (AMOUNT<0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT3)<=0))");
if (isdd == "1") {
cmdUpdate =
db.GetSqlStringCommand(
@"UPDATE CH_FEE SET ORDERAMOUNT=ISNULL(ORDERAMOUNT,0)+@ORDERAMOUNT,ORDERINVOICE=isnull(ORDERINVOICE,0)+@ORDERAMOUNT WHERE GID=@GID AND ((AMOUNT>=0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT2)>=0)
OR (AMOUNT<0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT3)<=0))");
}
if (feelist != null)
{
@ -1472,6 +1486,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
public static DBResult DelFeeDo(List<Chfee_do_detail> boday)
{
var result = new DBResult();
if (boday == null || boday.Count == 0) {
result.Success = true;
result.Message = "成功";
return result;
}
var headdata = GetData("BILLNO='"+ boday[0].BILLNO + "'");
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
@ -1487,6 +1508,11 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
{
var cmdupdate = db.GetSqlStringCommand("update ch_fee set ORDERAMOUNT=isnull((select sum(Amount) from ch_fee_do where GID<>@FEEDOID and feeid=ch_fee.gid and CATEGORY in(2,5) ),0) where GID=@GID");
if (headdata.SETTLEMODE == 3) {
cmdupdate = db.GetSqlStringCommand("update ch_fee set ORDERAMOUNT=isnull((select sum(Amount) from ch_fee_do where GID<>@FEEDOID and feeid=ch_fee.gid and CATEGORY in(2,5) ),0),ORDERINVOICE=ORDERINVOICE-@ORDERINVOICE where GID=@GID");
}
var cmddelete = db.GetSqlStringCommand("delete from ch_fee_do where GID=@FEEDOID");
@ -1497,7 +1523,11 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
cmdupdate.Parameters.Clear();
db.AddInParameter(cmdupdate, "@FEEDOID", DbType.String, enumValue.FEEDOID);
db.AddInParameter(cmdupdate, "@GID", DbType.String, enumValue.FEEID);
db.ExecuteNonQuery(cmdupdate, tran);
if (headdata.SETTLEMODE == 3)
{
db.AddInParameter(cmdupdate, "@ORDERINVOICE", DbType.Decimal, enumValue.ORIGAMOUNT);
}
db.ExecuteNonQuery(cmdupdate, tran);
cmddelete.Parameters.Clear();
db.AddInParameter(cmddelete, "@FEEDOID", DbType.String, enumValue.FEEDOID);

@ -104,7 +104,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice
}
public string CREATEUSERREF { get; set; }
public string INVREMARK { get; set; }
[ModelDB(MDBType = ModelDBOprationType.Insert)]
public string CREATETIME

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

@ -1237,6 +1237,14 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
}]
}]
}, {
xtype: 'textareafield',
grow: true,
name: 'INVREMARK',
readOnly: true,
height: 61,
fieldLabel: '客户发票备注',
anchor: '100%'
},
//////
{
@ -2165,7 +2173,152 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
}
});
this.initappgirdcolums = [{
sortable: false,
dataIndex: 'BILLNO',
header: '申请单号',
width: 120
}, {
sortable: false,
dataIndex: 'BILLSTATUSREF',
header: '状态',
width: 80
}, {
sortable: true,
dataIndex: 'INVTYPE',
header: '开票方式',
width: 60
}, {
sortable: true,
dataIndex: 'APPLYAMOUNT',
header: '人民币金额',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
sortable: true,
dataIndex: 'OTCURRAMOUNT',
header: '美元金额',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
sortable: true,
dataIndex: 'CURRENCY',
header: '开票币别',
width: 60
}, {
sortable: true,
dataIndex: 'AMOUNT',
header: '折合金额',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
sortable: true,
dataIndex: 'INVAMOUNT',
header: '开票金额',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
sortable: false,
dataIndex: 'APPLYTIME',
header: '申请日期',
width: 100
}, {
sortable: false,
dataIndex: 'APPLICANTNAME',
header: '申请人',
width: 100
}, {
sortable: false,
dataIndex: 'INVOICENO',
header: '发票号',
width: 120
}, {
sortable: false,
dataIndex: 'INVOICECUSTNAME',
header: '发票抬头',
width: 160
}, {
sortable: true,
dataIndex: 'REMARK',
header: '备注',
width: 360
}, {
sortable: true,
dataIndex: 'SHENREMARK',
header: '开票要求',
width: 360
}
];
this.appgirdcolums=this.initappgirdcolums;
this.gridAppList = new Ext.grid.GridPanel({
store: this.storeBodyAppList,
enableHdMenu: false,
@ -2177,158 +2330,28 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
viewConfig: {
enableTextSelection: true
},
//tbar: [{
// text: '删除申请明细',
// tooltip: '删除申请明细',
// iconCls: "btndeletedetail",
// id: "btndeldetail",
// handler: function (button, event) {
// this.onDeleteClick(button, event);
// },
// scope: this
//}],
columns: [{
sortable: false,
dataIndex: 'BILLNO',
header: '申请单号',
width: 120
}, {
sortable: false,
dataIndex: 'BILLSTATUSREF',
header: '状态',
width: 80
}, {
sortable: true,
dataIndex: 'INVTYPE',
header: '开票方式',
width: 60
}, {
sortable: true,
dataIndex: 'APPLYAMOUNT',
header: '人民币金额',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
sortable: true,
dataIndex: 'OTCURRAMOUNT',
header: '美元金额',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
sortable: true,
dataIndex: 'CURRENCY',
header: '开票币别',
width: 60
}, {
sortable: true,
dataIndex: 'AMOUNT',
header: '折合金额',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
sortable: true,
dataIndex: 'INVAMOUNT',
header: '开票金额',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
tbar: [{
text: "保存列表样式",
id: "btntest",
menu: [
{
text: "保存",
handler: function (button, event) {
this.appgirdcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'app', _this.gridAppList.columns, _this.appgirdcolums, 1, true);
}
catch (e) {
return value;
}, {
text: "初始化",
handler: function (menu, event) {
_this.appgirdcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'app', _this.gridAppList.columns, _this.initappgirdcolums, 1, true);
}
return value;
}
}, {
sortable: false,
dataIndex: 'APPLYTIME',
header: '申请日期',
width: 100
}, {
sortable: false,
dataIndex: 'APPLICANTNAME',
header: '申请人',
width: 100
}, {
sortable: false,
dataIndex: 'INVOICENO',
header: '发票号',
width: 120
}, {
sortable: false,
dataIndex: 'INVOICECUSTNAME',
header: '发票抬头',
width: 160
}, {
sortable: false,
dataIndex: 'REMARK',
header: '备注',
width: 260
}
]
}],
scope: this
}],
columns: this.appgirdcolums
});
this.appgirdcolums = DsTruck.GetGridPanel(USERID, this.formname+'app', this.appgirdcolums, 1); //使用者id表名中间column数组跳过一开始的几列
this.gridAppList.reconfigure(this.storeBodyAppList, this.appgirdcolums);

@ -81,7 +81,8 @@
{ name: 'PUSHMODEREF', type: 'string' },
{ name: 'INVOICELINEREF', type: 'string' },
{ name: 'EINVOICESTATEREF', type: 'string' },
{ name: 'SETRED', type: 'string' }
{ name: 'SETRED', type: 'string' },
{ name: 'INVREMARK', type: 'string' }
]

@ -181,6 +181,10 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
trackMouseOver: true,
disableSelection: false,
selModel: this.GridCheckBoxModel,
viewConfig: {
enableTextSelection: true,
autoFill: true
},
columns: this.girdcolums ,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
@ -844,6 +848,23 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
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: 'EnumValueId',
displayField: 'EnumValueName'
});
this.GridAppDetailCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
//明细表-数据集
this.storeAppDetailList = Ext.create('Ext.data.Store', {
@ -946,7 +967,16 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
header: '发票抬头',
editor: this.comboxINVOICECUSTNAME2,
width: 180
}, {
}, {
sortable: false,
dataIndex: 'INVOICELINE',
header: '发票种类',
editor: this.comboxINVOICELINE,
renderer: function (value, p, record) {
return record.data.INVOICELINEREF;
},
width: 80
}, {
sortable: false,
dataIndex: 'REMARK',
header: '发票备注',
@ -1489,9 +1519,20 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
}
} else if (e.field == 'INVOICELINE') {
var records = DsStoreQueryBy(this.StoreINVOICELINE, 'EnumValueId', e.value);
if (records.getCount() > 0) {
var data = records.getAt(0).data;
var CLIENTNAME = data.EnumValueName;
e.record.set('INVOICELINEREF', CLIENTNAME);
}
}
},
onAddInvAppDetailClick: function () {
var selections = this.gridList.getSelectionModel().getSelection();

@ -297,7 +297,15 @@ Ext.extend(Shipping.ChInvoiceapplicationAudit, Ext.Panel, {
displayField: 'NAME',
forceSelection: true,
name: 'DC',
value: '1'
value: '1',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
@ -340,7 +348,15 @@ Ext.extend(Shipping.ChInvoiceapplicationAudit, Ext.Panel, {
forceSelection: true,
name: 'APPLICANT',
valueField: 'GID',
displayField: 'CodeAndName'
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.formSearch = Ext.widget('form', {

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

@ -1409,6 +1409,21 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, {
});
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: 'EnumValueId',
displayField: 'EnumValueName'
});
this.gridAppDetailList = new Ext.grid.GridPanel({
store: this.storeAppDetailList,
enableHdMenu: false,
@ -1471,11 +1486,20 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, {
align: 'right',
width: 80
}, {
sortable: false,
sortable: false,
dataIndex: 'INVOICECUSTNAME',
header: '发票抬头',
editor:this.comboxINVOICECUSTNAME2,
width: 180
header: '发票抬头',
editor: this.comboxINVOICECUSTNAME2,
width: 180
}, {
sortable: false,
dataIndex: 'INVOICELINE',
header: '发票种类',
editor: this.comboxINVOICELINE,
renderer: function (value, p, record) {
return record.data.INVOICELINEREF;
},
width: 80
}, {
sortable: false,
dataIndex: 'REMARK',
@ -3692,6 +3716,13 @@ gridListDetailAfterEdit: function (editor, e, eOpts) {
e.record.set('GOODSNAMEREF', '');
}
} else if (e.field == 'INVOICELINE') {
var records = DsStoreQueryBy(this.StoreINVOICELINE, 'EnumValueId', e.value);
if (records.getCount() > 0) {
var data = records.getAt(0).data;
var CLIENTNAME = data.EnumValueName;
e.record.set('INVOICELINEREF', CLIENTNAME);
}
}
},
@ -3854,12 +3885,18 @@ onUpKeyClick: function (col) {
var bodyDatas = [];
for (var i = 0; i < selectedRecords.length; i++) {
var rec = selectedRecords[i];
if (rec.GID == "" || rec.PID == "*") //如果是新增但没有保存的数据,没有必要提交到后台
{
this.storeAppDetailList.remove(selectedRecords[i]);
if (rec.data.BILLSTATUS != '已开') {
if (rec.GID == "" || rec.PID == "*") //如果是新增但没有保存的数据,没有必要提交到后台
{
this.storeAppDetailList.remove(selectedRecords[i]);
} else {
bodyDatas.push(rec);
}
} else {
Ext.Msg.show({ title: '提示', msg: '已开发票不允许删除!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
bodyDatas.push(rec);
}
}
var jsonBody = ConvertRecordsToJsonAll(bodyDatas);
@ -6219,15 +6256,22 @@ NextRecord: function () {
//合计选中的费用数字和
onSelectFee: function (button, event) {
//Ext.getCmp("zongshu").setText("1234");
var rmbsum = 0;
var usdsum = 0;
var selectedRecords = this.gridAddFeeList.selModel.getSelection();
var sum = 0;
for (var i = 0; i < selectedRecords.length; i++) {
var rec = selectedRecords[i];
sum = sum + rec.get("StlAmount");
if (rec.get('Currency') == 'RMB') {
rmbsum = rmbsum + rec.get("StlAmount");
} else if (rec.get('Currency') == 'USD') {
usdsum = usdsum + rec.get("StlAmount");
}
}
sum = sum.toFixed(2);
Ext.getCmp("zongshu").setText(" 选中金额:" + sum);
rmbsum = rmbsum.toFixed(2);
usdsum = usdsum.toFixed(2);
Ext.getCmp("zongshu").setText(" 选中金额 RMB:" + rmbsum + " USD:" + usdsum);
},

@ -2485,7 +2485,8 @@ Ext.extend(Shipping.MsChRecvapplicationDdEdit, Ext.Panel, {
params: {
bill: billno,
data: jsonbodyAddDatas,
curr: billcurr
curr: billcurr,
isdd:'1'
},
callback: function (options, success, response) {
if (success) {
@ -2773,7 +2774,8 @@ Ext.extend(Shipping.MsChRecvapplicationDdEdit, Ext.Panel, {
billcurr: billcurr,
feesql: sql,
storeCurrExrate: currBody,
custgroup: true
custgroup: true,
isdd: '1'
},
callback: function (options, success, response) {
if (success) {

@ -4326,6 +4326,20 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
}
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")
@ -5140,9 +5154,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
}
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
r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":CEL'");
r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":'");
if (string.IsNullOrEmpty(billams.ATTN))
{
@ -7069,6 +7083,33 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
}
#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编码
if (filetype == "E")
{
@ -11037,7 +11078,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
}
if (ctn.CTNALL == null || ctn.CTNALL == "")
{ error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; }
if (ctn.CTNNUM == 0)
{ error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; }
if (filetype != "B")
{
if (ctn.CNTRNO == null || ctn.CNTRNO == "")
@ -12419,6 +12462,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (ctn.CTNALL == null || ctn.CTNALL == "")
{ error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; }
if (ctn.CTNNUM == 0)
{ error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; }
if (filetype != "B")
{
if (ctn.CNTRNO == null || ctn.CNTRNO == "")
@ -13288,7 +13334,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (string.IsNullOrEmpty(GetCtnEDICode(ctn.CTNALL, type)))
{ error = error + "|提单号:" + bill.MBLNO + "箱型代码不能为空!"; }
if (ctn.CTNNUM==0)
{ error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; }
if (filetype != "B")
{
@ -16103,6 +16150,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
dlPKGS += ctn.PKGS;
dlKGS += ctn.KGS;
dlCBM += ctn.CBM;
if (ctn.CNTRNO == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "集装箱箱号不能为空!"; }
}
}
@ -16114,6 +16163,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
{ error = error + "<br />提单号:" + bill.MBLNO + " 集装箱重量合计数必须等于委托单总重量数"; }
if (dlCBM != Convert.ToDecimal(bill.CBM))
{ error = error + "<br />提单号:" + bill.MBLNO + " 集装箱尺码合计数必须等于委托单总尺码数"; }
}
}
@ -16648,14 +16698,16 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
tempstr += GetSpaceStr("", 4);//12 //SCAC Code//O//X(4)//233 //236 //
tempstr += GetSpaceStr("", 14);//13 //Filler//M//X(14)//237 //250 //Spaces
tempstr = GetSpaceStr(tempstr, 236);
//if (!string.IsNullOrEmpty(bill.SERVICECONTRACTNO))//运费预付
//{
// tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code
//}
//else
//{
// tempstr += GetSpaceStr("CN900160", 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填
//}
if (!string.IsNullOrEmpty(bill.SERVICECONTRACTNO))//运费预付
{
tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code
}
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));
#endregion
@ -17510,11 +17562,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
}
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
{
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);//12//Payable at (Port Code)//M//X(5)//46//50//1st Collect Charge Payment Location//按(港口代码)支付//第一收取缴费地点
@ -17611,8 +17663,18 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
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 += GetSpaceStr("", 1);//8//Filler//M//X(1)//54//54//Spaces
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//
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 += GetSpaceStr(GetPortEDICode(headData[0].PORTDISCHARGEID, "PIL"), 5);//10//Receiver Port Code//M//X(5)//60//64//
}
if (filetype == "E")
{
tempstr += "4.02";//11//EDI Version//M//X(4) //65//68//Default to "PBK" / esi:4.01
@ -17816,9 +17878,15 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
// tempstr += GetSpaceStr("", 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填
//}
//else
//{
tempstr += GetSpaceStr(OpAms.ShipperEdiCode, 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填
//}
if (filetype == "E")
{
tempstr += GetSpaceStr(ftpset.ALIASSENDCODE, 10);
}
else {
tempstr += GetSpaceStr(OpAms.ShipperEdiCode, 10);
}
//}
tempstr += GetSpaceStr("", 3);//4//Shipper Code//O//X(3)//16//18//webcsm Partner Subcode
tempstr += GetSpaceStr("", 4);//5//Filler//M//X(4)//19//22//Spaces
var Shipping = "";
@ -20435,6 +20503,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (ctn.CTNALL == null || ctn.CTNALL == "")
{ error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; }
if (ctn.CTNNUM == 0)
{ error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; }
if (filetype != "B")
{
if (ctn.CNTRNO == null || ctn.CNTRNO == "")

@ -2044,6 +2044,16 @@ Ext.extend(Shipping.MsInfoClientEdit, Ext.Panel, {
selectOnFocus: true,
enableKeyEvents: true
}
}, {
sortable: true,
dataIndex: 'REMARK',
width: 200,
header: Zi.LAN.INVREMARK, //'汇率',
editor: {
xtype: 'textfield',
selectOnFocus: true,
enableKeyEvents: true
}
}
]
});

@ -309,4 +309,5 @@ Zi.LAN.CARRIER = "船公司";
Zi.LAN.STLREMARK = "结算描述";
Zi.LAN.INVOICECUSTNAME = "发票抬头";
Zi.LAN.CUSTBANK = "人民币银行账号";
Zi.LAN.CUSTUSDBANK = "美元银行账号";
Zi.LAN.CUSTUSDBANK = "美元银行账号";
Zi.LAN.INVREMARK = "开票备注";

@ -311,3 +311,4 @@ Zi.LAN.STLREMARK = "结算描述";
Zi.LAN.INVOICECUSTNAME = "发票抬头";
Zi.LAN.CUSTBANK = "人民币银行账号";
Zi.LAN.CUSTUSDBANK = "美元银行账号";
Zi.LAN.INVREMARK = "开票备注";

@ -1519,14 +1519,38 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
}]
}, this.comboxOP, {
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, //'服务合同号',
//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, //'申请放箱号',
name: 'APPLYNO'
name: 'APPLYNO',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formHead.getForm().findField('APPLYNO')
.setValue(field.rawValue.toUpperCase());
}
}
}, this.comboxDept
]
}, {
@ -1538,12 +1562,28 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
fieldLabel: Zi.LAN.OPERATORTEL, //'TEL',
//labelWidth: 25,
//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', //'发票号',
//labelWidth: 30,
//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',
@ -1588,7 +1628,15 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
}]
}, this.comboxBLFRT, {
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());
}
}
}
//, {

@ -631,7 +631,15 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, {
dataIndex: 'VESSEL',
header: Zi.LAN.VESSEL, //'船名',
width: 100,
filter: true
filter: true,
renderer: function (value, meta) {
meta.tdCls = 'mblno';
btnurl = getGridCopyButton(value);
return btnurl + value;
}
},
{
sortable: true,
@ -7862,99 +7870,101 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, {
icount = icount + 1;
}
}
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/MvcShipping/MsOpSeae/IsDeleteList',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/MvcShipping/MsOpSeae/DeleteList',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.onDsQuery();
if (jsonresult.Message != '')
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
else
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
else {
if (jsonresult.Message!='') {
Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
} else {
Ext.MessageBox.confirm(Zi.LAN.TiShi, jsonresult.Message2 +"确定删除吗?", function (btn) {
if (btn == 'yes') {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/MvcShipping/MsOpSeae/DeleteList',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.onDsQuery();
if (jsonresult.Message != '')
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
else
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
Ext.MessageBox.confirm(Zi.LAN.TiShi, "确定删除吗?", function (btn) {
if (btn == 'yes') {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/MvcShipping/MsOpSeae/IsDeleteList',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/MvcShipping/MsOpSeae/DeleteList',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
_thisopseaeindex.onDsQuery();
if (jsonresult.Message != '')
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
else
Ext.Msg.hide();
}
},
failure: function (response, options) {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
}, this);
else {
Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
else {
if (jsonresult.Message != '') {
Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
} else {
Ext.MessageBox.confirm(Zi.LAN.TiShi, jsonresult.Message2 + "确定删除吗?", function (btn) {
if (btn == 'yes') {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/MvcShipping/MsOpSeae/DeleteList',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
_thisopseaeindex.onDsQuery();
if (jsonresult.Message != '')
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
else
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
}, this);
}
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
});

Loading…
Cancel
Save