unit u_op_mblsign;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, bsSkinCtrls, DB,
ADODB, ExtCtrls, RxLookup, StdCtrls, wwdbdatetimepicker, wwdblook, Menus,
Mask, bsSkinBoxCtrls, bsdbctrls,DateUtils, kbmMemTable, DBCtrlsEh,
ComCtrls, bsSkinTabs, dxDBTLCl, dxGrClms;
type
Tfrm_op_mblsign = class(TForm)
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
kbmMemTable1: TkbmMemTable;
kbmMemTable1Field: TStringField;
kbmMemTable1Field3: TStringField;
kbmMemTable1Field4: TStringField;
kbmMemTable1Field5: TStringField;
kbmMemTable1Field6: TStringField;
kbmMemTable1Field7: TStringField;
kbmMemTable1Field2: TStringField;
kbmMemTable1Field9: TStringField;
kbmMemTable1Field10: TStringField;
kbmMemTable1Field8: TStringField;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
kbmMemTable1Field11: TStringField;
kbmMemTable1Field12: TStringField;
kbmMemTable1Field13: TStringField;
kbmMemTable1Field14: TStringField;
kbmMemTable1Field15: TStringField;
kbmMemTable1Field16: TStringField;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton9: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinPanel2: TbsSkinPanel;
Label6: TLabel;
Label3: TLabel;
Label1: TLabel;
Label10: TLabel;
Label5: TLabel;
Label9: TLabel;
Label30: TLabel;
Label125: TLabel;
Label124: TLabel;
Label2: TLabel;
Label4: TLabel;
Label7: TLabel;
Edit1: TEdit;
Edit4: TEdit;
Edit2: TEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker2: TwwDBDateTimePicker;
RxDBLookupCombo2: TRxDBLookupCombo;
Edit7: TEdit;
wwDBLookupCombo49: TwwDBLookupCombo;
wwDBLookupCombo52: TwwDBLookupCombo;
wwDBDateTimePicker3: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
DBComboBoxEh1: TDBComboBoxEh;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column13: TdxDBGridColumn;
dxDBGrid2Column14: TdxDBGridColumn;
dxDBGrid2Column1: TdxDBGridColumn;
dxDBGrid2Column2: TdxDBGridColumn;
dxDBGrid2Column3: TdxDBGridColumn;
dxDBGrid2Column11: TdxDBGridColumn;
dxDBGrid2Column4: TdxDBGridColumn;
dxDBGrid2Column5: TdxDBGridColumn;
dxDBGrid2Column6: TdxDBGridColumn;
dxDBGrid2Column8: TdxDBGridColumn;
dxDBGrid2Column10: TdxDBGridColumn;
dxDBGrid2Column12: TdxDBGridColumn;
bsSkinPanel3: TbsSkinPanel;
bsSkinButton4: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinPanel4: TbsSkinPanel;
Label13: TLabel;
Label14: TLabel;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBDateTimePicker6: TwwDBDateTimePicker;
dxDBGrid1: TdxDBGrid;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridColumn7: TdxDBGridColumn;
dxDBGridColumn8: TdxDBGridColumn;
kbmMemTable3: TkbmMemTable;
StringField1: TStringField;
StringField3: TStringField;
StringField4: TStringField;
StringField5: TStringField;
StringField6: TStringField;
StringField8: TStringField;
PopupMenu2: TPopupMenu;
MenuItem1: TMenuItem;
DataSource1: TDataSource;
kbmMemTable3Field: TStringField;
kbmMemTable3Field2: TStringField;
kbmMemTable3Field3: TStringField;
kbmMemTable3Field4: TStringField;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridColumn;
Edit6: TEdit;
Label8: TLabel;
ADOQUERY_TZFD: TADOQuery;
ADOQUERY_TDQR: TADOQuery;
ADOQUERY_TDQC: TADOQuery;
ADOQUERY_TDQF: TADOQuery;
ADOQUERY_TSFD: TADOQuery;
kbmMemTable1Field17: TStringField;
dxDBGrid2Column15: TdxDBGridColumn;
kbmMemTable1Field18: TStringField;
kbmMemTable1Field19: TStringField;
kbmMemTable1Field20: TStringField;
dxDBGrid2Column16: TdxDBGridColumn;
dxDBGrid2Column17: TdxDBGridColumn;
dxDBGrid2Column18: TdxDBGridColumn;
dxDBGrid2Column19: TdxDBGridColumn;
kbmMemTable1Field21: TStringField;
kbmMemTable1Field22: TBooleanField;
dxDBGrid2Column20: TdxDBGridCheckColumn;
CheckBox1: TCheckBox;
Label35: TLabel;
RxDBLookupCombo28: TRxDBLookupCombo;
kbmMemTable1Field23: TStringField;
dxDBGrid2Column21: TdxDBGridColumn;
ADOQUERY_TDQH: TADOQuery;
bsSkinButton7: TbsSkinButton;
kbmMemTable1Field24: TStringField;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinPanel1Resize(Sender: TObject);
procedure dxDBGrid2ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure bsSkinButton1Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure dxDBGrid2CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure Edit2KeyPress(Sender: TObject; var Key: Char);
procedure dxDBGrid2DblClick(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure dxDBGrid2Column13CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure bsSkinButton3Click(Sender: TObject);
procedure dxDBGrid2Column14CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure bsSkinButton13Click(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure RxDBLookupCombo28Enter(Sender: TObject);
procedure RxDBLookupCombo28Exit(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
op:integer;
function GetmblState(bsno:string):Boolean;
function GetmblzbState(bsno:string):Boolean;
function GetmblStateOut(bsno:string):Boolean;
procedure UpateSeaeState(bsno,billstate:string);
function GetSeaeStateDate(bsno,billstate:string):string;
function _GetmblStateout(bsno,bsstatus:string):string;
procedure Initsql(AdoQuery:TAdoQuery;str,s:string);
procedure Initsql_ts(AdoQuery:TAdoQuery);
end;
var
frm_op_mblsign: Tfrm_op_mblsign;
implementation
uses u_main,my_sys_function, u_op_seae_teshufandan,u_sys_progress;
{$R *.dfm}
//
function Tfrm_op_mblsign._GetmblStateout(bsno,bsstatus:string):string;
var aAdoQuery:TAdoQuery;
begin
result:='';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> ״̬,¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
SQL.Add('from t_op_state where <20> <> <EFBFBD> <EFBFBD> =:bsNo1 and ҵ<> <D2B5> ״̬=:bsstatus ');
Parameters.ParamByName('bsNo1').value:=bsno;
Parameters.ParamByName('bsstatus').value:=bsstatus;
Open;
if not IsEmpty then
result:=FieldByName('ҵ<> <D2B5> ״̬').AsString;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_mblsign.GetSeaeStateDate(bsno,billstate:string):string;
var aAdoQuery:TAdoQuery;
begin
Result:='';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> from t_op_state');
SQL.Add('where <20> <> <EFBFBD> <EFBFBD> =:bsNo and ҵ<> <D2B5> ״̬=:billstate');
Parameters.ParamByName('bsNo').value:=bsno;
Parameters.ParamByName('billstate').value:=billstate;
open;
if not IsEmpty then
Result:=FormatDateTime('YYYY-MM-DD',FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsDateTime);
finally
aAdoQuery.Free;
end;
end;
procedure Tfrm_op_mblsign.UpateSeaeState(bsno,billstate:string);
var aAdoQuery:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('Update t_op_Seae');
SQL.Add('set <20> ᵥǩ<E1B5A5> <C7A9> ״̬=:billstate where <20> <> <EFBFBD> <EFBFBD> =:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Parameters.ParamByName('billstate').value:=billstate;
execsql;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_mblsign.GetmblState(bsno:string):Boolean;
var aAdoQuery:TAdoQuery;
b1,b2,b3:Boolean;
begin
result:=false;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> ״̬');
SQL.Add('from t_op_state where ҵ<> <D2B5> ״̬=''֪ͨ<CDA8> ŵ<EFBFBD> '' and <20> <> <EFBFBD> <EFBFBD> =:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b1:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> ״̬');
SQL.Add('from t_op_state where ҵ<> <D2B5> ״̬=''<27> ᵥǩ<E1B5A5> <C7A9> '' and <20> <> <EFBFBD> <EFBFBD> =:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b2:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> ״̬');
SQL.Add('from t_op_state where ҵ<> <D2B5> ״̬=''<27> ᵥǩ<E1B5A5> <C7A9> '' and <20> <> <EFBFBD> <EFBFBD> =:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b3:= isempty or (RecordCount=0);
result:=(b1 or b2) and b3;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_mblsign.GetmblzbState(bsno:string):Boolean; //
var aAdoQuery:TAdoQuery;
b1,b2,b3,b4:Boolean;
begin
result:=false;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> ״̬');
SQL.Add('from t_op_state where ҵ<> <D2B5> ״̬=''֪ͨ<CDA8> ŵ<EFBFBD> '' and <20> <> <EFBFBD> <EFBFBD> =:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b1:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> ״̬');
SQL.Add('from t_op_state where ҵ<> <D2B5> ״̬=''<27> ᵥǩ<E1B5A5> <C7A9> '' and <20> <> <EFBFBD> <EFBFBD> =:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b2:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> ״̬');
SQL.Add('from t_op_state where ҵ<> <D2B5> ״̬=''<27> ᵥǩ<E1B5A5> <C7A9> '' and <20> <> <EFBFBD> <EFBFBD> =:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b3:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> ״̬');
SQL.Add('from t_op_state where ҵ<> <D2B5> ״̬=''<27> ᵥǩ<E1B5A5> <C7A9> '' and <20> <> <EFBFBD> <EFBFBD> =:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b4:= isempty or (RecordCount=0);
result:=(b1 or b2 or b3) and b4;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_mblsign.GetmblStateOut(bsno:string):Boolean;
var aAdoQuery:TAdoQuery;
begin
result:=false;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> ״̬');
SQL.Add('from t_op_state where ҵ<> <D2B5> ״̬=''<27> ᵥǩ<E1B5A5> <C7A9> '' and <20> <> <EFBFBD> <EFBFBD> =:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
result:=RecordCount=1;
finally
aAdoQuery.Free;
end;
end;
procedure Tfrm_op_mblsign.bsSkinButton5Click(Sender: TObject);
begin
Close;
end;
procedure Tfrm_op_mblsign.FormShow(Sender: TObject);
var str,mblstatus:string;
begin
wwDBDateTimePicker5.Date:=StrToDateTime(Formatdatetime('YYYY-MM-DD',date));
wwDBDateTimePicker6.Date:=StrToDateTime(Formatdatetime('YYYY-MM-DD',date));
loadreggrid(dxdbgrid2,true,caption);
{
str:='where װ<> ˷<EFBFBD> ʽ <>''ƴ<> <C6B4> <EFBFBD> <EFBFBD> Ʊ'' and ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =''<27> <> ͨ<EFBFBD> <CDA8> '' and <20> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> <>'''' and ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ <>''''';
str:=str+' and <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> >='+''''+wwDBDateTimePicker1.text+'''';
str:=str+' and <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <='+''''+wwDBDateTimePicker2.text+'''';
with t_op_seae do
begin
close;sql.clear;
sql.add('select top 100 <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,ί<> е <EFBFBD> λ,<2C> <> <EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ,ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ,<2C> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> <EFBFBD> Ա,<2C> ᵥǩ<E1B5A5> <C7A9> ״̬,<2C> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
sql.add('from t_op_seae');
sql.add('where װ<> ˷<EFBFBD> ʽ <>''ƴ<> <C6B4> <EFBFBD> <EFBFBD> Ʊ'' and ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =''<27> <> ͨ<EFBFBD> <CDA8> '' and <20> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> <>'''' and ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ <>''''');
sql.add('Order By <20> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ');
kbmMemTable1.EmptyTable;
kbmMemTable1.Open;
open;First;
while not Eof do
begin
if FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString='<27> <> <EFBFBD> <EFBFBD> ' then
begin
if GetmblzbState(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString) then
begin
kbmMemTable1.Insert;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ί<> е <EFBFBD> λ').AsString:=FieldByName('ί<> е <EFBFBD> λ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString:=FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString:=FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString;
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString:=FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=GetSeaeStateDate(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString);
mblstatus:=GetShenheStatus(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString);
if mblstatus='' then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:='û<> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
else kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:=mblstatus;
kbmMemTable1.Post;
end;
end
else
begin
if GetmblState(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString) then
begin
kbmMemTable1.Insert;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ί<> е <EFBFBD> λ').AsString:=FieldByName('ί<> е <EFBFBD> λ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString:=FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString:=FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString;
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString:=FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
mblstatus:=GetShenheStatus(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString);
if mblstatus='' then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:='û<> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
else kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:=mblstatus;
kbmMemTable1.Post;
end;
end;
next;
end;
end;
}
end;
procedure Tfrm_op_mblsign.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid2,caption);
frm_op_mblsign.Hide;
frm_op_mblsign.ManualFloat(frm_op_mblsign.BoundsRect );
frm_main.freeTabs('frm_op_mblsign');
action:=cafree;
frm_op_mblsign:=nil;
end;
procedure Tfrm_op_mblsign.bsSkinButton12Click(Sender: TObject);
begin
Edit1.text:='';
Edit4.text:='';
Edit2.text:='';
wwDBDateTimePicker1.text:='';
wwDBDateTimePicker2.text:='';
wwDBDateTimePicker3.text:='';
wwDBDateTimePicker4.text:='';
RxDBLookupCombo2.ClearValue;
wwDBLookupCombo49.text:='';
DBComboBoxEh1.text:='';
Edit7.text:='';
wwDBLookupCombo52.text:='';
end;
procedure Tfrm_op_mblsign.Initsql(AdoQuery:TAdoQuery;str,s:string);
begin
with AdoQuery do
begin
Close;sql.Clear;
sql.add('select t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ,t_op_state.ҵ<> <D2B5> ״̬,t_op_state.¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
sql.add('from t_op_state');
sql.add('left JOIN t_op_seae on t_op_state.<2E> <> <EFBFBD> <EFBFBD> = t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ' +str);
sql.add('and t_op_state.ҵ<> <D2B5> ״̬='''+s+'''');
sql.add('order by t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ');
Open;First;
end;
end;
procedure Tfrm_op_mblsign.Initsql_ts(AdoQuery:TAdoQuery);
begin
with AdoQuery do
begin
Close;Sql.Clear;
SQL.Add('Select <20> <> <EFBFBD> <EFBFBD> ,<2C> ŵ<EFBFBD> ״̬ from t_op_fangdan');
sql.add('order by <20> <> <EFBFBD> <EFBFBD> ');
Open;First;
end;
end;
procedure Tfrm_op_mblsign.bsSkinButton8Click(Sender: TObject);
var
str,mblstatus:widestring;
begin
if DBComboBoxEh1.text='' then
begin
str:='where װ<> ˷<EFBFBD> ʽ <>''ƴ<> <C6B4> <EFBFBD> <EFBFBD> Ʊ'' and ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =''<27> <> ͨ<EFBFBD> <CDA8> '' and <20> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> <>'''' and ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ <>''''';
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 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 RxDBLookupCombo2.DisplayValues[1]<>''then
str:=str+' and ί<> е <EFBFBD> λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
if RxDBLookupCombo28.DisplayValues[1]<>''then
str:=str+' and ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ='+''''+RxDBLookupCombo28.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+'%'+'''';
// str:=str+' and <20> <> <EFBFBD> <EFBFBD> not in (select <20> <> <EFBFBD> <EFBFBD> from t_op_state where ) ;
Initsql(ADOQUERY_TDQH,str,'<27> ᵥǩ<E1B5A5> <C7A9> ');
Initsql(ADOQUERY_TZFD,str,'֪ͨ<CDA8> ŵ<EFBFBD> ');
Initsql(ADOQUERY_TDQR,str,'<27> ᵥǩ<E1B5A5> <C7A9> ');
Initsql(ADOQUERY_TDQC,str,'<27> ᵥǩ<E1B5A5> <C7A9> ');
Initsql(ADOQUERY_TDQF,str,'<27> ᵥǩ<E1B5A5> <C7A9> ');
Initsql_ts(ADOQUERY_TSFD);
// Initsql(ADOQUERY_TSFD,str,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
with t_op_seae do
begin
try
close;sql.clear;
sql.add('select <20> <> <EFBFBD> <EFBFBD> ,ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,ί<> е <EFBFBD> λ,<2C> <> <EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> <EFBFBD> ˾,<2C> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ,ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ,<2C> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> <EFBFBD> Ա,<2C> ᵥǩ<E1B5A5> <C7A9> ״̬,<2C> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,<2C> <> Ʊ<EFBFBD> <C6B1> ,<2C> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> ųɱ<C5B3> ,<2C> <> <EFBFBD> ۸<EFBFBD> <DBB8> <EFBFBD> ');
sql.add('from t_op_seae '+str+default_sort(53,'t_op_seae','','desc'));
kbmMemTable1.EmptyTable;
kbmMemTable1.Open;
kbmMemTable1.DisableControls;
open;First;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27> <> <EFBFBD> ڼ<EFBFBD> <DABC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ݡ<EFBFBD> <DDA1> <EFBFBD> <EFBFBD> <EFBFBD> ';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=RecordCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
while not Eof do
begin
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
kbmMemTable1.Insert;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ί<> е <EFBFBD> λ').AsString:=FieldByName('ί<> е <EFBFBD> λ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString:=FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString:=FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString;
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString:=FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> Ʊ').AsString:=FieldByName('<27> <> Ʊ<EFBFBD> <C6B1> ').AsString;
kbmMemTable1.FieldByName('<27> ʵ<EFBFBD> <CAB5> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ˾').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ˾').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> ųɱ<C5B3> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> ۸<EFBFBD> <DBB8> <EFBFBD> ').AsBoolean:=FieldByName('<27> <> <EFBFBD> ۸<EFBFBD> <DBB8> <EFBFBD> ').AsBoolean;
if ADOQUERY_TZFD.Locate('<27> <> <EFBFBD> <EFBFBD> ',FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,[]) then
begin
kbmMemTable1.FieldByName('֪ͨ<CDA8> ŵ<EFBFBD> ').AsString:='֪ͨ<CDA8> ŵ<EFBFBD> ';
if not ADOQUERY_TZFD.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').IsNull then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=ADOQUERY_TZFD.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
end;
if ADOQUERY_TDQH.Locate('<27> <> <EFBFBD> <EFBFBD> ',FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,[]) then
begin
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:='<27> ᵥǩ<E1B5A5> <C7A9> ';
if not ADOQUERY_TDQH.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').IsNull then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=ADOQUERY_TDQH.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
end;
if ADOQUERY_TDQR.Locate('<27> <> <EFBFBD> <EFBFBD> ',FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,[]) then
begin
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:='<27> ᵥǩ<E1B5A5> <C7A9> ';
if not ADOQUERY_TDQR.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').IsNull then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=ADOQUERY_TDQR.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
end;
if ADOQUERY_TDQC.Locate('<27> <> <EFBFBD> <EFBFBD> ',FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,[]) then
begin
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:='<27> ᵥǩ<E1B5A5> <C7A9> ';
if not ADOQUERY_TDQC.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').IsNull then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=ADOQUERY_TDQC.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
end;
if ADOQUERY_TDQF.Locate('<27> <> <EFBFBD> <EFBFBD> ',FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,[]) then
begin
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:='<27> ᵥǩ<E1B5A5> <C7A9> ';
if not ADOQUERY_TDQF.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').IsNull then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=ADOQUERY_TDQF.FieldByName('¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
end;
if ADOQUERY_TSFD.Locate('<27> <> <EFBFBD> <EFBFBD> ',FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,[]) then
begin
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:=ADOQUERY_TSFD.FieldByName('<27> ŵ<EFBFBD> ״̬').AsString;
end
else
begin
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:='û<> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ';
end;
kbmMemTable1.Post;
next;
end;
finally
kbmMemTable1.EnableControls;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
end;
end
else
begin
str:='where t_op_seae.װ<> ˷<EFBFBD> ʽ <>''ƴ<> <C6B4> <EFBFBD> <EFBFBD> Ʊ'' and t_op_seae.ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =''<27> <> ͨ<EFBFBD> <CDA8> '' and t_op_seae.<2E> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> <>'''' and t_op_seae.ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ <>''''';
if Edit1.text<>''then
str:=str+' and t_op_seae.ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if Edit4.text<>''then
str:=str+' and t_op_seae.ί<> б <EFBFBD> <D0B1> <EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
if Edit2.text<>''then
str:=str+' and t_op_seae.<2E> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
if wwDBDateTimePicker1.text<>''then
str:=str+' and t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> >='+''''+wwDBDateTimePicker1.text+'''';
if wwDBDateTimePicker2.text<>''then
str:=str+' and t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <='+''''+wwDBDateTimePicker2.text+'''';
if RxDBLookupCombo2.DisplayValues[1]<>''then
str:=str+' and t_op_seae.ί<> е <EFBFBD> λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
if wwDBLookupCombo49.text<>''then
str:=str+' and t_op_seae.<2E> <> <EFBFBD> <EFBFBD> like '+''''+'%'+wwDBLookupCombo49.text+'%'+'''';
if Edit7.text<>''then
str:=str+' and t_op_seae.<2E> <> <EFBFBD> <EFBFBD> like '+''''+'%'+Edit7.text+'%'+'''';
if wwDBLookupCombo52.text<>''then
str:=str+' and t_op_seae.ж<> <D0B6> <EFBFBD> <EFBFBD> like '+''''+'%'+wwDBLookupCombo52.text+'%'+'''';
if DBComboBoxEh1.text<>'' then
str:=str+' and t_op_state.ҵ<> <D2B5> ״̬ like '+''''+'%'+DBComboBoxEh1.text+'%'+'''';
if wwDBDateTimePicker3.text<>''then
str:=str+' and t_op_state.¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> >='+''''+wwDBDateTimePicker3.text+'''';
if wwDBDateTimePicker4.text<>''then
str:=str+' and t_op_state.¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <='+''''+wwDBDateTimePicker4.text+'''';
with t_op_seae do
begin
try
close;sql.clear;
sql.add('select t_op_state.ҵ<> <D2B5> ״̬,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ,t_op_seae.ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,t_op_seae.ί<> е <EFBFBD> λ,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ');
sql.add(',t_op_seae.<2E> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ,t_op_seae.ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ˾');
sql.add(',t_op_seae.<2E> <> <EFBFBD> <EFBFBD> Ա,t_op_seae.<2E> ᵥǩ<E1B5A5> <C7A9> ״̬,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,t_op_seae.<2E> <> <EFBFBD> ųɱ<C5B3> ,t_op_seae.<2E> <> <EFBFBD> ۸<EFBFBD> <DBB8> <EFBFBD> ');
sql.add('from t_op_state');
sql.add('left JOIN t_op_seae on t_op_state.<2E> <> <EFBFBD> <EFBFBD> = t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ' +str);
kbmMemTable1.EmptyTable;
kbmMemTable1.DisableControls;
kbmMemTable1.Open;
open;First;
while not Eof do
begin
kbmMemTable1.Insert;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ί<> е <EFBFBD> λ').AsString:=FieldByName('ί<> е <EFBFBD> λ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString:=FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString:=FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString;
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString:=FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=GetSeaeStateDate(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString);
kbmMemTable1.FieldByName('ҵ<> <D2B5> ״̬').AsString:=FieldByName('ҵ<> <D2B5> ״̬').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> ųɱ<C5B3> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> ۸<EFBFBD> <DBB8> <EFBFBD> ').AsBoolean:=FieldByName('<27> <> <EFBFBD> ۸<EFBFBD> <DBB8> <EFBFBD> ').AsBoolean;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ˾').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ˾').AsString;
mblstatus:=GetShenheStatus(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString);
if mblstatus='' then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:='û<> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
else kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:=mblstatus;
kbmMemTable1.Post;
next;
end;
finally
kbmMemTable1.EnableControls;
end;
end;
end;
end;
{ if FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString='<27> <> <EFBFBD> <EFBFBD> ' then
begin
if GetmblzbState(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString) then
begin
kbmMemTable1.Insert;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ί<> е <EFBFBD> λ').AsString:=FieldByName('ί<> е <EFBFBD> λ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString:=FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString:=FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString;
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString:=FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> Ʊ').AsString:=FieldByName('<27> <> Ʊ<EFBFBD> <C6B1> ').AsString;
kbmMemTable1.FieldByName('<27> ʵ<EFBFBD> <CAB5> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=GetSeaeStateDate(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString);
mblstatus:=GetShenheStatus(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString);
if mblstatus='' then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:='û<> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
else kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:=mblstatus;
kbmMemTable1.Post;
end;
end
else
begin
if GetmblState(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString) then
begin
kbmMemTable1.Insert;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('ί<> е <EFBFBD> λ').AsString:=FieldByName('ί<> е <EFBFBD> λ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString:=FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString:=FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString;
kbmMemTable1.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString:=FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=GetSeaeStateDate(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ״̬').AsString);
kbmMemTable1.FieldByName('<27> <> Ʊ').AsString:=FieldByName('<27> <> Ʊ<EFBFBD> <C6B1> ').AsString;
kbmMemTable1.FieldByName('<27> ʵ<EFBFBD> <CAB5> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
mblstatus:=GetShenheStatus(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString);
if mblstatus='' then
kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:='û<> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
else kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ').AsString:=mblstatus;
kbmMemTable1.Post;
end;
end;
}
procedure Tfrm_op_mblsign.bsSkinPanel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel1.Width/11);
bsSkinButton9.Width:=i;
bsSkinButton1.Width:=i;
end;
procedure Tfrm_op_mblsign.dxDBGrid2ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_seae,'ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
end;
procedure Tfrm_op_mblsign.bsSkinButton1Click(Sender: TObject);
var
str,bsno:widestring;
i:integer;
aQuery:TAdoQuery;
amt:Double;
begin
if kbmMemTable1.IsEmpty then
exit;
if dxDBGrid2.SelectedCount<1 then
begin
exit;
end;
if not GetStatus_notice(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ') then
begin
showmessage('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᵥǩ<E1B5A5> <C7A9> ');
exit;
end;
if not GetStatus_notice(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'֪ͨ<CDA8> ŵ<EFBFBD> ') then
begin
showmessage('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֪ͨ<CDA8> ŵ<EFBFBD> ');
exit;
end;
try
frm_main.db.BeginTrans;
kbmMemTable1.DisableControls;
for i:=0 to dxDBGrid2.SelectedCount-1 do
begin
kbmMemTable1.GotoBookmark(pointer(dxDBGrid2.selectedrows[i]));
if (kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString='<27> <> <EFBFBD> <EFBFBD> ') OR (kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ᵥ') then
begin
if GetmblStateOut(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString) then
begin
InsertSeaeStatus(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ',employee,FormatDateTime('YYYY-MM-DD hh:mm:ss',Now));
UpateSeaeState(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
if (kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ᵥ') and ((kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ˾').AsString='MAERSK') or (kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ˾').AsString='MCC'))
THEN begin
UpWebDZTD(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ˾').AsString,kbmMemTable1.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString);
end;
end
else
begin
ShowMessage('<27> ᵥ:'+kbmMemTable1.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+' <20> <> û<EFBFBD> <C3BB> ǩ<EFBFBD> <C7A9> ,<2C> <> <EFBFBD> <EFBFBD> ǩ<EFBFBD> <C7A9> ');
end;
end
else
begin
if GetmblStateOut(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString) then
begin
InsertSeaeStatus(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ',employee,FormatDateTime('YYYY-MM-DD hh:mm:ss',Now));
UpateSeaeState(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
end
else
begin
ShowMessage('<27> ᵥ:'+kbmMemTable1.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+' <20> <> û<EFBFBD> <C3BB> ǩ<EFBFBD> <C7A9> ,<2C> <> <EFBFBD> <EFBFBD> ǩ<EFBFBD> <C7A9> ');
end;
end;
end;
frm_main.db.CommitTrans;
finally
kbmMemTable1.EnableControls;
bsSkinButton8.onClick(bsSkinButton8);
if frm_main.db.InTransaction then
frm_main.db.RollbackTrans;
end;
end;
procedure Tfrm_op_mblsign.N1Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid2);
end;
procedure Tfrm_op_mblsign.dxDBGrid2CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if ANode.Strings[dxDBGrid2Column10.Index]='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' then begin
AFont.Color:=clGreen;
end
else
if ANode.Strings[dxDBGrid2Column10.Index]='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' then begin
AFont.Color:=clred;
end
else
if ANode.Strings[dxDBGrid2Column10.Index]='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' then begin
AFont.Color:=clred;
end
else
if ANode.Strings[dxDBGrid2Column10.Index]='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŵ<EFBFBD> ' then begin
AFont.Color:=clred;
end
else
AFont.Color:=clblack;
end;
procedure Tfrm_op_mblsign.Edit2KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton8Click(Sender);
end;
end;
procedure Tfrm_op_mblsign.dxDBGrid2DblClick(Sender: TObject);
begin
//
end;
procedure Tfrm_op_mblsign.bsSkinButton2Click(Sender: TObject);
var aAdoQuery:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;Sql.Clear;
SQL.Add('update t_op_seae set <20> <> Ʊ<EFBFBD> <C6B1> =:<3A> <> Ʊ<EFBFBD> <C6B1> ');
SQL.Add('where <20> <> <EFBFBD> <EFBFBD> =:<3A> <> <EFBFBD> <EFBFBD> ');
Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
if trim(kbmMemTable1.FieldByName('<27> <> Ʊ').AsString)='' then
Parameters.ParamByName('<27> <> Ʊ<EFBFBD> <C6B1> ').Value:='<27> <> '
else Parameters.ParamByName('<27> <> Ʊ<EFBFBD> <C6B1> ').Value:='';
ExecSQL;
finally
Free;
end;
end;
procedure Tfrm_op_mblsign.dxDBGrid2Column13CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if Trim(ANode.Strings[dxDBGrid2Column13.Index])<>'' then
AColor:=clred;
AFont.Color:=clblack;
end;
procedure Tfrm_op_mblsign.bsSkinButton3Click(Sender: TObject);
var aAdoQuery:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;Sql.Clear;
SQL.Add('update t_op_seae set <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =:<3A> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
SQL.Add('where <20> <> <EFBFBD> <EFBFBD> =:<3A> <> <EFBFBD> <EFBFBD> ');
Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
if trim(kbmMemTable1.FieldByName('<27> ʵ<EFBFBD> <CAB5> <EFBFBD> ').AsString)='' then
Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').Value:='<27> <> '
else Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').Value:='';
ExecSQL;
finally
Free;
end;
end;
procedure Tfrm_op_mblsign.dxDBGrid2Column14CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if Trim(ANode.Strings[dxDBGrid2Column14.Index])<>'' then
AColor:=clred;
AFont.Color:=clblack;
end;
procedure Tfrm_op_mblsign.bsSkinButton13Click(Sender: TObject);
var
str,mblstatus,s,bsno:widestring;
alist:TStringlist;
begin
s:='';
str:='where 1=1';
if wwDBDateTimePicker5.text<>''then
str:=str+' and t_op_state.¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> >='+''''+wwDBDateTimePicker5.text+'''';
if wwDBDateTimePicker6.text<>''then
str:=str+' and t_op_state.¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <='+''''+wwDBDateTimePicker6.text+'''';
try
kbmMemTable3.DisableControls;
alist:=TStringlist.Create;
with t_op_seae do
begin
close;sql.clear;
sql.add('select');
sql.add('t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ,t_op_seae.ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,t_op_seae.ί<> е <EFBFBD> λ,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ');
sql.add(',t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ,t_op_seae.<2E> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ,t_op_seae.ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
sql.add(',t_op_seae.<2E> <> <EFBFBD> <EFBFBD> Ա,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,t_op_seae.<2E> ᵥǩ<E1B5A5> <C7A9> ״̬');
sql.add('from t_op_state');
sql.add('Left join t_op_seae on t_op_state.<2E> <> <EFBFBD> <EFBFBD> =t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ');
sql.add(str);
sql.add('and t_op_state.ҵ<> <D2B5> ״̬=''<27> ᵥǩ<E1B5A5> <C7A9> ''');
kbmMemTable3.EmptyTable;
kbmMemTable3.Open;
open;First;
while not Eof do
begin
kbmMemTable3.Insert;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable3.FieldByName('ί<> е <EFBFBD> λ').AsString:=FieldByName('ί<> е <EFBFBD> λ').AsString;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString:=FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
kbmMemTable3.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString:=FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString;
// kbmMemTable3.FieldByName('֪ͨ<CDA8> ŵ<EFBFBD> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'֪ͨ<CDA8> ŵ<EFBFBD> ');
kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:='<27> <> ';
//kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
//kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
kbmMemTable3.Post;
if bsno='' then
bsno:=''''+FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString+''''
else bsno:=bsno+','+''''+FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString+'''';
Next;
end;
end;
if bsno<>'' then
with t_op_seae do
begin
close;sql.clear;
sql.add('select <20> <> <EFBFBD> <EFBFBD> ');
sql.add('from t_op_state');
sql.add('where <20> <> <EFBFBD> <EFBFBD> in('+bsno+')');
sql.add('and ҵ<> <D2B5> ״̬=''<27> ᵥǩ<E1B5A5> <C7A9> ''');
open;First;
while not eof do
begin
if kbmMemTable3.Locate('<27> <> <EFBFBD> <EFBFBD> ',FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,[]) then
begin
kbmMemTable3.Edit;
kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:='<27> <> ';
kbmMemTable3.Post;
end;
Next;
end;
end;
if bsno<>'' then
with t_op_seae do
begin
close;sql.clear;
sql.add('select <20> <> <EFBFBD> <EFBFBD> ');
sql.add('from t_op_state');
sql.add('where <20> <> <EFBFBD> <EFBFBD> in('+bsno+')');
sql.add('and ҵ<> <D2B5> ״̬=''<27> ᵥǩ<E1B5A5> <C7A9> ''');
open;First;
while not eof do
begin
if kbmMemTable3.Locate('<27> <> <EFBFBD> <EFBFBD> ',FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,[]) then
begin
kbmMemTable3.Edit;
kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:='<27> <> ';
kbmMemTable3.Post;
end;
Next;
end;
end;
if bsno<>'' then
with t_op_seae do
begin
close;sql.clear;
sql.add('select <20> <> <EFBFBD> <EFBFBD> ');
sql.add('from t_op_state');
sql.add('where <20> <> <EFBFBD> <EFBFBD> in('+bsno+')');
sql.add('and ҵ<> <D2B5> ״̬=''֪ͨ<CDA8> ŵ<EFBFBD> ''');
open;First;
while not eof do
begin
if kbmMemTable3.Locate('<27> <> <EFBFBD> <EFBFBD> ',FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,[]) then
begin
kbmMemTable3.Edit;
kbmMemTable3.FieldByName('֪ͨ<CDA8> ŵ<EFBFBD> ').AsString:='<27> <> ';
kbmMemTable3.Post;
end;
Next;
end;
end;
finally
kbmMemTable3.EnableControls;
end;
end;
{var
str,mblstatus,s:widestring;
begin
s:='';
str:='where t_op_seae.װ<> ˷<EFBFBD> ʽ <>''ƴ<> <C6B4> <EFBFBD> <EFBFBD> Ʊ'' and t_op_seae.ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =''<27> <> ͨ<EFBFBD> <CDA8> '' and t_op_seae.<2E> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> <>'''' and t_op_seae.ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ <>''''';
if wwDBDateTimePicker5.text<>''then
str:=str+' and t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> >='+''''+wwDBDateTimePicker5.text+'''';
if wwDBDateTimePicker6.text<>''then
str:=str+' and t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <='+''''+wwDBDateTimePicker6.text+'''';
if trim(Edit6.text)<>'' then
begin
str:=str+' and t_op_seae.<2E> <> <EFBFBD> <EFBFBD> Ա='+''''+ trim(Edit6.text)+'''';
end;
if CheckBox1.Checked then
begin
str:=str+' and t_op_seae.ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ =''<27> <> <EFBFBD> <EFBFBD> ''';
end;
try
kbmMemTable3.DisableControls;
with t_op_seae do
begin
close;sql.clear;
sql.add('select');
sql.add('t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ,t_op_seae.ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,t_op_seae.ί<> е <EFBFBD> λ,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ');
sql.add(',t_op_seae.<2E> <> <EFBFBD> <EFBFBD> ,t_op_seae.<2E> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ,t_op_seae.ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
sql.add(',t_op_seae.<2E> <> <EFBFBD> <EFBFBD> Ա,t_op_seae.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,t_op_seae.<2E> ᵥǩ<E1B5A5> <C7A9> ״̬');
sql.add('from t_op_seae');
sql.add(str);
kbmMemTable3.EmptyTable;
kbmMemTable3.Open;
open;First;
while not Eof do
begin
if CheckBox1.Checked then
begin
if (_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ')<>'') and (_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ')='') then
begin
kbmMemTable3.Insert;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable3.FieldByName('ί<> е <EFBFBD> λ').AsString:=FieldByName('ί<> е <EFBFBD> λ').AsString;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString:=FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
kbmMemTable3.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString:=FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString;
kbmMemTable3.FieldByName('֪ͨ<CDA8> ŵ<EFBFBD> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'֪ͨ<CDA8> ŵ<EFBFBD> ');
kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
kbmMemTable3.Post;
end
end
else
begin
kbmMemTable3.Insert;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable3.FieldByName('ί<> е <EFBFBD> λ').AsString:=FieldByName('ί<> е <EFBFBD> λ').AsString;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString:=FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
kbmMemTable3.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString:=FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
kbmMemTable3.FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString:=FieldByName('<27> <> <EFBFBD> <EFBFBD> Ա').AsString;
kbmMemTable3.FieldByName('֪ͨ<CDA8> ŵ<EFBFBD> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'֪ͨ<CDA8> ŵ<EFBFBD> ');
kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
kbmMemTable3.FieldByName('<27> ᵥǩ<E1B5A5> <C7A9> ').AsString:=_GetmblStateout(FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
kbmMemTable3.Post;
end;
next;
end;
end;
finally
kbmMemTable3.EnableControls;
end;
}
procedure Tfrm_op_mblsign.MenuItem1Click(Sender: TObject);
begin
grid_save_xls(dxDBGrid1);
end;
procedure Tfrm_op_mblsign.bsSkinButton6Click(Sender: TObject);
begin
Close;
end;
procedure Tfrm_op_mblsign.RxDBLookupCombo28Enter(Sender: TObject);
begin
RxDBLookupCombo28.LookupDisplay:='<27> <> <EFBFBD> <EFBFBD> ;ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ';
end;
procedure Tfrm_op_mblsign.RxDBLookupCombo28Exit(Sender: TObject);
begin
// RxDBLookupCombo28.LookupDisplay:='ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ';
end;
procedure Tfrm_op_mblsign.bsSkinButton7Click(Sender: TObject);
var
i:Integer;
begin
if kbmMemTable1.IsEmpty then
exit;
if dxDBGrid2.SelectedCount<1 then
begin
exit;
end;
if not (kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString<>'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ᵥ') then
begin
showmessage('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ <EFBFBD> <CABD> <EFBFBD> <EFBFBD> Ϊ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ᵥ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˻<EFBFBD> ');
exit;
end;
try
frm_main.db.BeginTrans;
kbmMemTable1.DisableControls;
for i:=0 to dxDBGrid2.SelectedCount-1 do
begin
kbmMemTable1.GotoBookmark(pointer(dxDBGrid2.selectedrows[i]));
if (kbmMemTable1.FieldByName('ǩ<> <C7A9> <EFBFBD> <EFBFBD> ʽ ').AsString='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ᵥ') then
begin
DelteSeaeStatus(kbmMemTable1.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
DelteSeaeStatus(kbmMemTable1.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').AsString,'֪ͨ<CDA8> ŵ<EFBFBD> ');
DelteSeaeStatus(kbmMemTable1.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').AsString,'<27> ᵥǩ<E1B5A5> <C7A9> ');
UpdateMblStatus(kbmMemTable1.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString,'');
end
end;
frm_main.db.CommitTrans;
finally
kbmMemTable1.EnableControls;
bsSkinButton8.onClick(bsSkinButton8);
if frm_main.db.InTransaction then
frm_main.db.RollbackTrans;
end;
end;
end.