You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

84 lines
2.8 KiB

using BWP.Web.Pages.B3Sale.Bills.SaleOutStore_;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.Web.Layout;
using TSingSoft.WebControls2;
using BWP.Web.Utils;
using BWP.B3Sale.Utils;
namespace BWP.Web.Pages.B3YunKen.Overlays
{
public class SaleOutStoreEdit_Ext: SaleOutStoreEdit
{
protected override void AddCarDriverInfo(LayoutManager layoutManager, AutoLayoutConfig config)
{
config.Add("DriverIDCard");
config.Add("Driver_ID");
config.Add("DriverCard");
config.Add("DriverPhone");
config.Add("Car_ID");
config.Add("EngineNumber");
config.Add("VinNO");
config.Add("HandcarNumber");
}
protected override void AddFreightConfig(LayoutManager layoutManager, AutoLayoutConfig config)
{
config.Add("FreightBear");
config.Add("FreightUnitPrice");
config.Add("FreightPrice");
config.Add("FreightPayment");
//需求单No.137672 【销售出库】‘基本属性’增加字段{承运方}
config.Add("Carrier_ID");
}
protected override void OverrideSaleKindId(LayoutManager layoutManager, AutoLayoutConfig config)
{
layoutManager.Add("SaleKind_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["SaleKind_ID"], B3SaleDataSources.));
config.Add("SaleKind_ID");
}
public override void AppToUI()
{
base.AppToUI();
mDFContainer.MakeReadonly("SaleKind_ID",!CheckDefaultRole("编辑销售类型"));
}
protected override void AddLayOutManagerScript(LayoutManager layoutPanel)
{
base.AddLayOutManagerScript(layoutPanel);
var idCard = layoutPanel.EnsureInputControlCreated<DFChoiceBox>("DriverIDCard");//司机身份证号下拉
var carid = layoutPanel.EnsureInputControlCreated<DFChoiceBox>("Car_ID");//运输车辆下拉
//选择司机身份证号带出驾驶证号和司机名字
if (idCard != null)
{
idCard.OnClientSelected += @"var idCard = this.front.value;
simpleRestCall('/MainSystem/B3_YunKen/Rpcs/DriverRpc/GetDriverInfoByIDCard',[idCard],
function(result){
if(result!=null){
__DFContainer.getControl('Driver_ID').fill(result.ID,result.Name);
__DFContainer.setValue('DriverCard',result.DriverCard);
__DFContainer.setValue('DriverPhone',result.Telephone);
}
},{ });";
}
//选择运输车辆带出发动机号、车架号、挂车车牌号
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);
}
},{ });";
}
}
}
}