fix:询价单过滤
This commit is contained in:
parent
8fd73f664a
commit
cc363d3e8d
@ -9,7 +9,9 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|||||||
import kd.bos.entity.datamodel.IDataModel;
|
import kd.bos.entity.datamodel.IDataModel;
|
||||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||||
import kd.bos.entity.operate.result.OperationResult;
|
import kd.bos.entity.operate.result.OperationResult;
|
||||||
|
import kd.bos.form.FormShowParameter;
|
||||||
import kd.bos.form.IFormView;
|
import kd.bos.form.IFormView;
|
||||||
|
import kd.bos.form.ShowType;
|
||||||
import kd.bos.form.control.EntryGrid;
|
import kd.bos.form.control.EntryGrid;
|
||||||
import kd.bos.form.events.AfterDoOperationEventArgs;
|
import kd.bos.form.events.AfterDoOperationEventArgs;
|
||||||
import kd.bos.form.field.BasedataEdit;
|
import kd.bos.form.field.BasedataEdit;
|
||||||
@ -21,10 +23,7 @@ import kd.bos.orm.query.QFilter;
|
|||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.EventObject;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author power
|
* @author power
|
||||||
@ -45,13 +44,13 @@ public class InquirylistEdit extends AbstractBillPlugIn implements BeforeF7Selec
|
|||||||
OperationResult operationResult = e.getOperationResult();
|
OperationResult operationResult = e.getOperationResult();
|
||||||
switch (operateKey) {
|
switch (operateKey) {
|
||||||
case "optionaloperation":
|
case "optionaloperation":
|
||||||
FunctionalCommon.optionalOperation(model, view, "yem_optional", "optionaloperation");
|
optionalOperation(model, view, "yem_optional", "optionaloperation");
|
||||||
break;
|
break;
|
||||||
case "replaceoperation":
|
case "replaceoperation":
|
||||||
FunctionalCommon.optionalOperation(model, view, "yem_replace", "replaceoperation");
|
optionalOperation(model, view, "yem_replace", "replaceoperation");
|
||||||
break;
|
break;
|
||||||
case "retrofittingoperation":
|
case "retrofittingoperation":
|
||||||
FunctionalCommon.optionalOperation(model, view, "yem_retrofitting", "retrofittingoperation");
|
optionalOperation(model, view, "yem_retrofitting", "retrofittingoperation");
|
||||||
break;
|
break;
|
||||||
// case "submit":
|
// case "submit":
|
||||||
//// if (YEM.isNotEmpty(operationResult)) {
|
//// if (YEM.isNotEmpty(operationResult)) {
|
||||||
@ -66,6 +65,76 @@ public class InquirylistEdit extends AbstractBillPlugIn implements BeforeF7Selec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 选装、替换、加装功能公共方法
|
||||||
|
* @author xwudd
|
||||||
|
* @param[1] model
|
||||||
|
* @param[2] view
|
||||||
|
* @param[3] formId 动态表单标识
|
||||||
|
* @param[4] operationNumber 服务标识
|
||||||
|
* return
|
||||||
|
* @time 2023/7/27 9:38
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static void optionalOperation(IDataModel model, IFormView view, String formId, String operationNumber) {
|
||||||
|
String name = model.getDataEntity().getDataEntityType().getName();
|
||||||
|
int currentRowIndex = -1;
|
||||||
|
if("yem_es_salesorder".equals(name)||"yem_es_xsalesorder".equals(name)){
|
||||||
|
currentRowIndex = model.getEntryCurrentRowIndex("yem_es_materialinfo");
|
||||||
|
}
|
||||||
|
if("yem_im_clientdemand".equals(name) || "yem_im_inquirylist".equals(name)){
|
||||||
|
currentRowIndex = model.getEntryCurrentRowIndex("yem_im_detailedinfor");
|
||||||
|
}
|
||||||
|
DynamicObject billType = (DynamicObject) model.getValue("yem_billtype");
|
||||||
|
|
||||||
|
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<>();
|
||||||
|
List<Long> ids = new ArrayList();
|
||||||
|
// int multiConfigRows = model.getEntryRowCount("yem_multiconfig");
|
||||||
|
for (DynamicObject object : yem_multiconfig) {
|
||||||
|
// String configurType = (String) model.getValue("yem_configurtype", i);
|
||||||
|
Long configEntryId = object.getLong("yem_configentryid");
|
||||||
|
ids.add(configEntryId);
|
||||||
|
}
|
||||||
|
map.put("billTypeNumber", billType.getString("number"));
|
||||||
|
map.put("products", products.getPkValue());
|
||||||
|
map.put("operationNumber", operationNumber);
|
||||||
|
map.put("type", "B");
|
||||||
|
map.put("ids", ids);
|
||||||
|
map.put("productModel", productModel);
|
||||||
|
viewForm(formId, map, view);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 打开动态表单
|
||||||
|
* @author xwudd
|
||||||
|
* @param[1] formId 表单标识
|
||||||
|
* @param[2] map 传参 无参传null
|
||||||
|
* @param[3] view
|
||||||
|
* return
|
||||||
|
* @time 2023/8/29 11:19
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static void viewForm(String formId, Map<String, Object> map, IFormView view) {
|
||||||
|
FormShowParameter formShowParameter = new FormShowParameter();
|
||||||
|
formShowParameter.setFormId(formId);
|
||||||
|
formShowParameter.getOpenStyle().setShowType(ShowType.Modal);
|
||||||
|
if (YEM.isNotEmpty(map)) {
|
||||||
|
formShowParameter.setCustomParams(map);
|
||||||
|
}
|
||||||
|
view.showForm(formShowParameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param isDisable
|
* @param isDisable
|
||||||
* @Description 禁用操作
|
* @Description 禁用操作
|
||||||
|
Loading…
Reference in New Issue
Block a user