1.收款单修改认领金额更新
This commit is contained in:
ljw 2024-11-01 17:41:18 +08:00
parent 762ecf3414
commit f087aea531

View File

@ -81,7 +81,7 @@ public class GatheringClaimFormPlugin extends AbstractFormPlugin implements RowC
model.setValue("yem_unclaimedamo", receivableamt.subtract(claimamtA));
if ("claim".equals(opType)) {
for (int i = 0; i < collection.size(); i++) {
claim(model, i, collection, claimdetail, i, parentModel);
claim(model, i, collection, claimdetail, i, parentModel,rowIndex);
view.setEnable(false, i, new String[]{"yem_remark_b", "yem_claimamt", "yem_salcontractclaamt", "yem_originid", "yem_claimdate", "yem_moneynature", "yem_moneytype", "yem_productclassify", "yem_receiptuse", "yem_operator_b", "yem_salcontractno", "yem_hidsalcontractno", "yem_billtype_b", "yem_contractrelevcuy", "yem_salcontractamt", "yem_shippingdetailsno", "yem_hidshippingdetailsno", "yem_shipamt", "yem_claimamtbase", "yem_contractamtbase", "yem_conversionrate", "yem_department_b"});
}
model.setValue("yem_optype", "A");
@ -89,7 +89,7 @@ public class GatheringClaimFormPlugin extends AbstractFormPlugin implements RowC
}
if ("changeclaim".equals(opType)) {
claim(model, subRowIdx, collection, claimdetail, 0, parentModel);
claim(model, subRowIdx, collection, claimdetail, 0, parentModel,rowIndex);
view.setEnable(false, 0, new String[]{"yem_salcontractclaamt", "yem_originid", "yem_claimdate", "yem_moneynature", "yem_moneytype", "yem_productclassify", "yem_receiptuse", "yem_operator_b", "yem_salcontractno", "yem_hidsalcontractno", "yem_billtype_b", "yem_contractrelevcuy", "yem_salcontractamt", "yem_shippingdetailsno", "yem_hidshippingdetailsno", "yem_shipamt", "yem_claimamtbase", "yem_contractamtbase", "yem_conversionrate", "yem_department_b"});
model.setValue("yem_optype", "B");
}
@ -97,7 +97,7 @@ public class GatheringClaimFormPlugin extends AbstractFormPlugin implements RowC
// yem_unclaimedamo = yem_receivableamt - yem_claimamt_a
}
private void claim(IDataModel model, int row, DynamicObjectCollection collection, DynamicObjectCollection claimdetail, int i, IDataModel parentModel) {
private void claim(IDataModel model, int row, DynamicObjectCollection collection, DynamicObjectCollection claimdetail, int i, IDataModel parentModel,int rowIndex) {
DynamicObject dynamicObject = collection.get(row);
DynamicObject object = claimdetail.addNew();
setEntryValue(object, dynamicObject, "from");
@ -121,8 +121,11 @@ public class GatheringClaimFormPlugin extends AbstractFormPlugin implements RowC
",yem_claimdetail.yem_salcontractamt,yem_claimdetail.yem_orderrefundamt,yem_claimdetail.yem_shiprefundamt,yem_claimdetail.yem_periodrefundamt"
, new QFilter[]{new QFilter("id", QCP.equals, parentModel.getValue("id"))});
DynamicObjectCollection dynamicObjectCollection = loadSingle.getDynamicObjectCollection("yem_receiptdetail");
for (DynamicObject dynamicObjec : dynamicObjectCollection) {
DynamicObjectCollection yemClaimdetail = dynamicObjec.getDynamicObjectCollection("yem_claimdetail");
for (int x = 0; x < dynamicObjectCollection.size(); x++) {
if (rowIndex!=x){
continue;
}
DynamicObjectCollection yemClaimdetail = dynamicObjectCollection.get(x).getDynamicObjectCollection("yem_claimdetail");
for (int s = 0; s < yemClaimdetail.size(); s++) {
if (s == row) {
DynamicObject dynamicObject1 = yemClaimdetail.get(s);
@ -156,8 +159,11 @@ public class GatheringClaimFormPlugin extends AbstractFormPlugin implements RowC
",yem_claimdetail.yem_salcontractamt,yem_claimdetail.yem_orderrefundamt,yem_claimdetail.yem_shiprefundamt,yem_claimdetail.yem_periodrefundamt,yem_claimdetail.yem_shipamt"
, new QFilter[]{new QFilter("id", QCP.equals, parentModel.getValue("id"))});
DynamicObjectCollection dynamicObjectCollection = loadSingle.getDynamicObjectCollection("yem_receiptdetail");
for (DynamicObject dynamicObjec : dynamicObjectCollection) {
DynamicObjectCollection yemClaimdetail = dynamicObjec.getDynamicObjectCollection("yem_claimdetail");
for (int x = 0; x < dynamicObjectCollection.size(); x++) {
if (rowIndex!=x){
continue;
}
DynamicObjectCollection yemClaimdetail = dynamicObjectCollection.get(x).getDynamicObjectCollection("yem_claimdetail");
for (int s = 0; s < yemClaimdetail.size(); s++) {
if (s == row) {
DynamicObject dynamicObject1 = yemClaimdetail.get(s);