/*
SQLyog Enterprise - MySQL GUI v6.0
Host - 5.0.64-20080626 : Database - XMTICKET
*********************************************************************
Server version : 5.0.64-20080626
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

create database if not exists `MemberDataBase`;

USE `MemberDataBase`;

/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

/*Table structure for table `BranchCardType` */

DROP TABLE IF EXISTS `BranchCardType`;

CREATE TABLE `BranchCardType` (
  `TypeID` int(4) unsigned NOT NULL default '0' COMMENT '卡型编号',
  `BranchID` int(2) NOT NULL default '0' COMMENT '分店编号',
  `TypeName` char(16) default NULL COMMENT '卡型名称',
  `TypeXml` text,
  `PerCost` decimal(8,2) default '10.00' COMMENT '单次价值',
  `BinRuler` longblob,
  `UpTime` datetime default NULL,
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`TypeID`,`BranchID`),
  UNIQUE KEY `NewIndex1` (`TypeName`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `BranchCardType` */

/*Table structure for table `CardFreeMoneyHistory` */

DROP TABLE IF EXISTS `CardFreeMoneyHistory`;

CREATE TABLE `CardFreeMoneyHistory` (
  `CardID` int(4) NOT NULL,
  `FreeYear` int(2) NOT NULL,
  `FreeMonth` int(2) NOT NULL default '0',
  `FreeDay` int(2) NOT NULL default '0',
  `FreeType` int(1) NOT NULL default '0',
  `FreeMoney` decimal(9,2) default '0.00',
  `DateTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`CardID`,`FreeYear`,`FreeMonth`,`FreeDay`,`FreeType`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `CardFreeMoneyHistory` */

/*Table structure for table `CardInfoEX` */

DROP TABLE IF EXISTS `CardInfoEX`;

CREATE TABLE `CardInfoEX` (
  `CardID` int(4) NOT NULL,
  `A` varchar(16) default NULL,
  `B` varchar(16) default NULL,
  `C` varchar(32) default NULL,
  `D` varchar(32) default NULL,
  `E` varchar(48) default NULL,
  `F` varchar(48) default NULL,
  `G` varchar(64) default NULL,
  `H` varchar(300) default NULL,
  `I` varchar(80) default NULL,
  `J` varchar(80) default NULL,
  `Pic` longblob,
  PRIMARY KEY  (`CardID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `CardInfoEX` */

/*Table structure for table `GoodsMemPrice` */

DROP TABLE IF EXISTS `GoodsMemPrice`;

CREATE TABLE `GoodsMemPrice` (
  `GoodsID` int(4) NOT NULL,
  `CardType` int(4) NOT NULL,
  `MemPrice` decimal(9,2) default '0.00',
  `MemJF` int(11) default NULL,
  PRIMARY KEY  (`GoodsID`,`CardType`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `GoodsMemPrice` */

/*Table structure for table `InputCardInfo` */

DROP TABLE IF EXISTS `InputCardInfo`;

CREATE TABLE `InputCardInfo` (
  `ID` int(4) NOT NULL auto_increment,
  `CardNumber` varchar(6) default NULL,
  `OwerName` varchar(16) default NULL,
  `Tel` varchar(14) default NULL,
  `craft` varchar(14) default NULL,
  `birthday` date default NULL,
  `AddExInfo` int(1) default '0',
  `A` varchar(16) default NULL,
  `B` varchar(16) default NULL,
  `C` varchar(32) default NULL,
  `D` varchar(32) default NULL,
  `E` varchar(48) default NULL,
  `F` varchar(48) default NULL,
  `G` varchar(64) default NULL,
  `H` varchar(64) default NULL,
  `I` varchar(80) default NULL,
  `J` varchar(80) default NULL,
  `PicPath` varchar(100) default NULL,
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `CardNumber` (`CardNumber`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `InputCardInfo` */

/*Table structure for table `JieSuan` */

DROP TABLE IF EXISTS `JieSuan`;

CREATE TABLE `JieSuan` (
  `ID` int(4) NOT NULL,
  `Count` int(4) default '0',
  `AddFren` int(4) default '0',
  `ConFren` int(4) default '0',
  `FrenMoney` decimal(10,2) default '0.00' COMMENT '次消费等值金额',
  `AddMoney` decimal(10,2) default '0.00',
  `ConMoney` decimal(10,2) default '0.00',
  `SaleMoney` decimal(10,2) default '0.00',
  `RealMoney` decimal(10,2) default '0.00',
  `JieMoney` decimal(10,2) default '0.00',
  `User` varchar(12) default NULL,
  `ManBranch` int(2) unsigned NOT NULL default '0',
  `BranchId` int(2) default NULL,
  `EndDateTime` datetime default NULL,
  `DateTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `JieSuan` */

/*Table structure for table `PostPointSet` */

DROP TABLE IF EXISTS `PostPointSet`;

CREATE TABLE `PostPointSet` (
  `CardType` int(4) NOT NULL,
  `XfPoint` int(4) default '0',
  `JSRPoint` int(4) default '0',
  `UPTime` datetime default NULL,
  PRIMARY KEY  (`CardType`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `PostPointSet` */

/*Table structure for table `PostZKRuler` */

DROP TABLE IF EXISTS `PostZKRuler`;

CREATE TABLE `PostZKRuler` (
  `CardType` int(4) NOT NULL default '0',
  `RCount` int(2) default NULL,
  `HexRule` varchar(400) default NULL,
  `UPTime` datetime default NULL,
  PRIMARY KEY  (`CardType`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `PostZKRuler` */

/*Table structure for table `SaleMapp` */

DROP TABLE IF EXISTS `SaleMapp`;

CREATE TABLE `SaleMapp` (
  `AutoID` int(8) unsigned NOT NULL auto_increment,
  `GoodsID` int(4) default NULL,
  `SubID` int(4) default NULL,
  `ConSumeParantID` int(4) default NULL,
  `GoodsCount` decimal(6,2) default '1.00',
  `BackCount` decimal(10,2) default '0.00',
  `WorkName` varchar(16) default NULL,
  `UserName` varchar(16) default NULL,
  `BindType` int(1) unsigned zerofill default '0' COMMENT '绑定消费不能取消',
  `AddTime` datetime default NULL,
  `StopTime` datetime default NULL,
  `OrderID` int(4) default '0',
  PRIMARY KEY  (`AutoID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `SaleMapp` */

/*Table structure for table `SaleSub` */

DROP TABLE IF EXISTS `SaleSub`;

CREATE TABLE `SaleSub` (
  `SubID` int(4) NOT NULL,
  `GroupID` int(4) NOT NULL,
  `SubName` varchar(30) NOT NULL,
  `ParantID` int(4) default '0' COMMENT '号牌父子关系',
  `State` int(1) default '0',
  `SiteSubID` int(4) default '0' COMMENT '手牌所在位置',
  `SaleID` int(4) default '-1',
  `ImageID` int(1) default '0',
  `X` int(2) default '0',
  `Y` int(2) default '0',
  `StarTime` datetime default NULL,
  PRIMARY KEY  (`SubID`),
  UNIQUE KEY `SubName` (`SubName`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `SaleSub` */

/*Table structure for table `SaleViewer` */

DROP TABLE IF EXISTS `SaleViewer`;

CREATE TABLE `SaleViewer` (
  `WorkStaID` int(4) NOT NULL,
  `GroupID` int(4) NOT NULL,
  `UserName` varchar(30) default NULL,
  `NetIP` varchar(30) default NULL,
  PRIMARY KEY  (`WorkStaID`,`GroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `SaleViewer` */

/*Table structure for table `TabGoods` */

DROP TABLE IF EXISTS `TabGoods`;

CREATE TABLE `TabGoods` (
  `ID` int(4) NOT NULL,
  `PID` int(4) default NULL,
  `GoodsName` char(30) default NULL,
  `ShortName` char(32) default NULL,
  `GoodsUnit` char(3) default NULL,
  `BindCost` decimal(8,2) default NULL,
  `AverCost` decimal(8,2) default '0.00',
  `EndBuyCost` decimal(8,2) default '0.00',
  `CostSet` decimal(8,2) default '0.00',
  `GoodsZK` decimal(4,1) default '0.0',
  `ConsumeJF` int(4) default '0',
  `GoodsJF` int(4) default '0',
  `GoodsType` int(1) default NULL,
  `IsTimes` int(2) default NULL COMMENT '可用次数消费的扣次',
  `TimeSet` int(2) default NULL,
  `GoodsCount` decimal(9,2) NOT NULL default '0.00',
  `MemoInfo` text,
  `PY` char(32) default NULL,
  `EnaChangCost` tinyint(1) default '0',
  `EnaSaleMoney` tinyint(1) default '0',
  `EnaServiceMoney` tinyint(1) default '0',
  `EnaCombineGoods` tinyint(1) default '0' COMMENT '促销组合装',
  `DisableSaleGoods` tinyint(1) default '0',
  `AllSaleCount` decimal(12,2) default '0.00' COMMENT '累计销售数量',
  `AllBuyCount` decimal(12,2) default '0.00' COMMENT '累计采购数量',
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `TabGoods` */

/*Table structure for table `TabOwnerLog` */

DROP TABLE IF EXISTS `TabOwnerLog`;

CREATE TABLE `TabOwnerLog` (
  `ID` int(8) NOT NULL,
  `CardNumber` varchar(6) default NULL,
  `Name` varchar(16) default NULL,
  `InfoType` varchar(8) default NULL,
  `Title` varchar(32) default NULL,
  `InfoMem` text,
  `Status` int(2) default NULL,
  `ShowDate` varchar(20) default NULL,
  `AddTime` datetime default NULL,
  `AddUser` varchar(20) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `TabOwnerLog` */

/*Table structure for table `TabSalemx` */

DROP TABLE IF EXISTS `TabSalemx`;

CREATE TABLE `TabSalemx` (
  `AutoID` int(8) unsigned NOT NULL auto_increment,
  `OrderID` int(4) unsigned NOT NULL,
  `CardID` int(4) unsigned NOT NULL,
  `GoodID` int(2) unsigned NOT NULL,
  `SaleMode` int(1) NOT NULL,
  `SalePrice` decimal(9,2) NOT NULL,
  `RealUse` decimal(9,2) NOT NULL COMMENT '真实的使用次数或积分',
  `VerCost` decimal(9,2) NOT NULL default '0.00',
  `SaleCount` decimal(7,2) NOT NULL default '0.00',
  `DateTime` timestamp NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`AutoID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `TabSalemx` */

/*Table structure for table `TabSubLog` */

DROP TABLE IF EXISTS `TabSubLog`;

CREATE TABLE `TabSubLog` (
  `ID` int(4) NOT NULL,
  `SubIndex` int(4) NOT NULL,
  `UsePic` tinyint(1) default NULL,
  `Pic` longblob,
  `subMem` text,
  `AppUser` varchar(20) default NULL,
  `UpTime` timestamp NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`,`SubIndex`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `TabSubLog` */

/*Table structure for table `Tab_RoomApp` */

DROP TABLE IF EXISTS `Tab_RoomApp`;

CREATE TABLE `Tab_RoomApp` (
  `AutoID` int(8) unsigned NOT NULL auto_increment,
  `SubID` int(4) default '0',
  `DisStarTime` datetime default NULL COMMENT '准备时间,不允许客人进入',
  `AppStarTime` datetime default NULL COMMENT '进入预约状态时间',
  `KeepEndTime` datetime default NULL COMMENT '保留到的最终时间',
  `AppTime` datetime default NULL COMMENT '预约提交时间',
  `CusterName` varchar(16) default NULL COMMENT '预约客人姓名',
  `CusterTel` varchar(16) default NULL COMMENT '预约电话',
  `MemCard` varchar(16) default NULL COMMENT '预约会员',
  `Memo` varchar(40) default NULL,
  `ExeInfo` varchar(40) default NULL,
  `AppSource` varchar(20) default NULL COMMENT '备注信息',
  `AppSt` int(1) default '0' COMMENT '0等待,1手工取消,2过期自动取消,3己使用',
  PRIMARY KEY  (`AutoID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `Tab_RoomApp` */

/*Table structure for table `Tab_ShowTip` */

DROP TABLE IF EXISTS `Tab_ShowTip`;

CREATE TABLE `Tab_ShowTip` (
  `AutoID` int(8) unsigned NOT NULL auto_increment,
  `SubID` int(4) default NULL,
  `Memo` varchar(70) default NULL,
  `ShowTime` datetime default NULL,
  PRIMARY KEY  (`AutoID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `Tab_ShowTip` */

/*Table structure for table `WorkSta` */

DROP TABLE IF EXISTS `WorkSta`;

CREATE TABLE `WorkSta` (
  `WorkStaId` int(11) NOT NULL,
  `WName` varchar(100) NOT NULL,
  `Code` varchar(96) default NULL,
  `BranchID` int(2) default '0',
  `Remark` varchar(200) default NULL,
  PRIMARY KEY  (`WorkStaId`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `WorkSta` */

insert  into `WorkSta`(`WorkStaId`,`WName`,`Code`,`BranchID`,`Remark`) values (256,'服务器','0D490C0254FF89CEC1E25B0737416B0288C514EB2A41F488AD1C11A946C251928313F7F5E40F29383A6D77B5CC624209',0,'服务器');

/*Table structure for table `actcardtc` */

DROP TABLE IF EXISTS `actcardtc`;

CREATE TABLE `actcardtc` (
  `CardTypeID` int(4) NOT NULL,
  `TCGroupID` int(4) NOT NULL,
  `EnaMutil` tinyint(1) default '0',
  `BaseMoney` decimal(9,2) default '0.00',
  `PresentMoney` decimal(9,2) default '0.00',
  `PreSentPer` int(2) default '2',
  PRIMARY KEY  (`CardTypeID`,`TCGroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `actcardtc` */

/*Table structure for table `branch` */

DROP TABLE IF EXISTS `branch`;

CREATE TABLE `branch` (
  `BranchId` int(4) NOT NULL,
  `BranchName` varchar(32) NOT NULL,
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `UpdateTime` datetime default NULL,
  `DownLoadTime` datetime default NULL,
  `UpdatePoint` int(4) default '0',
  `DownLoadPoint` int(4) default '0',
  `XML` int(4) default '0',
  `UpTime` timestamp NOT NULL default '2007-12-13 00:00:00',
  PRIMARY KEY  (`BranchId`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `branch` */

insert  into `branch`(`BranchId`,`BranchName`,`ChangeTime`,`UpdateTime`,`DownLoadTime`,`UpdatePoint`,`DownLoadPoint`,`XML`,`UpTime`) values (0,'总店','2013-07-22 17:30:25',NULL,NULL,0,0,0,'2007-12-13 00:00:00');

/*Table structure for table `cardaccount` */

DROP TABLE IF EXISTS `cardaccount`;

CREATE TABLE `cardaccount` (
  `CardID` int(4) NOT NULL,
  `CardYJ` decimal(6,2) NOT NULL,
  `Frequency` int(4) NOT NULL default '0',
  `UsedFrequency` int(4) NOT NULL default '0',
  `AddFrequency` int(4) NOT NULL default '0',
  `Money` decimal(10,2) NOT NULL default '0.00',
  `UsedMoney` decimal(10,2) NOT NULL default '0.00',
  `AddMoney` decimal(10,2) NOT NULL default '0.00',
  `UsedAllMoney` decimal(10,2) NOT NULL default '0.00',
  `FreeFrequency` decimal(10,2) NOT NULL default '0.00' COMMENT '购次总的金额+购买多出的金额+充值多出的金额',
  `UseCount` smallint(4) default '0',
  `FreeMoney` decimal(9,2) NOT NULL default '0.00',
  `CashFreeMoney` decimal(8,2) NOT NULL default '0.00' COMMENT '现金赠送金额',
  `PointToMoney` decimal(7,2) default '0.00' COMMENT '积分抵现额',
  `SteadMoney` decimal(6,0) default '0' COMMENT '代金劵必须是整数金额',
  `CheckVal` int(4) NOT NULL,
  `Point` int(4) default '0',
  `PointCount` int(4) default '0',
  `ZSPoint` int(4) default '0' COMMENT '奖励的积分,非IC的直接充入帐号',
  `UpFlag` int(2) unsigned default '0',
  `UpTime` datetime default NULL,
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`CardID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `cardaccount` */

/*Table structure for table `cardinfo` */

DROP TABLE IF EXISTS `cardinfo`;

CREATE TABLE `cardinfo` (
  `CardID` int(4) NOT NULL,
  `OwerName` varchar(16) default NULL,
  `PID` int(4) default '0',
  `Tel` varchar(14) default NULL,
  `Sex` varchar(2) default NULL COMMENT '性别',
  `Addr` varchar(32) default NULL COMMENT '地址',
  `craft` varchar(16) default NULL COMMENT '行业',
  `birth_day` int(2) default NULL,
  `birth_month` int(2) default NULL,
  `birth_year` int(2) default NULL,
  `birth_calendar` varchar(10) default NULL,
  `AccSms` tinyint(1) default '0',
  `actBranch` int(2) NOT NULL,
  `actWorkName` varchar(8) NOT NULL default '',
  `actOperater` varchar(8) NOT NULL default '',
  `RegTime` datetime NOT NULL,
  `EndTime` datetime default NULL,
  `UpTime` datetime default NULL,
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`CardID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `cardinfo` */

/*Table structure for table `cardkucun` */

DROP TABLE IF EXISTS `cardkucun`;

CREATE TABLE `cardkucun` (
  `CardID` int(4) NOT NULL COMMENT '卡编号',
  `CardCost` decimal(8,2) NOT NULL COMMENT '卡价值',
  `OutID` int(11) NOT NULL default '0' COMMENT '出库编号,为0表示未出库',
  PRIMARY KEY  (`CardID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `cardkucun` */

/*Table structure for table `cardlist` */

DROP TABLE IF EXISTS `cardlist`;

CREATE TABLE `cardlist` (
  `CardID` int(4) NOT NULL,
  `CardNumber` varchar(12) NOT NULL default '',
  `TypeID` int(4) NOT NULL,
  `Statue` int(1) NOT NULL default '0',
  `Pwd` int(4) default '-1',
  `RegBranch` int(2) default '0',
  `RegUseMoney` decimal(8,2) default '0.00',
  `RegWorkName` varchar(8) default '',
  `RegOperator` varchar(8) default '',
  `RegTime` datetime NOT NULL,
  `RecoverTime` datetime default NULL,
  `UpTime` datetime default NULL,
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`CardID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `cardlist` */

/*Table structure for table `cardmanager` */

DROP TABLE IF EXISTS `cardmanager`;

CREATE TABLE `cardmanager` (
  `CardID` int(4) NOT NULL,
  `CardSaleID` int(4) default NULL COMMENT '业务员ID',
  `SalerNo` int(4) default NULL,
  `ManagerID` int(4) default NULL COMMENT '客服ID',
  `ManagerNo` int(4) default NULL,
  PRIMARY KEY  (`CardID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `cardmanager` */

/*Table structure for table `cardnummap` */

DROP TABLE IF EXISTS `cardnummap`;

CREATE TABLE `cardnummap` (
  `CardId` varchar(20) NOT NULL,
  `CardNum` varchar(20) NOT NULL,
  `CheckCode` varchar(32) NOT NULL,
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `guid` varchar(36) NOT NULL,
  PRIMARY KEY  (`CardId`),
  UNIQUE KEY `Index_CardNumMap_CardNum` (`CardNum`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `cardnummap` */

/*Table structure for table `cardorder` */

DROP TABLE IF EXISTS `cardorder`;

CREATE TABLE `cardorder` (
  `OrderID` int(4) NOT NULL,
  `CardID` int(4) NOT NULL,
  `OutlayMode` varchar(20) NOT NULL default '',
  `consumeType` int(1) NOT NULL default '0',
  `BeforFrequency` int(4) default '0' COMMENT '充次前次数',
  `Frequency` int(4) NOT NULL default '0' COMMENT '充次数量',
  `FreeFrquency` int(4) NOT NULL default '0' COMMENT '赠送数量',
  `BuyFrequencyMoney` decimal(8,2) default '0.00' COMMENT '购次金额',
  `BeforMoney` decimal(9,2) default '0.00' COMMENT '充值前余额',
  `AddMoney` decimal(9,2) NOT NULL default '0.00' COMMENT '充值金额',
  `FeeMoney` decimal(9,2) NOT NULL default '0.00' COMMENT '充值赠送金额',
  `PointToMoney` decimal(6,2) default '0.00' COMMENT '积分折现算赠送',
  `CashFreeMoney` decimal(8,2) default '0.00' COMMENT '现金赠送额',
  `DelayDays` int(4) default '0',
  `SaleMoney` decimal(9,2) NOT NULL default '0.00' COMMENT '应收',
  `BeforJifen` int(4) default '0' COMMENT '之前积分',
  `RealBeforPoint` int(4) default '0' COMMENT 'befor是赠送,这才是上期积分',
  `Jifen` int(4) default '0' COMMENT '使用积分或增加积分',
  `SteadMoney` decimal(8,2) default '0.00' COMMENT '代金券支付额',
  `RealMoney` decimal(9,2) NOT NULL default '0.00' COMMENT '实收或现金部分',
  `ManBranch` int(2) NOT NULL default '0',
  `BranchID` int(2) NOT NULL COMMENT '分店编号',
  `WorkID` varchar(8) default NULL COMMENT '工作站名称',
  `UserName` varchar(8) default NULL,
  `JieZhangID` int(4) default '0' COMMENT '内部结帐编号',
  `JieSuanID` int(4) default '0' COMMENT '结算编号',
  `OrderType` int(1) default '0' COMMENT '0为充值类,1为消费扣款',
  `RepealID` int(4) default '0',
  `SaleTime` datetime default NULL,
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`OrderID`,`CardID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `cardorder` */

/*Table structure for table `cardtype` */

DROP TABLE IF EXISTS `cardtype`;

CREATE TABLE `cardtype` (
  `TypeID` int(4) unsigned NOT NULL default '0' COMMENT '卡型编号',
  `TypeName` char(16) default NULL COMMENT '卡型名称',
  `TypeXml` text,
  `PerCost` decimal(8,2) default '10.00' COMMENT '单次价值',
  `BinRuler` longblob,
  `BranchId` int(4) NOT NULL default '0',
  `UpTime` datetime default NULL,
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`TypeID`),
  UNIQUE KEY `NewIndex1` (`TypeName`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `cardtype` */

/*Table structure for table `definecode` */

DROP TABLE IF EXISTS `definecode`;

CREATE TABLE `definecode` (
  `CodeId` int(11) NOT NULL,
  `Sign` int(11) NOT NULL,
  `CodeName` varchar(16) NOT NULL default '',
  PRIMARY KEY  (`CodeId`,`Sign`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `definecode` */

insert  into `definecode`(`CodeId`,`Sign`,`CodeName`) values (0,1000,'己发行'),(0,2000,'发行'),(1,1000,'己激活'),(1,2000,'激活'),(2,1000,'己挂失'),(2,2000,'充次'),(3,1000,'己回收'),(3,2000,'充值'),(4,2000,'扣次'),(5,2000,'充次加款'),(6,2000,'扣款'),(7,2000,'回收退款'),(8,2000,'预售'),(9,2000,'回收'),(10,2000,'扣次扣款'),(11,2000,'换卡'),(12,2000,'兑换'),(13,2000,'充值撤消'),(14,2000,'消费撤消'),(15,2000,'手工积分'),(16,2000,'兑购套餐'),(17,2000,'积分兑现'),(18,2000,'积分兑次');

/*Table structure for table `deldatasql` */

DROP TABLE IF EXISTS `deldatasql`;

CREATE TABLE `deldatasql` (
  `ID` int(4) unsigned NOT NULL auto_increment COMMENT '自动编号',
  `SQL` text COMMENT '执行删除的语句',
  `WorkID` int(4) NOT NULL default '0' COMMENT '如果为0或为本站点才下载，上传则不管此参数',
  `AddSQL` tinyint(1) NOT NULL default '0' COMMENT '如果为真则建立除0号和此收银点的更新语句',
  `TabName` text COMMENT '如果有表名则需比较此项提效的时间',
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP COMMENT '仅服务端才执行此语句',
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `deldatasql` */

/*Table structure for table `disablecard` */

DROP TABLE IF EXISTS `disablecard`;

CREATE TABLE `disablecard` (
  `ID` int(4) NOT NULL,
  `TypeID` int(4) NOT NULL,
  `CardID` int(4) NOT NULL default '0',
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `disablecard` */

/*Table structure for table `jiezhang` */

DROP TABLE IF EXISTS `jiezhang`;

CREATE TABLE `jiezhang` (
  `ID` int(4) NOT NULL,
  `Count` int(4) default '0',
  `AddFren` int(4) default '0',
  `ConFren` int(4) default '0',
  `AddMoney` decimal(8,2) default '0.00',
  `ConMoney` decimal(8,2) default '0.00',
  `SaleMoney` decimal(8,2) default '0.00',
  `RealMoney` decimal(8,2) default '0.00',
  `JieMoney` decimal(8,2) default '0.00',
  `User` varchar(12) default NULL,
  `JiaoJieUser` varchar(12) default NULL,
  `EndDateTime` datetime default NULL,
  `DateTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `jiezhang` */

/*Table structure for table `keyvalue` */

DROP TABLE IF EXISTS `keyvalue`;

CREATE TABLE `keyvalue` (
  `KName` varchar(100) NOT NULL,
  `NValue` int(11) NOT NULL,
  PRIMARY KEY  (`KName`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `keyvalue` */

/*Table structure for table `lossctrl` */

DROP TABLE IF EXISTS `lossctrl`;

CREATE TABLE `lossctrl` (
  `CardId` varchar(6) NOT NULL,
  `TypeID` int(4) NOT NULL,
  `BranchID` int(4) NOT NULL,
  PRIMARY KEY  (`CardId`,`TypeID`,`BranchID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `lossctrl` */

/*Table structure for table `rebuildcard` */

DROP TABLE IF EXISTS `rebuildcard`;

CREATE TABLE `rebuildcard` (
  `ID` int(4) NOT NULL auto_increment,
  `CardID` int(4) NOT NULL,
  `CardNumber` varchar(12) default NULL,
  `NewNumber` varchar(12) default NULL,
  `Frence` int(4) default '0',
  `Money` decimal(7,2) default '0.00',
  `RegBranch` int(2) default '0',
  `RegWorkName` varchar(8) default '',
  `RegOperator` varchar(8) default '',
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`,`CardID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `rebuildcard` */

/*Table structure for table `recierrsql` */

DROP TABLE IF EXISTS `recierrsql`;

CREATE TABLE `recierrsql` (
  `AutoID` int(4) NOT NULL auto_increment,
  `ID` int(4) unsigned NOT NULL default '0' COMMENT '自动编号',
  `UpOrDown` tinyint(1) default '1',
  `SQL` text COMMENT '执行删除的语句',
  `WorkID` int(4) NOT NULL default '0' COMMENT '如果为0或为本站点才下载，上传则不管此参数',
  `AddSQL` tinyint(1) NOT NULL default '0' COMMENT '如果为真则建立除0号和此收银点的更新语句',
  `TabName` text COMMENT '如果有表名则需比较此项提效的时间',
  `ErrInfo` text,
  `ErrType` int(4) default '0',
  `ChangeTime` timestamp NOT NULL default CURRENT_TIMESTAMP COMMENT '仅服务端才执行此语句',
  PRIMARY KEY  (`AutoID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `recierrsql` */

/*Table structure for table `recihistory` */

DROP TABLE IF EXISTS `recihistory`;

CREATE TABLE `recihistory` (
  `ID` int(8) NOT NULL auto_increment,
  `UpCount` int(2) default '0',
  `UpErr` int(2) default '0',
  `DownCount` int(2) default '0',
  `DownErr` int(2) default '0',
  `ReciTime` datetime default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `recihistory` */

/*Table structure for table `report` */

DROP TABLE IF EXISTS `report`;

CREATE TABLE `report` (
  `ID` int(4) NOT NULL,
  `Type` varchar(20) default NULL,
  `SysReport` tinyint(1) default '0',
  `ReportName` varchar(20) default NULL,
  `ReportStream` longblob,
  `SQL` text,
  `Filter` text,
  `DefaultVal` text,
  `ShowQuery` int(1) default '0',
  `Reportmemo` text,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `report` */

insert  into `report`(`ID`,`Type`,`SysReport`,`ReportName`,`ReportStream`,`SQL`,`Filter`,`DefaultVal`,`ShowQuery`,`Reportmemo`) values (1,'业务报表',0,'卡操作明细查询','eJzt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FYLMKllsxv/mIGFkZ9UpBJ2R6y9wSFF4KcGlKKkIQKiKcjoVo8jRuZinwuvF\r\nZgZSwf+fiMqwnU58tSMWRlJnTXotvOIfIDYyYEUSCGZJ33/UNiwzlSlryTVsr0UNbpAsvDcoUFVB\r\nXTnYtpgnSJksOf10y5LjMLodRbfS7US3rz6TA5zFPLfJJrLpQyfLX8MAygCaBihNMJNnZ0hBkYdM\r\napmhCGXPSBhCGULhekHmlzwILej/yGSSvjCEMoQyhG6H0OCl5zwILeY/PGTTsfQhlGVhYQhlCE17\r\nuamcKXlwWkxC5Wy2FDaTMpwynG47k9K0JnkQWkzi42xCkz6Esi2FDKEMoYNm0q9ffyXP+/jcjuQT\r\nYThlOGU43Ranj7/Veez9zuuvdp58Ng9Oi4kdZZN6MJwynDKcbovTVGaNPDgtJoKUzanBcMpwynA6\r\nOsabH6fFRJCyKS36cMp2qTOcMpz24DTMLJEHpMUEkbI5JRhIGUgZSLcFaZTXIc8u7WIiSNmMDsPe\r\n22V7sxlIb1mQRoKcLx6lkirkAWoxIaRsOoU+oLIsCgyptzxSx5tOj58qlbonXsvkO0gSGVBxIAyy\r\nZpAiEKZFcPh/dw+sOA==','SELECT \r\n    E.CardNumber as 卡号,\r\n    G.OwerName as 会员姓名,\r\n    F.TypeName as 卡型,\r\n    A.OutlayMode as 支付方式,\r\n    D.CodeName as 消费类型,\r\n    A.BeforFrequency as 前期余次,\r\n    A.Frequency as 次数,\r\n    A.BeforMoney as 前期金额,\r\n    A.AddMoney as 金额,\r\n    A.SaleMoney as 应收金额,\r\n    A.RealMoney as 支付金额,\r\n    B.BranchName as 分店,\r\n    A.WorkID as 收银点,\r\n    A.UserName as 操作员,\r\n    if(A.JieSuanID=0,\"未结算\",\"己结算\") as 结算状态 ,\r\n    A.SaleTime AS 日期\r\nFrom\r\n   CardOrder A  LEFT JOIN \r\n   CardList E ON A.CardID = E.CardID  LEFT JOIN \r\n   CardInfo G ON G.CardID= A.CardID    LEFT JOIN \r\n   CardType F ON F.TypeID=E.TypeID    LEFT JOIN \r\n   Branch B ON A.BranchID = B.BranchId LEFT JOIN    \r\n   DefineCode D On A.consumeType = D.CodeID \r\nWhere \r\n    D.Sign =2000 And  \r\n    OrderID >=0 \r\norder by E.CardNumber,A.SaleTime',NULL,'',1,NULL),(2,'业务报表',0,'卡激活报表','eJztXe1vHMUZ/16p/8PpoqJWgmV39mV2E9zKd+fDFnbi5kyoMPmw8c3ZK/Z2T7t7sc0nhKqCiiJA\r\nQKEVBYUSgdSWQkVJIUR8qPqhUVuhKrTqx6rcJfwFrVQh9ZnZ19u7s9dm7WA8lpK7fWZ2Xp55fr95\r\nZm6e3fu+t9W1KxeJ51uuM1OVBLFaIc6a27ac9ZlqP+jco1e/991vfuO+lY63dZb0XC+orJiQBPnO\r\nxXcpgiEgqVppuMGSGXhWlHGmGnh9Uq3MOeuWQ870AsjsC3XXgeqC033b9ifnaLj9CzZZNn1I75i2\r\nP5ZhydxaIt2W9RiBFov51GXPcoKFzly3F2xPrqBl2cQJltw2mVLBabKZzeNb3SXi++Y6qblbxM/n\r\nftAnTchdN9c2phW4sO64HmmQi7Xth4nnJrkWHIveOlN9pOV2gk3TI480TT+ohAqEms7Y7VawDdrw\r\n3HWPZDSy7JGLFtmMK5i1bXdzrm0lSs+l1/pBAJ8wVqKhjqWGGq/1Ox3ikfaUIkDrVhd0PjW9sVDf\r\nsOz2tCaCLk17yr1n+oEN6prb6pnOtPKjPOcs37pgk2m1RLkestrBBlgHEsdyLMM4+gtONFzqeIaV\r\njX73gmNa9i5VtTbczboZXkzL87DrdqEZE+WhcT3WbZCO2beD8YZaa0HfC+1qwQntJKkFbDxFVM8i\r\nflTLiNy2zYCk6syksQvizVRvvvGn25PSwsb1so3LZznjtDYICRgXjKcyNUMJPTDNXPpZQglnSm+o\r\nVhuWabvrccNDMKS96vYoEkhqaLkMHoFeN1jPFREZWFBkhHVNkyUjn7dB/DXPYhfCCtmCvuRzLAIc\r\n6xums85KUzRV0GRZ0x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KvKApI1Grs5yjhIE7NuichDcUsM\r\nxZ0wtuU8kSM3tlgQNWRgVeTDW+rwhlfpPXuPvC5n63I0dkpXBKQiMX0yFA+ZOuKTrHQI6wT1CK8T\r\n9vR7QxjilMdm8pTBlI3ddbcUdMZePxIFTZOUFJeyggUAIZbV7DMRwEmmM7HEhF8WmzlIhY9/jNOI\r\nk41BPRALo1Gss36PrAVnqY1MWI6Egnna9+/3TdvKBK2ueKbj95jBTZJFdYMCMQZ1FWDbkraAR8PV\r\nxuiWR6lxut2VbpXjRLevPl0AnOWcFc3Hk42hk4eRcYBygGYByqK8ipzmLmltmgvwmrJc4XFdHKEc\r\noeFOIYvCKoLQcp7HkI+8GkMoD7jiCOUIzc6hLDSqyCkk8UAiosYQyg8xc4RyhGYQmo1OKoLTcnzd\r\nfFwSxynHKcfpjjNpJkaoCE7LeXRxPjqI45TjlON09zVpcZyWszLNx+hMwSk/dM9xynEa4TQKlCkC\r\n0nIe6ZcPkeEg5SDlIN0RpHGQSpHwlHJWpvnwlDGQ8qgUDlIO0ixIX7pSqQxfeW3CSxLCOJHxl6W2\r\n+t2u6W2PvBQ0kmXOcN/h4/vJy0Il9qYGeUo8SzxoEwNaZKwIEpYVfMhvbI1Pk+39fQatbT9HrpGk\r\nnMP1hiIouo7iUyjQ2dyrkAwkYJVu4R/xDYXJhLkLQ47G5kqlx+YexwiXyAqmceY4q+VpcHyffPDs\r\nU7ffvnxytfXg0rfvOqGJp3Z62hdkQKfuzrwL5m70nbFw26moK2m7XZIFLIqGwWHHYXekYJfd9t4J\r\ndmOP0PpysCvpJWcSpsHtmsRhx2F3tGCXed7UjrDLP5eqEOwmndAq6fxHCB19GuA0UVBg8a4fabDx\r\nlftBwvBIvcliTwv1W9deAyAP331y+Pi13GJ9ZAnOUrJyun4EYVYEl/8HtQ+8RQ==','SELECT \r\n    E.CardNumber as 卡号,\r\n    G.OwerName as 会员姓名,\r\n    F.TypeName as 卡型,\r\n    A.OutlayMode as 支付方式,\r\n    D.CodeName as 消费类型,\r\n    A.BeforFrequency as 前期余次,\r\n    A.Frequency as 预存次数,\r\n    A.BeforMoney as 前期金额,\r\n    A.AddMoney as 预存金额,\r\n    A.DelayDays as 延期天数,\r\n    A.SaleMoney as 应收金额,\r\n    A.RealMoney as 实收金额,\r\n    B.BranchName as 分店,\r\n    A.WorkID as 收银点,\r\n    A.UserName as 操作员,\r\n    A.SaleTime as 日期\r\nFrom\r\n   CardOrder A  LEFT JOIN \r\n   CardList E ON A.CardID = E.CardID  LEFT JOIN \r\n   CardInfo G ON G.CardID= A.CardID    LEFT JOIN \r\n   CardType F ON F.TypeID=E.TypeID    LEFT JOIN \r\n   Branch B ON A.BranchID = B.BranchId LEFT JOIN    \r\n   DefineCode D On A.consumeType = D.CodeID \r\nWhere \r\n    D.Sign =2000 And  \r\n    OrderID >=0  AND \r\n    consumeType = 1\r\norder by E.CardNumber,A.SaleTime','','',1,NULL),(3,'业务报表',0,'卡充值报表','eJztXc1v3MYVvxfo/7BYo0ELJAw5/I6jBrtLrS1EslWv4hRRfKC1XIkIl1yQXEvKyQ3gJi1gJEGS\r\n5gNOXacxEqBF6rSJ3SQ2cmqLuoUPbdKiPRWoJdunHttLgL4ZDj+Wu+ulZEqR4HFiS3wzHM68eb/f\r\nvHnkIx99bK3rVE5ZfmB77lRV4PhqxXKXvLbtLk9V+2HnIa362He/+Y1HFzr+2jGr5/lhZcGEIqh3\r\nPD5L4nQOCdWK4YVzZujbtOJUNfT7VrUy7S7brnW0F0LlgGt4LlwuPNJ3nGB0DcPrn3SseTOA8o7p\r\nBEMV5sy1Oavbsp+1oMc8ny+e9203nOlMd3vh+ugrtGzHcsM5r22NucIRazVbJ7C7c1YQmMtW3Vuz\r\ngnztJwKrCbUb5tLKuAZnll3PtwzrVH39Kcv3klozro1Pnao+3fI64arpW083zSCsRBqEKx112q1w\r\nHdThe8u+lVHJvG+dsq3V+AI1x/FWp9t2ovVceb0fhvBzqirKqjpUGqm83u90LN9qj2kC1G53Qelj\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V8KpLJNn8TWn2MQtR8EKZUzKWYzBkTlnoipxggpmtstfcI8neevfN2qtB7mlkkrKyX/R\r\nJU7SNBQ/sgCDzX0aUUecKuN7pvt8tRy9/k1Y8HY+vXafpaEV+ebcpEWQmsG4NXB4lcova8N3Jjde\r\neuH2Bxf+c/WtxdYTc99+4IDCH7zba3+hAjr4YObzcA+i7wxl0o8FXjkbyRzwwCkVRFHTGfAY8PY6\r\n8DK3GicAL/8a3XsDXknbQ0HhdFElb+tlyGPI20/Iy7xtdgLy8u+lLYS8UTGZkh68i9CjjXMzaYqJ\r\ntq/xxgIyex2HezP+cuuz8wDlzQ+f3zz9WeHFsJwHeGRZ4JCi8Trb/+1tfN1f6xx5LHzipm7wo0/3\r\n5luW8wqCvG/J4MR8y/2DueSNYUXCKZl3i90deVHweSCkTEqychwQBWFWBIf/Bw3ayVU=','SELECT \r\n    E.CardNumber as 卡号,\r\n    A.OutlayMode as 支付方式,\r\n    D.CodeName as 消费类型,\r\n    A.BeforFrequency as 前期余次,\r\n    A.Frequency as 充次次数,\r\n    A.BeforMoney as 前期金额,\r\n    A.AddMoney as 充值金额,\r\n    A.DelayDays as 延期天数,\r\n    A.SaleMoney as 应收金额,\r\n    A.FeeMoney as 充值赠送,\r\n    A.RealMoney as 实收金额,\r\n    B.BranchName as 分店,\r\n    A.WorkID as 收银点,\r\n    A.UserName as 操作员,\r\n    A.SaleTime as 日期\r\nFrom\r\n   CardOrder A  LEFT JOIN \r\n   CardList E ON A.CardID = E.CardID  LEFT JOIN \r\n   Branch B ON A.BranchID = B.BranchId LEFT JOIN    \r\n   DefineCode D On A.consumeType = D.CodeID \r\nWhere \r\n    D.Sign =2000 And  \r\n    OrderID >=0  AND \r\n    (consumeType = 2  or consumeType = 3  or consumeType = 5 )\r\norder by E.CardNumber,A.SaleTime','','',1,NULL),(4,'业务报表',0,'卡消费报表','eJztXc1v3MYVvxfo/7BYo0ELJAw5/I6jBrtLrSVEslWv4hRRfKC1XIkIl1yQXEvKKU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yDzGRPjoCTJU0y\r\nbE7DpnS3YDNKasyBzWLyF7Lh/xFwsqg/AygDaHrxjHOPb731Zp7oezHbmUza8QhMWbYxgymDaQqm\r\n0TO5eQBazCtCsvnAE7xclgbMEMoQGiGUJOzmeRSW35VU3VFXl+XTMIQyhKZc3VS+bB6cFvWu/uFM\r\nWYZThlOG021xmkpXzYPTgl6mnUlUZThlOGU43Q6nN350EUCafz0tZmeazRMdwSlLD2U4ZTgdih3R\r\nbM08IC0mDSObpzm6mLL0TAZSBtIUSONUyTxJksXsTLNJkiMgZbmRDKMMoymMvnqhVOqfPZfnNkwx\r\nb0/KZClNuk/KkpMYRBlEMURvfvTTW099LwvQwRfNkyezvTWvEITy8YdzhEwmDL4/AyBURTn9/TWR\r\nJ0/lC0R4p9jMQCr61HxcRtSSMZyCLQx/MacSdKzV8Di2kTGpSZFgDo/9O13TsVMfyFn2TTfoEIMb\r\nJ6PXBgWCAyLIYz6UFOVyjX4wvdFtt01/a+jD4FSWyrP4klNsBplRSeLY2KSzGIVjs85EVeIEFQxt\r\njz/bHk/zzj9q1NgKMosllRSTAaNLnKRpKH5oAQab+R6ijjhVxndND/h6OX4FnLLk7X4W/gFLRMvz\r\noblpyyA1g0mr4Og6lV3YRu959F589ub75/999Y2VxiOL37znkMIf3u5lnlABHb439U24e9G3RhLp\r\nJwKvmK2kyOucjgQpTlCSNPoMPAMeA97+Bl7qoYApwMu+bvvOgFfQ505FDDxdZrhjuDtQuEvfPJyC\r\nu+xLaXPhblxMppgH7yh6tElOJk0x0Q403lhAZr/jcH/GX258cg6g3P/gmf5Tn+ReCot5gCez+VN1\r\n/LiOLLG1cJ/B665a5qKnwrdf4FKferozl7KYdw9kcMRcSuZSHhCspV4UNgVx2VeKbY+7KOY8FEkm\r\nJWk5joKCMC2Cw/8D9RK+tw==','SELECT \r\n    E.CardNumber as 卡号,\r\n    A.OutlayMode as 支付方式,\r\n    D.CodeName as 消费类型,\r\n    A.BeforFrequency as 前期余次,\r\n    A.Frequency as 扣次,\r\n    A.BeforMoney as 前期金额,\r\n    A.AddMoney*-1 as 储值支付,\r\n    A.FeeMoney as 消费折扣,\r\n    A.DelayDays as 延期天数,\r\n    A.SaleMoney as 应收金额,\r\n    A.RealMoney as 其它支付,\r\n    B.BranchName as 分店,\r\n    A.WorkID as 收银点,\r\n    A.UserName as 操作员,\r\n    A.SaleTime as 日期\r\nFrom\r\n   CardOrder A  LEFT JOIN \r\n   CardList E ON A.CardID = E.CardID  LEFT JOIN \r\n   Branch B ON A.BranchID = B.BranchId LEFT JOIN    \r\n   DefineCode D On A.consumeType = D.CodeID \r\nWhere \r\n    D.Sign =2000 And  \r\n    OrderID >=0  AND \r\n    (consumeType = 4  or consumeType = 6  or consumeType = 10 )\r\norder by E.CardNumber,A.SaleTime','','',1,NULL),(5,'商品管理报表',0,'商品库存统计','eJztXc2LHMcVvwfyPywjYhKw21Vd/Wl5Y2amd6zFu9JGs5bBsg6tnZrdxj3dQ3ePdtenOAfHOQgc\r\nhLFDbBJjGx+SQIJtRGTJgQQMToyTQ5KLb8ErGXI2JIRAXn30x/TMaEerXmk36l20M/2quj5evd+v\r\nXlW9bj3+xM7AX7hEo9gLg8UGVlBjgQYbYc8LNhcbo6T/iNV44rvf/Mbj6/1o5ywdhlGysO5CEuQ7\r\nl96lKbai4saCEyarbhJ5MuNiI4lGtLGwFGx6AT0zTCBzrLTDAKpLTo98P56ewwlHF3265saQ3nf9\r\neCLDqruzSgdd7wUKLUaonLwWeUGy3F8aDJPd6TV0PZ8GyWrYozNqOE23i3lib7BK49jdpK1wh8bl\r\n3E/HtAO52+7G1qwClzeDMKIOvdTafZZGYZZrOfDYrYuN57phP9l2I/pcx42TBaFBqOmM3+smu6CO\r\nKNyMaEElaxG95NHttIKm74fbSz0v03opvTVKEvhcbBDdNCdShcpbo36fRrQ3owhQuzcApc9Md5bb\r\nW57fm9VE0KXrz7j3zCjxQV1LO0M3mFW+zHPOi72LPp1Vi8z1jNdLtsA8VDSRYw3GMV4O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qkjPsR6Pb5Vja+4yu/ZZ7yzJ7zzIQ83w2o2wxU2j5I0tE94/1Y20kQzFVgNmEQvBsLCnMyAj7nw\r\nbse9NE2KB/DTNBoUI/IOZdZgMX3NeEg3krNsHpji/cgnwVnfvzdyfa8QwrceuUE85JPKNJmsGxRo\r\nmqCuKaGcwlssOpUiUrAQypkLpjiVMGJsAA/oVBJTU7AJg3xEQjm7o4vim3iTxFgEXCntwQrtZJfm\r\nYRxRIwUjlchHjsaeOrqTs2r1wfaz89jOz77+/T+rsO4KXffxp/D/9PndPIF/WJ57cbsB/98+kF8K\r\n+xwbchH+KY7C5w78rMipx7aCLazuywh3EgBaM8K80d41K9SscHtWOFBQeDXnB+Vw09nkcAdxpzU3\r\nSG748N3PP6p54ajxwlHZ95uDGHh069yUYB1K+NxsSpj/cLFmBMkI73/6m48//vf1L6pnBfEBGlps\r\nfEtV1MEs1jg9GlAYh7skDn5CAKbH9ttqAjmyBFIM7pt/1VHNy0/KIX41j1TIIzf+9dHXNYvULHJP\r\nWESEH94RhVTzuE05ArGmkCoo5H7wRQVrlZosjgVZiCCr+ZmimlOPUhxkTRQV+hq/+8cHN69/8fcP\r\na2+jJpB7RiAiSrNEI+JYPT8vn3w7e3c0GLjR7thLyKVsyuG6JiI2yUFea4x5jIR+jN7Q3t2NSwQs\r\nJdXEFhELKyZRs1iTNGJz8pjJ1hQLEaId3+jO6Zy6T4Bmge1SSr325+ufvH3t7XcY+/Xvjv1UZorH\r\nMRT9Hkd1luIuy8SV8tLTq99+6ISBTs5DUJBRPflwIYznYfydMmmNUVGRt8Zewj7zBewyIks7AFNp\r\n2FZ01WQsd3+Y6mCkVNHrVMqklL2muiajMhn95a3KyAgbJsaGdUwfjnkwGKnwkskiRTGPgv3/lAUR\r\nXP4PviT/Ow==','SELECT \r\n  ID,\r\n  ShortName as 商品名称\r\nFROM\r\n  TabGoods\r\nWHERE ID IN(SELECT DISTINCT(PID) FROM  TabGoods WHERE GoodsType = 0)\r\nORDER BY ID','','SELECT\r\n  GoodsName as 条码,\r\n  ShortName as 商品名称,\r\n  GoodsUnit as 单位,\r\n  BindCost as 定价,\r\n  AverCost as 成本均价,\r\n  EndBuyCost as 进货价,\r\n  GoodsCount as 库存,\r\n  GoodsCount*EndBuyCost AS 库存价值\r\nFROM\r\n  TabGoods\r\nWHERE\r\n  ID > 0   AND\r\n  PID =:ID\r\norder by GoodsName',1,NULL),(6,'商品管理报表',0,'商品销售数量排名','eJztXd9vHMUdf6/U/8G6qKiVyLI7sz8TXHR768MWduLmTKgIedj45s4r9nZPu3uxzRPtA9CHCKqA\r\noAWE2kJRRUupoI1KCGmFhARF8NI+8VZxTvgTWoTU78zO/ri9u/hs1q5J1lF83u/Mzo/vfD+f+c7s\r\nd/buvW+r585dJEHo+N58TRLE2hzx1v2243Xna4Ooc1yv3ffD737n3rVOsHWG9P0gmluzIQnynU3u\r\nkgVDQFJtzvKjFTsKHJ5xvhYFA1KbW/C6jkdO9yPIHAoN34PqolMD1w0n57D8wQWXrNohpHdsNxzL\r\nsGJvrZBey3mMQItFsZi8GjhetNRZ6PWj7ck1tByXeNGK3yZTajhFNvN5Qqe3QsLQ7hLT3yJhMfeD\r\nIWlC7oa9vjGtwKWu5wfEIhfN7YdJ4Ke5ljyH3jpfe6Tld6JNOyCPNO0wmos1CDWddtutaBvUEfjd\r\ngORUshqQiw7ZTCqou66/udB2Uq0X0s1BFMHnfA0rmjaWGqvcHHQ6JCDtKUWA2p0eKH1qurXU2HDc\r\n9rQmgi5td8q9pweRC+pa2Orb3rTyeZ6zTuhccMm0Wniuh5x2tAHmgcSxHKswjuGSx4dLGc+wtjHo\r\nXfBsx92lqtaGv9mw44tpeR72/R40Y6I8Nq7Hehbp2AM3Gm+osx4NgtiulrzYTtJawMYzSPUdEvJa\r\nRuSua0ckU2cujV2QYL72z1c/ujkpLW5cP9+4YpbTXmuDkIiRwXgqUzOU0AfTLKSfIZRxpvSGatVy\r\nbNfvJg2PwZD1qtenSCCZoRUyBAR6bb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+MZX2T17O1VG\r\nL8vZGi0EZevpmmMfsdhSNdUewan2MIKmlDskajIfMj0DRLUDCZYew+geYqQriN6pEJXvFIiyYOYZ\r\nwGkcRBjzGDb3sPlfYbPC5u2NTf5sj0UZz/KkrpwlazG+uMJohdEKo7tglD1YnwWj5Ww7FCN8K4xW\r\nGK0wOg2j/Pn1W0/n38B4C4yW85KTYohthdEKoxVGp65DWaTrLOgs50h9McZ1DJ17CG2t0Fmh8/ZG\r\n584fXxw+9budv/x2FoCWs41bDBitps8KoBVApwH05vUXb77zehyiOQtGS9rNLQRnjmN09pjMCqMV\r\nRm9vjA6vXR7+7FIcO1nEaPp1MlmMit/1SwFpEhaJRIY8PQUnljUBkKjBGjX3ok0sshgliQm/aYhK\r\nAVfx9/wkacTLv/HvQMyMvjOwHvbJenSGGsqEeM1YsEj7/qOB7Tq5VwSuBbYX9pnVTZLxukGBmgbq\r\nmvCqyDjAdfzbalqDXs8Otke+lYXLJkTDYhglQ8H7eVmkbgjIkOhAfku/sYYdJCjnsQaCBR+4i2L6\r\nFnwFeqrT/dgkqgimJsNAqHoV9B5mqtxxoc/++/Hn73723ocnfvMqPTnUKfvkUBVQexQCas+1Hlz5\r\n/myHEO/OvQf3bvSDmQ4NlfN4RFY0ASMs4alYl+g35yJNrrC+L6x/8MbfvqqwXmF9rweOp1JC/vuw\r\nuCsUfx1lTk79CPqV2DkRXP4PWVnMJg==','SELECT \r\n    A.GoodID,\r\n    B.GoodsName as 条码,\r\n    B.ShortName as 商品名称,\r\n    B.GoodsUnit as 单位,\r\n    SUM(A.SaleCount) as 数量,\r\n    SUM(A.VerCost * A.SaleCount) as 成本总额,\r\n    SUM(A.SalePrice * A.SaleCount) as 销售总额,\r\n    B.BindCost as 定价,\r\n    B.AverCost  as 成本均价,\r\n    B.GoodsCount as 库存,\r\n    A.DateTime  as 日期,\r\n    C.WorkID as 收银点,\r\n    C.UserName as 操作员\r\nFrom \r\n    tabsalemx A LEFT JOIN \r\n    tabgoods B ON A.GoodID = B.ID LEFT JOIN \r\n    cardorder C ON A.CardID = C.CardID AND A.OrderID = C.OrderID \r\nGroup BY A.GoodID ORDER BY 数量 DESC','','',1,NULL),(7,'商品管理报表',0,'商品销售季度汇总','eJztXf9v28YV/33A/gdBwfpbWPJIHsmmXmFJVm3UTrzYTYem+YGxzjZRihRIKrb7U7of0hRY0AxN\r\n0Q3tNmBdWwxbuw7Dmi1ZNwwbinUtOmDY/oPIWf6FDR327vhVlORQ7tlVmzNgy3x3vCPf3efz3r2j\r\nHh99bLfr1i6RIHR8b66uSHK9RrwNv+N4W3P1frR50qw/9s2vf+3R9c1g9yzp+UFUW7ehCOqdS8/S\r\nJEtCSr3W8qMVOwqcpOJcPQr6pF5b8LYcj5zpRVA5lJq+B91Fp/uuG46v0fL7F12yaodQvmm74UiF\r\nFXt3hXTXnOcIXLFcLl0NHC9a2lzo9qK98R2sOS7xohW/QyZ0cJrsFOuETneFhKG9RRr+LgnLtZ8M\r\nSRtqN+2N7UkNLm15fkBa5FJj72kS+FmtJc+hp87Vn1nzN6MdOyDPtO0wqsUKhJ7OuJ21aA+0Efhb\r\nASloZDUglxyyk3Yw77r+zkLHyZReKm/0owg+YaxkSx8pjTXe6G9ukoB0JjQBWne6oPOJ5a2l5rbj\r\ndiZdIujSdiece6YfuaCuhd2e7U1qP6lzzgmdiy6Z1EtS6ymnE23D7EDySI1VGMdwyUuGSx+tsL7d\r\n7170bMe9T1dr2/5O044PJtV52ve7cBlj5fHkeq7bIpt2341GL9TZiPpBPK+WvHieZL3AHM8R1XNI\r\nmPQyJHddOyK5Ogtl7IAEc/V//vSjf48riy+uV7y4cpUz3to2IRHjgtFSpmZooQdTs1R+llDCmXA3\r\nVKstx3b9rfTCYzDkd9XtUSSQfKKVKgQE7rrF7lyTkWVImooME2NVscp1WyTcCBx2IK2TXbiXco1l\r\ngGNz2/a2WGsaNiQdmapsyZaB6rU1dvYyFPdtWgNIa8N2Y2laSttNGn/ohKKegj/yqYsE6CE/zP8j\r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ljYTxtaBEIiyI4/D/GXBOA','Select \r\n    GoodID,\r\n    条码,\r\n    商品名称,\r\n    单位,\r\n    sum(一季成本)as 一季成本,\r\n    sum(一季售价) as 一季售价,\r\n    sum(一季销量) as 一季销量,\r\n    sum(二季成本) as 二季成本,\r\n    sum(二季售价) as 二季售价,\r\n    sum(二季销量) as 二季销量,\r\n    sum(三季成本) as 三季成本,\r\n    sum(三季售价) as 三季售价,\r\n    sum(三季销量) as 三季销量,\r\n    sum(四季成本) as 四季成本,\r\n    sum(四季售价) as 四季售价,\r\n    sum(四季销量) as 四季销量,\r\n    定价,\r\n    日期,\r\n    年份,\r\n    季度\r\nFrom (\r\nSELECT \r\n    A.GoodID,\r\n    B.GoodsName as 条码,\r\n    B.ShortName as 商品名称,\r\n    B.GoodsUnit as 单位,\r\n    if(quarter(A.DateTime) =1,sum(A.VerCost * A.saleCount),0) as  一季成本,\r\n    if(quarter(A.DateTime) =1,sum(A.SalePrice* A.saleCount),0) as 一季售价,\r\n    if(quarter(A.DateTime) =1,SUM(A.saleCount),0) as 一季销量,\r\n    if(quarter(A.DateTime) =2,sum(A.VerCost * A.saleCount),0) as 二季成本,\r\n    if(quarter(A.DateTime) =2,sum(A.SalePrice* A.saleCount),0) as 二季售价,\r\n    if(quarter(A.DateTime) =2,SUM(A.saleCount),0) as 二季销量,\r\n    if(quarter(A.DateTime) =3,sum(A.VerCost * A.saleCount),0) as 三季成本,\r\n    if(quarter(A.DateTime) =3,sum(A.SalePrice* A.saleCount),0) as 三季售价,\r\n    if(quarter(A.DateTime) =3,SUM(A.saleCount),0) as  三季销量,\r\n    if(quarter(A.DateTime) =4,sum(A.VerCost * A.saleCount),0) as 四季成本,\r\n    if(quarter(A.DateTime) =4,sum(A.SalePrice* A.saleCount),0) as 四季售价,\r\n    if(quarter(A.DateTime) =4,SUM(A.saleCount),0) as 四季销量,\r\n    B.BindCost as 定价,\r\n    A.DateTime  as 日期,\r\n    year(A.DateTime) as 年份,\r\n    quarter(A.DateTime) as 季度\r\nFrom \r\n    tabsalemx A LEFT JOIN \r\n    tabgoods B ON A.GoodID = B.ID \r\nGroup BY 季度,A.GoodID  [WHEREPOIN]  ORDER BY 年份,季度,A.GoodID) W Group BY GoodID','年份,=,2010,0\r\n','',1,NULL),(8,'商品管理报表',0,'商品销售额排名','eJztXd+PG8Udf6/U/+HkqKiVyLI7sz8Trsj2nrkTd8k1PkLFkYfNeWyvWO9au+vcHU+0D0AfIqgC\r\nghYQagtFFS2lgjYqIaQVEhIUwUv7xFuFL+FPaBFSvzM7+8NrO2cfe+mR7EU5335ndn585/v5zHdm\r\nv7O+976dnrNwgfiB7bmLFUkQKwvE3fJatttZrAzC9nG9ct8Pv/udezfa/s4Z0vf8cGHDgiTIdza+\r\nSxYMAUmVBdML16zQt3nGxUroD0hlYcnt2C453Q8hcyDUPReqC08NHCeYnMP0Bucdsm4FkN62nGAs\r\nw5q1s0Z6TfsxAi0WxXzyum+74Up7qdcPdyfX0LQd4oZrXotMqeEU2c7mCezeGgkCq0Nq3g4J8rkf\r\nDEgDctetre60Alc6rucTk1yo7T5MfC/JteLa9NbFyiNNrx1uWz55pGEF4UKkQajptNNqhrugDt/r\r\n+CSjknWfXLDJdlxB1XG87aWWnWg9l14bhCF8LlawomljqZHKa4N2m/ikNaUIULvdA6VPTTdX6l3b\r\naU1rIujScqbce3oQOqCupZ2+5U4rn+c5awf2eYdMq4XneshuhV0wDySO5ViHcQxWXD5cyniGje6g\r\nd961bGefqppdb7tuRRfT8jzseT1oxkR5ZFyP9UzStgZOON5Qeysc+JFdrbiRnSS1gI2nkOrbJOC1\r\njMgdxwpJqs5MGrsg/mLln69+dGNSWtS4frZx+Syn3WaXkJCRwXgqUzOU0AfTzKWfIZRxpvSGatW0\r\nLcfrxA2PwJD2qtenSCCpoeUy+AR6bbKeyyIyNEHGSNNVFUtGPq9Jgi3fZhfCBtmBvuRzrAIc613L\r\n7dDSJKxJgiwhWdSxLENpTXb3KiQPLJoDWGvLciJpnErL5YXfd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fzjs3/EpslNm9vbPJneyzKeJYndcUsWfPxxSVGS4yWGN0Ho+zB+iwYLWbbIR/hW2K0xGiJ\r\n0WkY5c+v33o6+wbGm2C0mJec5ENsS4yWGC0xOnUdyiJdZ0FnMUfq8zGuY+icI7S1RGeJztsbnXt/\r\nfHH41O/2/vLbWQBazDZuPmC0nD5LgJYAnQbQG9devPHO61GI5iwYLWg3NxecOY7R2WMyS4yWGL29\r\nMTq8emn4s4tR7GQeo8nXyaQxKl7HKwSkSVhkEu/HzRvLmgBI1GCNmnnRJhZZjJLEhN80RCWHq+h7\r\nfuI04mbf+HcoZkbfGVgN+mQrPEMNZUK8ZiRYpn3/0cBy7MwrAjd8yw36zOomyXjdoEBNA3VNeFVk\r\nFOA6/m01zUGvZ/m7I9/KwmUTomExjJKh4IO8LFI3BGRIdCC/pd9Yww4SFPNYA8GCD9xFMXkLvgI9\r\n1el+bBxVBFOTYSBUvgp6jpkqc1zos/9+/Pm7n7334YnfvEpPDrWLPjlUBtQehYDazeaDa9+f7RDi\r\n3Zn34N6NfjDToaFiHo/IiiZghCU8FesS/eZcpMkl1g+E9Q/e+NtXJdZLrM974HgqJWS/D4u7QtHX\r\nUWbk1I+gX4mdEcHl/wDAJMw+','SELECT \r\n    A.GoodID,\r\n    B.GoodsName as 条码,\r\n    B.ShortName as 商品名称,\r\n    B.GoodsUnit as 单位,\r\n    SUM(A.SaleCount) as 数量,\r\n    SUM(A.VerCost * A.SaleCount) as 成本总额,\r\n    SUM(A.SalePrice * A.SaleCount) as 销售总额,\r\n    B.BindCost as 定价,\r\n    B.AverCost  as 成本均价,\r\n    B.GoodsCount as 库存,\r\n    A.DateTime  as 日期,\r\n    C.WorkID as 收银点,\r\n    C.UserName as 操作员\r\nFrom \r\n    tabsalemx A LEFT JOIN \r\n    tabgoods B ON A.GoodID = B.ID LEFT JOIN \r\n    cardorder C ON A.CardID = C.CardID AND A.OrderID = C.OrderID \r\nGroup BY A.GoodID ORDER BY 销售总额 DESC','','',1,NULL),(9,'商品管理报表',0,'商品销售利润排名','eJztXd9vHMUdf6/U/+F0UVErwbI7sz8TXHR368MWduLmTKgIedj45s4r9nZPu3uxzRPtA9CHCKqA\r\noAWE2kJRRUupoI1KCLRCQoIieGmfeKs4J/wJLULqd2Znf9zenX1n1qmJ11F83u/Mzo/vfD+f+c7s\r\nd/buuXe751QuET+wPXehKglitULcDa9tu92F6iDs3KVX7/3hd79zz3rH3z5L+p4fVtYtSIJ85+K7\r\nZMEQkFStmF64aoW+zTMuVEN/QKqVRbdru+RMP4TMgdDwXKguPD1wnGByDtMbXHTImhVAesdygrEM\r\nq9b2Kum17EcJtFgU88lrvu2Gy53FXj/cmVxDy3aIG656bTKlhtNkK5snsHurJAisLql72yTI534g\r\nIE3I3bA2NqcVuNx1PZ+Y5FJ95yHie0muZdemty5UH255nXDL8snDTSsIK5EGoaYzTrsV7oA6fK/r\r\nk4xK1nxyySZbcQU1x/G2Ftt2ovVcen0QhvC5UMWKpo2lRiqvDzod4pP2lCJA7XYPlD413VxubNpO\r\ne1oTQZeWM+XeM4PQAXUtbvctd1r5PM85O7AvOmRaLTzXg3Y73ATzQOJYjjUYx2DZ5cOljGdY3xz0\r\nLrqW7exTVWvT22pY0cW0PA95Xg+aMVEeGdejPZN0rIETjjfU3ggHfmRXy25kJ0ktYOMppPo2CXgt\r\nI3LHsUKSqjOTxi6Iv1D95ysf3ZyUFjWun21cPssZt7VJSMjIYDyVqRlK6INp5tLPEso4U3pDtWra\r\nluN144ZHYEh71etTJJDU0HIZfAK9NlnPZREZmiBjpOmqiiUjn9ckwYZvswthnWxDX/I5VgCOjU3L\r\n7dLSJKxJgiwhVdFFQ8TVSovdvQLJA4vmANbasJxIGqfScnnhd5yQ8Cn4JZ66SIAe0sv0L+K2BbgT\r\nlDAG+VYIHLLsms3VWDMwAqHlhzHf+v0RAVWs1wdFWDBEstxQFVXVZBE3dFEUsSKrTU0UkSKKuiyr\r\nkkb/Y1XRZA2LEvxrYCSyHyTG6QpLxyZ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g+H706hs45glZLdJbovL3RGcWM7v7l\r\nt7MAtJht3HzAaDl9lgAtAToNoDfff+Hm269FIZqzYLSg3dxccOY4RmePySwxWmL09sbo8PqV4c8u\r\nR7GTeYwmXxSTxqh4Xa8YkNLdXCXeKUqj/riRY1kTAI8arFQzL9LEIotUkpjwmwaq5NAVfY9PnEbc\r\n7Bv9DsXY6DsBa0GfbIRnqblMiNqMBEu07z8aWI6deQXgum+5QZ/Z3iQZrxsUqGmgrgmvgozCXMe/\r\njaY16PUsf2fkW1e4bEJMLIZRYqM4/8sgdUNAhkQH8lv6jTTsOEExDzcQLPvAaRSTt9wr0FOd7srG\r\nsUUwQRkGQuWrnueYrzKHhj7778efv/PZux+e/M0r9PxQp+jzQ2VY7VEIqz3femD1+3ecUMVTe73L\r\nBDKgU3dm3nN7J/rBTEeHinlIIiuagBGW8FSsS/SbcZEml1g/ENbpGeUS68cS65lDxHujPPsVVty7\r\nib5BMiOnrgH9FuuMCC7/B6ubrd0=','SELECT \r\n    A.GoodID,\r\n    B.GoodsName as 条码,\r\n    B.ShortName as 商品名称,\r\n    B.GoodsUnit as 单位,\r\n    SUM(A.SaleCount) as 数量,\r\n    SUM(A.VerCost * A.SaleCount) as 成本总额,\r\n    SUM(A.SalePrice * A.SaleCount) as 销售总额,\r\n    SUM(A.SalePrice * A.SaleCount-A.VerCost * A.SaleCount) as 毛利,\r\n    B.BindCost as 定价,\r\n    B.AverCost  as 成本均价,\r\n    B.GoodsCount as 库存,\r\n    A.DateTime  as 日期,\r\n    C.WorkID as 收银点,\r\n    C.UserName as 操作员\r\nFrom \r\n    tabsalemx A LEFT JOIN \r\n    tabgoods B ON A.GoodID = B.ID LEFT JOIN \r\n    cardorder C ON A.CardID = C.CardID AND A.OrderID = C.OrderID \r\nGroup BY A.GoodID ORDER BY 毛利 DESC','','',1,NULL),(10,'综合报表',0,'会员消费按月汇总图','eJztG01vJEf1jsR/sCYSt3Tqu7qTmGj6K2vFXpu1sytls4deT4+nlZ7uUXf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nZICSWPvAjzJpSCygjOm+fadIP+LHGvhln/j13oeVHwDVc2H5ieTC07obfqynvr0Y5rPwuLinXvis\r\neM9ZfYmizv6deRBH6lOXaqOjLEjymX57tApW7Q0ChCoM8xXvj8sXw+UHVy8tfnGlPvrugGD4Hw2Y\r\nQyA=','SELECT \r\n    F.TypeName as 卡型,\r\n    SUM(A.Frequency) as 次数,\r\n    SUM(A.AddMoney)*-1 as 储值支付,\r\n    SUM(A.SaleMoney) as 应收金额,\r\n    SUM(A.RealMoney) as 支付金额,\r\n    SUM(A.FeeMoney)  as ZS,\r\n    B.BranchName as 分店,\r\n    A.WorkID as 收银点,\r\n    A.UserName as 操作员,\r\n    DATE_FORMAT(SaleTime,\"%Y-%m\") as 年份\r\nFrom\r\n   CardOrder A  LEFT JOIN \r\n   CardList E ON A.CardID = E.CardID  LEFT JOIN \r\n   CardType F ON F.TypeID=E.TypeID    LEFT JOIN \r\n   Branch B ON A.BranchID = B.BranchId\r\nWhere \r\n    OrderID >=0  AND\r\n    (consumeType = 4  or consumeType = 6  or consumeType = 10 )\r\nGROUP BY 卡型,年份,分店,收银点,操作员\r\norder by 年份',NULL,'',1,NULL),(11,'综合报表',0,'会员充值按月汇总图','eJztG8tu5MbxHiD/MBgDuZnud5O2FWP48gqWVspK3gW83gNXQ2kIc8gByVlJPhkBnDhADCTIwXkY\r\nyCVGDrkkJyOJnXuCHJM/sNb5iQCpbj6HM6Pd1Up2DI8WK6qrq6ur69XVrOarr51N48GjMMujNNka\r\nYgMNB2FylI6j5GRrOC+OXzSHr33/u9959fA4O7sTztKsGBwG0AV4d+tRzLAMgocDNy12gyKLKsSt\r\nYZHNw+HAS06iJNybFYCcG06awHTF7Xkc56sx3HT+MA73gxz6j4M4X0LYDc52w+lB9G4IHCPU797P\r\noqTYPvams+J89QwHURwmxW46DtfMcDs87eLk0XQ3zPPgJLTTszDvY7+Zhz5gO8HRZB3B7ZMkzUI3\r\nfGSfvxVmaYO1nURq6Nbw7YP0uDgNsvB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nGOqQNDsYUt1zKR3dJT\r\nlq8uESgpgu5lOcLzbX/EKSIeRWBYhEltEUrO2k60x1nKI0t9aelLZEMsYGXM6PopcrjZzqglVRXG\r\nwWIxN8Fi+/1NXNBUQW5MXYvQVqq5AIsHqtZaqrTUHVDu43QpC025tgj0lFrH16P1HpUlCSs7KP30\r\nUku9YduxPG5T8KWN7VyL7dBvRsRQWldRY6P1a9E6+2ZoXSDTRdi68j6BlE64jlhYqvgEckC+wIyW\r\nuZLO2XoY3yJLQd3ca12mBPbUsZz62l51AY8h3LsKCBagsiZ9kQ8koq7x1X3L1/5u4soggfy1HN+u\r\nXuGARJvVa6xSc57qA3tRELPLvcpom8y2plplphT3ZvWIIBBLKaO2w7yRLV23hSyNJutHu3Qk1CVD\r\n2/XBFDzvEir0mXkwF8Y/62jr6UZftoLyOqItly6Qfjus5jK9w/HNNm2xRu9PK/tLqGxkv9beRzak\r\nlB57PtlfRmUj+7UWy3zLsR33Oe3+EiqovT28rmqgPgq4nloeswxqMcLrm0vSwNjEpH0baJqGBUmU\r\nlNbmEsNXdO1wU837/6hcfPTJ449/+/LgvvK2B4PB/cNoCs+nuEdx1Tf1vctFC/coODUIFaq6176n\r\npwbmiJibaxQ3c41ihWav5zJlT7PSQIJYkqONcq9RuWWrHfMEZTffn7T6Tk/S61F3vbkiA9Ig1pba\r\nKJOGxEJS3q3KU6Q9HWvg82q8ty2WHwbVfWH56eSCAq55l1DfZIzyWXhU3FFxf0X9s/pCRa39B/Mg\r\njtQnMNVEh1mQ5DO9iayCVXODAKUEca2oK5cF4/JDrJcWv8RSH4N3QND8H9ykSR4=','SELECT \r\n    F.TypeName as 卡型,\r\n    SUM(A.Frequency) as 次数,\r\n    SUM(A.AddMoney) as 实充金额,\r\n    SUM(A.SaleMoney) as 应收金额,\r\n    SUM(A.RealMoney) as 支付金额,\r\n    SUM(A.FeeMoney)  as 赠送金额,\r\n    B.BranchName as 分店,\r\n    A.WorkID as 收银点,\r\n    A.UserName as 操作员,\r\n    DATE_FORMAT(SaleTime,\"%Y-%m\") as 年份\r\nFrom\r\n   CardOrder A  LEFT JOIN \r\n   CardList E ON A.CardID = E.CardID  LEFT JOIN \r\n   CardType F ON F.TypeID=E.TypeID    LEFT JOIN \r\n   Branch B ON A.BranchID = B.BranchId\r\nWhere \r\n    OrderID >=0  AND\r\n    (consumeType = 2  or consumeType = 3 or consumeType = 5 )\r\nGROUP BY 卡型,年份,分店,收银点,操作员\r\norder by 年份','','',1,NULL),(12,'综合报表',0,'会员充值按卡型汇总图','eJztG8tu5MbxHiD/MBgDuZnud5O2N8aQnPEKllbKSt4FvN4DV0NpCHPIAclZST4ZAZwHEgMJcnAe\r\nRoIAMXLIJTkZSezcE+SY/EG0zk8ESHU3X8N5rFYrOTGsAXaprq6u6q5XV7Oar752Oo17j8Msj9Lk\r\nVh9bqN8Lk8N0HCXHt/rz4uhFu//aN7/+tVcPjrLTu+EszYreQQBdgHevGsUsxyK43/PTYicosqhE\r\nvNUvsnnY7w2T4ygJd2cFIOeWlybArrgzj+N8NYafzh/F4V6QQ/9REOdLCDvB6U443Y/eDWHGqNu7\r\nl0VJsXU0nM6Ks9UM9qM4TIqddByuYXAnPGnj5NF0J8zz4Dh009Mw72K/mYcjwPaCw8k6glvHSZqF\r\nfvjYPXsrzNIaayuJ1NBb/bf306PiJMjCt0dBXvSMAIHTbjzeL85AGll6nIUtiexl4eMoPKkYDOI4\r\nPRmOo1ronX53XhTwBF0hhy/1Gom786OjMAvHa0iA1KMpyHxtv7/lTaJ4vG6KIMsgXjN2d17EIK7h\r\n6SxI1tEvce5FefQoDtdxKbHuR+NiAtZB0BLGHugx30pKdfFlhIPJfPooCaL4Kaz2J+mJF5jGOpy3\r\n0nQK01gJN8b17tQPj4J5XCxPNDos5pmxq63E2EnNBWy88ahZFOYllwV4HAdF2Iiz1acbYXar/4/f\r\n/PXfq/rM5GbtyXVRdpP9SRgWOhYs92oxA4UZmGan/26oAs6a1Sip+lEQp8fVxI0zNKuazpQnhI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+wPjNbz25fnOqPJ+tE+HQhv4HPXH4EpDIcbqNBnnoO9MP5Z\r\nRzsXG71pBeaioiuXrot+Naxmk97h+Obarlij94vKfgOVG9mvk5o3cCGlHLLnk/0mKjeyX2uxbOR4\r\nruc/p91voIKae8TrygbqK4CrKeYxx6IOI7y6uiQtjG1MmreBtm05kERJ6dzcYviCrh7elPP+P0oX\r\nH3785KNfvdx7oLztYa/34CCawvMCFyku+6a+c7to4SIFpxahQpX3mvf01MIcEfvmHsX13KNYodmr\r\nuU3Z0ay0kCCO5OhGuVeoXNNqxjxF2fWXKI2+0+P0StRd3wtGFqRBrCm1USYtiYWkvF2Wp0h7OtbA\r\n59V4Z1s0nwhVfaH5VnJBAVe8S6ivMwb5LDws7qq4v6L+WX6rotb+rXkQR+pjmJLRQRYk+UxvIqtg\r\nJW8QoJQgrhWFZVMxNp9kvbT4TZb6+LsFguZ/Aad/Rtc=','SELECT \r\n    F.TypeName as 卡型,\r\n    SUM(A.Frequency) as 次数,\r\n    SUM(A.AddMoney) as 实充金额,\r\n    SUM(A.SaleMoney) as 应收金额,\r\n    SUM(A.RealMoney) as 支付金额,\r\n    SUM(A.FeeMoney)  as 赠送金额,\r\n    B.BranchName as 分店,\r\n    A.WorkID as 收银点,\r\n    A.UserName as 操作员,\r\n    DATE_FORMAT(SaleTime,\"%Y-%m\") as 年份\r\nFrom\r\n   CardOrder A  LEFT JOIN \r\n   CardList E ON A.CardID = E.CardID  LEFT JOIN \r\n   CardType F ON F.TypeID=E.TypeID    LEFT JOIN \r\n   Branch B ON A.BranchID = B.BranchId\r\nWhere \r\n    OrderID >=0  AND\r\n    (consumeType = 2  or consumeType = 3 or consumeType = 5 )\r\nGROUP BY 卡型\r\norder by 年份','','',1,NULL),(13,'综合报表',0,'会员消费按卡型汇总图','eJztG11v5Fb1HYn/EE0l3ure72u3DdXYnulGTTZhk+5K3e6DN+MkVj32yPZskj4hHqAIKoF4KB8V\r\nCImKB15AQlQFyjuIR/gHzbZ/Aolzru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375zYh7xUwP8vE/8Ou/Dym+A6rmw/Epy7mndNT/Ww88v+vkk\r\nPCzu4AufJe85q49R8OzfmgZxhF+7VBsdZEGST8zbo2Wwam8QIFRhVC55f1y+GC6/uXph/qMr/O67\r\nBYLhfwE2O0Ut','SELECT \r\n    F.TypeName as 卡型,\r\n    SUM(A.Frequency) as 次数,\r\n    SUM(A.AddMoney)*-1 as 储值支付,\r\n    SUM(A.SaleMoney) as 应收金额,\r\n    SUM(A.RealMoney) as 支付金额,\r\n    SUM(A.FeeMoney)  as ZS,\r\n    B.BranchName as 分店,\r\n    A.WorkID as 收银点,\r\n    A.UserName as 操作员,\r\n    DATE_FORMAT(SaleTime,\"%Y-%m\") as 年份\r\nFrom\r\n   CardOrder A  LEFT JOIN \r\n   CardList E ON A.CardID = E.CardID  LEFT JOIN \r\n   CardType F ON F.TypeID=E.TypeID    LEFT JOIN \r\n   Branch B ON A.BranchID = B.BranchId\r\nWhere \r\n    OrderID >=0  AND\r\n    (consumeType = 4  or consumeType = 6  or consumeType = 10 )\r\nGROUP BY 卡型\r\norder by 年份','','',1,NULL);

/*Table structure for table `rulerbindgroup` */

DROP TABLE IF EXISTS `rulerbindgroup`;

CREATE TABLE `rulerbindgroup` (
  `RulerID` int(4) NOT NULL,
  `WkGroupID` int(4) NOT NULL,
  `BranchID` int(4) NOT NULL,
  PRIMARY KEY  (`RulerID`,`WkGroupID`,`BranchID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `rulerbindgroup` */

/*Table structure for table `rulerinbranch` */

DROP TABLE IF EXISTS `rulerinbranch`;

CREATE TABLE `rulerinbranch` (
  `RulerID` int(4) default NULL,
  `BranchID` int(4) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `rulerinbranch` */

/*Table structure for table `salegroup` */

DROP TABLE IF EXISTS `salegroup`;

CREATE TABLE `salegroup` (
  `GroupID` int(4) NOT NULL,
  `GroupName` varchar(30) default NULL,
  `GroupType` int(1) default '0',
  `BindItem` int(4) default '-1',
  `awayState` int(1) default '0',
  `YuShouMoney` decimal(8,2) default '0.00' COMMENT '预付费',
  `YuYueMoney` decimal(8,2) default '0.00' COMMENT '散客预约预收',
  PRIMARY KEY  (`GroupID`),
  UNIQUE KEY `GroupName` (`GroupName`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `salegroup` */

/*Table structure for table `servicetype` */

DROP TABLE IF EXISTS `servicetype`;

CREATE TABLE `servicetype` (
  `SerTypeID` int(4) unsigned NOT NULL auto_increment,
  `SerTypeName` varchar(20) default NULL,
  PRIMARY KEY  (`SerTypeID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `servicetype` */

/*Table structure for table `servicetypesetgroup` */

DROP TABLE IF EXISTS `servicetypesetgroup`;

CREATE TABLE `servicetypesetgroup` (
  `SerTypeID` int(4) NOT NULL,
  `WkrGroupID` int(4) NOT NULL,
  `BranchID` int(4) NOT NULL,
  `SecondWkr` int(4) default '0',
  `SecondBak` int(4) default '0',
  `ThirdWkr` int(4) default '0',
  `ThirdBak` int(4) default '0',
  PRIMARY KEY  (`SerTypeID`,`WkrGroupID`,`BranchID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `servicetypesetgroup` */

/*Table structure for table `sysparam` */

DROP TABLE IF EXISTS `sysparam`;

CREATE TABLE `sysparam` (
  `PName` varchar(200) NOT NULL,
  `SysId` int(11) NOT NULL,
  `PValue` text,
  `Remark` varchar(200) default NULL,
  PRIMARY KEY  (`PName`,`SysId`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `sysparam` */

insert  into `sysparam`(`PName`,`SysId`,`PValue`,`Remark`) values ('AlwaysCountTimeSegInfo',0,'False',NULL),('AutoUpdateParams',0,'0',NULL),('AutoUpdateParams',1,'1',NULL),('BirthDayPrompt',0,'1',NULL),('BirthDayPrompt',1,'7',NULL),('CanUserCardLogout',0,'True',NULL),('CanUserCardLogoutBalance',0,'True',NULL),('CanUserCardLogoutForegift',0,'True',NULL),('CardDevPort',0,'100',NULL),('CardTimerInterval',0,'250',NULL),('ClientBaudrate',0,'3',NULL),('ClientCommSleep1',0,'80',NULL),('ClientCommSleep2',0,'3000',NULL),('CollectshipList',0,'现金\r\n支票\r\n银行卡',NULL),('CraftshipList',0,'政府\r\n',NULL),('DisPresent',0,'0',NULL),('FrequencyList',0,'0\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n',NULL),('GoodsUnitList',0,'吨\r\nKG\r\n盒\r\n听\r\n瓶\r\n次',NULL),('ImmediatelyDownloadBlack',0,'False',NULL),('LostCardListChang',1,'True',NULL),('MaxUserCardBalance',0,'16000000',NULL),('MemberHeadshipList',0,'学生\r\n老师\r\n打杂\r\n',NULL),('ReportTypeList',0,'综合报表\r\n普通报表\r\n业务报表\r\n商品管理报表\r\n',NULL),('SalePrintSet',0,'False',NULL),('SalePrintSet',1,'False',NULL),('SalePrintSet',2,'False',NULL),('SalePrintSet',3,'False',NULL),('SoftVersionID',0,'20110216',NULL),('SysCardSector',1,'0',NULL),('SysCardSector',2,'0',NULL),('SysCardType',0,'False',NULL),('SysCardType',1,'False',NULL),('SysCardUID',0,'53DD9D48913CDD2C0088EB7FB80E0F7D',NULL),('SysDataWebConnect',0,'False',NULL),('SysDebugModule',0,'True',NULL),('SysInstallUUID',0,'{5C31F5BB-CB60-4D03-B4F0-8A0C8AE95186}',NULL),('SysManagerFlag',0,'B67759D3EDFF020AD9D24E00F6CE4E00',NULL),('SysMenu',0,'<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n<MenuConfig><MainMenu>\r\n    <Item Caption=\"系统功能(&amp;S)\" ModuleId=\"\" Desc=\"\" Icon=\"\">\r\n      <Item Caption=\"界面设置(&amp;S)...\" ModuleId=\"100100\" Desc=\"\" Icon=\"lightning_bolt16_h.bmp\"/>\r\n      <Item Caption=\"到主界面(&amp;R)...\" ModuleId=\"16\" Desc=\"\" Icon=\"list16.bmp\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"操作员管理(&amp;O)...\" ModuleId=\"100300\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"工作站管理(&amp;W)...\" ModuleId=\"100200\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"系统初始化(&amp;I)...\" ModuleId=\"200500\" Desc=\"\" Icon=\"db_sql_execute16_h.bmp\"/>\r\n      <Item Caption=\"参数设置\" ModuleId=\"100110\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"菜单编辑器\" ModuleId=\"100400\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"切换操作员\" ModuleId=\"19\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"修改密码(&amp;P)...\" ModuleId=\"11\" Desc=\"\" Icon=\"key16_h.bmp\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"退出系统(&amp;X)\" ModuleId=\"-1\" Desc=\"\" Icon=\"\"/>\r\n    </Item>\r\n    <Item Caption=\"基础信息(&amp;M)\" ModuleId=\"\" Desc=\"\" Icon=\"\">\r\n      <Item Caption=\"数据站点(&amp;Y)...\" ModuleId=\"300100\" Desc=\"\" Icon=\"db_sql_procedure16_h.bmp\"/>\r\n      <Item Caption=\"站点注册(&amp;R)...\" ModuleId=\"12\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"卡型设置(&amp;T)...\" ModuleId=\"200100\" Desc=\"\" Icon=\"group_user16_h.bmp\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"手持站点登记\" ModuleId=\"100201\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"手持机操作员\" ModuleId=\"100202\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"商品资料\" ModuleId=\"200300\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"商品入库\" ModuleId=\"200400\" Desc=\"\" Icon=\"\"/>\r\n    </Item>\r\n    <Item Caption=\"卡务管理(&amp;C)\" ModuleId=\"\" Desc=\"\" Icon=\"\">\r\n      <Item Caption=\"发卡管理(&amp;M)...\" ModuleId=\"400100\" Desc=\"\" Icon=\"db_register16.bmp\"/>\r\n      <Item Caption=\"激活帐户(&amp;A)...\" ModuleId=\"400102\" Desc=\"\" Icon=\"user_properties16_h.bmp\"/>\r\n      <Item Caption=\"充次加款(&amp;R)...\" ModuleId=\"400500\" Desc=\"\" Icon=\"filter16_h.bmp\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"消费扣款(&amp;C)...\" ModuleId=\"400600\" Desc=\"\" Icon=\"4.bmp\"/>\r\n      <Item Caption=\"挂失补卡(&amp;K)...\" ModuleId=\"400700\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"强制回收(&amp;B)...\" ModuleId=\"400900\" Desc=\"\" Icon=\"user_permissions16_h.bmp\"/>\r\n      <Item Caption=\"业务撤消\" ModuleId=\"400950\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"补打小票\" ModuleId=\"13\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"交班结帐\" ModuleId=\"500600\" Desc=\"\" Icon=\"db_register16.bmp\"/>\r\n      <Item Caption=\"消费结算\" ModuleId=\"500510\" Desc=\"\" Icon=\"db_sql_execute16_h.bmp\"/>\r\n      <Item Caption=\"预售记帐\" ModuleId=\"200600\" Desc=\"\" Icon=\"db_sql_procedure16_h.bmp\"/>\r\n      <Item Caption=\"禁用卡列表\" ModuleId=\"200800\" Desc=\"\" Icon=\"\"/>\r\n    </Item>\r\n    <Item Caption=\"报表管理\" ModuleId=\"\" Desc=\"\" Icon=\"\">\r\n      <Item Caption=\"人员信息表\" ModuleId=\"500100\" Desc=\"\" Icon=\"users16_h.bmp\"/>\r\n      <Item Caption=\"帐户余额表\" ModuleId=\"500200\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"消费流水明晰表\" ModuleId=\"500300\" Desc=\"\" Icon=\"binoc16_h.bmp\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"结帐记录查询\" ModuleId=\"500400\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"交班记录查询\" ModuleId=\"500700\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"预售记帐\" ModuleId=\"200600\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"消费明细时段查询\" ModuleId=\"500901\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"激活操作记录查询\" ModuleId=\"500902\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"回收操作查询\" ModuleId=\"500903\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"卡历史状态查询\" ModuleId=\"500904\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"换卡操作记录查询\" ModuleId=\"500905\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"自定义报表\" ModuleId=\"900000\" Desc=\"\" Icon=\"db_sql_execute16_h.bmp\"/>\r\n      <Item Caption=\"生日查询\" ModuleId=\"400152\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"事件提醒\" ModuleId=\"400250\" Desc=\"\" Icon=\"\"/>\r\n    </Item>\r\n    <Item Caption=\"数据管理(&amp;B)\" ModuleId=\"\" Desc=\"\" Icon=\"\">\r\n      <Item Caption=\"数据库备份(&amp;B)...\" ModuleId=\"600100\" Desc=\"\" Icon=\"compress16_h.bmp\"/>\r\n      <Item Caption=\"数据库还原(&amp;R)...\" ModuleId=\"600200\" Desc=\"\" Icon=\"edit_square16_h.bmp\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"数据初始化(&amp;I)...\" ModuleId=\"200500\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"手持数据采集\" ModuleId=\"700100\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"查询分析器\" ModuleId=\"100600\" Desc=\"\" Icon=\"\"/>\r\n    </Item>\r\n    <Item Caption=\"帮助信息(&amp;H)\" ModuleId=\"\" Desc=\"\" Icon=\"\">\r\n      <Item Caption=\"关于本系统(&amp;A)...\" ModuleId=\"15\" Desc=\"\" Icon=\"about16_h.bmp\"/>\r\n      <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"系统注册(&amp;R)...\" ModuleId=\"12\" Desc=\"\" Icon=\"\"/>\r\n      <Item Caption=\"帮助内容(&amp;H)\" ModuleId=\"-3\" Desc=\"\" Icon=\"\"/>\r\n    </Item>\r\n  </MainMenu><NavBar>\r\n    <Item Caption=\"系统功能\" ModuleId=\"13\" Desc=\"\" Icon=\"参数设置.png\">\r\n      <Item Caption=\"参数设置\" ModuleId=\"100110\" Desc=\"\" Icon=\"参数3.png\"/>\r\n      <Item Caption=\"界面风格\" ModuleId=\"100100\" Desc=\"\" Icon=\"参数4.png\"/>\r\n      <Item Caption=\"切换操作员\" ModuleId=\"19\" Desc=\"\" Icon=\"切换操作员.png\"/>\r\n      <Item Caption=\"返回主界面\" ModuleId=\"10\" Desc=\"\" Icon=\"界面风格.png\"/>\r\n      <Item Caption=\"修改密码\" ModuleId=\"11\" Desc=\"\" Icon=\"MM.bmp\"/>\r\n    </Item>\r\n    <Item Caption=\"基础信息\" ModuleId=\"\" Desc=\"\" Icon=\"Toolbar _ Find.png\">\r\n      <Item Caption=\"操作员\" ModuleId=\"100300\" Desc=\"\" Icon=\"MSN.png\"/>\r\n      <Item Caption=\"卡型设置\" ModuleId=\"200100\" Desc=\"\" Icon=\"卡型设置.png\"/>\r\n      <Item Caption=\"分店管理\" ModuleId=\"300100\" Desc=\"\" Icon=\"Orion (Pearl) V1a Icon 56.png\"/>\r\n      <Item Caption=\"收银点\" ModuleId=\"100200\" Desc=\"\" Icon=\"工作站管理.png\"/>\r\n    </Item>\r\n    <Item Caption=\"商品管理\" ModuleId=\"\" Desc=\"\" Icon=\"Orion (Universal) V1b Icon 25.png\">\r\n      <Item Caption=\"商品资料\" ModuleId=\"200300\" Desc=\"\" Icon=\"Orion (Amber) V1a Icon 175.png\"/>\r\n      <Item Caption=\"商品入库\" ModuleId=\"200400\" Desc=\"\" Icon=\"Orion (Amber) V1a Icon 156.png\"/>\r\n    </Item>\r\n    <Item Caption=\"报表管理\" ModuleId=\"\" Desc=\"\" Icon=\"报表管理.png\">\r\n      <Item Caption=\"设计报表\" ModuleId=\"900000\" Desc=\"\" Icon=\"Orion (Universal) V1b Icon 124.png\"/>\r\n      <Item Caption=\"个人信息\" ModuleId=\"500100\" Desc=\"\" Icon=\"Orion (Universal) V1b Icon 149.png\"/>\r\n      <Item Caption=\"帐户信息\" ModuleId=\"500200\" Desc=\"\" Icon=\"Orion (Universal) V1b Icon 86.png\"/>\r\n    </Item>\r\n    <Item Caption=\"手持管理\" ModuleId=\"\" Desc=\"\" Icon=\"WalkMan.png\">\r\n      <Item Caption=\"手持机操作员\" ModuleId=\"100202\" Desc=\"\" Icon=\"手持用户.png\"/>\r\n      <Item Caption=\"手持站点登记\" ModuleId=\"100201\" Desc=\"\" Icon=\"手持.png\"/>\r\n      <Item Caption=\"手持数据采集\" ModuleId=\"700100\" Desc=\"\" Icon=\"Orion (Onyx) V1 My Network.png\"/>\r\n    </Item>\r\n  </NavBar>\r\n	<ToolBar>\r\n    <Item Caption=\"操作员\" ModuleId=\"100300\" Desc=\"\" Icon=\"MSN.png\"/>\r\n    <Item Caption=\"收银点\" ModuleId=\"100200\" Desc=\"\" Icon=\"工作站管理.png\"/>\r\n    <Item Caption=\"卡型设置\" ModuleId=\"200100\" Desc=\"\" Icon=\"卡型设置.png\"/>\r\n    <Item Caption=\"-\" ModuleId=\"300300\" Desc=\"\" Icon=\"8.bmp\"/>\r\n    <Item Caption=\"发卡管理\" ModuleId=\"400100\" Desc=\"\" Icon=\"documents2.png\"/>\r\n    <Item Caption=\"激活(&amp;F2)\" ModuleId=\"400102\" Desc=\"\" Icon=\"system folder.png\"/>\r\n    <Item Caption=\"充值(&amp;F3)\" ModuleId=\"400500\" Desc=\"\" Icon=\"settings2.png\"/>\r\n    <Item Caption=\"商品(&amp;F4)\" ModuleId=\"400800\" Desc=\"\" Icon=\"internet folder.png\"/>\r\n    <Item Caption=\"消费(&amp;F5)\" ModuleId=\"400600\" Desc=\"\" Icon=\"theme pack.png\"/>\r\n    <Item Caption=\"挂失(&amp;F6)\" ModuleId=\"400700\" Desc=\"\" Icon=\"locked folder.png\"/>\r\n    <Item Caption=\"回收(&amp;F7)\" ModuleId=\"400900\" Desc=\"\" Icon=\"public folder.png\"/>\r\n    <Item Caption=\"-\" ModuleId=\"\" Desc=\"\" Icon=\"\"/>\r\n    <Item Caption=\"退出系统\" ModuleId=\"-1\" Desc=\"\" Icon=\"EndApp.png\"/>\r\n  </ToolBar>\r\n</MenuConfig>\r\n',NULL),('SystemDigitId',0,'0',NULL),('SysUserCode',0,'1851A2A0BC5CAC839C4ABF0787085BAC',NULL),('SysUserName',0,'试用客户',NULL),('SysUserNamedDis',0,'试用客户',NULL),('SysUserUUID',0,'{E66B7366-FE43-5C79-350E-F8CFF68F4983}',NULL),('ToolButtonWelCome',256,'False',NULL),('UpdateCardInfoSms',-1,'True',NULL),('UpdateCardInfoSms',0,'True',NULL),('UpdateCardInfoSms',1,'True',NULL),('UpdateCardInfoSms',2,'True',NULL),('UpdateCardInfoSms',3,'True',NULL),('UpdateCardInfoSms',4,'True',NULL),('UpdateCardInfoSms',5,'True',NULL),('UpdateCardInfoSms',6,'True',NULL),('UpdateCardInfoSms',7,'True',NULL),('UpdateCardInfoSms',8,'True',NULL),('UpdateCardInfoSms',9,'True',NULL),('UpdateCardInfoSms',10,'True',NULL),('UpdateCardInfoSms',11,'True',NULL),('UpdateCardInfoSms',12,'True',NULL),('UpdateCardInfoSms',13,'True',NULL),('UpdateCardInfoSms',14,'True',NULL),('UpdateCardInfoSms',15,'True',NULL),('UpdateCardInfoSms',16,'True',NULL),('UpdateCardInfoSms',17,'True',NULL),('UpdateCardInfoSms',18,'True',NULL),('UpdateCardInfoSms',19,'True',NULL),('UpdateCardInfoSms',20,'True',NULL),('UpdateCardInfoSms',21,'True',NULL),('UpdateCardInfoSms',22,'True',NULL),('UpdateCardInfoSms',23,'True',NULL),('UpdateCardInfoSms',24,'True',NULL),('UpdateCardInfoSms',25,'True',NULL),('UpdateSaleManager',-1,'True',NULL),('UpdateSaleManager',0,'True',NULL),('UpdateSaleManager',1,'True',NULL),('UpdateSaleManager',2,'True',NULL),('UpdateSaleManager',3,'True',NULL),('UpdateSaleManager',4,'True',NULL),('UpdateSaleManager',5,'True',NULL),('UpdateSaleManager',6,'True',NULL),('UpdateSaleManager',7,'True',NULL),('UseMemberInfoEx',0,'True',NULL),('UserRegCode',0,'{6DA9D991-71FF-4E99-9711-9494EF61BC55}',NULL),('WordFangXiang',-1,'0',NULL),('WordFangXiang',258,'0',NULL),('关键字',0,'UNION ALL\r\nLEFT JOIN 表 On 条件 \r\nIF EXISTS\r\nAND\r\nAS\r\nDROP\r\nALTER\r\nBETWEEN\r\nCURRENT_DATE\r\nDESC\r\nDISTINCT \r\nGROUP BY\r\nORDER BY',NULL),('函数',0,'DATE_FORMAT(字段,\'%Y-%m-%d %H:%i:%s\') /*日期格式化*/\r\nDATE_ADD(date,INTERVAL expr type) \r\nDATE_SUB(date,INTERVAL expr type)\r\nDATEDIFF(expr,expr2)   \r\nYEAR(date)\r\nquarter(date)\r\nMONTH(date) ',NULL),('语句语法',0,'SELECT * FROM 表名;\r\nDESCRIBE 表名 /*显示数据表的结构*/\r\nCREATE TABLE 表名 (字段名 VARCHAR(20), 字段名 CHAR(1));\r\nDROP TABLE 表名；\r\nDELETE FROM 表名;',NULL);

/*Table structure for table `tabbuygroupgoods` */

DROP TABLE IF EXISTS `tabbuygroupgoods`;

CREATE TABLE `tabbuygroupgoods` (
  `CardID` int(4) NOT NULL,
  `GoodsId` int(2) NOT NULL,
  `BranchID` int(1) NOT NULL,
  `StarFlag` int(4) NOT NULL,
  `GoodsCount` int(2) default NULL,
  `AllBuyCount` int(4) default '0',
  `PerCost` int(2) default NULL COMMENT '角为价单位的单',
  `DelayDays` date default NULL,
  `StarDays` date NOT NULL,
  `IsSteadMoney` int(1) default '0',
  `VarChk` int(1) default NULL,
  PRIMARY KEY  (`CardID`,`GoodsId`,`BranchID`,`StarFlag`,`StarDays`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `tabbuygroupgoods` */

/*Table structure for table `tabgoodsaddin` */

DROP TABLE IF EXISTS `tabgoodsaddin`;

CREATE TABLE `tabgoodsaddin` (
  `ID` int(4) unsigned NOT NULL auto_increment,
  `GoodID` int(4) NOT NULL,
  `BeforeVerCost` decimal(8,2) NOT NULL,
  `BeforeCount` decimal(9,2) NOT NULL default '0.00',
  `ActCost` decimal(8,2) NOT NULL default '0.00',
  `ActCount` decimal(8,2) NOT NULL default '0.00',
  `ActDiverge` decimal(8,2) default '0.00',
  `ActBranch` int(2) default '0',
  `USerName` varchar(32) default NULL,
  `DateTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `tabgoodsaddin` */

/*Table structure for table `tabgoodsgroup` */

DROP TABLE IF EXISTS `tabgoodsgroup`;

CREATE TABLE `tabgoodsgroup` (
  `CardID` int(4) NOT NULL,
  `OrderID` int(4) NOT NULL,
  `MxGoodsId` int(4) NOT NULL,
  `UseCount` decimal(8,2) default NULL,
  PRIMARY KEY  (`CardID`,`OrderID`,`MxGoodsId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `tabgoodsgroup` */

/*Table structure for table `tabgoodssl` */

DROP TABLE IF EXISTS `tabgoodssl`;

CREATE TABLE `tabgoodssl` (
  `GoodsID` int(4) NOT NULL,
  `BranchId` int(4) NOT NULL,
  `GoodsCount` decimal(8,2) default '0.00',
  `AllBuyCount` decimal(11,2) default '0.00',
  `AllSaleCount` decimal(11,2) default '0.00',
  PRIMARY KEY  (`GoodsID`,`BranchId`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `tabgoodssl` */

/*Table structure for table `tabgoodssubs` */

DROP TABLE IF EXISTS `tabgoodssubs`;

CREATE TABLE `tabgoodssubs` (
  `GoodsID` int(4) default NULL,
  `SubGoodsID` int(4) default NULL,
  `InnerCount` decimal(7,2) default '1.00',
  `EnaSubCount` tinyint(1) default '0',
  `EnaAddToTab` tinyint(1) default '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `tabgoodssubs` */

/*Table structure for table `tabgroupgoods` */

DROP TABLE IF EXISTS `tabgroupgoods`;

CREATE TABLE `tabgroupgoods` (
  `GroupID` int(4) NOT NULL,
  `GroupName` varchar(32) default NULL,
  `BindCost` decimal(10,2) default '0.00',
  `ConsumeJF` int(4) default NULL,
  `CommutJF` int(4) default NULL,
  `UseType` int(1) default '0',
  `UsePresent` int(3) default '0' COMMENT '使用的次数',
  PRIMARY KEY  (`GroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `tabgroupgoods` */

/*Table structure for table `tabgroupgoodsdyn` */

DROP TABLE IF EXISTS `tabgroupgoodsdyn`;

CREATE TABLE `tabgroupgoodsdyn` (
  `GroupID` int(4) NOT NULL,
  `CardTypeID` int(4) NOT NULL,
  `BranchID` int(4) NOT NULL,
  PRIMARY KEY  (`GroupID`,`CardTypeID`,`BranchID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `tabgroupgoodsdyn` */

/*Table structure for table `tabgroupgoodsset` */

DROP TABLE IF EXISTS `tabgroupgoodsset`;

CREATE TABLE `tabgroupgoodsset` (
  `GroupID` int(4) NOT NULL,
  `GoodsID` int(4) NOT NULL,
  `GoodsCount` int(4) default NULL,
  `GoodsCost` decimal(9,2) default NULL,
  `DelayDays` int(2) default NULL,
  `UsedAll` int(1) default '0',
  PRIMARY KEY  (`GroupID`,`GoodsID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `tabgroupgoodsset` */

/*Table structure for table `table_lostmanager` */

DROP TABLE IF EXISTS `table_lostmanager`;

CREATE TABLE `table_lostmanager` (
  `CardID` int(4) NOT NULL,
  `AppSaler` tinyint(1) default '0',
  `AppManager` tinyint(1) default '0',
  PRIMARY KEY  (`CardID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `table_lostmanager` */

/*Table structure for table `table_yeji` */

DROP TABLE IF EXISTS `table_yeji`;

CREATE TABLE `table_yeji` (
  `CardID` int(4) NOT NULL,
  `OrderID` int(4) NOT NULL,
  `WorkerID` int(4) default NULL,
  `WorkerNO` int(4) default NULL,
  `YeJiType` int(1) NOT NULL,
  PRIMARY KEY  (`CardID`,`OrderID`,`YeJiType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `table_yeji` */

/*Table structure for table `tablegoodsdyn` */

DROP TABLE IF EXISTS `tablegoodsdyn`;

CREATE TABLE `tablegoodsdyn` (
  `ID` int(4) NOT NULL auto_increment,
  `GoodsId` int(4) default NULL,
  `OutBranch` int(4) default NULL,
  `InBranch` int(4) default NULL,
  `GoodsCount` decimal(8,2) default NULL,
  `GoodsCost` decimal(12,2) default NULL COMMENT '调配价值',
  `UserName` varchar(32) default NULL,
  `Memo` varchar(200) default NULL,
  `DateTime` timestamp NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `tablegoodsdyn` */

/*Table structure for table `tableupdownlog` */

DROP TABLE IF EXISTS `tableupdownlog`;

CREATE TABLE `tableupdownlog` (
  `Act_ID` int(4) unsigned NOT NULL auto_increment COMMENT '自增更新编号',
  `Tab_ID` int(1) default '0',
  `Act_Typ` int(1) default '0' COMMENT '触发器类型',
  `Act_Key` varchar(8) default NULL COMMENT '更新时的主键',
  `Act_params` varchar(100) default NULL COMMENT '更新参数',
  PRIMARY KEY  (`Act_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `tableupdownlog` */

/*Table structure for table `tabprepoint` */

DROP TABLE IF EXISTS `tabprepoint`;

CREATE TABLE `tabprepoint` (
  `OrderID` int(4) NOT NULL,
  `CardID` int(4) NOT NULL COMMENT '增加积分的卡号',
  `PointCardID` int(4) NOT NULL,
  `SubCardID` int(4) default NULL,
  `WorkStaID` int(2) default NULL,
  `PreMode` int(1) default '0' COMMENT '赠送原因',
  `AddPoint` int(4) default '0',
  `UPTime` datetime default NULL,
  `Added` int(1) default '0' COMMENT '己提取',
  PRIMARY KEY  (`OrderID`,`CardID`,`PointCardID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `tabprepoint` */

/*Table structure for table `tabworker_tichen` */

DROP TABLE IF EXISTS `tabworker_tichen`;

CREATE TABLE `tabworker_tichen` (
  `CardID` int(4) NOT NULL,
  `CardOrder` int(4) NOT NULL,
  `ResultType` int(1) default NULL COMMENT '提成类别',
  `WrkID` int(4) NOT NULL COMMENT '提成员工ID',
  `WrkNo` int(4) default NULL COMMENT '员工工号,防止搞错了的来乱',
  `PreMiumWrkID` int(4) default '0' COMMENT '奖励员工ID',
  `PreMiumWrkNo` int(4) default '0',
  `CalCulateMoney` decimal(8,2) default NULL COMMENT '储款方式存在记录表中',
  `WrkMemo` text COMMENT '提成说明',
  `AlreadyCheck` int(4) default '0' COMMENT '审核人ID',
  `CheckAddMoney` decimal(4,0) default '0' COMMENT '审核增减金额',
  `CheckInfo` text COMMENT '审核增减说明',
  `AlreadyDefry` int(4) default '0' COMMENT '核准人ID',
  PRIMARY KEY  (`CardID`,`CardOrder`,`WrkID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `tabworker_tichen` */

/*Table structure for table `tcruler` */

DROP TABLE IF EXISTS `tcruler`;

CREATE TABLE `tcruler` (
  `ID` int(4) unsigned NOT NULL auto_increment,
  `RulerName` varchar(20) default NULL,
  `RulerType` int(2) default '0' COMMENT '1-5种提成类型',
  `RulerTxt` text COMMENT '规则',
  `BinRuler` longblob,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `tcruler` */

/*Table structure for table `user` */

DROP TABLE IF EXISTS `user`;

CREATE TABLE `user` (
  `UserId` int(2) NOT NULL,
  `UserName` varchar(8) NOT NULL,
  `Pass` varchar(32) NOT NULL,
  `RName` varchar(8) NOT NULL default '',
  `State` int(2) NOT NULL,
  `Type` int(2) NOT NULL,
  `Remark` varchar(200) default NULL,
  PRIMARY KEY  (`UserId`),
  UNIQUE KEY `NewIndex1` (`UserName`),
  UNIQUE KEY `NewIndex2` (`RName`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `user` */

insert  into `user`(`UserId`,`UserName`,`Pass`,`RName`,`State`,`Type`,`Remark`) values (-1,'Admin','CFEFFC883DE264920B8277D4AEA0CB05','系统管理员',1,1,NULL);

/*Table structure for table `userright` */

DROP TABLE IF EXISTS `userright`;

CREATE TABLE `userright` (
  `UserId` int(50) NOT NULL,
  `RightType` int(11) NOT NULL,
  `RightId` int(10) NOT NULL,
  PRIMARY KEY  (`UserId`,`RightType`,`RightId`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

/*Data for the table `userright` */

/*Table structure for table `workerallowt` */

DROP TABLE IF EXISTS `workerallowt`;

CREATE TABLE `workerallowt` (
  `GroupID` int(4) unsigned NOT NULL,
  `WorkerID` int(4) unsigned NOT NULL,
  PRIMARY KEY  (`GroupID`,`WorkerID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `workerallowt` */

/*Table structure for table `workerinfo` */

DROP TABLE IF EXISTS `workerinfo`;

CREATE TABLE `workerinfo` (
  `ID` int(4) unsigned NOT NULL auto_increment,
  `PName` varchar(20) default NULL,
  `Sex` int(1) default NULL,
  `CertNo` varchar(32) default NULL,
  `WorkerNo` varchar(12) default NULL,
  `IntNo` int(2) default '0' COMMENT '前期代码不改了,增加一个数字的工号',
  `TelNo` varchar(32) default NULL,
  `BranchID` int(2) default NULL,
  `BranchName` varchar(32) default NULL,
  `BaseGongZi` decimal(9,2) default NULL,
  `ElseGongZi` decimal(9,2) default NULL,
  `IsAct` int(1) default '0' COMMENT '是否在职',
  `NowInBranch` int(4) default NULL COMMENT '当前工作的分店',
  `WorkerMemo` varchar(40) default NULL,
  `IsMemberManager` int(1) default '0' COMMENT '是否客服提成',
  `EnaActYieJi` int(1) default '0' COMMENT '是否统计开卡业绩',
  `EnaAddMoneyYieJi` int(1) default '0' COMMENT '是否统计充值业绩',
  `EnaConsumeYieJi` int(1) default '0' COMMENT '是否统计销售业绩',
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `workerinfo` */

/*Table structure for table `workersgroup` */

DROP TABLE IF EXISTS `workersgroup`;

CREATE TABLE `workersgroup` (
  `ID` int(4) unsigned NOT NULL auto_increment,
  `GroupName` varchar(32) NOT NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `workersgroup` */

/*Table structure for table `workinbranch` */

DROP TABLE IF EXISTS `workinbranch`;

CREATE TABLE `workinbranch` (
  `BranchID` int(4) NOT NULL,
  `WorkGroupID` int(4) NOT NULL,
  `EnaSaleCard` int(4) default '0',
  `EnaSaleGoods` int(4) default '0',
  `EnaService` int(4) default '0',
  PRIMARY KEY  (`BranchID`,`WorkGroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `workinbranch` */

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
