fix:询价单替换

This commit is contained in:
ljw 2024-09-20 21:28:50 +08:00
parent 8c13ff38a2
commit fe50c336ee

View File

@ -89,19 +89,24 @@ public class InquirylistEdit extends AbstractBillPlugIn implements BeforeF7Selec
DynamicObject billType = (DynamicObject) model.getValue("yem_billtype"); DynamicObject billType = (DynamicObject) model.getValue("yem_billtype");
DynamicObjectCollection yem_im_detailedinfor = model.getEntryEntity("yem_im_detailedinfor"); DynamicObjectCollection yem_im_detailedinfor = model.getEntryEntity("yem_im_detailedinfor");
for (DynamicObject dynamicObject : yem_im_detailedinfor) {
DynamicObject productModel = (DynamicObject)model.getValue("yem_productmodel",currentRowIndex);
DynamicObject products = dynamicObject.getDynamicObject("yem_productmodel.yem_products");
DynamicObjectCollection yem_multiconfig = dynamicObject.getDynamicObjectCollection("yem_multiconfig");
if (yem_multiconfig != null) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
List<Long> ids = new ArrayList(); List<Long> ids = new ArrayList();
DynamicObject productModel = (DynamicObject) model.getValue("yem_productmodel", currentRowIndex);
DynamicObject products = yem_im_detailedinfor.get(0).getDynamicObject("yem_productmodel.yem_products");
for (DynamicObject dynamicObject : yem_im_detailedinfor) {
DynamicObjectCollection yem_multiconfig = dynamicObject.getDynamicObjectCollection("yem_multiconfig");
if (yem_multiconfig != null) {
// int multiConfigRows = model.getEntryRowCount("yem_multiconfig"); // int multiConfigRows = model.getEntryRowCount("yem_multiconfig");
for (DynamicObject object : yem_multiconfig) { for (DynamicObject object : yem_multiconfig) {
// String configurType = (String) model.getValue("yem_configurtype", i); // String configurType = (String) model.getValue("yem_configurtype", i);
Long configEntryId = object.getLong("yem_configentryid"); Long configEntryId = object.getLong("yem_configentryid");
ids.add(configEntryId); ids.add(configEntryId);
} }
}
}
map.put("billTypeNumber", billType.getString("number")); map.put("billTypeNumber", billType.getString("number"));
map.put("products", products.getPkValue()); map.put("products", products.getPkValue());
map.put("operationNumber", operationNumber); map.put("operationNumber", operationNumber);
@ -110,8 +115,6 @@ public class InquirylistEdit extends AbstractBillPlugIn implements BeforeF7Selec
map.put("productModel", productModel); map.put("productModel", productModel);
viewForm(formId, map, view); viewForm(formId, map, view);
} }
}
}
/** /**