SCO供应链协同

## 数据表：T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）

### T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）：描述

名称 | T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）
代码 | T_SPM_PROMOTIONAPPRAISEENTRY
注释 | 促销结案报告分录
模型 | SCO供应链协同
主键 | PK_SPM_PROMOTIONAPPRAISEENTRY

### T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
结案报告ID | FID | int |  | TRUE |
分录内码 | FENTRYID | int |  | TRUE |
序号 | FSEQ | int |  | TRUE |
参与促销组织 | FPARTAKEORGID | int |  | TRUE |
部门 | FDeptId | int |  | TRUE |
预计销售收入 | FEXPECTSALEINCOME | decimal(23,10) | 23 | TRUE |
预计费用 | FEXPECTAMOUNT | decimal(23,10) | 23 | TRUE |
实际销售收入 | FACTUALSALEINCOME | decimal(23,10) | 23 | TRUE |
实际费用 | FACTUALAMOUNT | decimal(23,10) | 23 | TRUE |
目标达成率% | FACHIVERATEENTRY | decimal(23,10) | 23 | TRUE |
促销效果 | FEFFECTENTRY | char(1) | 1 | TRUE |
促销申请ID | FENTRYAPPLYID | int |  | TRUE |
累计收款金额 | FTOTALARAMOUNT | decimal(23,10) | 23 | TRUE |
累计付款金额 | FTOTALAPAMOUNT | decimal(23,10) | 23 | TRUE |

### T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）：脚本代码

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_SPM_PROMOTIONAPPRAISEENTRY') and o.name = 'FK_T_SPM_PR_R_SPM_APP_T_SPM_PR')
alter table T_SPM_PROMOTIONAPPRAISEENTRY
drop constraint FK_T_SPM_PR_R_SPM_APP_T_SPM_PR
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONAPPRAISEENTRY')
and name = 'IDX_SPM_APPLY_ID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONAPPRAISEENTRY.IDX_SPM_APPLY_ID
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONAPPRAISEENTRY')
and name = 'IDX_SPM_APPRAISEENTRY_ORG'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONAPPRAISEENTRY.IDX_SPM_APPRAISEENTRY_ORG
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONAPPRAISEENTRY')
and name = 'IDX_SPM_PROMOTIONAPPRAISE_FID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONAPPRAISEENTRY.IDX_SPM_PROMOTIONAPPRAISE_FID
go
if exists (select 1
from sysobjects
where id = object_id('T_SPM_PROMOTIONAPPRAISEENTRY')
and type = 'U')
drop table T_SPM_PROMOTIONAPPRAISEENTRY
go
/*==============================================================*/
/* Table: T_SPM_PROMOTIONAPPRAISEENTRY */
/*==============================================================*/
create table T_SPM_PROMOTIONAPPRAISEENTRY (
FID int not null default 0,
FENTRYID int not null default 0,
FSEQ int not null default 0,
FPARTAKEORGID int not null default 0,
FDeptId int not null default 0,
FEXPECTSALEINCOME decimal(23,10) not null default 0.00,
FEXPECTAMOUNT decimal(23,10) not null default 0.00,
FACTUALSALEINCOME decimal(23,10) not null default 0.00,
FACTUALAMOUNT decimal(23,10) not null default 0.00,
FACHIVERATEENTRY decimal(23,10) not null default 0.00,
FEFFECTENTRY char(1) not null default '',
FENTRYAPPLYID int not null default 0,
FTOTALARAMOUNT decimal(23,10) not null default 0,
FTOTALAPAMOUNT decimal(23,10) not null default 0,
constraint PK_SPM_PROMOTIONAPPRAISEENTR primary key (FENTRYID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'促销结案报告分录',
'user', @CurrentUser, 'table', 'T_SPM_PROMOTIONAPPRAISEENTRY'
go
/*==============================================================*/
/* Index: IDX_SPM_PROMOTIONAPPRAISE_FID */
/*==============================================================*/
create index IDX_SPM_PROMOTIONAPPRAISE_FID on T_SPM_PROMOTIONAPPRAISEENTRY (
FID ASC
)
go
/*==============================================================*/
/* Index: IDX_SPM_APPRAISEENTRY_ORG */
/*==============================================================*/
create index IDX_SPM_APPRAISEENTRY_ORG on T_SPM_PROMOTIONAPPRAISEENTRY (
FPARTAKEORGID ASC
)
go
/*==============================================================*/
/* Index: IDX_SPM_APPLY_ID */
/*==============================================================*/
create index IDX_SPM_APPLY_ID on T_SPM_PROMOTIONAPPRAISEENTRY (
FENTRYAPPLYID ASC
)
go
alter table T_SPM_PROMOTIONAPPRAISEENTRY
add constraint FK_T_SPM_PR_R_SPM_APP_T_SPM_PR foreign key (FID)
references T_SPM_PROMOTIONAPPRAISE (FID)
go

### T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）：键值定义

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

### T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_SPM_PROMOTIONAPPRAISE_FID | IDX_SPM_PROMOTIONAPPRAISE_FID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）
IDX_SPM_APPRAISEENTRY_ORG | IDX_SPM_APPRAISEENTRY_ORG | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）
IDX_SPM_APPLY_ID | IDX_SPM_APPLY_ID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONAPPRAISEENTRY（促销结案报告分录）

上一页

主页

下一页