1.返利规则调整
This commit is contained in:
		
							parent
							
								
									80b8efa554
								
							
						
					
					
						commit
						e4bae3c609
					
				|  | @ -9,6 +9,7 @@ import kd.bos.dataentity.utils.StringUtils; | |||
| import kd.bos.entity.param.CustomParam; | ||||
| import kd.bos.form.FormShowParameter; | ||||
| import kd.bos.form.control.events.ItemClickEvent; | ||||
| import kd.bos.form.events.AfterDoOperationEventArgs; | ||||
| import kd.bos.logging.Log; | ||||
| import kd.bos.logging.LogFactory; | ||||
| import kd.bos.orm.query.QCP; | ||||
|  | @ -33,6 +34,19 @@ public class RebateRulesBillPlugin extends AbstractBillPlugIn implements Plugin | |||
|         this.addItemClickListeners("tbmain"); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) { | ||||
|         super.afterDoOperation(afterDoOperationEventArgs); | ||||
|         String itemKey = afterDoOperationEventArgs.getOperateKey(); | ||||
|         if (StringUtils.equals("donothing", itemKey)) { | ||||
|             DynamicObject dataEntity = this.getModel().getDataEntity(true); | ||||
|             HashMap<String, DynamicObject> map = new HashMap<>(); | ||||
|             map.put("tqq9_pur_rebate", dataEntity); | ||||
|             this.getView().returnDataToParent(map); | ||||
|             this.getView().close(); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public void afterCreateNewData(EventObject e) { | ||||
|         // 获取当前页面的FormShowParameter对象 | ||||
|  | @ -78,16 +92,18 @@ public class RebateRulesBillPlugin extends AbstractBillPlugIn implements Plugin | |||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public void itemClick(ItemClickEvent evt) { | ||||
|         super.itemClick(evt); | ||||
|         String itemKey = evt.getItemKey(); | ||||
|         if (StringUtils.equals("tqq9_confirm", itemKey)) { | ||||
|             DynamicObject dataEntity = this.getModel().getDataEntity(true); | ||||
|             HashMap<String, DynamicObject> map = new HashMap<>(); | ||||
|             map.put("tqq9_pur_rebate", dataEntity); | ||||
|             this.getView().returnDataToParent(map); | ||||
|             this.getView().close(); | ||||
|         } | ||||
|     } | ||||
| //    @Override | ||||
| //    public void itemClick(ItemClickEvent evt) { | ||||
| //        super.itemClick(evt); | ||||
| //        String itemKey = evt.getItemKey(); | ||||
| //        if (StringUtils.equals("tqq9_confirm", itemKey)) { | ||||
| //            DynamicObject dataEntity = this.getModel().getDataEntity(true); | ||||
| //            HashMap<String, DynamicObject> map = new HashMap<>(); | ||||
| //            map.put("tqq9_pur_rebate", dataEntity); | ||||
| //            this.getView().returnDataToParent(map); | ||||
| //            this.getView().close(); | ||||
| //        } | ||||
| //    } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | @ -48,20 +48,12 @@ public class purconmAddRebateRulesPlugin extends AbstractFormPlugin implements P | |||
|     public void itemClick(ItemClickEvent evt) { | ||||
|         super.itemClick(evt); | ||||
|         String itemKey = evt.getItemKey(); | ||||
|         if ("tqq9_pur_rebate".equals(itemKey)) { | ||||
|         if (StringUtils.equals("tqq9_rebate_addrow", itemKey)) { | ||||
|             BillShowParameter param = new BillShowParameter(); | ||||
|             param.setFormId("tqq9_pur_rebate"); | ||||
|             param.setCustomParam("purcontract_billno", this.getModel().getValue("billno")); | ||||
|             param.setCustomParam("purcontract_supplier", this.getModel().getValue("supplier")); | ||||
|             param.setCloseCallBack(new CloseCallBack(this, "rebateSync")); | ||||
|             param.getOpenStyle().setShowType(ShowType.Modal); | ||||
|             this.getView().showForm(param); | ||||
|         } else if (StringUtils.equals("tqq9_rebate_addrow", itemKey)) { | ||||
|             BillShowParameter param = new BillShowParameter(); | ||||
|             param.setFormId("tqq9_pur_rebate"); | ||||
|             param.setCustomParam("purcontract_billno", this.getModel().getValue("billno")); | ||||
|             param.setCustomParam("purcontract_supplier",  this.getModel().getValue("supplier")); | ||||
|             param.setCustomParam("purcontract_tqq9_dxpp",  this.getModel().getValue("tqq9_dxpp")); | ||||
|             param.setCustomParam("purcontract_tqq9_dxpp", this.getModel().getValue("tqq9_dxpp")); | ||||
|             param.setCloseCallBack(new CloseCallBack(this, "entry_rebateSync")); | ||||
|             param.getOpenStyle().setShowType(ShowType.Modal); | ||||
|             this.getView().showForm(param); | ||||
|  | @ -78,7 +70,6 @@ public class purconmAddRebateRulesPlugin extends AbstractFormPlugin implements P | |||
|     public void closedCallBack(ClosedCallBackEvent closedCallBackEvent) { | ||||
|         super.closedCallBack(closedCallBackEvent); | ||||
|         IDataModel model = this.getModel(); | ||||
|         IFormView view = this.getView(); | ||||
|         String actionId = closedCallBackEvent.getActionId(); | ||||
|         Object returnData = closedCallBackEvent.getReturnData(); | ||||
|         if (returnData != null) { | ||||
|  | @ -139,6 +130,7 @@ public class purconmAddRebateRulesPlugin extends AbstractFormPlugin implements P | |||
|                 model.setValue("tqq9_creatuser", creator, size - 1);//创建人 | ||||
|                 model.setValue("tqq9_creatdate", createtime, size - 1);//创建时间 | ||||
|                 model.setValue("tqq9_lastdate", tqq9_lastdate, size - 1);//最后一次执行时间 | ||||
|                 model.setValue("tqq9_pur_rebate", dynamicObject, size - 1);//返利规则 | ||||
|             } | ||||
|         } | ||||
|         this.getView().updateView(); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue