SCO供应链协同

## 数据表：T_DRP_DISTRIBUTION(配送单)

### T_DRP_DISTRIBUTION(配送单)：描述

名称 | T_DRP_DISTRIBUTION(配送单)
代码 | T_DRP_DISTRIBUTION
注释 | 配送单单头，用来存储单头主要信息
模型 | SCO供应链协同
主键 | PK_DRP_DISTRIBUTION

### T_DRP_DISTRIBUTION(配送单)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
单据内码 | FID | int |  | TRUE |
单据编码 | FNUMBER | nvarchar(30) | 30 | TRUE |
申请日期 | FREQUESTDATE | datetime |  | TRUE |
单据类型 | FBILLTYPEID | varchar(36) | 36 | TRUE |
调入库存组织 | FCALLINSTORAGEORGID | int |  | TRUE |
调出库存组织 | FCALLOUTSTORAGEORGID | int |  | TRUE |
单据状态 | FBILLSTATUS | char(1) | 1 | TRUE |
摘要 | FDESCRIPTION | nvarchar(255) | 255 | TRUE |
价目表 | FPRICELISTID | int |  | TRUE |
结算币别 | FCURRENCYID | int |  | TRUE |
是否含税 | FISINCLUDEDTAX | char(1) | 1 | TRUE |
创建人 | FCREATORID | int |  | TRUE |
创建日期 | FCREATEDATE | datetime |  | FALSE |
最后修改人 | FMODIFIERID | int |  | TRUE |
最后修改日期 | FMODIFYDATE | datetime |  | FALSE |
审核人 | FAPPROVERID | int |  | TRUE |
审核日期 | FAPPROVEDATE | datetime |  | FALSE |
关闭状态 | FCLOSESTATUS | char(1) | 1 | TRUE |
关闭人 | FCLOSERID | int |  | TRUE |
关闭日期 | FCLOSEDATE | datetime |  | FALSE |
作废状态 | FCANCELSTATUS | char(1) | 1 | TRUE |
作废人 | FCANCELLERID | int |  | TRUE |
作废日期 | FCANCELDATE | datetime |  | FALSE |

### T_DRP_DISTRIBUTION(配送单)：脚本代码

if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_DRP_DISTRIBUTIONENTRY') and o.name = 'FK_T_DRP_DI_REFERENCE_T_DRP_DI')
alter table T_DRP_DISTRIBUTIONENTRY
drop constraint FK_T_DRP_DI_REFERENCE_T_DRP_DI
go
if exists (select 1
from sysindexes
where id = object_id('T_DRP_DISTRIBUTION')
and name = 'IDX_DRP_DISTRIBUTION_ORGDATE'
and indid > 0
and indid < 255)
drop index T_DRP_DISTRIBUTION.IDX_DRP_DISTRIBUTION_ORGDATE
go
if exists (select 1
from sysindexes
where id = object_id('T_DRP_DISTRIBUTION')
and name = 'IDX_DRP_DISTRIBUTION_DATE'
and indid > 0
and indid < 255)
drop index T_DRP_DISTRIBUTION.IDX_DRP_DISTRIBUTION_DATE
go
if exists (select 1
from sysindexes
where id = object_id('T_DRP_DISTRIBUTION')
and name = 'IDX_DRP_DISTRIBUTION_NUMBER'
and indid > 0
and indid < 255)
drop index T_DRP_DISTRIBUTION.IDX_DRP_DISTRIBUTION_NUMBER
go
if exists (select 1
from sysobjects
where id = object_id('T_DRP_DISTRIBUTION')
and type = 'U')
drop table T_DRP_DISTRIBUTION
go
/*==============================================================*/
/* Table: T_DRP_DISTRIBUTION */
/*==============================================================*/
create table T_DRP_DISTRIBUTION (
FID int not null default 0,
FNUMBER nvarchar(30) not null default '',
FREQUESTDATE datetime not null default getdate(),
FBILLTYPEID varchar(36) not null default '',
FCALLINSTORAGEORGID int not null default 0,
FCALLOUTSTORAGEORGID int not null default 0,
FBILLSTATUS char(1) not null default 'Z',
FDESCRIPTION nvarchar(255) not null default '',
FPRICELISTID int not null default 0,
FCURRENCYID int not null default 0,
FISINCLUDEDTAX char(1) not null default '1',
FCREATORID int not null default 0,
FCREATEDATE datetime null,
FMODIFIERID int not null default 0,
FMODIFYDATE datetime null,
FAPPROVERID int not null default 0,
FAPPROVEDATE datetime null,
FCLOSESTATUS char(1) not null default 'A',
FCLOSERID int not null default 0,
FCLOSEDATE datetime null,
FCANCELSTATUS char(1) not null default 'A',
FCANCELLERID int not null default 0,
FCANCELDATE datetime null,
constraint PK_DRP_DISTRIBUTION primary key (FID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'配送单单头，用来存储单头主要信息',
'user', @CurrentUser, 'table', 'T_DRP_DISTRIBUTION'
go
/*==============================================================*/
/* Index: IDX_DRP_DISTRIBUTION_NUMBER */
/*==============================================================*/
create index IDX_DRP_DISTRIBUTION_NUMBER on T_DRP_DISTRIBUTION (
FNUMBER ASC
)
go
/*==============================================================*/
/* Index: IDX_DRP_DISTRIBUTION_DATE */
/*==============================================================*/
create index IDX_DRP_DISTRIBUTION_DATE on T_DRP_DISTRIBUTION (
FREQUESTDATE ASC
)
go
/*==============================================================*/
/* Index: IDX_DRP_DISTRIBUTION_ORGDATE */
/*==============================================================*/
create index IDX_DRP_DISTRIBUTION_ORGDATE on T_DRP_DISTRIBUTION (
FCALLOUTSTORAGEORGID ASC,
FREQUESTDATE ASC,
FBILLSTATUS ASC
)
go

### T_DRP_DISTRIBUTION(配送单)：键值定义

名称 | 代码 | 主要的
PK_DRP_DISTRIBUTION | PK_DRP_DISTRIBUTION | TRUE

### T_DRP_DISTRIBUTION(配送单)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_DRP_DISTRIBUTION_NUMBER | IDX_DRP_DISTRIBUTION_NUMBER | FALSE | FALSE | FALSE | FALSE | FALSE | T_DRP_DISTRIBUTION(配送单)
IDX_DRP_DISTRIBUTION_DATE | IDX_DRP_DISTRIBUTION_DATE | FALSE | FALSE | FALSE | FALSE | FALSE | T_DRP_DISTRIBUTION(配送单)
IDX_DRP_DISTRIBUTION_ORGDATE | IDX_DRP_DISTRIBUTION_ORGDATE | FALSE | FALSE | FALSE | FALSE | FALSE | T_DRP_DISTRIBUTION(配送单)

上一页

主页

下一页