1.采购申请单调整
This commit is contained in:
parent
ee738e38ce
commit
75a0ebc55a
|
|
@ -8,6 +8,7 @@ import kd.bos.dataentity.entity.DynamicObject;
|
|||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.dataentity.utils.StringUtils;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
import kd.bos.entity.datamodel.events.AfterDeleteRowEventArgs;
|
||||
import kd.bos.entity.datamodel.events.ChangeData;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.form.FormShowParameter;
|
||||
|
|
@ -60,6 +61,31 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
|
||||
private final static String GZ_ORGNUMBER = "GZLC";
|
||||
|
||||
@Override
|
||||
public void afterDeleteRow(AfterDeleteRowEventArgs e) {
|
||||
super.afterDeleteRow(e);
|
||||
//折扣前价税合计:分录优惠金额,现返,货返金额分摊
|
||||
IDataModel model = this.getModel();
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
BigDecimal tqq9_discountamt_sh = (BigDecimal) model.getValue("tqq9_discountamt_sh");
|
||||
entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_sh, model);
|
||||
BigDecimal tqq9_hshfsyje_sh = (BigDecimal) model.getValue("tqq9_hshfsyje_sh");
|
||||
entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_sh, model);
|
||||
BigDecimal tqq9_hsxfsyje_sh = (BigDecimal) model.getValue("tqq9_hsxfsyje_sh");
|
||||
entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_sh, model);
|
||||
BigDecimal tqq9_discountamt_bj = (BigDecimal) model.getValue("tqq9_discountamt_bj");
|
||||
entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_bj, model);
|
||||
BigDecimal tqq9_hshfsyje_bj = (BigDecimal) model.getValue("tqq9_hshfsyje_bj");
|
||||
entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_bj, model);
|
||||
BigDecimal tqq9_hsxfsyje_bj = (BigDecimal) model.getValue("tqq9_hsxfsyje_bj");
|
||||
entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_bj, model);
|
||||
BigDecimal tqq9_discountamt_gz = (BigDecimal) model.getValue("tqq9_discountamt_gz");
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_gz, model);
|
||||
BigDecimal tqq9_hshfsyje_gz = (BigDecimal) model.getValue("tqq9_hshfsyje_gz");
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_gz, model);
|
||||
BigDecimal tqq9_hsxfsyje_gz = (BigDecimal) model.getValue("tqq9_hsxfsyje_gz");
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_gz, model);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void propertyChanged(PropertyChangedArgs e) {
|
||||
|
|
@ -129,35 +155,30 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
BigDecimal applyqty = (BigDecimal) model.getValue("applyqty");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.sumEntrByOrg(SH_ORGNUMBER, "applyqty", "tqq9_purqty_sh", model);
|
||||
// view.updateView();
|
||||
}
|
||||
//应付金额
|
||||
if (StringUtils.equals("tqq9_yfje", name)) {
|
||||
BigDecimal tqq9_yfje = (BigDecimal) model.getValue("tqq9_yfje");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.sumEntrByOrg(SH_ORGNUMBER, "tqq9_yfje", "tqq9_payamount_sh", model);
|
||||
// view.updateView();
|
||||
}
|
||||
//优惠金额_单头
|
||||
if (StringUtils.equals("tqq9_discountamt_sh", name)) {
|
||||
BigDecimal tqq9_discountamt_sh = (BigDecimal) model.getValue("tqq9_discountamt_sh");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_sh, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//货返_单头
|
||||
if (StringUtils.equals("tqq9_hshfsyje_sh", name)) {
|
||||
BigDecimal tqq9_hshfsyje_sh = (BigDecimal) model.getValue("tqq9_hshfsyje_sh");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_sh, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//现返_单头
|
||||
if (StringUtils.equals("tqq9_hsxfsyje_sh", name)) {
|
||||
BigDecimal tqq9_hsxfsyje_sh = (BigDecimal) model.getValue("tqq9_hsxfsyje_sh");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_sh, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//--------------北京------------------
|
||||
//集采供应商
|
||||
|
|
@ -203,7 +224,6 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
lcLogService.savelog("创建返利规则", URL, false, false, queryMap.toString(), "接口调用报错,无返回值");
|
||||
throw new RuntimeException(ex + ",请求返利系统失败");
|
||||
}
|
||||
// view.updateView();
|
||||
}
|
||||
}
|
||||
//收货仓库
|
||||
|
|
@ -211,42 +231,36 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
DynamicObject tqq9_rewares_bj = (DynamicObject) model.getValue("tqq9_rewares_bj");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateDynamicObjectByOrg(BJ_ORGNUMBER, "warehouse", tqq9_rewares_bj, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//采购数量
|
||||
if (StringUtils.equals("applyqty", name)) {
|
||||
BigDecimal applyqty = (BigDecimal) model.getValue("applyqty");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.sumEntrByOrg(BJ_ORGNUMBER, "applyqty", "tqq9_purqty_bj", model);
|
||||
// view.updateView();
|
||||
}
|
||||
//应付金额
|
||||
if (StringUtils.equals("tqq9_yfje", name)) {
|
||||
BigDecimal tqq9_yfje = (BigDecimal) model.getValue("tqq9_yfje");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.sumEntrByOrg(BJ_ORGNUMBER, "tqq9_yfje", "tqq9_payamount_bj", model);
|
||||
// view.updateView();
|
||||
}
|
||||
//优惠金额_单头
|
||||
if (StringUtils.equals("tqq9_discountamt_bj", name)) {
|
||||
BigDecimal tqq9_discountamt_bj = (BigDecimal) model.getValue("tqq9_discountamt_bj");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_bj, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//货返_单头
|
||||
if (StringUtils.equals("tqq9_hshfsyje_bj", name)) {
|
||||
BigDecimal tqq9_hshfsyje_bj = (BigDecimal) model.getValue("tqq9_hshfsyje_bj");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_bj, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//现返_单头
|
||||
if (StringUtils.equals("tqq9_hsxfsyje_bj", name)) {
|
||||
BigDecimal tqq9_hsxfsyje_bj = (BigDecimal) model.getValue("tqq9_hsxfsyje_bj");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_bj, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//--------------广州------------------
|
||||
//集采供应商
|
||||
|
|
@ -300,44 +314,38 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
DynamicObject tqq9_rewares_gz = (DynamicObject) model.getValue("tqq9_rewares_gz");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateDynamicObjectByOrg(GZ_ORGNUMBER, "warehouse", tqq9_rewares_gz, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//采购数量
|
||||
if (StringUtils.equals("applyqty", name)) {
|
||||
BigDecimal applyqty = (BigDecimal) model.getValue("applyqty");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.sumEntrByOrg(GZ_ORGNUMBER, "applyqty", "tqq9_purqty_gz", model);
|
||||
// view.updateView();
|
||||
}
|
||||
//应付金额
|
||||
if (StringUtils.equals("tqq9_yfje", name)) {
|
||||
BigDecimal tqq9_yfje = (BigDecimal) model.getValue("tqq9_yfje");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.sumEntrByOrg(GZ_ORGNUMBER, "tqq9_yfje", "tqq9_payamount_gz", model);
|
||||
// view.updateView();
|
||||
}
|
||||
//优惠金额_单头
|
||||
if (StringUtils.equals("tqq9_discountamt_gz", name)) {
|
||||
BigDecimal tqq9_discountamt_gz = (BigDecimal) model.getValue("tqq9_discountamt_gz");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_gz, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//货返_单头
|
||||
if (StringUtils.equals("tqq9_hshfsyje_gz", name)) {
|
||||
BigDecimal tqq9_hshfsyje_gz = (BigDecimal) model.getValue("tqq9_hshfsyje_gz");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_gz, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//现返_单头
|
||||
if (StringUtils.equals("tqq9_hsxfsyje_gz", name)) {
|
||||
BigDecimal tqq9_hsxfsyje_gz = (BigDecimal) model.getValue("tqq9_hsxfsyje_gz");
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_gz, model);
|
||||
// view.updateView();
|
||||
}
|
||||
//分录优惠金额,现返,货返金额分摊
|
||||
//折扣前价税合计:分录优惠金额,现返,货返金额分摊
|
||||
if (StringUtils.equals("tqq9_amount", name)) {
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
BigDecimal tqq9_discountamt_sh = (BigDecimal) model.getValue("tqq9_discountamt_sh");
|
||||
|
|
@ -359,6 +367,28 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
BigDecimal tqq9_hsxfsyje_gz = (BigDecimal) model.getValue("tqq9_hsxfsyje_gz");
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_gz, model);
|
||||
}
|
||||
//收获组织:分录优惠金额,现返,货返金额分摊
|
||||
if (StringUtils.equals("entryrecorg", name)) {
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
BigDecimal tqq9_discountamt_sh = (BigDecimal) model.getValue("tqq9_discountamt_sh");
|
||||
entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_sh, model);
|
||||
BigDecimal tqq9_hshfsyje_sh = (BigDecimal) model.getValue("tqq9_hshfsyje_sh");
|
||||
entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_sh, model);
|
||||
BigDecimal tqq9_hsxfsyje_sh = (BigDecimal) model.getValue("tqq9_hsxfsyje_sh");
|
||||
entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_sh, model);
|
||||
BigDecimal tqq9_discountamt_bj = (BigDecimal) model.getValue("tqq9_discountamt_bj");
|
||||
entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_bj, model);
|
||||
BigDecimal tqq9_hshfsyje_bj = (BigDecimal) model.getValue("tqq9_hshfsyje_bj");
|
||||
entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_bj, model);
|
||||
BigDecimal tqq9_hsxfsyje_bj = (BigDecimal) model.getValue("tqq9_hsxfsyje_bj");
|
||||
entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_bj, model);
|
||||
BigDecimal tqq9_discountamt_gz = (BigDecimal) model.getValue("tqq9_discountamt_gz");
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_gz, model);
|
||||
BigDecimal tqq9_hshfsyje_gz = (BigDecimal) model.getValue("tqq9_hshfsyje_gz");
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_gz, model);
|
||||
BigDecimal tqq9_hsxfsyje_gz = (BigDecimal) model.getValue("tqq9_hsxfsyje_gz");
|
||||
entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_gz, model);
|
||||
}
|
||||
//物料带出最高限价
|
||||
if (StringUtils.equals("material", name)) {
|
||||
ChangeData changeData = e.getChangeSet()[0];
|
||||
|
|
@ -517,6 +547,7 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
model.setValue("materialname", tqq9_material.getString("name"), i);//物料名称
|
||||
model.setValue("unit", tqq9_material.getDynamicObject("baseunit"), i);//计量单位
|
||||
model.setValue("baseunit", tqq9_material.getDynamicObject("baseunit"), i);//基本单位
|
||||
model.setValue("auxunit", tqq9_material.getDynamicObject("baseunit"), i);//基本单位
|
||||
model.setValue("rowclosestatus", "A", i);//行关闭状态
|
||||
model.setValue("rowterminatestatus", "A", i);//行终止状态
|
||||
model.setValue("entrypurog", LCJT, i);//分录采购组织(封存)
|
||||
|
|
|
|||
Loading…
Reference in New Issue