|
|
|
|
unit u_op_seae_sign;
|
|
|
|
|
|
|
|
|
|
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,ShellAPI,
|
|
|
|
|
ComCtrls, bsSkinTabs, dxDBTLCl, dxGrClms, cxDBLabel, cxControls,
|
|
|
|
|
cxContainer, cxEdit, cxLabel;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_op_seae_sign = 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;
|
|
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
|
|
btn6_exit: TbsSkinButton;
|
|
|
|
|
btn_seach2: TbsSkinButton;
|
|
|
|
|
bsSkinButton14: TbsSkinButton;
|
|
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
|
|
Label13: TLabel;
|
|
|
|
|
Label14: TLabel;
|
|
|
|
|
wwDBDateTimePicker5: TwwDBDateTimePicker;
|
|
|
|
|
wwDBDateTimePicker6: TwwDBDateTimePicker;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
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;
|
|
|
|
|
Edit6_searchkhmch: TEdit;
|
|
|
|
|
Label8: TLabel;
|
|
|
|
|
ADOQUERY_TZFD: TADOQuery;
|
|
|
|
|
ADOQUERY_TDQR: TADOQuery;
|
|
|
|
|
ADOQUERY_TDQC: TADOQuery;
|
|
|
|
|
ADOQUERY_TDQF: TADOQuery;
|
|
|
|
|
ADOQUERY_TSFD: TADOQuery;
|
|
|
|
|
kbmMemTable1Field17: TStringField;
|
|
|
|
|
kbmMemTable1Field18: TStringField;
|
|
|
|
|
kbmMemTable1Field19: TStringField;
|
|
|
|
|
kbmMemTable1Field20: TStringField;
|
|
|
|
|
kbmMemTable1Field21: TStringField;
|
|
|
|
|
kbmMemTable1Field22: TBooleanField;
|
|
|
|
|
kbmMemTable1Field23: TStringField;
|
|
|
|
|
ADOQUERY_TDQH: TADOQuery;
|
|
|
|
|
bsknpnl1: TbsSkinPanel;
|
|
|
|
|
btn4_exit: TbsSkinButton;
|
|
|
|
|
btn3_clearConditon: TbsSkinButton;
|
|
|
|
|
bsknpnl2: TbsSkinPanel;
|
|
|
|
|
lbl1: TLabel;
|
|
|
|
|
lbl2: TLabel;
|
|
|
|
|
lbl3: TLabel;
|
|
|
|
|
lbl4: TLabel;
|
|
|
|
|
lbl5: TLabel;
|
|
|
|
|
lbl6: TLabel;
|
|
|
|
|
lbl7: TLabel;
|
|
|
|
|
lbl8: TLabel;
|
|
|
|
|
lbl9: TLabel;
|
|
|
|
|
lbl10: TLabel;
|
|
|
|
|
lbl11: TLabel;
|
|
|
|
|
lbl12: TLabel;
|
|
|
|
|
lbl13: TLabel;
|
|
|
|
|
Edit1_ywbh: TEdit;
|
|
|
|
|
Edit2_wtbh: TEdit;
|
|
|
|
|
Edit3_ztdh: TEdit;
|
|
|
|
|
wdbdtmpckr1_kc: TwwDBDateTimePicker;
|
|
|
|
|
wdbdtmpckr2_kc: TwwDBDateTimePicker;
|
|
|
|
|
Edit4_hc: TEdit;
|
|
|
|
|
wdblkpcmb1_cm: TwwDBLookupCombo;
|
|
|
|
|
wdblkpcmb2_xhg: TwwDBLookupCombo;
|
|
|
|
|
wdbdtmpckr3_lr: TwwDBDateTimePicker;
|
|
|
|
|
wdbdtmpckr4_lr: TwwDBDateTimePicker;
|
|
|
|
|
DBComboBoxEh1: TDBComboBoxEh;
|
|
|
|
|
RxDBLookupCombo28: TRxDBLookupCombo;
|
|
|
|
|
dxdbgrd1_S: TdxDBGrid;
|
|
|
|
|
dxdbgrdclmns: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column2: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column3: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column4: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column5: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column6: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column13: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column19: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmnDBGrid1Column10: TdxDBGridColumn;
|
|
|
|
|
kbmMemTable1Field24_xuanxiang: TBooleanField;
|
|
|
|
|
DataSource2: TDataSource;
|
|
|
|
|
qry1_qdtm: TADOQuery;
|
|
|
|
|
dxdbgrdclmnDBGrid1Column11: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmnDBGrid1Column12: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmnDBGrid1Column13: TdxDBGridColumn;
|
|
|
|
|
Edit1_qdtbh: TEdit;
|
|
|
|
|
lbl14: TLabel;
|
|
|
|
|
bsknpnl4_NewQDT: TbsSkinPanel;
|
|
|
|
|
lbl15_searchqdthm: TLabel;
|
|
|
|
|
Edit15_searchqdthm: TEdit;
|
|
|
|
|
ds3_ls_qdtm: TDataSource;
|
|
|
|
|
dxdbgrdclmndxdbgrd1_SColumn9: TdxDBGridColumn;
|
|
|
|
|
N2: TMenuItem;
|
|
|
|
|
btn4_searchNew: TbsSkinButton;
|
|
|
|
|
lbl15: TLabel;
|
|
|
|
|
dxdbgrdchckclmnDBGrid1Column14_tf: TdxDBGridCheckColumn;
|
|
|
|
|
dxdbgrdchckclmnDBGrid1Column13b: TdxDBGridCheckColumn;
|
|
|
|
|
RxDBLookupCombo_wtdw: TRxDBLookupCombo;
|
|
|
|
|
dxdbgrdclmndxdbgrd1_SColumn10: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmnDBGrid1Column14: TdxDBGridColumn;
|
|
|
|
|
qry_crm_client_weituo: TADOQuery;
|
|
|
|
|
btn1_gennerateSign: TbsSkinButton;
|
|
|
|
|
ds2_wt: TDataSource;
|
|
|
|
|
dxdbgrdclmndxdbgrd1_SColumn6_B: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmndxdbgrd1_SColumn6_C: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmnDBGrid1Column15: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmnDBGrid1Column16: TdxDBGridColumn;
|
|
|
|
|
bskntbsht1_pj: TbsSkinTabSheet;
|
|
|
|
|
bsknpnl3: TbsSkinPanel;
|
|
|
|
|
btn1: TbsSkinButton;
|
|
|
|
|
btn4_searchNew_pj: TbsSkinButton;
|
|
|
|
|
btn3_clearConditon_pj: TbsSkinButton;
|
|
|
|
|
btn1_gennerateSign_pj: TbsSkinButton;
|
|
|
|
|
bsknpnl4: TbsSkinPanel;
|
|
|
|
|
lbl16: TLabel;
|
|
|
|
|
lbl17: TLabel;
|
|
|
|
|
lbl18: TLabel;
|
|
|
|
|
lbl19: TLabel;
|
|
|
|
|
lbl20: TLabel;
|
|
|
|
|
lbl21: TLabel;
|
|
|
|
|
lbl22: TLabel;
|
|
|
|
|
lbl23: TLabel;
|
|
|
|
|
lbl24: TLabel;
|
|
|
|
|
lbl25: TLabel;
|
|
|
|
|
lbl26: TLabel;
|
|
|
|
|
lbl27: TLabel;
|
|
|
|
|
lbl28: TLabel;
|
|
|
|
|
Edit1_ywbh_pj: TEdit;
|
|
|
|
|
Edit2_wtbh_pj: TEdit;
|
|
|
|
|
Edit3_ztdh_pj: TEdit;
|
|
|
|
|
wdbdtmpckr1_kc_pj: TwwDBDateTimePicker;
|
|
|
|
|
wdbdtmpckr2_kc_pj: TwwDBDateTimePicker;
|
|
|
|
|
Edit4_hc_pj: TEdit;
|
|
|
|
|
wdblkpcmb1_cm_pj: TwwDBLookupCombo;
|
|
|
|
|
wdblkpcmb2_xhg_pj: TwwDBLookupCombo;
|
|
|
|
|
wdbdtmpckr3_lr_pj: TwwDBDateTimePicker;
|
|
|
|
|
wdbdtmpckr4_lr_pj: TwwDBDateTimePicker;
|
|
|
|
|
DBComboBoxEh1_pj: TDBComboBoxEh;
|
|
|
|
|
RxDBLookupCombo_wtdw_pj: TRxDBLookupCombo;
|
|
|
|
|
ds2_wt_pj: TDataSource;
|
|
|
|
|
qry_crm_client_weituo_pj: TADOQuery;
|
|
|
|
|
ds_op_seae1_pj: TDataSource;
|
|
|
|
|
qry_op_seae_pj: TADOQuery;
|
|
|
|
|
dxdbgrd1_S_pj: TdxDBGrid;
|
|
|
|
|
dxdbgrdclmn1: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn2: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn3: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn4: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn5: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn6: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn7: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn8: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn9: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn10: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn11: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn12: TdxDBGridColumn;
|
|
|
|
|
DBComboBoxEh: TDBComboBoxEh;
|
|
|
|
|
dxdbgrdclmnDBGrid1Column17: TdxDBGridColumn;
|
|
|
|
|
bskntbsht1: TbsSkinTabSheet;
|
|
|
|
|
bsknpnl5: TbsSkinPanel;
|
|
|
|
|
btn43_exit: TbsSkinButton;
|
|
|
|
|
btn41_search_log: TbsSkinButton;
|
|
|
|
|
btn3_clearConditon_log: TbsSkinButton;
|
|
|
|
|
bsknpnl6: TbsSkinPanel;
|
|
|
|
|
lbl29: TLabel;
|
|
|
|
|
lbl30: TLabel;
|
|
|
|
|
lbl31: TLabel;
|
|
|
|
|
lbl32: TLabel;
|
|
|
|
|
lbl33: TLabel;
|
|
|
|
|
wdbdtmpckr41_start: TwwDBDateTimePicker;
|
|
|
|
|
wdbdtmpckr42_end: TwwDBDateTimePicker;
|
|
|
|
|
Edit42_zhtdh: TEdit;
|
|
|
|
|
Edit41_qdtbh: TEdit;
|
|
|
|
|
dxdbgrd41_log: TdxDBGrid;
|
|
|
|
|
dxdbgrdclmn41_log_qdtbh: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn42_log_zhtdh: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn43__log_reason: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn44__log_cancelPerson: TdxDBGridColumn;
|
|
|
|
|
dxdbgrdclmn45__log_canceldate: TdxDBGridColumn;
|
|
|
|
|
ds41_cancellog: TDataSource;
|
|
|
|
|
qry41_cancellog: TADOQuery;
|
|
|
|
|
procedure btn4_exitClick(Sender: TObject);
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure btn3_clearConditonClick(Sender: TObject);
|
|
|
|
|
procedure btn4_searchNewClick(Sender: TObject);
|
|
|
|
|
procedure bsknpnl1Resize(Sender: TObject);
|
|
|
|
|
procedure dxdbgrd1_SColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure btn1_gennerateSignClick(Sender: TObject);
|
|
|
|
|
procedure N1Click(Sender: TObject);
|
|
|
|
|
procedure dxdbgrd1_SCustomDraw(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 Edit3_ztdhKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure dxdbgrd1_SDblClick(Sender: TObject);
|
|
|
|
|
|
|
|
|
|
procedure dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column13CustomDraw(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 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 btn_seach2Click(Sender: TObject);
|
|
|
|
|
procedure MenuItem1Click(Sender: TObject);
|
|
|
|
|
procedure btn6_exitClick(Sender: TObject);
|
|
|
|
|
procedure RxDBLookupCombo28Enter(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure btn11Click(Sender: TObject);
|
|
|
|
|
procedure searchqdt(bh:string);
|
|
|
|
|
procedure Edit1_qdtbhKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
|
|
procedure N2Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinPageControl1Change(Sender: TObject);
|
|
|
|
|
procedure FormResize(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton14Click(Sender: TObject);
|
|
|
|
|
procedure Edit1_ywbhKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure Edit6_searchkhmchKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure frm__op_seae_sign_new_infomniN3Click(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid1CustomDraw(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 btn4_searchNew_pjClick(Sender: TObject);
|
|
|
|
|
procedure btn1_gennerateSign_pjClick(Sender: TObject);
|
|
|
|
|
procedure btn3_clearConditon_pjClick(Sender: TObject);
|
|
|
|
|
procedure btn3_clearConditon_logClick(Sender: TObject);
|
|
|
|
|
procedure btn41_search_logClick(Sender: TObject);
|
|
|
|
|
procedure searchCancelLog();
|
|
|
|
|
procedure Edit41_qdtbhKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
employeePhone:string;
|
|
|
|
|
m_infomation:string;
|
|
|
|
|
function CheckBilldue(bsnoes,wtdw:string):Boolean;
|
|
|
|
|
function CheckBilldue2(bsnoes,wtdw:string):Boolean;
|
|
|
|
|
function getNouseDate(wtdw: string ):TDateTime;
|
|
|
|
|
function CheckBilldue_pj(bsnoes,wtdw:string;out blnotifyOk:boolean):Boolean; //Ʊ<><C6B1><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>֤
|
|
|
|
|
function gettmpzqdate(cust: string ):string;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>:dt1~dt2
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
procedure initialEmployeePhone();
|
|
|
|
|
procedure show_qdtxx(qdtbh:string;iway:Integer);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_op_seae_sign: Tfrm_op_seae_sign;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_main,my_sys_function, u_op_seae_teshufandan,u_sys_progress,u_op_seae_sign_info,
|
|
|
|
|
u_op_seae_sign_new_info, u_op_znjyj, u_op_znjpj;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
const stateNewQD = '<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>';
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_seae_sign._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_seae_sign.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_seae_sign.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_seae_sign.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_seae_sign.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_seae_sign.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_seae_sign.btn4_exitClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
Close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.FormShow(Sender: TObject);
|
|
|
|
|
var str,mblstatus:string;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
RxDBLookupCombo28.LookupDisplay:='<27><><EFBFBD><EFBFBD>;ǩ<><C7A9><EFBFBD><EFBFBD>ʽ';
|
|
|
|
|
RxDBLookupCombo28.DisplayValue :='ZB';
|
|
|
|
|
//δ<><CEB4><EFBFBD>ڵ<EFBFBD><DAB5>½<EFBFBD><C2BD>ͻ<EFBFBD> begin
|
|
|
|
|
//<2F><>ʱ<EFBFBD><CAB1><EFBFBD>ڿͻ<DABF><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><C2BD>ͻ<EFBFBD> <20>̽<EFBFBD><CCBD><EFBFBD> 2017-08-15
|
|
|
|
|
qry_crm_client_weituo.SQL.Clear;
|
|
|
|
|
str:='SELECT t.<2E><><EFBFBD><EFBFBD>,t.EDI<44><49><EFBFBD><EFBFBD>,t.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,t.<2E>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t.<2E><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>,'
|
|
|
|
|
+ 't.<2E><><EFBFBD>˿<EFBFBD><CBBF>ݴ<EFBFBD><DDB4><EFBFBD>,t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t.<2E><><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0>,t.<2E><><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>,t.<2E><>ע,yjkh.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' + #13#10
|
|
|
|
|
+' FROM t_crm_client AS t INNER JOIN ' + #13#10
|
|
|
|
|
+' (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> AS khjc,''<27><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>'' as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales_tmp '
|
|
|
|
|
+' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=cast(GETDATE()as date) ' + #13#10
|
|
|
|
|
+ ' union SELECT DISTINCT <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> AS khjc, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FROM t_crm_client_sales '
|
|
|
|
|
+ ' WHERE (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IN (''Լ<><D4BC>ʱ<EFBFBD><CAB1>'', ''Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=cast(GETDATE()as date) ) '
|
|
|
|
|
+ ' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales_tmp where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=cast(GETDATE()as date))'
|
|
|
|
|
+' ) AS yjkh ' +#13#10
|
|
|
|
|
+' ON t.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> = yjkh.khjc ' +#13#10
|
|
|
|
|
+' WHERE (t.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> <> ''Ŀ<><C4BF>'') AND (t.ί<>е<EFBFBD>λ = 1) AND '
|
|
|
|
|
+ ' (ISNULL(t.<2E>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 0) = 0) ORDER BY t.<2E><><EFBFBD><EFBFBD>';
|
|
|
|
|
qry_crm_client_weituo.SQL.Add(str);
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD> end
|
|
|
|
|
qry_crm_client_weituo.Close();
|
|
|
|
|
qry_crm_client_weituo.Open;
|
|
|
|
|
//DBComboBoxEh1.text:='<27>ᵥǩ<E1B5A5><C7A9>';
|
|
|
|
|
//DBComboBoxEh1.text:='<27>ᵥǩ<E1B5A5><C7A9>';
|
|
|
|
|
|
|
|
|
|
loadreggrid(dxdbgrid1,false,caption );
|
|
|
|
|
loadreggrid(dxdbgrd1_S,false,caption+'1');
|
|
|
|
|
loadreggrid(dxdbgrd1_S_pj,false,caption+'2');
|
|
|
|
|
loadreggrid(dxdbgrd41_log,false,caption+'3');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<2F>ᵥǩ<E1B5A5><C7A9>
|
|
|
|
|
initialEmployeePhone();
|
|
|
|
|
bsSkinPageControl1.ActivePageIndex:=0;
|
|
|
|
|
dxdbgrd1_S.Width:=self.ClientWidth;
|
|
|
|
|
bsknpnl1.Height :=34;
|
|
|
|
|
self.WindowState:= wsMaximized;
|
|
|
|
|
wwDBDateTimePicker5.Date:=Date-7; ;//StrToDateTime(Formatdatetime('YYYY-MM-DD',date-7));
|
|
|
|
|
wwDBDateTimePicker6.Date:=Date;//StrToDateTime(Formatdatetime('YYYY-MM-DD',date));
|
|
|
|
|
// btn4_searchNewClick(btn4_searchNew);
|
|
|
|
|
//
|
|
|
|
|
if(if_open('449')) then
|
|
|
|
|
begin
|
|
|
|
|
bskntbsht1_pj.TabVisible:=true;
|
|
|
|
|
qry_crm_client_weituo_pj.Close;
|
|
|
|
|
qry_crm_client_weituo_pj.Open;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
bskntbsht1_pj.TabVisible:=false;
|
|
|
|
|
end;
|
|
|
|
|
//
|
|
|
|
|
wdbdtmpckr41_start.Date:=Date-7;
|
|
|
|
|
wdbdtmpckr42_end.date:=Date;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
|
|
savereggrid(dxdbgrd1_S,caption+'1');
|
|
|
|
|
savereggrid(dxdbgrd1_S_pj,caption+'2');
|
|
|
|
|
savereggrid(dxdbgrd41_log,caption+'3');
|
|
|
|
|
frm_op_seae_sign.Hide;
|
|
|
|
|
frm_op_seae_sign.ManualFloat(frm_op_seae_sign.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_op_seae_sign');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_op_seae_sign:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn3_clearConditonClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
Edit1_ywbh.text:='';
|
|
|
|
|
Edit2_wtbh.text:='';
|
|
|
|
|
Edit3_ztdh.text:='';
|
|
|
|
|
wdbdtmpckr1_kc.text:='';
|
|
|
|
|
wdbdtmpckr2_kc.text:='';
|
|
|
|
|
wdbdtmpckr3_lr.text:='';
|
|
|
|
|
wdbdtmpckr4_lr.text:='';
|
|
|
|
|
wdblkpcmb2_xhg.text:='';
|
|
|
|
|
wwDBDateTimePicker5.text:='';
|
|
|
|
|
wwDBDateTimePicker6.text:='';
|
|
|
|
|
Edit6_searchkhmch.text:='';
|
|
|
|
|
Edit1_qdtbh.text:='';
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.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_seae_sign.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;
|
|
|
|
|
function replaceSQuotes(txt: string):string;
|
|
|
|
|
begin
|
|
|
|
|
result:=stringreplace(txt,'''','''''',[rfReplaceAll]);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn4_searchNewClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str,mblstatus:widestring;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str:='where t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5><>'''' and t_op_seae.ǩ<><C7A9><EFBFBD><EFBFBD>ʽ<>''''';
|
|
|
|
|
|
|
|
|
|
if RxDBLookupCombo_wtdw.DisplayValues[1]=''then
|
|
|
|
|
begin
|
|
|
|
|
//<2F>˼ҹ̶<D2B9><CCB6>½<EFBFBD><C2BD>ͻ<EFBFBD>
|
|
|
|
|
// str:=str +' and t_op_seae.ί<>е<EFBFBD>λ in (''<27>ൺ<EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD><EFBFBD><EFBFBD>'',''<27>ƺ<EFBFBD><C6BA><EFBFBD><EFBFBD><EFBFBD>'',''<27><>Դ<EFBFBD><D4B4>'',''ϣ<><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'',''<27><><EFBFBD><EFBFBD>'',''<27><>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>'',''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'',''˴<><CBB4><EFBFBD><EFBFBD>̩'')';
|
|
|
|
|
//1.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>½ᣨ<C2BD><E1A3A8><EFBFBD><EFBFBD>ΪԼ<CEAA><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>
|
|
|
|
|
//2.ǩ<><C7A9><EFBFBD><EFBFBD>ʽΪ<CABD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//3.<2E><><EFBFBD>ų<EFBFBD><C5B3>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƵĿͻ<C4BF>
|
|
|
|
|
//4. <20><>ʱ<EFBFBD><CAB1><EFBFBD>ڿͻ<DABF> <20><><EFBFBD>뵽<EFBFBD>½<EFBFBD><C2BD>ͻ<EFBFBD> <20>̽<EFBFBD><CCBD><EFBFBD> 2017-08-15
|
|
|
|
|
str:=str +' and t_op_seae.ί<>е<EFBFBD>λ '
|
|
|
|
|
+'in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales_tmp where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=cast(GETDATE() as date) '
|
|
|
|
|
+' UNION SELECT DISTINCT <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> FROM t_crm_client_sales '
|
|
|
|
|
+' WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IN (''Լ<><D4BC>ʱ<EFBFBD><CAB1>'', ''Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=cast(GETDATE()as date))'
|
|
|
|
|
+' and t_op_seae.ί<>е<EFBFBD>λ not in ( select t.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> FROM t_crm_client t where (ISNULL(t.<2E>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 0) = 1))';
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and t_op_seae.ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo_wtdw.DisplayValues[1]+'''';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if Edit1_ywbh.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+replaceSQuotes(Edit1_ywbh.text)+'%'+'''';
|
|
|
|
|
if Edit2_wtbh.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+replaceSQuotes(Edit2_wtbh.text)+'%'+'''';
|
|
|
|
|
if Edit3_ztdh.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+replaceSQuotes(Edit3_ztdh.text)+'%'+'''';
|
|
|
|
|
if wdbdtmpckr1_kc.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wdbdtmpckr1_kc.text+'''';
|
|
|
|
|
if wdbdtmpckr2_kc.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wdbdtmpckr2_kc.text+'''';
|
|
|
|
|
|
|
|
|
|
if wdblkpcmb1_cm.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD> like '+''''+'%'+replaceSQuotes(wdblkpcmb1_cm.text)+'%'+'''';
|
|
|
|
|
if Edit4_hc.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD> like '+''''+'%'+replaceSQuotes(Edit4_hc.text)+'%'+'''';
|
|
|
|
|
if wdblkpcmb2_xhg.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.ж<><D0B6><EFBFBD><EFBFBD> like '+''''+'%'+replaceSQuotes(wdblkpcmb2_xhg.text)+'%'+'''';
|
|
|
|
|
|
|
|
|
|
// //if DBComboBoxEh1.text<>'' then
|
|
|
|
|
str:=str+' and ( t_op_state.ҵ<><D2B5>״̬ = ''<27>ᵥǩ<E1B5A5><C7A9>'')';
|
|
|
|
|
|
|
|
|
|
if wdbdtmpckr3_lr.text<>''then
|
|
|
|
|
str:=str+' and t_op_state.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wdbdtmpckr3_lr.text+'''';
|
|
|
|
|
if wdbdtmpckr4_lr.text<>''then
|
|
|
|
|
str:=str+' and t_op_state.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wdbdtmpckr4_lr.text+' 23:59:59''';
|
|
|
|
|
//
|
|
|
|
|
str:=str+' and '+ open_data('0001','t_op_seae.¼<><C2BC><EFBFBD><EFBFBD>',
|
|
|
|
|
't_op_seae.<2E><><EFBFBD><EFBFBD>Ա','t_op_seae.<2E>ͷ<EFBFBD>Ա','t_op_seae.<2E><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
if RxDBLookupCombo28.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.ǩ<><C7A9><EFBFBD><EFBFBD>ʽ like '+''''+'%'+RxDBLookupCombo28.Value+'%'+''''
|
|
|
|
|
+' and t_op_state.<2E><><EFBFBD><EFBFBD> not in ('
|
|
|
|
|
+'select <20><><EFBFBD><EFBFBD> from t_op_seae_sign_detail t left join t_op_seae_sign_main m on (m.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=t.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) where m.״̬<>''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' ' // where t.<2E>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>=1
|
|
|
|
|
+' union select <20><><EFBFBD><EFBFBD> from t_op_state t where t.ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'''
|
|
|
|
|
+' union select t.<2E><><EFBFBD><EFBFBD> from t_op_seae_app t'
|
|
|
|
|
+')';
|
|
|
|
|
|
|
|
|
|
with t_op_seae do
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
close;sql.clear;
|
|
|
|
|
sql.add('select distinct t_op_seae.ҵ<><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_state.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as [<5B>ᵥǩ<E1B5A5><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]');
|
|
|
|
|
sql.add(',t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E>ᵥǩ<E1B5A5><C7A9>״̬,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>,t_op_seae.ж<><D0B6><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);
|
|
|
|
|
open;First;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_seae.IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ҵ<EFBFBD><D2B5>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.bsknpnl1Resize(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
i:integer;
|
|
|
|
|
begin
|
|
|
|
|
// i:=round(bsSkinPanel1.Width/11);
|
|
|
|
|
// bsSkinButton9.Width:=i;
|
|
|
|
|
//bsSkinButton1.Width:=i;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.dxdbgrd1_SColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort(Column,t_op_seae,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn1_gennerateSignClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str,bsno:widestring;
|
|
|
|
|
i:integer;
|
|
|
|
|
aQuery:TAdoQuery;
|
|
|
|
|
qdm_Query:TAdoQuery;
|
|
|
|
|
qdd_Query:TAdoQuery;
|
|
|
|
|
qry_state:TADOQuery;
|
|
|
|
|
qdtbh:string;
|
|
|
|
|
strwtdw1,strwtdw2,zhtdh,ysstr,znjstr:string;
|
|
|
|
|
khlx:string;//<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
dbTime,nouseDate:TDateTime;
|
|
|
|
|
blNoQF,isznj:Boolean; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD>Ƿ<EFBFBD><C7B7>
|
|
|
|
|
bsnoes:string; //ǩ<><C7A9><EFBFBD><EFBFBD> ѡ<>еı<D0B5><C4B1><EFBFBD>
|
|
|
|
|
strsql:string;
|
|
|
|
|
bllszq:Boolean;
|
|
|
|
|
strlszq:string;//<2F><>ʱ<EFBFBD><CAB1><EFBFBD>ڷ<EFBFBD>Χ
|
|
|
|
|
reasons:string;//<2F><>ʱ<EFBFBD><CAB1><EFBFBD>ڷ<EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>
|
|
|
|
|
ttlznj:Double;
|
|
|
|
|
begin
|
|
|
|
|
blNoQF:=True; //<2F><>Ƿ<EFBFBD><C7B7>
|
|
|
|
|
bsnoes:='';
|
|
|
|
|
if dxdbgrd1_S.SelectedCount<1 then
|
|
|
|
|
Exit;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
nouseDate:=getNouseDate(t_op_seae.FieldByName('ί<>е<EFBFBD>λ').AsString); //debug
|
|
|
|
|
try
|
|
|
|
|
//begin check
|
|
|
|
|
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ϢΪ<CFA2><CEAA>
|
|
|
|
|
m_infomation:='';
|
|
|
|
|
|
|
|
|
|
for i:=0 to dxdbgrd1_S.SelectedCount-1 do
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
t_op_seae.GoTobookmark(pointer(dxdbgrd1_S.SelectedRows[i]));
|
|
|
|
|
if i=0 then
|
|
|
|
|
begin
|
|
|
|
|
strwtdw1 := t_op_seae.FieldByName('ί<>е<EFBFBD>λ').AsString;
|
|
|
|
|
strwtdw2:=strwtdw1;
|
|
|
|
|
bsnoes:=''''+ t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString +'''';
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
strwtdw2 := t_op_seae.FieldByName('ί<>е<EFBFBD>λ').AsString;
|
|
|
|
|
bsnoes:=bsnoes+','''+ t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString +'''';
|
|
|
|
|
end;
|
|
|
|
|
if strwtdw1<>strwtdw2 then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('ί<>е<EFBFBD>λ<EFBFBD><CEBB>Ψһ!');
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
end; //end for
|
|
|
|
|
//<2F>ж<EFBFBD><D0B6><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
|
|
|
|
bllszq:=false;
|
|
|
|
|
khlx:= getzqlx(strwtdw1,false);
|
|
|
|
|
if(khlx='<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>')then
|
|
|
|
|
begin
|
|
|
|
|
strlszq:=gettmpzqdate(strwtdw1);
|
|
|
|
|
if( strlszq<>'') then
|
|
|
|
|
begin
|
|
|
|
|
khlx:='<27><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>';
|
|
|
|
|
if Application.MessageBox(pchar(strwtdw1+' <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>û<EFBFBD>й<EFBFBD><D0B9><EFBFBD>:'+ strlszq +#13#10+'ȷʵҪ<CAB5><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>',MB_YESNO+mb_iconquestion)<> ID_YES then
|
|
|
|
|
begin
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
bllszq:=True;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
//<2F><>ȷ<EFBFBD>ϸÿͻ<C3BF><CDBB>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>½<EFBFBD><C2BD>ͻ<EFBFBD>??????
|
|
|
|
|
ShowMessage('<27><>ȷ<EFBFBD>ϸÿͻ<C3BF><CDBB>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>½<EFBFBD><C2BD>ͻ<EFBFBD>!');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
try
|
|
|
|
|
|
|
|
|
|
//һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ,<2C><>ΪÿһƱ<D2BB><C6B1><EFBFBD><EFBFBD><EFBFBD>Ѷ<EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
if(bllszq=False) and (CheckBilldue(bsnoes,strwtdw1 )=False) then
|
|
|
|
|
blNoQF:=false; //ֻ<><D6BB><EFBFBD>Dz<EFBFBD><C7B2>˳<EFBFBD>
|
|
|
|
|
except
|
|
|
|
|
on ex:Exception do
|
|
|
|
|
begin
|
|
|
|
|
errorlog(ex.Message) ;
|
|
|
|
|
ShowMessage('<27>ж<EFBFBD><D0B6>ᵥ״̬ʱ<CCAC><CAB1><EFBFBD><EFBFBD><EFBFBD>쳣:' + ex.message) ;
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
{
|
|
|
|
|
isznj:=getyjzq(bsnoes,strwtdw1,ysstr,znjstr,ttlznj);
|
|
|
|
|
if (isznj) then begin
|
|
|
|
|
try
|
|
|
|
|
if not assigned(frm_op_znjyj) then
|
|
|
|
|
frm_op_znjyj:=tfrm_op_znjyj.Create (self);
|
|
|
|
|
frm_op_znjyj.lblcust.Caption:=strwtdw1;
|
|
|
|
|
frm_op_znjyj.lblmonth.Caption:=FormatDateTime('MM',t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime);
|
|
|
|
|
frm_op_znjyj.lblzq.Caption:=getzq(strwtdw1);
|
|
|
|
|
frm_op_znjyj.lbldate.Caption:=FormatDateTime('YYYY-MM-DD',Date);
|
|
|
|
|
frm_op_znjyj.lblznj.Caption:=znjstr;
|
|
|
|
|
frm_op_znjyj.lblys.Caption:=ysstr;
|
|
|
|
|
frm_op_znjyj.lblttlznj.Caption:=FloatToStr(ttlznj);
|
|
|
|
|
frm_op_znjyj.Memo1.Clear;
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('Ӧ<>շ<EFBFBD><D5B7><EFBFBD>:'+ysstr);
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('');
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('<27><><EFBFBD>ɽ<EFBFBD>:'+znjstr);
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('');
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('<27>ϼ<EFBFBD>:'+FloatToStr(ttlznj));
|
|
|
|
|
frm_op_znjyj.ShowModal;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(frm_op_znjyj);
|
|
|
|
|
end;
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(blNoQF=false) then
|
|
|
|
|
begin
|
|
|
|
|
//Ƿ<>Ѵ<EFBFBD><D1B4><EFBFBD>
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD>Ƿ<EFBFBD>Ѳ<EFBFBD><D1B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD> :<3A><><EFBFBD><EFBFBD> <20>ų<EFBFBD>Դ 2017-08-02
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD>Ƿ<EFBFBD>ѵ<EFBFBD><D1B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><DEBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD> :<3A><><EFBFBD><EFBFBD> <20>ų<EFBFBD>Դ 2017-08-15
|
|
|
|
|
if(if_open('450')) then
|
|
|
|
|
begin
|
|
|
|
|
if Application.MessageBox(pchar('<27><>ǰҪ<C7B0><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>'+#13#10+ m_infomation +#13#10+'<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>?'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>'
|
|
|
|
|
,mb_yesno+mb_iconquestion)<>id_yes then
|
|
|
|
|
exit;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
Application.MessageBox(pchar('<27><>ǰҪ<C7B0><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>'+#13#10+ m_infomation +#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>!'+#13#10+'<27><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>ģʽ:'+#13#10+'1.<2E>Ƿ<EFBFBD><C7B7>п<EFBFBD><D0BF>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>'+#13#10+'2.<2E><><EFBFBD>˷ŵ<CBB7>'+#13#10+'3.<2E><><EFBFBD>˱<EFBFBD><CBB1>ŵ<EFBFBD>'+#13#10+'4.<2E><><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>'
|
|
|
|
|
,MB_ICONINFORMATION);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//end check
|
|
|
|
|
aQuery:=CreateAdoQuery();
|
|
|
|
|
qdm_Query:=CreateAdoQuery();
|
|
|
|
|
qdd_Query:=CreateAdoQuery();
|
|
|
|
|
|
|
|
|
|
str:= 'INSERT INTO t_sys_signid (mainorderno) VALUES (''222'');';
|
|
|
|
|
aQuery.SQL.Add(str) ;
|
|
|
|
|
aQuery.ExecSQL();
|
|
|
|
|
aQuery.sql.Clear();
|
|
|
|
|
str:= 'select MAX(signid) as qdtbh,GETDATE()as FDate from t_sys_signid; ';
|
|
|
|
|
aQuery.sql.add(str);
|
|
|
|
|
|
|
|
|
|
qdm_Query.SQL.Add('SELECT * FROM [t_op_seae_sign_main] where 1=2');
|
|
|
|
|
qdd_Query.SQL.Add('SELECT * FROM [t_op_seae_sign_detail] where 1=2');
|
|
|
|
|
|
|
|
|
|
aQuery.Open;
|
|
|
|
|
aQuery.First;
|
|
|
|
|
qdtbh:=aQuery.FieldByName('qdtbh').AsString;
|
|
|
|
|
dbTime:=aQuery.FieldByName('FDate').AsDateTime;
|
|
|
|
|
aQuery.sql.Clear();
|
|
|
|
|
aQuery.sql.Add('SELECT * FROM [t_op_state] WHERE 1=2');
|
|
|
|
|
aQuery.OPEN;
|
|
|
|
|
qdm_Query.Open;
|
|
|
|
|
qdd_Query.Open;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
frm_main.db.BeginTrans;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for i:=0 to dxdbgrd1_S.SelectedCount-1 do
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
t_op_seae.GoTobookmark(pointer(dxdbgrd1_S.SelectedRows[i]));
|
|
|
|
|
if i=0 then
|
|
|
|
|
begin
|
|
|
|
|
strwtdw1 := t_op_seae.FieldByName('ί<>е<EFBFBD>λ').AsString;
|
|
|
|
|
strwtdw2:=strwtdw1;
|
|
|
|
|
with qdm_Query do
|
|
|
|
|
begin
|
|
|
|
|
Insert;
|
|
|
|
|
FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=qdtbh;
|
|
|
|
|
FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:= strwtdw1;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:= employee;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD>˵绰').AsString:=employeePhone;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:= dbTime;
|
|
|
|
|
FieldByname('<27><><EFBFBD><EFBFBD>').AsString:=getzq(strwtdw1);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
nouseDate:=getNouseDate(strwtdw1);
|
|
|
|
|
if(nouseDate>0) then
|
|
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:= nouseDate
|
|
|
|
|
else FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date+3;
|
|
|
|
|
FieldByname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=khlx;
|
|
|
|
|
FieldByName('״̬').AsString:= stateNewQD;
|
|
|
|
|
FieldByName('<27>Ƿ<EFBFBD><C7B7>ط<EFBFBD>').AsVariant:= 0;
|
|
|
|
|
//
|
|
|
|
|
FieldByname('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>½<EFBFBD>';
|
|
|
|
|
FieldByName('״̬').AsString:='֪ͨǩ<D6AA><C7A9>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>';
|
|
|
|
|
FieldByName('֪ͨǩ<D6AA><C7A9>ʱ<EFBFBD><CAB1>').AsDateTime:= dbTime;
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD><CDBB>ᵥǩ<E1B5A5><C7A9>
|
|
|
|
|
FieldByName('״̬').AsString:='ǩ<><C7A9>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>';
|
|
|
|
|
FieldByName('ǩ<><C7A9>ʱ<EFBFBD><CAB1>').AsDateTime:=dbTime;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
strwtdw2 := t_op_seae.FieldByName('ί<>е<EFBFBD>λ').AsString;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
qdd_Query.Insert;
|
|
|
|
|
qdd_Query.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:= qdtbh;
|
|
|
|
|
qdd_Query.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:= t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
zhtdh:= t_op_seae.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
|
|
qdd_Query.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:= zhtdh;
|
|
|
|
|
qdd_Query.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:= t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
qdd_Query.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:= t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
qdd_Query.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').AsString:= t_op_seae.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
|
|
qdd_Query.FieldByName('״̬').AsString:= stateNewQD;
|
|
|
|
|
qdd_Query.FieldByName('<27>ᵥǩ<E1B5A5><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:= t_op_seae.FieldByName('<27>ᵥǩ<E1B5A5><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime;
|
|
|
|
|
|
|
|
|
|
with aQuery do
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
Insert;
|
|
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:= t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
FieldByName('ҵ<><D2B5>״̬').AsString:= stateNewQD;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:= employee;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:= dbTime;
|
|
|
|
|
end;
|
|
|
|
|
end; //end for
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( blNoQF=False) then
|
|
|
|
|
begin
|
|
|
|
|
//Ƿ<>ѷ<EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
qdm_Query.FieldByName('״̬').AsString:='֪ͨǩ<D6AA><C7A9>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>';
|
|
|
|
|
qdm_Query.FieldByName('֪ͨǩ<D6AA><C7A9>ʱ<EFBFBD><CAB1>').AsDateTime:=dbTime;
|
|
|
|
|
end;
|
|
|
|
|
qdm_Query.post;
|
|
|
|
|
qdd_Query.post;
|
|
|
|
|
aQuery.post;
|
|
|
|
|
{
|
|
|
|
|
qry_state:=CreateAdoQuery;
|
|
|
|
|
with qry_state do
|
|
|
|
|
begin
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
//---<2D><><EFBFBD><EFBFBD><EFBFBD>ᵥǩ<E1B5A5><C7A9>״̬
|
|
|
|
|
SQL.Add('insert into t_op_state (<28><><EFBFBD><EFBFBD> ,ҵ<><D2B5>״̬ ,¼<><C2BC><EFBFBD><EFBFBD> ,¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>ע)'
|
|
|
|
|
+'select <20><><EFBFBD><EFBFBD>,''<27>ᵥǩ<E1B5A5><C7A9>'' as ҵ<><D2B5>״̬,'''+ employee +''' as ¼<><C2BC><EFBFBD><EFBFBD>,GETDATE() as ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,null as <20><>ע '
|
|
|
|
|
+' from t_op_seae s where s.<2E><><EFBFBD><EFBFBD> in (' + bsnoes+ ') '
|
|
|
|
|
+' and not exists (select ts.<2E><><EFBFBD><EFBFBD> from t_op_state ts where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and ts.<2E><><EFBFBD><EFBFBD>=s.<2E><><EFBFBD><EFBFBD>) '
|
|
|
|
|
);
|
|
|
|
|
//---֪ͨ<CDA8>ŵ<EFBFBD>
|
|
|
|
|
SQL.Add('insert into t_op_state (<28><><EFBFBD><EFBFBD> ,ҵ<><D2B5>״̬ ,¼<><C2BC><EFBFBD><EFBFBD> ,¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>ע)'
|
|
|
|
|
+'select <20><><EFBFBD><EFBFBD>,''֪ͨ<CDA8>ŵ<EFBFBD>'' as ҵ<><D2B5>״̬,'''+ employee +''' as ¼<><C2BC><EFBFBD><EFBFBD>,GETDATE() as ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,null as <20><>ע '
|
|
|
|
|
+' from t_op_seae s where s.<2E><><EFBFBD><EFBFBD> in (' + bsnoes+ ') '
|
|
|
|
|
+' and not exists (select ts.<2E><><EFBFBD><EFBFBD> from t_op_state ts where ҵ<><D2B5>״̬=''֪ͨ<CDA8>ŵ<EFBFBD>'' and ts.<2E><><EFBFBD><EFBFBD>=s.<2E><><EFBFBD><EFBFBD>) '
|
|
|
|
|
);
|
|
|
|
|
//---<2D>ᵥǩ<E1B5A5><C7A9>
|
|
|
|
|
SQL.Add('Update t_op_Seae set <20>ᵥǩ<E1B5A5><C7A9>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' ,ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=getdate() '
|
|
|
|
|
+' where <20><><EFBFBD><EFBFBD> in (' + bsnoes +');' );
|
|
|
|
|
i:= ExecSQL();
|
|
|
|
|
if(i<0) then
|
|
|
|
|
ShowMessage('<27>½<EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>״̬ʧ<CCAC><CAA7>!');
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
frm_main.db.CommitTrans;
|
|
|
|
|
show_qdtxx(qdtbh,0);
|
|
|
|
|
aQuery.close();
|
|
|
|
|
qdm_Query.close();
|
|
|
|
|
qdd_Query.close();
|
|
|
|
|
t_op_seae.Requery();
|
|
|
|
|
|
|
|
|
|
except
|
|
|
|
|
on ex: Exception do
|
|
|
|
|
begin
|
|
|
|
|
errorlog(ex.Message) ;
|
|
|
|
|
ShowMessage(ex.Message);
|
|
|
|
|
aQuery.Cancel;
|
|
|
|
|
qdm_Query.Cancel;
|
|
|
|
|
qdd_Query.Cancel;
|
|
|
|
|
frm_main.db.rollbacktrans;
|
|
|
|
|
end
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
except
|
|
|
|
|
on ex: Exception do
|
|
|
|
|
begin
|
|
|
|
|
errorlog(ex.Message) ;
|
|
|
|
|
ShowMessage(ex.Message);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_seae_sign.getNouseDate( wtdw:string):TDateTime;
|
|
|
|
|
var
|
|
|
|
|
str:string;
|
|
|
|
|
aQuery:TAdoquery;
|
|
|
|
|
iday:Integer;
|
|
|
|
|
begin
|
|
|
|
|
result:=0;
|
|
|
|
|
str:='select jfrq0, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ,case when DAY( GETDATE()) < = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ' +#13#10
|
|
|
|
|
+' then DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)+ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ' +#13#10
|
|
|
|
|
+' else ' +#13#10
|
|
|
|
|
+' DATEADD(mm, DATEDIFF(mm,0,getdate())+1, 0)+ case when jfrq0><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> then <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else jfrq0 end ' +#13#10
|
|
|
|
|
+' end as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from (' +#13#10
|
|
|
|
|
+' select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as jfrq0,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, ' +#13#10
|
|
|
|
|
+' case when <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> then <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> end as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ' +#13#10
|
|
|
|
|
+' from ' +#13#10
|
|
|
|
|
+' (' +#13#10
|
|
|
|
|
+' select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,day( DATEADD(ms,-3,DATEADD(mm, DATEDIFF(m,0,getdate())+1, 0))) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,' +#13#10
|
|
|
|
|
+' day( DATEADD(ms,-3,DATEADD(mm, DATEDIFF(m,0,getdate())+2, 0))) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' +#13#10
|
|
|
|
|
+' from t_crm_client_sales WITH(NOLOCK) where <20><><EFBFBD><EFBFBD>ģʽ=''<27>̶<EFBFBD>'' and isnull( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0)>0 ' +#13#10
|
|
|
|
|
+' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+ wtdw +'''' +#13#10
|
|
|
|
|
+' ) crm ' +#13#10
|
|
|
|
|
+' ) crm_sales ';
|
|
|
|
|
|
|
|
|
|
aquery:=CreateAdoQuery;
|
|
|
|
|
with aquery do
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
sql.clear;
|
|
|
|
|
sql.add(str);
|
|
|
|
|
open;First;
|
|
|
|
|
if IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
result:=0;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
result:=aquery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
function Tfrm_op_seae_sign.gettmpzqdate(cust: string ):string;
|
|
|
|
|
var
|
|
|
|
|
aQuery:TAdoQuery;
|
|
|
|
|
begin
|
|
|
|
|
result:='';
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do
|
|
|
|
|
begin
|
|
|
|
|
close;sql.Clear;
|
|
|
|
|
sql.Add('select top 1 t.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>,t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales_tmp t ');
|
|
|
|
|
sql.Add(' where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+cust+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=cast(GETDATE() as date) order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc ');
|
|
|
|
|
open;First;
|
|
|
|
|
if IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
result:='';
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
result:= FormatDateTime('YYYY-MM-DD',FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsDateTime)
|
|
|
|
|
+ '~'+FormatDateTime('YYYY-MM-DD',FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime) ;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
procedure Tfrm_op_seae_sign.N1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//grid_save_xls(dxdbgrd2);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.dxdbgrd1_SCustomDraw(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_seae_sign.Edit3_ztdhKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
key:=#0;
|
|
|
|
|
//bsSkinButton8Click(Sender);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.dxdbgrd1_SDblClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column13CustomDraw(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_seae_sign.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_seae_sign.btn_seach2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
show_qdtxx('',1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.MenuItem1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxDBGrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn6_exitClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
Close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.RxDBLookupCombo28Enter(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
RxDBLookupCombo28.LookupDisplay:='<27><><EFBFBD><EFBFBD>;ǩ<><C7A9><EFBFBD><EFBFBD>ʽ';
|
|
|
|
|
RxDBLookupCombo28.DisplayValue:='ZB';
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn11Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
bsSkinPageControl1.Pages[0].Visible:=true;
|
|
|
|
|
bsSkinPageControl1.Pages[1].Visible:=true;
|
|
|
|
|
bsSkinPageControl1.ActivePageIndex:=0;
|
|
|
|
|
t_op_seae.Requery();
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
procedure Tfrm_op_seae_sign.show_qdtxx (qdtbh:string;iway:Integer);
|
|
|
|
|
var
|
|
|
|
|
str:string;
|
|
|
|
|
begin
|
|
|
|
|
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if not assigned(frm__op_seae_sign_new_info) then
|
|
|
|
|
frm__op_seae_sign_new_info:=Tfrm__op_seae_sign_new_info.Create (self);
|
|
|
|
|
|
|
|
|
|
//˫<><CBAB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ϸ
|
|
|
|
|
if iway=2 then
|
|
|
|
|
begin
|
|
|
|
|
frm__op_seae_sign_new_info.InitialUserinfo(qdtbh,0);
|
|
|
|
|
frm__op_seae_sign_new_info.SigninfoShow();
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if(qdtbh<>'') then
|
|
|
|
|
str :=' where ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =''' +qdtbh + ''''
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
str:=' where 1=1';
|
|
|
|
|
if wwDBDateTimePicker5.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae_sign_main.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >='+''''+wwDBDateTimePicker5.text+'''';
|
|
|
|
|
if wwDBDateTimePicker6.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae_sign_main.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.text+' 23:59:59''';
|
|
|
|
|
if Edit6_searchkhmch.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae_sign_main.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> like'+'''%'+replaceSQuotes(trim(Edit6_searchkhmch.text))+'%''';
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5>ᵥ
|
|
|
|
|
end;
|
|
|
|
|
//TODO : <20><>ȷ<EFBFBD><C8B7>
|
|
|
|
|
//if (not if_open('432')) then
|
|
|
|
|
// str:= str + ' and ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in ( select td.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_op_seae_sign_detail td,t_op_seae ts '
|
|
|
|
|
// +' where td.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>=ts.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5> and ¼<><C2BC><EFBFBD><EFBFBD>=''' + employee +''') ';
|
|
|
|
|
str:='SELECT * FROM [t_op_seae_sign_main] ' +str;
|
|
|
|
|
qry1_qdtm.Close() ;
|
|
|
|
|
qry1_qdtm.SQL.Clear;
|
|
|
|
|
qry1_qdtm.SQL.Add(str);
|
|
|
|
|
|
|
|
|
|
qry1_qdtm.open; qry1_qdtm.First;
|
|
|
|
|
if qry1_qdtm.IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ҵļ<D2B5>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if (qry1_qdtm.Recordset.RecordCount=1)
|
|
|
|
|
and (qdtbh<>'')
|
|
|
|
|
and (iway=0) then
|
|
|
|
|
begin
|
|
|
|
|
frm__op_seae_sign_new_info.InitialUserinfo(qdtbh,iway);
|
|
|
|
|
frm__op_seae_sign_new_info.SigninfoShow();
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
procedure Tfrm_op_seae_sign.initialEmployeePhone();
|
|
|
|
|
var
|
|
|
|
|
empQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
empQuery:=CreateAdoQuery();
|
|
|
|
|
with empQuery do
|
|
|
|
|
begin
|
|
|
|
|
SQL.Add('select [<5B>̶<EFBFBD><CCB6>绰],[<5B>ƶ<EFBFBD><C6B6>绰] from [t_sys_employee] where [<5B><><EFBFBD><EFBFBD>]='''+ employee +''' ');
|
|
|
|
|
Open;First;
|
|
|
|
|
employeePhone :=FieldByName('<27>̶<EFBFBD><CCB6>绰').AsString;
|
|
|
|
|
close();
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.searchqdt(bh:string);
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
if bh<>'' then
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
show_qdtxx(bh,1);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.Edit1_qdtbhKeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
var
|
|
|
|
|
str:string;
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
str:= Edit1_qdtbh.Text;
|
|
|
|
|
Edit1_qdtbh.Clear();
|
|
|
|
|
Edit15_searchqdthm.Text:=str;
|
|
|
|
|
show_qdtxx(str,0);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.dxDBGrid1DblClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str:string;
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
str:=qry1_qdtm.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
show_qdtxx(str,2);
|
|
|
|
|
qry1_qdtm.Requery();
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB>Ƿ<EFBFBD>Ƿ<EFBFBD><C7B7>
|
|
|
|
|
/// </summary>
|
|
|
|
|
function Tfrm_op_seae_sign.CheckBilldue( bsnoes,wtdw:string):Boolean;
|
|
|
|
|
var
|
|
|
|
|
FeeItems:string;
|
|
|
|
|
amt,usd:Double;
|
|
|
|
|
tdh,bh,jflx:string;
|
|
|
|
|
begin
|
|
|
|
|
Result:=True;
|
|
|
|
|
|
|
|
|
|
tdh:=t_op_seae.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
|
|
bh:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
jflx:= Trim(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
jflx:='<27>½<EFBFBD>';
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD>
|
|
|
|
|
begin
|
|
|
|
|
if GetCrmsales(bh,wtdw,jflx ,amt,usd,FeeItems)then
|
|
|
|
|
begin
|
|
|
|
|
m_infomation:= wtdw+'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>Ϊ:'
|
|
|
|
|
+FormatFloat('0.00;-0.00;0',amt) +'<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>Ϊ:'+FormatFloat('0.00;-0.00;0',USD)+' <20><><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>' +#13#10;
|
|
|
|
|
Result:=False;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end; //end CheckBilldue
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_seae_sign.CheckBilldue2( bsnoes,wtdw:string):Boolean;
|
|
|
|
|
var
|
|
|
|
|
FeeItems:string;
|
|
|
|
|
amt,usd:Double;
|
|
|
|
|
tdh,bh,jflx:string;
|
|
|
|
|
begin
|
|
|
|
|
Result:=True;
|
|
|
|
|
|
|
|
|
|
tdh:=qry_op_seae_pj.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
|
|
bh:=qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
jflx:= Trim(qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
jflx:='<27>½<EFBFBD>';
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD>
|
|
|
|
|
begin
|
|
|
|
|
if GetCrmsales(bh,wtdw,jflx ,amt,usd,FeeItems,True)then
|
|
|
|
|
begin
|
|
|
|
|
m_infomation:= wtdw+'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>Ϊ:'
|
|
|
|
|
+FormatFloat('0.00;-0.00;0',amt) +'<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>Ϊ:'+FormatFloat('0.00;-0.00;0',USD)+' <20><><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>' +#13#10;
|
|
|
|
|
Result:=False;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end; //end CheckBilldue
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ȫ<><C8AB>Ʊ<EFBFBD><C6B1><EFBFBD>ͻ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
function Tfrm_op_seae_sign.CheckBilldue_pj(bsnoes,wtdw:string;out blnotifyOk:Boolean):Boolean;
|
|
|
|
|
var
|
|
|
|
|
FeeItems,unchkinfo,strtmp:string;
|
|
|
|
|
amt,usd,usd_this,rmb_this:Double;
|
|
|
|
|
tdh,bh,jflx,khlx:string;
|
|
|
|
|
str:string;
|
|
|
|
|
aquery:TADOQuery;
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
Result:=True;
|
|
|
|
|
blnotifyOk:=true;//֪ͨ<CDA8>ŵ<EFBFBD>ok
|
|
|
|
|
tdh:='';
|
|
|
|
|
bh:='';
|
|
|
|
|
usd_this:=0;
|
|
|
|
|
rmb_this:=0;
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD> <20>ĵ<EFBFBD><C4B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>зŵ<D0B7>֪ͨ:<3A><><EFBFBD><EFBFBD><F2B2BBBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>
|
|
|
|
|
aquery:=CreateAdoQuery;
|
|
|
|
|
khlx:= getzqlx(wtdw) ;
|
|
|
|
|
if(khlx<>'<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>') then
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
if GetCrmsales(bh,wtdw,'<27>½<EFBFBD>' ,amt,usd,FeeItems,True)then
|
|
|
|
|
begin
|
|
|
|
|
m_infomation:= wtdw+'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>Ϊ:'
|
|
|
|
|
+FormatFloat('0.00;-0.00;0',amt) +'<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>Ϊ:'+FormatFloat('0.00;-0.00;0',USD)+' <20><><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>' +#13#10;
|
|
|
|
|
Result:=false;
|
|
|
|
|
end else begin
|
|
|
|
|
|
|
|
|
|
Result:=True;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD>
|
|
|
|
|
with aquery do
|
|
|
|
|
begin
|
|
|
|
|
Close;
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
SQL.Add('select <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD>ᵥ<EFBFBD><E1B5A5> from t_op_seae where <20><><EFBFBD><EFBFBD> in (' + bsnoes +')') ;
|
|
|
|
|
SQL.Add(' and not exists ( select <20><><EFBFBD><EFBFBD> from t_op_state where ҵ<><D2B5>״̬=''֪ͨ<CDA8>ŵ<EFBFBD>'' and t_op_state.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD>)');
|
|
|
|
|
Open;
|
|
|
|
|
if(IsEmpty) then
|
|
|
|
|
Exit
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
Result:=False;
|
|
|
|
|
First;
|
|
|
|
|
unchkinfo:='';
|
|
|
|
|
while not Eof do
|
|
|
|
|
begin
|
|
|
|
|
if(unchkinfo='') then
|
|
|
|
|
unchkinfo :=fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString
|
|
|
|
|
else
|
|
|
|
|
unchkinfo:=unchkinfo+','+ fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
|
|
Next;
|
|
|
|
|
end;
|
|
|
|
|
//ӵ<><D3B5>ȫ<EFBFBD>µ<EFBFBD><C2B5>û<EFBFBD><C3BB><EFBFBD><EFBFBD>Խ<EFBFBD><D4BD><EFBFBD>ǿ<EFBFBD><C7BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD> cjb 2017-09-01
|
|
|
|
|
if(if_open('450')) then
|
|
|
|
|
begin
|
|
|
|
|
unchkinfo:= '<27><>ƱΪ<C6B1>½<EFBFBD><C2BD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><F1A3ACB1><EFBFBD><EFBFBD><EFBFBD>֪ͨ<CDA8>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᵥδ<E1B5A5><CEB4>"֪ͨ<CDA8>ŵ<EFBFBD>"<22><>'+#13#10 + unchkinfo +#13#10;
|
|
|
|
|
//+#13#10+'<27>Ƿ<EFBFBD>ǿ<EFBFBD>Ʒŵ<C6B7>?' ;
|
|
|
|
|
//<2F>ж<EFBFBD><D0B6>Ƿ<EFBFBD>Ƿ<EFBFBD><C7B7>
|
|
|
|
|
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
if GetCrmsales(bh,wtdw,'<27>½<EFBFBD>' ,amt,usd,FeeItems)then
|
|
|
|
|
begin
|
|
|
|
|
strtmp:= wtdw +' <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>½<EFBFBD>,<2C><>ǰǷ<C7B0><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>Ϊ:'
|
|
|
|
|
+FormatFloat('0.00;0.00;0',amt) +'<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>Ϊ:'+FormatFloat('0.00;0.00;0',USD)+' ,<2C><><EFBFBD>ڳ<EFBFBD><DAB3><EFBFBD>Ƿ<EFBFBD><C7B7>' +#13#10;
|
|
|
|
|
unchkinfo:= unchkinfo+strtmp +#13#10+'<27>Ƿ<EFBFBD>ǿ<EFBFBD>Ʒŵ<C6B7>?' ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( Application.MessageBox(PChar(unchkinfo),'<27><>Ϣ<EFBFBD><CFA2>ʾ',MB_ICONQUESTION+MB_YESNO)<>id_yes) then
|
|
|
|
|
begin
|
|
|
|
|
Result:=false;
|
|
|
|
|
blnotifyOk:=false;//<2F><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4>"֪ͨ<CDA8>ŵ<EFBFBD>"<22><><EFBFBD>ᵥ
|
|
|
|
|
Close;
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
//ǿ<>Ʒ<EFBFBD><C6B7><EFBFBD>
|
|
|
|
|
Result:=True;
|
|
|
|
|
blnotifyOk:=True; //ǿ<>Ʒ<EFBFBD><C6B7><EFBFBD> cjb 2017-09-01
|
|
|
|
|
Close;
|
|
|
|
|
Exit;
|
|
|
|
|
end ;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8>
|
|
|
|
|
unchkinfo:='<27><>ƱΪ<C6B1>½<EFBFBD><C2BD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><F1A3ACB1><EFBFBD><EFBFBD><EFBFBD>֪ͨ<CDA8>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᵥδ<E1B5A5><CEB4>"֪ͨ<CDA8>ŵ<EFBFBD>"<22><>'+#13#10 + unchkinfo +#13#10+'<27><><EFBFBD>ܷŵ<DCB7>!' ;
|
|
|
|
|
Application.MessageBox(PChar(unchkinfo),'<27><>Ϣ<EFBFBD><CFA2>ʾ',MB_ICONINFORMATION) ;
|
|
|
|
|
blnotifyOk:=false;//<2F><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4>"֪ͨ<CDA8>ŵ<EFBFBD>"<22><><EFBFBD>ᵥ
|
|
|
|
|
Close;
|
|
|
|
|
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
Close;
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
end else begin
|
|
|
|
|
|
|
|
|
|
jflx:= '<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
// if (jflx='') or (jflx='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') or (jflx='<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>') or (jflx=null) then
|
|
|
|
|
begin
|
|
|
|
|
m_infomation:='';
|
|
|
|
|
if GetCrmsales(bh,wtdw,jflx,amt,usd,FeeItems,True) then
|
|
|
|
|
begin
|
|
|
|
|
//<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪƱ<CEAA><C6B1>
|
|
|
|
|
m_infomation:= m_infomation+wtdw+'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪƱ<CEAA><C6B1>,<2C><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>Ϊ:'
|
|
|
|
|
+FormatFloat('0.00;-0.00;0',amt) +'<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>Ϊ:'+FormatFloat('0.00;-0.00;0',USD) +' <20><><EFBFBD>ڳ<EFBFBD><DAB3><EFBFBD>Ƿ<EFBFBD><C7B7>' +#13#10;
|
|
|
|
|
|
|
|
|
|
Result:=False;
|
|
|
|
|
end ;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ƿ<EFBFBD>Ѷ<EFBFBD>Ҫ<EFBFBD><D2AA>ʾÿƱ<C3BF><C6B1><EFBFBD><EFBFBD>uǷ<75><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----from <20>ų<EFBFBD>Դ 2017-08-08
|
|
|
|
|
|
|
|
|
|
//Ʊ<><C6B1>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ʾȥ<CABE><C8A5><EFBFBD><EFBFBD><EFBFBD>ⲻ<EFBFBD><E2B2BB><EFBFBD><EFBFBD>Ƿ<EFBFBD>ѵĿͻ<C4BF><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>շѣ<D5B7>'' AND''MCCREF'' AND ''<27><><EFBFBD>Ǵ<EFBFBD><C7B4><EFBFBD>(<28>շ<EFBFBD>)'' AND ''SMTREF''<27>Ľ<EFBFBD><C4BD>
|
|
|
|
|
{
|
|
|
|
|
//<2F><EFBFBD><DEB7>ų<EFBFBD>4<EFBFBD><34><EFBFBD>ض<EFBFBD><D8B6>ͻ<EFBFBD>:
|
|
|
|
|
str:='select sum(Ӧ<><D3A6>USD-<2D><><EFBFBD><EFBFBD>USD ) as USD,sum(Ӧ<><D3A6>RMB-<2D><><EFBFBD><EFBFBD>RMB) as RMB from t_op_gain where <20><><EFBFBD><EFBFBD> in (%s);';
|
|
|
|
|
with aquery do
|
|
|
|
|
begin
|
|
|
|
|
Close;
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
SQL.Add(Format(str,[bsnoes])) ;
|
|
|
|
|
open();
|
|
|
|
|
if(not isempty) then
|
|
|
|
|
begin
|
|
|
|
|
usd_this:=fieldbyname('USD').AsFloat;
|
|
|
|
|
rmb_this:=fieldbyname('RMB').AsFloat;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
str:='select sum(Ӧ<><D3A6>USD-<2D><><EFBFBD><EFBFBD>USD ) as USD,sum(Ӧ<><D3A6>RMB-<2D><><EFBFBD><EFBFBD>RMB) as RMB from t_op_gain where <20><><EFBFBD><EFBFBD> in (%s);';
|
|
|
|
|
with aquery do
|
|
|
|
|
begin
|
|
|
|
|
Close;Sql.Clear;
|
|
|
|
|
SQL.Add('select <20><><EFBFBD><EFBFBD>Ա,');
|
|
|
|
|
SQL.Add('SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''USD'' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as USD');
|
|
|
|
|
SQL.Add(',');
|
|
|
|
|
SQL.Add('SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''RMB'' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as RMB');
|
|
|
|
|
SQL.Add(',');
|
|
|
|
|
SQL.Add('SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''USD'' then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as USDTORMB');
|
|
|
|
|
SQL.Add('From t_ch_fee');
|
|
|
|
|
SQL.Add('Left Join V_op_bscard_All on V_op_bscard_All.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD>');
|
|
|
|
|
SQL.Add('where V_op_bscard_All.ί<>е<EFBFBD>λ=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> ');
|
|
|
|
|
//
|
|
|
|
|
SQL.Add( ' and t_ch_fee.<2E><><EFBFBD><EFBFBD> in (' + bsnoes + ' ) and not (V_op_bscard_All.<2E><><EFBFBD><EFBFBD>˾=''<27><><EFBFBD><EFBFBD>ר<EFBFBD><D7A8>'' and V_op_bscard_All.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27>ۺ<EFBFBD><DBBA><EFBFBD>'') ');
|
|
|
|
|
//
|
|
|
|
|
SQL.Add(' and t_ch_fee.<2E><><EFBFBD><EFBFBD>=''<27><>'' and t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> AND ');
|
|
|
|
|
SQL.Add('t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>շѣ<D5B7>'' AND t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>''MCCREF'' AND t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>''<27><><EFBFBD>Ǵ<EFBFBD><C7B4><EFBFBD>(<28>շ<EFBFBD>)'' AND t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>''SMTREF''');
|
|
|
|
|
SQL.Add(' and t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>''AUSREF'' AND t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>''APLREF'' AND t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>''ONEREF'' ');
|
|
|
|
|
SQL.Add('and V_op_bscard_All.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=Getdate()-10000 and ((v_op_bscard_all.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>ͨ<EFBFBD><CDA8>'' and V_op_bscard_All.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=Getdate()-7) or (v_op_bscard_all.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>ĵ<EFBFBD>'' and V_op_bscard_All.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><=Getdate()-7) ) ');
|
|
|
|
|
SQL.Add(' Group by V_op_bscard_All.<2E><><EFBFBD><EFBFBD>Ա ');
|
|
|
|
|
Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=wtdw;
|
|
|
|
|
SQL.Add(Format(str,[bsnoes])) ;
|
|
|
|
|
open();
|
|
|
|
|
if(not isempty) then
|
|
|
|
|
begin
|
|
|
|
|
usd_this:=fieldbyname('USD').AsFloat;
|
|
|
|
|
rmb_this:=fieldbyname('RMB').AsFloat;
|
|
|
|
|
if(rmb_this+ usd_this)>0 then
|
|
|
|
|
m_infomation:= m_infomation+'ѡ<><D1A1>ҵ<EFBFBD><D2B5>Ƿ<EFBFBD><C7B7>' + '<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>Ϊ:' +FormatFloat('0.00;-0.00;0',rmb_this)
|
|
|
|
|
+'<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>Ϊ:'+FormatFloat('0.00;-0.00;0',usd_this)+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FieldByName('<27><><EFBFBD><EFBFBD>Ա').AsString ;
|
|
|
|
|
end;
|
|
|
|
|
Close;
|
|
|
|
|
end;
|
|
|
|
|
{
|
|
|
|
|
if(rmb_this+ usd_this)>0 then
|
|
|
|
|
m_infomation:= m_infomation+'ѡ<><D1A1>ҵ<EFBFBD><D2B5>Ƿ<EFBFBD><C7B7>' + '<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>Ϊ:' +FormatFloat('0.00;-0.00;0',rmb_this)
|
|
|
|
|
+'<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>Ϊ:'+FormatFloat('0.00;-0.00;0',usd_this) ;
|
|
|
|
|
}
|
|
|
|
|
if (m_infomation<>'') then begin
|
|
|
|
|
ShowMessage(m_infomation);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end; //end CheckBilldue
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>
|
|
|
|
|
/// </summary>
|
|
|
|
|
procedure Tfrm_op_seae_sign.N2Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
tmpfile:string;
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
if qry1_qdtm.IsEmpty then exit;
|
|
|
|
|
try
|
|
|
|
|
|
|
|
|
|
tmpfile:=qry1_qdtm.fieldbyname('<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>').asstring ;
|
|
|
|
|
|
|
|
|
|
if(tmpfile='') or (not FileExists(tmpfile)) then
|
|
|
|
|
Exit;
|
|
|
|
|
ShellExecute(Handle, nil, pchar(tmpfile), nil, nil, SW_NORMAL);
|
|
|
|
|
except
|
|
|
|
|
showmessage('<27><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
|
|
|
|
|
end ;
|
|
|
|
|
end;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>鿴<EFBFBD>ͻ<EFBFBD>ǩ<EFBFBD><C7A9>
|
|
|
|
|
/// </summary>
|
|
|
|
|
procedure Tfrm_op_seae_sign.frm__op_seae_sign_new_infomniN3Click(
|
|
|
|
|
Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
tmpfile:string;
|
|
|
|
|
begin
|
|
|
|
|
if qry1_qdtm.IsEmpty then exit;
|
|
|
|
|
try
|
|
|
|
|
|
|
|
|
|
tmpfile:=qry1_qdtm.fieldbyname('<27>ͻ<EFBFBD>ǩ<EFBFBD><C7A9>').asstring ;
|
|
|
|
|
|
|
|
|
|
if(tmpfile='') or (not FileExists(tmpfile)) then
|
|
|
|
|
Exit;
|
|
|
|
|
ShellExecute(Handle, nil, pchar(tmpfile), nil, nil, SW_NORMAL);
|
|
|
|
|
except
|
|
|
|
|
showmessage('<27><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
|
|
|
|
|
end ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.bsSkinPageControl1Change(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
if (Self.Visible) and (bsSkinPageControl1.ActivePageIndex=2) and Edit1_qdtbh.Visible then
|
|
|
|
|
Edit1_qdtbh.SetFocus();
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.FormResize(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
bsSkinTabSheet1.Width:=self.ClientWidth;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.bsSkinButton14Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
wwDBDateTimePicker5.text:='';
|
|
|
|
|
wwDBDateTimePicker6.text:='';
|
|
|
|
|
Edit6_searchkhmch.text:='';
|
|
|
|
|
Edit1_qdtbh.text:='';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.Edit1_ywbhKeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
// <20>س<EFBFBD><D8B3>Զ<EFBFBD><D4B6><EFBFBD>ѯ
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
btn4_searchNewClick(btn4_searchNew);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.Edit6_searchkhmchKeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
btn_seach2Click(Self.btn_seach2);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.dxDBGrid1CustomDraw(Sender: TObject;
|
|
|
|
|
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
|
|
|
|
|
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
|
|
|
|
|
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
|
|
|
|
|
var
|
|
|
|
|
value:string;
|
|
|
|
|
begin
|
|
|
|
|
value:=ANode.Strings[dxdbgrdchckclmnDBGrid1Column14_tf.Index];
|
|
|
|
|
if value ='True' then
|
|
|
|
|
begin
|
|
|
|
|
AFont.Color:=clgreen;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
AFont.Color:=clblack;
|
|
|
|
|
end;
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn4_searchNew_pjClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str,mblstatus:widestring;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str:='where t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5><>'''' and t_op_seae.ǩ<><C7A9><EFBFBD><EFBFBD>ʽ<>''''';
|
|
|
|
|
|
|
|
|
|
if RxDBLookupCombo_wtdw_pj.DisplayValues[1]=''then
|
|
|
|
|
begin
|
|
|
|
|
//Ʊ<><C6B1><EFBFBD>ͻ<EFBFBD>
|
|
|
|
|
//1.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>½<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪԼ<CEAA><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>,<2C><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=<3D><><EFBFBD><EFBFBD>] <20><>Ʊ<EFBFBD><C6B1> :<3A><><EFBFBD><EFBFBD>
|
|
|
|
|
//2.ǩ<><C7A9><EFBFBD><EFBFBD>ʽΪ<CABD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:Ʊ<><C6B1>
|
|
|
|
|
//3.<2E><><EFBFBD>ų<EFBFBD><C5B3>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƵĿͻ<C4BF>
|
|
|
|
|
str:=str+ ' and t_op_seae.ί<>е<EFBFBD>λ not in ('
|
|
|
|
|
+' select t.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> FROM t_crm_client t where (ISNULL(t.<2E>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 0) = 1) '
|
|
|
|
|
+')';
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and t_op_seae.ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo_wtdw_pj.DisplayValues[1]+'''';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if Edit1_ywbh_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+replaceSQuotes(Edit1_ywbh_pj.text)+'%'+'''';
|
|
|
|
|
if Edit2_wtbh_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+replaceSQuotes(Edit2_wtbh_pj.text)+'%'+'''';
|
|
|
|
|
if Edit3_ztdh_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+replaceSQuotes(Edit3_ztdh_pj.text)+'%'+'''';
|
|
|
|
|
if wdbdtmpckr1_kc_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wdbdtmpckr1_kc_pj.text+'''';
|
|
|
|
|
if wdbdtmpckr2_kc_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wdbdtmpckr2_kc_pj.text+'''';
|
|
|
|
|
|
|
|
|
|
if wdblkpcmb1_cm_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD> like '+''''+'%'+replaceSQuotes(wdblkpcmb1_cm_pj.text)+'%'+'''';
|
|
|
|
|
if Edit4_hc_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD> like '+''''+'%'+replaceSQuotes(Edit4_hc_pj.text)+'%'+'''';
|
|
|
|
|
if wdblkpcmb2_xhg_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_seae.ж<><D0B6><EFBFBD><EFBFBD> like '+''''+'%'+replaceSQuotes(wdblkpcmb2_xhg_pj.text)+'%'+'''';
|
|
|
|
|
|
|
|
|
|
// //if DBComboBoxEh1.text<>'' then
|
|
|
|
|
str:=str+' and ( t_op_state.ҵ<><D2B5>״̬ = ''<27>ᵥǩ<E1B5A5><C7A9>'')';
|
|
|
|
|
|
|
|
|
|
if wdbdtmpckr3_lr_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_state.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wdbdtmpckr3_lr_pj.text+'''';
|
|
|
|
|
if wdbdtmpckr4_lr_pj.text<>''then
|
|
|
|
|
str:=str+' and t_op_state.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wdbdtmpckr4_lr_pj.text+' 23:59:59''';
|
|
|
|
|
//
|
|
|
|
|
str:=str+' and '+ open_data('0001','t_op_seae.¼<><C2BC><EFBFBD><EFBFBD>',
|
|
|
|
|
't_op_seae.<2E><><EFBFBD><EFBFBD>Ա','t_op_seae.<2E>ͷ<EFBFBD>Ա','t_op_seae.<2E><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
str:=str+' and t_op_seae.ǩ<><C7A9><EFBFBD><EFBFBD>ʽ in (''<27><><EFBFBD><EFBFBD>'',''<27><><EFBFBD><EFBFBD>'',''<27><><EFBFBD><EFBFBD><EFBFBD>ᵥ'')'
|
|
|
|
|
+' and t_op_state.<2E><><EFBFBD><EFBFBD> not in ('
|
|
|
|
|
+'select <20><><EFBFBD><EFBFBD> from t_op_seae_sign_detail t left join t_op_seae_sign_main m on (m.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=t.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) where m.״̬<>''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' ' // where t.<2E>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>=1
|
|
|
|
|
+' union select <20><><EFBFBD><EFBFBD> from t_op_state t where t.ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>''' +#13#10 //<2F>ᵥǩ<E1B5A5><C7A9><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD>
|
|
|
|
|
+' union select t.<2E><><EFBFBD><EFBFBD> from t_op_seae_app t ' +#13#10 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5>ᵥ <20>ų<EFBFBD>
|
|
|
|
|
+'union select <20><><EFBFBD><EFBFBD> from t_op_seae t_yzb where ί<>е<EFBFBD>λ '
|
|
|
|
|
+ ' in (SELECT <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> FROM t_crm_client_sales WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IN (''Լ<><D4BC>ʱ<EFBFBD><CAB1>'', ''Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=cast(GETDATE()as date) '
|
|
|
|
|
+ ' union select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales_tmp t where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=cast(GETDATE()as date) ) '
|
|
|
|
|
+ ' and ǩ<><C7A9><EFBFBD><EFBFBD>ʽ=''<27><><EFBFBD><EFBFBD>''' //<2F>½<EFBFBD><C2BD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD>, <20><>ʱ<EFBFBD><CAB1><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD>½<EFBFBD><C2BD>ͻ<EFBFBD>(<28><>ʱ<EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD>)
|
|
|
|
|
+')';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with qry_op_seae_pj do
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
close;sql.clear;
|
|
|
|
|
sql.add('select distinct t_op_seae.ҵ<><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_state.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as [<5B>ᵥǩ<E1B5A5><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]');
|
|
|
|
|
sql.add(',t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E>ᵥǩ<E1B5A5><C7A9>״̬,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>,t_op_seae.ж<><D0B6><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);
|
|
|
|
|
open;First;
|
|
|
|
|
end;
|
|
|
|
|
if qry_op_seae_pj.IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ҵ<EFBFBD><D2B5>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn1_gennerateSign_pjClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str,bsno:widestring;
|
|
|
|
|
i:integer;
|
|
|
|
|
aQuery:TAdoQuery;
|
|
|
|
|
qdm_Query:TAdoQuery;
|
|
|
|
|
qdd_Query:TAdoQuery;
|
|
|
|
|
qdtbh:string;
|
|
|
|
|
strwtdw1,strwtdw2,zhtdh,ysstr,znjstr:string;
|
|
|
|
|
dbTime,nouseDate:TDateTime;
|
|
|
|
|
blNoQF:Boolean;
|
|
|
|
|
khlx:string;
|
|
|
|
|
bsnoes,mblnos:string; //ǩ<><C7A9><EFBFBD><EFBFBD> ѡ<>еı<D0B5><C4B1><EFBFBD>
|
|
|
|
|
strlszq:string;//<2F><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
|
|
|
|
bllszq:boolean;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
|
|
|
|
blnotifyOk,isznj:Boolean;//<2F>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ڵ<EFBFBD>Ʊ<EFBFBD><C6B1>:<3A>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"֪ͨ<CDA8>ŵ<EFBFBD>"
|
|
|
|
|
etddate:TDate;
|
|
|
|
|
ttlznj:Double;
|
|
|
|
|
begin
|
|
|
|
|
blNoQF:=True;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
ttlznj:=0;
|
|
|
|
|
|
|
|
|
|
if dxdbgrd1_S_pj.SelectedCount<1 then
|
|
|
|
|
Exit;
|
|
|
|
|
//nouseDate:=getNouseDate(t_op_seae_pj.FieldByName('ί<>е<EFBFBD>λ').AsString); //debug
|
|
|
|
|
//Ʊ<><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
nouseDate:=0;
|
|
|
|
|
bsnoes:='';
|
|
|
|
|
mblnos:='';
|
|
|
|
|
try
|
|
|
|
|
//begin check
|
|
|
|
|
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ϢΪ<CFA2><CEAA>
|
|
|
|
|
m_infomation:='';
|
|
|
|
|
//Ʊ<><C6B1><EFBFBD>ͻ<EFBFBD>ֻ<EFBFBD><D6BB>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>???????
|
|
|
|
|
|
|
|
|
|
for i:=0 to dxdbgrd1_S_pj.SelectedCount-1 do
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
qry_op_seae_pj.GoTobookmark(pointer(dxdbgrd1_S_pj.SelectedRows[i]));
|
|
|
|
|
if i=0 then
|
|
|
|
|
begin
|
|
|
|
|
strwtdw1 := qry_op_seae_pj.FieldByName('ί<>е<EFBFBD>λ').AsString;
|
|
|
|
|
strwtdw2:=strwtdw1;
|
|
|
|
|
bsnoes:=''''+ qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD>').AsString +'''';
|
|
|
|
|
mblnos:=qry_op_seae_pj.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
strwtdw2 := qry_op_seae_pj.FieldByName('ί<>е<EFBFBD>λ').AsString;
|
|
|
|
|
bsnoes:=bsnoes+','''+ qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD>').AsString +'''';
|
|
|
|
|
mblnos:=mblnos+','+qry_op_seae_pj.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
if strwtdw1<>strwtdw2 then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('ί<>е<EFBFBD>λ<EFBFBD><CEBB>Ψһ!');
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD> <20>ĵ<EFBFBD><C4B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>зŵ<D0B7>֪ͨ:<3A><><EFBFBD><EFBFBD><F2B2BBBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
//ÿһƱһ<C6B1><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ,<2C><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
khlx:= getzqlx(strwtdw1,false);
|
|
|
|
|
if(khlx='<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>')then
|
|
|
|
|
begin
|
|
|
|
|
strlszq:=gettmpzqdate(strwtdw1);
|
|
|
|
|
if( strlszq<>'') then
|
|
|
|
|
begin
|
|
|
|
|
khlx:='<27><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>';
|
|
|
|
|
// if Application.MessageBox(pchar(strwtdw1+' <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>û<EFBFBD>й<EFBFBD><D0B9><EFBFBD>:'+ strlszq +#13#10+'ȷʵҪ<CAB5><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>',MB_YESNO+mb_iconquestion)<> ID_YES then
|
|
|
|
|
// begin
|
|
|
|
|
// Exit;
|
|
|
|
|
//end;
|
|
|
|
|
bllszq:=True;
|
|
|
|
|
end;
|
|
|
|
|
blNoQF:=CheckBilldue_pj(bsnoes,strwtdw1,blnotifyOk ); //ֻ<><D6BB><EFBFBD>Dz<EFBFBD><C7B2>˳<EFBFBD>
|
|
|
|
|
if(blnotifyOk=False) then
|
|
|
|
|
BEGIN
|
|
|
|
|
Exit;//<2F>½<EFBFBD><C2BD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ڿͻ<DABF><CDBB><EFBFBD><EFBFBD>ᵥ <20><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4>"<22>ŵ<EFBFBD>֪ͨ"<22>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>
|
|
|
|
|
END;
|
|
|
|
|
end else begin
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
|
|
//һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ,<2C><>ΪÿһƱ<D2BB><C6B1><EFBFBD><EFBFBD><EFBFBD>Ѷ<EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
if(CheckBilldue2(bsnoes,strwtdw1 )=False) then
|
|
|
|
|
blNoQF:=false; //ֻ<><D6BB><EFBFBD>Dz<EFBFBD><C7B2>˳<EFBFBD>
|
|
|
|
|
except
|
|
|
|
|
on ex:Exception do
|
|
|
|
|
begin
|
|
|
|
|
errorlog(ex.Message) ;
|
|
|
|
|
ShowMessage('<27>ж<EFBFBD><D0B6>ᵥ״̬ʱ<CCAC><CAB1><EFBFBD><EFBFBD><EFBFBD>쳣:' + ex.message) ;
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
except
|
|
|
|
|
on ex:Exception do
|
|
|
|
|
begin
|
|
|
|
|
errorlog(ex.Message) ;
|
|
|
|
|
ShowMessage('<27>ж<EFBFBD><D0B6>ᵥ״̬ʱ<CCAC><CAB1><EFBFBD><EFBFBD><EFBFBD>쳣:' + ex.message) ;
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if(khlx='<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>')then
|
|
|
|
|
begin
|
|
|
|
|
{
|
|
|
|
|
isznj:=getpjzq(bsnoes,strwtdw1,ysstr,znjstr,ttlznj);
|
|
|
|
|
if (isznj) then begin
|
|
|
|
|
try
|
|
|
|
|
if not assigned(frm_op_znjpj) then
|
|
|
|
|
frm_op_znjpj:=tfrm_op_znjpj.Create (self);
|
|
|
|
|
frm_op_znjpj.lblcust.Caption:=strwtdw1;
|
|
|
|
|
frm_op_znjpj.lblmblno.Caption:=mblnos;
|
|
|
|
|
frm_op_znjpj.lbletd.Caption:=qry_op_seae_pj.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_op_znjpj.lbldate.Caption:=FormatDateTime('YYYY-MM-DD',Date);
|
|
|
|
|
frm_op_znjpj.lblmblno.Caption:=mblnos;
|
|
|
|
|
frm_op_znjpj.lblznj.Caption:=znjstr;
|
|
|
|
|
frm_op_znjpj.lblysstr.Caption:=ysstr;
|
|
|
|
|
if(if_open('450')) then frm_op_znjpj.bsSkinButton2.Visible:=true;
|
|
|
|
|
frm_op_znjpj.lblttlznj.Caption:=FloatToStr(ttlznj);
|
|
|
|
|
if (frm_op_znjpj.ShowModal<>mrAbort) then Exit;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(frm_op_znjpj);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end else begin
|
|
|
|
|
ShowMessage('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
//Ʊ<><C6B1><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>Ƿ<EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if(blNoQF=false) then
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(if_open('450')) then
|
|
|
|
|
begin
|
|
|
|
|
if Application.MessageBox(pchar('<27><>ǰҪ<C7B0><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>'+#13#10+ m_infomation +#13#10+'<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>?'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>'
|
|
|
|
|
,mb_yesno+mb_iconquestion)<>id_yes then
|
|
|
|
|
exit;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
Application.MessageBox(pchar('<27><>ǰҪ<C7B0><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>'+#13#10+ m_infomation +#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>!'+#13#10+'<27><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>ģʽ:'+#13#10+'1.<2E>Ƿ<EFBFBD><C7B7>п<EFBFBD><D0BF>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>'+#13#10+'2.<2E><><EFBFBD>˷ŵ<CBB7>'+#13#10+'3.<2E><><EFBFBD>˱<EFBFBD><CBB1>ŵ<EFBFBD>'+#13#10+'4.<2E><><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>'
|
|
|
|
|
,MB_ICONINFORMATION);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end else begin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
if(Application.MessageBox(pchar('<27><>ǰҪ<C7B0><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>'+#13#10+ m_infomation +#13#10+'<27>Ƿ<EFBFBD><C7B7><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>?'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>'
|
|
|
|
|
,MB_ICONQUESTION+MB_YESNO) <> ID_YES) then
|
|
|
|
|
Exit;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if(Application.MessageBox(pchar('<27>ÿͻ<C3BF>ĿǰǷ<C7B0><C7B7>,<2C><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>ȷ<EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>!!'+#13#10+'<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>?'+#13#10+'<27><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>ģʽ:'+#13#10+'1.<2E>Ƿ<EFBFBD><C7B7>п<EFBFBD><D0BF>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>'+#13#10+'2.<2E><><EFBFBD>˷ŵ<CBB7>'+#13#10+'3.<2E><><EFBFBD>˱<EFBFBD><CBB1>ŵ<EFBFBD>'+#13#10+'4.<2E><><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>'
|
|
|
|
|
,MB_ICONQUESTION+MB_YESNO) <> ID_YES) then
|
|
|
|
|
Exit;
|
|
|
|
|
}
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if (khlx='<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>') or (khlx='<27><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>') then begin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end else begin
|
|
|
|
|
{
|
|
|
|
|
isznj:=getyjzq(bsnoes,strwtdw1,ysstr,znjstr,ttlznj);
|
|
|
|
|
if (isznj) then begin
|
|
|
|
|
try
|
|
|
|
|
if not assigned(frm_op_znjyj) then
|
|
|
|
|
frm_op_znjyj:=tfrm_op_znjyj.Create (self);
|
|
|
|
|
frm_op_znjyj.lblcust.Caption:=strwtdw1;
|
|
|
|
|
frm_op_znjyj.lblmonth.Caption:=FormatDateTime('MM',qry_op_seae_pj.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime);
|
|
|
|
|
frm_op_znjyj.lblzq.Caption:=getzq(strwtdw1);
|
|
|
|
|
frm_op_znjyj.lbldate.Caption:=FormatDateTime('YYYY-MM-DD',Date);
|
|
|
|
|
frm_op_znjyj.lblznj.Caption:=znjstr;
|
|
|
|
|
frm_op_znjyj.lblys.Caption:=ysstr;
|
|
|
|
|
frm_op_znjyj.lblttlznj.Caption:=FloatToStr(ttlznj);
|
|
|
|
|
frm_op_znjyj.Memo1.Clear;
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('Ӧ<>շ<EFBFBD><D5B7><EFBFBD>:'+ysstr);
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('');
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('<27><><EFBFBD>ɽ<EFBFBD>:'+znjstr);
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('');
|
|
|
|
|
frm_op_znjyj.Memo1.Lines.Add('<27>ϼ<EFBFBD>:'+FloatToStr(ttlznj));
|
|
|
|
|
frm_op_znjyj.ShowModal;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(frm_op_znjyj);
|
|
|
|
|
end;
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
//Ʊ<><C6B1><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>Ƿ<EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if(blNoQF=false) then
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(if_open('450')) then
|
|
|
|
|
begin
|
|
|
|
|
if Application.MessageBox(pchar('<27><>ǰҪ<C7B0><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>'+#13#10+ m_infomation +#13#10+'<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>?'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>'
|
|
|
|
|
,mb_yesno+mb_iconquestion)<>id_yes then
|
|
|
|
|
exit;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
Application.MessageBox(pchar('<27><>ǰҪ<C7B0><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>'+#13#10+ m_infomation +#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>!'+#13#10+'<27><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>ģʽ:'+#13#10+'1.<2E>Ƿ<EFBFBD><C7B7>п<EFBFBD><D0BF>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>'+#13#10+'2.<2E><><EFBFBD>˷ŵ<CBB7>'+#13#10+'3.<2E><><EFBFBD>˱<EFBFBD><CBB1>ŵ<EFBFBD>'+#13#10+'4.<2E><><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>'
|
|
|
|
|
,MB_ICONINFORMATION);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end else begin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
else if(m_infomation<>'') then
|
|
|
|
|
begin
|
|
|
|
|
if(Application.MessageBox(pchar(m_infomation +#13#10+'<27>Ƿ<EFBFBD><C7B7><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>?'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>'
|
|
|
|
|
,MB_ICONQUESTION+MB_YESNO) <> ID_YES) then
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//end check
|
|
|
|
|
aQuery:=CreateAdoQuery();
|
|
|
|
|
qdm_Query:=CreateAdoQuery();
|
|
|
|
|
qdd_Query:=CreateAdoQuery();
|
|
|
|
|
|
|
|
|
|
str:= 'INSERT INTO t_sys_signid (mainorderno) VALUES (''222'');';
|
|
|
|
|
aQuery.SQL.Add(str) ;
|
|
|
|
|
aQuery.ExecSQL();
|
|
|
|
|
aQuery.sql.Clear();
|
|
|
|
|
str:= 'select MAX(signid) as qdtbh,GETDATE()as FDate from t_sys_signid; ';
|
|
|
|
|
aQuery.sql.add(str);
|
|
|
|
|
|
|
|
|
|
qdm_Query.SQL.Add('SELECT * FROM [t_op_seae_sign_main] where 1=2');
|
|
|
|
|
qdd_Query.SQL.Add('SELECT * FROM [t_op_seae_sign_detail] where 1=2');
|
|
|
|
|
|
|
|
|
|
aQuery.Open;
|
|
|
|
|
aQuery.First;
|
|
|
|
|
qdtbh:=aQuery.FieldByName('qdtbh').AsString;
|
|
|
|
|
dbTime:=aQuery.FieldByName('FDate').AsDateTime;
|
|
|
|
|
aQuery.sql.Clear();
|
|
|
|
|
aQuery.sql.Add('SELECT * FROM [t_op_state] WHERE 1=2');
|
|
|
|
|
aQuery.OPEN;
|
|
|
|
|
qdm_Query.Open;
|
|
|
|
|
qdd_Query.Open;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
frm_main.db.BeginTrans;
|
|
|
|
|
|
|
|
|
|
for i:=0 to dxdbgrd1_S_pj.SelectedCount-1 do
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
qry_op_seae_pj.GoTobookmark(pointer(dxdbgrd1_S_pj.SelectedRows[i]));
|
|
|
|
|
if i=0 then
|
|
|
|
|
begin
|
|
|
|
|
with qdm_Query do
|
|
|
|
|
begin
|
|
|
|
|
Insert;
|
|
|
|
|
FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=qdtbh;
|
|
|
|
|
FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:= strwtdw1;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:= employee;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD>˵绰').AsString:=employeePhone;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:= dbTime;
|
|
|
|
|
FieldByname('<27><><EFBFBD><EFBFBD>').AsString:=getzq(strwtdw1);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> , Ʊ<><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//nouseDate:=getNouseDate(strwtdw1);
|
|
|
|
|
//if(nouseDate>0) then
|
|
|
|
|
// FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:= nouseDate;
|
|
|
|
|
FieldByname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=getzqlx(strwtdw1);
|
|
|
|
|
FieldByName('״̬').AsString:= stateNewQD;
|
|
|
|
|
FieldByName('<27>Ƿ<EFBFBD><C7B7>ط<EFBFBD>').AsVariant:= 0;
|
|
|
|
|
//2017-08-02 <20><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if (FieldByname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString='<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>') then begin
|
|
|
|
|
FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:= 'Ʊ<><C6B1>';
|
|
|
|
|
|
|
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date+strtoint(pjday);
|
|
|
|
|
end else begin
|
|
|
|
|
nouseDate:=getNouseDate(strwtdw1);
|
|
|
|
|
if(nouseDate>0) then
|
|
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:= nouseDate
|
|
|
|
|
else FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date+3;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
etddate:=qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime;
|
|
|
|
|
|
|
|
|
|
end ;
|
|
|
|
|
|
|
|
|
|
qdd_Query.Insert;
|
|
|
|
|
qdd_Query.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:= qdtbh;
|
|
|
|
|
qdd_Query.FieldByName('<27><><EFBFBD><EFBFBD>').AsString := qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
zhtdh:= qry_op_seae_pj.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
|
|
qdd_Query.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:= zhtdh;
|
|
|
|
|
qdd_Query.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:= qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
qdd_Query.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:= qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
qdd_Query.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').AsString:= qry_op_seae_pj.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
|
|
qdd_Query.FieldByName('״̬').AsString:= stateNewQD;
|
|
|
|
|
qdd_Query.FieldByName('<27>ᵥǩ<E1B5A5><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:= qry_op_seae_pj.FieldByName('<27>ᵥǩ<E1B5A5><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime;
|
|
|
|
|
if (qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime>etddate) then etddate:=qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime;
|
|
|
|
|
|
|
|
|
|
with aQuery do
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
Insert;
|
|
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:= qry_op_seae_pj.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
FieldByName('ҵ<><D2B5>״̬').AsString:= stateNewQD;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:= employee;
|
|
|
|
|
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:= dbTime;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if( blNoQF=False) then
|
|
|
|
|
begin
|
|
|
|
|
//Ƿ<>ѷ<EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
qdm_Query.FieldByName('״̬').AsString:='֪ͨǩ<D6AA><C7A9>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>';
|
|
|
|
|
qdm_Query.FieldByName('֪ͨǩ<D6AA><C7A9>ʱ<EFBFBD><CAB1>').AsDateTime:=dbTime;
|
|
|
|
|
end;
|
|
|
|
|
if (qdm_Query.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString= 'Ʊ<><C6B1>') then
|
|
|
|
|
qdm_Query.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=etddate+strtoint(pjday);
|
|
|
|
|
if(if_open('450')) then
|
|
|
|
|
begin
|
|
|
|
|
if (etddate+strtoint(pjday)<date) then
|
|
|
|
|
qdm_Query.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date;
|
|
|
|
|
end;
|
|
|
|
|
if (qdm_Query.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime<date) then qdm_Query.FieldByName('״̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
|
|
|
|
|
qdm_Query.post;
|
|
|
|
|
qdd_Query.post;
|
|
|
|
|
aQuery.post;
|
|
|
|
|
|
|
|
|
|
frm_main.db.CommitTrans;
|
|
|
|
|
show_qdtxx(qdtbh,0);
|
|
|
|
|
aQuery.close();
|
|
|
|
|
qdm_Query.close();
|
|
|
|
|
qdd_Query.close();
|
|
|
|
|
qry_op_seae_pj.Requery();
|
|
|
|
|
|
|
|
|
|
except
|
|
|
|
|
on ex: Exception do
|
|
|
|
|
begin
|
|
|
|
|
errorlog(ex.Message) ;
|
|
|
|
|
ShowMessage(ex.Message);
|
|
|
|
|
aQuery.Cancel;
|
|
|
|
|
qdm_Query.Cancel;
|
|
|
|
|
qdd_Query.Cancel;
|
|
|
|
|
frm_main.db.rollbacktrans;
|
|
|
|
|
end
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
except
|
|
|
|
|
on ex: Exception do
|
|
|
|
|
begin
|
|
|
|
|
errorlog(ex.Message) ;
|
|
|
|
|
ShowMessage(ex.Message);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn3_clearConditon_pjClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
Edit1_ywbh_pj.text:='';
|
|
|
|
|
Edit2_wtbh_pj.text:='';
|
|
|
|
|
Edit3_ztdh_pj.text:='';
|
|
|
|
|
wdbdtmpckr1_kc_pj.text:='';
|
|
|
|
|
wdbdtmpckr2_kc_pj.text:='';
|
|
|
|
|
wdbdtmpckr3_lr_pj.text:='';
|
|
|
|
|
wdbdtmpckr4_lr_pj.text:='';
|
|
|
|
|
wdblkpcmb2_xhg_pj.text:='';
|
|
|
|
|
wdbdtmpckr3_lr_pj.text:='';
|
|
|
|
|
wdbdtmpckr4_lr_pj.text:='';
|
|
|
|
|
end;
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn3_clearConditon_logClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
Edit41_qdtbh.text:='';
|
|
|
|
|
Edit42_zhtdh.text:='';
|
|
|
|
|
wdbdtmpckr41_start.text:='';
|
|
|
|
|
wdbdtmpckr42_end.text:='';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.btn41_search_logClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//
|
|
|
|
|
searchCancelLog();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.searchCancelLog();
|
|
|
|
|
var
|
|
|
|
|
str:string;
|
|
|
|
|
begin
|
|
|
|
|
str:=' where 1=1 ';
|
|
|
|
|
if Edit41_qdtbh.text<>''then
|
|
|
|
|
str:=str+' and ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+replaceSQuotes(Edit41_qdtbh.text)+'%'+'''';
|
|
|
|
|
if Edit42_zhtdh.text<>''then
|
|
|
|
|
str:=str+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+replaceSQuotes(Edit42_zhtdh.text)+'%'+'''';
|
|
|
|
|
if wdbdtmpckr41_start.text<>''then
|
|
|
|
|
str:=str+' and ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wdbdtmpckr41_start.text+'''';
|
|
|
|
|
if wdbdtmpckr42_end.text<>''then
|
|
|
|
|
str:=str+' and ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wdbdtmpckr42_end.text+' 23:59:59''';
|
|
|
|
|
str:=' select * from t_op_seae_sign_cancel_log ' +str;
|
|
|
|
|
with qry41_cancellog do
|
|
|
|
|
begin
|
|
|
|
|
Close;
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
SQL.Add(str);
|
|
|
|
|
Open;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_sign.Edit41_qdtbhKeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
// <20>س<EFBFBD><D8B3>Զ<EFBFBD><D4B6><EFBFBD>ѯ
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
searchCancelLog();
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end.
|
|
|
|
|
|