3.1.2货品管理
基础管理中的货品管理是对货品以及货品的数量等相关信息进行新增、修改等基本操作的一个模块。
1.表与关系
表1:货品表(SYS_GoodsTable)
列名 | 数据类型 | 主键/外键 | 说明 |
GoodsID | int | 主键 | 货品ID |
GoodsCoding | nchar(30) |
| 货品编码 |
GoodsName | nchar(30) |
| 货品名称 |
Standard | nchar(30) |
| 规格 |
Weight | decimal(18, 2) |
| 重量 |
UnitID | int | 外键 | 单位ID |
ClientID | int | 外键 | 客户ID |
ClientGoodsCoding | nchar(30) |
| 客户货品编码 |
BarCode | nchar(30) |
| 条形码 |
SpellCode | nchar(30) |
| 拼音码 |
GoodsCategoryID | int | 外键 | 货品类别ID |
Model | nchar(30) |
| 型号 |
Manufacturer | nchar(30) |
| 生产厂家 |
GoodsTypeID | int | 外键 | 货品类型ID |
GoodsSonTypeID | int | 外键 | 货品子类型ID |
Length | decimal(18, 2) |
| 长度 |
Width | decimal(18, 2) |
| 宽度 |
Height | decimal(18, 2) |
| 高度 |
SizeUnitID | int | 外键 | 尺寸单位ID |
SKUPackingUnitID | int | 外键 | SKU包装单位ID |
ShelfLife | nchar(30) |
| 保质期 |
HighSize | nchar(10) |
| 码高 |
BearWeight | decimal(18, 2) |
| 承重 |
QualityID | int | 外键 | 质量ID |
WeightUnitID | int | 外键 | 重量单位ID |
UnitPrice | decimal(18, 2) |
| 单价 |
StorageEnvironmentID | int | 外键 | 存储环境ID |
GoodsPropertyID | int | 外键 | 货品属性ID |
PollutePropertyID | int | 外键 | 污染属性ID |
PreventPollutePropertyID | int | 外键 | 防止污染属性ID |
StateID | int | 外键 | 状态ID |
Note | nchar(100) |
| 备注 |
MonitoringNo | bit |
| 监控否 |
表2:货品数量对照表(SYS_GoodsQuantityCompareTable)
列名 | 数据类型 | 主键/外键 | 说明 |
GoodsQuantityCompareID | int | 主键 | 货品数量对照ID |
GoodsID | int | 外键 | 货品ID |
PackingUnitID | int | 外键 | 包装单位ID |
WeightUnitID | int | 外键 | 重量单位ID |
SizeUnitID | int | 外键 | 尺寸单位ID |
Quantity | decimal(18, 1) |
| 数量 |
Length | nchar(50) |
| 长度 |
Width | nchar(50) |
| 宽度 |
Height | nchar(50) |
| 高度 |
Weight | nchar(50) |
| 重量 |
UnitPrice | decimal(18, 1) |
| 单价 |
Note | nchar(50) |
| 备注 |
表3:客户表(SYS_ClientTable)
列名 | 数据类型 | 主键/外键 | 说明 |
ClientID | int | 主键 | 客户ID |
ClientAccounts | nchar(50) |
| 客户帐号 |
ClientCode | nchar(50) |
| 客户码 |
ClientUnitName | nchar(50) |
| 客户单位名称 |
ClientAbbreviation1 | nchar(50) |
| 客户简称1 |
ClientAbbreviation2 | nchar(50) |
| 客户简称2 |
ClientManager | nchar(50) |
| 客户经理 |
ClientManagerPhone | nchar(50) |
| 客户经理电话 |
Linkman | nchar(50) |
| 联系人 |
LinkmanPhone | nchar(50) |
| 联系人电话 |
LinkmanEmail | nchar(50) |
| 联系人Email |
LinkmanVIP | nchar(50) |
| 联系人VIP |
LinkmanJAI | nchar(50) |
| 联系人JAI |
ClientDifference | nchar(50) |
| 客户区别 |
ClientPostcode | nchar(50) |
| 客户邮编 |
ClientFax | nchar(50) |
| 客户传真 |
EnglistAbbreviation | nchar(50) |
| 英文缩写 |
EnglishName | nchar(50) |
| 英文名称 |
ClientAddress | nchar(50) |
| 客户地址 |
ClientCompanyID | int | 外键 | 客户公司ID |
IndustryPropertyID | int | 外键 | 行业属性ID |
EnterpriseScaleID | int | 外键 | 企业规模ID |
MemberRepresentative | nchar(50) |
| 会员代表 |
ContractFileLand | nchar(50) |
| 合同存档地 |
ClientRankID | int | 外键 | 客户级别ID |
ProjectID | int | 外键 | 项目ID |
ContractEndTime | datetime |
| 合同结束时间 |
sinessDelegate | nchar(10) |
| 业务代表 |
单击货品表获取货品数量对照表数据的方法
function onClickRowHuoPin() {
var row = $('#tb货品管理').datagrid('getSelected');
$.getJSON("/HuoPinGuanLi/ChaXunQuanBu?HuoPinID=" + row.货品ID,
function (data) {
$('#tb货品数量对照').datagrid('loadData', data);
});
}
<p>控制器代码</p>
<pre class="csharp" name="code"> public ActionResult ChaXunQuanBu(int HuoPinID)
{
var dtHuoPinShuLiang = from tbHuoPinShuLiang in myEF.SYS_GoodsQuantityCompareTable
join tbHuoPin in myEF.SYS_GoodsTable on tbHuoPinShuLiang.GoodsID equals tbHuoPin.GoodsID
join tbBaoZhuangDanWei in myEF.SYS_AttributeDetailedTable on tbHuoPinShuLiang.PackingUnitID equals tbBaoZhuangDanWei.AttributeDetailedID
join tbZhongLiangDanWei in myEF.SYS_AttributeDetailedTable on tbHuoPinShuLiang.WeightUnitID equals tbZhongLiangDanWei.AttributeDetailedID
join tbChiCunDanWei in myEF.SYS_AttributeDetailedTable on tbHuoPinShuLiang.SizeUnitID equals tbChiCunDanWei.AttributeDetailedID
where tbHuoPinShuLiang.GoodsID == HuoPinID
select new
{
货品数量ID = tbHuoPinShuLiang.GoodsQuantityCompareID,
货品ID = tbHuoPin.GoodsID,
货品编码 = tbHuoPin.GoodsCoding,
包装单位ID = tbBaoZhuangDanWei.AttributeDetailedID,
包装单位 = tbBaoZhuangDanWei.AttributeDetailedName,
数量 = tbHuoPinShuLiang.Quantity,
长度 = tbHuoPinShuLiang.Length,
宽度 = tbHuoPinShuLiang.Width,
高度 = tbHuoPinShuLiang.Height,
尺寸单位ID = tbChiCunDanWei.AttributeDetailedID,
尺寸单位 = tbChiCunDanWei.AttributeDetailedName,
重量 = tbHuoPinShuLiang.Weight,
重量单位ID = tbZhongLiangDanWei.AttributeDetailedID,
重量单位 = tbZhongLiangDanWei.AttributeDetailedName,
单价 = tbHuoPinShuLiang.UnitPrice,
备注 = tbHuoPinShuLiang.Note,
};
List<Dictionary<string, object>> ListReturn = new List<Dictionary<string, object>>();
foreach (var item in dtHuoPinShuLiang)
{
Dictionary<string, object> itemHuoPinShuLiang = new Dictionary<string, object>();
//遍历反射方式获取属性名和属性值
foreach (System.Reflection.PropertyInfo p in item.GetType().GetProperties())
{
itemHuoPinShuLiang.Add(p.Name, p.GetValue(item, null));
}
ListReturn.Add(itemHuoPinShuLiang);
}
return Json(ListReturn, JsonRequestBehavior.AllowGet);
}
3.2 库存管理
3.2.1 货品ABC
库存管理中的货品ABC是对货品的属性和作业进行分类的模块
界面
表与关系
表1:ABC分类表(SYS_ABCClassifyTable)
列名 | 数据类型 | 主键/外键 | 说明 |
ABCClassifyID | int | 主键 | ABC分类ID |
ClientID | int | 外键 | 客户ID |
PropertyClassifyCccordingToID | int | 外键 | 属性分类依据ID |
PropertyClassifyScopeID | int | 外键 | 属性分类范围ID |
PropertyAClassStandardCccordingTo | nchar(50) |
| 属性A类标准依据 |
PropertyToAClassStandardCccordingTo | nchar(50) |
| 属性至A类标准依据 |
PropertyBClassStandardCccordingTo | nchar(50) |
| 属性B类标准依据 |
PropertyToBClassStandardCccordingTo | nchar(50) |
| 属性至B类标准依据 |
PropertyAClassStandardGradeQuantity | nchar(50) |
| 属性A类标准品目数 |
PropertyToAClassStandardGradeQuantity | nchar(50) |
| 属性至A类标准品目数 |
PropertyBClassStandardGradeQuantity | nchar(50) |
| 属性B类标准品目数 |
PropertyToBClassStandardGradeQuantity | nchar(50) |
| 属性至B类标准品目数 |
PropertyStartTime | datetime |
| 属性起始时间 |
PropertyStopTime | datetime |
| 属性终止时间 |
StoreroomID | int | 外键 | 库房ID |
WorkClassifyCccordingToID | int | 外键 | 作业分类依据ID |
WorkClassifyScopeID | int | 外键 | 作业分类范围ID |
WorkAClassStandardCccordingTo | nchar(50) |
| 作业A类标准依据 |
WorkToAClassStandardCccordingTo | nchar(50) |
| 作业至A类标准依据 |
WorkBClassStandardCccordingTo | nchar(50) |
| 作业B类标准依据 |
WorkToBClassStandardCccordingTo | nchar(50) |
| 作业至B类标准依据 |
WorkAClassStandardGradeQuantity | nchar(50) |
| 作业A类标准品目数 |
WorkToAClassStandardGradeQuantity | nchar(50) |
| 作业至A类标准品目数 |
WorkBClassStandardGradeQuantity | nchar(50) |
| 作业B类标准品目数 |
WorkToBClassStandardGradeQuantity | nchar(50) |
| 作业至B类标准品目数 |
WorkStartTime | datetime |
| 作业起始时间 |
WorkStopTime | datetime |
| 作业终止时间 |
表2:客户表(SYS_ClientTable)
列名 | 数据类型 | 主键/外键 | 说明 |
ClientID | int | 主键 | 客户ID |
ClientAccounts | nchar(50) |
| 客户帐号 |
ClientCode | nchar(50) |
| 客户码 |
ClientUnitName | nchar(50) |
| 客户单位名称 |
ClientAbbreviation1 | nchar(50) |
| 客户简称1 |
ClientAbbreviation2 | nchar(50) |
| 客户简称2 |
ClientManager | nchar(50) |
| 客户经理 |
ClientManagerPhone | nchar(50) |
| 客户经理电话 |
Linkman | nchar(50) |
| 联系人 |
LinkmanPhone | nchar(50) |
| 联系人电话 |
LinkmanEmail | nchar(50) |
| 联系人Email |
LinkmanVIP | nchar(50) |
| 联系人VIP |
LinkmanJAI | nchar(50) |
| 联系人JAI |
ClientDifference | nchar(50) |
| 客户区别 |
ClientPostcode | nchar(50) |
| 客户邮编 |
ClientFax | nchar(50) |
| 客户传真 |
EnglistAbbreviation | nchar(50) |
| 英文缩写 |
EnglishName | nchar(50) |
| 英文名称 |
ClientAddress | nchar(50) |
| 客户地址 |
ClientCompanyID | int | 外键 | 客户公司ID |
IndustryPropertyID | int | 外键 | 行业属性ID |
EnterpriseScaleID | int | 外键 | 企业规模ID |
MemberRepresentative | nchar(50) |
| 会员代表 |
ContractFileLand | nchar(50) |
| 合同存档地 |
ClientRankID | int | 外键 | 客户级别ID |
ProjectID | int | 外键 | 项目ID |
ContractEndTime | datetime |
| 合同结束时间 |
sinessDelegate | nchar(10) |
| 业务代表 |
表3:(SYS_StoreroomTable)
列名 | 数据类型 | 主键/外键 | 说明 |
StoreroomID | Int | 主键 | 库房ID |
StoreroomCoding | nchar(50) |
| 库房编码 |
StoreroomName | nchar(50) |
| 库房名称 |
SpellCode | nchar(50) |
| 拼音码 |
SpellTypeID | Int | 外键 | 库房类型ID |
PlaceAreaID | Int | 外键 | 所在区域ID |
Phone | nchar(50) |
| 电话 |
Fax | nchar(50) |
| 传真 |
Address | nchar(50) |
| 地址 |
Length | nchar(50) |
| 长度 |
Width | nchar(50) |
| 宽度 |
Height | nchar(50) |
| 高度 |
Area | nchar(50) |
| 面积 |
GalleryWidth | nchar(50) |
| 通道宽度 |
SpinRadius | nchar(50) |
| 旋转半径 |
StateID |
| 外键 | 状态ID |
Note | nchar(50) |
| 备注 |
控制器代码
<pre class="csharp" name="code">控制器代码
public ActionResult SelectAllXinXi()
{
var dtFenLei = from tbFenLei in myEF.SYS_ABCClassifyTable
join tbKeHu in myEF.SYS_ClientTable on tbFenLei.ClientID equals tbKeHu.ClientID
join tbFeiLeiYiJu in myEF.SYS_AttributeDetailedTable on tbFenLei.PropertyClassifyCccordingToID equals tbFeiLeiYiJu.AttributeDetailedID
join tbFenLeiFanWei in myEF.SYS_AttributeDetailedTable on tbFenLei.PropertyClassifyScopeID equals tbFenLeiFanWei.AttributeDetailedID
select new
{
FeiLeiID = tbFenLei.ABCClassifyID,
KeHuID = tbKeHu.ClientID,
KeHuMa = tbKeHu.ClientCode,
FenLeiYiJuID = tbFeiLeiYiJu.AttributeDetailedID,
FenLeiYiJu = tbFeiLeiYiJu.AttributeDetailedName,
FenLeiFanWeiID = tbFenLeiFanWei.AttributeDetailedID,
FenLeiFanWei = tbFenLeiFanWei.AttributeDetailedName,
ALeiBiaoZhunBaiFenBi=tbFenLei.PropertyAClassStandardCccordingTo,
ZhiALeiBiaoZhunBaiFenBi = tbFenLei.PropertyToAClassStandardCccordingTo,
BLeiBiaoZhunBaiFenBi = tbFenLei.PropertyBClassStandardCccordingTo,
ZhiBLeiBiaoZhunBaiFenBi=tbFenLei.PropertyToBClassStandardCccordingTo,
ALeiBiaoZhunPinMuShu=tbFenLei.PropertyAClassStandardGradeQuantity,
ZhiALeiBiaoZhunPinMuShu = tbFenLei.PropertyToAClassStandardGradeQuantity,
BLeiBiaoZhunPinMuShu=tbFenLei.PropertyBClassStandardGradeQuantity,
ZhiBLeiBiaoZhunPinMuShu = tbFenLei.PropertyToBClassStandardGradeQuantity,
QiShiShiJian = tbFenLei.PropertyStartTime,
ZhongZhiShiJian = tbFenLei.PropertyStopTime,
};
List<Dictionary<string, object>> ListReturn = new List<Dictionary<string, object>>();
foreach (var item in dtFenLei)
{
Dictionary<string, object> itemFenLei = new Dictionary<string, object>();
//遍历反射方式获取属性名和属性值
foreach (System.Reflection.PropertyInfo p in item.GetType().GetProperties())
{
itemFenLei.Add(p.Name, p.GetValue(item, null));
}
string shijian = item.QiShiShiJian.ToString();
itemFenLei.Add("QiShiShiJian1", shijian);
string shijian1 = item.ZhongZhiShiJian.ToString();
itemFenLei.Add("ZhongZhiShiJian1", shijian1);
ListReturn.Add(itemFenLei);
}
return Json(ListReturn, JsonRequestBehavior.AllowGet);
}
public ActionResult SelectAllXinXi1()
{
var dtFenLei1 = from tbFenLei in myEF.SYS_ABCClassifyTable
join tbKuFang in myEF.SYS_StoreroomTable on tbFenLei.StoreroomID equals tbKuFang.StoreroomID
join tbFenLeiYiJu1 in myEF.SYS_AttributeDetailedTable on tbFenLei.WorkClassifyCccordingTo equals tbFenLeiYiJu1.AttributeDetailedID
join tbFenLeiFanWei1 in myEF.SYS_AttributeDetailedTable on tbFenLei.WorkClassifyScopeID equals tbFenLeiFanWei1.AttributeDetailedID
select new
{
FeiLeiID = tbFenLei.ABCClassifyID,
KuFangID = tbKuFang.StoreroomID,
KuFangBianMa = tbKuFang.StoreroomCoding,
FenLeiYiJu1ID = tbFenLeiYiJu1.AttributeDetailedID,
FenLeiYiJu1 = tbFenLeiYiJu1.AttributeDetailedName,
FenLeiFanWei1ID = tbFenLeiFanWei1.AttributeDetailedID,
FenLeiFanWei1 = tbFenLeiFanWei1.AttributeDetailedName,
ALeiBiaoZhunBaiFenBi = tbFenLei.WorkAClassStandardCccordingTo,
ZhiALeiBiaoZhunBaiFenBi=tbFenLei.WorkToAClassStandardCccordingTo,
BLeiBiaoZhunBaiFenBi = tbFenLei.WorkBClassStandardCccordingTo,
ZhiBLeiBiaoZhunBaiFenBi=tbFenLei.WorkToBClassStandardCccordingTo,
ALeiBiaoZhunPinMuShu = tbFenLei.WorkAClassStandardGradeQuantity,
ZhiALeiBiaoZhunPinMuShu=tbFenLei.WorkToAClassStandardGradeQuantity,
BLeiBiaoZhunPinMuShu = tbFenLei.WorkBClassStandardGradeQuantity,
ZhiBLeiBiaoZhunPinMuShu=tbFenLei.WorkToBClassStandardGradeQuantity,
QiShiShiJian = tbFenLei.WorkStartTime,
ZhongZhiShiJian = tbFenLei.WorkStopTime,
};
List<Dictionary<string, object>> ListReturn = new List<Dictionary<string, object>>();
foreach (var item in dtFenLei1)
{
Dictionary<string, object> itemFenLei = new Dictionary<string, object>();
//遍历反射方式获取属性名和属性值
foreach (System.Reflection.PropertyInfo p in item.GetType().GetProperties())
{
itemFenLei.Add(p.Name, p.GetValue(item, null));
}
string shijian = item.QiShiShiJian.ToString();
itemFenLei.Add("QiShiShiJian2", shijian);
string shijian1 = item.ZhongZhiShiJian.ToString();
itemFenLei.Add("ZhongZhiShiJian2", shijian1);
ListReturn.Add(itemFenLei);
}
return Json(ListReturn, JsonRequestBehavior.AllowGet);
}
<p>3.3 供应商管理</p><p> 3.3.1 供应商档案管理</p><p> 界面效果图</p>
<img width="910" height="214" align="middle" alt="" src="https://img-blog.csdn.net/20150530210142299?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvR1hfV0dZ/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" />
数据库表关系图
表:
列名 | 数据类型 | 主键/外键 | 说明 |
SupplierID | int | 主键 | 供应商ID |
SupplierNumber | nchar(100) |
| 供应商编号 |
SupplierName | nchar(100) |
| 供应商名称 |
SupplierAbbreviation | nchar(100) |
| 供应商简称 |
SupplierModeSettlementID | int | 外键 | 供应商结算方式ID |
SupplierTypeID | int | 外键 | 供应商类型ID |
BusinessTypeID | int | 外键 | 业务种类 |
Linkman | nchar(100) |
| 联系人 |
LinkmanPhone | nchar(100) |
| 联系人电话 |
Fax | nchar(100) |
| 传真 |
SupplierAddress | nchar(100) |
| 供应商地址 |
Postcode | nchar(100) |
| 邮编 |
TreatyNumber | nchar(100) |
| 协议编号 |
Bank | nchar(100) |
| 开户行 |
BankAccountNumber | nchar(100) |
| 开户行帐号 |
DutyParagraph | nchar(100) |
| 税号 |
LegalDelegate | nchar(100) |
| 法人代表 |
MobilePhone | nchar(100) |
| 手机 |
Email、 | nchar(100) |
| 电子邮件 |
EnterpriseCode | nchar(100) |
| 企业代码 |
BusinessLicenseNumber | nchar(100) |
| 营业执照号 |
GovernmentRentCertificateNumber | nchar(100) |
| 地税登证号码 |
NationalTaxCertificateNumber | nchar(100) |
| 国税登证号码 |
SetUpTime | datetime |
| 成立时间 |
RegisteredCapital | nchar(100) |
| 注册资本 |
RoadTransportLicenseNumber | nchar(100) |
| 道路运输许可证编号 |
DangerousGoodsTransportLicense | nchar(100) |
| 危险品运输许可证号 |
Agent | nchar(100) |
| 经办人 |
AgentContactPhone | nchar(100) |
| 经办人联系电话 |
CompanyAffiliation | nchar(100) |
| 所属公司 |
Note | nchar(100) |
| 备注 |
3.3.2控制器代码
public ActionResult ChaXunQuanBu()
{
var dtGongYingShang = from tbGongYingShang in myEF.SYS_SupplierTable
join tbJieSuan in myEF.SYS_AttributeDetailedTable on tbGongYingShang.SupplierModeSettlementID equals tbJieSuan.AttributeDetailedID
join tbLeiXing in myEF.SYS_AttributeDetailedTable on tbGongYingShang.SupplierTypeID equals tbLeiXing.AttributeDetailedID
join tbYeWuZhongLei in myEF.SYS_AttributeDetailedTable on tbGongYingShang.BusinessTypeID equals tbYeWuZhongLei.AttributeDetailedID
select new
{
供应商档案ID = tbGongYingShang.SupplierID,
供应商编号 = tbGongYingShang.SupplierNumber,
供应商名称 = tbGongYingShang.SupplierName,
供应商类型ID = tbLeiXing.AttributeDetailedID,
供应商类型 = tbLeiXing.AttributeDetailedName,
供应商简称 = tbGongYingShang.SupplierAbbreviation,
供应商结算方式ID = tbJieSuan.AttributeDetailedID,
供应商结算方式 = tbJieSuan.AttributeDetailedName,
业务种类ID = tbYeWuZhongLei.AttributeDetailedID,
业务种类 = tbYeWuZhongLei.AttributeDetailedName,
联系人 = tbGongYingShang.Linkman,
联系人电话 = tbGongYingShang.LinkmanPhone,
地址 = tbGongYingShang.SupplierAddress,
传真 = tbGongYingShang.Fax,
邮编 = tbGongYingShang.Postcode,
协议编号 = tbGongYingShang.TreatyNumber,
开户行 = tbGongYingShang.Bank,
开户行账号 = tbGongYingShang.BankAccountNumber,
税号 = tbGongYingShang.DutyParagraph,
法人代表 = tbGongYingShang.LegalDelegate,
手机 = tbGongYingShang.MobilePhone,
Email = tbGongYingShang.Email,
企业代码 = tbGongYingShang.EnterpriseCode,
营业执照号码 = tbGongYingShang.BusinessLicenseNumber,
地税登记号码 = tbGongYingShang.GovernmentRentCertificateNumber,
国税登证号码 = tbGongYingShang.NationalTaxCertificateNumber,
成立时间 = tbGongYingShang.SetUpTime,
注册资本 = tbGongYingShang.RegisteredCapital,
道路运输许可证编号 = tbGongYingShang.RoadTransportLicenseNumber,
危险品运输许可证号 = tbGongYingShang.DangerousGoodsTransportLicense,
经办人 = tbGongYingShang.Agent,
经办人联系电话 = tbGongYingShang.AgentContactPhone,
所属公司 = tbGongYingShang.CompanyAffiliation,
备注 = tbGongYingShang.Note,
};
List<Dictionary<string, object>> ListReturn = new List<Dictionary<string, object>>();
foreach (var item in dtGongYingShang)
{
Dictionary<string, object> itemGongYingShang = new Dictionary<string, object>();
//遍历反射方式获取属性名和属性值
foreach (System.Reflection.PropertyInfo p in item.GetType().GetProperties())
{
itemGongYingShang.Add(p.Name, p.GetValue(item, null));
}
string shijian = item.成立时间.ToString();
itemGongYingShang.Add("成立时间1", shijian);
ListReturn.Add(itemGongYingShang);
}
return Json(ListReturn, JsonRequestBehavior.AllowGet);
}
3.3.3、jQuery代码
var BangDing = 0;
$(document).ready(function () {
$.getJSON("/GongYingShangDangAnGuanLi/ChaXunQuanBu",
function (data) {
$('#tb供应商管理').datagrid('loadData', data);
BangDing++
});
});
function returnBtnCaoZuo(供应商档案ID, row, rowIndex) {
return "<a href='javascript:XiangQing(" + 供应商档案ID + "," + rowIndex + ")'>详情</a>";
}
function XiangQing(供应商档案ID, rowIndex) {
window.location.href = "/GongYingShangDangAnGuanLi/GongYingShangDangAnXinXi?GongYingShangDangAnID=" + 供应商档案ID;
}
3.3.3、界面层代码
<table class="easyui-datagrid" id="tb供应商管理" style="width:auto; height:auto;">
<thead>
<tr>
<th data-options="field:'ck',checkbox:true"></th>
<th data-options="field:'供应商编号',width:100,align:'center'">合作单位编号</th>
<th data-options="field:'供应商名称',width:100,align:'center'">合作单位名称</th>
<th data-options="field:'供应商类型',width:100,align:'center'">合作单位类型</th>
<th data-options="field:'供应商简称',width:100,align:'center'">合作单位简称</th>
<th data-options="field:'供应商结算方式',width:100,align:'center'">合作单位结算方式</th>
<th data-options="field:'业务种类',width:100,align:'center'">业务种类</th>
<th data-options="field:'联系人',width:100,align:'center'">联系人</th>
<th data-options="field:'联系人电话',width:100,align:'center'">联系人电话</th>
<th data-options="field:'地址',width:100,align:'center'">地址</th>
<th data-options="field:'供应商档案ID',width:100,align:'center',formatter:returnBtnCaoZuo">操作</th>
</tr>
</thead>
</table>
3.3.4 详情信息界面截图
3.3.5 JQuery代码
function BangDingDangAnXinXi() {
$.getJSON("/GongYingShangDangAnGuanLi/ChaXunByID?GongYingShangDangAnID="+@Session["GongYingShangDangAnID"],
function(data){
$('#txtGongYingShangBianMa').attr('value',data[0].供应商编号);
$('#txtGongYingShangMingCheng').attr('value',data[0].供应商名称);
$('#GongYingShangLeiXing').combobox('setValue',data[0].供应商类型ID);
$('#GongYingShangJianCheng').attr('value',data[0].供应商简称);
$('#cboGongYingShangJieSuanFangShi').combobox('setValue',data[0].供应商结算方式ID);
$('#cboYeWuLeiXing').combobox('setValue',data[0].业务种类ID);
$('#txtLianXiRen').attr('value',data[0].联系人);
$('#txtLianXiRenDianHua').attr('value',data[0].联系人电话);
$('#txtDiZhi').attr('value',data[0].地址);
$('#txtChuanZhen').attr('value',data[0].传真);
$('#txtYouBian').attr('value',data[0].邮编);
$('#txtXieYiBianHao').attr('value',data[0].协议编号);
$('#txtKaiHuHang').attr('value',data[0].开户行);
$('#txtKaiHuHangZhangHao').attr('value',data[0].开户行账号);
$('#txtShuiHao').attr('value',data[0].税号);
$('#txtFaRenDaiBiao').attr('value',data[0].法人代表);
$('#txtShouJi').attr('value',data[0].手机);
$('#txtE-mial').attr('value',data[0].Email);
$('#txtQiYeDaiMa').attr('value',data[0].企业代码);
$('#txtYingYeZhiZhaoHaoMa').attr('value',data[0].营业执照号码);
$('#txtDiShuiDengJiHaoMa').attr('value',data[0].地税登记号码);
$('#txtGuoShuiDengJiHaoMa').attr('value',data[0].国税登证号码);
$('#datChengLiShiJian').datebox('setValue',data[0].成立时间1);
$('#txtZhuCeZiBen').attr('value',data[0].注册资本);
$('#txtDaoLuYunShuBianHao').attr('value',data[0].道路运输许可证编号);
$('#txtWeiXianPinYunShuXuKuHao').attr('value',data[0].危险品运输许可证号);
$('#txtJinBangRen').attr('value',data[0].经办人);
$('#txtJinBangRenLianXiDianHua').attr('value',data[0].经办人联系电话);
$('#txtSuoShuFenGongShi').attr('value',data[0].所属公司);
$('#txtBeiZhu').attr('value',data[0].备注);
});
3.3.6界面层代码
<div title="供应商档案信息表" style="padding:10px; width:auto; height:auto; border-style:none; background-color:#00CCCC;">
<table style="margin-left:20px; background-color:#33FFFF;">
<tr>
<td align="right"><strong style="font-size: medium" >合作单位编号:</strong><input type="text" id="txtGongYingShangBianMa" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >合作单位名称:</strong><input type="text" id="txtGongYingShangMingCheng" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >合作单位类型:</strong><input id="GongYingShangLeiXing" class="easyui-combobox" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >合作单位简称:</strong><input type="text" id="GongYingShangJianCheng" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >合作单位结算方式:</strong><input id="cboGongYingShangJieSuanFangShi" class="easyui-combobox" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >业务种类:</strong><input class="easyui-combobox" id="cboYeWuLeiXing" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >联系人:</strong><input type="text" id="txtLianXiRen" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >联系人电话:</strong><input type="text" id="txtLianXiRenDianHua" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >传真:</strong><input type="text" id="txtChuanZhen" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >邮编:</strong><input type="text" id="txtYouBian" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >协议编号:</strong><input type="text" id="txtXieYiBianHao" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >开户行:</strong><input type="text" id="txtKaiHuHang" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >开户行账号:</strong><input type="text" id="txtKaiHuHangZhangHao" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >税号:</strong><input type="text" id="txtShuiHao" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >法人代表:</strong><input type="text" id="txtFaRenDaiBiao" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >手机:</strong><input type="text" id="txtShouJi" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >E-mail:</strong><input type="text" id="txtE-mial" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >企业代码:</strong><input type="text" id="txtQiYeDaiMa" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >营业执照号码:</strong><input type="text" id="txtYingYeZhiZhaoHaoMa" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >地税登证号码:</strong><input type="text" id="txtDiShuiDengJiHaoMa" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >国税登证号码:</strong><input type="text" id="txtGuoShuiDengJiHaoMa" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >成立时间:</strong><input id="datChengLiShiJian" class="easyui-datebox" data-options="formatter:myformatter" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >注册资本:</strong><input type="text" id="txtZhuCeZiBen" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >道路运输许可证编号:</strong><input type="text" id="txtDaoLuYunShuBianHao" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >危险品运输许可证号:</strong><input type="text" id="txtWeiXianPinYunShuXuKuHao" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >经办人:</strong><input type="text" id="txtJinBangRen" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >经办人联系电话:</strong><input type="text" id="txtJinBangRenLianXiDianHua" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >所属分公司:</strong><input id="txtSuoShuFenGongShi" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
<tr>
<td align="right"><strong style="font-size: medium" >备注:</strong><input type="text" id="txtBeiZhu" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
<td align="right"><strong style="font-size: medium" >地址:</strong><input type="text" id="txtDiZhi" style="width:300px; height:30px;border-width: thin; border-style: none none outset none" /></td>
</tr>
3.3.7 控制器代码
#region 通过ID绑定数据
public ActionResult ChaXunByID(int GongYingShangDangAnID)
{
var dtGongYingShang = from tbGongYingShang in myEF.SYS_SupplierTable
join tbJieSuan in myEF.SYS_AttributeDetailedTable on tbGongYingShang.SupplierModeSettlementID equals tbJieSuan.AttributeDetailedID
join tbLeiXing in myEF.SYS_AttributeDetailedTable on tbGongYingShang.SupplierTypeID equals tbLeiXing.AttributeDetailedID
join tbYeWuZhongLei in myEF.SYS_AttributeDetailedTable on tbGongYingShang.BusinessTypeID equals tbYeWuZhongLei.AttributeDetailedID
where tbGongYingShang.SupplierID == GongYingShangDangAnID
select new
{
供应商档案ID = tbGongYingShang.SupplierID,
供应商编号 = tbGongYingShang.SupplierNumber,
供应商名称 = tbGongYingShang.SupplierName,
供应商类型ID = tbLeiXing.AttributeDetailedID,
供应商类型 = tbLeiXing.AttributeDetailedName,
供应商简称 = tbGongYingShang.SupplierAbbreviation,
供应商结算方式ID = tbJieSuan.AttributeDetailedID,
供应商结算方式 = tbJieSuan.AttributeDetailedName,
业务种类ID = tbYeWuZhongLei.AttributeDetailedID,
业务种类 = tbYeWuZhongLei.AttributeDetailedName,
联系人 = tbGongYingShang.Linkman,
联系人电话 = tbGongYingShang.LinkmanPhone,
地址 = tbGongYingShang.SupplierAddress,
传真 = tbGongYingShang.Fax,
邮编 = tbGongYingShang.Postcode,
协议编号 = tbGongYingShang.TreatyNumber,
开户行 = tbGongYingShang.Bank,
开户行账号 = tbGongYingShang.BankAccountNumber,
税号 = tbGongYingShang.DutyParagraph,
法人代表 = tbGongYingShang.LegalDelegate,
手机 = tbGongYingShang.MobilePhone,
Email = tbGongYingShang.Email,
企业代码 = tbGongYingShang.EnterpriseCode,
营业执照号码 = tbGongYingShang.BusinessLicenseNumber,
地税登记号码 = tbGongYingShang.GovernmentRentCertificateNumber,
国税登证号码 = tbGongYingShang.NationalTaxCertificateNumber,
成立时间 = tbGongYingShang.SetUpTime,
注册资本 = tbGongYingShang.RegisteredCapital,
道路运输许可证编号 = tbGongYingShang.RoadTransportLicenseNumber,
危险品运输许可证号 = tbGongYingShang.DangerousGoodsTransportLicense,
经办人 = tbGongYingShang.Agent,
经办人联系电话 = tbGongYingShang.AgentContactPhone,
所属公司 = tbGongYingShang.CompanyAffiliation,
备注 = tbGongYingShang.Note,
};
List<Dictionary<string, object>> ListReturn = new List<Dictionary<string, object>>();
foreach (var item in dtGongYingShang)
{
Dictionary<string, object> itemGongYingShang = new Dictionary<string, object>();
//遍历反射方式获取属性名和属性值
foreach (System.Reflection.PropertyInfo p in item.GetType().GetProperties())
{
itemGongYingShang.Add(p.Name, p.GetValue(item, null).ToString().Trim());
}
string shijian = item.成立时间.ToString();
itemGongYingShang.Add("成立时间1", shijian);
ListReturn.Add(itemGongYingShang);
}
return Json(ListReturn, JsonRequestBehavior.AllowGet);
}
#endregion