# erp **Repository Path**: corecool10000/erp ## Basic Information - **Project Name**: erp - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2019-11-09 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 增加采购单扩展表 ``` CREATE TABLE `ci_pur_extend` ( `id` int(10) NOT NULL AUTO_INCREMENT, `billid` int(10) NOT NULL DEFAULT '0' COMMENT '单据ID', `send_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '到货状态0设置了到货日期,1已到货', `send_type` varchar(55) NOT NULL DEFAULT '' COMMENT '到货方式', `pay_type` varchar(55) NOT NULL DEFAULT '' COMMENT '汇款方式', `has_ticket` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否有发票', `ticket_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '发票状态', `send_date` int(11) NOT NULL DEFAULT '0' COMMENT '到货时间', PRIMARY KEY (`id`), KEY `billid` (`billid`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; ``` ## 联系表增加对公对私账户 ``` alter table ci_contact add column public_account VARCHAR(255) not null default '' comment "对公账户", add column private_account VARCHAR(255) not null default '' comment "对私账户"; ``` ## 创建用户商品价格关系表 ``` create table ci_goods_contact_price ( id int(11) not null AUTO_INCREMENT, goodsid int(11) not null default 0 comment "商品ID", contact_id int(11) not null default 0 comment "联系人ID", price decimal(10,2) not null default 0 comment "商品价格", primary key(id) )ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` ## 创建价格更改日志 ``` create table ci_goods_price_log ( id int(11) not null AUTO_INCREMENT, goodsid int(11) not null default 0 comment "商品ID", contact_id int(11) not null default 0 comment "联系人ID", option_id decimal(10,2) not null default 0 comment "操作者ID", old_price decimal(10,2) not null default 0 comment "原有价格", new_price decimal(10,2) not null default 0 comment "现有价格", primary key(id) )ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` ## 价格表价格日志表增加字段 ``` alter table ci_goods_contact_price add column update_time int(11) not null default 0 comment "更改时间"; alter table ci_goods_price_log add column option_name varchar(255) not null default "" comment "操作人姓名" after option_id, add column logtime int(11) not null default 0 comment "日志时间"; alter table ci_goods_contact_price add column option_id int(11) not null default 0 comment "操作人ID", add column option_name varchar(255) not null default "" comment "操作人姓名"; alter table ci_goods_contact_price add column price_type tinyint(4) not null default 1 comment '1:供应商价格 2:客户价格'; ``` ## 创建商品Bom表单 ``` create table ci_goods_bom ( id int(11) not null AUTO_INCREMENT, goodsid int(11) not null default 0 comment "商品ID", goodsname varchar(255) not null default "" comment "商品名称", option_id int(11) not null default 0 comment "操作者ID", option_name varchar(255) not null default "" comment "操作者姓名", bom_num int(10) not null default 0 comment "bom数量", addtime int(11) not null default 0 comment "创建时间", updatetime int(11) not null default 0 comment "更新时间", primary key(id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` ## 创建Bom明细 ``` create table ci_goods_bom_detail( id int(11) not null auto_increment, bom_id int(11) not null default 0 comment "BomID", goodsid int(11) not null default 0 comment "商品ID", goodsname varchar(255) not null default "" comment "商品名称", nums int(10) not null default 0 comment "数量", primary key(id) )engine=innodb default charset =utf8; ``` ## 商品表增加颜色字段 ``` alter table ci_goods add column color varchar(55) not null default "" comment "商品颜色"; ``` ## 生成bom跟踪单 ``` create table ci_track( id int(11) not null auto_increment, iid int(11) not null default 0 comment '销售单ID', customerid int(11) not null default 0 comment '客户ID', customerno varchar(55) not null default '' comment '客户编号', goodscount int(10) not null default 0 comment '商品数量', status tinyint(2) not null default 1 comment '跟踪单状态1未完成 2已完成', option_id int(11) not null default 0 comment '操作人ID', option_name varchar(55) not null default '' comment '操作人名称', addtime int(10) not null default 0 comment '创建时间', overtime int(10) not null default 0 comment '完成时间', primary key(id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` ## 生成bom详细信息 ```` create table ci_track_info( id int(11) not null auto_increment, track_id int(11) not null default 0 comment '跟踪单ID', goodsid int(11) not null default 0 comment '商品ID', bomgoodsid int(11) not null default 0 comment 'bom商品ID', amount varchar(10) not null default '0' comment '所需数量', primary key(id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` create table ci_receipt_info ( id int(10) not null auto_increment, iid int(10) not null default 0, billId int(10) not null default 0, billNo varchar(55) not null default '', billDate datetime, transType int(5) not null default 0, billType int(5) not null default 0, billPrice decimal(10,2) not null default 0, hasCheck float(10) not null default 0, notCheck float(10) not null default 0, primary key (id) )ENGINE=InnoDB DEFAULT CHARSET=utf8;