-- phpMyAdmin SQL Dump
-- version 3.5.2
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2017 年 06 月 06 日 09:33
-- 服务器版本: 5.1.61
-- PHP 版本: 5.3.3

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- 数据库: `dongleerp`
--

-- --------------------------------------------------------

--
-- 表的结构 `CLD_accountItem`
--

CREATE TABLE IF NOT EXISTS `CLD_accountItem` (
  `aid` int(11) NOT NULL AUTO_INCREMENT,
  `category` varchar(160) NOT NULL,
  `name` varchar(160) NOT NULL,
  PRIMARY KEY (`aid`),
  UNIQUE KEY `aid` (`aid`),
  UNIQUE KEY `aid_2` (`aid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=33 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_action_log`
--

CREATE TABLE IF NOT EXISTS `CLD_action_log` (
  `aid` int(11) NOT NULL AUTO_INCREMENT,
  `updatetime` varchar(20) NOT NULL,
  `time` varchar(40) NOT NULL,
  `action` varchar(250) NOT NULL,
  `class` varchar(40) NOT NULL,
  `sid` int(10) NOT NULL,
  `cid` int(10) NOT NULL,
  `status` int(2) NOT NULL COMMENT '1.添加客户；2.编辑客户；3添加客户日志；4:锁借出；5锁销售；6锁赠送；7锁升级；8锁更换；9锁回收；10锁备注；11锁生成',
  `districtid` varchar(20) NOT NULL,
  `city` varchar(25) NOT NULL,
  `province` varchar(25) NOT NULL,
  `nature` varchar(25) NOT NULL,
  `company` varchar(160) NOT NULL,
  PRIMARY KEY (`aid`),
  UNIQUE KEY `aid` (`aid`),
  KEY `updatetime` (`updatetime`),
  KEY `sid` (`sid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=152182 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_client`
--

CREATE TABLE IF NOT EXISTS `CLD_client` (
  `cid` int(10) NOT NULL AUTO_INCREMENT,
  `gender` varchar(2) NOT NULL,
  `nicename` varchar(40) NOT NULL,
  `qq` int(15) NOT NULL,
  `telephone` varchar(35) NOT NULL,
  `phone` varchar(45) NOT NULL,
  `email` varchar(80) NOT NULL,
  `clientname` varchar(40) NOT NULL,
  `keynum` varchar(160) NOT NULL,
  `companyid` int(10) NOT NULL,
  `companyname` varchar(120) NOT NULL,
  `unit` varchar(90) NOT NULL,
  `area` varchar(100) NOT NULL,
  `nature` varchar(400) NOT NULL,
  `local` varchar(35) NOT NULL,
  `fax` varchar(40) NOT NULL,
  `webservice` varchar(60) NOT NULL,
  `department` varchar(30) NOT NULL,
  `position` varchar(30) NOT NULL,
  `office` varchar(30) NOT NULL,
  `address` varchar(120) NOT NULL,
  `district` varchar(20) NOT NULL,
  `tag` varchar(15) NOT NULL,
  `tooltip` varchar(10) NOT NULL,
  `ride` varchar(90) NOT NULL,
  `stay` varchar(350) NOT NULL,
  `landmarks` varchar(30) NOT NULL,
  `mark` tinytext NOT NULL,
  `priority` int(10) NOT NULL DEFAULT '5',
  `updatetime` int(11) NOT NULL,
  `servicetime` int(11) NOT NULL,
  PRIMARY KEY (`cid`),
  UNIQUE KEY `cid` (`cid`),
  KEY `cid_2` (`cid`),
  KEY `cid_3` (`cid`),
  KEY `companyid` (`companyid`),
  KEY `department` (`department`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=30295 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_client_staff`
--

CREATE TABLE IF NOT EXISTS `CLD_client_staff` (
  `csid` int(10) NOT NULL AUTO_INCREMENT,
  `sid` int(10) NOT NULL,
  `cid` int(10) NOT NULL,
  PRIMARY KEY (`csid`),
  UNIQUE KEY `csid` (`csid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=32471 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_company`
--

CREATE TABLE IF NOT EXISTS `CLD_company` (
  `cid` int(10) NOT NULL AUTO_INCREMENT,
  `staffid` int(10) NOT NULL,
  `companyname` varchar(80) NOT NULL,
  `nature` varchar(600) NOT NULL,
  `local` varchar(60) NOT NULL,
  `fax` varchar(30) NOT NULL,
  `webservice` varchar(40) NOT NULL,
  `department` varchar(30) NOT NULL,
  `position` varchar(40) NOT NULL,
  `office` varchar(40) NOT NULL,
  `address` varchar(180) NOT NULL,
  `ride` varchar(60) NOT NULL,
  `district` varchar(25) NOT NULL,
  `landmarks` varchar(20) NOT NULL,
  `stay` tinytext NOT NULL,
  `tag` varchar(160) NOT NULL,
  PRIMARY KEY (`cid`),
  UNIQUE KEY `cid` (`cid`),
  KEY `cid_2` (`cid`),
  KEY `staffid` (`staffid`),
  KEY `district` (`district`),
  KEY `cid_3` (`cid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5710 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_C_tooltip`
--

CREATE TABLE IF NOT EXISTS `CLD_C_tooltip` (
  `tip` int(10) NOT NULL AUTO_INCREMENT,
  `sid` int(10) NOT NULL,
  `cateid` int(10) NOT NULL,
  `name` varchar(60) NOT NULL,
  `cid` int(10) NOT NULL,
  PRIMARY KEY (`tip`),
  UNIQUE KEY `tip` (`tip`),
  KEY `tip_2` (`tip`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_district`
--

CREATE TABLE IF NOT EXISTS `CLD_district` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `level` tinyint(4) unsigned NOT NULL DEFAULT '0',
  `usetype` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `upid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `displayorder` smallint(6) NOT NULL DEFAULT '0',
  `area` tinyint(4) NOT NULL COMMENT '所属区域',
  PRIMARY KEY (`id`),
  KEY `upid` (`upid`,`displayorder`),
  KEY `level` (`level`),
  KEY `level_2` (`level`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=45065 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_district_staff`
--

CREATE TABLE IF NOT EXISTS `CLD_district_staff` (
  `dsid` int(20) NOT NULL AUTO_INCREMENT,
  `did` int(20) NOT NULL,
  `sid` int(20) NOT NULL,
  PRIMARY KEY (`dsid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=19572 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_eMailJournal`
--

CREATE TABLE IF NOT EXISTS `CLD_eMailJournal` (
  `ejid` int(10) NOT NULL AUTO_INCREMENT,
  `clientId` int(10) NOT NULL,
  `etid` int(10) NOT NULL COMMENT '邮件模板',
  `status` int(2) NOT NULL COMMENT '邮件发送状态(0,1)',
  `date` date NOT NULL,
  `email` varchar(280) NOT NULL,
  `title` varchar(180) NOT NULL,
  `clientName` varchar(180) NOT NULL,
  PRIMARY KEY (`ejid`),
  UNIQUE KEY `ejid` (`ejid`),
  KEY `ejid_2` (`ejid`),
  KEY `ejid_3` (`ejid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3084 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_eMailList`
--

CREATE TABLE IF NOT EXISTS `CLD_eMailList` (
  `elid` int(11) NOT NULL AUTO_INCREMENT,
  `clientEmail` longtext NOT NULL COMMENT '目标客户邮件列表',
  `clientEmail2` longtext NOT NULL,
  `clientEmail3` longtext NOT NULL,
  `clientName` longtext NOT NULL,
  `clientName2` longtext NOT NULL,
  `clientName3` longtext NOT NULL,
  `illegalEmail` longtext NOT NULL,
  `sendEmail` longtext NOT NULL,
  `etid` int(10) NOT NULL,
  `templateName` varchar(40) NOT NULL,
  `eTitle` tinytext NOT NULL,
  `html` text NOT NULL,
  `content` text NOT NULL,
  `info` text NOT NULL,
  `annex` text NOT NULL,
  `annexName` varchar(120) NOT NULL,
  `staffId` int(10) NOT NULL,
  `staffName` varchar(180) NOT NULL,
  `tag` tinytext NOT NULL,
  `districtId` int(10) NOT NULL,
  `nature` varchar(40) NOT NULL,
  `status` int(2) NOT NULL DEFAULT '0' COMMENT '2:发送完成',
  `examine` int(2) NOT NULL COMMENT '1：待审核2：审核通过',
  `mark` varchar(70) NOT NULL,
  `send1` int(2) NOT NULL DEFAULT '0' COMMENT '0:未发送1：发送',
  `send2` int(2) NOT NULL DEFAULT '0',
  `send3` int(2) NOT NULL DEFAULT '0',
  `date` date NOT NULL,
  PRIMARY KEY (`elid`),
  UNIQUE KEY `elid` (`elid`),
  KEY `elid_2` (`elid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=60 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_eMailTemplate`
--

CREATE TABLE IF NOT EXISTS `CLD_eMailTemplate` (
  `etid` int(10) NOT NULL AUTO_INCREMENT,
  `staffId` int(10) NOT NULL,
  `staffName` varchar(180) NOT NULL,
  `title` tinytext NOT NULL,
  `content` text NOT NULL,
  `html` text NOT NULL,
  `skin` varchar(50) NOT NULL COMMENT '皮肤',
  `annex` varchar(180) NOT NULL COMMENT '附件',
  `annexName` varchar(120) NOT NULL,
  `tag` tinytext NOT NULL,
  `status` int(10) NOT NULL COMMENT '发送状态',
  PRIMARY KEY (`etid`),
  UNIQUE KEY `etid` (`etid`),
  KEY `etid_2` (`etid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=176 ;

-- --------------------------------------------------------

--
-- 表的结构 `cld_enclosur`
--

CREATE TABLE IF NOT EXISTS `cld_enclosur` (
  `eid` int(10) NOT NULL AUTO_INCREMENT,
  `rid` int(10) NOT NULL,
  `name` varchar(60) NOT NULL,
  PRIMARY KEY (`eid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_execute`
--

CREATE TABLE IF NOT EXISTS `CLD_execute` (
  `eid` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(160) NOT NULL,
  `staff` mediumtext NOT NULL,
  `mold` varchar(160) NOT NULL,
  PRIMARY KEY (`eid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_executeCopy`
--

CREATE TABLE IF NOT EXISTS `CLD_executeCopy` (
  `ecid` int(11) NOT NULL AUTO_INCREMENT,
  `staff` mediumtext NOT NULL,
  `eid` int(10) NOT NULL,
  `rid` int(10) NOT NULL,
  PRIMARY KEY (`ecid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_express`
--

CREATE TABLE IF NOT EXISTS `CLD_express` (
  `eid` int(11) NOT NULL AUTO_INCREMENT,
  `company` varchar(120) NOT NULL,
  `com` varchar(120) NOT NULL,
  PRIMARY KEY (`eid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_invoice`
--

CREATE TABLE IF NOT EXISTS `CLD_invoice` (
  `iid` int(10) NOT NULL AUTO_INCREMENT,
  `status` int(2) NOT NULL COMMENT '1:审批中',
  `printStatus` int(2) NOT NULL DEFAULT '0',
  `postStatus` int(2) NOT NULL DEFAULT '0',
  `untreadStatus` int(2) NOT NULL DEFAULT '0',
  `invoiceManage` mediumtext NOT NULL,
  `pendingApprovals` varchar(30) NOT NULL,
  `processApprovals` text NOT NULL,
  `invoiceSerial` varchar(120) NOT NULL,
  `invoicePrice` decimal(12,2) NOT NULL,
  `moldManage` mediumtext NOT NULL,
  `cid` int(10) NOT NULL,
  `categoryName` varchar(60) NOT NULL,
  `sid` int(11) NOT NULL,
  `userName` varchar(60) NOT NULL,
  `irid` varchar(260) NOT NULL,
  `remark` varchar(250) NOT NULL,
  `invoiceElement` varchar(160) NOT NULL,
  `invoiceType` int(2) NOT NULL DEFAULT '0' COMMENT '0:普通1:专用',
  `invoiceTitle` varchar(250) NOT NULL,
  `invoiceCompany` varchar(250) NOT NULL,
  `invoiceNo` varchar(160) NOT NULL,
  `TIN` varchar(160) NOT NULL,
  `address` varchar(320) NOT NULL,
  `phone` varchar(120) NOT NULL,
  `bank` varchar(120) NOT NULL,
  `bankAccount` varchar(120) NOT NULL,
  `doPost` int(2) NOT NULL DEFAULT '0',
  `recipients` varchar(120) NOT NULL,
  `recipientsPhone` varchar(60) NOT NULL,
  `recipientsAddress` varchar(320) NOT NULL,
  `mailItems` varchar(320) NOT NULL,
  `expressCompany` varchar(220) NOT NULL,
  `expressNumber` varchar(40) NOT NULL,
  `actualItems` varchar(320) NOT NULL,
  `untreadReason` tinytext NOT NULL,
  `untreadPost` int(2) NOT NULL,
  `untreadCompany` varchar(180) NOT NULL,
  `untreadNumber` varchar(180) NOT NULL,
  `untreadItems` mediumtext NOT NULL,
  `poster` varchar(120) NOT NULL,
  `date` datetime NOT NULL,
  `isDelete` int(2) NOT NULL DEFAULT '0',
  `updateTime` datetime NOT NULL,
  `printTime` datetime NOT NULL,
  `postTime` datetime NOT NULL,
  `bindTime` datetime NOT NULL,
  PRIMARY KEY (`iid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=26 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_invoiceManage`
--

CREATE TABLE IF NOT EXISTS `CLD_invoiceManage` (
  `iid` int(11) NOT NULL AUTO_INCREMENT,
  `staff` mediumtext NOT NULL,
  `mold` varchar(160) NOT NULL,
  PRIMARY KEY (`iid`),
  UNIQUE KEY `iid` (`iid`),
  KEY `iid_2` (`iid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_invoiceOperationLog`
--

CREATE TABLE IF NOT EXISTS `CLD_invoiceOperationLog` (
  `lid` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(160) NOT NULL,
  `uid` int(11) NOT NULL,
  `category` varchar(120) NOT NULL,
  `date` datetime NOT NULL,
  `operation` varchar(260) NOT NULL,
  `img` varchar(160) NOT NULL,
  `iid` int(11) NOT NULL,
  `status` int(3) NOT NULL,
  PRIMARY KEY (`lid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=433 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_invoiceReceivables`
--

CREATE TABLE IF NOT EXISTS `CLD_invoiceReceivables` (
  `irid` int(11) NOT NULL AUTO_INCREMENT,
  `bindStatus` int(2) NOT NULL DEFAULT '0',
  `iid` int(2) NOT NULL,
  `receivablesPrice` varchar(160) NOT NULL,
  `receivablesMessage` varchar(160) NOT NULL,
  `receivablesSerial` varchar(80) NOT NULL,
  `receivablesBank` varchar(160) NOT NULL,
  `receivablesDate` varchar(160) NOT NULL,
  `receivablesCategory` varchar(120) NOT NULL,
  `receivablesStaff` varchar(120) NOT NULL,
  `inputStaff` varchar(120) NOT NULL,
  `source` int(2) NOT NULL DEFAULT '0',
  `date` date NOT NULL,
  `confirmTime` datetime NOT NULL,
  `bindDate` datetime NOT NULL,
  PRIMARY KEY (`irid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=24 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_invoiceROLog`
--

CREATE TABLE IF NOT EXISTS `CLD_invoiceROLog` (
  `iroId` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(160) NOT NULL,
  `uid` int(11) NOT NULL,
  `category` varchar(120) NOT NULL,
  `date` date NOT NULL,
  `operation` varchar(260) NOT NULL,
  `img` varchar(160) NOT NULL,
  `irid` int(11) NOT NULL,
  `status` int(3) NOT NULL,
  PRIMARY KEY (`iroId`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=42 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_invoiceStatistics`
--

CREATE TABLE IF NOT EXISTS `CLD_invoiceStatistics` (
  `sid` int(11) NOT NULL AUTO_INCREMENT,
  `cid` int(11) NOT NULL,
  `staff` int(11) NOT NULL,
  `invoicePrice` decimal(12,2) NOT NULL,
  `receivablesPrice` decimal(12,2) NOT NULL,
  `accountPrice` decimal(12,2) NOT NULL,
  `priceClass` int(2) NOT NULL COMMENT '1开票2收款3入账',
  `irid` int(11) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`sid`),
  UNIQUE KEY `sid` (`sid`),
  KEY `cid` (`cid`),
  KEY `date` (`date`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=56 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_itemStatistics`
--

CREATE TABLE IF NOT EXISTS `CLD_itemStatistics` (
  `sid` int(11) NOT NULL AUTO_INCREMENT,
  `cid` int(11) NOT NULL,
  `staff` int(11) NOT NULL,
  `price` decimal(12,2) NOT NULL,
  `itemCategory` varchar(60) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`sid`),
  UNIQUE KEY `sid` (`sid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=114 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_loanReceipt`
--

CREATE TABLE IF NOT EXISTS `CLD_loanReceipt` (
  `rid` int(11) NOT NULL AUTO_INCREMENT,
  `accountItem` mediumtext NOT NULL,
  `loanItem` mediumtext NOT NULL,
  `staff` int(11) NOT NULL,
  `sum` decimal(12,2) NOT NULL,
  `loanSum` decimal(12,2) NOT NULL,
  `date` date NOT NULL,
  `pastDate` date NOT NULL,
  `cid` int(11) NOT NULL COMMENT '办事处',
  `status` int(11) NOT NULL COMMENT '1同意2审批中3退回4编辑',
  `Rtype` int(2) NOT NULL COMMENT '报销单类型',
  `reviseDetail` text NOT NULL,
  `revisePrice` decimal(12,2) NOT NULL,
  `receiptOrder` varchar(60) NOT NULL,
  `verify` varchar(400) NOT NULL,
  `verifyStaff` text NOT NULL COMMENT 'status ：1同意 3不同意 4等待',
  `nowStaff` varchar(20) NOT NULL,
  `verifyBreakup` text NOT NULL,
  `explanation` text NOT NULL,
  `notice` int(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`rid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_longle`
--

CREATE TABLE IF NOT EXISTS `CLD_longle` (
  `lid` int(10) NOT NULL AUTO_INCREMENT,
  `year` int(10) NOT NULL,
  `cid` int(10) NOT NULL,
  `category` varchar(80) NOT NULL,
  `status` int(10) NOT NULL DEFAULT '1' COMMENT '1:生成 2:接收 3:借出 4:销售 5:升级 6:更换 7:收回',
  `statuslog` varchar(25) NOT NULL,
  `statusT` varchar(30) NOT NULL,
  `key_num` varchar(20) NOT NULL,
  `SerialNumber` varchar(120) NOT NULL,
  `product` varchar(40) NOT NULL,
  `alloted_time` varchar(40) NOT NULL,
  `product_id` int(11) NOT NULL,
  `make_day` varchar(60) NOT NULL,
  `responsible` varchar(40) NOT NULL,
  `version` varchar(80) NOT NULL,
  `client` varchar(40) NOT NULL,
  `clientid` int(10) NOT NULL,
  PRIMARY KEY (`lid`),
  UNIQUE KEY `lid` (`lid`),
  KEY `status` (`status`),
  KEY `status_2` (`status`),
  KEY `responsible` (`responsible`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=26620 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_longlelog`
--

CREATE TABLE IF NOT EXISTS `CLD_longlelog` (
  `logid` int(10) NOT NULL AUTO_INCREMENT,
  `lid` int(10) NOT NULL,
  `status` int(10) NOT NULL COMMENT '8:备注',
  `statusT` varchar(30) NOT NULL,
  `sell_client` varchar(40) NOT NULL,
  `client` varchar(40) NOT NULL,
  `clientid` int(10) NOT NULL,
  `responsible` varchar(40) NOT NULL COMMENT '责任员',
  `operator` varchar(40) NOT NULL COMMENT '操作员',
  `product_id` int(10) NOT NULL,
  `product` varchar(50) NOT NULL,
  `category` varchar(40) NOT NULL COMMENT '办事处',
  `new_key_num` varchar(60) NOT NULL,
  `mark` varchar(500) NOT NULL,
  `dateline` varchar(60) NOT NULL,
  PRIMARY KEY (`logid`),
  UNIQUE KEY `logid` (`logid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=33535 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_L_category`
--

CREATE TABLE IF NOT EXISTS `CLD_L_category` (
  `cid` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(60) NOT NULL,
  `defult` int(11) NOT NULL,
  `districtid` int(10) NOT NULL,
  PRIMARY KEY (`cid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_office_area`
--

CREATE TABLE IF NOT EXISTS `CLD_office_area` (
  `oaid` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`oaid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_product`
--

CREATE TABLE IF NOT EXISTS `CLD_product` (
  `pid` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(60) NOT NULL,
  `typeid` int(2) NOT NULL,
  PRIMARY KEY (`pid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=49 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_receipt`
--

CREATE TABLE IF NOT EXISTS `CLD_receipt` (
  `rid` int(11) NOT NULL AUTO_INCREMENT,
  `accountItem` mediumtext NOT NULL,
  `loanItem` mediumtext NOT NULL,
  `staff` int(11) NOT NULL,
  `sum` decimal(12,2) NOT NULL,
  `loanSum` decimal(12,2) NOT NULL,
  `date` date NOT NULL,
  `pastDate` date NOT NULL,
  `executeDate` date NOT NULL,
  `cid` int(11) NOT NULL COMMENT '办事处',
  `status` int(11) NOT NULL COMMENT '1审批完成,待执行2审批中3终止4撤回5待提交6借款完成,待执行7借款报销单待提交8执行完成19执行完成2',
  `Rtype` int(2) NOT NULL COMMENT '报销单类型',
  `isBK` int(2) NOT NULL DEFAULT '0' COMMENT '借款执行特殊标志',
  `reviseDetail` text NOT NULL,
  `revisePrice` decimal(12,2) NOT NULL,
  `receiptOrder` varchar(60) NOT NULL,
  `verify` varchar(400) NOT NULL,
  `verifyStaff` text NOT NULL COMMENT 'status ：1同意 3不同意 4等待',
  `nowStaff` varchar(20) NOT NULL,
  `execute` int(10) NOT NULL,
  `executeStaff` text NOT NULL,
  `executeCopy` mediumtext NOT NULL,
  `verifyBreakup` text NOT NULL COMMENT '费用完结组拷贝',
  `explanation` text NOT NULL,
  `implementOpinions` tinytext NOT NULL,
  `notice` int(2) NOT NULL DEFAULT '0',
  `loanRid` int(10) NOT NULL,
  PRIMARY KEY (`rid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=41 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_receiptDetail`
--

CREATE TABLE IF NOT EXISTS `CLD_receiptDetail` (
  `rdid` int(11) NOT NULL AUTO_INCREMENT,
  `staff` int(11) NOT NULL,
  `item` varchar(160) NOT NULL,
  `itemCategory` varchar(160) NOT NULL,
  `price` decimal(12,2) NOT NULL,
  `date` date NOT NULL,
  `pastDate` date NOT NULL,
  `cid` int(11) NOT NULL COMMENT '办事处',
  `rid` int(11) NOT NULL COMMENT '报销单据ID',
  `status` int(11) NOT NULL COMMENT '1同意支付，2审批中，3退回4编辑',
  PRIMARY KEY (`rdid`),
  UNIQUE KEY `rdid` (`rdid`),
  UNIQUE KEY `rdid_2` (`rdid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=39 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_receiptLog`
--

CREATE TABLE IF NOT EXISTS `CLD_receiptLog` (
  `rlid` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(160) NOT NULL,
  `uid` int(11) NOT NULL,
  `date` varchar(60) NOT NULL COMMENT '审批时间',
  `opinion` varchar(260) NOT NULL,
  `rolename` varchar(160) NOT NULL,
  `img` varchar(160) NOT NULL,
  `rid` int(10) NOT NULL,
  `status` int(3) NOT NULL,
  PRIMARY KEY (`rlid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=131 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_remind`
--

CREATE TABLE IF NOT EXISTS `CLD_remind` (
  `rid` int(10) NOT NULL AUTO_INCREMENT,
  `day` int(4) NOT NULL,
  `remark` varchar(180) NOT NULL,
  `status` int(2) NOT NULL DEFAULT '0' COMMENT '1:不需要提醒',
  `time` varchar(40) NOT NULL,
  `staffID` int(10) NOT NULL,
  `clientName` varchar(80) NOT NULL,
  `clientID` int(10) NOT NULL,
  `companyName` varchar(80) NOT NULL,
  `companyID` int(10) NOT NULL,
  `class` varchar(30) NOT NULL,
  PRIMARY KEY (`rid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=38 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_role`
--

CREATE TABLE IF NOT EXISTS `CLD_role` (
  `rid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(160) NOT NULL,
  `staff` mediumtext NOT NULL,
  PRIMARY KEY (`rid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_service_log`
--

CREATE TABLE IF NOT EXISTS `CLD_service_log` (
  `slid` int(10) NOT NULL AUTO_INCREMENT,
  `status` int(11) NOT NULL,
  `mark` mediumtext NOT NULL,
  `date` date NOT NULL,
  `category` varchar(40) NOT NULL,
  `clientid` int(11) NOT NULL,
  `staffname` varchar(60) NOT NULL,
  `staffid` int(11) NOT NULL,
  PRIMARY KEY (`slid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6272 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_sms`
--

CREATE TABLE IF NOT EXISTS `CLD_sms` (
  `sid` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(160) NOT NULL,
  `content` text NOT NULL,
  `signature` varchar(30) NOT NULL COMMENT '签名',
  `client` longtext NOT NULL COMMENT '目标发送者',
  `illegal` longtext NOT NULL COMMENT '非法',
  `status` int(11) NOT NULL COMMENT '1待审核2已审核3已发送',
  `kind` int(2) NOT NULL,
  `mark` varchar(160) NOT NULL,
  `tag` varchar(60) NOT NULL,
  `districtId` int(10) NOT NULL DEFAULT '0',
  `category` varchar(40) NOT NULL,
  `staffId` int(20) NOT NULL,
  `staffName` varchar(60) NOT NULL,
  `errorInfo` varchar(60) NOT NULL,
  `date` varchar(20) NOT NULL,
  PRIMARY KEY (`sid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=26 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_staff`
--

CREATE TABLE IF NOT EXISTS `CLD_staff` (
  `sid` int(10) NOT NULL AUTO_INCREMENT,
  `isadmin` int(3) NOT NULL DEFAULT '0',
  `username` varchar(60) NOT NULL COMMENT '公司员工',
  `passwork` varchar(60) NOT NULL,
  `cid` int(11) NOT NULL COMMENT '办事处ＩＤ',
  `othercid` varchar(40) NOT NULL,
  `category` varchar(40) NOT NULL,
  `othercategory` varchar(80) NOT NULL,
  `gender` varchar(2) NOT NULL,
  `qq` varchar(15) NOT NULL,
  `phone` varchar(35) NOT NULL,
  `telephone` varchar(35) NOT NULL,
  `email` varchar(80) NOT NULL,
  `avatar` varchar(600) NOT NULL DEFAULT '/global/img/avtra',
  `birthday` varchar(60) NOT NULL,
  `position` varchar(30) NOT NULL,
  `appDate` varchar(40) NOT NULL,
  `hiredate` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '入职时间',
  `nature` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '员工性质，1为正式员工，2为实习生',
  `wxid` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '微信的id',
  PRIMARY KEY (`sid`),
  KEY `nature` (`nature`) USING BTREE,
  KEY `wxid` (`wxid`) USING BTREE
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=59 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_staffDynamic`
--

CREATE TABLE IF NOT EXISTS `CLD_staffDynamic` (
  `sdid` int(10) NOT NULL AUTO_INCREMENT,
  `content` varchar(250) NOT NULL,
  `time` int(16) NOT NULL,
  `category` varchar(16) NOT NULL,
  `cid` int(10) NOT NULL,
  `sid` int(10) NOT NULL,
  `staff` varchar(30) NOT NULL,
  `status` int(10) NOT NULL,
  PRIMARY KEY (`sdid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=46 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_statistics`
--

CREATE TABLE IF NOT EXISTS `CLD_statistics` (
  `sid` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL COMMENT '年月',
  `cid` int(11) NOT NULL,
  `staff` int(11) NOT NULL,
  `agPrice` decimal(12,2) NOT NULL,
  `rePrice` decimal(12,2) NOT NULL COMMENT '总金额',
  PRIMARY KEY (`sid`),
  UNIQUE KEY `sid` (`sid`),
  KEY `sid_2` (`sid`),
  KEY `cid` (`cid`),
  KEY `staff` (`staff`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_tag`
--

CREATE TABLE IF NOT EXISTS `CLD_tag` (
  `tid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(80) NOT NULL,
  `sid` int(10) NOT NULL COMMENT '用户ID',
  `colorid` int(10) NOT NULL,
  PRIMARY KEY (`tid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=407 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_tagCompany`
--

CREATE TABLE IF NOT EXISTS `CLD_tagCompany` (
  `tid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(80) NOT NULL,
  `sid` int(10) NOT NULL COMMENT '用户ID',
  `colorid` int(10) NOT NULL,
  PRIMARY KEY (`tid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=421 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_tagCompanyNexus`
--

CREATE TABLE IF NOT EXISTS `CLD_tagCompanyNexus` (
  `tcid` int(11) NOT NULL AUTO_INCREMENT,
  `sid` int(10) NOT NULL,
  `company` int(10) NOT NULL,
  `tag` varchar(80) NOT NULL,
  PRIMARY KEY (`tcid`),
  UNIQUE KEY `tcid` (`tcid`),
  KEY `company` (`company`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_tag_client`
--

CREATE TABLE IF NOT EXISTS `CLD_tag_client` (
  `tcid` int(11) NOT NULL AUTO_INCREMENT,
  `sid` int(10) NOT NULL,
  `client` int(10) NOT NULL,
  `tag` varchar(80) NOT NULL,
  PRIMARY KEY (`tcid`),
  UNIQUE KEY `tcid` (`tcid`),
  KEY `client` (`client`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1777 ;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_verify`
--

CREATE TABLE IF NOT EXISTS `CLD_verify` (
  `vid` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(160) NOT NULL,
  `staff` mediumtext NOT NULL,
  PRIMARY KEY (`vid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=33 ;

-- --------------------------------------------------------

--
-- 表的结构 `holiday_acman`
--

CREATE TABLE IF NOT EXISTS `holiday_acman` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(500) COLLATE utf8_unicode_ci NOT NULL COMMENT '名字，以，号分隔保存',
  `type` tinyint(1) unsigned NOT NULL COMMENT '1为审批组，2为抄送组',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期审批组和抄送人组' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `holiday_approval`
--

CREATE TABLE IF NOT EXISTS `holiday_approval` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `hid` int(11) unsigned NOT NULL COMMENT '请假申请表的id',
  `aid` int(11) unsigned NOT NULL COMMENT '审批人id',
  `aname` varchar(30) COLLATE utf8_unicode_ci NOT NULL COMMENT '审批人名字',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '审批结果，1：审批通过，2：审批不通过，0（默认）：未审批',
  `approvetime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '审批时间',
  `description` varchar(5000) COLLATE utf8_unicode_ci NOT NULL COMMENT '审批回复内容',
  PRIMARY KEY (`id`),
  KEY `hid` (`hid`,`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期审批表' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `holiday_day`
--

CREATE TABLE IF NOT EXISTS `holiday_day` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(11) unsigned NOT NULL COMMENT '申请人id',
  `type` smallint(4) unsigned NOT NULL COMMENT '类型',
  `daytime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '日期',
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`,`type`,`daytime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期日期记录表' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `holiday_msg`
--

CREATE TABLE IF NOT EXISTS `holiday_msg` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(11) unsigned NOT NULL COMMENT '发起人id',
  `aid` smallint(4) unsigned NOT NULL COMMENT '审批组id',
  `cid` smallint(4) unsigned NOT NULL COMMENT '抄送组id',
  `type` smallint(4) unsigned NOT NULL COMMENT '类型',
  `starttime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '开始时间',
  `endtime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '结束时间',
  `daynum` decimal(10,1) unsigned NOT NULL COMMENT '请假天数',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '审批类型，1：审批通过，2：审批不通过，0（默认）：未审批',
  `addtime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '提交时间',
  `approvetime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '审批时间',
  `description` varchar(5000) COLLATE utf8_unicode_ci NOT NULL COMMENT '申请内容',
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`,`aid`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期申请与审批' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `holiday_staff`
--

CREATE TABLE IF NOT EXISTS `holiday_staff` (
  `uid` int(11) unsigned NOT NULL COMMENT '员工id',
  `yearnum` decimal(10,1) unsigned NOT NULL DEFAULT '0.0' COMMENT '年假数目',
  `addnum` decimal(10,1) unsigned NOT NULL DEFAULT '0.0' COMMENT '加值班存假数目',
  `othernum` decimal(10,1) unsigned NOT NULL DEFAULT '0.0' COMMENT '其它假期数目（后台手动输入）',
  `isadmin` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否是审批人，1：是，0否',
  PRIMARY KEY (`uid`),
  KEY `yearnum` (`yearnum`,`addnum`,`othernum`),
  KEY `isadmin` (`isadmin`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='员工假期表';

-- --------------------------------------------------------

--
-- 表的结构 `holiday_type`
--

CREATE TABLE IF NOT EXISTS `holiday_type` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT '名称',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期类型' AUTO_INCREMENT=12 ;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
