85 lines
2.5 KiB
Plaintext
85 lines
2.5 KiB
Plaintext
diff a/云翔一码通/U_KuWeiList.pas b/云翔一码通/U_KuWeiList.pas (rejected hunks)
|
||
@@ -212,6 +212,82 @@
|
||
TBFind.Click;
|
||
end;
|
||
|
||
+procedure TfrmKuWeiList.ToolButton4Click(Sender: TObject);
|
||
+begin
|
||
+ if Order_Main.IsEmpty then Exit;
|
||
+ if Trim(ComboBox1.Text)='' then
|
||
+ begin
|
||
+ Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>','<27><>ʾ',0);
|
||
+ Exit;
|
||
+ end;
|
||
+ if Order_Main.Locate('SSel',True,[])=False then
|
||
+ begin
|
||
+ Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!','<27><>ʾ',0);
|
||
+ Exit;
|
||
+ end;
|
||
+ Order_Main.DisableControls;
|
||
+ with Order_Main do
|
||
+ begin
|
||
+ First;
|
||
+ while Locate('SSel',True,[]) do
|
||
+ begin
|
||
+ PrtData(Trim(Order_Main.fieldbyname('KWID').AsString));
|
||
+ Edit;
|
||
+ FieldByName('SSel').Value:=False;
|
||
+ end;
|
||
+ end;
|
||
+ Order_Main.EnableControls;
|
||
+end;
|
||
+procedure TfrmKuWeiList.PrtData(KWID:String);
|
||
+var
|
||
+ fPrintFile,Txt,fImagePath:string;
|
||
+ i,j:Integer;
|
||
+ Moudle: THandle;
|
||
+ Makebar:TMakebar;
|
||
+ Mixtext:TMixtext;
|
||
+begin
|
||
+ fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\<5C><>λ<EFBFBD><CEBB>ǩ.rmf';
|
||
+ if FileExists(fPrintFile)=False then
|
||
+ begin
|
||
+ Application.MessageBox(PChar('û<><C3BB><EFBFBD><EFBFBD>'+ExtractFilePath(Application.ExeName)+'Report\<5C><>λ<EFBFBD><CEBB>ǩ.rmf'),'<27><>ʾ',0);
|
||
+ exit;
|
||
+ end;
|
||
+ with ADOQueryTemp do
|
||
+ begin
|
||
+ Close;
|
||
+ SQL.Clear;
|
||
+ sql.Add('select * from KuWei where KWID='''+Trim(KWID)+'''');
|
||
+ Open;
|
||
+ end;
|
||
+ SCreateCDS20(ADOQueryTemp,CDS_PRT);
|
||
+ SInitCDSData20(ADOQueryTemp,CDS_PRT);
|
||
+ try
|
||
+ Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
||
+ @Makebar:=GetProcAddress(Moudle,'Make');
|
||
+ @Mixtext:=GetProcAddress(Moudle,'MixText');
|
||
+ Txt:=Trim(KWID);
|
||
+ fImagePath:=ExtractFilePath(Application.ExeName)+'image\temp.bmp';
|
||
+ if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName)+'image')) then
|
||
+ CreateDirectory(pchar(ExtractFilePath(Application.ExeName)+'image'),nil);
|
||
+ if FileExists(fImagePath) then DeleteFile(fImagePath);
|
||
+ Makebar(pchar(Txt),Length(Txt),3,3,0,PChar(fImagePath),3);
|
||
+ except
|
||
+ application.MessageBox('<27><>ά<EFBFBD><CEAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>','<27><>ʾ<EFBFBD><CABE>Ϣ',MB_ICONERROR);
|
||
+ exit;
|
||
+ end;
|
||
+ RMVariables['QRBARCODE']:=fImagePath;
|
||
+ if Trim(ComboBox1.Text)='<27><>' then
|
||
+ begin
|
||
+ RMVariables['FangXiang']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
||
+ end else
|
||
+ if Trim(ComboBox1.Text)='<27><>' then
|
||
+ begin
|
||
+ RMVariables['FangXiang']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
||
+ end;
|
||
+ RM1.LoadFromFile(fPrintFile);
|
||
+ //RM1.ShowReport;
|
||
+ RM1.PrintReport;
|
||
+end;
|
||
|
||
procedure TfrmKuWeiList.TbSelectClick(Sender: TObject);
|
||
begin
|