parent
							
								
									cf9b71da78
								
							
						
					
					
						commit
						eba6622da0
					
				|  | @ -0,0 +1,44 @@ | |||
| package tqq9.lc123.cloud.app.plugin.form.ap; | ||||
| 
 | ||||
| import com.alibaba.fastjson.JSONObject; | ||||
| import kd.bos.bill.AbstractBillPlugIn; | ||||
| import kd.bos.card.adapter.Button; | ||||
| import kd.bos.dataentity.entity.DynamicObject; | ||||
| import kd.bos.dataentity.entity.DynamicObjectCollection; | ||||
| import kd.bos.form.FormShowParameter; | ||||
| import kd.bos.form.plugin.AbstractFormPlugin; | ||||
| import kd.bos.logging.Log; | ||||
| import kd.bos.logging.LogFactory; | ||||
| import kd.bos.orm.query.QCP; | ||||
| import kd.bos.orm.query.QFilter; | ||||
| import kd.bos.servicehelper.BusinessDataServiceHelper; | ||||
| import kd.sdk.plugin.Plugin; | ||||
| 
 | ||||
| import java.util.EventObject; | ||||
| 
 | ||||
| /** | ||||
|  * 动态表单插件 | ||||
|  */ | ||||
| public class ApHandSettleFormPlugin extends AbstractBillPlugIn implements Plugin { | ||||
|     private final static Log logger = LogFactory.getLog(ApHandSettleFormPlugin.class); | ||||
| 
 | ||||
|     @Override | ||||
|     public void afterCreateNewData(EventObject e) { | ||||
|         // 获取当前页面的FormShowParameter对象 | ||||
|         FormShowParameter formShowParameter = this.getView().getFormShowParameter(); | ||||
|         // 获取自定义参数 | ||||
|         JSONObject e_asstact = formShowParameter.getCustomParam("e_asstact"); | ||||
|         JSONObject settleorg = formShowParameter.getCustomParam("settleorg"); | ||||
|         DynamicObject supplier = null; | ||||
|         DynamicObject bos_org = null; | ||||
|         if (e_asstact != null&&settleorg!=null) { | ||||
|             String number = e_asstact.get("number").toString(); | ||||
|             String number1 = settleorg.get("number").toString(); | ||||
|             supplier = BusinessDataServiceHelper.loadSingle("bd_supplier", new QFilter[]{new QFilter("number", QCP.equals, number)}); | ||||
|             bos_org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("number", QCP.equals, number1)}); | ||||
|             this.getModel().setValue("org", bos_org); | ||||
|             this.getModel().setValue("asstactvalue", supplier); | ||||
|         } | ||||
|         this.getModel().setValue("settlerelation", "apself"); | ||||
|     } | ||||
| } | ||||
|  | @ -39,8 +39,11 @@ public class RebateRulesBillPlugin extends AbstractBillPlugIn implements Plugin | |||
|         // 获取自定义参数 | ||||
|         String billno = (String) formShowParameter.getCustomParam("purcontract_billno"); | ||||
|         JSONObject purcontract_supplier = formShowParameter.getCustomParam("purcontract_supplier"); | ||||
|         DynamicObject supplier = null; | ||||
|         if (purcontract_supplier != null) { | ||||
|             String number = purcontract_supplier.get("number").toString(); | ||||
|         DynamicObject supplier = BusinessDataServiceHelper.loadSingle("bd_supplier", new QFilter[]{new QFilter("number", QCP.equals, number)}); | ||||
|             supplier = BusinessDataServiceHelper.loadSingle("bd_supplier", new QFilter[]{new QFilter("number", QCP.equals, number)}); | ||||
|         } | ||||
| 
 | ||||
|         // 把参数值赋值到页面文本字段上 | ||||
|         DynamicObject purcontract = BusinessDataServiceHelper.loadSingle("conm_purcontract", new QFilter[]{new QFilter("billno", QCP.equals, billno)}); | ||||
|  | @ -52,7 +55,6 @@ public class RebateRulesBillPlugin extends AbstractBillPlugIn implements Plugin | |||
|             this.getModel().setValue("tqq9_supplier", tqq9_supplier); | ||||
|         } | ||||
|         this.getModel().setValue("tqq9_conm_purcontract", purcontract); | ||||
| //       getView().updateView(); | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -127,7 +127,9 @@ public class purconmAddRebateRulesPlugin extends AbstractFormPlugin implements P | |||
| 
 | ||||
| 
 | ||||
|                 model.setValue("tqq9_rulename", name, size - 1);//规则名称 | ||||
|                 if (stringBuilder.length() > 0) { | ||||
|                     model.setValue("tqq9_company", stringBuilder.substring(1), size - 1);//主体 | ||||
|                 } | ||||
|                 model.setValue("tqq9_brand", tqq9_rebatebrand, size - 1);//品牌 | ||||
|                 model.setValue("tqq9_supplier", tqq9_supplier, size - 1);//供应商 | ||||
|                 model.setValue("tqq9_startdate", tqq9_startdate, size - 1);//返利开始时间 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue