diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountImport.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountImport.jsp index ed4d161fd..6f0d34eae 100644 --- a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountImport.jsp +++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountImport.jsp @@ -14,7 +14,7 @@ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 String sButtons[][] = { - {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""}, + //{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""}, {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, {"true","","Button","导入Excel","导入Excel","importExcel()","","","","btn_icon_import"}, {"true","","Button","模版下载","模版下载","DistributorDownload()","","","","btn_icon_down",""}, diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoIBatchmportInfo.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoIBatchmportInfo.jsp index fb72ceb03..6eefc2b2f 100644 --- a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoIBatchmportInfo.jsp +++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoIBatchmportInfo.jsp @@ -18,13 +18,14 @@ String sButtons[][] = { {"true","All","Button","保存","保存所有修改","as_save(0)","","","",""}, - {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} + {"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"} + //{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} }; sButtonPosition = "south"; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src_core/com/tenwa/officetempalte/importcallback/impl/DistributorAccountImportCallback.java b/src_core/com/tenwa/officetempalte/importcallback/impl/DistributorAccountImportCallback.java index 170343976..e1d55848d 100644 --- a/src_core/com/tenwa/officetempalte/importcallback/impl/DistributorAccountImportCallback.java +++ b/src_core/com/tenwa/officetempalte/importcallback/impl/DistributorAccountImportCallback.java @@ -2,24 +2,32 @@ package com.tenwa.officetempalte.importcallback.impl; import java.util.Map; +import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; + import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.BizObjectQuery; +import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.awe.util.Transaction; import com.amarsoft.context.ASUser; public class DistributorAccountImportCallback extends BaseImportExcelCallBack { - public DistributorAccountImportCallback() { - // TODO Auto-generated constructor stub - } - @Override public void run(ASUser CurUser, BizObject importObject, Map model, Integer rowIndex, JBOTransaction tx, Transaction Sqlca) throws Exception { //导入账户 String coding = importObject.getAttribute("CRTPVC").toString(); - + BizObjectManager distributorManager = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME); + BizObject distributor = distributorManager.createQuery("distributor_coding=:distributor_coding").setParameter("distributor_coding", coding).getSingleResult(false); + if(distributor !=null){ + String distributor_no = distributor.getAttribute("distributor_no")==null?"":distributor.getAttribute("distributor_no").toString(); + importObject.setAttributeValue("distributor_id", distributor_no); + importObject.setAttributeValue("CRTPVC", ""); + + } }