⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gztunit.pas

📁 工资管理系统
💻 PAS
📖 第 1 页 / 共 2 页
字号:
                  datat.table2.fieldbyname('jt_kl').asfloat:=data.query4.fields[26].asfloat;
                  datat.table2.fieldbyname('jt_jh').asfloat:=data.query4.fields[27].asfloat;
                  datat.table2.fieldbyname('jt_gat').asfloat:=data.query4.fields[28].asfloat;
                  datat.table2.fieldbyname('jt_7x').asfloat:=data.query4.fields[29].asfloat;
                  datat.table2.fieldbyname('jt_ly').asfloat:=data.query4.fields[30].asfloat;
                  datat.table2.fieldbyname('jt_lc').asfloat:=data.query4.fields[31].asfloat;
                  datat.table2.fieldbyname('jt_lj').asfloat:=data.query4.fields[32].asfloat;
                  //加班字段有问题
                  datat.table2.fieldbyname('jt_b9').asfloat:=data.query4.fields[33].asfloat;
                  datat.table2.fieldbyname('jt_hz').asfloat:=data.query4.fields[34].asfloat;
                  datat.table2.fieldbyname('jt_ft').asfloat:=data.query4.fields[35].asfloat;
                  datat.table2.fieldbyname('jt_qt').asfloat:=data.query4.fields[36].asfloat;
//                  datat.table2.fieldbyname('j_ce').asfloat:=data.query4.fields[37].asfloat;
                  datat.table2.fieldbyname('qt_jb').asfloat:=data.query4.fields[38].asfloat;
                  datat.table2.fieldbyname('qt_qt').asfloat:=data.query4.fields[39].asfloat;
                  datat.table2.fieldbyname('fg_wc_d').asfloat:=data.query4.fields[40].asfloat;
                  datat.table2.fieldbyname('fg_wc').asfloat:=data.query4.fields[41].asfloat;
                  datat.table2.fieldbyname('fg_bj').asfloat:=data.query4.fields[42].asfloat;
                  datat.table2.fieldbyname('yf').asfloat:=data.query4.fields[43].asfloat;
                  datat.table2.fieldbyname('kk_yl').asfloat:=data.query4.fields[44].asfloat;
                  datat.table2.fieldbyname('kk_gj').asfloat:=data.query4.fields[45].asfloat;
                  datat.table2.fieldbyname('kk_qt1').asfloat:=data.query4.fields[46].asfloat;
                  datat.table2.fieldbyname('kk_qt2').asfloat:=data.query4.fields[47].asfloat;
                  datat.table2.fieldbyname('sfe').asfloat:=data.query4.fields[48].asfloat;
                  datat.table2.fieldbyname('bz_hj').asfloat:=data.query4.fields[49].asfloat;

                  datat.table2.fieldbyname('zjqt3').asfloat:=data.query4.fields[50].asfloat;
                  datat.table2.fieldbyname('zjqt4').asfloat:=data.query4.fields[51].asfloat;
                  datat.table2.fieldbyname('zjqt5').asfloat:=data.query4.fields[52].asfloat;
                  datat.table2.fieldbyname('zjng').asfloat:=data.query4.fields[53].asfloat;
                  datat.table2.fieldbyname('zjbzqt').asfloat:=data.query4.fields[54].asfloat;
                  datat.Table2.Post;
                  datat.Table2.First;
                  while not (datat.table2.eof) do
                     begin
                        Application.ProcessMessages;
                        datat.table5.Append;
                        for n:=0 to datat.table2.FieldCount-1 do
                        begin
                                datat.Table5.Edit;
                                datat.Table5.Fields[n].assign(datat.table2.Fields[n]);
                                datat.Table5.Post;
//                                datat.Table5.Edit;
                        end;
                        datat.table2.Next;
                      end;

//合计 lsk
      end;//i<=lllll

  end;//query1 end

    //清零

with datat.Table5 do
   begin
       open;
       first;
       Application.ProcessMessages;
while not eof do
    begin
        for i:=0 to datat.table5.FieldCount-1 do
      begin
//990929          edit;
        if fields[i].asstring='0' then
          begin
               edit;
               fields[i].asstring:='';
               post;
           end;
      end;
   next;
end;
end;
//清零end
     Application.ProcessMessages;
     try
     Application.CreateForm(TgzP, gzP);
     gzp.QuickRep1.Prepare;

     case Rg4.ItemIndex of
     1:
       begin
            gzp.jj.enabled:=false;
       end;
     end;
     gzp.QRLabel40.Caption:='备注:'+edit1.text;
     gzp.QRLabel50.Caption:=listbox1.Items[jj];
     gzp.QRLabel51.Caption:=listbox1.Items[jj];
     gzp.QRLabel63.Caption:='页  共'+inttostr(gzp.quickrep1.Printer.PageCount)+'页';
     gzp.QuickRep1.ShowProgress:=false;
     case (sender as TComponent).tag of
     0:begin
     gzp.QuickRep1.print;
     end;
      1:begin
     PrintShowForm.hide;
     gzp.QuickRep1.Preview;
     prev.release;
     end;
     end;
     except
          Application.MessageBox('打印错误!!!您没有安装打印机!!!','提示框',mb_ok+mb_iconstop);
     end;
     gzp.Hide;
     gzp.release;

   PrintShowForm.Update;
   PrintShowForm.hide;
   sleep(1000);
   end;
     datat.Table2.EnableControls;
     datat.Table5.EnableControls;
     data.Query1.EnableControls;
     data.Query4.EnableControls;
     datat.Table2.Close;
     datat.Table5.Close;
     data.Query1.Close;
     data.Query4.Close;
end;

procedure TGzt.SpeedButton6Click(Sender: TObject);
var i:integer;
begin
try
      ListBox1.Items.Add(listbox2.Items[listbox2.ItemIndex]);
      //listbox1.Items.Delete(listbox1.itemindex);
      listbox2.SetFocus;
      listbox2.Update;
     // ShowMessage(IntToStr(listbox1.ItemIndex));
      i:=listbox2.ItemIndex;
      listbox2.Items.Delete(listbox2.itemindex);
      listbox2.ItemIndex:=i;

except
MessageBox(Handle,'请选择部门(单击部门列表再选择)',pchar(caption),Mb_iconstop+Mb_ok);
end;
  panel2.Caption:='已有'+IntToStr(listbox1.Items.count)+'个部门被选择';
end;

procedure TGzt.SpeedButton7Click(Sender: TObject);
var i:integer;
begin
try
      listbox1.Update;
      ListBox2.Items.Add(listbox1.Items[listbox1.ItemIndex]);
      listbox1.Items.Delete(listbox1.itemindex);
      listbox1.Update;
      i:=listbox1.ItemIndex;
      listbox1.ItemIndex:=i;
      listbox1.Update;
      listbox1.SetFocus;

except
MessageBox(Handle,'请选择部门(单击部门列表再选择)',pchar(caption),Mb_iconstop+Mb_ok);
end;
 panel2.Caption:='已有'+IntToStr(listbox1.Items.count)+'个部门被选择';
end;

procedure TGzt.SpeedButton8Click(Sender: TObject);
var i:integer;
begin
try
   for i:=0 to listbox2.Items.Count do
     begin
      ListBox1.Items.Add(listbox2.Items[i]);
     end;
except
end;
      try
      listbox2.Items.Clear;
      except
      end;
 panel2.Caption:='已有'+IntToStr(listbox1.Items.count)+'个部门被选择';
end;

procedure TGzt.SpeedButton9Click(Sender: TObject);
var i:integer;
begin
try
   for i:=0 to listbox1.Items.Count do
     begin
      ListBox2.Items.Add(listbox1.Items[i]);
     end;
  except
end;
  try
      listbox1.Items.Clear;
    except
  end;
   panel2.Caption:='已有'+IntToStr(listbox1.Items.count)+'个部门被选择';
end;


procedure TGzt.SpeedButton2Click(Sender: TObject);
begin
 Close;
end;

procedure TGzt.ListBox2Click(Sender: TObject);
var i:integer;
begin
    i:=listbox2.ItemIndex;
    gzt.Caption:='工资条打印---选中'+listbox2.Items[i];
    speedbutton6.Click;
end;

procedure TGzt.ListBox1Click(Sender: TObject);
var i:integer;
begin
    i:=listbox1.ItemIndex;
    gzt.Caption:='工资条打印---选中'+listbox1.Items[i];

end;
procedure TGzt.SpeedButton4Click(Sender: TObject);
var
//txyza:file;
   I:integer;
   //ll:string;
begin
if listbox1.Items.Count>0 then
begin
    //  assignfile(txyza,'print.Txt');
//   reset(txyza);
//ll:='Print'+datetimetostr(date)+'.txt';
   listbox1.Items.Add('_'+datetimetostr(now));
   for i:=0 to listbox1.Items.Count-1 do
   begin
   listbox1.Items.saveToFile('Print.Txt');
   end;
   listbox1.ItemIndex:=0;
   listbox1.Items.Delete(0);
 end;
end;

procedure TGzt.SpeedButton5Click(Sender: TObject);
begin
try
 if OPENDIALOG1.Execute then
   shellexecute(Handle,nil,PChar(opendialog1.FileName),'','',SW_SHOW);
except
   Application.MessageBox('您的计算机不存在NOTEPAD.EXE或者WINWORD软件!!!请安装!!!','提示框',mb_ok+mb_iconstop);
   abort;
end;
end;



procedure TGzt.Panel1DblClick(Sender: TObject);
begin
close;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -