1、数据结构一、基本信息数据结构1、商品基本资料数据结构barcodePKrc_idI1p_idIbarcoe productsPK,I5rct_idI5,I4clas_idI3,I7prentiI,I6child_umberilcontserial_uberI1nmalisstndarmolperitcodetadrkmkeaunit1_idit2iunit3_idit4irate2t3rate4vlidmonthaliaycoentdltdI2pinyifirstchekvalidotcflggspflamedtyecostthodEngNaeChmLatinaemedtypePKt_idmt
2、_codetnadeltdunitPKit_idnamedltdpricePKric_idI1p_idIuiretailpricecriprie1ic2prie3ic4gprielicspeialpriceunitylowprice说明: Products 商品信息表Barcode 一品多码表Unit 商品单位表Price 价格表MedType 剂型表2、往来单位基本信息clientsPKclit_idI4clas_idprentichild_umberilcontI1serial_uberI2nmalisregion_idphumberadreszipcontat_personaltx_um
3、baconterredit_totalI3pinyiricemodskliitartotalttl_iniaptotalttl_inipre_artotalttl_inipre_aptotalttl_inifirstchekcomntsflagdeltdProtclDateRegionPKri_idI1serial_numbernmcoentdltd说明: Clients 往来单位信息库Region 片区信息3、仓库基本信息storagesPKstr_idI3clas_idprentichild_umberilcontnaelisI1serial_numberComtflagI2PinYide
4、ltd locationPKlc_ids_idlocel_namlocentdeltd说明: Storages 仓库信息库Location 货位信息库4、职员信息库employesPK_idI2clas_idprentichild_umberilcontnaelisserial_numberdpidhoneadrscomentapliitrliitaptotalrttldiscountlimitlthI1pinyideltdLowPriceHighiSNCountGPtdepartmentPKrttIdserial_numbernmcoentdltd说明: employees 职员信息库dep
5、artment 部门信息库5、科目信息库acountPKct_idI1clas_idprentichild_umberilcontnaelisI2serial_numberComtcur_ttalinitotlsyflagrowdeltdI3PinYitotal_01ttl2total_03ttl4total_05ttl6total_07ttl8total_09ttl1total_ttl12bqtotalsumttlcahditdirectionAcountComentPKIDAcountComentCde说明: account 科目信息库AccountComment 科目备注信息库6、会员卡
6、信息cardtypePKCTyITypeNamDiscountCetAutoiscountcardtoalPKIDcarditotlcardiscountPKc_idAutoIDbeginttaldtotliscuntometmebrcardPKCardIDI1ardNomeTlAdresComntardTypeDiscountBlidateValiityDtLoseStpUBuyTotaltlPerDayAutoDiscountICardInteglBrithdayDiscountTpe说明: Cardtype 会员卡类型表Membercard 会员卡表CardDiscount 会员卡折扣类
7、型CardTotal 会员卡消费金额7、门店信息表ShopPosIDCdeosNamS_IDCIRemotPathntdeltd二、单据类数据结构1、销售类单据bildraftidxPKilibildateilnumbrbiltypea_idcie_idsoutiin_idauitmaninptysoeymnquatiytxrtepeiodbilstaesorder_idpatmnt_idosidregin_iauditatesktjyejsflagnotesumaryinvoicetrasuntltrstimesalemnagebildrfPKs_idbil_idpibatchnoqutiy
8、costpricealeidiscounti tpricetoalmonytxpricetatoaltxmneyretailprictiltoalmakedtvliatequlitystusprice_idsid_ilocation_idsupliericomisionflagetunitidtaxrteod_idtaliotgbilidxPK,I1iliI1bildateilnumbrI1biltypea_idI1ciI e_idsoutiin_idauitmaninptysoeymnquatiytxrtepeiodbilstaesorder_idpatmnt_idosidregin_iau
9、ditatesktjyejsflagnotesumaryinvoicetrasuntltrstimesalemnagebilPKsb_idbil_idpibatchnoqutiycostpricealeidiscounti tpricetoalmonytxpricetatoaltxmneyretailprictiltoalmakedtvliatequlitystusprice_idsid_ilocation_idsupliericomisionflagetunitidtaxrteod_idtaliotg说明: billdraftidx 单据草稿主表SaleManagebilldrf 销售单据草
10、稿表Billidex 单据主表SaleManageBill 销售单据库2、采购类单据数据结构bildraftidxPKbilidbildateilnumbrbiltypea_idcie_idsoutiin_idauitmaninptysoeymnquatiytxrteperiodbilstaesorder_idpartmnt_idosidregin_iauditatesktjyejsflagnotesumaryinvoicetrasuntltrstimebuymangebildrfPKsb_idbil_idpibatchnoqutiycostpricebuyridiscontiutpricet
11、oalmonytxpricetatoaltxmneyretailpricrtiltoalmakedtvliatequlitystusprice_idsid_ilocation_idsupliericomisionflagetunitidtaxrteordr_idtaliotgbilidxPK,I1bilidI1bildateilnumbrI1biltypea_idI1ciI e_idsoutiin_idauitmaninptysoeymnquatiytxrteperiodbilstaesorder_idpartmnt_idosidregin_iauditatesktjyejsflagnotes
12、umaryinvoicetrasuntltrstimebuymangebilPKsb_idbil_idpibatchnoqutiycostpricebuyridiscontiutpricetoalmonytxpricetatoaltxmneyretailpricrtiltoalmakedtvliatequlitystusprice_idsid_ilocation_idsupliericomisionflagetunitidtaxrteordr_idtaliotg说明: Billdraftidx 单据草稿主表BuyManagebilldrf 采购单据草稿表Billidx 单据主表BuyManag
13、eBilldrf 采购单据表3、库存类单据数据结构bilidxPK,I1bilidI1bildateilnumbrI1biltypea_idI1ciI e_idsoutiin_idauitmaninptysoeymnquatiytxrteperiodbilstaesorder_idpartmnt_idosidregin_iauditatesktjyejsflagnotesumaryinvoicetrasuntltrstimebildraftidxPKbilidbildateilnumbrbiltypea_idcie_idsoutiin_idauitmaninptysoeymnquatiytxr
14、teperiodbilstaesorder_idpartmnt_idosidregin_iauditatesktjyejsflagnotesumaryinvoicetrasuntltrstimestoremangebildrfPKsb_idbil_idpibatchnoqutiypricetoalmonycstpriceottalretilpricertailmonykedtvaliatequlitystusprice_idsid_ilocation_idsupliericomisionflagetunitidlocation_id2itgtoalstoremangebilPKsb_idbil
15、_idpibatchnoqutiypricetoalmonycstpriceottalretilpricertailmonykedtvaliatequlitystusprice_idsid_ilocation_idsupliericomisionflagetunitidlocation_id2itgtoal说明: Billdraftidx 单据草稿主表StoreManagebilldrf 库存单据草稿表Billidex 单据主表storeManageBilldrf 库存单据表4、库存盘点单bildraftidxPKilibildateilnumbrbiltypea_idcie_idsoutii
16、n_idauitmaninptysoeymnquatiytxrtepeiodbilstaesorder_idpatmnt_idosidregin_iauditatesktjyejsflagnotesumaryinvoicetrasuntltrtimebilidxPK,I1iliI1bildateilnumbrI1biltypea_idI1ciI e_idsoutiin_idauitmaninptysoeymnquatiytxrtepeiodbilstaesorder_idpatmnt_idosidregin_iauditatesktjyejsflagnotesumaryinvoicetrasu
17、ntltrtimeGodsCheckBilPKsmb_ibil_idpibatchnoqutiycostpricebuyidiscontiutpricetoalmonytxpricetatoaltxmneyretailprictiltoalmakedtvliatequlitystusprice_idsid_ilocation_idsupliericomisionflagetunitidtaxrteod_idtalGodsCheckBilDrfPKsmb_idbil_idpibatchnoqutiycostpricebuyidiscontiutpricetoalmonytxpricetatoal
18、txmneyretailprictiltoalmakedtvliatequlitystusprice_idsid_ilocation_idsupliericomisionflagetunitidtaxrteod_idtal说明: Billdraftidx 单据草稿主表GoodsCheckbilldrf 库存盘点草稿表Billidex 单据主表GoodsCheckBill 库存盘点表5、零售类单据结构retailbilidxPK,I1iliI1bildateilnumbrI1biltypea_idI1ciI e_idsoutiin_idauitmaninptysoeymnquatitytxrte
19、peiodbilstatesorder_idpatment_idosidregin_idauditatesktjyejsflagnotesumaryinvoicetrasuntRetailBilPKsmb_idbil_idpibatchnoqutitycostpricealeidiscounti tpricetotalmoneytxprictatotaltxmneyretailpricetiltotalmakedatevlitqualitystatusprice_idsid_ilocation_idsupliericomisionflagentunitidtaxrtetotljkdetailP
20、Kjkijkdatej_ijkimputanjoneyct说明: retailbillidx 零售单主表retailBill 零售明细表jkdetail 交款明细6、订单表orderixPK,I1bilidI1bildateilnumbrI1biltypea_idI1ciI e_idsoutiin_idauitmaninptysoeymnquatitytxrtepeiodbilstatesorder_idpatmnt_idosidregin_iauditatesktjyejsflagnotesumaryinvoiceOrderBilPKsmb_ibil_idpibatchnoqutitycos
21、tpricealeidiscounti tpricetotalmonytxpricetatotaltxmneyretailprictiltotalmakedtvliatequlitysttusprice_idsid_ilocation_idsupliericomisionflagetunitidtaxrteComDteQtytotal说明: orderidx 订单主表orderBill 订单明细表7、财务表jsbdetailPKjsic_idskbixd_ibiltypejstotalreminttlflagjspdetailPKjsic_idskbixd_ibiltypequantitjst
22、otldetail_idyj_quntityflagfinacebilPKsm_idbil_idaic_idjftotaldfttlcoment1t2coent3finacebildrfPKsm_ibil_idaic_idjftotaldfttlcoment1t2coent3说明: Finacebilldrf 财务单据草稿表Finacebill 财务类单据表jsbDetail 按单结算表jspdetail 按行结算表三、明细帐acountdetailPKsmb_iI1bilidIa_iI1cidjmoneyjdflagproductetailPK_idI2,I1bilidI,Ip_iI2,I1
23、sidI,IquantitypriceI1totalcstpriceI2,I1ottaltaxpriceI1ttotalbatchnmkedtvaliatecoisionflagsuplier_idlocationiI2stretyppic_idorderiunitismb_id说明: Productdetail 库存明细帐表AccountDetail 科目明细帐表四、库存余量1、库存余量storehusePKstros_idlocation_idI3,I1s_idI,I2,Ipisulier_idI3,I2,I1qantitycostpriceI2,I1ttalbatchnomkedtins
24、tortimevalidatcomisionflagstpaleflinordryhatestorehuseiniPKstorhuseini_idlocation_idI3,I1s_idI,I2,Ipisulier_idI3,I2,I1qantitycostpriceI2,I1ttalbatchnomkedtinstortimevalidatcomisionflagstpaleflinordr说明: StoreHouse 库存余量表Storehouseini 期初库存余量表2、代销库存余量storedxPKstrx_ilocation_id_idpisulier_idqantitycostpr
25、icettalbatchnomkedtinstortimevalidatcomisionflagstpaleflinordrstoredxiniPKstrxii_idlocation_id_idpisulier_idqantitycostpricettalbatchnomkedtinstortimevalidatcomisionflagstpaleflinordr说明: StoreDX 代销库存余量表Storedxini 期初代销库存余量表五、GSP 类表 gspauditPKts_iGSP_AuditLimiteinamGspFlowCntrolPKlIDSourceGspTyeDstCom
26、entSysFlaggpProertGSPNtyleKIDBilTypeStlNCountGspTablePKsIDGspTyeBilCodilEilDateGspTxtcomentChkStatebatcnoSigGPVer GspVchTypePKsidGspTyeNamForStyleCnt BilToGspIDBilTypeGSP说明: GSPSNStyle GSP 编号GspAudit GSP 签字表GSPVchType GSP 单据类型表BillToGsp 单据至 GSP 流程定义GSPTable GSP 报表库表六、其它1、跟踪类表 buypricehisPKc_idpiunit
27、_idBuyPricesalepricehisPKc_idpiunit_idSalePriceLocationTracePKlt_idU1p_idsi1l_idrectime说明: Locationtrace 货位跟踪SalePriceHis 售价跟踪BuyPriceHis 进价跟踪2、库存上下限StoreLimitPKIDI1_idISiUperLimitLowiitAdjQty说明StoreLimit 库存上下限表3、门店物价管理表PosriceKpric_idpos_idiu_idretailpricecriprie1ic2prie3ic4gprielicspeialpriceunity
28、lowprice4、权限类表EmpMsgLimitIDEIBilTypeMSGLIITag userPKsr_ide_idloginpaspermiionuserauthorizePKt_ide_idtypsc_idparentflagReplicationAuthorizeIDGUIMemoTag说明ReplicationAuthorize 复制授权表empMsglimit 职员消息权限users 登录用户权限表UserAuthorize 用户授权限表5、用友接口dwzdw_iciserialnumbertyp kmdzkm_idaiserilnumbertyp pzoutbildatepz
29、lnumberpzfjcoentkmdjfoneydfgysnumbercod说明dwdz 单位对照表kmdz 科目对照表pzOut 凭证导出表6、消息与日志SystemLogPKIDEIActionTagVhIDctionTypeCmputrActionDateet MsgHistoryIDComputerSendEIDActionStrTextRciveDat说明systemlog 日志表MsgHistory 消息历史记录表7、系统配置syconfigPKsy_idI1synamevlucoent说明:值 备注OpenAccount 1 启用账套标志CostMethod 3 默认成本核算法
30、AccountPeriod 1 会计期TaxRate 0 默认税率BillCount 80 默认单据行数DBVersion 2003-07-32 版本号RecpriceAsCost 0 使用最近进价为成本价 =0 false =1 trueNegativeStock 0 负库存开关 =0 false =1 trueUseSameCostMethod 1 使用统一成本核算法=0 false =1 trueUseBuyTrace 0 使用进价跟踪UseSaleTrace 1 使用售价跟踪BillSNLex1 1 单据编号规则 1BillSNLex2 0 单据编号规则 2BillSNLex3 0 单
31、据编号规则 3BillSNCount 单据编号记数GSPSNLex1 GSP 单据编号规则 1GSPSNLex2 GSP 单据编号规则 2GSPSNLex3 GSP 单据编号规则 3GSPSNCount GSP 单据编号记数CompanyName 公司信息GspFlowControl GSP 流程控制BillFlowControl 单据流程控制ShowLastBuyPrice 显示最近进价ShowArAp 显示往来单位应收应付UseClientCredit 客户信用额度UseEmpCredit 职员信用额度AutoComment 自动备注FLOATFMT 浮点数长度TAXPRICEFMT 税后
32、单价小数点保留位数TOTALFMT 合计小数点保留位数SLFMT 数量小数点保留位数DJFMT 单价小数点保留位数XPMenu 是否使用 XP 风格BillDialog 单据是否采用对话框AutoSaveTime 自动存盘时间LoginDate 最后登录日期Posid 门店 IDPosName 门店名称PosCid 门店对应单位PosSid 门店对应仓库SQLVersion 数据库版本ProductTypeGUID 帐套 IDAutoMessage 自动短消息CountQtyPrintSave 单据打印后保存BillSNLex4 单据编号规则/单据类型定义constvtSale = 10; /
33、 销售单vtSaleBack = 11; / 销售退货单vtRetail = 12; / 零售单vtRetailBack = 13; / 零售退货单vtSaleOrder = 14; / 销售定单vtGathering = 15; / 收款单vtSaleAdjust = 16; / 销售结算调价vtSaleBackAdjust = 17; / 销售退货结算调价vtBuy = 20; / 采购单vtBuyBack = 21; / 采购退货单vtBuyOrder = 22; / 采购定单vtPayment = 23; / 付款单vtBuyAdjust = 24; / 采购结算调价vtBuyBack
34、Adjust = 25; / 采购退货结算调价vtBuyPlan = 26; / 采购计划vtLend = 30; / 借出单vtLendBack = 31; / 借出还回单vtLendSale = 32; / 借出转销售单vtBorrow = 33; / 借进单vtBorrowBack = 34; / 借进还出单vtBorrowBuy = 35; / 借进转采购单vtProduce = 40; / 组装单vtLost = 41; / 报损单vtOverflow = 42; / 报溢单vtAdjustPrice = 43; / 成本调价单vtTransfer = 44; / 调拨单vtTran
35、sfer_Price = 45; / 变价调拨单vtGive = 46; / 赠送单vtGain = 47; / 获赠单vtInLib = 48; / 入库单vtOutLib = 49; / 出库单vtGoodsCheck = 50; / 库存盘点单vtBatchAdjust = 51; / 库存批次调整单/vtTranGet = 52; / 门店请货单vtTranOut = 53; / 配送出库单vtTranOutBack = 54; / 配送出库退货单vtTranIn = 55; / 配送入库单vtTranInBack = 56; / 配送入库退货单vtTranOOS = 57; / 门店
36、请货缺货单 Out Of Stock/vtCashExpense = 60; / 现金费用单vtExpense = 61; / 费用单vtOtherIncome = 62; / 其它收入单vtMoney = 63; / 现金转帐单vtAR_Add = 64; / 应收增加vtAR_Reduce = 65; / 应收减少vtAP_Add = 66; / 应付增加vtAP_Reduce = 67; / 应付减少vtCash_Add = 68; / 资金增加vtCash_Reduce = 69; / 资金减少vtFixedBuy = 80; / 固定资产购置vtFixedSale = 81; / 固
37、定资产变卖vtFixedDepreciation = 82; / 固定资产折旧vtExpenseHappen = 83; / 待摊费用发生vtExpenseAmortize = 84; / 待摊费用摊销/vtTranPayment = 87; / 配送付款单vtTranGathering = 88; / 配送收款单/vtAccount = 90; / 会计凭证vtSendGoods = 100; / 发货单vtSendBack = 101; / 发货退货单vtSendSettle = 102; / 发货结算单vtSendPrice = 103; / 发货调价单vtCommission = 11
38、0; / 委托代销单vtCommBack = 111; / 委托代销退货单vtCommSettle = 112; / 委托代销结算单vtCommPrice = 113; / 委托代销调价vtReCommission = 120; / 受托代销单vtReCommBack = 121; / 受托代销退货单vtReCommSettle = 122; / 受托代销结算单vtReCommPrice = 123; / 受托代销调价vtCommRecive = 130; / 库外入库单vtCommPayment = 131; / 库外出库单vtPriceAdjust = 140; / 价格调整单vtIniG
39、oodsRec = 141; / 期初库存录入单/GSp 单据/GSP 采购进货 2200-2220GSP_BUY_TYPE_CHECK = 2200; /【GSP】进货品种审核表GSP_IMPORT_BREED = 2201; /【GSP 】本企业经营进口品种一览表GSP_FIRST_CORP = 2202; /【GSP】首营企业审批表GSP_FIRST_PROD = 2203; /【GSP】首营品种审批表GSP_BUY_PLAN = 2204; /【GSP 】药品采购进货计划表GSP_BUY_REC = 2205; /【GSP 】药品购进记录GSP_YEAR_BUY_QUALITY = 2
40、206; /【GSP 】药品进货情况质量评审表GSP_QUALITY_PRO = 2207; /【GSP】质量保证协议/验收入库 3320GSP_GOODS_CHECK = 2220; /【GSP】药品到货请验单GSP_CHECK_SAMPLE = 2221; /【GSP】药品验收抽样记录GSP_BUY_CHECK_REC = 2222; / 【GSP 】购进药品验收记录GSP_BACK_CHECK_REC = 2223; / 【GSP 】退回药品验收记录GSP_TAKEOUT_CHECK = 2224; /【GSP 】 药品验收抽(送)验单GSP_CHECK_REP = 2225; /【GS
41、P】药品检验报告书GSP_LAB_CHECK = 2226; /【GSP 】化验室检品登记表GSP_CHECK_CARD = 2227; /【GSP】药品检验卡GSP_TEST_SOURCE = 2228; /【GSP】化验原始记录GSP_MEASURE_WARE = 2229; /【GSP】计量器具管理台帐GSP_CHECK_GAGE = 2235; /【GSP】 强制检定工作计量器具定期检定记录卡GSP_CHECK_GAGE1 = 2236; /【GSP 】非强制检定计量器具检定记录卡GSP_APPARATUS_USE_REC = 2237; /【GSP】精密仪器使用记录GSP_TITRA
42、TION_CONFIG = 2238; /【GSP】滴定液配制及标化记录GSP_TITRATION_LABEL = 2239; /【GSP 】滴定液标签GSP_BUY_BATCH = 2240; /【GSP】上年度药品进货批次汇总表GSP_YEAR_CHECK_BATCH = 2241; /【GSP】年度药品抽验批次汇总表GSP_YEAR_CHECK_QUALITY = 2242; /【GSP】年度药品抽验质量汇总表GSP_CHECK_ENTER = 2243; /【GSP】验收入库通知单GSP_BUY_REFUSE = 2244; /【GSP】药品到货拒收报告单GSP_ENTER_STORA
43、G_REC = 2245; /【GSP】药品入库记录GSP_BUY_BACK_REC = 2246; /【GSP】购进药品退出记录GSP_LOSE = 2247; /【GSP 】不合格药品报废销毁审批表GSP_LOSE1 = 2248; /【GSP 】不合格药品报表GSP_UNQUALIFIED_LOSE = 2249; /【GSP 】不合格药品报损审批表GSP_LOSE_REC = 2250; /【GSP】不合格药品报废销毁记录GSP_UNQUALIFIED = 2251; /【GSP 】不合格药品台帐GSP_CLEAR_CHECK = 2252; /【GSP】注射剂澄明度检查记录GSP_I
44、MPORT_CHECK_REC = 2253; /【GSP 】进口药品验收记录/销售与服务GSP_CLIENT_CHECK = 2260; /【GSP】顾客资格审核表GSP_ORDER_AFFIRM = 2261; /【GSP】定单确认表GSP_SALE_REC = 2262; /【GSP】药品销售记录GSP_DRIECT_REMOVEO = 2263; /【GSP】药品直调记录表GSP_SALE_REPLEVY = 2264; /【GSP 】销出药品追回记录GSP_BAD_FEEDBACK = 2265; /【GSP】药品不良反应报告表/储存与养护GSP_STORAGE_TYPE = 227
45、0; /【GSP】库内存放品种一览表GSP_VALIDITY_SIGN = 2271; /【GSP】近效期药品标志牌GSP_SALE_BACK_CHANG = 2272; /【GSP】已销出药品退 (换)货审批表GSP_SALE_BACK = 2273; /【GSP 】已销药品退货通知单GSP_SALE_BACK_REC = 2274; /【GSP】销出药品退回记录GSP_CMED_MAINTAIN = 2275; /【GSP】中药材/饮片在库养护记录表GSP_STORAGE_MAINTAIN = 2276; /【GSP 】库存药品养护检查记录GSP_STOP_SALE = 2277; /【GSP 】药品停售通知单GSP_AGIAN_CHECK = 2278; /【GSP】药品质量复检通知单GSP_MAINTAIN_QUALITY = 2279; /【GSP】药品养护质量报表GSP_MAINTAIN_FILE_CARD = 2280; /【GSP】药品养护档案卡GSP_UNCHAIN_STOP_SALE = 2281; /【GSP 】解除停售通知单GSP_PRESS_SALE =