|
|
unit u_op_seae_qiandan_add;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, XPMenu, Menus, dxDBTLCl, dxGrClms, dxDBCtrl, dxDBGrid,
|
|
|
dxTL, dxCntner, DB, ADODB, Mask, wwdbedit, Wwdotdot, Wwdbcomb, wwdblook,
|
|
|
RxLookup, wwdbdatetimepicker, StdCtrls, bsSkinCtrls, ExtCtrls, ComCtrls,
|
|
|
bsSkinTabs, DBCtrls;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_seae_qiandan_add = class(TForm)
|
|
|
Panel2: TPanel;
|
|
|
Panel3: TPanel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
Label6: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Label1: TLabel;
|
|
|
Label2: TLabel;
|
|
|
Label10: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label11: TLabel;
|
|
|
Label30: TLabel;
|
|
|
Label125: TLabel;
|
|
|
Label124: TLabel;
|
|
|
Label16: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
Edit4: TEdit;
|
|
|
Edit2: TEdit;
|
|
|
Edit3: TEdit;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
Edit7: TEdit;
|
|
|
wwDBLookupCombo49: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
t_op_seae: TADOQuery;
|
|
|
t_op_seae1: TDataSource;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column84: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column85: TdxDBGridColumn;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column78: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column27: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column29: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column31: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column32: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column33: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column35: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column36: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column37: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column38: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column39: TdxDBGridColumn;
|
|
|
dxDBGrid1Column40: TdxDBGridColumn;
|
|
|
dxDBGrid11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid15: TdxDBGridMaskColumn;
|
|
|
dxDBGrid16: TdxDBGridMaskColumn;
|
|
|
dxDBGrid17: TdxDBGridMaskColumn;
|
|
|
dxDBGrid18: TdxDBGridMaskColumn;
|
|
|
dxDBGrid19: TdxDBGridMaskColumn;
|
|
|
dxDBGrid110: TdxDBGridMaskColumn;
|
|
|
dxDBGrid111: TdxDBGridMaskColumn;
|
|
|
dxDBGrid112: TdxDBGridMaskColumn;
|
|
|
dxDBGrid113: TdxDBGridMaskColumn;
|
|
|
dxDBGrid114: TdxDBGridMaskColumn;
|
|
|
dxDBGrid115: TdxDBGridMaskColumn;
|
|
|
dxDBGrid116: TdxDBGridMaskColumn;
|
|
|
dxDBGrid117: TdxDBGridMaskColumn;
|
|
|
dxDBGrid118: TdxDBGridMaskColumn;
|
|
|
dxDBGrid119: TdxDBGridMaskColumn;
|
|
|
dxDBGrid120: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column61: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1TEU: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column63: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column64: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column65: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column66: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column67: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column72: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column68: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column69: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column70: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column74: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column75: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column73: TdxDBGridColumn;
|
|
|
dxDBGrid1Column76: TdxDBGridColumn;
|
|
|
dxDBGrid1Column77: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column79: TdxDBGridColumn;
|
|
|
dxDBGrid1Column80: TdxDBGridColumn;
|
|
|
dxDBGrid1Column81: TdxDBGridColumn;
|
|
|
dxDBGrid1Column86: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column87: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column88: TdxDBGridColumn;
|
|
|
bsSkinButton13: TbsSkinButton;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
XPMenu1: TXPMenu;
|
|
|
t_op_seaesel: TADOQuery;
|
|
|
ds_op_seaesel1: TDataSource;
|
|
|
pm1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
N3: TMenuItem;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
bsSkinButton15: TbsSkinButton;
|
|
|
t_op_bill: TADOQuery;
|
|
|
ds_op_bill1: TDataSource;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bskntbsht1: TbsSkinTabSheet;
|
|
|
bskntbsht2: TbsSkinTabSheet;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGrid2Column1: TdxDBGridColumn;
|
|
|
dxDBGrid2Column2: TdxDBGridColumn;
|
|
|
dxDBGrid2Column3: TdxDBGridColumn;
|
|
|
dxDBGrid2Column4: TdxDBGridColumn;
|
|
|
dxDBGrid2Column5: TdxDBGridColumn;
|
|
|
dxDBGrid2Column6: TdxDBGridColumn;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
dxDBGridDateColumn2: TdxDBGridDateColumn;
|
|
|
dxDBGridDateColumn3: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn4: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn21: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn5: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn27: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn28: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn29: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn30: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn31: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn32: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn33: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn34: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn35: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn36: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn37: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn38: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn39: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn40: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn41: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn42: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn43: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn44: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn45: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn46: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn47: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn48: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn49: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn50: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn51: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn52: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn53: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn54: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn55: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn56: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn6: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn57: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn58: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn59: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn60: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn61: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn62: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn63: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn64: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
dxDBGridCheckColumn2: TdxDBGridCheckColumn;
|
|
|
dxDBGridColumn7: TdxDBGridColumn;
|
|
|
dxDBGridColumn8: TdxDBGridColumn;
|
|
|
dxDBGridCheckColumn3: TdxDBGridCheckColumn;
|
|
|
dxDBGridColumn9: TdxDBGridColumn;
|
|
|
dxDBGridColumn10: TdxDBGridColumn;
|
|
|
dxDBGridCheckColumn4: TdxDBGridCheckColumn;
|
|
|
dxDBGridCheckColumn5: TdxDBGridCheckColumn;
|
|
|
dxDBGridColumn11: TdxDBGridColumn;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
MenuItem1: TMenuItem;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
Label4: TLabel;
|
|
|
DBEdit9: TDBEdit;
|
|
|
DBEdit10: TDBEdit;
|
|
|
Label7: TLabel;
|
|
|
Label12: TLabel;
|
|
|
wwDBDateTimePicker5: TwwDBDateTimePicker;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
MenuItem2: TMenuItem;
|
|
|
dxDBGrid2Column7: TdxDBGridColumn;
|
|
|
Label13: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
Label14: TLabel;
|
|
|
DBEdit2: TDBEdit;
|
|
|
Label15: TLabel;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
Panel1: TPanel;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
Label17: TLabel;
|
|
|
wwDBDateTimePicker6: TwwDBDateTimePicker;
|
|
|
Label18: TLabel;
|
|
|
wwDBDateTimePicker7: TwwDBDateTimePicker;
|
|
|
Label19: TLabel;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton13Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure N3Click(Sender: TObject);
|
|
|
procedure N1Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure MenuItem2Click(Sender: TObject);
|
|
|
procedure t_op_billAfterInsert(DataSet: TDataSet);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seae_qiandan_add: Tfrm_op_seae_qiandan_add;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses my_sys_function, u_main, my_sys_chat;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_op_seae_qiandan_add.Hide;
|
|
|
frm_op_seae_qiandan_add.ManualFloat(frm_op_seae_qiandan_add.BoundsRect );
|
|
|
frm_main.freeTabs('frm_op_seae_qiandan_add');
|
|
|
action:=cafree;
|
|
|
frm_op_seae_qiandan_add:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_bill.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
if t_op_bill.FieldByName('״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'then
|
|
|
begin
|
|
|
showmessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
try
|
|
|
t_op_bill.edit;
|
|
|
t_op_bill['״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
|
|
|
t_op_bill.post;
|
|
|
except
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
end;
|
|
|
t_op_bill.Refresh;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
|
|
|
str:='where <20>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9><>1';
|
|
|
|
|
|
if Edit1.text<>''then
|
|
|
str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
|
|
|
if Edit4.text<>''then
|
|
|
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
|
|
|
if Edit2.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
|
|
|
if Edit3.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD> like '+''''+'%'+Edit3.text+'%'+'''';
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
if wwDBDateTimePicker2.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
if wwDBDateTimePicker3.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
|
|
|
if wwDBDateTimePicker4.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''';
|
|
|
if RxDBLookupCombo2.DisplayValues[1]<>''then
|
|
|
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
// if RxDBLookupCombo6.DisplayValues[1]<>''then
|
|
|
// str:=str+' and <20><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo6.DisplayValues[1]+'''';
|
|
|
if wwDBLookupCombo49.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo49.text+'%'+'''';
|
|
|
if Edit7.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit7.text+'%'+'''';
|
|
|
if wwDBLookupCombo52.text<>''then
|
|
|
str:=str+' and ж<><D0B6><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo52.text+'%'+'''';
|
|
|
|
|
|
t_op_seae.close;
|
|
|
t_op_seae.sql.clear;
|
|
|
t_op_seae.sql.add('select * from t_op_seae '+str+default_sort(53,'t_op_seae','','desc'));
|
|
|
t_op_seae.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
Edit1.text:='';
|
|
|
Edit4.text:='';
|
|
|
Edit2.text:='';
|
|
|
Edit3.text:='';
|
|
|
wwDBDateTimePicker1.text:='';
|
|
|
wwDBDateTimePicker2.text:='';
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
wwDBDateTimePicker3.text:='';
|
|
|
wwDBDateTimePicker4.text:='';
|
|
|
wwDBLookupCombo49.text:='';
|
|
|
Edit7.text:='';
|
|
|
wwDBLookupCombo52.text:='';
|
|
|
RxDBLookupCombo6.ClearValue;
|
|
|
wwDBDateTimePicker5.text:='';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_op_seae,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,99);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,true,caption);
|
|
|
t_op_bill.Open;
|
|
|
t_op_seaesel.Open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton13Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if t_op_seae.FieldByName('<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>').asboolean then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD>Ѿ<EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
{ if t_op_seae.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>');
|
|
|
exit;
|
|
|
end; }
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae['<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>']:=1;
|
|
|
t_op_seae['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_op_seae.post;
|
|
|
showmessage('ȷ<><C8B7>ǩ<EFBFBD><C7A9><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if not t_op_seae.FieldByName('<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>').asboolean then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
{if t_op_seae.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>');
|
|
|
exit;
|
|
|
end; }
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae['<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>']:=0;
|
|
|
t_op_seae['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_op_seae.post;
|
|
|
showmessage('ȡ<><C8A1>ǩ<EFBFBD><C7A9><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.N3Click(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
str:widestring;
|
|
|
begin
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if dxDBGrid1.SelectedCount>=0 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do begin
|
|
|
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
if i=0 then
|
|
|
str:='('+''''+t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''''
|
|
|
else
|
|
|
str:=str+','+''''+t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
|
|
|
end;
|
|
|
end else begin
|
|
|
str:='('+''''+t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
|
|
|
end;
|
|
|
str:=str+')';
|
|
|
|
|
|
t_op_seaesel.close;
|
|
|
t_op_seaesel.sql.clear;
|
|
|
t_op_seaesel.sql.add('select * from t_op_seae '
|
|
|
+'where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in '+str
|
|
|
+default_sort(53,'t_op_seae','','desc'));
|
|
|
t_op_seaesel.open;
|
|
|
|
|
|
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>ǩ<EFBFBD><C7A9>',2,nil,nil,nil,nil,ds_op_seaesel1,nil,nil,nil,nil,nil,nil);
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.N1Click(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
|
|
|
|
|
|
if (t_op_bill.FieldByName('״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
if t_op_bill.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
|
|
|
|
|
|
if dxDBGrid1.SelectedCount>=1 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae.FieldByName('<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>').AsBoolean:=True;
|
|
|
t_op_seae.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date;
|
|
|
t_op_seae.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=t_op_bill.fieldByName('BILL_ID').AsInteger;
|
|
|
t_op_seae.Post;
|
|
|
end;
|
|
|
end;
|
|
|
if t_op_bill.state in [dsedit,dsinsert] then
|
|
|
t_op_bill.Post;
|
|
|
t_op_bill.Requery();
|
|
|
t_op_seae.Requery();
|
|
|
t_op_seaesel.Requery();
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_bill.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
if t_op_bill.FieldByName('״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'then
|
|
|
begin
|
|
|
showmessage('û<><C3BB><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
try
|
|
|
t_op_bill.edit;
|
|
|
t_op_bill['״̬']:='<27>½<EFBFBD>ǩ<EFBFBD><C7A9>';
|
|
|
t_op_bill.post;
|
|
|
except
|
|
|
showmessage('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
end;
|
|
|
t_op_bill.Refresh;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.MenuItem2Click(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
if (t_op_bill.FieldByName('״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if t_op_seaesel.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
|
|
|
if dxDBGrid3.SelectedCount>=1 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid3.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_seaesel.GotoBookmark(pointer(dxDBGrid3.selectedrows[i]));
|
|
|
t_op_seaesel.Edit;
|
|
|
t_op_seaesel.FieldByName('<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>').AsBoolean:=false;
|
|
|
t_op_seaesel['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Null;
|
|
|
t_op_seaesel.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=0;
|
|
|
t_op_seaesel.Post;
|
|
|
end;
|
|
|
end;
|
|
|
t_op_bill.Requery();
|
|
|
t_op_seaesel.Requery();
|
|
|
t_op_seae.Requery();
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.t_op_billAfterInsert(DataSet: TDataSet);
|
|
|
function GetMaxItems:Integer;
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
CLose;SQL.Clear;
|
|
|
sql.Add('Select Max(BILL_ID) from t_op_bill');
|
|
|
open;
|
|
|
if Fields[0].IsNull then
|
|
|
Result:=1
|
|
|
else
|
|
|
Result:=Fields[0].AsInteger+1;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
begin
|
|
|
DataSet.FieldByName('BILL_ID').AsInteger:=GetMaxItems;
|
|
|
DataSet.FieldByName('״̬').AsString:='<27>½<EFBFBD>ǩ<EFBFBD><C7A9>';
|
|
|
DataSet.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>').AsString:=employee;
|
|
|
DataSet.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=NOW;
|
|
|
DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
|
|
|
DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=NOW;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_bill.Insert;
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_bill.State in [dsedit,dsinsert] then
|
|
|
t_op_bill.Post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_bill.IsEmpty then
|
|
|
exit;
|
|
|
if (t_op_bill.FieldByName('״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_op_seaesel.First;
|
|
|
while not t_op_seaesel.Eof do begin
|
|
|
t_op_seaesel.Edit;
|
|
|
t_op_seaesel.FieldByName('<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>').AsBoolean:=false;
|
|
|
t_op_seaesel.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=0;
|
|
|
t_op_seaesel.Post;
|
|
|
t_op_seaesel.Next;
|
|
|
end;
|
|
|
t_op_bill.Delete;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_bill.IsEmpty then
|
|
|
exit;
|
|
|
t_op_bill.Cancel;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton15Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_bill.IsEmpty then
|
|
|
exit;
|
|
|
t_op_bill.Edit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton11Click(Sender: TObject);
|
|
|
var
|
|
|
Str:String;
|
|
|
begin
|
|
|
t_op_seaesel.Close;
|
|
|
t_op_bill.Close;
|
|
|
t_op_bill.SQL.Clear;
|
|
|
Str:=' where 1=1';
|
|
|
if wwDBDateTimePicker6.text<>''then
|
|
|
str:=str+' and ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker6.text+'''';
|
|
|
if wwDBDateTimePicker7.text<>''then
|
|
|
str:=str+' and ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker7.text+'''';
|
|
|
if RxDBLookupCombo1.DisplayValues[1]<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo1.DisplayValues[1]+'''';
|
|
|
t_op_bill.close;
|
|
|
t_op_bill.sql.clear;
|
|
|
t_op_bill.sql.add('select * from t_op_bill '+str+' order by BILL_ID DESC');
|
|
|
t_op_bill.open;
|
|
|
t_op_seaesel.Open;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
Close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton12Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('Ӧ<>շ<EFBFBD><D5B7>ý<EFBFBD><C3BD><EFBFBD>',2,ds_op_bill1,nil,nil,nil,
|
|
|
ds_op_seaesel1,nil,nil,nil,ds_op_bill1,nil,nil);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|