Compare commits
4 Commits
38287d9cda
...
cb15d81951
Author | SHA1 | Date |
---|---|---|
|
cb15d81951 | |
|
d4fd002735 | |
|
8849c41f10 | |
|
70c70c4201 |
|
@ -1300,7 +1300,8 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
|||
|
||||
warehouse = (DynamicObject) this.getModel().getValue("warehouse");
|
||||
project = propValue.getDynamicObject("project");
|
||||
if (project != null) {
|
||||
Object project1 = this.getModel().getValue("project");
|
||||
if (project != null && project1 == null) {
|
||||
this.getModel().setValue("project", project.getPkValue());
|
||||
} else if (warehouse != null) {
|
||||
DynamicObject wareProject = warehouse.getDynamicObject("project");
|
||||
|
|
|
@ -418,13 +418,13 @@ public class MaterialInventoryUtilsExt {
|
|||
}
|
||||
|
||||
private static DynamicObject getMatInvInfo(String orgId, String projectId, String warehouseId, String matId, String modelnum, String lot, String unitId) {
|
||||
QFilter filter = new QFilter("org", "=", StringUtils.isBlank(orgId) ? 0L : Long.parseLong(orgId));
|
||||
filter.and(new QFilter("project", "=", StringUtils.isBlank(projectId) ? 0L : Long.parseLong(projectId)));
|
||||
filter.and(new QFilter("warehouse", "=", StringUtils.isBlank(warehouseId) ? 0L : Long.parseLong(warehouseId)));
|
||||
filter.and(new QFilter("material", "=", StringUtils.isBlank(matId) ? 0L : Long.parseLong(matId)));
|
||||
filter.and(new QFilter("modelnum", "=", modelnum == "" ? " " : modelnum));
|
||||
filter.and(new QFilter("lot", "=", lot));
|
||||
filter.and(new QFilter("measureunit", "=", StringUtils.isBlank(unitId) ? 0L : Long.parseLong(unitId)));
|
||||
QFilter filter = new QFilter("org", "=", StringUtils.isBlank(orgId) ? 0L : Long.parseLong(orgId));//所属组织
|
||||
filter.and(new QFilter("project", "=", StringUtils.isBlank(projectId) ? 0L : Long.parseLong(projectId)));//项目
|
||||
filter.and(new QFilter("warehouse", "=", StringUtils.isBlank(warehouseId) ? 0L : Long.parseLong(warehouseId)));//仓库
|
||||
filter.and(new QFilter("material", "=", StringUtils.isBlank(matId) ? 0L : Long.parseLong(matId)));//资源
|
||||
filter.and(new QFilter("modelnum", "=", modelnum == "" ? " " : modelnum));//规格型号
|
||||
filter.and(new QFilter("lot", "=", lot));//批次
|
||||
filter.and(new QFilter("measureunit", "=", StringUtils.isBlank(unitId) ? 0L : Long.parseLong(unitId)));//计量单位
|
||||
DynamicObject matInvInfo = BusinessDataServiceHelper.loadSingle("ecma_matinventory", "id,measureunit,lot,currency,price,qty,amount,lockedqty,tempqty,modelnum,saleprice,measureuint,project,org,material,warehouse", new QFilter[]{filter});
|
||||
return matInvInfo;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,11 @@ package zcgj.zcdev.zcdev.pr.plugin.form;
|
|||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.greenpineyu.fel.common.NumberUtil;
|
||||
import kd.bos.bill.BillShowParameter;
|
||||
import kd.bos.bill.OperationStatus;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.resource.ResManager;
|
||||
import kd.bos.dataentity.utils.StringUtils;
|
||||
import kd.bos.entity.datamodel.ListSelectedRow;
|
||||
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
||||
import kd.bos.form.CloseCallBack;
|
||||
|
@ -12,16 +16,24 @@ import kd.bos.form.ShowType;
|
|||
import kd.bos.form.control.events.BeforeItemClickEvent;
|
||||
import kd.bos.form.control.events.ItemClickEvent;
|
||||
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
||||
import kd.bos.form.events.HyperLinkClickArgs;
|
||||
import kd.bos.form.operate.FormOperate;
|
||||
import kd.bos.list.BillList;
|
||||
import kd.bos.list.plugin.AbstractListPlugin;
|
||||
import kd.bos.mvc.bill.BillModel;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
import kd.ec.basedata.common.utils.OpenPageUtils;
|
||||
import kd.fi.dhc.util.BillShowParameterUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 支出合同列表插件
|
||||
*/
|
||||
public class RenewalContractBillPlugin extends AbstractListPlugin {
|
||||
|
||||
|
||||
|
@ -58,6 +70,23 @@ public class RenewalContractBillPlugin extends AbstractListPlugin {
|
|||
|
||||
}
|
||||
|
||||
public void billListHyperLinkClick(HyperLinkClickArgs args) {
|
||||
super.billListHyperLinkClick(args);
|
||||
String fielldName = args.getHyperLinkClickEvent().getFieldName();
|
||||
if (StringUtils.equals(fielldName, "incontract_number")) {
|
||||
//收入合同编码
|
||||
args.setCancel(true);
|
||||
ListSelectedRow selectRow = ((BillList) this.getControl("billlistap")).getCurrentSelectedRowInfo();
|
||||
Long selectId = (Long) selectRow.getPrimaryKeyValue();
|
||||
DynamicObject ec_in_contract = QueryServiceHelper.queryOne("ec_in_contract", "id", new QFilter[]{new QFilter("id", "=", selectId)});//收入合同
|
||||
if (ec_in_contract == null) {
|
||||
this.getView().showTipNotification(ResManager.loadKDString("您选择的数据已被删除", "MyBillListPlugin_5", "fi-dhc-formplugin", new Object[0]));
|
||||
} else {
|
||||
BillShowParameter billShowParameter = OpenPageUtils.buildBillShowParam(selectId, "ec_in_contract");//收入合同
|
||||
this.getView().showForm(billShowParameter);//打开收入合同
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void itemClick(ItemClickEvent evt) {
|
||||
String itemKey = evt.getItemKey();
|
||||
|
|
Loading…
Reference in New Issue