新增文章
文章标题
分类
C#
云星空
K3 BOS
K3 功能
用友
Oracle
python
SQL
MySql
PHP
HTML
script
windows
Access
影视后期
财务
服务
生活
内容
------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --【视图】 删除 if exists ( select * from sys.views where object_id = OBJECT_ID(N'dbo.a_ICChatBillTitle') ) drop view dbo.a_ICChatBillTitle go ------------------------------------------------------------------------------------------------------------------------------------------------ --【视图】 a_ICChatBillTitle 金蝶老单 序时簿字段 create view dbo.a_ICChatBillTitle as select a2.FTemplateID FID ,a2.FName FBillName ,'序时簿' FPage ,a1.FColName,a1.FColCaption ,REPLACE(REPLACE(a1.FColCaption,' ',''),'$','') FCaption2 ,a1.FTypeID,a1.FInterID ,a1.FSort ,'【'+ a2.FTemplateID +','+ a1.FTableAlias +'.'+ a1.FColName +' '+ a1.FColCaption +'】' FFullName ,a1.FVisible,a1.FColWidth,a1.FAlign ,a1.FVisForQuest,a1.FVisForOrder,a1.FNeedCount ,'' A1 ,a1.FTableName,a1.FName ,a1.FTableAlias ,a1.FItemClassID ,a1.FAction ,a1.FMustSelected ,a1.FIsPrimary,a1.FColType,a1.FCtlIndex ,a1.FReturnDataType,a1.FCountPriceType ,a1.FFormatType,a1.FFormat ,a1.FLogicAction,a1.FStatistical,a1.FMode ,a1.FMergeable,a1.FHeadSecond ,a1.FColCaption_CHT,a1.FColCaption_EN ,a1.FControlType,a1.FControl ,a1.FPrecisionField,a1.FEditable from ICChatBillTitle a1 left join ICTransactionType a2 on a1.FTypeID = a2.FChatTypeID and a2.FAllowDefined = 1 /* ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ select * from a_ICChatBillTitle where FID = 'S01' and FFullName like '%%' order by FSort,FInterID -- 【序时簿】字段名称 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ select * from ICTransactionType where FTemplateID = 'S01' select * from ICChatBillTitle where FTypeID = 61 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- 数据表:添加字段 ALTER TABLE ICChatBillTitle ADD FSort int DEFAULT 0; -- 添加字段 go update ICChatBillTitle set FSort = 0; go ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- 创建 临时表 DROP TABLE ICChatBillTitle_tmp; go CREATE TABLE ICChatBillTitle_tmp ( FTypeID int -- 单据类型 ,FIndex int -- 顺序 ,FDisplay int -- 显示 1 不显示 0 ,FColName varchar(30) -- 字段名 ,FColWidth varchar(30) -- 宽度 ,FAlign int -- 对齐 ,FVisible int -- 序时簿显示 1 默认显示 3 不显示 0 ) go ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- 数据表:添加字段 ALTER TABLE ICTransactionType ADD FChatTypeID int DEFAULT 0; -- ICChatBillTitle.FTypeID ALTER TABLE ICTransactionType ADD FSchemeTypeID int DEFAULT 0; -- ICSchemeProfile.FTranType go update ICTransactionType set FChatTypeID = 0; update ICTransactionType set FSchemeTypeID = 0; go ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- 数据表:更新数据 update ICTransactionType set FChatTypeID = 61 ,FSchemeTypeID = 32 where FTemplateID = 'S01' -- S01 销售订单 update ICTransactionType set FChatTypeID = 76 ,FSchemeTypeID = 8 where FTemplateID = 'B01' -- B01 销售出库 update ICTransactionType set FChatTypeID = 62 ,FSchemeTypeID = 31 where FTemplateID = 'I04' -- I04 销售发票(专用) update ICTransactionType set FChatTypeID = 62 ,FSchemeTypeID = 31 where FTemplateID = 'I05' -- I05 销售发票(普通) update ICTransactionType set FChatTypeID = 81 ,FSchemeTypeID = 26 where FTemplateID = 'P02' -- P02 采购订单 update ICTransactionType set FChatTypeID = 58 ,FSchemeTypeID = 1 where FTemplateID = 'A01' -- A01 外购入库 update ICTransactionType set FChatTypeID = 84 ,FSchemeTypeID = 29 where FTemplateID = 'I02' -- I02 购货发票(专用) update ICTransactionType set FChatTypeID = 84 ,FSchemeTypeID = 29 where FTemplateID = 'I03' -- I03 购货发票(普通) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */ go
返回
保存