客户导入导出修改
This commit is contained in:
@@ -362,7 +362,7 @@ namespace YLErp.Modules.ClientModule
|
||||
new ExcelHelper.DataColumnModel("账号", "Card",typeof(string)),
|
||||
new ExcelHelper.DataColumnModel("户名", "ClientName"),
|
||||
new ExcelHelper.DataColumnModel("大额行号", "Payment",typeof(string)),
|
||||
new ExcelHelper.DataColumnModel("用途", "Use"),
|
||||
//new ExcelHelper.DataColumnModel("用途", "Use"),
|
||||
new ExcelHelper.DataColumnModel("是否有效", "ValidState", (cv, obj) =>
|
||||
{
|
||||
if (cv == "InValid")
|
||||
|
||||
@@ -3,6 +3,7 @@ using NPOI.Util;
|
||||
using Org.BouncyCastle.Ocsp;
|
||||
using Qdp.Pricing.Library.Base.Utilities;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using YieldChain.Helpers;
|
||||
using YLErp.Commons;
|
||||
using YLErp.Configuration;
|
||||
@@ -347,6 +348,20 @@ namespace YLErp.Modules.ClientModule
|
||||
|
||||
new ExcelHelper.DataColumnModel("电子邮箱", "Email", typeof(string)),
|
||||
new ExcelHelper.DataColumnModel("联系电话", "PhoneNumber", typeof(string)),
|
||||
new ExcelHelper.DataColumnModel("授权有效期", "AuthorizeEffectiveEndDateStr", (cv, obj) =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(cv))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
string value="长期有效";
|
||||
if (cv!="30001231")
|
||||
{
|
||||
DateTime time= DateTime.ParseExact(cv, "yyyyMMdd", CultureInfo.InvariantCulture);
|
||||
value=time.ToString("yyyy-MM-dd");
|
||||
}
|
||||
return value;
|
||||
}),
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1543,6 +1543,7 @@ namespace YLErp.Modules.ClientModule
|
||||
var Fax = "";
|
||||
var Address = "";
|
||||
var Remarks = "";
|
||||
var authorizeEffectiveEndDateStr = "";
|
||||
DateTime? DeadLine = null;
|
||||
DateTime? AuthorizeEndDate = null;
|
||||
string IdCardEffectiveDateStr = "";
|
||||
@@ -1617,6 +1618,27 @@ namespace YLErp.Modules.ClientModule
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "授权有效期":
|
||||
if (!string.IsNullOrEmpty(clientDutys.Rows[i][j].ToString()))
|
||||
{
|
||||
if (clientDutys.Rows[i][j].ToString() == "长期有效")
|
||||
{
|
||||
authorizeEffectiveEndDateStr = "30001231";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DateTime.TryParse(clientDutys.Rows[i][j].ToString(), out DateTime authorizeEfEndDate))
|
||||
{
|
||||
authorizeEffectiveEndDateStr = authorizeEfEndDate.ToString("yyyyMMdd");
|
||||
}
|
||||
else
|
||||
{
|
||||
formatErrorColumn += "授权有效期,";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case "微信号":
|
||||
WexinNo = clientDutys.Rows[i][j].ToString();
|
||||
break;
|
||||
@@ -1733,7 +1755,8 @@ namespace YLErp.Modules.ClientModule
|
||||
IdCardEffectiveDateStr = IdCardEffectiveDateStr,
|
||||
AuthorizeEndDate = AuthorizeEndDate,
|
||||
Weixin = WexinNo,
|
||||
ApprovalOrder = 0
|
||||
ApprovalOrder = 0,
|
||||
AuthorizeEffectiveEndDateStr=authorizeEffectiveEndDateStr
|
||||
};
|
||||
|
||||
var contactypelist = DbContext.contactype.ToList();
|
||||
|
||||
Reference in New Issue
Block a user