SCO供应链协同

## 数据表：T_SPM_PROMOTIONAPPRAISE（促销结案报告）

### T_SPM_PROMOTIONAPPRAISE（促销结案报告）：描述

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

### T_SPM_PROMOTIONAPPRAISE（促销结案报告）：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
单据ID | FID | int |  | TRUE |
促销申请ID | FPROMOTIONAPPLYID | int |  | TRUE |
实际促销总费用 | FACTUALTOTALAMOUNT | decimal(23,10) | 23 | TRUE |
实际销售总收入 | FACTUALINCOME | decimal(23,10) | 23 | TRUE |
实际促销利润增长% | FACTUALPROFITINCRATE | decimal(23,10) | 23 | TRUE |
总体目标达成率% | FGOALACHIEVERATE | decimal(23,10) | 23 | TRUE |
总体促销效果 | FTOTALEFFECT | char(1) | 1 | TRUE |
结案人 | FAPPRAISEUSERID | int |  | TRUE |
结案日期 | FAPPRAISEDATE | datetime |  | TRUE |
结案状态 | FAPPRAISESTATUS | char(1) | 1 | TRUE |
预计促销总费用 | FEXPECTTOTALAMOUNT | decimal(23,10) | 23 | TRUE |
预计销售总收入 | FINCOMEAMOUNT | decimal(23,10) | 23 | TRUE |
预计促销利润增长% | FEXPECTPROFITINCRATE | decimal(23,10) | 23 | TRUE |
币别 | FCURRENCYID | int |  | TRUE |

### T_SPM_PROMOTIONAPPRAISE（促销结案报告）：脚本代码

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_PRAISEERENTRY') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PRAISEERENTRY
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
go
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 sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_SPM_PROMOTIONAPPRAISE_L') and o.name = 'FK_T_SPM_PR_R_SPM_PRO_T_SPM_PR')
alter table T_SPM_PROMOTIONAPPRAISE_L
drop constraint FK_T_SPM_PR_R_SPM_PRO_T_SPM_PR
go
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_PROMOTIONPRAISECUST') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONPRAISECUST
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
go
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_PROMOTIONPRAISEMATENTRY') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONPRAISEMATENTRY
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
go
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_PROMOTIONPRAISEPMENTRY') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONPRAISEPMENTRY
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
go
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_PROMOTIONPRAISE_ORG') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONPRAISE_ORG
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONAPPRAISE')
and name = 'IDX_SPM_PROMOPRAISE_DATE'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONAPPRAISE.IDX_SPM_PROMOPRAISE_DATE
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONAPPRAISE')
and name = 'IDX_SPM_PROMO_APPLY_FID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONAPPRAISE.IDX_SPM_PROMO_APPLY_FID
go
if exists (select 1
from sysobjects
where id = object_id('T_SPM_PROMOTIONAPPRAISE')
and type = 'U')
drop table T_SPM_PROMOTIONAPPRAISE
go
/*==============================================================*/
/* Table: T_SPM_PROMOTIONAPPRAISE */
/*==============================================================*/
create table T_SPM_PROMOTIONAPPRAISE (
FID int not null default 0,
FPROMOTIONAPPLYID int not null default 0,
FACTUALTOTALAMOUNT decimal(23,10) not null default 0.00,
FACTUALINCOME decimal(23,10) not null default 0.00,
FACTUALPROFITINCRATE decimal(23,10) not null default 0.0,
FGOALACHIEVERATE decimal(23,10) not null default 0.0,
FTOTALEFFECT char(1) not null default '',
FAPPRAISEUSERID int not null default 0,
FAPPRAISEDATE datetime not null default getdate(),
FAPPRAISESTATUS char(1) not null default 'B',
FEXPECTTOTALAMOUNT decimal(23,10) not null default 0.00,
FINCOMEAMOUNT decimal(23,10) not null default 0.00,
FEXPECTPROFITINCRATE decimal(23,10) not null default 0.0,
FCURRENCYID int not null default 0,
constraint PK_SPM_PROMOTIONAPPRAISE primary key (FID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'促销结案报告',
'user', @CurrentUser, 'table', 'T_SPM_PROMOTIONAPPRAISE'
go
/*==============================================================*/
/* Index: IDX_SPM_PROMO_APPLY_FID */
/*==============================================================*/
create index IDX_SPM_PROMO_APPLY_FID on T_SPM_PROMOTIONAPPRAISE (
FPROMOTIONAPPLYID ASC
)
go
/*==============================================================*/
/* Index: IDX_SPM_PROMOPRAISE_DATE */
/*==============================================================*/
create index IDX_SPM_PROMOPRAISE_DATE on T_SPM_PROMOTIONAPPRAISE (
FAPPRAISEDATE ASC
)
go

### T_SPM_PROMOTIONAPPRAISE（促销结案报告）：键值定义

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

### T_SPM_PROMOTIONAPPRAISE（促销结案报告）：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_SPM_PROMO_APPLY_FID | IDX_SPM_PROMO_APPLY_FID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONAPPRAISE（促销结案报告）
IDX_SPM_PROMOPRAISE_DATE | IDX_SPM_PROMOPRAISE_DATE | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONAPPRAISE（促销结案报告）

上一页

主页

下一页