关联预付款单的供应商默认带出来后不允许修改

--s
This commit is contained in:
weiyunlong 2025-06-05 11:51:27 +08:00
parent 4cb177f253
commit 853e1b6143
1 changed files with 39 additions and 15 deletions

View File

@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import kd.bos.dataentity.entity.DynamicObject; import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection; import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.dataentity.utils.StringUtils; import kd.bos.dataentity.utils.StringUtils;
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
import kd.bos.form.FormShowParameter; import kd.bos.form.FormShowParameter;
import kd.bos.form.control.Button; import kd.bos.form.control.Button;
import kd.bos.form.control.Control; import kd.bos.form.control.Control;
@ -90,6 +91,14 @@ public class FeeControlApiPlugin extends AbstractFormPlugin implements Plugin {
this.getModel().setValue("shjh_supplier", this.getView().getParentView().getModel().getValue("recbasepayer")); this.getModel().setValue("shjh_supplier", this.getView().getParentView().getModel().getValue("recbasepayer"));
this.getView().updateView("shjh_supplier"); this.getView().updateView("shjh_supplier");
} }
DynamicObject supplier = (DynamicObject) this.getView().getModel().getValue("shjh_supplier");
DynamicObject recbasepayer = (DynamicObject) this.getView().getParentView().getModel().getValue("recbasepayer");
if (null != supplier && null != recbasepayer) {
this.getView().setEnable(false, "shjh_supplier");
} else {
this.getView().setEnable(true, "shjh_supplier");
}
} }
/** /**
@ -137,6 +146,19 @@ public class FeeControlApiPlugin extends AbstractFormPlugin implements Plugin {
} }
} }
@Override
public void propertyChanged(PropertyChangedArgs e) {
super.propertyChanged(e);
DynamicObject supplier = (DynamicObject) this.getView().getModel().getValue("shjh_supplier");
DynamicObject recbasepayer = (DynamicObject) this.getView().getParentView().getModel().getValue("recbasepayer");
if (null != supplier && null != recbasepayer) {
this.getView().setEnable(false, "shjh_supplier");
} else {
this.getView().setEnable(true, "shjh_supplier");
}
}
/** /**
* 点击查询按钮 * 点击查询按钮
* *
@ -410,6 +432,7 @@ public class FeeControlApiPlugin extends AbstractFormPlugin implements Plugin {
/** /**
* 获取当前操作用户工号 * 获取当前操作用户工号
*
* @return * @return
*/ */
public String getUserCode() { public String getUserCode() {
@ -438,6 +461,7 @@ public class FeeControlApiPlugin extends AbstractFormPlugin implements Plugin {
/** /**
* 组装参数 * 组装参数
*
* @param companyCode 公司代码 * @param companyCode 公司代码
* @param startDate 开始日期 * @param startDate 开始日期
* @param endDate 结束日期 * @param endDate 结束日期