Browse Source

代码提交

yaoyu 1 year ago
parent
commit
026e9c4308

+ 3 - 2
arap/arap/classes/.gitignore

@@ -1,2 +1,3 @@
-/test.gitkeep
-/resources.gitkeep
+/nc/
+/ArapBillCardForm.class
+/ArapBillListView.class

BIN
arap/arap/classes/nc/bs/arap/busireg/InitCloseCtrlListener.class


BIN
arap/arap/classes/nc/ui/arap/actions/ImportBodyAction.class


BIN
arap/arap/classes/nc/ui/arap/actions/OutputBodyAction.class


BIN
arap/arap/classes/nc/ui/arap/bill/LinkHyperListener.class


+ 1 - 0
arap/arap/classes/resources.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�

+ 1 - 0
arap/arap/classes/test.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�

+ 726 - 78
arap/arap/src/client/nc/ui/arap/actions/ImportBodyAction.java

@@ -75,22 +75,23 @@ public class ImportBodyAction extends BodyAddLineAction{
 
 
 	@Override
-	public void doAction(ActionEvent e) throws Exception {
-		
+	public void doAction(ActionEvent e) throws Exception {		
 		try {
 			importData(this);
 		} catch (Exception e2) {
-			int rowCounts = this.editorModel.getBillCardPanel().getRowCount();
-			//循环删行
-			for(int j = rowCounts-rowCount;j>=rowCount;j--){
-				this.editorModel.getBillCardPanel().getBillModel().delLine(new int[] {j});
+			if(rowCount != 0) {
+				int rowCounts = this.editorModel.getBillCardPanel().getRowCount();
+				//循环删行
+				for(int j = rowCounts;j>rowCount;j--){
+					System.out.println(j);
+					this.editorModel.getBillCardPanel().getBillModel().delLine(new int[] {j-1});
+				}	
 			}
 			if("Cannot get a text value from a numeric cell".equals(e2.getMessage())) {
 				throw new Exception("除了数量和金额,所有内容必须为文本格式!请检查Excle!");
 			}else {
 				throw e2;
-			}
-			
+			}			
 		}
 	}
 
@@ -109,8 +110,10 @@ public class ImportBodyAction extends BodyAddLineAction{
 		String type = sqlexecuteQuery("billtypename", "bd_billtype", "pk_billtypeid", cp.getHeadItem("pk_tradetypeid").getValueObject().toString(),null,0);
 		//应付单号
 		String billno = cp.getHeadItem("billno").getValueObject().toString();
-		
-		if(!"应付单(非项目)".equals(type) && !"应付单(项目)".equals(type)) {
+//		if(!"应付单(非项目)".equals(type) && !"应付单(项目)".equals(type)) {
+//			return;
+//		}
+		if(!"应付单(非项目)".equals(type) && !"应付单(项目)".equals(type) && !"预付核销单(非项目)".equals(type) && !"预付核销单(项目)".equals(type)) {
 			return;
 		}
 		importHendBeforCheck(cp,type);
@@ -124,7 +127,6 @@ public class ImportBodyAction extends BodyAddLineAction{
 		if (jfile.showSaveDialog(tp) == JFileChooser.CANCEL_OPTION) {
 		    return;
 		}
-
 		// 获取选择的文件名
 		filePath = jfile.getSelectedFile().toString();
 		try {
@@ -455,7 +457,6 @@ public class ImportBodyAction extends BodyAddLineAction{
 				cp.setBodyValueAt(PayableBillItemVO.getDef37(),count,"def37");
 				cp.setBodyValueAt(PayableBillItemVO.getDef38(),count,"def38");
 				cp.setBodyValueAt(PayableBillItemVO.getDef39(),count,"def39");
-				cp.setBodyValueAt(PayableBillItemVO.getDef40(),count,"def40");
 				cp.setBodyValueAt(PayableBillItemVO.getDef41(),count,"def41");
 				cp.setBodyValueAt(PayableBillItemVO.getDef42(),count,"def42");
 				cp.setBodyValueAt(PayableBillItemVO.getDef43(),count,"def43");
@@ -477,7 +478,7 @@ public class ImportBodyAction extends BodyAddLineAction{
 				cp.setBodyValueAt(PayableBillItemVO.getDef59(),count,"def59");
 				cp.setBodyValueAt(PayableBillItemVO.getDef60(),count,"def60");
 
-			}else {
+			}else if("应付单(项目)".equals(type)){
 				//发票号
 				String vbillcode = sheet.getRow(i).getCell(6).getStringCellValue();
 				PayableBillItemVO PayableBillItemVO = queryBillItem(billno,vbillcode);
@@ -790,71 +791,718 @@ public class ImportBodyAction extends BodyAddLineAction{
 				cp.setBodyValueAt(PayableBillItemVO.getDef58(),count,"def58");
 				cp.setBodyValueAt(PayableBillItemVO.getDef59(),count,"def59");
 				cp.setBodyValueAt(PayableBillItemVO.getDef60(),count,"def60");
-			}
-		}
-		//循环删行
-		for(int j = 0;j<rowCount;j++){
-			cp.getBillModel().delLine(new int[] {0});
-		}
-		//将pk转换成显示的编码	
-		BillModel tableModel = importBodyAction.editorModel.getBillCardPanel().getBodyPanel().getTableModel();
-		tableModel.loadLoadRelationItemValue();
-		/*
-		 * 表体def1是个参照,pk_subjcode写了个编辑公式把code赋值给了def1,我只能说很6,将编码导入def1后调用上面两句代码
-		会导致def1值为空,因为导入的code匹配不到对应name,只能再次调用编辑公式赋值
-		 */
-
-		//获取导入后的表体行数量循环调用编辑公式
-		int rowCounts = cp.getRowCount();
-		for (int x = 0; x < rowCounts; x++) {
-			importBodyAction.editorModel.getBillCardPanel().getBillModel().execEditFormulasByKey(x, "pk_subjcode");
-		}
-	}
-	
-	/*
-	 *	判断表头必填项
-	 */
-	private  void importHendBeforCheck(BillCardPanel cp,String type) throws Exception {
-		Object 	def3 = cp.getHeadItem("def3").getValueObject();
-		if(def3 == null){
-			throw new Exception("请先填写表头建议付款日期!");
-		}
-		Object 	def5 = cp.getHeadItem("def5").getValueObject();
-		if(def5 == null){
-			throw new Exception("请先填写表头费用承担部门!");
-		}
-		if("应付单(非项目)".equals(type)) {
-			Object 	def20 = cp.getHeadItem("def20").getValueObject();
-			if(def20 == null){
-				throw new Exception("请先填写表头预算所在部门!");
-			}
-			Object supplier = cp.getHeadItem("supplier").getValueObject();
-			if(supplier == null){
-				throw new Exception("请先填写表头对方单位名称!");
-			}
-			Object recaccount = cp.getHeadItem("recaccount").getValueObject();
-			if(recaccount == null){
-				throw new Exception("请先填写表头对方银行账户!");
-			}
-				
-		}else {
-		}
-	}
-	
-	
-	
-	/*
-	 * 判断表体必填项
-	 */
-	private void importBodyBeforCheck(HSSFSheet sheet, String type, int rowNum) throws Exception {
-		for (int i = 2; i < rowNum; i++) {
-			int[] index;
-			if("应付单(非项目)".equals(type)) {
-				//需要校验的Excle下标
-				index = new int[]{0,1,2,3,4,5,6,7,8,10,11,12,13,21};
-			}else {
-				//需要校验的Excle下标
-				index = new int[]{0,1,2,3,4,5,6,7,8,9,10,12,13,14,16,18,21};
+			}else if("预付核销单(非项目)".equals(type)){
+				//发票号
+				String vbillcode = sheet.getRow(i).getCell(4).getStringCellValue();
+				PayableBillItemVO PayableBillItemVO = queryBillItem(billno,vbillcode);
+				String pk_org = PayableBillItemVO.getPk_org();
+				//摘要
+				cp.setBodyValueAt(sqlexecuteQueryDoc(sheet.getRow(i).getCell(0).getStringCellValue(),"999"),count, "def25");
+				//费用归属
+				cp.setBodyValueAt(sqlexecuteQueryDoc(sheet.getRow(i).getCell(1).getStringCellValue(),"05"),count, "def30");
+				//预算编号
+				cp.setBodyValueAt(sheet.getRow(i).getCell(2).getStringCellValue(), count, "def1");
+				//预算名称
+				cp.setBodyValueAt(sqlexecuteQuery("pk_inoutbusiclass", "bd_inoutbusiclass", "name", sheet.getRow(i).getCell(3).getStringCellValue(),null,2), count,"pk_subjcode");
+				//发票号
+				cp.setBodyValueAt(vbillcode, count, "def12");
+				String pk_material = sqlexecuteQuery("pk_material", "bd_material", "name", sheet.getRow(i).getCell(5).getStringCellValue(), null, 2);
+				//物料
+				cp.setBodyValueAt(pk_material,count, "material");
+				//原始物料
+				cp.setBodyValueAt(pk_material,count, "material_src");
+				//税码
+				cp.setBodyValueAt(sqlexecuteQuery("pk_taxcode", "bd_taxcode", "description", sheet.getRow(i).getCell(6).getStringCellValue(), null,2),count, "taxcodeid");	
+				//税率
+				cp.setBodyValueAt(sheet.getRow(i).getCell(7).getStringCellValue(),count, "taxrate");
+ 				Object price = null;
+				if(dateUnit(sheet,i,8) != null) {
+					price = sheet.getRow(i).getCell(8).getCellType() == 1 ? sheet.getRow(i).getCell(8).getStringCellValue() : sheet.getRow(i).getCell(8).getNumericCellValue();
+				}
+				//单价
+				cp.setBodyValueAt(price,count, "price");
+				//本币单价
+				cp.setBodyValueAt(price,count, "local_price");
+				Object taxprice = sheet.getRow(i).getCell(9).getCellType() == 1 ? sheet.getRow(i).getCell(9).getStringCellValue() : sheet.getRow(i).getCell(9).getNumericCellValue();
+				//含税单价
+				cp.setBodyValueAt(taxprice,count, "taxprice");
+				//本币含税单价
+				cp.setBodyValueAt(taxprice,count, "local_taxprice");
+				Object caltaxmny = sheet.getRow(i).getCell(10).getCellType() == 1 ? sheet.getRow(i).getCell(10).getStringCellValue() : sheet.getRow(i).getCell(10).getNumericCellValue();
+				//计税金额
+				cp.setBodyValueAt(caltaxmny,count, "caltaxmny");
+				//贷方原币无税金额
+				cp.setBodyValueAt(caltaxmny,count, "notax_cr");
+				//组织本币无税金额
+				cp.setBodyValueAt(caltaxmny,count, "local_notax_cr");
+				//税额
+				cp.setBodyValueAt(sheet.getRow(i).getCell(11).getCellType() == 1 ? sheet.getRow(i).getCell(11).getStringCellValue() : sheet.getRow(i).getCell(11).getNumericCellValue(),count, "local_tax_cr");
+				//原币余额
+				Object money_bal = sheet.getRow(i).getCell(12).getCellType() == 1 ? sheet.getRow(i).getCell(12).getStringCellValue() : sheet.getRow(i).getCell(12).getNumericCellValue();
+				cp.setBodyValueAt(money_bal,count, "money_bal");
+				//组织本币余额
+				cp.setBodyValueAt(money_bal,count, "local_money_bal");
+				//贷方原币金额
+				cp.setBodyValueAt(money_bal,count, "money_cr");
+				//组织本币金额
+				cp.setBodyValueAt(money_bal,count, "local_money_cr");
+				//预占用原币余额
+				cp.setBodyValueAt(money_bal,count, "occupationmny");
+				//扣税类别
+				cp.setBodyValueAt("应税内含".equals(sheet.getRow(i).getCell(13).getStringCellValue()) ? 0 : 1,count, "taxtype");
+				//成本归属部门
+				cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(14).getStringCellValue(), pk_org,2),count, "def23");
+				//往来对象
+				Object objtype = dateUnit(sheet,i,15);
+				cp.setBodyValueAt("供应商".equals(objtype) ? 1 : "部门".equals(objtype) ? 2 : 3,count, "objtype");
+				//备注
+				cp.setBodyValueAt(dateUnit(sheet,i,16),count, "def2");
+				//对方单位名称
+				cp.setBodyValueAt(sqlexecuteQuery("pk_supplier", "bd_supplier", "name", sheet.getRow(i).getCell(17).getStringCellValue(), null, 2),count,"supplier");
+				//部门
+				cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(18).getStringCellValue(), pk_org, 2),count, "pk_deptid");
+				//部 门
+				cp.setBodyValueAt(sqlexecuteQuery("pk_vid", "org_dept_v", "name", sheet.getRow(i).getCell(18).getStringCellValue(), pk_org, 2),count, "pk_deptid_v");
+				//数量余额
+				cp.setBodyValueAt(PayableBillItemVO.getQuantity_bal(),count, "quantity_bal");
+				//贷方数量
+				cp.setBodyValueAt(PayableBillItemVO.getQuantity_cr(),count, "quantity_cr");
+				//结算方式
+				cp.setBodyValueAt(PayableBillItemVO.getPk_balatype(),count, "pk_balatype");
+				//资产合同号
+				cp.setBodyValueAt(PayableBillItemVO.getAssetpactno(),count, "assetpactno");
+				//  资金计划项目
+				cp.setBodyValueAt(PayableBillItemVO.getBankrollprojet(),count, "bankrollprojet");
+				//  单据大类
+				cp.setBodyValueAt(PayableBillItemVO.getBillclass(),count, "billclass");
+				//  单据日期
+				cp.setBodyValueAt(PayableBillItemVO.getBilldate(),count, "billdate");
+				//  单据号
+				cp.setBodyValueAt(PayableBillItemVO.getBillno(),count, "billno");
+				//  起算日期
+				cp.setBodyValueAt(PayableBillItemVO.getBusidate(),count, "busidate");
+				//  购销类型
+				cp.setBodyValueAt(PayableBillItemVO.getBuysellflag(),count, "buysellflag");
+				//  现金流量项目
+				cp.setBodyValueAt(PayableBillItemVO.getCashitem(),count, "cashitem");
+				//  CBS
+				cp.setBodyValueAt(PayableBillItemVO.getCbs(),count, "cbs");
+				//  责任核算要素
+				cp.setBodyValueAt(PayableBillItemVO.getCheckelement(),count, "checkelement");
+				//  票据类型
+				cp.setBodyValueAt(PayableBillItemVO.getChecktype(),count, "checktype");
+				//  摘要c
+				cp.setBodyValueAt(PayableBillItemVO.getComment(),count, "comment");
+				//  内部交易结算号
+				cp.setBodyValueAt(PayableBillItemVO.getConfernum(),count, "confernum");
+				//  合同号
+				cp.setBodyValueAt(PayableBillItemVO.getContractno(),count, "contractno");
+				//  单据协同状态
+				cp.setBodyValueAt(PayableBillItemVO.getCoordflag(),count, "coordflag");
+				//  成本中心
+				cp.setBodyValueAt(PayableBillItemVO.getCostcenter(),count, "costcenter");
+				//  方向
+				cp.setBodyValueAt(PayableBillItemVO.getDirection(),count, "direction");
+				//  设备编码
+				cp.setBodyValueAt(PayableBillItemVO.getEquipmentcode(),count, "equipmentcode");
+				//  固定资产卡片号
+				cp.setBodyValueAt(PayableBillItemVO.getFacard(),count, "facard");
+				//  散户
+				cp.setBodyValueAt(PayableBillItemVO.getFreecust(),count, "freecust");
+				//  全局本币余额
+				cp.setBodyValueAt(PayableBillItemVO.getGlobalbalance(),count, "globalbalance");
+				//  全局本币金额(贷方)
+				cp.setBodyValueAt(PayableBillItemVO.getGlobalcrebit(),count, "globalcrebit");
+				//  全局本币无税金额(贷方)
+				cp.setBodyValueAt(PayableBillItemVO.getGlobalnotax_cre(),count, "globalnotax_cre");
+				//  全局本币汇率
+				cp.setBodyValueAt(PayableBillItemVO.getGlobalrate(),count, "globalrate");
+				//  集团本币余额
+				cp.setBodyValueAt(PayableBillItemVO.getGroupbalance(),count, "groupbalance");
+				//  集团本币金额(贷方)
+				cp.setBodyValueAt(PayableBillItemVO.getGroupcrebit(),count, "groupcrebit");
+				//  集团本币无税金额(贷方)
+				cp.setBodyValueAt(PayableBillItemVO.getGroupnotax_cre(),count, "groupnotax_cre");
+				//  集团本币汇率
+				cp.setBodyValueAt(PayableBillItemVO.getGrouprate(),count, "grouprate");
+				//  调拨订单号
+				cp.setBodyValueAt(PayableBillItemVO.getInnerorderno(),count, "innerorderno");
+				//  发票号
+				cp.setBodyValueAt(PayableBillItemVO.getInvoiceno(),count, "invoiceno");
+				//  不可抵扣税额
+				cp.setBodyValueAt(PayableBillItemVO.getNosubtax(),count, "nosubtax");
+				//  不可抵扣税率
+				cp.setBodyValueAt(PayableBillItemVO.getNosubtaxrate(),count, "nosubtaxrate");
+				//  是否逆向征税
+				cp.setBodyValueAt(PayableBillItemVO.getOpptaxflag(),count, "opptaxflag");
+				//  订单供应商
+				cp.setBodyValueAt(PayableBillItemVO.getOrdercubasdoc(),count, "ordercubasdoc");
+				//  出库单号
+				cp.setBodyValueAt(PayableBillItemVO.getOutstoreno(),count, "outstoreno");
+				//  挂起标志
+				cp.setBodyValueAt(PayableBillItemVO.getPausetransact(),count, "pausetransact");
+				//  付款银行账户
+				cp.setBodyValueAt(PayableBillItemVO.getPayaccount(),count, "payaccount");
+				//  单据类型编码
+				cp.setBodyValueAt(PayableBillItemVO.getPk_billtype(),count, "pk_billtype");
+				//  币种
+				cp.setBodyValueAt(PayableBillItemVO.getPk_currtype(),count, "pk_currtype");
+				//  废弃财务组织
+				cp.setBodyValueAt(PayableBillItemVO.getPk_fiorg(),count, "pk_fiorg");
+				//  废弃财务组织版本
+				cp.setBodyValueAt(PayableBillItemVO.getPk_fiorg_v(),count, "pk_fiorg_v");
+				//  所属集团
+				cp.setBodyValueAt(PayableBillItemVO.getPk_group(),count, "pk_group");
+				//  应付财务组织
+				cp.setBodyValueAt(PayableBillItemVO.getPk_org(),count, "pk_org");
+				//  应付财务组织版本
+				cp.setBodyValueAt(PayableBillItemVO.getPk_org_v(),count, "pk_org_v");
+				//  供应商应付单标识
+				cp.setBodyValueAt(PayableBillItemVO.getPk_payablebill(),count, "pk_payablebill");
+				//  付款协议
+				cp.setBodyValueAt(PayableBillItemVO.getPk_payterm(),count, "pk_payterm");
+				//  利润中心
+				cp.setBodyValueAt(PayableBillItemVO.getPk_pcorg(),count, "pk_pcorgz");
+				//  利润中心版本
+				cp.setBodyValueAt(PayableBillItemVO.getPk_pcorg_v(),count, "pk_pcorg_v");
+				//  业务员
+				cp.setBodyValueAt(PayableBillItemVO.getPk_psndoc(),count, "pk_psndoc");
+				//  事项审批单
+				cp.setBodyValueAt(PayableBillItemVO.getPk_ssitem(),count, "pk_ssitem");
+				//  应付类型code
+				cp.setBodyValueAt(PayableBillItemVO.getPk_tradetype(),count, "pk_tradetype");
+				//  应付类型
+				cp.setBodyValueAt(PayableBillItemVO.getPk_tradetypeid(),count, "pk_tradetypeid");
+				//  报价单位含税单价
+				cp.setBodyValueAt(PayableBillItemVO.getPostprice(),count, "postprice");
+				//  报价单位无税单价
+				cp.setBodyValueAt(PayableBillItemVO.getPostpricenotax(),count, "postpricenotax");
+				//  报价单位数量
+				cp.setBodyValueAt(PayableBillItemVO.getPostquantity(),count, "postquantity");
+				//  报价计量单位
+				cp.setBodyValueAt(PayableBillItemVO.getPostunit(),count, "postunit");
+				//  产品线
+				cp.setBodyValueAt(PayableBillItemVO.getProductline(),count, "productline");
+				//  项目
+				cp.setBodyValueAt(PayableBillItemVO.getProject(),count, "project");
+				//  项目任务
+				cp.setBodyValueAt(PayableBillItemVO.getProject_task(),count, "project_task");
+				//  业务部门
+				cp.setBodyValueAt(PayableBillItemVO.getPu_deptid(),count, "pu_deptid");
+				//  业务部门版本
+				cp.setBodyValueAt(PayableBillItemVO.getPu_deptid_v(),count, "pu_deptid_v");
+				//  业务组织
+				cp.setBodyValueAt(PayableBillItemVO.getPu_org(),count, "pu_org");
+				//  业务组织版本
+				cp.setBodyValueAt(PayableBillItemVO.getPu_org_v(),count, "pu_org_v");
+				//  业务人员
+				cp.setBodyValueAt(PayableBillItemVO.getPu_psndoc(),count, "pu_psndoc");
+				//  订单号
+				cp.setBodyValueAt(PayableBillItemVO.getPurchaseorder(),count, "purchaseorder");
+				//  组织本币汇率
+				cp.setBodyValueAt(PayableBillItemVO.getRate(),count, "rate");
+				//  收款银行账户
+				cp.setBodyValueAt(PayableBillItemVO.getRecaccount(),count, "recaccount");
+				//  单据分录号
+				cp.setBodyValueAt(i-1,count, "rowno");
+				//  行类型
+				cp.setBodyValueAt(PayableBillItemVO.getRowtype(),count, "rowtype");
+				//  摘要
+				cp.setBodyValueAt(PayableBillItemVO.getScomment(),count, "scomment");
+				//  发货国
+				cp.setBodyValueAt(PayableBillItemVO.getSendcountryid(),count, "sendcountryid");
+				//  结算财务组织
+				cp.setBodyValueAt(PayableBillItemVO.getSett_org(),count, "sett_org");
+				//  结算财务组织版本
+				cp.setBodyValueAt(PayableBillItemVO.getSett_org_v(),count, "sett_org_v");
+				//  付款币种
+				cp.setBodyValueAt(PayableBillItemVO.getSettlecurr(),count, "settlecurr");
+				//  付款金额
+				cp.setBodyValueAt(PayableBillItemVO.getSettlemoney(),count, "settlemoney");
+				//  源头单据主键
+				cp.setBodyValueAt(PayableBillItemVO.getSrc_billid(),count, "src_billid");
+				//  源头单据类型
+				cp.setBodyValueAt(PayableBillItemVO.getSrc_billtype(),count, "src_billtype");
+				//  源头单据行主键
+				cp.setBodyValueAt(PayableBillItemVO.getSrc_itemid(),count, "src_itemid");
+				//  源头交易类型
+				cp.setBodyValueAt(PayableBillItemVO.getSrc_tradetype(),count, "src_tradetype");
+				//  科目
+				cp.setBodyValueAt(PayableBillItemVO.getSubjcode(),count, "subjcode");
+				//  税号
+				cp.setBodyValueAt(PayableBillItemVO.getTaxnum(),count, "taxnum");
+				//  上层单据主键
+				cp.setBodyValueAt(PayableBillItemVO.getTop_billid(),count, "top_billid");
+				//  上层单据类型
+				cp.setBodyValueAt(PayableBillItemVO.getTop_billtype(),count, "top_billtype");
+				//  加交换时间
+				cp.setBodyValueAt(PayableBillItemVO.getTop_changets(),count, "top_changets");
+				//  上层单据行主键
+				cp.setBodyValueAt(PayableBillItemVO.getTop_itemid(),count, "top_itemid");
+				//  上层交易类型
+				cp.setBodyValueAt(PayableBillItemVO.getTop_tradetype(),count, "top_tradetype");
+				//  VAT注册码
+				cp.setBodyValueAt(PayableBillItemVO.getVatcode(),count, "vatcode");
+				//  供应商VAT注册码
+				cp.setBodyValueAt(PayableBillItemVO.getVendorvatcode(),count, "vendorvatcode");
+				//自定义1-60
+				cp.setBodyValueAt(PayableBillItemVO.getDef3(),count,"def3");
+				cp.setBodyValueAt(PayableBillItemVO.getDef4(),count,"def4");
+				cp.setBodyValueAt(PayableBillItemVO.getDef5(),count,"def5");
+				cp.setBodyValueAt(PayableBillItemVO.getDef6(),count,"def6");
+				cp.setBodyValueAt(PayableBillItemVO.getDef7(),count,"def7");
+				cp.setBodyValueAt(PayableBillItemVO.getDef8(),count,"def8");
+				cp.setBodyValueAt(PayableBillItemVO.getDef9(),count,"def9");
+				cp.setBodyValueAt(PayableBillItemVO.getDef10(),count,"def10");
+				cp.setBodyValueAt(PayableBillItemVO.getDef11(),count,"def11");
+				cp.setBodyValueAt(PayableBillItemVO.getDef13(),count,"def13");
+				cp.setBodyValueAt(PayableBillItemVO.getDef14(),count,"def14");
+				cp.setBodyValueAt(PayableBillItemVO.getDef15(),count,"def15");
+				cp.setBodyValueAt(PayableBillItemVO.getDef16(),count,"def16");
+				cp.setBodyValueAt(PayableBillItemVO.getDef17(),count,"def17");
+				cp.setBodyValueAt(PayableBillItemVO.getDef18(),count,"def18");
+				cp.setBodyValueAt(PayableBillItemVO.getDef19(),count,"def19");
+				cp.setBodyValueAt(PayableBillItemVO.getDef20(),count,"def20");
+				cp.setBodyValueAt(PayableBillItemVO.getDef21(),count,"def21");
+				cp.setBodyValueAt(PayableBillItemVO.getDef22(),count,"def22");
+				cp.setBodyValueAt(PayableBillItemVO.getDef24(),count,"def24");
+				cp.setBodyValueAt(PayableBillItemVO.getDef26(),count,"def26");
+				cp.setBodyValueAt(PayableBillItemVO.getDef27(),count,"def27");
+				cp.setBodyValueAt(PayableBillItemVO.getDef28(),count,"def28");
+				cp.setBodyValueAt(PayableBillItemVO.getDef29(), count,"def29");
+				cp.setBodyValueAt(PayableBillItemVO.getDef31(),count,"def31");
+				cp.setBodyValueAt(PayableBillItemVO.getDef32(),count,"def32");
+				cp.setBodyValueAt(PayableBillItemVO.getDef33(),count,"def33");
+				cp.setBodyValueAt(PayableBillItemVO.getDef34(),count,"def34");
+				cp.setBodyValueAt(PayableBillItemVO.getDef35(),count,"def35");
+				cp.setBodyValueAt(PayableBillItemVO.getDef36(),count,"def36");
+				cp.setBodyValueAt(PayableBillItemVO.getDef37(),count,"def37");
+				cp.setBodyValueAt(PayableBillItemVO.getDef38(),count,"def38");
+				cp.setBodyValueAt(PayableBillItemVO.getDef39(),count,"def39");
+				cp.setBodyValueAt(PayableBillItemVO.getDef40(),count,"def40");
+				cp.setBodyValueAt(PayableBillItemVO.getDef41(),count,"def41");
+				cp.setBodyValueAt(PayableBillItemVO.getDef42(),count,"def42");
+				cp.setBodyValueAt(PayableBillItemVO.getDef43(),count,"def43");
+				cp.setBodyValueAt(PayableBillItemVO.getDef44(),count,"def44");
+				cp.setBodyValueAt(PayableBillItemVO.getDef45(),count,"def45");
+				cp.setBodyValueAt(PayableBillItemVO.getDef46(),count,"def46");
+				cp.setBodyValueAt(PayableBillItemVO.getDef47(),count,"def47");
+				cp.setBodyValueAt(PayableBillItemVO.getDef48(),count,"def48");
+				cp.setBodyValueAt(PayableBillItemVO.getDef49(),count,"def49");
+				cp.setBodyValueAt(PayableBillItemVO.getDef50(),count,"def50");
+				cp.setBodyValueAt(PayableBillItemVO.getDef51(),count,"def51");
+				cp.setBodyValueAt(PayableBillItemVO.getDef52(),count,"def52");
+				cp.setBodyValueAt(PayableBillItemVO.getDef53(),count,"def53");
+				cp.setBodyValueAt(PayableBillItemVO.getDef54(),count,"def54");
+				cp.setBodyValueAt(PayableBillItemVO.getDef55(),count,"def55");
+				cp.setBodyValueAt(PayableBillItemVO.getDef56(),count,"def56");
+				cp.setBodyValueAt(PayableBillItemVO.getDef57(),count,"def57");
+				cp.setBodyValueAt(PayableBillItemVO.getDef58(),count,"def58");
+				cp.setBodyValueAt(PayableBillItemVO.getDef59(),count,"def59");
+				cp.setBodyValueAt(PayableBillItemVO.getDef60(),count,"def60");
+			}else {
+				//发票号
+				String vbillcode = sheet.getRow(i).getCell(6).getStringCellValue();
+				PayableBillItemVO PayableBillItemVO = queryBillItem(billno,vbillcode);
+				String pk_org = PayableBillItemVO.getPk_org();
+				//摘要
+				cp.setBodyValueAt(sqlexecuteQueryDoc(sheet.getRow(i).getCell(0).getStringCellValue(),"999"),count, "def25");
+				//费用归属
+				cp.setBodyValueAt(sqlexecuteQueryDoc(sheet.getRow(i).getCell(1).getStringCellValue(),"05"),count, "def30");
+				//项目编号
+				cp.setBodyValueAt(sheet.getRow(i).getCell(2).getStringCellValue(), count, "def18");
+				//项目名称
+				cp.setBodyValueAt(sqlexecuteQuery("pk_project", "bd_project", "project_name", sheet.getRow(i).getCell(3).getStringCellValue(),null,2), count, "project");
+				//专业
+				cp.setBodyValueAt(sqlexecuteQueryDoc(sheet.getRow(i).getCell(4).getStringCellValue(), "HR016"), count, "def6");
+				//费用事项
+				cp.setBodyValueAt(sqlexecuteQueryDoc(sheet.getRow(i).getCell(5).getStringCellValue(), "88"), count, "def7");
+				//发票号
+				cp.setBodyValueAt(vbillcode, count, "def12");
+				String pk_material = sqlexecuteQuery("pk_material", "bd_material", "name", sheet.getRow(i).getCell(7).getStringCellValue(), null, 2);
+				//物料
+				cp.setBodyValueAt(pk_material,count, "material");
+				//原始物料
+				cp.setBodyValueAt(pk_material,count, "material_src");
+				//税码
+				cp.setBodyValueAt(sqlexecuteQuery("pk_taxcode", "bd_taxcode", "description", sheet.getRow(i).getCell(8).getStringCellValue(), null,2),count, "taxcodeid");	
+				//税率
+				cp.setBodyValueAt(sheet.getRow(i).getCell(9).getStringCellValue(),count, "taxrate");
+				Object price = null;
+				if(dateUnit(sheet,i,10) != null) {
+					price = sheet.getRow(i).getCell(10).getCellType() == 1 ? sheet.getRow(i).getCell(10).getStringCellValue() : sheet.getRow(i).getCell(10).getNumericCellValue();
+				}
+				//单价
+				cp.setBodyValueAt(price,count, "price");
+				//本币单价
+				cp.setBodyValueAt(price,count, "local_price");
+				Object taxprice = sheet.getRow(i).getCell(11).getCellType() == 1 ? sheet.getRow(i).getCell(11).getStringCellValue() : sheet.getRow(i).getCell(11).getNumericCellValue();
+				//含税单价
+				cp.setBodyValueAt(taxprice,count, "taxprice");
+				//本币含税单价
+				cp.setBodyValueAt(taxprice,count, "local_taxprice");
+				Object caltaxmny = sheet.getRow(i).getCell(12).getCellType() == 1 ? sheet.getRow(i).getCell(12).getStringCellValue() : sheet.getRow(i).getCell(12).getNumericCellValue();
+				//计税金额
+				cp.setBodyValueAt(caltaxmny,count, "caltaxmny");
+				//贷方原币无税金额
+				cp.setBodyValueAt(caltaxmny,count, "notax_cr");
+				//组织本币无税金额
+				cp.setBodyValueAt(caltaxmny,count, "local_notax_cr");
+				//税额
+				cp.setBodyValueAt(sheet.getRow(i).getCell(13).getCellType() == 1 ? sheet.getRow(i).getCell(13).getStringCellValue() : sheet.getRow(i).getCell(13).getNumericCellValue() ,count, "local_tax_cr");
+				Object money_bal = sheet.getRow(i).getCell(14).getCellType() == 1 ? sheet.getRow(i).getCell(14).getStringCellValue() : sheet.getRow(i).getCell(14).getNumericCellValue();
+				//原币余额
+				cp.setBodyValueAt(money_bal,count, "money_bal");
+				//组织本币余额
+				cp.setBodyValueAt(money_bal,count, "local_money_bal");
+				//贷方原币金额
+				cp.setBodyValueAt(money_bal,count, "money_cr");
+				//组织本币金额
+				cp.setBodyValueAt(money_bal,count, "local_money_cr");
+				//预占用原币余额
+				cp.setBodyValueAt(money_bal,count, "occupationmny");
+				//成本归属部门
+				cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(15).getStringCellValue(), pk_org,2),count, "def22");
+				//扣税类别
+				cp.setBodyValueAt("应税内含".equals(sheet.getRow(i).getCell(16).getStringCellValue()) ? 0 : 1,count, "taxtype");
+				//往来对象
+				Object objtype = dateUnit(sheet,i,17);
+				cp.setBodyValueAt("供应商".equals(objtype) ? 1 : "部门".equals(objtype) ? 2 : 3,count, "objtype");
+				//对方单位名称
+				cp.setBodyValueAt(sqlexecuteQuery("pk_supplier", "bd_supplier", "name", sheet.getRow(i).getCell(18).getStringCellValue(), null, 2),count,"supplier");
+				//备注
+				cp.setBodyValueAt(dateUnit(sheet, i, 19), count, "def2");
+				//预算名称
+				cp.setBodyValueAt(sqlexecuteQuery("pk_inoutbusiclass", "bd_inoutbusiclass", "name", sheet.getRow(i).getCell(20).getStringCellValue(), null,2),count, "pk_subjcode");
+				//数量余额
+				cp.setBodyValueAt(PayableBillItemVO.getQuantity_bal(),count, "quantity_bal");
+				//贷方数量
+				cp.setBodyValueAt(PayableBillItemVO.getQuantity_cr(),count, "quantity_cr");				
+				//结算方式
+				cp.setBodyValueAt(PayableBillItemVO.getPk_balatype(),count, "pk_balatype");
+				//资产合同号
+				cp.setBodyValueAt(PayableBillItemVO.getAssetpactno(),count, "assetpactno");
+				//  资金计划项目
+				cp.setBodyValueAt(PayableBillItemVO.getBankrollprojet(),count, "bankrollprojet");
+				//  单据大类
+				cp.setBodyValueAt(PayableBillItemVO.getBillclass(),count, "billclass");
+				//  单据日期
+				cp.setBodyValueAt(PayableBillItemVO.getBilldate(),count, "billdate");
+				//  单据号
+				cp.setBodyValueAt(PayableBillItemVO.getBillno(),count, "billno");
+				//  起算日期
+				cp.setBodyValueAt(PayableBillItemVO.getBusidate(),count, "busidate");
+				//  购销类型
+				cp.setBodyValueAt(PayableBillItemVO.getBuysellflag(),count, "buysellflag");
+				//  现金流量项目
+				cp.setBodyValueAt(PayableBillItemVO.getCashitem(),count, "cashitem");
+				//  CBS
+				cp.setBodyValueAt(PayableBillItemVO.getCbs(),count, "cbs");
+				//  责任核算要素
+				cp.setBodyValueAt(PayableBillItemVO.getCheckelement(),count, "checkelement");
+				//  票据类型
+				cp.setBodyValueAt(PayableBillItemVO.getChecktype(),count, "checktype");
+				//  摘要c
+				cp.setBodyValueAt(PayableBillItemVO.getComment(),count, "comment");
+				//  内部交易结算号
+				cp.setBodyValueAt(PayableBillItemVO.getConfernum(),count, "confernum");
+				//  合同号
+				cp.setBodyValueAt(PayableBillItemVO.getContractno(),count, "contractno");
+				//  单据协同状态
+				cp.setBodyValueAt(PayableBillItemVO.getCoordflag(),count, "coordflag");
+				//  成本中心
+				cp.setBodyValueAt(PayableBillItemVO.getCostcenter(),count, "costcenter");
+				//  方向
+				cp.setBodyValueAt(PayableBillItemVO.getDirection(),count, "direction");
+				//  设备编码
+				cp.setBodyValueAt(PayableBillItemVO.getEquipmentcode(),count, "equipmentcode");
+				//  固定资产卡片号
+				cp.setBodyValueAt(PayableBillItemVO.getFacard(),count, "facard");
+				//  散户
+				cp.setBodyValueAt(PayableBillItemVO.getFreecust(),count, "freecust");
+				//  全局本币余额
+				cp.setBodyValueAt(PayableBillItemVO.getGlobalbalance(),count, "globalbalance");
+				//  全局本币金额(贷方)
+				cp.setBodyValueAt(PayableBillItemVO.getGlobalcrebit(),count, "globalcrebit");
+				//  全局本币无税金额(贷方)
+				cp.setBodyValueAt(PayableBillItemVO.getGlobalnotax_cre(),count, "globalnotax_cre");
+				//  全局本币汇率
+				cp.setBodyValueAt(PayableBillItemVO.getGlobalrate(),count, "globalrate");
+				//  集团本币余额
+				cp.setBodyValueAt(PayableBillItemVO.getGroupbalance(),count, "groupbalance");
+				//  集团本币金额(贷方)
+				cp.setBodyValueAt(PayableBillItemVO.getGroupcrebit(),count, "groupcrebit");
+				//  集团本币无税金额(贷方)
+				cp.setBodyValueAt(PayableBillItemVO.getGroupnotax_cre(),count, "groupnotax_cre");
+				//  集团本币汇率
+				cp.setBodyValueAt(PayableBillItemVO.getGrouprate(),count, "grouprate");
+				//  调拨订单号
+				cp.setBodyValueAt(PayableBillItemVO.getInnerorderno(),count, "innerorderno");
+				//  发票号
+				cp.setBodyValueAt(PayableBillItemVO.getInvoiceno(),count, "invoiceno");
+				//  不可抵扣税额
+				cp.setBodyValueAt(PayableBillItemVO.getNosubtax(),count, "nosubtax");
+				//  不可抵扣税率
+				cp.setBodyValueAt(PayableBillItemVO.getNosubtaxrate(),count, "nosubtaxrate");
+				//  是否逆向征税
+				cp.setBodyValueAt(PayableBillItemVO.getOpptaxflag(),count, "opptaxflag");
+				//  订单供应商
+				cp.setBodyValueAt(PayableBillItemVO.getOrdercubasdoc(),count, "ordercubasdoc");
+				//  出库单号
+				cp.setBodyValueAt(PayableBillItemVO.getOutstoreno(),count, "outstoreno");
+				//  挂起标志
+				cp.setBodyValueAt(PayableBillItemVO.getPausetransact(),count, "pausetransact");
+				//  付款银行账户
+				cp.setBodyValueAt(PayableBillItemVO.getPayaccount(),count, "payaccount");
+				//  单据类型编码
+				cp.setBodyValueAt(PayableBillItemVO.getPk_billtype(),count, "pk_billtype");
+				//  币种
+				cp.setBodyValueAt(PayableBillItemVO.getPk_currtype(),count, "pk_currtype");
+				//  部门
+				cp.setBodyValueAt(PayableBillItemVO.getPk_deptid(),count, "pk_deptid");
+				//  部 门
+				cp.setBodyValueAt(PayableBillItemVO.getPk_deptid_v(),count, "pk_deptid_v");
+				//  废弃财务组织
+				cp.setBodyValueAt(PayableBillItemVO.getPk_fiorg(),count, "pk_fiorg");
+				//  废弃财务组织版本
+				cp.setBodyValueAt(PayableBillItemVO.getPk_fiorg_v(),count, "pk_fiorg_v");
+				//  所属集团
+				cp.setBodyValueAt(PayableBillItemVO.getPk_group(),count, "pk_group");
+				//  应付财务组织
+				cp.setBodyValueAt(PayableBillItemVO.getPk_org(),count, "pk_org");
+				//  应付财务组织版本
+				cp.setBodyValueAt(PayableBillItemVO.getPk_org_v(),count, "pk_org_v");
+				//  供应商应付单标识
+				cp.setBodyValueAt(PayableBillItemVO.getPk_payablebill(),count, "pk_payablebill");
+				//  付款协议
+				cp.setBodyValueAt(PayableBillItemVO.getPk_payterm(),count, "pk_payterm");
+				//  利润中心
+				cp.setBodyValueAt(PayableBillItemVO.getPk_pcorg(),count, "pk_pcorgz");
+				//  利润中心版本
+				cp.setBodyValueAt(PayableBillItemVO.getPk_pcorg_v(),count, "pk_pcorg_v");
+				//  业务员
+				cp.setBodyValueAt(PayableBillItemVO.getPk_psndoc(),count, "pk_psndoc");
+				//  事项审批单
+				cp.setBodyValueAt(PayableBillItemVO.getPk_ssitem(),count, "pk_ssitem");
+				//  应付类型code
+				cp.setBodyValueAt(PayableBillItemVO.getPk_tradetype(),count, "pk_tradetype");
+				//  应付类型
+				cp.setBodyValueAt(PayableBillItemVO.getPk_tradetypeid(),count, "pk_tradetypeid");
+				//  报价单位含税单价
+				cp.setBodyValueAt(PayableBillItemVO.getPostprice(),count, "postprice");
+				//  报价单位无税单价
+				cp.setBodyValueAt(PayableBillItemVO.getPostpricenotax(),count, "postpricenotax");
+				//  报价单位数量
+				cp.setBodyValueAt(PayableBillItemVO.getPostquantity(),count, "postquantity");
+				//  报价计量单位
+				cp.setBodyValueAt(PayableBillItemVO.getPostunit(),count, "postunit");
+				//  产品线
+				cp.setBodyValueAt(PayableBillItemVO.getProductline(),count, "productline");
+				//  项目任务
+				cp.setBodyValueAt(PayableBillItemVO.getProject_task(),count, "project_task");
+				//  业务部门
+				cp.setBodyValueAt(PayableBillItemVO.getPu_deptid(),count, "pu_deptid");
+				//  业务部门版本
+				cp.setBodyValueAt(PayableBillItemVO.getPu_deptid_v(),count, "pu_deptid_v");
+				//  业务组织
+				cp.setBodyValueAt(PayableBillItemVO.getPu_org(),count, "pu_org");
+				//  业务组织版本
+				cp.setBodyValueAt(PayableBillItemVO.getPu_org_v(),count, "pu_org_v");
+				//  业务人员
+				cp.setBodyValueAt(PayableBillItemVO.getPu_psndoc(),count, "pu_psndoc");
+				//  订单号
+				cp.setBodyValueAt(PayableBillItemVO.getPurchaseorder(),count, "purchaseorder");
+				//  组织本币汇率
+				cp.setBodyValueAt(PayableBillItemVO.getRate(),count, "rate");
+				//  收款银行账户
+				cp.setBodyValueAt(PayableBillItemVO.getRecaccount(),count, "recaccount");
+				//  单据分录号
+				cp.setBodyValueAt(i-1,count, "rowno");
+				//  行类型
+				cp.setBodyValueAt(PayableBillItemVO.getRowtype(),count, "rowtype");
+				//  摘要
+				cp.setBodyValueAt(PayableBillItemVO.getScomment(),count, "scomment");
+				//  发货国
+				cp.setBodyValueAt(PayableBillItemVO.getSendcountryid(),count, "sendcountryid");
+				//  结算财务组织
+				cp.setBodyValueAt(PayableBillItemVO.getSett_org(),count, "sett_org");
+				//  结算财务组织版本
+				cp.setBodyValueAt(PayableBillItemVO.getSett_org_v(),count, "sett_org_v");
+				//  付款币种
+				cp.setBodyValueAt(PayableBillItemVO.getSettlecurr(),count, "settlecurr");
+				//  付款金额
+				cp.setBodyValueAt(PayableBillItemVO.getSettlemoney(),count, "settlemoney");
+				//  源头单据主键
+				cp.setBodyValueAt(PayableBillItemVO.getSrc_billid(),count, "src_billid");
+				//  源头单据类型
+				cp.setBodyValueAt(PayableBillItemVO.getSrc_billtype(),count, "src_billtype");
+				//  源头单据行主键
+				cp.setBodyValueAt(PayableBillItemVO.getSrc_itemid(),count, "src_itemid");
+				//  源头交易类型
+				cp.setBodyValueAt(PayableBillItemVO.getSrc_tradetype(),count, "src_tradetype");
+				//  科目
+				cp.setBodyValueAt(PayableBillItemVO.getSubjcode(),count, "subjcode");
+				//  税号
+				cp.setBodyValueAt(PayableBillItemVO.getTaxnum(),count, "taxnum");
+				//  上层单据主键
+				cp.setBodyValueAt(PayableBillItemVO.getTop_billid(),count, "top_billid");
+				//  上层单据类型
+				cp.setBodyValueAt(PayableBillItemVO.getTop_billtype(),count, "top_billtype");
+				//  加交换时间
+				cp.setBodyValueAt(PayableBillItemVO.getTop_changets(),count, "top_changets");
+				//  上层单据行主键
+				cp.setBodyValueAt(PayableBillItemVO.getTop_itemid(),count, "top_itemid");
+				//  上层交易类型
+				cp.setBodyValueAt(PayableBillItemVO.getTop_tradetype(),count, "top_tradetype");
+				//  VAT注册码
+				cp.setBodyValueAt(PayableBillItemVO.getVatcode(),count, "vatcode");
+				//  供应商VAT注册码
+				cp.setBodyValueAt(PayableBillItemVO.getVendorvatcode(),count, "vendorvatcode");
+				//自定义1-60
+				cp.setBodyValueAt(PayableBillItemVO.getDef1(),count,"def1");
+				cp.setBodyValueAt(PayableBillItemVO.getDef3(),count,"def3");
+				cp.setBodyValueAt(PayableBillItemVO.getDef4(),count,"def4");
+				cp.setBodyValueAt(PayableBillItemVO.getDef5(), count,"def5");
+				cp.setBodyValueAt(PayableBillItemVO.getDef8(),count,"def8");
+				cp.setBodyValueAt(PayableBillItemVO.getDef9(),count,"def9");
+				cp.setBodyValueAt(PayableBillItemVO.getDef10(),count,"def10");
+				cp.setBodyValueAt(PayableBillItemVO.getDef11(),count,"def11");
+				cp.setBodyValueAt(PayableBillItemVO.getDef13(),count,"def13");
+				cp.setBodyValueAt(PayableBillItemVO.getDef14(),count,"def14");
+				cp.setBodyValueAt(PayableBillItemVO.getDef15(),count,"def15");
+				cp.setBodyValueAt(PayableBillItemVO.getDef16(),count,"def16");
+				cp.setBodyValueAt(PayableBillItemVO.getDef17(),count,"def17");
+				cp.setBodyValueAt(PayableBillItemVO.getDef19(),count,"def19");
+				cp.setBodyValueAt(PayableBillItemVO.getDef20(),count,"def20");
+				cp.setBodyValueAt(PayableBillItemVO.getDef21(),count,"def21");
+				cp.setBodyValueAt(PayableBillItemVO.getDef22(),count,"def23");
+				cp.setBodyValueAt(PayableBillItemVO.getDef24(),count,"def24");
+				cp.setBodyValueAt(PayableBillItemVO.getDef26(),count,"def26");
+				cp.setBodyValueAt(PayableBillItemVO.getDef27(),count,"def27");
+				cp.setBodyValueAt(PayableBillItemVO.getDef28(),count,"def28");
+				cp.setBodyValueAt(PayableBillItemVO.getDef29(),count,"def29");
+				cp.setBodyValueAt(PayableBillItemVO.getDef31(),count,"def31");
+				cp.setBodyValueAt(PayableBillItemVO.getDef32(),count,"def32");
+				cp.setBodyValueAt(PayableBillItemVO.getDef33(),count,"def33");
+				cp.setBodyValueAt(PayableBillItemVO.getDef34(),count,"def34");
+				cp.setBodyValueAt(PayableBillItemVO.getDef35(),count,"def35");
+				cp.setBodyValueAt(PayableBillItemVO.getDef36(),count,"def36");
+				cp.setBodyValueAt(PayableBillItemVO.getDef37(),count,"def37");
+				cp.setBodyValueAt(PayableBillItemVO.getDef38(),count,"def38");
+				cp.setBodyValueAt(PayableBillItemVO.getDef39(),count,"def39");
+				cp.setBodyValueAt(PayableBillItemVO.getDef40(),count,"def40");
+				cp.setBodyValueAt(PayableBillItemVO.getDef41(),count,"def41");
+				cp.setBodyValueAt(PayableBillItemVO.getDef42(),count,"def42");
+				cp.setBodyValueAt(PayableBillItemVO.getDef43(),count,"def43");
+				cp.setBodyValueAt(PayableBillItemVO.getDef44(),count,"def44");
+				cp.setBodyValueAt(PayableBillItemVO.getDef45(),count,"def45");
+				cp.setBodyValueAt(PayableBillItemVO.getDef46(),count,"def46");
+				cp.setBodyValueAt(PayableBillItemVO.getDef47(),count,"def47");
+				cp.setBodyValueAt(PayableBillItemVO.getDef48(),count,"def48");
+				cp.setBodyValueAt(PayableBillItemVO.getDef49(),count,"def49");
+				cp.setBodyValueAt(PayableBillItemVO.getDef50(),count,"def50");
+				cp.setBodyValueAt(PayableBillItemVO.getDef51(),count,"def51");
+				cp.setBodyValueAt(PayableBillItemVO.getDef52(),count,"def52");
+				cp.setBodyValueAt(PayableBillItemVO.getDef53(),count,"def53");
+				cp.setBodyValueAt(PayableBillItemVO.getDef54(),count,"def54");
+				cp.setBodyValueAt(PayableBillItemVO.getDef55(),count,"def55");
+				cp.setBodyValueAt(PayableBillItemVO.getDef56(),count,"def56");
+				cp.setBodyValueAt(PayableBillItemVO.getDef57(),count,"def57");
+				cp.setBodyValueAt(PayableBillItemVO.getDef58(),count,"def58");
+				cp.setBodyValueAt(PayableBillItemVO.getDef59(),count,"def59");
+				cp.setBodyValueAt(PayableBillItemVO.getDef60(),count,"def60");
+			}
+		}
+		//循环删行
+		for(int j = 0;j<rowCount;j++){
+			cp.getBillModel().delLine(new int[] {0});
+		}
+		//将pk转换成显示的编码	
+		BillModel tableModel = importBodyAction.editorModel.getBillCardPanel().getBodyPanel().getTableModel();
+		tableModel.loadLoadRelationItemValue();
+		/*
+		 * 表体def1是个参照,pk_subjcode写了个编辑公式把code赋值给了def1,我只能说很6,将编码导入def1后调用上面两句代码
+		会导致def1值为空,因为导入的code匹配不到对应name,只能再次调用编辑公式赋值
+		 */
+
+		//获取导入后的表体行数量循环调用编辑公式
+		int rowCounts = cp.getRowCount();
+		for (int x = 0; x < rowCounts; x++) {
+			importBodyAction.editorModel.getBillCardPanel().getBillModel().execEditFormulasByKey(x, "pk_subjcode");
+		}
+	}
+	
+	/*
+	 *	判断表头必填项
+	 */
+	private  void importHendBeforCheck(BillCardPanel cp,String type) throws Exception {
+		if("应付单(非项目)".equals(type)) {
+			Object 	def3 = cp.getHeadItem("def3").getValueObject();
+			if(def3 == null){
+				throw new Exception("请先填写表头建议付款日期!");
+			}
+			Object 	def5 = cp.getHeadItem("def5").getValueObject();
+			if(def5 == null){
+				throw new Exception("请先填写表头费用承担部门!");
+			}
+			Object 	def20 = cp.getHeadItem("def20").getValueObject();
+			if(def20 == null){
+				throw new Exception("请先填写表头预算所在部门!");
+			}
+			Object supplier = cp.getHeadItem("supplier").getValueObject();
+			if(supplier == null){
+				throw new Exception("请先填写表头对方单位名称!");
+			}
+			Object recaccount = cp.getHeadItem("recaccount").getValueObject();
+			if(recaccount == null){
+				throw new Exception("请先填写表头对方银行账户!");
+			}
+		}else if("应付单(项目)".equals(type)){
+			Object 	def3 = cp.getHeadItem("def3").getValueObject();
+			if(def3 == null){
+				throw new Exception("请先填写表头建议付款日期!");
+			}
+			Object 	def5 = cp.getHeadItem("def5").getValueObject();
+			if(def5 == null){
+				throw new Exception("请先填写表头费用承担部门!");
+			}
+		}else if("预付核销单(非项目)".equals(type)){
+			Object 	def5 = cp.getHeadItem("def5").getValueObject();
+			if(def5 == null){
+				throw new Exception("请先填写表头费用承担部门!");
+			}
+			Object 	def20 = cp.getHeadItem("def20").getValueObject();
+			if(def20 == null){
+				throw new Exception("请先填写表头预算所在部门!");
+			}
+		}else {
+			Object 	def5 = cp.getHeadItem("def5").getValueObject();
+			if(def5 == null){
+				throw new Exception("请先填写表头费用承担部门!");
+			}
+		}
+	}
+	
+	
+	
+	/*
+	 * 判断表体必填项
+	 */
+	private void importBodyBeforCheck(HSSFSheet sheet, String type, int rowNum) throws Exception {
+		for (int i = 2; i < rowNum; i++) {
+			int[] index = null;
+			if("应付单(非项目)".equals(type)) {
+				//需要校验的Excle下标
+				index = new int[]{0,1,2,3,4,5,6,7,8,10,11,12,13,21};
+			}else if("应付单(项目)".equals(type)){
+				//需要校验的Excle下标
+				index = new int[]{0,1,2,3,4,5,6,7,8,9,10,12,13,14,16,18,21};
+			}else if("预付核销单(非项目)".equals(type)){
+				//需要校验的Excle下标
+				index = new int[]{0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,17,18,19};
+			}else {
+				//需要校验的Excle下标
+				index = new int[]{0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,20,21};
 			}
 			for (int j = 0; j < index.length; j++) {
 				if(sheet.getRow(i).getCell(index[j])!= null) {

+ 104 - 5
arap/arap/src/client/nc/ui/arap/actions/OutputBodyAction.java

@@ -55,11 +55,13 @@ public class OutputBodyAction extends BodyAddLineAction{
 	@Override
 	public void doAction(ActionEvent e) throws Exception {
 		//只有应付单(非项目) 应付单(项目)可以使用
-		String type = sqlexecuteQuery("billtypename", "bd_billtype", "pk_billtypeid", this.editorModel.getBillCardPanel().getHeadItem("pk_tradetypeid").getValueObject().toString());
-		if(!"应付单(非项目)".equals(type) && !"应付单(项目)".equals(type) && !"预付核销单(非项目)".equals(type)) {
+		String type = sqlexecuteQuery("billtypename", "bd_billtype", "pk_billtypeid", this.editorModel.getBillCardPanel().getHeadItem("pk_tradetypeid").getValueObject().toString());		
+//		if(!"应付单(非项目)".equals(type) && !"应付单(项目)".equals(type)) {
+//			return;
+//		}
+		if(!"应付单(非项目)".equals(type) && !"应付单(项目)".equals(type) && !"预付核销单(非项目)".equals(type) && !"预付核销单(项目)".equals(type)) {
 			return;
 		}
-
 		// 创建文件选择器  
 	    JFileChooser fileChooser = new JFileChooser();  
 	    fileChooser.setDialogTitle("选择导出路径");  
@@ -218,8 +220,105 @@ public class OutputBodyAction extends BodyAddLineAction{
 			}
 		}else if("预付核销单(非项目)".equals(type)){
 			//项目导出模板
-			createRowAndCells(sheet, 1, "摘要*", "费用归属*", "项目编号*","项目名称*","专业*","费用事项*","发票号*","数量*","税码*","税率*","结算方式*","单价","含税单价*","金额*","税额*","民航发展基金",
-					"价税合计*","汇款附言","成本归属部门*","票据号/保理申请编号","备注","预算名称*");  
+			createRowAndCells(sheet,1,"摘要*","费用归属*","预算编号*","预算名称*","发票号*","物料*","税码*","税率*","单价","含税单价*","金额*","税额*","价税合计*","扣税类别*",
+					"成本归属部门*","往来对象*","备注","对方单位名称*","付款部门*","应付类型*");
+			for (int i = 0; i < count; i++) {
+				Row rows = sheet.createRow(i+2);
+				//摘要
+		        rows.createCell(0).setCellValue(getBodyValueAt(cp, i, "def25", "name", "bd_defdoc", "pk_defdoc"));
+		        //费用归属
+		        rows.createCell(1).setCellValue(getBodyValueAt(cp, i, "def30", "name", "bd_defdoc", "pk_defdoc"));
+		        //预算编号
+		        rows.createCell(2).setCellValue(cp.getBodyValueAt(i, "def1") == null ? null : cp.getBodyValueAt(i, "def1").toString());
+		        //预算名称
+		        rows.createCell(3).setCellValue(getBodyValueAt(cp, i, "pk_subjcode", "name", "bd_inoutbusiclass", "pk_inoutbusiclass"));
+		        //发票号
+		        rows.createCell(4).setCellValue(cp.getBodyValueAt(i, "def12") == null ? null : cp.getBodyValueAt(i, "def12").toString());
+		        //物料
+		        rows.createCell(5).setCellValue(getBodyValueAt(cp, i, "material", "name", "bd_material", "pk_material"));
+		        //税码
+		        rows.createCell(6).setCellValue(getBodyValueAt(cp, i, "taxcodeid", "description", "bd_taxcode", "pk_taxcode"));
+		        //税率
+		        rows.createCell(7).setCellValue(cp.getBodyValueAt(i, "taxrate") == null ? null : cp.getBodyValueAt(i, "taxrate").toString());
+		        //单价
+		        rows.createCell(8).setCellValue(cp.getBodyValueAt(i, "price") == null ? null : cp.getBodyValueAt(i, "price").toString());
+		        //含税单价
+		        rows.createCell(9).setCellValue(cp.getBodyValueAt(i, "taxprice") == null ? null : cp.getBodyValueAt(i, "taxprice").toString());
+		        //金额
+		        rows.createCell(10).setCellValue(cp.getBodyValueAt(i, "local_notax_cr") == null ? null : cp.getBodyValueAt(i, "local_notax_cr").toString());
+		        //税额
+		        rows.createCell(11).setCellValue(cp.getBodyValueAt(i, "local_tax_cr") == null ? null : cp.getBodyValueAt(i, "local_tax_cr").toString());
+		        //价税合计
+		        rows.createCell(12).setCellValue(cp.getBodyValueAt(i, "local_money_cr") == null ? null : cp.getBodyValueAt(i, "local_money_cr").toString());
+		        //扣税类别
+		        rows.createCell(13).setCellValue("0".equals(cp.getBodyValueAt(i, "taxtype").toString()) ? "应税内含" : "应税外加");
+		        //成本归属部门
+		        rows.createCell(14).setCellValue(getBodyValueAt(cp, i, "def23", "name", "org_dept", "pk_dept"));
+		        //往来对象
+		        int objtype = (Integer) (cp.getBodyValueAt(i, "objtype")  == null ? -1 : cp.getBodyValueAt(i, "objtype"));
+		        rows.createCell(15).setCellValue(objtype == 1 ? "供应商" : objtype == 2 ? "部门" : objtype == 3 ? "业务员" : null);
+		        //备注
+		        rows.createCell(16).setCellValue(cp.getBodyValueAt(i, "def2") == null ? null : cp.getBodyValueAt(i, "def2").toString());
+		        //对方单位名称
+		        rows.createCell(17).setCellValue(getBodyValueAt(cp, i, "supplier", "name", "bd_supplier", "pk_supplier"));
+		        //付款部门
+		        rows.createCell(18).setCellValue(getBodyValueAt(cp, i, "pk_deptid", "name", "org_dept", "pk_dept"));
+		        //应付类型
+		        rows.createCell(19).setCellValue(getBodyValueAt(cp, i, "pk_tradetypeid", "billtypename", "bd_billtype", "pk_billtypeid"));
+		        
+			}
+		}else {
+			//项目导出模板
+			createRowAndCells(sheet,1,"摘要*","费用归属*","项目编号*","项目名称*","专业*","费用事项*","发票号*","物料*","税码*","税率*","单价","含税单价*","金额*","税额*",
+					"价税合计*","成本归属部门*","扣税类别*","往来对象*","对方单位名称*","备注","预算名称*","应付类型*");  
+			for (int i = 0; i < count; i++) {
+				Row rows = sheet.createRow(i+2);
+				//摘要
+		        rows.createCell(0).setCellValue(getBodyValueAt(cp, i, "def25", "name", "bd_defdoc", "pk_defdoc"));
+		        //费用归属
+		        rows.createCell(1).setCellValue(getBodyValueAt(cp, i, "def30", "name", "bd_defdoc", "pk_defdoc"));
+		        //项目编号
+		        rows.createCell(2).setCellValue(cp.getBodyValueAt(i, "def18") == null ? null : cp.getBodyValueAt(i, "def18").toString());
+		        //项目名称
+		        rows.createCell(3).setCellValue(getBodyValueAt(cp, i, "project", "project_name", "bd_project", "pk_project"));
+		        //专业
+		        rows.createCell(4).setCellValue(getBodyValueAt(cp, i, "def6", "name", "bd_defdoc", "pk_defdoc"));
+		        //费用事项
+		        rows.createCell(5).setCellValue(getBodyValueAt(cp, i, "def7", "name", "bd_defdoc", "pk_defdoc"));
+		     	//发票号
+		        rows.createCell(6).setCellValue(cp.getBodyValueAt(i, "def12").toString());
+		        //物料
+		        rows.createCell(7).setCellValue(getBodyValueAt(cp, i, "material", "name", "bd_material", "pk_material"));
+		        //税码
+		        rows.createCell(8).setCellValue(getBodyValueAt(cp, i, "taxcodeid", "description", "bd_taxcode", "pk_taxcode"));
+		        //税率
+		        rows.createCell(9).setCellValue(cp.getBodyValueAt(i, "taxrate") == null ? null : cp.getBodyValueAt(i, "taxrate").toString());
+		        //单价
+		        rows.createCell(10).setCellValue(cp.getBodyValueAt(i, "price") == null ? null : cp.getBodyValueAt(i, "price").toString());
+		        //含税单价
+		        rows.createCell(11).setCellValue(cp.getBodyValueAt(i, "taxprice") == null ? null : cp.getBodyValueAt(i, "taxprice").toString());
+		        //金额
+		        rows.createCell(12).setCellValue(cp.getBodyValueAt(i, "local_notax_cr") == null ? null : cp.getBodyValueAt(i, "local_notax_cr").toString());
+		        //税额
+		        rows.createCell(13).setCellValue(cp.getBodyValueAt(i, "local_tax_cr") == null ? null : cp.getBodyValueAt(i, "local_tax_cr").toString());
+		        //价税合计
+		        rows.createCell(14).setCellValue(cp.getBodyValueAt(i, "local_money_cr") == null ? null : cp.getBodyValueAt(i, "local_money_cr").toString());
+		        //成本归属部门
+		        rows.createCell(15).setCellValue(getBodyValueAt(cp, i, "def22", "name", "org_dept", "pk_dept"));
+		        //扣税类别
+		        rows.createCell(16).setCellValue("0".equals(cp.getBodyValueAt(i, "taxtype").toString()) ? "应税内含" : "应税外加");
+		        //往来对象
+		        int objtype = (Integer) (cp.getBodyValueAt(i, "objtype")  == null ? -1 : cp.getBodyValueAt(i, "objtype"));
+		        rows.createCell(17).setCellValue(objtype == 1 ? "供应商" : objtype == 2 ? "部门" : objtype == 3 ? "业务员" : null);
+		        //对方单位名称
+		        rows.createCell(18).setCellValue(getBodyValueAt(cp, i, "supplier", "name", "bd_supplier", "pk_supplier"));
+		        //备注
+		        rows.createCell(19).setCellValue(cp.getBodyValueAt(i, "def2") == null ? null : cp.getBodyValueAt(i, "def2").toString());
+		        //预算名称
+		        rows.createCell(20).setCellValue(getBodyValueAt(cp, i, "pk_subjcode", "name", "bd_inoutbusiclass", "pk_inoutbusiclass"));
+		        //应付类型
+		        rows.createCell(21).setCellValue(getBodyValueAt(cp, i, "pk_tradetypeid", "billtypename", "bd_billtype", "pk_billtypeid"));
+			}
 		}
 	}
 

+ 6 - 0
arap/arap/src/client/nc/ui/arap/bill/LinkHyperListener.java

@@ -6,15 +6,21 @@ import nc.sfbase.client.ClientToolKit;
 import nc.ui.pub.bill.BillCardPanel;
 import nc.ui.pub.bill.BillItemHyperlinkEvent;
 import nc.ui.pub.bill.BillItemHyperlinkListener;
+import nc.ui.pub.bill.BillListPanel;
 import nc.vo.pubapp.pattern.exception.ExceptionUtils;
 
 public class LinkHyperListener implements BillItemHyperlinkListener{
 
 	private BillCardPanel billCardPanel;
+	private BillListPanel billListPanel;
 	
 	public LinkHyperListener(BillCardPanel billCardPanel) {
         this.billCardPanel = billCardPanel;
     }
+	public LinkHyperListener(BillListPanel billListPanel) {
+		this.billListPanel = billListPanel;
+	}
+
 	
 	@Override
 	public void hyperlink(BillItemHyperlinkEvent event) {

+ 530 - 0
arap/arap/src/client/nc/ui/arap/view/ArapBillCardForm.java

@@ -0,0 +1,530 @@
+package nc.ui.arap.view;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.swing.JComponent;
+
+import nc.bs.arap.bill.ArapBillPubUtil;
+import nc.bs.framework.common.NCLocator;
+import nc.bs.logging.Log;
+import nc.bs.pf.pub.PfDataCache;
+import nc.bs.uap.bd.notetype.INotetypeConst;
+import nc.itf.arap.fieldmap.IBillFieldGet;
+import nc.itf.cmp.busi.ISettleinfoCarrier;
+import nc.md.data.access.NCObject;
+import nc.md.model.MetaDataException;
+import nc.md.persist.framework.MDPersistenceService;
+import nc.ui.arap.bill.ArapBillUIUtil;
+import nc.ui.arap.bill.LinkHyperListener;
+import nc.ui.arap.event.TabAddEventType;
+import nc.ui.arap.model.ArapBillManageModel;
+import nc.ui.arap.scale.ArapBillCardPanelScaleProcessor;
+import nc.ui.arap.scale.FIBillCardPanelScaleProcessor;
+import nc.ui.arap.viewhandler.ViewHandlerUIUtil;
+import nc.ui.arap.viewhandler.card.LoadBillCardTemplate;
+import nc.ui.pub.beans.UIComboBox;
+import nc.ui.pub.beans.UIRefPane;
+import nc.ui.pub.beans.constenum.DefaultConstEnum;
+import nc.ui.pub.beans.constenum.IConstEnum;
+import nc.ui.pub.bill.BillData;
+import nc.ui.pub.bill.BillItem;
+import nc.ui.pub.bill.IBillItem;
+import nc.ui.pub.bill.IGetBillRelationItemValue;
+import nc.ui.pub.linkoperate.ILinkType;
+import nc.ui.pubapp.uif2app.event.AppUiStateChangeEvent;
+import nc.ui.pubapp.uif2app.mediator.mutiltrans.NodekeyEvent;
+import nc.ui.uif2.AppEvent;
+import nc.ui.uif2.components.widget.IWidgetBillSourceEditor;
+import nc.ui.uif2.editor.TemplateContainer;
+import nc.vo.arap.basebill.BaseAggVO;
+import nc.vo.arap.basebill.BaseBillVO;
+import nc.vo.arap.basebill.BaseItemVO;
+import nc.vo.arap.bill.util.BillEventHandlerUtil;
+import nc.vo.arap.pub.ArapBillTypeInfo;
+import nc.vo.arap.pub.BillEnumCollection;
+import nc.vo.arap.pub.IArapBilltypeInfo;
+import nc.vo.arap.pub.BillEnumCollection.ObjType;
+import nc.vo.bd.cust.CustomerVO;
+import nc.vo.bd.supplier.SupplierVO;
+import nc.vo.cmp.BusiInfo;
+import nc.vo.cmp.settlement.SettlementAggVO;
+import nc.vo.fipub.exception.ExceptionHandler;
+import nc.vo.pub.AggregatedValueObject;
+import nc.vo.pub.BusinessException;
+import nc.vo.pub.BusinessRuntimeException;
+import nc.vo.pub.CircularlyAccessibleValueObject;
+import nc.vo.pub.billtype.BilltypeVO;
+import nc.vo.pub.lang.UFBoolean;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang.StringUtils;
+
+@SuppressWarnings("restriction")
+public class ArapBillCardForm extends nc.ui.pubapp.uif2app.view.MutilTransBillForm implements ICurrtypeGetter, 
+		ISettleinfoCarrier, IWidgetBillSourceEditor {
+
+	private static final long serialVersionUID = -4066776166301370901L;
+	private FIBillCardPanelScaleProcessor arapBillCardPanelScaleProcessor;
+
+	private Collection<String> clearHyperlink;
+
+	private IArapBilltypeInfo arapBilltypeInfo;
+	
+	private String pk_org_event; //记录发送了组织变化事件,没有做处理的组织pk
+
+	public String getPk_org_event() {
+		return pk_org_event;
+	}
+
+	public void setPk_org_event(String pkOrgEvent) {
+		pk_org_event = pkOrgEvent;
+	}
+
+	private void loadSpecialData(BaseAggVO bill) {
+
+		if (bill != null && bill.getItems() != null) {
+			int row = 0;
+			
+			for (BaseItemVO item : bill.getItems()) {
+				if (item != null) {
+					// 加载票据号
+					loadBodyCheckType(bill.getHeadVO(), row, item);
+				}
+				row++;
+			}
+//			// 加载散户银行账户
+//			List<Integer> freecustList  = isFreecust(bill);
+//			if(freecustList != null && freecustList.size() > 0){
+//				loadBodyFreecustAccount(bill,freecustList);
+//			}
+			// 处理表体摘要
+			ArapBillUIUtil.loadHeadScomment(bill,getBillCardPanel().getBodyItem(IBillFieldGet.SCOMMENT));
+			// 摘要问题 这段暂时不需要 
+			int i=0;
+			for(CircularlyAccessibleValueObject item:bill.getChildrenVO()){
+				String key=IBillFieldGet.SCOMMENT;
+				Object attributeValue = item.getAttributeValue(key);
+				if(attributeValue!=null){
+					getBillCardPanel().setBodyValueAt(attributeValue, i, key);
+				}
+				i++;
+			}
+			
+			try{
+				if (getBillCardPanel().getHeadItem(IBillFieldGet.SUBJCODE) != null
+						&& getBillCardPanel().getHeadItem(IBillFieldGet.SUBJCODE).getComponent()!=null
+						&& ((UIRefPane) getBillCardPanel().getHeadItem(IBillFieldGet.SUBJCODE).getComponent()).getRefModel() != null
+						&& ((UIRefPane) getBillCardPanel().getHeadItem(IBillFieldGet.SUBJCODE).getComponent()).getRefModel().getPara() == null
+						&& StringUtils.isNotEmpty(bill.getHeadVO().getSubjcode())) {
+					new ArapRefUtil().setSubjcodeModelParam(getBillCardPanel().getHeadItem(IBillFieldGet.SUBJCODE), bill.getHeadVO().getPk_org());
+					getBillCardPanel().getHeadItem(IBillFieldGet.SUBJCODE).setValue(bill.getHeadVO().getSubjcode());
+				}
+
+			}catch(Exception e){
+			}
+			
+			// 付款单在新增时删除往来对象,现在编辑后往来对象添加客户
+			boolean fk = IBillFieldGet.FK.equals(bill.getHeadVO().getBillclass())
+					&& BillEnumCollection.ObjType.CUSTOMER.VALUE.equals(bill.getHeadVO().getObjtype());
+
+			boolean sk = IBillFieldGet.SK.equals(bill.getHeadVO().getBillclass())
+			&& BillEnumCollection.ObjType.SUPPLIER.VALUE.equals(bill.getHeadVO().getObjtype());
+			
+			if (fk || sk) {
+				List<Object> needRemovedValues = Arrays.asList(new Object[] { fk ? ObjType.CUSTOMER.VALUE : ObjType.SUPPLIER.VALUE });
+				String billtype_enumName = (fk ? IBillFieldGet.F3 : IBillFieldGet.F2 )+ "_" + IBillFieldGet.OBJTYPE;
+				
+				ViewHandlerUIUtil.tryAddComboBoxValue((UIComboBox) getBillCardPanel().getHeadItem(IBillFieldGet.OBJTYPE)
+						.getComponent(), needRemovedValues, billtype_enumName);
+			}
+		}
+	}
+
+	@Override
+	protected void setDefaultValue() {
+		// if (this.getDefValueItf() != null) {
+		// this.getBillCardPanel().setBillValueVO(this.getDefValueItf().getDefaultVO());
+		// }
+	}
+
+	private void loadBodyCheckType(BaseBillVO headvo, int row, BaseItemVO item) {
+		String checktype = item.getChecktype();
+		if (StringUtils.isNotEmpty(checktype)) {
+			Integer noteclass = BillEventHandlerUtil.getNoteClassByPK(checktype);
+			BillItem checkItem = getBillCardPanel().getBodyItem(IBillFieldGet.CHECKNO);
+			if (checkItem == null){
+				return ;
+			}
+			UIRefPane ref = ((UIRefPane) checkItem.getComponent());
+
+			if (noteclass == INotetypeConst.NOTETYPE_CLASS_BUSIPO) {
+				ArapBillUIUtil.setRefTypeByReflectMethod(checkItem,IBillItem.UFREF);
+				ref.setAutoCheck(true);
+			} else {
+				ArapBillUIUtil.setRefTypeByReflectMethod(checkItem,IBillItem.STRING);
+				ref.setAutoCheck(false);
+			}
+			
+			getBillCardPanel().setBodyValueAt(item.getCheckno(), row, IBillFieldGet.CHECKNO);
+			getBillCardPanel().getBillModel().loadLoadRelationItemValue(row, IBillFieldGet.CHECKNO);
+		}
+	}
+
+	@SuppressWarnings("unused")
+	private List<Integer> isFreecust(BaseAggVO bill) {
+		List<Integer> freecustList = new ArrayList<Integer>();
+		Map<String, UFBoolean> freecust = new HashMap<String, UFBoolean>();
+		if (bill.getItems() == null || bill.getItems().length <= 0) {
+			return freecustList;
+		}
+		String pk_billtype = bill.getHeadVO().getPk_billtype();
+		BaseItemVO[] itemVOs = bill.getItems();
+		try {
+			if (pk_billtype.equals(IBillFieldGet.F3) || pk_billtype.equals(IBillFieldGet.F1)) {
+				Set<String> supplier = new HashSet<String>();
+				for (int i = 0; i < itemVOs.length; i++) {
+					supplier.add(itemVOs[i].getSupplier());
+				}
+				NCObject[] supplierVOs = MDPersistenceService.lookupPersistenceQueryService().queryBillOfNCObjectByPKs(SupplierVO.class, supplier.toArray(new String[0]),
+						new String[] { SupplierVO.PK_SUPPLIER, SupplierVO.ISFREECUST }, true);
+				for (int i = 0; i < supplierVOs.length; i++) {
+					if (supplierVOs[i] != null) {
+						UFBoolean isFreeCust = ((SupplierVO) supplierVOs[i].getContainmentObject()).getIsfreecust();
+						String pkSupplier = ((SupplierVO) supplierVOs[i].getContainmentObject()).getPk_supplier();
+						freecust.put(pkSupplier, isFreeCust);
+					}
+				}
+				for (int i = 0; i < itemVOs.length; i++) {
+					UFBoolean isFreeCust = freecust.get(itemVOs[i].getSupplier());
+					if (isFreeCust != null && isFreeCust.booleanValue()) {
+						freecustList.add(i);
+					}
+				}
+				return freecustList;
+			} else if (pk_billtype.equals(IBillFieldGet.F0) || pk_billtype.equals(IBillFieldGet.F2)) {
+				Set<String> customer = new HashSet<String>();
+				for (int i = 0; i < itemVOs.length; i++) {
+					customer.add(itemVOs[i].getCustomer());
+				}
+				NCObject[] customerVOs = MDPersistenceService.lookupPersistenceQueryService().queryBillOfNCObjectByPKs(CustomerVO.class, customer.toArray(new String[0]),
+						new String[] { CustomerVO.PK_CUSTOMER, CustomerVO.ISFREECUST }, true);
+				for (int i = 0; i < customerVOs.length; i++) {
+					if (customerVOs[i] != null) {
+						UFBoolean isFreeCust = ((CustomerVO) customerVOs[i].getContainmentObject()).getIsfreecust();
+						String pkCustomer = ((CustomerVO) customerVOs[i].getContainmentObject()).getPk_customer();
+						freecust.put(pkCustomer, isFreeCust);
+					}
+				}
+				for (int i = 0; i < itemVOs.length; i++) {
+					UFBoolean isFreeCust = freecust.get(itemVOs[i].getCustomer());
+					if (isFreeCust != null && isFreeCust.booleanValue()) {
+						freecustList.add(i);
+					}
+				}
+				return freecustList;
+			}
+		} catch (MetaDataException e) {
+			ExceptionHandler.consume(e);
+		}
+		return freecustList;
+
+	}
+	
+//	private void loadBodyFreecustAccount(BaseAggVO bill, List<Integer> freecustList) {
+//		String pk_billtype = bill.getHeadVO().getPk_billtype();
+//		String account = "";
+//		if (IBillFieldGet.F3.equals(pk_billtype) || IBillFieldGet.F1.equals(pk_billtype)) {
+//			account = IBillFieldGet.RECACCOUNT;
+//		}else if(IBillFieldGet.F2.equals(pk_billtype) || IBillFieldGet.F0.equals(pk_billtype)){
+//			account = IBillFieldGet.PAYACCOUNT;
+//		}
+//		
+//		BillItem accountItem = getBillCardPanel().getBodyItem(account);
+//		if (accountItem == null){
+//			return ;
+//		}
+//		UIRefPane ref = ((UIRefPane) accountItem.getComponent());
+//		ArapBillUIUtil.setRefTypeByReflectMethod(accountItem, IBillItem.UFREF);
+//		ref.setAutoCheck(false);
+//		
+//		//如果是散户,把散户银行账号设到对应的银行账户字段  
+//		BaseItemVO[] itemVOs = bill.getItems();
+//		for(int i = 0; i < freecustList.size(); i++){
+//			int row = freecustList.get(i);
+//			getBillCardPanel().setBodyValueAt(itemVOs[row].getAttributeValue(account), row, account);
+//			getBillCardPanel().getBillModel().loadLoadRelationItemValue(row, account);
+//		}
+//	}
+	
+	@Override
+	public void setValue(Object object) { 
+		if(object == null){
+			return ;
+		}
+		reloadBillTemplate(object);
+		
+		ArapBillUIUtil.refreshChildVO2HeadVO((AggregatedValueObject) object);
+		String pk_org  = (String)((AggregatedValueObject) object).getParentVO().getAttributeValue(IBillFieldGet.PK_ORG);
+		
+		if(pk_org.equals(getPk_org_event())){
+			getModel().getContext().setPk_org(pk_org);
+			getModel().fireEvent(new nc.ui.pubapp.uif2app.event.OrgChangedEvent(null, pk_org));
+		}
+		setPk_org_event(null);
+		loadCurrtype(object);
+		dealSpecialItem();
+		resetHeadDigit();
+		super.setValue(object);
+		// 如果这个地方不设置一下表头精度 第一次 列表切换卡片 组织本币金额精度会有问题
+		loadSpecialData((BaseAggVO) object);
+		resetHeadDigit();
+	}
+
+	private void dealSpecialItem() {
+		BillItem item = this.getBillCardPanel().getBodyItem("facard");
+		
+		if(item!=null){
+			LoadBillCardTemplate.setFaCard(item);
+		}
+	}
+	
+	// 重新加载模板
+	private void reloadBillTemplate(Object object) {
+		String oldNodeKey = this.getNodekey();
+		JComponent entranceUI = this.getModel().getContext().getEntranceUI();
+		resetMenuAction(entranceUI);
+		String newNodekey = object == null ? null : ((BaseAggVO) object).getHeadVO().getPk_tradetype();
+
+		if (newNodekey != null && oldNodeKey != null && !newNodekey.equals(oldNodeKey)) {
+			this.getModel().fireEvent(new NodekeyEvent(oldNodeKey, newNodekey));
+		}
+	}
+
+	public static void resetMenuAction(JComponent entranceUI) {
+		if (entranceUI instanceof ArapToftPanelBase) {
+			ArapToftPanelBase ui = (ArapToftPanelBase) entranceUI;
+			if (ui.getLinkType() != ILinkType.NONLINK_TYPE) {
+				ui.resetMenuAction(ui.getLinkType());
+			}
+		}
+	}
+
+	private void loadCurrtype(Object object) {
+		if (object instanceof BaseAggVO) {
+			BaseItemVO[] items = ((BaseAggVO) object).getItems();
+				for (BaseItemVO item : items) {
+					putCurrtype(item.getPrimaryKey(), item.getPk_currtype());
+				}	
+			this.headCurrtype = ((BaseAggVO) object).getHeadVO().getPk_currtype();
+			this.getBillCardPanel().getHeadItem(IBillFieldGet.PK_CURRTYPE).setValue(((BaseAggVO) object).getHeadVO().getPk_currtype());
+		}
+	}
+
+	public void resetHeadDigit() {
+		if (getBillCardPanel() == null) {
+			return;
+		}
+		getArapBillCardPanelScaleProcessor().resetHeadExchangeRateDigit(getBillCardPanel());
+		getArapBillCardPanelScaleProcessor().resetHeadCurrencyDigit(getBillCardPanel());
+		getArapBillCardPanelScaleProcessor().resetHeadGlobalDigit(getBillCardPanel());
+		getArapBillCardPanelScaleProcessor().resetHeadGorupDigit(getBillCardPanel());
+		getArapBillCardPanelScaleProcessor().resetHeadLocalDigit(getBillCardPanel());
+	}
+
+	@Override
+	public Object getValue() {
+		return super.getValue();
+	}
+
+	@Override
+	public void handleEvent(AppEvent event) {
+		
+		super.handleEvent(event);
+		
+		if(this.getModel()==null || !(this.getModel() instanceof ArapBillManageModel)){ //兼容补差界面的模型初始化事件
+			return;
+		}
+		// 保存结算信息
+		if (getBillCardPanel() == null)
+			return;
+		if (event.getClass().equals(AppUiStateChangeEvent.class)) {
+			if (!((ArapBillManageModel) this.getModel()).getIsLink()) {
+				resetHeadDigit();
+			}
+		} else if (event.getType().equals(TabAddEventType.REFRESH_BILL)) {
+		} else if (event.getType().equals(TabAddEventType.BROW_BUSI_BILL)) {
+			BusiInfo info = (BusiInfo) event.getContextObject();
+			BilltypeVO billType = PfDataCache.getBillType(info.getBill_type());
+			String parentbilltype = billType == null ? "" : billType.getParentbilltype();
+			if (ArapBillPubUtil.isArapBilltype(info.getBill_type()) || ArapBillPubUtil.isArapBilltype(parentbilltype)) {
+				setArapBilltypeInfo(ArapBillTypeInfo.getInstance(parentbilltype));
+				try {
+					BaseAggVO[] vos = NCLocator.getInstance().lookup(getArapBilltypeInfo().getBillQueryService()).findBillByPrimaryKey(new String[] {
+						info.getPk_bill()
+					});
+					ArapBillUIUtil.refreshChildVO2HeadVO(vos);
+					if (ArrayUtils.isEmpty(vos)) {
+						throw new BusinessRuntimeException(nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("2006v61008_0", "02006v61008-0250")/* @res "没有业务单据, 业务单据id" */+ info.getPk_bill());
+					}
+					setValue(ArrayUtils.isEmpty(vos) ? null : vos[0]);
+				} catch (BusinessException e) {
+					ExceptionHandler.consume(e);
+				}
+			}
+		}
+
+	}
+
+	public IArapBilltypeInfo getArapBilltypeInfo() {
+		return arapBilltypeInfo;
+	}
+
+	public void setArapBilltypeInfo(IArapBilltypeInfo arapBilltypeInfo) {
+		this.arapBilltypeInfo = arapBilltypeInfo;
+	}
+
+	@Override
+	public boolean canBeHidden() {
+		return true;
+	}
+
+	public Collection<String> getClearHyperlink() {
+		return this.clearHyperlink;
+	}
+
+	@Override
+	public void initUI() {
+		super.initUI();
+		BillItem bodyItem = this.getBillCardPanel().getBodyItem(IBillFieldGet.SCOMMENT);
+		bodyItem.setGetBillRelationItemValue(new IGetBillRelationItemValue() {
+			@Override
+			public IConstEnum[] getRelationItemValue(ArrayList<IConstEnum> ies, String[] id) {
+				DefaultConstEnum[] ss = new DefaultConstEnum[1];
+				Object[] s = new Object[id.length];
+				for (int i = 0; i < s.length; i++) {
+					s[i] = id[i];
+				}
+				ss[0] = new DefaultConstEnum(s, IBillFieldGet.SCOMMENT);
+				return ss;
+			}
+		});
+		//2023/10/12 YY 添加超链接监听
+		String tableName = bodyItem.getTableName();
+		if("应付单行".equals(tableName)) {
+			if(this.getBillCardPanel().getBodyItem("def41") != null){
+				this.getBillCardPanel().getBodyItem("def41").addBillItemHyperlinkListener(new LinkHyperListener(this.getBillCardPanel()));
+			}
+		}
+		processHyperlink();
+	}
+
+	private void processHyperlink() {
+		if (null == this.getClearHyperlink() || 0 == this.getClearHyperlink().size()) {
+			return;
+		}
+
+		BillData billdata = this.getBillCardPanel().getBillData();
+		for (String key : this.getClearHyperlink()) {
+			BillItem item = billdata.getHeadItem(key);
+			if (null == item)
+				continue;
+			item.getCaptionLabel().setHyperlinkLabel(false);
+			item.setHyperlink(false);
+		}
+		for (String key : this.getClearHyperlink()) {
+			BillItem item = billdata.getBodyItem(key);
+			if (null == item)
+				continue;
+			item.getCaptionLabel().setHyperlinkLabel(false);
+		}
+	}
+
+	public void setClearHyperlink(Collection<String> clearHyperlink) {
+		this.clearHyperlink = clearHyperlink;
+	}
+
+	@Override
+	public void showMeUp() {
+		super.showMeUp();
+
+	}
+
+	private FIBillCardPanelScaleProcessor getArapBillCardPanelScaleProcessor() {
+		if (null == arapBillCardPanelScaleProcessor) {
+			arapBillCardPanelScaleProcessor = new ArapBillCardPanelScaleProcessor();
+		}
+		return arapBillCardPanelScaleProcessor;
+	}
+
+	/**
+	 * 解决列表界面, 自定义交易类型的单据模板的templateContainer没有加载
+	 * 
+	 * @see nc.ui.uif2.editor.BillForm#initBillCardPanel()
+	 */
+	@Override
+	protected void initBillCardPanel() {
+		Log.getInstance(this.getClass()).error("strat initcardpanel");
+		try {
+			super.initBillCardPanel();
+		} catch (IllegalArgumentException e) {
+			Log.getInstance(this.getClass()).error("error initcardpanel");
+			Log.getInstance(this.getClass()).error(e);
+			// 不能缓存单据模板
+			TemplateContainer templateContainer = getTemplateContainer();
+			setTemplateContainer(null);
+			super.initBillCardPanel();
+			setTemplateContainer(templateContainer);
+		}
+		Log.getInstance(this.getClass()).error("strat initcardpanel");
+
+	}
+
+	// only for 外来单据打开收付界面, 然后往界面上设置VO
+	private final Map<String, String> currtypeMap = new HashMap<String, String>();
+	private String headCurrtype;
+
+	@Override
+	public Map<String, String> getPk_currtype() {
+		return this.currtypeMap;
+	}
+
+	public void putCurrtype(String itemPK, String pk_currtype) {
+		currtypeMap.put(itemPK, pk_currtype);
+	}
+
+	@Override
+	public String getHeadCurrtype() {
+		return headCurrtype;
+	}
+	
+	//存放结算信息的地方
+	private SettlementAggVO settleInfo ;
+
+	@Override
+	public SettlementAggVO getSettlementInfo() {
+		return settleInfo;
+	}
+
+	@Override
+	public void setSettlementInfo(SettlementAggVO settlementInfo) {
+		this.settleInfo = settlementInfo;
+	}
+
+	@Override
+	public Object getBillApproveStatus() {
+		BillItem item = ((BillData)getBillData()).getHeadItem(IBillFieldGet.APPROVESTATUS);
+		return item.getValueObject().toString();
+	}
+
+	@Override
+	public Object getBillData() {
+		return this.getBillCardPanel().getBillData();
+	}
+}

+ 315 - 0
arap/arap/src/client/nc/ui/arap/view/ArapBillListView.java

@@ -0,0 +1,315 @@
+package nc.ui.arap.view;
+
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import nc.bs.arap.util.ArapBillVOUtils;
+import nc.itf.arap.fieldmap.IBillFieldGet;
+import nc.ui.arap.bill.ArapBillUIUtil;
+import nc.ui.arap.bill.LinkHyperListener;
+import nc.ui.arap.viewhandler.ArapListHeadDataChangedEvent;
+import nc.ui.arap.viewhandler.list.LoadBillListTemplate;
+import nc.ui.pub.bill.BillItem;
+import nc.ui.pub.bill.BillListPanel;
+import nc.ui.pub.bill.BillModel;
+import nc.ui.pubapp.uif2app.view.IPaginationDelegate;
+import nc.ui.pubapp.uif2app.view.MouseClickShowPanelMediator;
+import nc.ui.pubapp.uif2app.view.ShowUpableBillListView;
+import nc.ui.uif2.AppEvent;
+import nc.ui.uif2.components.pagination.PaginationBar;
+import nc.ui.uif2.components.pagination.PaginationModel;
+import nc.ui.uif2.model.IRowSelectModel;
+import nc.ui.uif2.model.RowOperationInfo;
+import nc.vo.arap.basebill.BaseAggVO;
+import nc.vo.pub.AggregatedValueObject;
+
+/**
+ * 
+ * @author miaohl
+ * 
+ */
+@SuppressWarnings("restriction")
+public class ArapBillListView extends ShowUpableBillListView {
+
+	private NodeKeyQry nodeKeyQry;
+
+	public NodeKeyQry getNodeKeyQry() {
+		return nodeKeyQry;
+	}
+
+	public void setNodeKeyQry(NodeKeyQry nodeKeyQry) {
+		this.nodeKeyQry = nodeKeyQry;
+		if (nodeKeyQry != null) {
+			setNodekey(nodeKeyQry.getDefNodekey());
+		}
+	}
+
+	private static final int DEFAULT_PAGESIZE = 10000;
+	private static final long serialVersionUID = 1L;
+
+	private boolean needHeadDataChanged;
+
+	private PaginationBar paginationBar = new PaginationBar();
+
+	private IPaginationDelegate paginationDelegate;
+
+	private MouseClickShowPanelMediator mouseMediator;
+
+	private LoadBillListTemplate loadBillListTemplate;
+
+	private int pageSize = DEFAULT_PAGESIZE;
+
+	public LoadBillListTemplate getLoadBillListTemplate() {
+		return loadBillListTemplate;
+	}
+
+	public void setLoadBillListTemplate(
+			LoadBillListTemplate loadBillListTemplate) {
+		this.loadBillListTemplate = loadBillListTemplate;
+	}
+
+	public MouseClickShowPanelMediator getMouseMediator() {
+		return mouseMediator;
+	}
+
+	public void setMouseMediator(MouseClickShowPanelMediator mouseMediator) {
+		this.mouseMediator = mouseMediator;
+	}
+
+	public void addHeadDataChangedListener() {
+		this.needHeadDataChanged = true;
+	}
+
+	public IPaginationDelegate getPaginationDelegate() {
+		return this.paginationDelegate;
+	}
+
+	public void initRealUI() {
+		if (this.isComponentVisible()) {
+			this.initUI();
+		}
+	}
+
+	@Override
+	public void setComponentVisible(boolean visible) {
+
+		super.setComponentVisible(visible);
+
+		if (visible && this.getBillListPanel() == null) {
+			this.initUI();
+		} else if (visible && isDirtyFlag()) {
+			this.synchronizeDataFromModel();
+			setDirtyFlag(false);
+		}
+
+	}
+
+	@Override
+	public void initUI() {
+		this.setPaginationBar(this.paginationBar);
+		super.initUI();
+		BillItem bodyItem = getBillListPanel().getBodyItem(IBillFieldGet.SCOMMENT);
+		initDoubleClickMediator();
+		initListPanelLoadTemplateListener();
+
+		PaginationModel paginationModel = this.paginationDelegate
+				.getPaginationModel();
+		if (paginationModel != null) {
+			paginationModel.setMaxPageSize(getPageSize());
+		}
+		this.paginationBar.setPaginationModel(paginationModel);
+		this.paginationBar.onStructChanged();
+		this.addHeadDataChangedListener();
+		this.synchronizeDataFromModel();
+		
+		//处理特殊字段, 摘要
+		loadSpecialItem(null);
+		//2023/10/12 YY 添加超链接监听
+		String tableName = bodyItem.getTableName();
+		if("应付单行".equals(tableName)) {
+			if(getBillListPanel().getBodyItem("def41") != null){
+				getBillListPanel().getBodyItem("def41").addBillItemHyperlinkListener(new LinkHyperListener(getBillListPanel()));
+			}
+		}
+	}
+
+	private int getPageSize() {
+		return pageSize;
+	}
+
+	public void setPageSize(int pageSize) {
+		this.pageSize = pageSize;
+	}
+
+	private void initListPanelLoadTemplateListener() {
+		if (getLoadBillListTemplate() != null) {
+			getLoadBillListTemplate().setBlp(this);
+		}
+	}
+
+	private void initDoubleClickMediator() {
+		if (getMouseMediator() != null) {
+			getMouseMediator().setListView(this);
+			try {
+				Method declaredMethod = getMouseMediator().getClass()
+						.getDeclaredMethod("match");
+				declaredMethod.setAccessible(true);
+				declaredMethod.invoke(getMouseMediator());
+			} catch (Exception e) {
+				// FIXME
+			}
+		}
+	}
+
+	public void removeHeadDataChangedListener() {
+		this.needHeadDataChanged = false;
+	}
+
+	public void setPaginationDelegate(IPaginationDelegate paginationDelegate) {
+		this.paginationDelegate = paginationDelegate;
+	}
+
+	@Override
+	public void handleEvent(AppEvent event) {
+		if (getBillListPanel() == null)
+			return;
+
+		if (!this.isComponentVisible()) {
+			setDirtyFlag(true);
+			return;
+		}
+
+		super.handleEvent(event);
+
+	}
+	
+	@Override
+	protected void handleSelectionChanged() {
+		super.handleSelectionChanged();
+		BaseAggVO selectedData = (BaseAggVO)getModel().getSelectedData();
+		if(selectedData == null ){
+			return;
+		}
+		// 列表界面查询后摘要不显示的问题
+		loadSpecialItem(selectedData);
+	}
+
+	private void loadSpecialItem(BaseAggVO selectedData) {
+		BillItem scommentBodyItem = getBillListPanel().getBodyItem(IBillFieldGet.SCOMMENT);
+		ArapBillUIUtil.loadHeadScomment(selectedData,scommentBodyItem);
+	}
+	static class ArapBillListPanelValueSetter extends
+			VOBillListPanelValueSetter {
+		final Map<Integer, BaseAggVO> bills;
+
+		public ArapBillListPanelValueSetter(Map<Integer, BaseAggVO> bills) {
+			this.bills = bills;
+		}
+
+		@Override
+		protected void processLoadRelation(BillListPanel listPanel,
+				String[] tabcodes) {
+			for (String tabcode : tabcodes) {
+				BillModel bodyModel = listPanel.getBodyBillModel(tabcode);
+				if (bodyModel != null) {
+				}
+			}
+		}
+	}
+
+	protected void refreshDataUpdate(AppEvent event) {
+		IBillListPanelValueSetter billListPanelValueSetter = getBillListPanelValueSetter();
+		Map<Integer, BaseAggVO> bills = new HashMap<Integer, BaseAggVO>();
+		RowOperationInfo operationInfo = (RowOperationInfo) event
+				.getContextObject();
+		if (getModel() instanceof IRowSelectModel) {
+			for (int i = 0; i < operationInfo.getRowIndexes().length; i++) {
+				if (operationInfo.getRowIndexes()[i] != getModel()
+						.getSelectedRow()) {
+					BaseAggVO bill = (BaseAggVO) operationInfo.getRowDatas()[i];
+					if (bill.getLoadRelationItemValue() != null
+							&& bill.getLoadRelationItemValue().booleanValue()) {
+						bills.put(i, bill);
+					}
+				}
+			}
+		}
+
+		if (bills.size() != 0) {
+			IBillListPanelValueSetter billListPanelValueSetter2 = new ArapBillListPanelValueSetter(
+					bills);
+			setBillListPanelValueSetter(billListPanelValueSetter2);
+
+			super.handleEvent(event);
+
+			setBillListPanelValueSetter(billListPanelValueSetter);
+		} else {
+			super.handleEvent(event);
+		}
+
+	}
+
+	// 单据列表,卡片界面在不显示时不响应所有事件,只设置dirtyflag,在控件显示时根据标志和model进行同步
+	private boolean dirtyFlag = false;
+
+	public boolean isDirtyFlag() {
+		return dirtyFlag;
+	}
+
+	public void setDirtyFlag(boolean dirtyFlag) {
+		this.dirtyFlag = dirtyFlag;
+	}
+
+	@Override
+	protected void synchronizeDataFromModel() {
+		if (!this.isComponentVisible()) {
+			setDirtyFlag(true);
+			return;
+		}
+
+		Object[] datas = this.getModel().getData().toArray();
+
+		if (datas == null || datas.length == 0) { // 如果没有数据,则清除
+			billListPanel.getHeadBillModel().clearBodyData();
+			billListPanel.getBodyBillModel().clearBodyData();
+		} else {
+			for (Object vo : datas) {
+				if (vo != null && vo instanceof AggregatedValueObject) {
+					ArapBillVOUtils.removeDebetTransferinfo(new AggregatedValueObject[]{(AggregatedValueObject) vo});
+				}
+			}
+
+			getModel().setSelectedRow(0);// 第一次进入页面点击刷新,设置选中行为第一行
+			getBillListPanelValueSetter().setHeaderDatas(billListPanel, datas);
+			
+			getModel().directlyUpdate(datas);
+			getBillListPanelValueSetter().setBodyData(billListPanel,
+					getModel().getSelectedData());
+			setHeadTableHighLightByModelSelection();
+
+			setCheckBoxMultiUnstate();
+			this.getBillListPanel().getParentListPanel().setTotalRowShow(true);
+			this.getBillListPanel().getChildListPanel().setTotalRowShow(true);
+
+		}
+
+		if (this.needHeadDataChanged) {
+			ArapListHeadDataChangedEvent ev = new ArapListHeadDataChangedEvent(
+					this);
+			this.getModel().fireEvent(ev);
+		}
+	}
+
+	@Override
+	public PaginationBar getPaginationBar() {
+		return paginationBar;
+	}
+
+	@Override
+	public void setPaginationBar(PaginationBar paginationBar) {
+		this.paginationBar = paginationBar;
+		super.setPaginationBar(paginationBar);
+	}
+
+}

+ 1 - 1
arap/arap/src/private/nc/bs/arap/busireg/InitCloseCtrlListener.java

@@ -26,7 +26,7 @@ public class InitCloseCtrlListener implements IBusinessListener {
 				String sql = "select pk_billtypecode from bd_billtype where pk_billtypeid = '"+pk_tradetypeid+"'";
 				String type = (String) iuap.executeQuery(sql, new ColumnProcessor());
 				//2023/10/11 YY 校验应付单金额与采购发票是否一致
-				if("F1-Cxx-02".equals(type) || "D1".equals(type)) {
+				if("F1-Cxx-02".equals(type) || "D1".equals(type) || "F1-Cxx-04".equals(type) || "F1-Cxx-05".equals(type)) {
 					//价税合计
 					UFDouble local_money = (UFDouble) obills[i].getParentVO().getAttributeValue("local_money");
 					//上层单据主键

+ 1 - 4
arap/pu/classes/.gitignore

@@ -1,4 +1 @@
-/public.gitkeep
-/client.gitkeep
-/test.gitkeep
-/resources.gitkeep
+/nc/

+ 1 - 0
arap/pu/classes/client.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�

BIN
arap/pu/classes/nc/pubimpl/pu/m25/arap/f1/PayablebillUpdateListener.class


+ 1 - 0
arap/pu/classes/public.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�

+ 1 - 0
arap/pu/classes/resources.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�

+ 1 - 0
arap/pu/classes/test.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�

+ 1 - 1
arap/pu/src/private/nc/pubimpl/pu/m25/arap/f1/PayablebillUpdateListener.java

@@ -32,7 +32,7 @@ public class PayablebillUpdateListener implements IBusinessListener {
 					return;
 				}
 
-				//this.checkAddOrDelRows(oldVo, newVo);
+				this.checkAddOrDelRows(oldVo, newVo);
 				//this.checkUpdateFields(oldVo, newVo);
 			}
 		} catch (Exception var7) {

+ 0 - 4
arap/pubapp/classes/.gitignore

@@ -1,4 +0,0 @@
-/private.gitkeep
-/public.gitkeep
-/test.gitkeep
-/resources.gitkeep

+ 1 - 0
arap/pubapp/classes/private.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�

+ 1 - 0
arap/pubapp/classes/public.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�

+ 1 - 0
arap/pubapp/classes/resources.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�

+ 1 - 0
arap/pubapp/classes/test.gitkeep

@@ -0,0 +1 @@
+ユシホサキ�