【物料变更】详情界面复制报错问题修复
This commit is contained in:
parent
14c9c3f36a
commit
ef705ef8ef
|
|
@ -297,26 +297,30 @@ public class MaterialBillPlugin extends AbstractBillPlugIn {
|
||||||
}
|
}
|
||||||
if("copyandchange".equals(operateKey)) {
|
if("copyandchange".equals(operateKey)) {
|
||||||
super.beforeDoOperation(args);
|
super.beforeDoOperation(args);
|
||||||
|
this.getPageCache().put("copyMatId", this.getModel().getValue("id").toString());
|
||||||
FormOperate operate = (FormOperate) args.getSource();
|
FormOperate operate = (FormOperate) args.getSource();
|
||||||
String operateNo = operate.getOperateKey();
|
String operateNo = operate.getOperateKey();
|
||||||
if(operateNo.equalsIgnoreCase("copy")){
|
if(operateNo.equalsIgnoreCase("copyandchange")){
|
||||||
DynamicObject bill = this.getModel().getDataEntity();
|
DynamicObject bill = this.getModel().getDataEntity();
|
||||||
this.getView().getFormShowParameter().setCustomParam("copySrcBillName", bill.getString("name"));
|
this.getView().getFormShowParameter().setCustomParam("copySrcBillName", bill.getString("name"));
|
||||||
this.getView().getFormShowParameter().setCustomParam("copySrcBillNumber", bill.getString("number"));
|
this.getView().getFormShowParameter().setCustomParam("copySrcBillNumber", bill.getString("number"));
|
||||||
|
this.getView().getFormShowParameter().setCustomParam("operateKey", "copyandchange");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterCopyData(EventObject e) {
|
public void afterCopyData(EventObject e) {
|
||||||
super.afterCopyData(e);
|
super.afterCopyData(e);
|
||||||
String copySrcBillName = this.getView().getFormShowParameter().getCustomParam("copySrcBillName");
|
String operateKey = this.getView().getFormShowParameter().getCustomParam("operateKey");
|
||||||
String copySrcBillNumber = this.getView().getFormShowParameter().getCustomParam("copySrcBillNumber");
|
if("copyandchange".equals(operateKey)){
|
||||||
DynamicObject dataEntity = this.getModel().getDataEntity(true);
|
String copySrcBillName = this.getView().getFormShowParameter().getCustomParam("copySrcBillName");
|
||||||
dataEntity.set("name", copySrcBillName + "_copy");
|
String copySrcBillNumber = this.getView().getFormShowParameter().getCustomParam("copySrcBillNumber");
|
||||||
dataEntity.set("tqq9_srcnumber", copySrcBillNumber);
|
DynamicObject dataEntity = this.getModel().getDataEntity(true);
|
||||||
this.getView().invokeOperation("save");
|
dataEntity.set("name", copySrcBillName + "_copy");
|
||||||
|
dataEntity.set("tqq9_srcnumber", copySrcBillNumber);
|
||||||
|
this.getView().invokeOperation("save");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void afterDoOperation(AfterDoOperationEventArgs evt) {
|
public void afterDoOperation(AfterDoOperationEventArgs evt) {
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,7 @@ public class MaterialListPlugin extends AbstractListPlugin implements Plugin {
|
||||||
BillShowParameter parameter = e.getParameter();
|
BillShowParameter parameter = e.getParameter();
|
||||||
parameter.setCustomParam("copySrcBillName",bd_material.getString("name"));
|
parameter.setCustomParam("copySrcBillName",bd_material.getString("name"));
|
||||||
parameter.setCustomParam("copySrcBillNumber",bd_material.getString("number"));
|
parameter.setCustomParam("copySrcBillNumber",bd_material.getString("number"));
|
||||||
|
this.getView().getFormShowParameter().setCustomParam("operateKey", "copyandchange");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue