
--SQLServer
--确保数据库名称正确

use [MicroERP]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vCWZZOne]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[vCWZZOne]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vDTDBOne]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[vDTDBOne]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBOM]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBOM]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBOMDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBOMDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBOMFile]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBOMFile]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBankAccount]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBankAccount]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBankAccountQC]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBankAccountQC]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBankInOutAccount]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBankInOutAccount]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBaoXiao]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBaoXiao]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillCGSH]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillCGSH]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillCGSHDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillCGSHDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillCGSQ]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillCGSQ]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillCGSQDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillCGSQDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillCGTH]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillCGTH]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillCGTHDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillCGTHDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillCGXJ]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillCGXJ]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillCGXJDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillCGXJDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDCCRK]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDCCRK]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDCCRKDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDCCRKDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTCK]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTCK]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTCKDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTCKDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTCP]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTCP]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTCPDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTCPDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTDB]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTDB]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTDBDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTDBDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTLL]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTLL]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTLLDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTLLDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTPD]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTPD]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTPDDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTPDDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTQC]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTQC]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTQCDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTQCDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTRK]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTRK]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTRKDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTRKDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTTL]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTTL]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillDTTLDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillDTTLDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillSCDD]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillSCDD]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillSCDDDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillSCDDDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillSCJY]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillSCJY]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillSCRW]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillSCRW]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillSCRWFeiYongDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillSCRWFeiYongDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillSCRWGongXuDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillSCRWGongXuDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillSCRWGoodsDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillSCRWGoodsDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillSCRWWorkerDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillSCRWWorkerDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillXSBJ]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillXSBJ]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillXSBJDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillXSBJDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillXSFH]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillXSFH]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillXSFHDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillXSFHDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillXSPOS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillXSPOS]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillXSTH]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillXSTH]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbBillXSTHDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbBillXSTHDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMChance]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMChance]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMChanceFollow]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMChanceFollow]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMChanceGoods]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMChanceGoods]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMComplain]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMComplain]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMContact]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMContact]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMContactLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMContactLog]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMContract]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMContract]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMContractGoods]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMContractGoods]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMContractPay]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMContractPay]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMPlan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMPlan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMReceive]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMReceive]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMService]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMService]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCRMTrack]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCRMTrack]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCar]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCar]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCarBaoXian]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCarBaoXian]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCarBaoYang]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCarBaoYang]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCarChuChe]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCarChuChe]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCarJiaYou]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCarJiaYou]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCarNianJian]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCarNianJian]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCarShiGu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCarShiGu]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCarWeiXiu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCarWeiXiu]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCarWeiZhang]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCarWeiZhang]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCompanyInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCompanyInfo]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCustomer]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCustomer]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbCustomerAccount]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbCustomerAccount]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbDepartment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbDepartment]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbDepot]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbDepot]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbDepotInOutAccount]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbDepotInOutAccount]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbDepotLocation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbDepotLocation]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbEmployee]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbEmployee]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbFuKuan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbFuKuan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbFuKuanDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbFuKuanDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZFrame]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZFrame]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZFrameDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZFrameDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZGFen]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZGFen]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZTable]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZTableDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZTableDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZTableJian]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZTableJian]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZTableJianDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZTableJianDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZTableTime]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZTableTime]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZTableTimeDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZTableTimeDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGZTax]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGZTax]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGongXu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGongXu]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGoods]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGoods]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGoodsQuantity]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGoodsQuantity]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbGoodsType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbGoodsType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRArchive]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRArchive]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRBaoGuan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRBaoGuan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRChengFa]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRChengFa]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRChiDao]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRChiDao]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRChuCha]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRChuCha]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRDiaoGang]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRDiaoGang]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRFuLi]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRFuLi]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRHeTong]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRHeTong]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRJiNengList]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRJiNengList]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRJiaBan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRJiaBan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRJiangLi]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRJiangLi]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRJineng]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRJineng]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRKuangGong]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRKuangGong]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRLiZhi]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRLiZhi]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRPXPlan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRPXPlan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRQingJia]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRQingJia]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRXiuJia]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRXiuJia]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRZP]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRZP]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRZPPlan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRZPPlan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRZaoTui]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRZaoTui]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbHRZhiCheng]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbHRZhiCheng]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbJXFlyCheck]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbJXFlyCheck]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbJXItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbJXItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbJXPC]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbJXPC]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbJXPZ]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbJXPZ]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbJXSS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbJXSS]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbJXType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbJXType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbKeMu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbKeMu]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbMyNote]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbMyNote]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbMyTranscation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbMyTranscation]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbPingZheng]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbPingZheng]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbPingZhengDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbPingZhengDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbSQL]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbSQL]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbSRZCType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbSRZCType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbShouKuan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbShouKuan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbShouKuanDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbShouKuanDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbSupplier]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbSupplier]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbSupplierAccount]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbSupplierAccount]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbUser]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbUser]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbUserAccess]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbUserAccess]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbUserGroup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbUserGroup]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbUserGroupAccess]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbUserGroupAccess]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbYingFu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbYingFu]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbYingFuQC]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbYingFuQC]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbYingShou]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbYingShou]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbYingShouQC]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbYingShouQC]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbYuSuan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbYuSuan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbYuSuanDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbYuSuanDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCAddRemoveType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCAddRemoveType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCCard]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCCard]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCChanQuan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCChanQuan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCJianXiu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCJianXiu]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCLocation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCLocation]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCMX]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCMX]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCUsedType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCUsedType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCWorkQuantity]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCWorkQuantity]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCZheJiu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCZheJiu]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCZheJiuType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCZheJiuType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCZhuanYi]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCZhuanYi]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZCZuLin]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZCZuLin]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbZhuanZhang]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbZhuanZhang]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbNews]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbNews]
GO

CREATE TABLE [dbo].[tbNews] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserID] [int] NULL ,
	[Title] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBOM] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[GoodsID] [int] NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[BOMName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBOMDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BOMID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBOMFile] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BOMID] [int] NULL ,
	[MiaoShu] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[FileType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[OnlyAdminView] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[SaveValue] [image] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBankAccount] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[AccountName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AccountNumber] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[YuE] [decimal](18, 2) NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBankAccountQC] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[AccountID] [int] NULL ,
	[YuE] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBankInOutAccount] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillTypeID] [int] NULL ,
	[BillID] [int] NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankAccountID] [int] NULL ,
	[PreviousPrice] [decimal](18, 2) NULL ,
	[InPrice] [decimal](18, 2) NULL ,
	[OutPrice] [decimal](18, 2) NULL ,
	[LastPrice] [decimal](18, 2) NULL ,
	[EmployeeID] [int] NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBaoXiao] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[ZhaiYao] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[Checker] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillCGSH] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[SupplierID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CGFS] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[FPLX] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JSLX] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsYF] [int] NULL ,
	[YFDID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillCGSHDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[SQDetailRowID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillCGSQ] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[PiZhunEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillCGSQDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[DQQuantity] [decimal](18, 2) NULL ,
	[SQQuantity] [decimal](18, 2) NULL ,
	[PFQuantity] [decimal](18, 2) NULL ,
	[RKQuantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillCGTH] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[SupplierID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillCGTHDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillCGXJ] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[SupplierID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[DHType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CGFS] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[FPLX] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JSLX] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillCGXJDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDCCRK] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[UNUnit] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CRTag] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDCCRKDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[DepotID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTCK] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTCKDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTCP] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[PiHao] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTCPDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTDB] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[OutDepotID] [int] NULL ,
	[InDepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTDBDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTLL] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTLLDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[SCRWDetailRowID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTPD] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTPDDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[AccountQuantity] [decimal](18, 2) NULL ,
	[PDQuantity] [decimal](18, 2) NULL ,
	[YKQuantity] [decimal](18, 2) NULL ,
	[YKPrice] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTQC] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTQCDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTRK] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTRKDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTTL] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillDTTLDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillSCDD] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomerID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[BaoZhuang] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[YunShuType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZhiXingType] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JHDian] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[JHDate] [smalldatetime] NULL ,
	[ExecuteStatus] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillSCDDDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[ExecuteStatus] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillSCJY] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[RWID] [int] NULL ,
	[HGQuantity] [decimal](18, 2) NULL ,
	[HGLu] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[NHGQuantity] [decimal](18, 2) NULL ,
	[JYResult] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillSCRW] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[DDID] [int] NULL ,
	[DDRowID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[DepartMentID] [int] NULL ,
	[KGDate] [smalldatetime] NULL ,
	[YJWGDate] [smalldatetime] NULL ,
	[SJWGDate] [smalldatetime] NULL ,
	[JinDu] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JSDate] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Weituo] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[WeituoContact] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillSCRWFeiYongDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[FYID] [int] NULL ,
	[FYPrice] [decimal](18, 2) NULL ,
	[ZhaiYao] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillSCRWGongXuDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GongXuID] [int] NULL ,
	[JHGS] [decimal](18, 2) NULL ,
	[SJGS] [decimal](18, 2) NULL ,
	[GSUnitPrice] [decimal](18, 2) NULL ,
	[GSPrice] [decimal](18, 2) NULL ,
	[CompleteEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillSCRWGoodsDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[JHYL] [decimal](18, 2) NULL ,
	[SJYL] [decimal](18, 2) NULL ,
	[YLUnitPrice] [decimal](18, 2) NULL ,
	[YLPrice] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillSCRWWorkerDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GongXuID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[TiChengPrice] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillType] (
	[ID] [int] NOT NULL ,
	[BillTypeName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillXSBJ] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomerID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[JHType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[XSFS] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[FPLX] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JSLX] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillXSBJDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillXSFH] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomerID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[XSFS] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[FPLX] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JSLX] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsYS] [int] NULL ,
	[YSDID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillXSFHDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillXSPOS] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillXSTH] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomerID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[DepotID] [int] NULL ,
	[TotalPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbBillXSTHDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMChance] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChanceDesc] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[FollowDays] [int] NULL ,
	[Mabylu] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CeLue] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[JingZheng] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomerID] [int] NULL ,
	[ContactID] [int] NULL ,
	[TeachMan] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[SaleStep] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChanceFrom] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMChanceFollow] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[FollowType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[FollowDate] [smalldatetime] NULL ,
	[FollowResult] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[NextDate] [smalldatetime] NULL ,
	[XianLevlel] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMChanceGoods] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMComplain] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CustomerID] [int] NULL ,
	[ChanceID] [int] NULL ,
	[ContractID] [int] NULL ,
	[RequestDate] [smalldatetime] NULL ,
	[RequestDesc] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ComplainType] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[RequestLevel] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[DealStatus] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[DepartMentID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[Reasons] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Solutions] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Resoults] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Feedbacks] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[GoodLevel] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsCallback] [smallint] NULL ,
	[Changes] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMContact] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CustomerID] [int] NULL ,
	[PName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[PSex] [nvarchar] (2) COLLATE Chinese_PRC_CI_AS NULL ,
	[Birthday] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[JobTitle] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[OfficeTelphone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MobileTelphone] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[MobileTelphones] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EMail] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[QQNumber] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[WeiXinNumber] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OtherContact] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Interests] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Relations] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remarks] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMContactLog] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ContactID] [int] NULL ,
	[Tag] [int] NULL ,
	[Content] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactDate] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMContract] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomerID] [int] NULL ,
	[ChanceID] [int] NULL ,
	[HTDesc] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[HTStatus] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[SignDate] [smalldatetime] NULL ,
	[SignLocation] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[SignJia] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[SignYi] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[FeiPrice] [decimal](18, 2) NULL ,
	[PrePrice] [decimal](18, 2) NULL ,
	[TaxPrice] [decimal](18, 2) NULL ,
	[ZhiPrice] [decimal](18, 2) NULL ,
	[WeiPrice] [decimal](18, 2) NULL ,
	[JHDate] [smalldatetime] NULL ,
	[JHLocation] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMContractGoods] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 0) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMContractPay] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[PayType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PayPercent] [decimal](18, 2) NULL ,
	[PayPrice] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMPlan] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[TimeType] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastPlanPrice] [decimal](18, 2) NULL ,
	[LastTruePrice] [decimal](18, 2) NULL ,
	[LastPercent] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastMemo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[NextPlanPrice] [decimal](18, 2) NULL ,
	[NextChange] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMReceive] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CustomerID] [int] NULL ,
	[ChanceID] [int] NULL ,
	[ContractID] [int] NULL ,
	[PayType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[PayDate] [smalldatetime] NULL ,
	[IsPutTicket] [smallint] NULL ,
	[AccountID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMService] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CustomerID] [int] NULL ,
	[ChanceID] [int] NULL ,
	[ContractID] [int] NULL ,
	[RequestDate] [smalldatetime] NULL ,
	[RequestDesc] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ServiceAddress] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[RequestLevel] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[DealStatus] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[DepartMentID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[Reasons] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Solutions] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Resoults] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Feedbacks] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[GoodLevel] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsCallback] [smallint] NULL ,
	[Changes] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCRMTrack] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CustomerID] [int] NULL ,
	[ChanceID] [int] NULL ,
	[ContractID] [int] NULL ,
	[TrackType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[TrackDate] [smalldatetime] NULL ,
	[Content] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCar] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChePaiHao] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[PinPai] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[XingHao] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[FaDongJi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CheJia] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[JiaShiYuan] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCarBaoXian] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CarID] [int] NULL ,
	[JinShouRen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[DanHao] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[GongSi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZhongLei] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[JinE] [decimal](18, 2) NULL ,
	[TouDate] [smalldatetime] NULL ,
	[DaoDate] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCarBaoYang] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CarID] [int] NULL ,
	[JinShouRen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[FaShengDate] [smalldatetime] NULL ,
	[XiuLiChang] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[XiangMu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FeiYong] [decimal](18, 2) NULL ,
	[LiCheng] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCarChuChe] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CarID] [int] NULL ,
	[ShiYou] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChuCheDate] [smalldatetime] NULL ,
	[ChuTime] [smalldatetime] NULL ,
	[HuiCheDate] [smalldatetime] NULL ,
	[HuiTime] [smalldatetime] NULL ,
	[YounCheRen] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SuiXingRen] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[JiaShiRen] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MuDi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LiCheng] [real] NULL ,
	[YouHao] [real] NULL ,
	[FeiYong] [real] NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCarJiaYou] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CarID] [int] NULL ,
	[JinShouRen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[YouQiZhan] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BiaoHao] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[BenCi] [decimal](18, 2) NULL ,
	[FaShengDate] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCarNianJian] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CarID] [int] NULL ,
	[JinShouRen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JianHao] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[CheGuanSuo] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[JianDate] [smalldatetime] NULL ,
	[DaoDate] [smalldatetime] NULL ,
	[FeiYong] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCarShiGu] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CarID] [int] NULL ,
	[Levels] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JiaShiRen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[DiDian] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FaShengDate] [smalldatetime] NULL ,
	[QingKong] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[WoFang] [decimal](18, 2) NULL ,
	[DuiFang] [decimal](18, 2) NULL ,
	[BaoXian] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCarWeiXiu] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CarID] [int] NULL ,
	[JinShouRen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[XiuLiChang] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ShiYou] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SongDate] [smalldatetime] NULL ,
	[QuDate] [smalldatetime] NULL ,
	[XiangMu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PeiJian] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FeiYong] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCarWeiZhang] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CarID] [int] NULL ,
	[JiaShiRen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[LeiXing] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[KouFen] [decimal](18, 2) NULL ,
	[FaKuan] [decimal](18, 2) NULL ,
	[DiDian] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FaShengDate] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCompanyInfo] (
	[ID] [int] NULL ,
	[CompanyName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Telphone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SerialNumber] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCustomer] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactName] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactTitle] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Telphone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fax] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[OpenBank] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AccountNumber] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[YSYE] [decimal](18, 2) NULL ,
	[Jifen] [decimal](18, 2) NULL ,
	[FenLu] [decimal](18, 2) NULL ,
	[TypeDesc] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[AreaDesc] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbCustomerAccount] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillTypeID] [int] NULL ,
	[BillID] [int] NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomerID] [int] NULL ,
	[PreviousPrice] [decimal](18, 2) NULL ,
	[InPrice] [decimal](18, 2) NULL ,
	[OutPrice] [decimal](18, 2) NULL ,
	[LastPrice] [decimal](18, 2) NULL ,
	[EmployeeID] [int] NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbDepartment] (
	[ID] [int] NOT NULL ,
	[TypeName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbDepot] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[DepotName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbDepotInOutAccount] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillTypeID] [int] NULL ,
	[BillID] [int] NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[DepotID] [int] NULL ,
	[SupplierID] [int] NULL ,
	[CustomerID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[PreviousQuantity] [decimal](18, 2) NULL ,
	[InUnitPrice] [decimal](18, 2) NULL ,
	[InQuantity] [decimal](18, 2) NULL ,
	[InPrice] [decimal](18, 2) NULL ,
	[OutUnitPrice] [decimal](18, 2) NULL ,
	[OutQuantity] [decimal](18, 2) NULL ,
	[OutPrice] [decimal](18, 2) NULL ,
	[LastQuantity] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbDepotLocation] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[LocationName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[DepotID] [int] NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbEmployee] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeName] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[TypeID] [int] NULL ,
	[JobName] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CardID] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[School] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Zhuanye] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Xueli] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Laiyuan] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[GangLevel] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Zhicheng] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HTStart] [smalldatetime] NULL ,
	[HTStop] [smalldatetime] NULL ,
	[SBNumber] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZaiStatus] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Minzu] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Lizhi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remarks] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbFuKuan] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[AccountID] [int] NULL ,
	[TypeID] [int] NULL ,
	[ZhaiYao] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbFuKuanDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[YFDID] [int] NULL ,
	[BCFK] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZFrame] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[FrameName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZFrameDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[FrameID] [int] NULL ,
	[ItemID] [int] NULL ,
	[Formula] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[FOrder] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZGFen] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[HJQJ] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[GFen] [decimal](18, 2) NULL ,
	[GPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZItem] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EditMode] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZTable] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[GZFrameID] [int] NULL ,
	[HJQJ] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Checker] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZTableDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[GZTableID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[ItemName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[FOrder] [int] NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZTableJian] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[HJQJ] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Checker] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZTableJianDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[GZTableID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZTableTime] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[HJQJ] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Checker] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZTableTimeDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[GZTableID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[GongxuID] [int] NULL ,
	[UnitPrice] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGZTax] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[DownPrice] [decimal](18, 2) NULL ,
	[UpPrice] [decimal](18, 2) NULL ,
	[Tax] [decimal](18, 2) NULL ,
	[Kouchu] [decimal](18, 2) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGongXu] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[GXName] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[GongShi] [decimal](18, 2) NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGoods] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[TypeID] [int] NULL ,
	[Code] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[BarCode] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[BarCodeType] [int] NULL ,
	[GoodsName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[SpellCode] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Standard] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Unit] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CostUnitPrice] [decimal](18, 2) NULL ,
	[Provider] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[UpQty] [decimal](18, 2) NULL ,
	[DownQty] [decimal](18, 2) NULL ,
	[DefaultDepotID] [int] NULL ,
	[Location] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CanJ] [decimal](18, 2) NULL ,
	[CanX] [decimal](18, 2) NULL ,
	[P1] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[P2] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[P3] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Caizhi] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGoodsQuantity] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[DepotID] [int] NULL ,
	[GoodsID] [int] NULL ,
	[Quantity] [decimal](18, 2) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbGoodsType] (
	[ID] [int] NOT NULL ,
	[TypeName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRArchive] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Depot] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[WeiUnit] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[InDate] [smalldatetime] NULL ,
	[OutDate] [smalldatetime] NULL ,
	[Shenfen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Status] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[PriceDate] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRBaoGuan] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[CardType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[PutUnit] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CardCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PutDate] [smalldatetime] NULL ,
	[NoEnableDate] [smalldatetime] NULL ,
	[LastCheckDate] [smalldatetime] NULL ,
	[NextCheckDate] [smalldatetime] NULL ,
	[BGEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRChengFa] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[JLReason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[JLType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[JLFangshi] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[JLPrice] [decimal](18, 2) NULL ,
	[Checker] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRChiDao] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[Reason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[StartDate] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRChuCha] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[Resons] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[StartDate] [smalldatetime] NULL ,
	[StopDate] [smalldatetime] NULL ,
	[Days] [decimal](18, 2) NULL ,
	[MuDi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[JiaoTong] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[BuTie] [decimal](18, 2) NULL ,
	[FeiYong] [decimal](18, 2) NULL ,
	[JieKuan] [decimal](18, 2) NULL ,
	[TuiKuan] [decimal](18, 2) NULL ,
	[BaoXiao] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRDiaoGang] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[OldDepartment] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OldLevel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OldJobName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[NewDepartment] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[NewDepartmentID] [int] NULL ,
	[NewLevel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[NewJobName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRFuLi] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[FLType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[FLPrice] [decimal](18, 2) NULL ,
	[FLStart] [smalldatetime] NULL ,
	[FLStop] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRHeTong] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[HTType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HTCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HTStart] [smalldatetime] NULL ,
	[HTStop] [smalldatetime] NULL ,
	[HTEnd] [smalldatetime] NULL ,
	[EndReason] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRJiNengList] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[JinengID] [int] NULL ,
	[GetJiType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CardNumber] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[GetJiDate] [smalldatetime] NULL ,
	[YingYong] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRJiaBan] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[Reason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[StartDate] [smalldatetime] NULL ,
	[StopDate] [smalldatetime] NULL ,
	[Days] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRJiangLi] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[JLReason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[JLType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[JLFangshi] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[JLPrice] [decimal](18, 2) NULL ,
	[Checker] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRJineng] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[JiName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRKuangGong] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[Reason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[StartDate] [smalldatetime] NULL ,
	[StopDate] [smalldatetime] NULL ,
	[Days] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRLiZhi] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[EmployeeName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[OldDepartment] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OldLevel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OldJobName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Lizhi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRPXPlan] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[DepartmentID] [int] NULL ,
	[Title] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Duixiang] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Mudi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Didian] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Teacher] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Renshu] [int] NULL ,
	[Price] [decimal](18, 2) NULL ,
	[StartDate] [smalldatetime] NULL ,
	[StopDate] [smalldatetime] NULL ,
	[Planstatus] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Xiaoguo] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRQingJia] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[QType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[Resons] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[StartDate] [smalldatetime] NULL ,
	[StopDate] [smalldatetime] NULL ,
	[Days] [decimal](18, 2) NULL ,
	[Checker] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRXiuJia] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[Resons] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[StartDate] [smalldatetime] NULL ,
	[StopDate] [smalldatetime] NULL ,
	[Days] [decimal](18, 2) NULL ,
	[Checker] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRZP] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[PlanID] [int] NULL ,
	[MSDate] [smalldatetime] NULL ,
	[GWGZ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[PName] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[PSex] [nvarchar] (5) COLLATE Chinese_PRC_CI_AS NULL ,
	[PAge] [int] NULL ,
	[PCardID] [nvarchar] (18) COLLATE Chinese_PRC_CI_AS NULL ,
	[PAddress] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PContact] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[School] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Zhuanye] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Xueli] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Jingyan] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Hunyin] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Shengao] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Tizhong] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Waimao] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Daiyu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DepartmentDesc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HRDesc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZPResoult] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Baodaodate] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRZPPlan] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[DepartmentID] [int] NULL ,
	[GWGZ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Renshu] [int] NULL ,
	[RSMan] [int] NULL ,
	[RSWomen] [int] NULL ,
	[Zhuanye] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Xueli] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Nianling] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Jingyan] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Hunyin] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Shengao] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Tizhong] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Waimao] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Hetongqi] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Daiyu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Zhize] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Daogangdate] [smalldatetime] NULL ,
	[Planstatus] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRZaoTui] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[Reason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[StartDate] [smalldatetime] NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHRZhiCheng] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[Renzheng] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Zhuanye] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Zhicheng] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Pingunit] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Faunit] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BookCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PutDate] [smalldatetime] NULL ,
	[Foreigns] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Computers] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Sciences] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbJXFlyCheck] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[ItemID] [int] NULL ,
	[CheckValue] [decimal](18, 2) NULL ,
	[Resons] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[KPEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbJXItem] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[TypeID] [int] NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[JXPercent] [decimal](18, 2) NULL ,
	[FullScore] [decimal](18, 2) NULL ,
	[ObjectUnit] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ObjectValue] [decimal](18, 2) NULL ,
	[ScoreRule] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[FOrder] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbJXPC] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[PCDateType] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[PCStatus] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[PCAre] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[PCTitle] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbJXPZ] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[PCID] [int] NULL ,
	[EmployeeID] [int] NULL ,
	[ItemID] [int] NULL ,
	[ItemValue] [decimal](18, 2) NULL ,
	[KPEmployee] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[KPEmployeePercent] [decimal](18, 2) NULL ,
	[KPValue] [decimal](18, 2) NULL ,
	[ItemEndValue] [decimal](18, 2) NULL ,
	[EndValue] [decimal](18, 2) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbJXSS] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EmployeeID] [int] NULL ,
	[PCID] [int] NULL ,
	[SSContent] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CLContent] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbJXType] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[JXTypeName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[JXPercent] [decimal](18, 2) NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbKeMu] (
	[ID] [int] NOT NULL ,
	[ItemCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemValue] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentID] [int] NULL ,
	[KMType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsSystem] [int] NULL ,
	[IsDeleted] [int] NULL ,
	[ZZID] [int] NULL ,
	[YEFX] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JFYE] [decimal](18, 2) NULL ,
	[DFYE] [decimal](18, 2) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbMyNote] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserID] [int] NULL ,
	[Tag] [smallint] NULL ,
	[Content] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbMyTranscation] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserID] [int] NULL ,
	[Title] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[OptDate] [smalldatetime] NULL ,
	[Content] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[OptTag] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbPingZheng] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[PingZhengZi] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[PingZhengHao] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DanJuShu] [int] NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[CheckEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JiZhangEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsBlue] [int] NULL ,
	[ZhaiYao] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[JinE] [decimal](18, 2) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbPingZhengDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[PingZhengID] [int] NULL ,
	[ZhaiYao] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZZID] [int] NULL ,
	[KMID] [int] NULL ,
	[JieFang] [decimal](18, 2) NULL ,
	[DaiFang] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[SBJC] [decimal](18, 2) NULL ,
	[BBJC] [decimal](18, 2) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbSQL] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[NTag] [int] NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbSRZCType] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[TypeName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[TypeTag] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbShouKuan] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[AccountID] [int] NULL ,
	[TypeID] [int] NULL ,
	[ZhaiYao] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbShouKuanDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[YSDID] [int] NULL ,
	[BCSK] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbSupplier] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactName] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactTitle] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Telphone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fax] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[OpenBank] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AccountNumber] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[YFYE] [decimal](18, 2) NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbSupplierAccount] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillTypeID] [int] NULL ,
	[BillID] [int] NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[SupplierID] [int] NULL ,
	[PreviousPrice] [decimal](18, 2) NULL ,
	[InPrice] [decimal](18, 2) NULL ,
	[OutPrice] [decimal](18, 2) NULL ,
	[LastPrice] [decimal](18, 2) NULL ,
	[EmployeeID] [int] NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbUser] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[LoginName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[LoginPassword] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[TrueName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GroupID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbUserAccess] (
	[ID] [int] NOT NULL ,
	[ParentID] [int] NULL ,
	[ParentName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Code] [int] NULL ,
	[TypeName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbUserGroup] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[GroupName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbUserGroupAccess] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[GroupID] [int] NULL ,
	[AccessID] [int] NULL ,
	[IsAccess] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbYingFu] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[SupplierID] [int] NULL ,
	[ZhaiYao] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[YPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbYingFuQC] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[SupplierID] [int] NULL ,
	[ZhaiYao] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbYingShou] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[CustomerID] [int] NULL ,
	[ZhaiYao] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[YPrice] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbYingShouQC] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[CustomerID] [int] NULL ,
	[ZhaiYao] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbYuSuan] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[ZhaiYao] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[Checker] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbYuSuanDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillID] [int] NULL ,
	[YNItem] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[YNPrice] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCAddRemoveType] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemValue] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[TypeTag] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCCard] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[RuZhangDate] [smalldatetime] NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[BarCode] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[BarCodeType] [int] NULL ,
	[GBCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZCName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Standard] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Unit] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddRemoveID] [int] NULL ,
	[ChanQuanID] [int] NULL ,
	[LocationID] [int] NULL ,
	[TypeID] [int] NULL ,
	[UsedTypeID] [int] NULL ,
	[ZheJiuID] [int] NULL ,
	[DepartmentID] [int] NULL ,
	[ManagerName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[OldValue] [decimal](18, 2) NULL ,
	[YearZheJiuLu] [decimal](18, 2) NULL ,
	[MonthZheJiuLu] [decimal](18, 2) NULL ,
	[MonthZheJiuValue] [decimal](18, 2) NULL ,
	[YuJiYear] [decimal](18, 2) NULL ,
	[ShangKeYear] [decimal](18, 2) NULL ,
	[YuJiCanZhiLu] [decimal](18, 2) NULL ,
	[YuJiCanValue] [decimal](18, 2) NULL ,
	[UnitWorkZheJiuValue] [decimal](18, 2) NULL ,
	[WorkUnit] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[YuJiWorkTotalQuantity] [decimal](18, 2) NULL ,
	[LeiJiWorkQuantity] [decimal](18, 2) NULL ,
	[ShengYuWorkQuantity] [decimal](18, 2) NULL ,
	[LeiJiZheJiuValue] [decimal](18, 2) NULL ,
	[JingValue] [decimal](18, 2) NULL ,
	[JianValueZhunBei] [decimal](18, 2) NULL ,
	[LeiJiJianValue] [decimal](18, 2) NULL ,
	[AccountJingValue] [decimal](18, 2) NULL ,
	[ChangeYuanYin] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[RemoveYuanYin] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployeeID] [int] NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[IsRemoved] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCChanQuan] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemValue] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCJianXiu] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CardID] [int] NULL ,
	[JinShouRen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[XiuLiChang] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ShiYou] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[SongDate] [smalldatetime] NULL ,
	[QuDate] [smalldatetime] NULL ,
	[XiangMu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PeiJian] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[FeiYong] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCLocation] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemValue] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCMX] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CardID] [int] NULL ,
	[AddRemoveTypeID] [int] NULL ,
	[ChangeYuanYin] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployeeID] [int] NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCType] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemValue] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCUsedType] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemValue] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCWorkQuantity] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[HJQJ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CardID] [int] NULL ,
	[LeiJiQuantity] [decimal](18, 2) NULL ,
	[Quantity] [decimal](18, 2) NULL ,
	[LastQuantity] [decimal](18, 2) NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCZheJiu] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[HJQJ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CardID] [int] NULL ,
	[ZheJiuID] [int] NULL ,
	[MonthZheJiuValue] [decimal](18, 2) NULL ,
	[UnitWorkZheJiuValue] [decimal](18, 2) NULL ,
	[WorkQuantity] [decimal](18, 2) NULL ,
	[WorkValue] [decimal](18, 2) NULL ,
	[ZheJiuValue] [decimal](18, 2) NULL ,
	[CreateEmployeeID] [int] NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCZheJiuType] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemValue] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDeleted] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCZhuanYi] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CardID] [int] NULL ,
	[OldLocation] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OldDepartment] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OldManager] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[OptDate] [smalldatetime] NULL ,
	[NewLocation] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[NewDepartment] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[NewDepartmentID] [int] NULL ,
	[NewManager] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CheckManager] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZCZuLin] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[CardID] [int] NULL ,
	[JinShouRen] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZuLinFang] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[SunHao] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[SongDate] [smalldatetime] NULL ,
	[QuDate] [smalldatetime] NULL ,
	[FeiLu] [decimal](18, 2) NULL ,
	[TianShu] [decimal](18, 2) NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL ,
	[Remarks] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbZhuanZhang] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BillCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmployeeID] [int] NULL ,
	[OutAccountID] [int] NULL ,
	[InAccountID] [int] NULL ,
	[ZhaiYao] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [decimal](18, 2) NULL ,
	[CreateEmployee] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateDate] [smalldatetime] NULL 
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbBOM] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBOM] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBOMDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBOMDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBOMFile] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBOMFile] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBankAccount] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBankAccount] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBankAccountQC] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBankAccountQC] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBankInOutAccount] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBankInOutAccount] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBaoXiao] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBaoXiao] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillCGSH] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillCGSH] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillCGSHDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillCGSHDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillCGSQ] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillCGSQ] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillCGSQDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillCGSQDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillCGTH] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillCGTH] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillCGTHDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillCGTHDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillCGXJ] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillCGXJ] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillCGXJDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillCGXJDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDCCRK] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDCCRK] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDCCRKDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDCCRKDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTCK] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTCK] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTCKDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTCKDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTCP] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTCP] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTCPDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTCPDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTDB] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTDB] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTDBDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTDBDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTLL] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTLL] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTLLDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTLLDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTPD] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTPD] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTPDDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTPDDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTQC] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTQC] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTQCDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTQCDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTRK] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTRK] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTRKDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTRKDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTTL] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTTL] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillDTTLDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillDTTLDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillSCDD] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillSCDD] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillSCDDDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillSCDDDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillSCJY] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillSCJY] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillSCRW] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillSCRW] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillSCRWFeiYongDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillSCRWFeiYongDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillSCRWGongXuDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillSCRWGongXuDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillSCRWGoodsDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillSCRWGoodsDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillSCRWWorkerDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillSCRWWorkerDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillType] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillType] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillXSBJ] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillXSBJ] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillXSBJDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillXSBJDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillXSFH] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillXSFH] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillXSFHDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillXSFHDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillXSPOS] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillXSPOS] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillXSTH] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillXSTH] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbBillXSTHDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbBillXSTHDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMChance] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMChance] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMChanceFollow] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMChanceFollow] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMChanceGoods] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMChanceGoods] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMComplain] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMComplain] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMContact] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMContact] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMContactLog] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMContactLog] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMContract] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMContract] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMContractGoods] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMContractGoods] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMContractPay] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMContractPay] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMPlan] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMPlan] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMReceive] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMReceive] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMService] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMService] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCRMTrack] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCRMTrack] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCar] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCar] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCarBaoXian] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCarBaoXian] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCarBaoYang] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCarBaoYang] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCarChuChe] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCarChuChe] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCarJiaYou] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCarJiaYou] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCarNianJian] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCarNianJian] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCarShiGu] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCarShiGu] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCarWeiXiu] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCarWeiXiu] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCarWeiZhang] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCarWeiZhang] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCustomer] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCustomer] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbCustomerAccount] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbCustomerAccount] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbDepartment] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbDepartment] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbDepot] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbDepot] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbDepotInOutAccount] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbDepotInOutAccount] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbDepotLocation] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbDepotLocation] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbEmployee] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbEmployee] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbFuKuan] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbFuKuan] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbFuKuanDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbFuKuanDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZFrame] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZFrame] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZFrameDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZFrameDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZGFen] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZGFen] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZItem] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZItem] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZTable] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZTable] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZTableDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZTableDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZTableJian] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZTableJian] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZTableJianDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZTableJianDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZTableTime] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZTableTime] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZTableTimeDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZTableTimeDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGZTax] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGZTax] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGongXu] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGongXu] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGoods] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGoods] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGoodsQuantity] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGoodsQuantity] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbGoodsType] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbGoodsType] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRArchive] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRArchive] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRBaoGuan] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRBaoGuan] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRChengFa] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRChengFa] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRChiDao] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRChiDao] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRChuCha] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRChuCha] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRDiaoGang] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRDiaoGang] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRFuLi] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRFuLi] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRHeTong] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRHeTong] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRJiNengList] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRJiNengList] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRJiaBan] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRJiaBan] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRJiangLi] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRJiangLi] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRJineng] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRJineng] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRKuangGong] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRKuangGong] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRLiZhi] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRLiZhi] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRPXPlan] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRPXPlan] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRQingJia] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRQingJia] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRXiuJia] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRXiuJia] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRZP] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRZP] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRZPPlan] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRZPPlan] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRZaoTui] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRZaoTui] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbHRZhiCheng] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbHRZhiCheng] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbJXFlyCheck] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbJXFlyCheck] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbJXItem] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbJXItem] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbJXPC] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbJXPC] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbJXPZ] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbJXPZ] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbJXSS] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbJXSS] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbJXType] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbJXType] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbKeMu] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbKeMu] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbMyNote] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbMyNote] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbMyTranscation] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbMyTranscation] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbPingZheng] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbPingZheng] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbPingZhengDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbPingZhengDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbSQL] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbSQL] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbSRZCType] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbSRZCType] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbShouKuan] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbShouKuan] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbShouKuanDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbShouKuanDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbSupplier] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbSupplier] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbSupplierAccount] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbSupplierAccount] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbUser] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbUser] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbUserAccess] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbUserAccess] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbUserGroup] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbUserGroup] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbUserGroupAccess] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbUserGroupAccess] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbYingFu] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbYingFu] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbYingFuQC] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbYingFuQC] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbYingShou] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbYingShou] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbYingShouQC] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbYingShouQC] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbYuSuan] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbYuSuan] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbYuSuanDetail] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbYuSuanDetail] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCAddRemoveType] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCAddRemoveType] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCCard] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCCard] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCChanQuan] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCChanQuan] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCJianXiu] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCJianXiu] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCLocation] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCLocation] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCMX] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCMX] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCType] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCType] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCUsedType] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCUsedType] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCWorkQuantity] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCWorkQuantity] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCZheJiu] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCZheJiu] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCZheJiuType] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCZheJiuType] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCZhuanYi] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCZhuanYi] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZCZuLin] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZCZuLin] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbZhuanZhang] WITH NOCHECK ADD 
	CONSTRAINT [PK_tbZhuanZhang] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tbNews] ADD 
	CONSTRAINT [PK_tbNews] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

CREATE VIEW dbo.vCWZZOne
AS
SELECT dbo.tbZhuanZhang.*, dbo.tbBankAccount.AccountName AS OutAccountName, 
      dbo.tbEmployee.EmployeeName AS EmployeeName
FROM dbo.tbZhuanZhang INNER JOIN
      dbo.tbBankAccount ON 
      dbo.tbZhuanZhang.OutAccountID = dbo.tbBankAccount.ID INNER JOIN
      dbo.tbEmployee ON dbo.tbZhuanZhang.EmployeeID = dbo.tbEmployee.ID

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

CREATE VIEW dbo.vDTDBOne
AS
SELECT dbo.tbBillDTDB.*, dbo.tbDepot.DepotName AS OutDepotName, 
      dbo.tbEmployee.EmployeeName AS EmployeeName
FROM dbo.tbBillDTDB INNER JOIN
      dbo.tbEmployee ON dbo.tbBillDTDB.EmployeeID = dbo.tbEmployee.ID INNER JOIN
      dbo.tbDepot ON dbo.tbBillDTDB.OutDepotID = dbo.tbDepot.ID

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


--确保管理员组ID为1
insert into tbUserGroup(GroupName,Remark) values('管理员组','具备所有权限')
insert into tbUser(LoginName,LoginPassword,TrueName,IsDeleted,Remark,GroupID) values('admin','admin','管理员',0,'系统管理员',1)
insert into tbDepartment(ID,TypeName,ParentID) values(1,'所有部门',0)
insert into tbGoodsType(ID,TypeName,ParentID) values(1,'所有分类',0)
--会计科目,手动删除前六行中NULL两侧单引号
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(1,'1000','资产类',0,'资产类分类',1,0,0,NULL,0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(2,'2000','负债类',0,'负债类分类',1,0,0,NULL,0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(3,'3000','共同类',0,'共同类分类',1,0,0,NULL,0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(4,'4000','所有者权益类',0,'所有者权益类分类',1,0,0,NULL,0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(5,'5000','成本类',0,'成本类分类',1,0,0,NULL,0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(6,'6000','损益类',0,'损益类分类',1,0,0,NULL,0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(7,'1001','库存现金',1,'资产类',1,0,7,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(8,'1002','银行存款',1,'资产类',1,0,8,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(9,'1003','存放中央银行款项',1,'资产类',1,0,9,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(10,'1011','存放同业',1,'资产类',1,0,10,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(11,'1012','其他货币资金',1,'资产类',1,0,11,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(12,'1021','结算备付金',1,'资产类',1,0,12,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(13,'1031','存出保证金',1,'资产类',1,0,13,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(14,'1101','交易性金融资产',1,'资产类',1,0,14,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(15,'1111','买入返售金融资产',1,'资产类',1,0,15,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(16,'1121','应收票据',1,'资产类',1,0,16,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(17,'1122','应收账款',1,'资产类',1,0,17,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(18,'1123','预付账款',1,'资产类',1,0,18,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(19,'1131','应收股利',1,'资产类',1,0,19,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(20,'1132','应收利息',1,'资产类',1,0,20,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(21,'1201','应收代位追偿款',1,'资产类',1,0,21,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(22,'1211','应收分保账款',1,'资产类',1,0,22,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(23,'1212','应收分保合同准备金',1,'资产类',1,0,23,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(24,'1221','其他应收款',1,'资产类',1,0,24,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(25,'1231','坏账准备',1,'资产类',1,0,25,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(26,'1301','贴现资产',1,'资产类',1,0,26,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(27,'1302','拆出资金',1,'资产类',1,0,27,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(28,'1303','贷款',1,'资产类',1,0,28,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(29,'1304','贷款损失准备',1,'资产类',1,0,29,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(30,'1311','代理兑付证券',1,'资产类',1,0,30,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(31,'1321','代理业务资产',1,'资产类',1,0,31,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(32,'1401','材料采购',1,'资产类',1,0,32,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(33,'1402','在途物资',1,'资产类',1,0,33,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(34,'1403','原材料',1,'资产类',1,0,34,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(35,'1404','材料成本差异',1,'资产类',1,0,35,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(36,'1405','库存商品',1,'资产类',1,0,36,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(37,'1406','发出商品',1,'资产类',1,0,37,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(38,'1407','商品进销差价',1,'资产类',1,0,38,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(39,'1408','委托加工物资',1,'资产类',1,0,39,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(40,'1411','周转材料',1,'资产类',1,0,40,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(41,'1421','消耗性生物资产',1,'资产类',1,0,41,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(42,'1431','贵金属',1,'资产类',1,0,42,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(43,'1441','抵债资产',1,'资产类',1,0,43,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(44,'1451','损余物资',1,'资产类',1,0,44,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(45,'1461','融资租赁资产',1,'资产类',1,0,45,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(46,'1471','存货跌价准备',1,'资产类',1,0,46,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(47,'1501','持有至到期投资',1,'资产类',1,0,47,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(48,'1502','持有至到期投资减值准备',1,'资产类',1,0,48,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(49,'1503','可供出售金融资产',1,'资产类',1,0,49,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(50,'1511','长期股权投资',1,'资产类',1,0,50,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(51,'1512','长期股权投资减值准备',1,'资产类',1,0,51,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(52,'1521','投资性房地产',1,'资产类',1,0,52,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(53,'1531','长期应收款',1,'资产类',1,0,53,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(54,'1532','未实现融资收益',1,'资产类',1,0,54,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(55,'1541','存出资本保证金',1,'资产类',1,0,55,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(56,'1601','固定资产',1,'资产类',1,0,56,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(57,'1602','累计折旧',1,'资产类',1,0,57,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(58,'1603','固定资产减值准备',1,'资产类',1,0,58,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(59,'1604','在建工程',1,'资产类',1,0,59,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(60,'1605','工程物资',1,'资产类',1,0,60,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(61,'1606','固定资产清理',1,'资产类',1,0,61,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(62,'1611','未担保余值',1,'资产类',1,0,62,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(63,'1621','生产性生物资产',1,'资产类',1,0,63,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(64,'1622','生产性生物资产累计折旧',1,'资产类',1,0,64,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(65,'1623','公益性生物资产',1,'资产类',1,0,65,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(66,'1631','油气资产',1,'资产类',1,0,66,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(67,'1632','累计折耗',1,'资产类',1,0,67,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(68,'1701','无形资产',1,'资产类',1,0,68,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(69,'1702','累计摊销',1,'资产类',1,0,69,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(70,'1703','无形资产减值准备',1,'资产类',1,0,70,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(71,'1711','商誉',1,'资产类',1,0,71,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(72,'1801','长期待摊费用',1,'资产类',1,0,72,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(73,'1811','递延所得税资产',1,'资产类',1,0,73,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(74,'1821','独立账户资产',1,'资产类',1,0,74,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(75,'1901','待处理财产损溢',1,'资产类',1,0,75,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(76,'2001','短期借款',2,'负债类',1,0,76,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(77,'2002','存入保证金',2,'负债类',1,0,77,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(78,'2003','拆入资金',2,'负债类',1,0,78,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(79,'2004','向中央银行借款',2,'负债类',1,0,79,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(80,'2011','吸收存款',2,'负债类',1,0,80,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(81,'2012','同业存放',2,'负债类',1,0,81,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(82,'2021','贴现负债',2,'负债类',1,0,82,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(83,'2101','交易性金融负债',2,'负债类',1,0,83,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(84,'2111','卖出回购金融资产款',2,'负债类',1,0,84,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(85,'2201','应付票据',2,'负债类',1,0,85,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(86,'2202','应付账款',2,'负债类',1,0,86,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(87,'2203','预收账款',2,'负债类',1,0,87,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(88,'2211','应付职工薪酬',2,'负债类',1,0,88,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(89,'2221','应交税费',2,'负债类',1,0,89,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(90,'2231','应付利息',2,'负债类',1,0,90,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(91,'2232','应付股利',2,'负债类',1,0,91,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(92,'2241','其他应付款',2,'负债类',1,0,92,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(93,'2251','应付保单红利',2,'负债类',1,0,93,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(94,'2261','应付分保账款',2,'负债类',1,0,94,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(95,'2311','代理买卖证券款',2,'负债类',1,0,95,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(96,'2312','代理承销证券款',2,'负债类',1,0,96,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(97,'2313','代理兑付证券款',2,'负债类',1,0,97,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(98,'2314','代理业务负债',2,'负债类',1,0,98,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(99,'2401','递延收益',2,'负债类',1,0,99,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(100,'2501','长期借款',2,'负债类',1,0,100,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(101,'2502','应付债券',2,'负债类',1,0,101,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(102,'2601','未到期责任准备金',2,'负债类',1,0,102,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(103,'2602','保险责任准备金',2,'负债类',1,0,103,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(104,'2611','保户储金',2,'负债类',1,0,104,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(105,'2621','独立账户负债',2,'负债类',1,0,105,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(106,'2701','长期应付款',2,'负债类',1,0,106,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(107,'2702','未确认融资费用',2,'负债类',1,0,107,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(108,'2711','专项应付款',2,'负债类',1,0,108,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(109,'2801','预计负债',2,'负债类',1,0,109,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(110,'2901','递延所得税负债',2,'负债类',1,0,110,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(111,'3001','清算资金往来',3,'共同类',1,0,111,'未定义',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(112,'3002','货币兑换',3,'共同类',1,0,112,'未定义',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(113,'3101','衍生工具',3,'共同类',1,0,113,'未定义',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(114,'3201','套期工具',3,'共同类',1,0,114,'未定义',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(115,'3202','被套期项目',3,'共同类',1,0,115,'未定义',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(116,'4001','实收资本',4,'所有者权益类',1,0,116,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(117,'4002','资本公积',4,'所有者权益类',1,0,117,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(118,'4101','盈余公积',4,'所有者权益类',1,0,118,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(119,'4102','一般风险准备',4,'所有者权益类',1,0,119,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(120,'4103','本年利润',4,'所有者权益类',1,0,120,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(121,'4104','利润分配',4,'所有者权益类',1,0,121,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(122,'4201','库存股',4,'所有者权益类',1,0,122,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(123,'5001','生产成本',5,'成本类',1,0,123,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(124,'5101','制造费用',5,'成本类',1,0,124,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(125,'5201','劳务成本',5,'成本类',1,0,125,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(126,'5301','研发支出',5,'成本类',1,0,126,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(127,'5401','工程施工',5,'成本类',1,0,127,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(128,'5402','工程结算',5,'成本类',1,0,128,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(129,'5403','机械作业',5,'成本类',1,0,129,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(130,'6001','主营业务收入',6,'损益类',1,0,130,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(131,'6011','利息收入',6,'损益类',1,0,131,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(132,'6021','手续费及佣金收入',6,'损益类',1,0,132,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(133,'6031','保费收入',6,'损益类',1,0,133,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(134,'6041','租赁收入',6,'损益类',1,0,134,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(135,'6051','其他业务收入',6,'损益类',1,0,135,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(136,'6061','汇兑损益',6,'损益类',1,0,136,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(137,'6101','公允价值变动损益',6,'损益类',1,0,137,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(138,'6111','投资收益',6,'损益类',1,0,138,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(139,'6201','摊回保险责任准备金',6,'损益类',1,0,139,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(140,'6202','摊回赔付支出',6,'损益类',1,0,140,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(141,'6203','摊回分保费用',6,'损益类',1,0,141,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(142,'6301','营业外收入',6,'损益类',1,0,142,'贷',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(143,'6401','主营业务成本',6,'损益类',1,0,143,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(144,'6402','其他业务成本',6,'损益类',1,0,144,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(145,'6403','营业税金及附加',6,'损益类',1,0,145,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(146,'6411','利息支出',6,'损益类',1,0,146,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(147,'6421','手续费及佣金支出',6,'损益类',1,0,147,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(148,'6501','提取未到期责任准备金',6,'损益类',1,0,148,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(149,'6502','提取保险责任准备金',6,'损益类',1,0,149,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(150,'6511','赔付支出',6,'损益类',1,0,150,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(151,'6521','保单红利支出',6,'损益类',1,0,151,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(152,'6531','退保金',6,'损益类',1,0,152,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(153,'6541','分出保费',6,'损益类',1,0,153,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(154,'6542','分保费用',6,'损益类',1,0,154,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(155,'6601','营业费用',6,'损益类',1,0,155,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(156,'6602','管理费用',6,'损益类',1,0,156,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(157,'6603','财务费用',6,'损益类',1,0,157,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(158,'6604','勘探费用',6,'损益类',1,0,158,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(159,'6701','资产减值损失',6,'损益类',1,0,159,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(160,'6711','营业外支出',6,'损益类',1,0,160,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(161,'6801','所得税费用',6,'损益类',1,0,161,'借',0,0)
insert into tbKeMu(ID,ItemCode,ItemValue,ParentID,KMType,IsSystem,IsDeleted,ZZID,YEFX,JFYE,DFYE) values(162,'6901','以前年度损益调整',6,'损益类',1,0,162,'借',0,0)
--权限模块
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(1,0,'权限模块',0,'权限模块')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(2,1,'是否使用该模块',100,'生产加工管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(3,1,'是否使用该模块',200,'购销仓储管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(4,1,'是否使用该模块',300,'车辆管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(5,1,'是否使用该模块',400,'应收应付管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(6,1,'是否使用该模块',500,'总账管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(7,1,'是否使用该模块',600,'固定资产管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(8,1,'是否使用该模块',700,'基础资料')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(9,2,'生产加工管理权限',101,'生产订单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(10,2,'生产加工管理权限',102,'生产计划单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(11,2,'生产加工管理权限',103,'生产进度控制')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(12,2,'生产加工管理权限',104,'完工核算')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(13,2,'生产加工管理权限',106,'生产报表')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(14,3,'购销仓储管理权限',201,'采购申请单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(15,3,'购销仓储管理权限',202,'采购入库单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(16,3,'购销仓储管理权限',203,'采购退货单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(17,3,'购销仓储管理权限',204,'产品入库单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(18,3,'购销仓储管理权限',205,'销售出库单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(19,3,'购销仓储管理权限',206,'销售退货单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(20,3,'购销仓储管理权限',207,'内部支领单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(21,3,'购销仓储管理权限',208,'支领退还单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(22,3,'购销仓储管理权限',209,'库存盘点单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(23,3,'购销仓储管理权限',210,'仓库调拨单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(24,3,'购销仓储管理权限',211,'其它入库单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(25,3,'购销仓储管理权限',212,'其它出库单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(26,3,'购销仓储管理权限',213,'库存期初结转单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(27,4,'车辆运输管理权限',301,'出车记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(28,4,'车辆运输管理权限',302,'加油记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(29,4,'车辆运输管理权限',303,'维修记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(30,4,'车辆运输管理权限',304,'保养记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(31,4,'车辆运输管理权限',305,'违章记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(32,4,'车辆运输管理权限',306,'事故记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(33,4,'车辆运输管理权限',307,'年检记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(34,4,'车辆运输管理权限',308,'保险记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(35,4,'车辆运输管理权限',309,'车管报表')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(36,5,'应收应付管理权限',401,'应收单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(37,5,'应收应付管理权限',402,'应付单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(38,5,'应收应付管理权限',403,'收款单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(39,5,'应收应付管理权限',404,'付款单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(40,5,'应收应付管理权限',405,'转账单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(41,5,'应收应付管理权限',406,'账户余额期初结转单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(42,5,'应收应付管理权限',407,'应收余额期初结转单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(43,5,'应收应付管理权限',408,'应付余额期初结转单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(44,5,'应收应付管理权限',409,'应收应付报表')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(45,6,'总账管理权限',501,'凭证录入')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(46,6,'总账管理权限',502,'凭证登账')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(47,6,'总账管理权限',504,'科目余额期初结转')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(48,6,'总账管理权限',505,'账务报表')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(49,7,'固定资产管理权限',601,'卡片管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(50,7,'固定资产管理权限',602,'工作量录入')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(51,7,'固定资产管理权限',603,'计提折旧')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(52,7,'固定资产管理权限',607,'固定资产报表')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(53,8,'基础资料权限',701,'物品资料')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(54,8,'基础资料权限',702,'产品配方')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(55,8,'基础资料权限',703,'生产工序定义')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(57,8,'基础资料权限',705,'员工资料')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(58,8,'基础资料权限',706,'车辆资料')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(59,8,'基础资料权限',707,'库房资料')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(60,8,'基础资料权限',708,'货位资料')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(61,8,'基础资料权限',709,'供应商资料')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(62,8,'基础资料权限',710,'客户资料')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(63,8,'基础资料权限',711,'会计科目')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(64,8,'基础资料权限',712,'现金银行账户')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(65,8,'基础资料权限',713,'收入支出类别')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(66,8,'基础资料权限',714,'固定资产变动类别')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(67,8,'基础资料权限',715,'固定资产存放地点')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(68,3,'购销仓储管理权限',214,'库存报表')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(69,7,'固定资产管理权限',604,'资产检修')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(70,7,'固定资产管理权限',605,'资产租赁')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(71,7,'固定资产管理权限',606,'资产转移')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(72,2,'生产加工管理权限',105,'质量检验单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(73,3,'购销仓储管理权限',215,'零售单POS')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(74,6,'总账管理权限',503,'凭证审核')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(75,1,'是否使用该模块',800,'人力资源管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(76,75,'人力资源管理',801,'调岗调级')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(77,75,'人力资源管理',802,'离职离岗')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(78,75,'人力资源管理',803,'合同签订')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(79,75,'人力资源管理',804,'职称评定')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(80,75,'人力资源管理',805,'奖励记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(81,75,'人力资源管理',806,'惩罚记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(82,75,'人力资源管理',807,'福利记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(83,75,'人力资源管理',808,'证件保管')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(84,75,'人力资源管理',809,'招聘计划')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(85,75,'人力资源管理',810,'应聘记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(86,75,'人力资源管理',811,'培训需求')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(87,75,'人力资源管理',815,'带薪休假')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(88,75,'人力资源管理',816,'出差记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(89,75,'人力资源管理',817,'请假记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(90,75,'人力资源管理',818,'技能技术')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(91,75,'人力资源管理',819,'档案保管')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(92,8,'基础资料权限',716,'员工技能')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(93,75,'人力资源管理',820,'加班记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(94,75,'人力资源管理',821,'早退记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(95,75,'人力资源管理',822,'迟到记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(96,75,'人力资源管理',823,'矿工记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(97,75,'人力资源管理',824,'综合报表')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(98,8,'基础资料权限',717,'工资项目')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(99,8,'基础资料权限',718,'工资结构')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(100,8,'基础资料权限',719,'所得税率表')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(101,1,'是否使用该模块',900,'工资薪酬管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(102,101,'工资薪酬管理',901,'工资录入')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(103,101,'工资薪酬管理',902,'计件工资')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(104,101,'工资薪酬管理',903,'计时工资')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(105,101,'工资薪酬管理',905,'工资查询')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(106,8,'基础资料权限',720,'绩效考核指标')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(107,3,'购销仓储管理权限',216,'采购询价单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(108,3,'购销仓储管理权限',217,'销售报价单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(109,1,'是否使用该模块',1000,'绩效考核管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(110,109,'绩效考核管理',1001,'批次管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(111,109,'绩效考核管理',1002,'考核配置')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(112,109,'绩效考核管理',1003,'考核评分')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(113,109,'绩效考核管理',1004,'考核成绩')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(114,109,'绩效考核管理',1005,'审诉记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(115,101,'工资薪酬管理',904,'工分记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(116,109,'绩效考核管理',1006,'飞行检查')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(117,3,'购销仓储管理权限',218,'出入库扩展')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(118,5,'应收应付管理权限',410,'报销单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(119,5,'应收应付管理权限',411,'预算单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(120,1,'是否使用该模块',1100,'客户关系管理')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(121,120,'客户关系管理',1101,'联系人')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(122,120,'客户关系管理',1102,'目标计划')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(123,120,'客户关系管理',1103,'项目机会')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(124,120,'客户关系管理',1104,'合同订单')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(125,120,'客户关系管理',1105,'回款记录')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(126,120,'客户关系管理',1106,'跟踪回访')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(127,120,'客户关系管理',1107,'客户服务')
insert into tbUserAccess(ID,ParentID,ParentName,Code,TypeName) values(128,120,'客户关系管理',1108,'客户投诉')
--单据类型
insert into tbBillType(ID,BillTypeName) values(1,'采购入库单')
insert into tbBillType(ID,BillTypeName) values(2,'采购退货单')
insert into tbBillType(ID,BillTypeName) values(3,'内部支领单')
insert into tbBillType(ID,BillTypeName) values(4,'支领退还单')
insert into tbBillType(ID,BillTypeName) values(5,'盘点单')
insert into tbBillType(ID,BillTypeName) values(6,'调拨单')
insert into tbBillType(ID,BillTypeName) values(7,'其它入库单')
insert into tbBillType(ID,BillTypeName) values(8,'其它出库单')
insert into tbBillType(ID,BillTypeName) values(9,'库存量期初结转')
insert into tbBillType(ID,BillTypeName) values(10,'收款单')
insert into tbBillType(ID,BillTypeName) values(11,'付款单')
insert into tbBillType(ID,BillTypeName) values(12,'转账单')
insert into tbBillType(ID,BillTypeName) values(13,'账户余额期初结转')
insert into tbBillType(ID,BillTypeName) values(14,'采购申请单')
insert into tbBillType(ID,BillTypeName) values(15,'销售出库单')
insert into tbBillType(ID,BillTypeName) values(16,'销售退货单')
insert into tbBillType(ID,BillTypeName) values(17,'应收单')
insert into tbBillType(ID,BillTypeName) values(18,'应付单')
insert into tbBillType(ID,BillTypeName) values(19,'应收余额期初结转')
insert into tbBillType(ID,BillTypeName) values(20,'应付余额期初结转')
insert into tbBillType(ID,BillTypeName) values(21,'生产订单')
insert into tbBillType(ID,BillTypeName) values(22,'生产任务单')
insert into tbBillType(ID,BillTypeName) values(23,'产品入库单')
insert into tbBillType(ID,BillTypeName) values(24,'质量检验单')
insert into tbBillType(ID,BillTypeName) values(25,'零售单')
insert into tbBillType(ID,BillTypeName) values(26,'出入库扩展')
insert into tbBillType(ID,BillTypeName) values(27,'报销单')
insert into tbBillType(ID,BillTypeName) values(28,'预算单')
--所得税率表
insert into tbGZTax(DownPrice,UpPrice,Tax,Kouchu) values(0,1500,0.03,0)
insert into tbGZTax(DownPrice,UpPrice,Tax,Kouchu) values(1500,4500,0.1,105)
insert into tbGZTax(DownPrice,UpPrice,Tax,Kouchu) values(4500,9000,0.2,555)
insert into tbGZTax(DownPrice,UpPrice,Tax,Kouchu) values(9000,35000,0.25,1005)
insert into tbGZTax(DownPrice,UpPrice,Tax,Kouchu) values(35000,55000,0.3,2755)
insert into tbGZTax(DownPrice,UpPrice,Tax,Kouchu) values(55000,80000,35,5505)
insert into tbGZTax(DownPrice,UpPrice,Tax,Kouchu) values(80000,100000000,0.45,13505)
