数据库零件表输入程序与界面

戻る

零件输入开始(mscenq1_parts1.pl)

sub mscenq1_parts1 { my $self = shift; my(%t,@rec,@loop,$n); # Get CGI query object $t{q} = $self->query(); $t{NE1} = $t{q}->param("NE1"); $t{enq1_id} = $t{q}->param("enq1_id"); $t{main_type1id} = $t{q}->param("main_type1id"); $t{name1} = $t{q}->param("name1"); $t{DWG0} = $t{q}->param("DWG0"); $t{DWG0_id} = $t{q}->param("DWG0_id"); $t{template} = $self->load_tmpl('mscenq1_parts1.htm') || die "error loading tmpl"; $t{partsname} = $t{q}->param("partsname"); $t{partscode} = $t{q}->param("partscode"); $t{partsqty} = $t{q}->param("partsqty"); $t{template}->param(partsname => $t{partsname}); $t{template}->param(partscode => $t{partscode}); $t{template}->param(partsqty => $t{partsqty}); # 读取主机的DWG $t{DWG} = $self->dbh->selectrow_array("SELECT DWG FROM main_type1 WHERE id = $t{main_type1id}"); if ( $t{DWG} ne 'NULL' ) { @{ $t{DWGs} } = split(/=/,$t{DWG}); @loop = (); for $n ( 0 .. $#{ $t{DWGs} } ) { my %row = ( content => $t{DWGs}[$n] ); push(@loop, \%row); } $t{template}->param(DWG => \@loop); } if ( $t{DWG0} ) { $t{template}->param(DWG0 => $t{DWG0}); $t{template}->param(DWG0_id => $t{DWG0_id}); } else { $t{template}->param(DWG0 => $t{DWGs}[0]); $t{template}->param(DWG0_id => 1); } $t{template}->param(NE1 => $t{NE1}); $t{template}->param(enq1_id => $t{enq1_id}); $t{template}->param(main_type1id => $t{main_type1id}); $t{template}->param(name1 => $t{name1}); $t{template}->param(pro => "mscenq1_parts1.pl"); return $t{template}->output; } 1;

mscenq1_parts1.htm

<HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <TITLE>enq1_parts1(parts输入)</TITLE> <style type="text/css"> body { background: lightcyan; color:black; margin-left:2em;margin-right:2em;} </style> </HEAD> <BODY> <center> <h2>enq1_parts1(parts输入)</h2></center> mode:modeenq1_parts1 <form action="" method="post"> <input type="submit" value="mscenq1_partsへ戻る"><p> <input type="hidden" name="id" value="<TMPL_VAR NAME="enq1_id">"> <input type="hidden" name="rm" value="modeenq1_parts"> </form> <hr color="#003366"> main_type1id=><TMPL_VAR NAME="main_type1id">,主机名=<TMPL_VAR NAME="name1"><br> enq1_id=><TMPL_VAR NAME="enq1_id">,NE1=><TMPL_VAR NAME="NE1"><br> pro=><TMPL_VAR NAME="pro"><br> <hr color="#003366"> <form action="" method="post"> 输入或选择图纸号=> <input type="submit" value="决定"><br> New DWG<input type=text size=100 name=dwg1 value=""><br> <input type="hidden" name="dwg1" value=""> Old DWG<select name="dwg2"> <TMPL_LOOP NAME="DWG"> <option value="<TMPL_VAR NAME="content">"><TMPL_VAR NAME="content"></option> </TMPL_LOOP> </select> <input type="hidden" name="NE1" value="<TMPL_VAR NAME="NE1">"> <input type="hidden" name="enq1_id" value="<TMPL_VAR NAME="enq1_id">"> <input type="hidden" name="main_type1id" value="<TMPL_VAR NAME="main_type1id">"> <input type="hidden" name="name1" value="<TMPL_VAR NAME="name1">"> <input type="hidden" name="rm" value="modeenq1_dwg1"> </form> <hr color="#003366"> 使用图纸,序号==><TMPL_VAR NAME="DWG0_id">,图号==><TMPL_VAR NAME="DWG0"><br> 输入parts的name,code,QTY<br><br> <form action="" method="post"> Parts name<br> <textarea name="partsname" cols="50" rows="10"><TMPL_VAR NAME="partsname"></textarea><br> Parts code<br> <textarea name="partscode" cols="50" rows="10"><TMPL_VAR NAME="partscode"></textarea><br> Parts QTY<br> <textarea name="partsqty" cols="50" rows="10"><TMPL_VAR NAME="partsqty"></textarea><br> <input type="submit" value="PARTS追加"><p> <input type="hidden" name="NE1" value="<TMPL_VAR NAME="NE1">"> <input type="hidden" name="enq1_id" value="<TMPL_VAR NAME="enq1_id">"> <input type="hidden" name="main_type1id" value="<TMPL_VAR NAME="main_type1id">"> <input type="hidden" name="name1" value="<TMPL_VAR NAME="name1">"> <input type="hidden" name="DWG0" value="<TMPL_VAR NAME="DWG0">"> <input type="hidden" name="DWG0_id" value="<TMPL_VAR NAME="DWG0_id">"> <input type="hidden" name="rm" value="modeenq1_parts2"> </form> </BODY> </HTML>

读取零件数据(mscenq1_parts2.pl)

sub mscenq1_parts2 { my $self = shift; my(%t,$n,@loop1,@loop2,@rec); # Get CGI query object $t{q} = $self->query(); $t{NE1} = $t{q}->param("NE1"); # 选择主机的顺序 $t{enq1_id} = $t{q}->param("enq1_id"); $t{main_type1id} = $t{q}->param("main_type1id"); $t{name1} = $t{q}->param("name1"); $t{partsname} = $t{q}->param("partsname"); $t{partscode} = $t{q}->param("partscode"); $t{partsqty} = $t{q}->param("partsqty"); $t{partsqty} = $t{q}->param("partsqty"); $t{DWG0} = $t{q}->param("DWG0"); $t{DWG0_id} = $t{q}->param("DWG0_id"); # 取出数据 @{ $t{names} } = split(/\r\n/,$t{partsname}); @{ $t{codes} } = split(/\r\n/,$t{partscode}); @{ $t{qtys} } = split(/\r\n/,$t{partsqty}); $t{names_length} = $#{ $t{names} }; $t{codes_length} = $#{ $t{codes} }; $t{qtys_length} = $#{ $t{qtys} }; $t{length1} = $t{names_length} - 1; if ( $t{names_length} == $t{codes_length} && $t{names_length} == $t{qtys_length} && $t{names}[0] !~ /END/ ) { $t{mode} = 1; } else { # 出错,返回修改 $t{mode} = 2; } if ( $t{mode} == 1 ) { # 输入数据输出到HTML画面 @loop1 = (); for $n ( 0 .. $t{length1} ) { $t{id} = $n + 1; $t{n1} = $t{names}[$n]; $t{n1} =~ s/=/\<br\>/g; #多行显示 $t{c1} = $t{codes}[$n]; $t{q1} = $t{qtys}[$n]; $t{unit1} = 'unit1_' . $t{id}; my %row = ( unit1 => $t{unit1}, id => $t{id}, name => $t{n1}, code => $t{c1}, qty => $t{q1} ); push(@loop1, \%row); } $t{template} = $self->load_tmpl('mscenq1_parts2.htm') || die "error loading tmpl"; $t{template}->param(DWG0 => $t{DWG0}); $t{template}->param(DWG0_id => $t{DWG0_id}); $t{template}->param(LOOP1 => \@loop1); $t{template}->param(NE1 => $t{NE1}); $t{template}->param(enq1_id => $t{enq1_id}); $t{template}->param(main_type1id => $t{main_type1id}); $t{template}->param(name1 => $t{name1}); $t{template}->param(pro => "mscenq1_parts2.pl"); $t{template}->param(partsname => $t{partsname}); $t{template}->param(partscode => $t{partscode}); $t{template}->param(partsqty => $t{partsqty}); $t{template}->param(names_length => $t{names_length}); $t{template}->param(codes_length => $t{codes_length}); $t{template}->param(qtys_length => $t{qtys_length}); $t{template}->param(mode => $t{mode}); } else { $t{template} = $self->load_tmpl('mscenq1_parts22.htm') || die "error loading tmpl"; $t{template}->param(DWG0 => $t{DWG0}); $t{template}->param(DWG0_id => $t{DWG0_id}); $t{template}->param(NE1 => $t{NE1}); $t{template}->param(enq1_id => $t{enq1_id}); $t{template}->param(main_type1id => $t{main_type1id}); $t{template}->param(name1 => $t{name1}); $t{template}->param(pro => "mscenq1_parts2.pl"); $t{template}->param(partsname => $t{partsname}); $t{template}->param(partscode => $t{partscode}); $t{template}->param(partsqty => $t{partsqty}); $t{template}->param(names_length => $t{names_length}); $t{template}->param(codes_length => $t{codes_length}); $t{template}->param(qtys_length => $t{qtys_length}); $t{template}->param(mode => $t{mode}); } return $t{template}->output; } 1;

mscenq1_parts2.htm

<HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <TITLE>enq1_parts2(Parts输入确认,Unit选择)</TITLE> <style type="text/css"> body { background: lightcyan; color:black; margin-left:2em;margin-right:2em;} </style> </HEAD> <BODY> <center> <h2>enq1_parts2(Parts输入确认,Unit选择)</h2></center> mode:modeenq1_parts2 <form action="" method="post"> <input type="submit" value="mscenq1_parts1へ戻る"><p> <input type="hidden" name="NE1" value="<TMPL_VAR NAME="NE1">"> <input type="hidden" name="enq1_id" value="<TMPL_VAR NAME="enq1_id">"> <input type="hidden" name="main_type1id" value="<TMPL_VAR NAME="main_type1id">"> <input type="hidden" name="name1" value="<TMPL_VAR NAME="name1">"> <input type="hidden" name="partsname" value="<TMPL_VAR NAME="partsname">"> <input type="hidden" name="partscode" value="<TMPL_VAR NAME="partscode">"> <input type="hidden" name="partsqty" value="<TMPL_VAR NAME="partsqty">"> <input type="hidden" name="DWG0" value="<TMPL_VAR NAME="DWG0">"> <input type="hidden" name="DWG0_id" value="<TMPL_VAR NAME="DWG0_id">"> <input type="hidden" name="rm" value="modeenq1_parts1"> </form> <hr color="#003366"> NE1==><TMPL_VAR NAME="NE1"><br> 主机NO=<TMPL_VAR NAME="main_type1id">;主机名=<TMPL_VAR NAME="name1"><br> enq1_id=><TMPL_VAR NAME="enq1_id"><br> pro=><TMPL_VAR NAME="pro"><br> partsname=><TMPL_VAR NAME="partsname"><br> partscode=><TMPL_VAR NAME="partscode"><br> partsqty=><TMPL_VAR NAME="partsqty"><br> names_length=><TMPL_VAR NAME="names_length"><br> codes_length=><TMPL_VAR NAME="codes_length"><br> qtys_length=><TMPL_VAR NAME="qtys_length"><br> mode=><TMPL_VAR NAME="mode"><br> 使用图纸,序号==><TMPL_VAR NAME="DWG0_id">,图号==><TMPL_VAR NAME="DWG0"><br> <hr color="#003366"> <form action="" method="post"> <!-- enq1输入数据 --> <table width=80% align="center" border=1 cellpadding=5> <caption>enq1输入数据</caption> <tr bgcolor="#FFD700" align="center"> <th>ID</th> <th>name</th> <th>code</th> <th>QTY</th> <th>unit</th> </tr> <TMPL_LOOP NAME="LOOP1"> <tr bgcolor="#F0FFF0" align="left"> <td><TMPL_VAR NAME="id"></td> <td><TMPL_VAR NAME="name"></td> <td><TMPL_VAR NAME="code"></td> <td><TMPL_VAR NAME="qty"></td> <td> <select name="<TMPL_VAR NAME="unit1">" size=1> <option value="1">PCS</option> <option value="2">SET</option> <option value="3">BOX</option> <option value="4">ROLL</option> <option value="5">PAIR</option> <option value="6">CAN</option> <option value="7">DOZ</option> </select> </td> </tr> </TMPL_LOOP> </table> <br> <center> <input type="submit" value="確定してから,enq1_parts3へ進む"> <input type="hidden" name="NE1" value="<TMPL_VAR NAME="NE1">"> <input type="hidden" name="enq1_id" value="<TMPL_VAR NAME="enq1_id">"> <input type="hidden" name="main_type1id" value="<TMPL_VAR NAME="main_type1id">"> <input type="hidden" name="name1" value="<TMPL_VAR NAME="name1">"> <input type="hidden" name="partsname" value="<TMPL_VAR NAME="partsname">"> <input type="hidden" name="partscode" value="<TMPL_VAR NAME="partscode">"> <input type="hidden" name="partsqty" value="<TMPL_VAR NAME="partsqty">"> <input type="hidden" name="DWG0" value="<TMPL_VAR NAME="DWG0">"> <input type="hidden" name="DWG0_id" value="<TMPL_VAR NAME="DWG0_id">"> <input type="hidden" name="rm" value="modeenq1_parts3"> </form> </center> <hr color="#003366"> </BODY> </HTML>

零件的比较和输入DB(mscenq1_parts3.pl)

sub mscenq1_parts3 { my $self = shift; my(%t,$n,$n1,@loop1,@loop2,@rec); my(@a,@b,@union,@isect,@diff,$e,%count,%count2); # 零件的单位 @{ $t{units_list} } = (PCS,SET,BOX,ROLL,PAIR,CAN,DOZ); # Get CGI query object $t{q} = $self->query(); $t{NE1} = $t{q}->param("NE1"); $t{enq1_id} = $t{q}->param("enq1_id"); $t{main_type1id} = $t{q}->param("main_type1id"); $t{name1} = $t{q}->param("name1"); $t{partsname} = $t{q}->param("partsname"); $t{partscode} = $t{q}->param("partscode"); $t{partsqty} = $t{q}->param("partsqty"); $t{DWG0} = $t{q}->param("DWG0"); $t{DWG0_id} = $t{q}->param("DWG0_id"); # 读人机界面的数据 @{ $t{names} } = split(/\r\n/,$t{partsname}); @{ $t{codes} } = split(/\r\n/,$t{partscode}); @{ $t{qtys} } = split(/\r\n/,$t{partsqty}); # 要去掉最后一个END $t{length1} = $#{ $t{names} } - 1; # units的存档 @{ $t{units} } = (); for $n ( 0 .. $t{length1} ) { $t{id} = $n + 1; $t{unit1} = 'unit1_' . $t{id}; $t{unit1} = $t{q}->param("$t{unit1}"); push(@{ $t{units} },$t{unit1}); } # enq1的输入数据进行配对(和DB同步时会打乱顺序) @b = (); for $n ( 0 .. $t{length1} ) { $t{n1} = $t{names}[$n]; $t{c1} = $t{codes}[$n]; $t{u1} = $t{units}[$n]; $t{c1} = $t{c1} . '===' . $t{DWG0_id}; $t{enq1_names}{$t{c1}} = $t{n1}; $t{enq1_units}{$t{c1}} = $t{u1}; push @b, $t{c1}; } # 零件表的名称 $t{ptable} = sprintf("%06d",$t{main_type1id}); $t{ptable} = 'a' . $t{ptable}; # 先判断是否是empty table. $t{count1} = $self->dbh->selectrow_array("SELECT count(*) FROM $t{ptable}"); # 取出DB的Parts的codes %count = %count2 = (); @union = @isect = @diff = (); if ( $t{count1} != 0 ) { # 只有在不是空表格时才进行操作 @{ $t{dbcodes} } = (); $t{sth} = $self->dbh->prepare("SELECT id,name,code,dwg_id,Nuid FROM $t{ptable}"); $t{sth}->execute; while ( @rec = $t{sth}->fetchrow_array ) { # 要考虑DWG不同,但是code相同的情况 $t{dbcode1} = $rec[2] . '===' . $rec[3]; # 这个操作合并code和DWG push @{ $t{dbcodes} }, $t{dbcode1}; $t{dbids}{$t{dbcode1}} = $rec[0]; $t{dbnames}{$t{dbcode1}} = $rec[1]; $t{dbunits}{$t{dbcode1}} = $rec[4]; $t{idmax} = $rec[0]; } $t{sth}->finish; # 同步作业 @a = @{ $t{dbcodes} }; foreach $e (@a,@b) { $count{$e}++ }; # @union = sort {$a<=>$b} keys %count; @union = sort keys %count; foreach $e ( keys %count ) { if ($count{$e} == 2 ) { $count2{$e}++; } } for $n ( 0 .. $#b ) { next if $count2{$b[$n]}; $t{idmax}++; push @diff, $b[$n]; $t{enq1_ids}{$b[$n]} = $t{idmax}; } # @diff = sort {$a<=>$b} @diff; # @diff = sort @diff; } else { # 空表格的情况 @union = @diff = @b; $t{idmax} = 0; for $n ( 0 .. $#b ) { $t{idmax}++; $t{enq1_ids}{$b[$n]} = $t{idmax}; } } # 显示零件表所有零件 for $n ( 0 .. $#union ) { $t{NO} = $n + 1; if ( $t{dbnames}{$union[$n]} ) { $t{name1} = $t{dbnames}{$union[$n]}; $t{unit1} = $t{dbunits}{$union[$n]}; $t{id1} = $t{dbids}{$union[$n]}; } else { $t{name1} = $t{enq1_names}{$union[$n]}; $t{unit1} = $t{enq1_units}{$union[$n]}; $t{id1} = $t{enq1_ids}{$union[$n]}; } $t{name1} =~ s/=/\<br\>/g; # 多行显示 ($t{c1},$t{dwg_id}) = split(/===/,$union[$n]); $t{alllist}{NO}{$t{dwg_id}}{$t{c1}} = $t{NO}; $t{alllist}{id1}{$t{dwg_id}}{$t{c1}} = $t{id1}; $t{alllist}{name1}{$t{dwg_id}}{$t{c1}} = $t{name1}; $t{alllist}{unit1}{$t{dwg_id}}{$t{c1}} = $t{units_list}[$t{unit1}-1]; } @loop2 = (); # 这个操作的目的是先按DWG,再按code排列 for $n ( sort keys %{ $t{alllist}{NO} } ) { for $n1 ( sort keys %{ $t{alllist}{NO}{$n} } ) { $t{NO} = $t{alllist}{NO}{$n}{$n1}; $t{id1} = $t{alllist}{id1}{$n}{$n1}; $t{name1} = $t{alllist}{name1}{$n}{$n1}; $t{unit1} = $t{alllist}{unit1}{$n}{$n1}; my %row = ( NO => $t{NO}, id => $t{id1}, name => $t{name1}, code => $n1, dwg_id => $n, unit => $t{unit1} ); push(@loop2, \%row); } } # 把新增加的零件插入DB中 if ( $#diff >= 0 ) { for $n ( 0 .. $#diff ) { $t{c1} = $diff[$n]; $t{n1} = $t{enq1_names}{$t{c1}}; $t{u1} = $t{enq1_units}{$t{c1}}; ($t{c1},$t{ctmp}) = split(/===/,$t{c1}); # 这个操作把code和DWG分开 $t{sql} = "INSERT INTO $t{ptable} (name,code,group_id,dwg_id,Nuid,weight) "; $t{sql} .= 'VALUES("' . $t{n1} . '","'; $t{sql} .= $t{c1} . '","'; $t{sql} .= "1" . '","'; $t{sql} .= $t{DWG0_id} . '","'; $t{sql} .= $t{u1} . '","1")'; $t{DO} = $self->dbh->do("$t{sql}"); } } # 把enq1的QTY等输入到对应的位置上(注意多主机的处理) # 这个操作把最后的END去掉 $t{QTY1} = join("=",@{ $t{qtys} }[0..$t{length1}]); # 取出现有的QTY $t{QTY} = $self->dbh->selectrow_array("SELECT QTY FROM enq1 WHERE id = $t{enq1_id}"); @{ $t{QTYs} } = split(/==/,$t{QTY}); @{ $t{QTYnews} } = (); for $n ( 0 .. $#{ $t{QTYs} } ) { $t{NO} = $n + 1; if ( $t{NO} == $t{NE1} ) { # 注意把老的也留下,C代表还没有输入一个零件 if ( $t{QTYs}[$n] ne 'C' ) { $t{QTY1} = $t{QTYs}[$n] . '=' . $t{QTY1}; } push(@{ $t{QTYnews} }, $t{QTY1}); } else { push(@{ $t{QTYnews} }, $t{QTYs}[$n]); } } $t{QTY1} = join("==",@{ $t{QTYnews} }); $t{sql} = 'UPDATE enq1 SET QTY = "'; $t{sql} .= $t{QTY1} . '" WHERE id = ' . $t{enq1_id}; $t{DO} = $self->dbh->do($t{sql}); # 从零件表中抽出id放入enq1中 $t{cs} = ''; for $n ( 0 .. $t{length1} ) { $t{c1} = $t{codes}[$n]; $t{cs} .= '_' . $t{c1}; } $t{sth} = $self->dbh->prepare("SELECT id, code, dwg_id FROM $t{ptable}"); $t{sth}->execute; @{ $t{pids} } = (); while ( @rec = $t{sth}->fetchrow_array ) { # 注意!除了code以外,DWG图纸号也要一致! if ( $t{cs} =~ /$rec[1]/ && $rec[2] == $t{DWG0_id} ) { push(@{ $t{pids} },$rec[0]); $t{db_psid}{$rec[1]} = $rec[0]; } } $t{sth}->finish; $t{partsid1} = join("=",@{ $t{pids} }); # 取出现有的partsid $t{partsid} = $self->dbh->selectrow_array("SELECT partsid FROM enq1 WHERE id = $t{enq1_id}"); @{ $t{partsids} } = split(/==/,$t{partsid}); @{ $t{partsidnews} } = (); for $n ( 0 .. $#{ $t{partsids} } ) { $t{NO} = $n + 1; if ( $t{NO} == $t{NE1} ) { # 注意把老的也留下 if ( $t{partsids}[$n] ne 'C' ) { $t{partsid1} = $t{partsids}[$n] . '=' . $t{partsid1}; } push(@{ $t{partsidnews} }, $t{partsid1}); } else { push(@{ $t{partsidnews} }, $t{partsids}[$n]); } } $t{partsid1} = join("==",@{ $t{partsidnews} }); $t{sql} = 'UPDATE enq1 SET partsid = "'; $t{sql} .= $t{partsid1} . '" WHERE id = ' . $t{enq1_id}; $t{DO} = $self->dbh->do($t{sql}); # enq1输入数据输出到HTML画面(一台主机) @loop1 = (); for $n ( 0 .. $t{length1} ) { $t{NO} = $n + 1; $t{n1} = $t{names}[$n]; $t{n1} =~ s/=/\<br\>/g; #多行显示 $t{c1} = $t{codes}[$n]; $t{q1} = $t{qtys}[$n]; $t{unit1} = $t{units}[$n]; my %row = ( unit1 => $t{units_list}[$t{unit1}-1], NO => $t{NO}, id => $t{db_psid}{$t{c1}}, name => $t{n1}, code => $t{c1}, dwg_id => $t{DWG0_id}, qty => $t{q1} ); push(@loop1, \%row); } $t{template} = $self->load_tmpl('mscenq1_parts3.htm') || die "error loading tmpl"; $t{template}->param(LOOP1 => \@loop1); $t{template}->param(LOOP2 => \@loop2); $t{template}->param(NE1 => $t{NE1}); $t{template}->param(ptable => $t{ptable}); $t{template}->param(DO => $t{DO}); $t{template}->param(enq1_id => $t{enq1_id}); $t{template}->param(main_type1id => $t{main_type1id}); $t{template}->param(name1 => $t{name1}); $t{template}->param(partsname => $t{partsname}); $t{template}->param(partscode => $t{partscode}); $t{template}->param(partsqty => $t{partsqty}); $t{template}->param(DWG0 => $t{DWG0}); $t{template}->param(DWG0_id => $t{DWG0_id}); $t{template}->param(pro => "mscenq1_parts3.pl"); return $t{template}->output; } 1;

mscenq1_parts3.htm

<HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <TITLE>enq1_parts3(Parts输入完成)</TITLE> <style type="text/css"> body { background: lightcyan; color:black; margin-left:2em;margin-right:2em;} </style> </HEAD> <BODY> <center> <h2>enq1_parts3(Parts输入完成)</h2></center> mode:modeenq1_parts3 <form action="" method="post"> <input type="submit" value="mscenq1_parts2へ戻る"><p> <!-- 这个传送很巧妙,把排序前的顺序保存下来了 --> <TMPL_LOOP NAME="LOOP0"> <input type="hidden" name="<TMPL_VAR NAME="NO">" value="1"> </TMPL_LOOP> <input type="hidden" name="NE1" value="<TMPL_VAR NAME="NE1">"> <input type="hidden" name="enq1_id" value="<TMPL_VAR NAME="enq1_id">"> <input type="hidden" name="main_type1id" value="<TMPL_VAR NAME="main_type1id">"> <input type="hidden" name="name1" value="<TMPL_VAR NAME="name1">"> <input type="hidden" name="partsname" value="<TMPL_VAR NAME="partsname">"> <input type="hidden" name="partscode" value="<TMPL_VAR NAME="partscode">"> <input type="hidden" name="partsqty" value="<TMPL_VAR NAME="partsqty">"> <input type="hidden" name="DWG0" value="<TMPL_VAR NAME="DWG0">"> <input type="hidden" name="DWG0_id" value="<TMPL_VAR NAME="DWG0_id">"> <input type="hidden" name="rm" value="modeenq1_parts2"> </form> <hr color="#003366"> 主机NO=<TMPL_VAR NAME="main_type1id">;主机名=<TMPL_VAR NAME="name1"><br> enq1_id=><TMPL_VAR NAME="enq1_id"><br> pro=><TMPL_VAR NAME="pro"><br> partsname=><TMPL_VAR NAME="partsname"><br> partscode=><TMPL_VAR NAME="partscode"><br> partsqty=><TMPL_VAR NAME="partsqty"><br> ptable=><TMPL_VAR NAME="ptable"><br> DO=><TMPL_VAR NAME="DO"><br> 使用图纸,序号==><TMPL_VAR NAME="DWG0_id">,图号==><TMPL_VAR NAME="DWG0"><br> <hr color="#003366"> <form action="" method="post"> <input type="submit" value="mscenq1_partsへ戻る"><p> <input type="hidden" name="id" value="<TMPL_VAR NAME="enq1_id">"> <input type="hidden" name="rm" value="modeenq1_parts"> </form> <!-- enq1输入零件 --> <table width=80% align="center" border=1 cellpadding=5> <caption>enq1输入零件</caption> <tr bgcolor="#FFD700" align="center"> <th>NO</th> <th>ID</th> <th>name</th> <th>code</th> <th>dwg_id</th> <th>QTY</th> <th>unit</th> </tr> <TMPL_LOOP NAME="LOOP1"> <tr bgcolor="#F0FFF0" align="left"> <td><TMPL_VAR NAME="NO"></td> <td><TMPL_VAR NAME="id"></td> <td><TMPL_VAR NAME="name"></td> <td><TMPL_VAR NAME="code"></td> <td><TMPL_VAR NAME="dwg_id"></td> <td><TMPL_VAR NAME="qty"></td> <td><TMPL_VAR NAME="unit1"></td> </tr> </TMPL_LOOP> </table> <hr color="#003366"> <!-- 数据库所有零件 --> <table width=80% align="center" border=1 cellpadding=5> <caption>数据库所有零件</caption> <tr bgcolor="#FFD700" align="center"> <th>NO</th> <th>ID</th> <th>name</th> <th>code</th> <th>dwg_id</th> <th>unit</th> </tr> <TMPL_LOOP NAME="LOOP2"> <tr bgcolor="#F0FFF0" align="left"> <td><TMPL_VAR NAME="NO"></td> <td><TMPL_VAR NAME="id"></td> <td><TMPL_VAR NAME="name"></td> <td><TMPL_VAR NAME="code"></td> <td><TMPL_VAR NAME="dwg_id"></td> <td><TMPL_VAR NAME="unit"></td> </tr> </TMPL_LOOP> </table> </BODY> </HTML>
戻る