|
|
|
@ -1,17 +1,32 @@ |
|
|
|
using BWP.Web.Pages.B3Sale.Bills.Order_; |
|
|
|
using BWP.Web.Layout; |
|
|
|
using TSingSoft.WebControls2; |
|
|
|
using BWP.B3_YunKen.Rpcs; |
|
|
|
using BWP.B3Sale.BO; |
|
|
|
using Forks.EnterpriseServices.DomainObjects2.DQuery; |
|
|
|
using Forks.EnterpriseServices.DomainObjects2; |
|
|
|
using Forks.EnterpriseServices.BusinessInterfaces; |
|
|
|
using BWP.Web.Pages.Utils; |
|
|
|
|
|
|
|
namespace BWP.Web.Pages.B3YunKen.Overlays |
|
|
|
{ |
|
|
|
public class OrderEdit_Ext:OrderEdit |
|
|
|
{ |
|
|
|
protected override void AddCarDriverInfoConfig(LayoutManager layOutManager, AutoLayoutConfig config) |
|
|
|
{ |
|
|
|
{ |
|
|
|
layOutManager.Add("Driver_Name", new DFValueLabel()); |
|
|
|
layOutManager.Add("DriverCard", new DFValueLabel()); |
|
|
|
layOutManager.Add("DriverPhone", new DFValueLabel()); |
|
|
|
layOutManager.Add("DriverPhone1", new DFValueLabel()); |
|
|
|
layOutManager.Add("EngineNumber", new DFValueLabel()); |
|
|
|
layOutManager.Add("VinNO", new DFValueLabel()); |
|
|
|
layOutManager.Add("HandcarNumber", new DFValueLabel()); |
|
|
|
layOutManager.Add("CellPhone", new DFValueLabel()); |
|
|
|
config.Add("DriverIDCard"); |
|
|
|
config.Add("Driver_ID"); |
|
|
|
config.Add("Driver_Name"); |
|
|
|
config.Add("DriverCard"); |
|
|
|
config.Add("DriverPhone"); |
|
|
|
config.Add("DriverPhone1"); |
|
|
|
config.Add("Car_ID"); |
|
|
|
config.Add("EngineNumber"); |
|
|
|
config.Add("VinNO"); |
|
|
|
@ -32,44 +47,55 @@ namespace BWP.Web.Pages.B3YunKen.Overlays |
|
|
|
base.AddLayOutManagerScript(layoutPanel); |
|
|
|
var idCard = layoutPanel.EnsureInputControlCreated<DFChoiceBox>("DriverIDCard");//司机身份证号下拉
|
|
|
|
var carid = layoutPanel.EnsureInputControlCreated<DFChoiceBox>("Car_ID");//运输车辆下拉
|
|
|
|
idCard.AutoPostBack = true; |
|
|
|
carid.AutoPostBack = true; |
|
|
|
//选择司机身份证号带出驾驶证号和司机名字
|
|
|
|
if (idCard != null) |
|
|
|
{ |
|
|
|
idCard.OnClientSelected += @"var idCard = this.front.value;
|
|
|
|
simpleRestCall('/MainSystem/B3_YunKen/Rpcs/DriverRpc/GetDriverInfoByIDCard',[idCard], |
|
|
|
function(result){ |
|
|
|
if(result.ID != null && result.ID != undefined){ |
|
|
|
__DFContainer.getControl('Driver_ID').fill(result.ID,result.Name); |
|
|
|
}else{ |
|
|
|
__DFContainer.getControl('Driver_ID').fill('',''); |
|
|
|
} |
|
|
|
if(result.DriverCard != null && result.DriverCard != undefined){ |
|
|
|
__DFContainer.setValue('DriverCard',result.DriverCard); |
|
|
|
}else{ |
|
|
|
__DFContainer.setValue('DriverCard',''); |
|
|
|
} |
|
|
|
if(result.Telephone != null && result.Telephone != undefined){ |
|
|
|
__DFContainer.setValue('DriverPhone',result.Telephone); |
|
|
|
}else{ |
|
|
|
__DFContainer.setValue('DriverPhone',''); |
|
|
|
} |
|
|
|
},{ });";
|
|
|
|
if (idCard != null) { |
|
|
|
idCard.SelectedValueChanged += delegate { |
|
|
|
mDFContainer.GetFromUIParitially("DriverIDCard"); |
|
|
|
if (!string.IsNullOrEmpty(Dmo.DriverIDCard)) { |
|
|
|
var driver = Util.GetDriverInfoByIDCard(Dmo.DriverIDCard); |
|
|
|
if (driver != null) { |
|
|
|
Dmo.Driver_ID = driver.ID; |
|
|
|
Dmo.Driver_Name = driver.Name; |
|
|
|
Dmo.DriverCard = driver.DriverCard; |
|
|
|
Dmo.DriverPhone = driver.Telephone; |
|
|
|
Dmo.DriverPhone1 = driver.LinkTypeOne; |
|
|
|
} else { |
|
|
|
Dmo.Driver_ID = null; |
|
|
|
Dmo.Driver_Name = string.Empty; |
|
|
|
Dmo.DriverCard = string.Empty; |
|
|
|
Dmo.DriverPhone = string.Empty; |
|
|
|
Dmo.DriverPhone1 = string.Empty; |
|
|
|
} |
|
|
|
AppToUI(); |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
//选择运输车辆带出发动机号、车架号、挂车车牌号
|
|
|
|
if (carid!=null) |
|
|
|
{ |
|
|
|
carid.OnClientSelected += @"var carid = this.front.value;
|
|
|
|
simpleRestCall('/MainSystem/B3_YunKen/Rpcs/DriverRpc/GetCarInfoByCarID',[carid], |
|
|
|
function(result){ |
|
|
|
if(result!=null){ |
|
|
|
__DFContainer.setValue('EngineNumber',result.EngineNumber); |
|
|
|
__DFContainer.setValue('VinNO',result.VinNO); |
|
|
|
__DFContainer.setValue('HandcarNumber',result.HandcarNumber); |
|
|
|
} |
|
|
|
},{ });";
|
|
|
|
carid.SelectedValueChanged += delegate { |
|
|
|
mDFContainer.GetFromUIParitially("Car_ID"); |
|
|
|
if (Dmo.Car_ID.HasValue) { |
|
|
|
var car = Util.GetCarInfoByCarID(Dmo.Car_ID.Value); |
|
|
|
if (car != null) { |
|
|
|
Dmo.EngineNumber = car.EngineNumber; |
|
|
|
Dmo.VinNO = car.VinNO; |
|
|
|
Dmo.HandcarNumber = car.HandcarNumber; |
|
|
|
} else { |
|
|
|
Dmo.EngineNumber = string.Empty; |
|
|
|
Dmo.VinNO = string.Empty; |
|
|
|
Dmo.HandcarNumber = string.Empty; |
|
|
|
} |
|
|
|
AppToUI(); |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |