Compare commits
3 Commits
36c95564ea
...
ba4c1a8a2a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ba4c1a8a2a | ||
97312c2c87 | |||
8457b51317 |
@ -940,6 +940,16 @@ public class SalesOrderEdit extends AbstractBillPlugIn implements Plugin, Before
|
||||
view.showSuccessNotification("操作成功");
|
||||
}
|
||||
}
|
||||
//作废
|
||||
if ("exportisvoid".equals(key)) {
|
||||
FormShowParameter showParameter = new FormShowParameter();
|
||||
showParameter.setFormId("yem_voidreason");
|
||||
showParameter.setCloseCallBack(null);
|
||||
showParameter.getOpenStyle().setShowType(ShowType.Modal);
|
||||
CloseCallBack callBack = new CloseCallBack(this, "exportisvoid");
|
||||
showParameter.setCloseCallBack(callBack);
|
||||
this.getView().showForm(showParameter);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1054,7 +1064,10 @@ public class SalesOrderEdit extends AbstractBillPlugIn implements Plugin, Before
|
||||
model.setValue("yem_color", number, detailedinfor);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if ("exportisvoid".equals(actionId)) {
|
||||
this.getView().invokeOperation("save");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
package com.yem.wm.im.servicerepair.dynamic;
|
||||
|
||||
import com.yem.wm.utils.YEM;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
import kd.bos.form.IFormView;
|
||||
import kd.bos.form.control.Control;
|
||||
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.EventObject;
|
||||
|
||||
/**
|
||||
@ -38,15 +40,24 @@ public class VoidReasonEdit extends AbstractFormPlugin {
|
||||
super.click(e);
|
||||
IFormView view = this.getView();
|
||||
IDataModel model = view.getModel();
|
||||
Control control = (Control)e.getSource();
|
||||
Control control = (Control) e.getSource();
|
||||
String key = control.getKey();
|
||||
IFormView parentView = view.getParentView();
|
||||
IDataModel parentViewModel = parentView.getModel();
|
||||
if ("btnok".equals(key)) {
|
||||
String voidreson = (String) model.getValue("yem_voidreson");
|
||||
if (YEM.isNotEmpty(voidreson.trim())) {
|
||||
DynamicObject dataEntity = parentViewModel.getDataEntity();
|
||||
String name = dataEntity.getDynamicObjectType().getName();
|
||||
if (name.equals("yem_es_salesorder")) {
|
||||
parentViewModel.setValue("yem_canceluser",YEM.getCurrentUserId());
|
||||
parentViewModel.setValue("yem_canceldate",new Date());
|
||||
parentViewModel.setValue("yem_voidreson", voidreson);
|
||||
parentViewModel.setValue("yem_cancelstatus", "B");
|
||||
} else {
|
||||
parentViewModel.setValue("yem_voidreson", voidreson);
|
||||
parentViewModel.setValue("yem_voidstatus", "B");
|
||||
}
|
||||
view.close();
|
||||
} else {
|
||||
view.showErrorNotification("请填写作废原因!!");
|
||||
|
@ -10,6 +10,8 @@ import kd.bos.entity.datamodel.events.ChangeData;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.form.FormShowParameter;
|
||||
import kd.bos.form.IFormView;
|
||||
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
||||
import kd.bos.form.operate.FormOperate;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
@ -118,4 +120,27 @@ public class AdvancePaymentAmountFormPlugin extends AbstractBillPlugIn {
|
||||
String join = String.join("+", list);
|
||||
model.setValue("yem_carmodelqty",join);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeDoOperation(BeforeDoOperationEventArgs e) {
|
||||
super.beforeDoOperation(e);
|
||||
IDataModel model = this.getModel();
|
||||
FormOperate source = (FormOperate) e.getSource();
|
||||
String key = source.getOperateKey();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if ("save".equals(key)) {
|
||||
String paymenttype = (String) model.getValue("yem_paymenttype");
|
||||
|
||||
if ("Z".equals(paymenttype)) {
|
||||
sb.append("整机");
|
||||
}
|
||||
if ("P".equals(paymenttype)) {
|
||||
sb.append("配件");
|
||||
}
|
||||
sb.append("-");
|
||||
String billno = (String) model.getValue("billno");
|
||||
sb.append(billno);
|
||||
model.setValue("yem_title", sb.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user