MySQL操作程序二十九(零件单位/图号选择功能)
返回
- 借用mscshowparts.pl的DWG显示
- mscshowpartsone.pl修改=>LOOP操作,把selected加上去
- mscpartsupdate.pl修改=>不须修改?
- HTML文件修改
mscshowpartsone.pl的追加
# 显示DWG图号
@loop1 = ();
$t{DWG} = $self->dbh->selectrow_array("SELECT DWG FROM main_type1 WHERE id = $t{tid}");
@{ $t{DWGs} } = split(/=/,$t{DWG});
$t{selected} = $t{loops}{"dwg_id"};
for $n ( 0 .. $#{ $t{DWGs} } ) {
$t{ns} = $n + 1;
if ($t{ns} == $t{selected}) {
$t{list1} = ''
} else {
$t{list1} = ''
}
my %row = (
list => $t{list1}
);
push(@loop1, \%row);
}
$t{template}->param(LOOP1 => \@loop1);
# 单位的LOOP显示
@loop = ();
@{ $t{units} } = qw/PCS SET BOX ROLL PAIR CAN DOZ KGS MTR SHT TUBE PKT/;
$t{selected} = $t{loops}{"Nuid"};
for $n ( 0 .. $#{ $t{units} } ) {
$t{ns} = $n + 1;
if ($t{ns} == $t{selected}) {
$t{list1} = ''
} else {
$t{list1} = ''
}
my %row = (
list => $t{list1}
);
push(@loop, \%row);
}
$t{template}->param(LOOP => \@loop);
mscparst2.htm
新
dwg_id |
|
Nuid |
|
旧
dwg_id | "> |
">
Nuid | "> |
">
返回