|
|
@ -35,25 +35,54 @@ namespace BWP.Web.Pages.WeixinMessage_ |
|
|
string allUnitNum = string.Empty; |
|
|
string allUnitNum = string.Empty; |
|
|
string money = string.Empty; |
|
|
string money = string.Empty; |
|
|
string freightPrice = string.Empty; |
|
|
string freightPrice = string.Empty; |
|
|
if (cusAccept.BillType == dmoTypeId && cusAccept.BillID != null) { |
|
|
|
|
|
|
|
|
if (cusAccept.BillType == dmoTypeId) { |
|
|
var outbl = BIFactory.Create<ISaleOutStoreBL>(); |
|
|
var outbl = BIFactory.Create<ISaleOutStoreBL>(); |
|
|
var saleOutStore = outbl.Load(cusAccept.BillID.Value); |
|
|
|
|
|
outCode = saleOutStore.Code; |
|
|
|
|
|
dealer = saleOutStore.CustomerDealer_Name; |
|
|
|
|
|
car_Name = saleOutStore.Car_Name; |
|
|
|
|
|
freightUnitPrice = saleOutStore.FreightUnitPrice==null?string.Empty:saleOutStore.FreightUnitPrice.ToString(); |
|
|
|
|
|
driver_Name = saleOutStore.Driver_Name; |
|
|
|
|
|
driverPhone = saleOutStore.DriverPhone; |
|
|
|
|
|
allUnitNum = saleOutStore.AllUnitNum == null ? string.Empty : saleOutStore.AllUnitNum.ToString(); |
|
|
|
|
|
money = saleOutStore.Money == null ? string.Empty : saleOutStore.Money.ToString(); |
|
|
|
|
|
freightPrice = saleOutStore.FreightPrice == null ? string.Empty : saleOutStore.FreightPrice.ToString(); |
|
|
|
|
|
|
|
|
if (cusAccept.BillID != null) { |
|
|
|
|
|
var saleOutStore = outbl.Load(cusAccept.BillID.Value); |
|
|
|
|
|
outCode = saleOutStore.Code; |
|
|
|
|
|
dealer = saleOutStore.CustomerDealer_Name; |
|
|
|
|
|
car_Name = saleOutStore.Car_Name; |
|
|
|
|
|
if (!string.IsNullOrEmpty(saleOutStore.Car_Name) && !string.IsNullOrEmpty(saleOutStore.HandcarNumber)) { |
|
|
|
|
|
car_Name = saleOutStore.Car_Name + "/" + saleOutStore.HandcarNumber; |
|
|
|
|
|
} |
|
|
|
|
|
freightUnitPrice = saleOutStore.FreightUnitPrice == null ? string.Empty : saleOutStore.FreightUnitPrice.ToString(); |
|
|
|
|
|
driver_Name = saleOutStore.Driver_Name; |
|
|
|
|
|
driverPhone = saleOutStore.DriverPhone; |
|
|
|
|
|
if (!string.IsNullOrEmpty(saleOutStore.DriverPhone) && !string.IsNullOrEmpty(saleOutStore.DriverPhone1)) { |
|
|
|
|
|
driverPhone = saleOutStore.DriverPhone + "/" + saleOutStore.DriverPhone1; |
|
|
|
|
|
} |
|
|
|
|
|
allUnitNum = saleOutStore.AllUnitNum == null ? string.Empty : saleOutStore.AllUnitNum.ToString(); |
|
|
|
|
|
money = saleOutStore.Money == null ? string.Empty : saleOutStore.Money.ToString(); |
|
|
|
|
|
freightPrice = saleOutStore.FreightPrice == null ? string.Empty : saleOutStore.FreightPrice.ToString(); |
|
|
|
|
|
} else { |
|
|
|
|
|
outCode = cusAccept.BillIDs; |
|
|
|
|
|
dealer = cusAccept.CustomerDealer_Name; |
|
|
|
|
|
car_Name = cusAccept.Car_Name; |
|
|
|
|
|
if (!string.IsNullOrEmpty(cusAccept.Car_Name) && !string.IsNullOrEmpty(cusAccept.HandcarNumber)) { |
|
|
|
|
|
car_Name = cusAccept.Car_Name + "/" + cusAccept.HandcarNumber; |
|
|
|
|
|
} |
|
|
|
|
|
freightUnitPrice = cusAccept.FreightUnitPrice == null ? string.Empty : cusAccept.FreightUnitPrice.ToString(); |
|
|
|
|
|
driver_Name = cusAccept.Driver_Name; |
|
|
|
|
|
driverPhone = cusAccept.DriverPhone; |
|
|
|
|
|
if (!string.IsNullOrEmpty(cusAccept.DriverPhone) && !string.IsNullOrEmpty(cusAccept.DriverPhone1)) { |
|
|
|
|
|
driverPhone = cusAccept.DriverPhone + "/" + cusAccept.DriverPhone1; |
|
|
|
|
|
} |
|
|
|
|
|
allUnitNum = cusAccept.AcceptNumber == null ? string.Empty : cusAccept.AcceptNumber.ToString(); |
|
|
|
|
|
money = cusAccept.Money == null ? string.Empty : cusAccept.Money.ToString(); |
|
|
|
|
|
freightPrice = cusAccept.FreightPrice == null ? string.Empty : cusAccept.FreightPrice.ToString(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
var checkTime = cusAccept.CheckTime == null ? "" : cusAccept.CheckTime.Value.ToString(); |
|
|
var checkTime = cusAccept.CheckTime == null ? "" : cusAccept.CheckTime.Value.ToString(); |
|
|
var acceptNumber = cusAccept.AcceptNumber==null?string.Empty:cusAccept.AcceptNumber.ToString(); |
|
|
var acceptNumber = cusAccept.AcceptNumber==null?string.Empty:cusAccept.AcceptNumber.ToString(); |
|
|
var acceptFreightUnitPrice = cusAccept.FreightUnitPrice==null?string.Empty:cusAccept.FreightUnitPrice.ToString(); |
|
|
var acceptFreightUnitPrice = cusAccept.FreightUnitPrice==null?string.Empty:cusAccept.FreightUnitPrice.ToString(); |
|
|
var acceptMoney = cusAccept.Money==null?string.Empty:cusAccept.Money.ToString(); |
|
|
var acceptMoney = cusAccept.Money==null?string.Empty:cusAccept.Money.ToString(); |
|
|
var acceptFreightPrice = cusAccept.FreightPrice==null?string.Empty:cusAccept.FreightPrice.ToString(); |
|
|
var acceptFreightPrice = cusAccept.FreightPrice==null?string.Empty:cusAccept.FreightPrice.ToString(); |
|
|
|
|
|
|
|
|
|
|
|
var employee_Name = cusAccept.Employee_Name; |
|
|
|
|
|
var tel = string.Empty; |
|
|
|
|
|
using (var context = new TransactionContext()) { |
|
|
|
|
|
tel = InnerBLUtil.GetDmoPropertyByID<string>(context.Session, typeof(Employee), "HandPhone", cusAccept.Employee_ID ?? 0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var html = @"
|
|
|
var html = @"
|
|
|
<article class=""weui-article""> |
|
|
<article class=""weui-article""> |
|
|
<h1>{title}</h1> |
|
|
<h1>{title}</h1> |
|
|
@ -64,7 +93,11 @@ namespace BWP.Web.Pages.WeixinMessage_ |
|
|
<tr><td>客户名称</td><td colspan=""5"">{CustomerDealer_Name}</td></tr> |
|
|
<tr><td>客户名称</td><td colspan=""5"">{CustomerDealer_Name}</td></tr> |
|
|
<tr><td>运输车号</td><td colspan=""2"">{Car_Name}</td><td>运费单价</td><td colspan=""2"">{FreightUnitPrice}</td></tr> |
|
|
<tr><td>运输车号</td><td colspan=""2"">{Car_Name}</td><td>运费单价</td><td colspan=""2"">{FreightUnitPrice}</td></tr> |
|
|
<tr><td>司机姓名</td><td colspan=""2"">{Driver_Name}</td><td>司机电话</td><td colspan=""2"">{DriverPhone}</td></tr> |
|
|
<tr><td>司机姓名</td><td colspan=""2"">{Driver_Name}</td><td>司机电话</td><td colspan=""2"">{DriverPhone}</td></tr> |
|
|
<tr><td>总数量</td><td>{AllUnitNum}</td><td>总金额</td><td>{Money}</td><td>总运费</td><td>{FreightPrice}</td></tr> |
|
|
|
|
|
|
|
|
<tr><td>总数量(kg)</td><td>{AllUnitNum}</td><td>总金额</td><td>{Money}</td><td>总运费</td><td>{FreightPrice}</td></tr> |
|
|
|
|
|
</table> |
|
|
|
|
|
<table border=""1"" cellspacing=""0"" style=""margin-top:10px;""> |
|
|
|
|
|
<tr><td>客户经理</td><td colspan=""2"">{Employee_Name}</td><td>联系电话</td><td colspan=""2"">{Tel}</td></tr> |
|
|
|
|
|
<tr><td>温馨提示:</td><td colspan=""5"">如您对货单有疑问,请联系客户经理,谢谢!</td></tr> |
|
|
</table> |
|
|
</table> |
|
|
<table border=""1"" cellspacing=""0"" style=""margin-top:10px;""> |
|
|
<table border=""1"" cellspacing=""0"" style=""margin-top:10px;""> |
|
|
<tr><td colspan=""3"">分销商发货明细</td><td>单号</td><td colspan=""2"">{AcceptCode}</td></tr> |
|
|
<tr><td colspan=""3"">分销商发货明细</td><td>单号</td><td colspan=""2"">{AcceptCode}</td></tr> |
|
|
@ -78,7 +111,7 @@ namespace BWP.Web.Pages.WeixinMessage_ |
|
|
</article> |
|
|
</article> |
|
|
";
|
|
|
";
|
|
|
html = html.Replace("{title}", mMessage.Title); |
|
|
html = html.Replace("{title}", mMessage.Title); |
|
|
html = html.Replace("{OutCode}", outCode).Replace("{AccountingUnit_Name}", cusAccept.AccountingUnit_Name).Replace("{CheckTime}", checkTime).Replace("{CustomerDealer_Name}", dealer).Replace("{Car_Name}", car_Name).Replace("{FreightUnitPrice}", freightUnitPrice).Replace("{Driver_Name}", driver_Name).Replace("{DriverPhone}", driverPhone).Replace("{AllUnitNum}", allUnitNum).Replace("{Money}", money).Replace("{FreightPrice}", freightPrice).Replace("{AcceptCode}", cusAccept.Code).Replace("{AcceptNumber}", acceptNumber).Replace("{AcceptFreightUnitPrice}", acceptFreightUnitPrice).Replace("{AcceptMoney}", acceptMoney).Replace("{AcceptFreightPrice}", acceptFreightPrice); |
|
|
|
|
|
|
|
|
html = html.Replace("{OutCode}", outCode).Replace("{AccountingUnit_Name}", cusAccept.AccountingUnit_Name).Replace("{CheckTime}", checkTime).Replace("{CustomerDealer_Name}", dealer).Replace("{Car_Name}", car_Name).Replace("{FreightUnitPrice}", freightUnitPrice).Replace("{Driver_Name}", driver_Name).Replace("{DriverPhone}", driverPhone).Replace("{AllUnitNum}", allUnitNum).Replace("{Money}", money).Replace("{FreightPrice}", freightPrice).Replace("{AcceptCode}", cusAccept.Code).Replace("{AcceptNumber}", acceptNumber).Replace("{AcceptFreightUnitPrice}", acceptFreightUnitPrice).Replace("{AcceptMoney}", acceptMoney).Replace("{AcceptFreightPrice}", acceptFreightPrice).Replace("{Employee_Name}", employee_Name).Replace("{Tel}", tel); |
|
|
if (cusAccept.Details.Count() > 0) { |
|
|
if (cusAccept.Details.Count() > 0) { |
|
|
var str = new StringBuilder(); |
|
|
var str = new StringBuilder(); |
|
|
foreach (var detail in cusAccept.Details) { |
|
|
foreach (var detail in cusAccept.Details) { |
|
|
|