解决方案: |
目前单据列表是用平台列表控件做的,只需要设置数据源和列表格式数据即可,数据源对应数据库中的视图,列表格式存在AA_ColumnDic表里,用户只要在视图中加入需要的字段,同时在列表格式中增加相应的栏目信息即可。 请参考下面脚本: ALTER VIEW dbo.zpurpstail AS SELECT pursettlevouchs.psvid, pursettlevouchs.cinvcode, inventory.cinvname, inventory.cinvstd,pursettlevouchs.cpivcode,cinvaddcode, pursettlevouchs.cbillcode, pursettlevouchs.isvquantity,pursettlevouchs.isvnum, pursettlevouchs.isvcost, pursettlevouchs.isvprice, pursettlevouchs.isvexpense, pursettlevouchs.isvacost, pursettlevouchs.isvaprice,pursettlevouchs.itax, pursettlevouchs.isum, pursettlevouchs.cfree1,pursettlevouchs.cfree2, pursettlevouchs.id, pursettlevouchs.irdsid,pursettlevouchs.ibsid, unit1.ccomunitname as cinvm_unit, case when isnull(inventory.igrouptype,0)=0 then null else unit2.ccomunitname end as cinva_unit, pursettlevouchs.baccount, pursettlevouchs.bispuracc,pursettlevouchs.citemcode,pursettlevouchs.citemname,pursettlevouchs.citem_class,fitem.citem_name ,inventory.iid as cinvauthid, pursettlevouchs.materialfee,pursettlevouchs.processfee,Purbillvouch.dpbvdate,Purbillvouchs.dindate FROM pursettlevouchs LEFT OUTER JOIN Inventory ON pursettlevouchs.cInvCode = Inventory.cInvCode LEFT OUter JOIN PurBillVouchs ON pursettlevouchs.ibsid=Purbillvouchs.ID LEFT outer JOin purbillvouch on purbillvouch.PBVID=purbillvouchs.PBVID LEFT JOIN fItem ON pursettlevouchs.cItem_Class=fItem.cItem_Class left join ComputationUnit as Unit1 on inventory.cComUnitCode=Unit1.cComUnitCode left join ComputationUnit as Unit2 on inventory.cPUComUnitCode=Unit2.cComUnitCode GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO insert into aa_columndic(ckey,cfld,cqryfield,icolpos,ccaption,ccaptionpar,bfixed,bdisp,icolwidth,iAlign,corder,block,imergecols,bmustsel,bneedsum) values ('99','dDate','Purbillvouchs.dindate','111','采购入库日期',null,0,1,1000,1,null,0,null,1,0) go insert into aa_columndic(ckey,cfld,cqryfield,icolpos,ccaption,ccaptionpar,bfixed,bdisp,icolwidth,iAlign,corder,block,imergecols,bmustsel,bneedsum) values ('99','dpbvdate','dpbvdate','256','采购发票日期',null,0,1,1000,1,null,0,null,1,0) |