Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cz_012273
WZGL
提交
beb243df
W
WZGL
项目概览
cz_012273
/
WZGL
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
WZGL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
beb243df
编写于
6月 08, 2024
作者:
C
cz_012273
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改初始化创建数据库结构(增加字段)。
上级
6f6067b7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
101 addition
and
42 deletion
+101
-42
ChaXun.dfm
ChaXun.dfm
+89
-33
ChaXun.pas
ChaXun.pas
+8
-4
DataUnit.pas
DataUnit.pas
+4
-4
main.pas
main.pas
+0
-1
未找到文件。
ChaXun.dfm
浏览文件 @
beb243df
...
...
@@ -31,7 +31,7 @@ object Form4: TForm4
ParentFont = False
end
object Label2: TLabel
Left = 2
31
Left = 2
19
Top = 24
Width = 30
Height = 16
...
...
@@ -57,7 +57,7 @@ object Form4: TForm4
ParentFont = False
end
object Label4: TLabel
Left =
420
Left =
351
Top = 24
Width = 30
Height = 16
...
...
@@ -83,8 +83,8 @@ object Form4: TForm4
ParentFont = False
end
object Label6: TLabel
Left =
165
Top =
104
Left =
469
Top =
62
Width = 45
Height = 16
Caption = #20445#31649#20154
...
...
@@ -96,7 +96,7 @@ object Form4: TForm4
ParentFont = False
end
object Label7: TLabel
Left =
292
Left =
151
Top = 104
Width = 60
Height = 16
...
...
@@ -119,13 +119,13 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object DBText2: TDBText
Left = 2
67
Left = 2
55
Top = 24
Width =
147
Width =
90
Height = 17
DataField = #21697#21517
DataSource = DM1.DataSource4
...
...
@@ -133,7 +133,7 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object DBText3: TDBText
...
...
@@ -147,21 +147,23 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object DBText4: TDBText
Left =
456
Left =
387
Top = 24
Width =
133
Width =
91
Height = 17
Color = clBtnFace
DataField = #35268#26684
DataSource = DM1.DataSource4
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object DBText5: TDBText
...
...
@@ -175,12 +177,12 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object DBText6: TDBText
Left =
216
Top =
104
Left =
520
Top =
62
Width = 70
Height = 17
DataField = #20445#31649#20154
...
...
@@ -189,11 +191,11 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object DBText7: TDBText
Left =
358
Left =
217
Top = 104
Width = 74
Height = 17
...
...
@@ -203,7 +205,7 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object Label8: TLabel
...
...
@@ -230,15 +232,15 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object Label9: TLabel
Left = 1
34
Left = 1
22
Top = 62
Width =
6
0
Width =
3
0
Height = 16
Caption = #
35745#37327#
21333#20301
Caption = #21333#20301
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
...
...
@@ -247,7 +249,7 @@ object Form4: TForm4
ParentFont = False
end
object DBText9: TDBText
Left =
200
Left =
158
Top = 62
Width = 55
Height = 17
...
...
@@ -257,11 +259,11 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object Label10: TLabel
Left = 2
61
Left = 2
19
Top = 62
Width = 30
Height = 16
...
...
@@ -274,9 +276,9 @@ object Form4: TForm4
ParentFont = False
end
object DBText10: TDBText
Left = 2
97
Left = 2
55
Top = 62
Width =
95
Width =
82
Height = 17
DataField = #21333#20215
DataSource = DM1.DataSource4
...
...
@@ -284,11 +286,11 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object Label11: TLabel
Left = 3
98
Left = 3
43
Top = 62
Width = 30
Height = 16
...
...
@@ -301,9 +303,9 @@ object Form4: TForm4
ParentFont = False
end
object DBText11: TDBText
Left =
434
Left =
379
Top = 62
Width =
155
Width =
76
Height = 17
DataField = #37329#39069
DataSource = DM1.DataSource4
...
...
@@ -311,7 +313,7 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
Font.Style = [
fsBold
]
ParentFont = False
end
object Label12: TLabel
...
...
@@ -338,9 +340,63 @@ object Form4: TForm4
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
end
object Label13: TLabel
Left = 278
Top = 104
Width = 105
Height = 16
Caption = #20351#29992#21608#26399#65288#22825#65289
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object DBText13: TDBText
Left = 381
Top = 104
Width = 51
Height = 17
DataField = #20351#29992#21608#26399#65288#22825#65289
DataSource = DM1.DataSource4
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
end
object Label14: TLabel
Left = 484
Top = 24
Width = 30
Height = 16
Caption = #20179#24211
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object DBText14: TDBText
Left = 520
Top = 24
Width = 70
Height = 17
DataField = #20179#24211
DataSource = DM1.DataSource4
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
end
object Button1: TButton
Left = 130
Top = 343
...
...
ChaXun.pas
浏览文件 @
beb243df
...
...
@@ -37,6 +37,10 @@ type
DBText11
:
TDBText
;
Label12
:
TLabel
;
DBText12
:
TDBText
;
Label13
:
TLabel
;
DBText13
:
TDBText
;
Label14
:
TLabel
;
DBText14
:
TDBText
;
procedure
Button1Click
(
Sender
:
TObject
);
procedure
Button2Click
(
Sender
:
TObject
);
procedure
FormShow
(
Sender
:
TObject
);
...
...
@@ -83,12 +87,12 @@ begin
with
dm1
.
FDQuery4
do
begin
close
;
Open
(
'SELECT
*
FROM 库存表'
);
Open
(
'SELECT
序号,品名代号,品名,规格,数量,计量单位,单价,金额,入库日期,保管人,仓库,生产日期,保质期(天),使用周期(天)
FROM 库存表'
);
Fields
[
0
].
DisplayWidth
:=
4
;
// 这个宽度指字符数
Fields
[
1
].
DisplayWidth
:=
2
0
;
Fields
[
2
].
DisplayWidth
:=
6
;
Fields
[
1
].
DisplayWidth
:=
1
0
;
Fields
[
2
].
DisplayWidth
:=
25
;
Fields
[
3
].
DisplayWidth
:=
20
;
Fields
[
4
].
DisplayWidth
:=
10
;
Fields
[
4
].
DisplayWidth
:=
6
;
Fields
[
5
].
DisplayWidth
:=
6
;
end
;
end
;
...
...
DataUnit.pas
浏览文件 @
beb243df
...
...
@@ -89,16 +89,16 @@ begin
DM1
.
FDConnection1
.
Params
.
Add
(
'Database='
+
dbName
);
DM1
.
FDConnection1
.
Connected
:=
True
;
DM1
.
FDConnection1
.
ExecSQL
(
'CREATE TABLE 入库表(序号 int PRIMARY KEY, 品名 string(20), 数量
int, 规格 string(10),入库日期 date,保管人 string(8),使用周期(天) int,保质期(天) int
)'
);
(
'CREATE TABLE 入库表(序号 int PRIMARY KEY, 品名 string(20), 数量
decimal(10,4), 规格 string(30),入库日期 date,保管人 string(8),使用周期(天) int,保质期(天) int,计量单位 string(6),单价 decimal(12,4),金额 decimal(12,2),仓库 string(8),品名代号 string(10),生产日期 date
)'
);
{ 执行SQL语句 }
DM1
.
FDConnection1
.
ExecSQL
(
'CREATE TABLE 品名表(序号 int PRIMARY KEY, 品名代号 string(10),品名 string(20), 规格 string(
10),使用周期(天) int,保质期(天) int
)'
);
(
'CREATE TABLE 品名表(序号 int PRIMARY KEY, 品名代号 string(10),品名 string(20), 规格 string(
30),使用周期(天) int,保质期(天) int,计量单位 string(6),单价 decimal(12,4),生产日期 date
)'
);
{ 执行SQL语句 }
DM1
.
FDConnection1
.
ExecSQL
(
'CREATE TABLE 出库表(序号 int PRIMARY KEY, 品名 string(20), 数量
int, 规格 string(10),出库日期 date,领取人 string(8),所在部门(班组) string(12),使用周期(天) int,发放理由 string
)'
);
(
'CREATE TABLE 出库表(序号 int PRIMARY KEY, 品名 string(20), 数量
decimal(10,4), 规格 string(30),出库日期 date,领取人 string(8),所在部门(班组) string(12),使用周期(天) int,发放理由 string,计量单位 string(6),单价 decimal(12,4),金额 decimal(12,2),仓库 string(8),品名代号 string(10),生产日期 date
)'
);
{ 执行SQL语句 }
DM1
.
FDConnection1
.
ExecSQL
(
'CREATE TABLE 库存表(序号 int PRIMARY KEY, 品名 string(20), 数量
int, 规格 string(10),入库日期 date,保管人 string(8),使用周期(天) int,保质期(天) int
)'
);
(
'CREATE TABLE 库存表(序号 int PRIMARY KEY, 品名 string(20), 数量
decimal(10,4), 规格 string(30),入库日期 date,保管人 string(8),使用周期(天) int,保质期(天) int,计量单位 string(6),单价 decimal(12,4),金额 decimal(12,2),仓库 string(8),品名代号 string(10),生产日期 date
)'
);
{ 执行SQL语句 }
DM1
.
FDConnection1
.
ExecSQL
(
'CREATE TABLE 人员表(序号 int PRIMARY KEY, 所在部门(班组) string(12),姓名 string(8),职名 string(12))'
);
...
...
main.pas
浏览文件 @
beb243df
...
...
@@ -71,7 +71,6 @@ begin
end
;
end
;
end
;
function
GetBuildInfoAsString
:
string
;
var
V1
,
V2
,
V3
,
V4
:
word
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录