- [x] 优化家化OA待办日志以及主题标题为空
- [x] 认领单,收款单,付款单,业务小类根据业务大类过滤 - [x] 处理认领单保存后付款人类型过滤失效(保存后刷新字段) - [x] 处理收款单保存提示没有业务单据报错 - [x] 收款处理清账状态携带失效 s
This commit is contained in:
parent
6e39061530
commit
dde5c07008
|
|
@ -0,0 +1,83 @@
|
|||
package shjh.jhzj7.fi.fi.plugin.form;
|
||||
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.form.field.BasedataEdit;
|
||||
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||
import kd.bos.list.ListShowParameter;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.EventObject;
|
||||
|
||||
/**
|
||||
* 认领单,收款单,付款单表单插件
|
||||
* shjh_cas_claimbill_ext
|
||||
* shjh_cas_recbill_ext
|
||||
* shjh_cas_paybill_ext
|
||||
* 根据业务大类过滤业务小类
|
||||
*/
|
||||
public class ClaimFormPlugin extends AbstractFormPlugin implements Plugin , BeforeF7SelectListener {
|
||||
|
||||
@Override
|
||||
public void registerListener(EventObject e) {
|
||||
super.registerListener(e);
|
||||
String entityId = this.getView().getEntityId();
|
||||
String type_small = "shjh_bizsmall";
|
||||
String type_big = "shjh_bizbig";
|
||||
//收款单(业务大类标识不同)_认领单,付款单
|
||||
if ("cas_recbill".equals(entityId)) {
|
||||
type_big = "shjh_bizebig";
|
||||
}
|
||||
//业务小类
|
||||
BasedataEdit shjh_bizsmall = this.getView().getControl(type_small);
|
||||
shjh_bizsmall.addBeforeF7SelectListener(this);
|
||||
//业务大类
|
||||
BasedataEdit shjh_bizbig = this.getView().getControl(type_big);
|
||||
shjh_bizbig.addBeforeF7SelectListener(this);
|
||||
}
|
||||
@Override
|
||||
public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
|
||||
String entityId = this.getView().getEntityId();
|
||||
String type = "shjh_bizbig";
|
||||
//收款单(业务大类标识不同)_认领单,付款单
|
||||
if ("cas_recbill".equals(entityId)) {
|
||||
type = "shjh_bizebig";
|
||||
}
|
||||
String name = beforeF7SelectEvent.getProperty().getName();
|
||||
switch (name) {
|
||||
case "shjh_bizsmall":
|
||||
QFilter q1 = null;
|
||||
DynamicObject shjh_bizbig = this.getModel().getDataEntity().getDynamicObject(type);
|
||||
if (null != shjh_bizbig) {
|
||||
q1 = new QFilter("shjh_bizbigtype.id", QCP.equals, shjh_bizbig.getLong("id"));
|
||||
}
|
||||
ListShowParameter listShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
|
||||
listShowParameter.getListFilterParameter().setFilter(q1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void propertyChanged(PropertyChangedArgs e) {
|
||||
super.propertyChanged(e);
|
||||
String name = e.getProperty().getName();
|
||||
switch (name) {
|
||||
//业务大类(付款单,认领单)
|
||||
case "shjh_bizbig":
|
||||
this.getView().getModel().setValue("shjh_bizsmall", null);
|
||||
break;
|
||||
//收款单
|
||||
case "shjh_bizebig":
|
||||
this.getView().getModel().setValue("shjh_bizsmall", null);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,8 +2,12 @@ package shjh.jhzj7.fi.fi.plugin.form;
|
|||
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.dataentity.entity.LocaleString;
|
||||
import kd.bos.dataentity.utils.StringUtils;
|
||||
import kd.bos.entity.EntityMetadataCache;
|
||||
import kd.bos.entity.ValueMapItem;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.entity.property.ComboProp;
|
||||
import kd.bos.form.control.events.BeforeItemClickEvent;
|
||||
import kd.bos.form.events.ClosedCallBackEvent;
|
||||
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||
|
|
@ -14,6 +18,7 @@ import kd.sdk.plugin.Plugin;
|
|||
import shjh.jhzj7.fi.fi.plugin.form.info.RecFieldsInfo;
|
||||
|
||||
import java.util.EventObject;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 表单插件-【收款单】
|
||||
|
|
@ -101,6 +106,7 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin {
|
|||
|
||||
/**
|
||||
* 已推送SAP不允许取消收款
|
||||
*
|
||||
* @param evt
|
||||
*/
|
||||
private void cancelRecValidator(BeforeItemClickEvent evt) {
|
||||
|
|
@ -244,17 +250,21 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin {
|
|||
if (null != closingStatus) {
|
||||
switch (closingStatus) {
|
||||
case "A":
|
||||
case "无需金蝶清账":
|
||||
hasNoClear = true;
|
||||
break;
|
||||
case "B":
|
||||
case "待清账":
|
||||
hasPendingClear = true;
|
||||
break;
|
||||
case "C":
|
||||
case "已清账":
|
||||
hasCleared = true;
|
||||
// 如果有不是“已清账”的,就说明不是全部“已清账”
|
||||
allCleared = false;
|
||||
break;
|
||||
case "D":
|
||||
case "反清账":
|
||||
hasReversedClear = true;
|
||||
// 如果有不是“反清账”的,就说明不是全部“反清账”
|
||||
allReversedCleared = false;
|
||||
|
|
@ -297,5 +307,4 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package shjh.jhzj7.fi.fi.plugin.operate;
|
|||
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.dataentity.metadata.IDataEntityType;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.logging.Log;
|
||||
|
|
@ -28,7 +29,14 @@ public class RecBillSaveOperation extends AbstractOperationServicePlugIn impleme
|
|||
//付款单提交之后 付款标识为被动付款,并且资金计划科目为空,从配置表(shjh_pay_account)携带资金计划科目
|
||||
DynamicObject[] dataEntities = e.getDataEntities();
|
||||
for (DynamicObject bill : dataEntities) {
|
||||
IDataEntityType dataEntityType = bill.getDataEntityType();
|
||||
String name = dataEntityType.getName();
|
||||
if (!"cas_recbill".equals(name)) {
|
||||
return;
|
||||
}
|
||||
bill = BusinessDataServiceHelper.loadSingle(bill.getPkValue(),"cas_recbill");
|
||||
|
||||
|
||||
// DynamicObject planClass = bill.getDynamicObject("shjh_planclass");
|
||||
// if (null == planClass) {
|
||||
//根据配置表携带资金计划科目
|
||||
|
|
|
|||
Loading…
Reference in New Issue