fix:
1.附件上传自动保存
This commit is contained in:
parent
2b4af2f0f7
commit
f50553cb46
@ -11,12 +11,13 @@ import kd.bos.dataentity.metadata.dynamicobject.DynamicProperty;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
import kd.bos.entity.datamodel.events.ChangeData;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.entity.operate.result.OperationResult;
|
||||
import kd.bos.exception.KDBizException;
|
||||
import kd.bos.form.FormShowParameter;
|
||||
import kd.bos.form.IFormView;
|
||||
import kd.bos.form.control.AttachmentPanel;
|
||||
import kd.bos.form.control.EntryGrid;
|
||||
import kd.bos.form.control.events.RowClickEvent;
|
||||
import kd.bos.form.control.events.RowClickEventListener;
|
||||
import kd.bos.form.control.events.*;
|
||||
import kd.bos.form.events.*;
|
||||
import kd.bos.form.field.BasedataEdit;
|
||||
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||
@ -153,6 +154,12 @@ public class TrackplaceFormPlugIn extends AbstractBillPlugIn implements Plugin,
|
||||
}
|
||||
// 多功能配置
|
||||
break;
|
||||
case "yem_attachmentcountfield":
|
||||
Integer newValue = (Integer) changeData.getNewValue();
|
||||
if (newValue > 0) {
|
||||
this.getView().addClientCallBack("auto_save", 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,6 +240,21 @@ public class TrackplaceFormPlugIn extends AbstractBillPlugIn implements Plugin,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clientCallBack(ClientCallBackEvent e) {
|
||||
super.clientCallBack(e);
|
||||
if (e.getName().equals("auto_save")) {
|
||||
AttachmentPanel attachmentPanel = getControl("attachmentpanel");
|
||||
List<Map<String, Object>> data = attachmentPanel.getAttachmentData();
|
||||
if (data != null & !data.isEmpty()) {
|
||||
// String billstatus = (String) this.getView().getModel().getValue("billstatus");
|
||||
// if (!"A".equals(billstatus)) {
|
||||
OperationResult saveResult = this.getView().invokeOperation("save", YEM.getOptionNoMsg());
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterDoOperation(AfterDoOperationEventArgs e) {
|
||||
super.afterDoOperation(e);
|
||||
@ -274,10 +296,6 @@ public class TrackplaceFormPlugIn extends AbstractBillPlugIn implements Plugin,
|
||||
if (YEM.isEmpty(materiel)) {
|
||||
sb.append(String.format("第 %s 行,物料编码为空,请填写确认!!\n", selectRow + 1));
|
||||
}
|
||||
DynamicObject yem_resourcenog = (DynamicObject) model.getValue("yem_resourcenog", selectRow);
|
||||
if (YEM.isEmpty(yem_resourcenog)) {
|
||||
sb.append(String.format("第 %s 行,资源号为空,请填写确认!!\n", selectRow + 1));
|
||||
}
|
||||
DynamicObject dynamicObject = entity.get(selectRow); //获取选中行的单据体数据
|
||||
String seq = dynamicObject.getString("seq");
|
||||
String yemIsreloading = dynamicObject.getString("yem_isreloading");
|
||||
@ -372,7 +390,7 @@ public class TrackplaceFormPlugIn extends AbstractBillPlugIn implements Plugin,
|
||||
if (yemMateriel != null) {
|
||||
BigDecimal netweight = yemMateriel.getBigDecimal("netweight");
|
||||
boolean yemIsgift = dynamicObject.getBoolean("yem_isgift");
|
||||
if (netweight.compareTo(BigDecimal.ZERO) == 0&&!yemIsgift) {
|
||||
if (netweight.compareTo(BigDecimal.ZERO) == 0 && !yemIsgift) {
|
||||
String seq = dynamicObject.getString("seq");
|
||||
newBigDecimal.add(seq);
|
||||
// this.getView().showMessage("第【" + seq + "】行物料中净重为空,请稍后重试!");
|
||||
|
Loading…
Reference in New Issue
Block a user