This commit is contained in:
liangjunyu 2025-12-01 09:08:22 +08:00
parent 38aef8cdca
commit dceb51cc5e

View File

@ -24,6 +24,7 @@ namespace Gatedge.K3.Pilot.PlugIn.BOSPlugIn.Sal_Order
{
this.Model.SetValue("F_AGREEPRICE", 0, e.Row);
this.Model.SetValue("F_BIGCUSTSETTLEPRICE", 0, e.Row);
this.Model.SetValue("F_BigCustDiscRate", 0, e.Row);
var materialId_Id = e.NewValue.Long2Int();
if (materialId_Id == 0)
@ -53,12 +54,7 @@ namespace Gatedge.K3.Pilot.PlugIn.BOSPlugIn.Sal_Order
this.Model.SetValue("F_BigCustDiscRate", F_BigCustDiscRate, e.Row);
}
else
{
this.Model.SetValue("F_AGREEPRICE", 0, e.Row);
this.Model.SetValue("F_BIGCUSTSETTLEPRICE", 0, e.Row);
this.Model.SetValue("F_BigCustDiscRate", 0, e.Row);
}
}
//客户
@ -82,6 +78,8 @@ namespace Gatedge.K3.Pilot.PlugIn.BOSPlugIn.Sal_Order
this.Model.SetValue("F_BIGCUSTSETTLEPRICE", 0, rowIndex);
this.Model.SetValue("F_BigCustDiscRate", 0, rowIndex);
var F_SettlementP = 0M;
if (materialId_Id > 0 && custId_Id > 0)
{
var resData = dal.GetMaterialPrice(materialId_Id, custId_Id, dateTime);
@ -102,15 +100,21 @@ namespace Gatedge.K3.Pilot.PlugIn.BOSPlugIn.Sal_Order
var F_BigCustDiscRate = data["F_BIGCUSTDISCRATE"].Convert<decimal>();
this.Model.SetValue("F_BigCustDiscRate", F_BigCustDiscRate, rowIndex);
F_SettlementP = F_BIGCUSTSETTLEPRICE * (F_BigCustDiscRate == 0 ? 1 : (F_BigCustDiscRate / 100));
}
}
this.View.InvokeFieldUpdateService("FMaterialId", rowIndex);
if (F_SettlementP != 0)
{
this.Model.SetValue("F_SettlementP", F_SettlementP, rowIndex);
}
else if(materialId_Id > 0)
{
var materialId = entry["MaterialId"] as DynamicObject;
this.Model.SetValue("F_SettlementP", materialId["F_JSJ"].Convert<decimal>(), rowIndex);
}
}
}
}
}
}