|
|
unit u_op_seae_order_wf;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
|
|
|
dxDBCtrl, dxDBGrid, ComCtrls, bsSkinTabs, RxLookup, StdCtrls, Mask,
|
|
|
DBCtrls, wwdbdatetimepicker, wwdblook, Menus,
|
|
|
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu, Grids, Wwdbigrd, Wwdbgrid,
|
|
|
wwdbedit, Wwdotdot, Wwdbcomb;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_seae_order_wf = class(TForm)
|
|
|
Panel2: TPanel;
|
|
|
t_op_seae1: TDataSource;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
N37: TMenuItem;
|
|
|
N38: TMenuItem;
|
|
|
N62: TMenuItem;
|
|
|
N25: TMenuItem;
|
|
|
N64: TMenuItem;
|
|
|
N63: TMenuItem;
|
|
|
N17: TMenuItem;
|
|
|
N18: TMenuItem;
|
|
|
N34: TMenuItem;
|
|
|
N35: TMenuItem;
|
|
|
N36: TMenuItem;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
t_op_seae_order1: TDataSource;
|
|
|
t_op_seae_order: TADOQuery;
|
|
|
t_ch_fee1: TDataSource;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column114: TdxDBGridColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
Label6: TLabel;
|
|
|
Label39: TLabel;
|
|
|
Label14: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label10: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Label7: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
wwDBComboBox44: TwwDBComboBox;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker5: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker6: TwwDBDateTimePicker;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton15: TbsSkinButton;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
Label19: TLabel;
|
|
|
Label4: TLabel;
|
|
|
Label2: TLabel;
|
|
|
RxDBLookupCombo12: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
DBEdit2: TDBEdit;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton38: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
bsSkinPageControl2: TbsSkinPageControl;
|
|
|
tab1: TbsSkinTabSheet;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label8: TLabel;
|
|
|
Label12: TLabel;
|
|
|
Label20: TLabel;
|
|
|
Label11: TLabel;
|
|
|
Label1: TLabel;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
DBMemo1: TDBMemo;
|
|
|
wwDBDateTimePicker7: TwwDBDateTimePicker;
|
|
|
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
|
|
|
RxDBLookupCombo8: TRxDBLookupCombo;
|
|
|
DBEdit1: TDBEdit;
|
|
|
bsSkinGroupBox3: TbsSkinGroupBox;
|
|
|
Label16: TLabel;
|
|
|
Label17: TLabel;
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
DBEdit3: TDBEdit;
|
|
|
Label122: TLabel;
|
|
|
Label121: TLabel;
|
|
|
Label123: TLabel;
|
|
|
Label21: TLabel;
|
|
|
Label163: TLabel;
|
|
|
Label165: TLabel;
|
|
|
Label166: TLabel;
|
|
|
Label167: TLabel;
|
|
|
Label169: TLabel;
|
|
|
Label170: TLabel;
|
|
|
Label32: TLabel;
|
|
|
Label27: TLabel;
|
|
|
Label30: TLabel;
|
|
|
DBMemo33: TDBMemo;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo6: TwwDBLookupCombo;
|
|
|
RxDBLookupCombo5: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo7: TwwDBLookupCombo;
|
|
|
DBMemo34: TDBMemo;
|
|
|
DBMemo35: TDBMemo;
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo8: TwwDBLookupCombo;
|
|
|
DBMemo39: TDBMemo;
|
|
|
DBMemo38: TDBMemo;
|
|
|
DBMemo40: TDBMemo;
|
|
|
DBMemo41: TDBMemo;
|
|
|
DBMemo42: TDBMemo;
|
|
|
wwDBLookupCombo61: TwwDBLookupCombo;
|
|
|
DBEdit81: TDBEdit;
|
|
|
DBEdit82: TDBEdit;
|
|
|
DBEdit83: TDBEdit;
|
|
|
wwDBLookupCombo21: TwwDBLookupCombo;
|
|
|
DBEdit25: TDBEdit;
|
|
|
RxDBLookupCombo15: TRxDBLookupCombo;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridColumn;
|
|
|
lblsales: TLabel;
|
|
|
Label23: TLabel;
|
|
|
DBEdit4: TDBEdit;
|
|
|
Label26: TLabel;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
dxDBGrid1Column14: TdxDBGridColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridColumn;
|
|
|
Label25: TLabel;
|
|
|
RxDBLookupCombo7: TRxDBLookupCombo;
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
Label29: TLabel;
|
|
|
wwDBComboBox5: TwwDBComboBox;
|
|
|
dxDBGrid1Column18: TdxDBGridColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridColumn;
|
|
|
dxDBGrid1Column21: TdxDBGridColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridColumn;
|
|
|
dxDBGrid1Column27: TdxDBGridColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridColumn;
|
|
|
dxDBGrid1Column29: TdxDBGridColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridColumn;
|
|
|
Label33: TLabel;
|
|
|
RxDBLookupCombo9: TRxDBLookupCombo;
|
|
|
Label119: TLabel;
|
|
|
wwDBComboBox8: TwwDBComboBox;
|
|
|
Label109: TLabel;
|
|
|
DBEdit37: TDBEdit;
|
|
|
Label108: TLabel;
|
|
|
DBEdit38: TDBEdit;
|
|
|
dxDBGrid1Column31: TdxDBGridColumn;
|
|
|
dxDBGrid1Column32: TdxDBGridColumn;
|
|
|
dxDBGrid1Column33: TdxDBGridColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridColumn;
|
|
|
Label31: TLabel;
|
|
|
DBMemo3: TDBMemo;
|
|
|
t_op_seae_query: TADOQuery;
|
|
|
dxDBGrid1Column35: TdxDBGridColumn;
|
|
|
Label18: TLabel;
|
|
|
Label36: TLabel;
|
|
|
RxDBLookupCombo11: TRxDBLookupCombo;
|
|
|
t_ch_accept1: TDataSource;
|
|
|
t_ch_accept: TADOQuery;
|
|
|
t_ch_pay: TADOQuery;
|
|
|
t_ch_pay1: TDataSource;
|
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
|
wwDBGrid1: TwwDBGrid;
|
|
|
bsSkinGroupBox4: TbsSkinGroupBox;
|
|
|
wwDBGrid2: TwwDBGrid;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
Label15: TLabel;
|
|
|
Label13: TLabel;
|
|
|
Label35: TLabel;
|
|
|
Label22: TLabel;
|
|
|
Label124: TLabel;
|
|
|
Label28: TLabel;
|
|
|
Label34: TLabel;
|
|
|
Label51: TLabel;
|
|
|
Label52: TLabel;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
DBEdit5: TDBEdit;
|
|
|
RxDBLookupCombo28: TRxDBLookupCombo;
|
|
|
bsSkinGroupBox5: TbsSkinGroupBox;
|
|
|
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox9: TbsSkinDBCheckRadioBox;
|
|
|
wwDBLookupCombo9: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo10: TwwDBLookupCombo;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit14: TDBEdit;
|
|
|
DBEdit15: TDBEdit;
|
|
|
Label37: TLabel;
|
|
|
RxDBLookupCombo13: TRxDBLookupCombo;
|
|
|
DBEdit7: TDBEdit;
|
|
|
Label40: TLabel;
|
|
|
Label41: TLabel;
|
|
|
Label42: TLabel;
|
|
|
Label73: TLabel;
|
|
|
RxDBLookupCombo14: TRxDBLookupCombo;
|
|
|
DBEdit9: TDBEdit;
|
|
|
RxDBLookupCombo16: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo20: TRxDBLookupCombo;
|
|
|
Label38: TLabel;
|
|
|
Label43: TLabel;
|
|
|
DBEdit10: TDBEdit;
|
|
|
dxDBGrid1Column36: TdxDBGridColumn;
|
|
|
Label44: TLabel;
|
|
|
wwDBComboBox3: TwwDBComboBox;
|
|
|
t_op_seae: TADOQuery;
|
|
|
t_op_ctn1: TDataSource;
|
|
|
t_op_ctn: TADOQuery;
|
|
|
t_op_fee: TADOQuery;
|
|
|
Label24: TLabel;
|
|
|
DBEdit6: TDBEdit;
|
|
|
Label45: TLabel;
|
|
|
RxDBLookupCombo17: TRxDBLookupCombo;
|
|
|
Label46: TLabel;
|
|
|
RxDBLookupCombo18: TRxDBLookupCombo;
|
|
|
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
|
|
|
Label47: TLabel;
|
|
|
wwDBComboBox4: TwwDBComboBox;
|
|
|
dxDBGrid1Column37: TdxDBGridColumn;
|
|
|
DBEdit11: TDBEdit;
|
|
|
Label48: TLabel;
|
|
|
RxDBLookupCombo10: TRxDBLookupCombo;
|
|
|
Label49: TLabel;
|
|
|
RxDBLookupCombo19: TRxDBLookupCombo;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure Panel2Resize(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton38Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure RxDBLookupCombo20KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure t_op_ctnAfterPost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure dxDBGrid1Column9CustomDraw(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 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 bsSkinPageControl2Change(Sender: TObject);
|
|
|
procedure Button1Click(Sender: TObject);
|
|
|
procedure dxDBGrid1Column36CustomDraw(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 dxDBGrid1Column37CustomDraw(Sender: TObject;
|
|
|
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
|
|
|
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
|
|
|
var AColor: TColor; ASelected, AFocused: Boolean;
|
|
|
var ADone: Boolean);
|
|
|
private
|
|
|
procedure t_billsalescharge(Sender: TField);
|
|
|
procedure OpFeeItem(bsNo:string);
|
|
|
procedure getsumstr;
|
|
|
|
|
|
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seae_order_wf: Tfrm_op_seae_order_wf;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main,u_data_share, my_sys_function, u_sys_progress,
|
|
|
u_op_seae_oder_add, my_sys_chat, u_op_seae_oder_wf_add;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.OpFeeItem(bsno:string);
|
|
|
begin
|
|
|
if if_open('293') then
|
|
|
begin
|
|
|
if (strtobool(get_parameters_value(153,'false'))=true) then begin
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
begin
|
|
|
t_ch_accept.close;
|
|
|
t_ch_accept.SQL.Clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+' order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_accept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_accept.open;
|
|
|
end else begin
|
|
|
t_ch_accept.close;
|
|
|
t_ch_accept.SQL.Clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and '
|
|
|
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+' order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_accept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_accept.open;
|
|
|
end;
|
|
|
end else begin
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
begin
|
|
|
t_ch_accept.close;
|
|
|
t_ch_accept.SQL.Clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
|
|
|
t_ch_accept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
// t_ch_accept.open;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if if_open('294') then
|
|
|
begin
|
|
|
if (strtobool(get_parameters_value(153,'false'))=true) then
|
|
|
begin
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
begin
|
|
|
t_ch_pay.close;
|
|
|
t_ch_pay.SQL.Clear;
|
|
|
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+' order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_pay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_pay.open;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_pay.close;
|
|
|
t_ch_pay.SQL.Clear;
|
|
|
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and '
|
|
|
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+' order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_pay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_pay.open;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
begin
|
|
|
t_ch_pay.close;
|
|
|
t_ch_pay.SQL.Clear;
|
|
|
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_pay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_pay.open;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_op_seae_order_wf.Hide;
|
|
|
frm_op_seae_order_wf.ManualFloat(frm_op_seae_order_wf.BoundsRect );
|
|
|
frm_main.freeTabs('frm_op_seae_order_wf');
|
|
|
action:=cafree;
|
|
|
frm_op_seae_order_wf:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.Panel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(Panel2.Width/11);
|
|
|
bsSkinButton7.Width:=i;
|
|
|
bsSkinButton6.Width:=i;
|
|
|
bsSkinButton9.Width:=i;
|
|
|
bsSkinButton3.Width:=i;
|
|
|
bsSkinButton38.Width:=i;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_Prior(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
table_next(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڶ<EFBFBD><DAB6>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>',2,t_op_seae1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
str:string;
|
|
|
aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
if (t_op_seae_order['״̬']='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>') then begin
|
|
|
MessageDlg('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ܶ<EFBFBD><DCB6>ղ<EFBFBD><D5B2>ܲ<EFBFBD><DCB2>أ<EFBFBD>', mtConfirmation, [mbYes],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
str:=trim(InputBox('<27><><EFBFBD><EFBFBD><EFBFBD>벵<EFBFBD><EBB2B5>ԭ<EFBFBD><D4AD>', '<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>', ''));
|
|
|
if str=''then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
exit;
|
|
|
end
|
|
|
else if str=''then
|
|
|
begin
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
frm_main.db.BeginTrans;
|
|
|
t_op_seae_order.Edit;
|
|
|
t_op_seae_order['״̬']:='<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=str;
|
|
|
t_op_seae_order.Post;
|
|
|
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('delete from t_workflow_do ');
|
|
|
sql.Add('where or_id=:or_id');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').value;
|
|
|
ExecSQL;
|
|
|
frm_main.db.CommitTrans;
|
|
|
finally
|
|
|
if frm_main.db.InTransaction then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
frm_main.db.RollbackTrans;
|
|
|
|
|
|
end;
|
|
|
t_op_seae_order.Refresh;
|
|
|
free;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
SendMsg_gonggao('161','<27><><EFBFBD>ղ<EFBFBD><D5B2><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+','+t_op_seae_order.FieldByName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString);
|
|
|
Send_op_do('<27><><EFBFBD>۶<EFBFBD><DBB6>ղ<EFBFBD><D5B2><EFBFBD>:ί<>б<EFBFBD><D0B1><EFBFBD>:'+t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString,'72',
|
|
|
'','',t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinButton38Click(Sender: TObject);
|
|
|
var
|
|
|
book1:Tbookmark;
|
|
|
begin
|
|
|
book1:=t_op_seae_order.GetBookmark;
|
|
|
t_op_seae_order.Requery;
|
|
|
t_op_seae_order.GotoBookmark(book1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(self);
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<C8BA><F2A1A3A1><EFBFBD>';
|
|
|
frm_sys_progress.Show;
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=28;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
frm_sys_progress.Update;
|
|
|
bsSkinPageControl1.ActivePageIndex:=0;
|
|
|
t_op_seae_order.Close;
|
|
|
t_op_seae_order.SQL.clear;
|
|
|
t_op_seae_order.SQL.Add('select t_workflow_do.ID,t_workflow_do.WI_ID,t_workflow_do.W_ID,t_workflow_do.˳<><CBB3>,t_workflow_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_workflow_do.<2E><>ǰ״̬,t_workflow_do.<2E>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>,t_workflow_do.OR_ID,t_op_seae_order.* from t_workflow_do '
|
|
|
+' left join t_op_seae_order on t_workflow_do.or_id=t_op_seae_order.or_id '
|
|
|
+' where t_workflow_do.<2E><>ǰ״̬=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and '
|
|
|
+open_data('0021','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no')
|
|
|
|
|
|
+' and t_workflow_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+employee+''''
|
|
|
+' order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_op_seae_order.open;
|
|
|
|
|
|
t_ch_accept.Close;
|
|
|
t_ch_accept.Open;
|
|
|
|
|
|
|
|
|
t_ch_pay.Close;
|
|
|
t_ch_pay.Open;
|
|
|
|
|
|
t_billsalescharge(nil);
|
|
|
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.close;
|
|
|
frm_sys_progress:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str:string;
|
|
|
begin
|
|
|
str:=' and '+open_data('0021','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no'); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if Edit1.text<>''then
|
|
|
str:=str+' and t_op_seae_order.<2E><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
|
|
|
if wwDBComboBox44.text<>''then
|
|
|
str:=str+' and t_op_seae_order.״̬='+''''+wwDBComboBox44.text+'''';
|
|
|
if RxDBLookupCombo2.DisplayValues[1]<>''then
|
|
|
str:=str+' and t_op_seae_order.ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
|
|
|
if RxDBLookupCombo3.DisplayValues[1]<>''then
|
|
|
str:=str+' and t_op_seae_order.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValues[1]+'''';
|
|
|
|
|
|
if RxDBLookupCombo11.DisplayValues[1]<>''then
|
|
|
str:=str+' and t_op_seae_order.<2E>˷<EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo11.DisplayValues[1]+'''';
|
|
|
|
|
|
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
str:=str+' and t_op_seae_order.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
if wwDBDateTimePicker3.text<>''then
|
|
|
str:=str+' and t_op_seae_order.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker3.text+'''';
|
|
|
if wwDBDateTimePicker5.text<>''then
|
|
|
str:=str+' and t_op_seae_order.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.text+'''';
|
|
|
if wwDBDateTimePicker6.text<>''then
|
|
|
str:=str+' and t_op_seae_order.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.text+'''';
|
|
|
|
|
|
t_op_seae_order.Close;
|
|
|
t_op_seae_order.SQL.clear;
|
|
|
t_op_seae_order.SQL.clear;
|
|
|
t_op_seae_order.SQL.Add('select t_workflow_do.ID,t_workflow_do.WI_ID,t_workflow_do.W_ID,t_workflow_do.˳<><CBB3>,t_workflow_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_workflow_do.<2E><>ǰ״̬ ,t_workflow_do.<2E>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>,t_workflow_do.OR_ID,t_op_seae_order.* from t_workflow_do '
|
|
|
+' left join t_op_seae_order on t_workflow_do.or_id=t_op_seae_order.or_id '
|
|
|
+' where 1=1 '
|
|
|
+' and t_workflow_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+employee+''''
|
|
|
+str
|
|
|
+' order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
t_op_seae_order.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,101);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.RxDBLookupCombo20KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
// key_wwDBLookupCombo(Key,wwDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.t_op_ctnAfterPost(DataSet: TDataSet);
|
|
|
begin
|
|
|
// update_ctn(t_op_ctn);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinButton15Click(Sender: TObject);
|
|
|
begin
|
|
|
Edit1.text:='';
|
|
|
wwDBComboBox44.text:='';
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
RxDBLookupCombo3.ClearValue;
|
|
|
wwDBDateTimePicker1.text:='';
|
|
|
wwDBDateTimePicker3.text:='';
|
|
|
wwDBDateTimePicker5.text:='';
|
|
|
wwDBDateTimePicker6.text:='';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.dxDBGrid1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinButton2Click(Sender: TObject);
|
|
|
var shenhe:string;
|
|
|
aAdoQuery,aadoQueryInsert:TAdoQuery;
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
if (t_op_seae_order.State=dsinsert)or(t_op_seae_order.State=dsedit) then
|
|
|
t_op_seae_order.post;
|
|
|
|
|
|
if (t_op_seae_order['<27><>ǰ״̬']<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then begin
|
|
|
MessageDlg('<27><>ǰ״̬<D7B4><CCAC>:'+t_op_seae_order.fieldByName('<27><>ǰ״̬').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>', mtConfirmation, [mbYes],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
aadoQueryInsert:=CreateAdoQuery;
|
|
|
with aadoQueryInsert do
|
|
|
begin
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Insert into t_workflow_do ( W_ID ,WI_ID ,OR_ID ,<2C>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB> ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ,<2C><>ǰ״̬ ,˳<><CBB3>)');
|
|
|
sql.Add('values (:W_ID,:WI_ID,:OR_ID,:<3A>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:<3A><>ǰ״̬,:˳<><CBB3>)');
|
|
|
end;
|
|
|
|
|
|
|
|
|
if t_op_seae_order.fieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>').AsBoolean then
|
|
|
begin
|
|
|
|
|
|
if IsSeaeOrder(t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
begin
|
|
|
MessageDlg('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>,<2C><>ˢ<EFBFBD>£<EFBFBD>', mtConfirmation, [mbYes],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
frm_main.db.BeginTrans;
|
|
|
|
|
|
|
|
|
frm_op_seae_order_wf_add:=tfrm_op_seae_order_wf_add.Create (self);
|
|
|
frm_op_seae_order_wf_add.data1.Enabled:=false;
|
|
|
frm_op_seae_order_wf_add.data1.DataSet:=t_op_seae;
|
|
|
frm_op_seae_order_wf_add.data1.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_wf_add.data2.Enabled:=false;
|
|
|
frm_op_seae_order_wf_add.data2.DataSet:=t_op_seae_order;
|
|
|
frm_op_seae_order_wf_add.data2.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_wf_add.data3.Enabled:=false;
|
|
|
frm_op_seae_order_wf_add.data3.DataSet:=t_op_ctn;
|
|
|
frm_op_seae_order_wf_add.data3.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_wf_add.data4.Enabled:=false;
|
|
|
frm_op_seae_order_wf_add.data4.DataSet:=t_op_fee;
|
|
|
frm_op_seae_order_wf_add.data4.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_wf_add.data5.Enabled:=false;
|
|
|
frm_op_seae_order_wf_add.data5.DataSet:=t_ch_accept;
|
|
|
frm_op_seae_order_wf_add.data5.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_wf_add.data6.Enabled:=false;
|
|
|
frm_op_seae_order_wf_add.data6.DataSet:=t_ch_pay;
|
|
|
frm_op_seae_order_wf_add.data6.Enabled:=true;
|
|
|
frm_op_seae_order_wf_add.ShowModal;
|
|
|
frm_main.db.CommitTrans;
|
|
|
finally
|
|
|
frm_op_seae_order_wf_add.Free;
|
|
|
frm_op_seae_order_wf_add:=nil;
|
|
|
if frm_main.db.InTransaction then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
frm_main.db.RollbackTrans;
|
|
|
end;
|
|
|
t_op_seae_order.Refresh;
|
|
|
free;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
frm_main.db.BeginTrans;
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Update t_workflow_do set <20><>ǰ״̬=''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add('where or_id=:or_id and W_ID=:W_ID and WI_ID=:WI_ID and ˳<><CBB3>=:˳<><CBB3>');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').value;
|
|
|
Parameters.ParamByName('W_ID').Value:=t_op_seae_order.fieldbyname('W_ID').value;
|
|
|
Parameters.ParamByName('WI_ID').Value:=t_op_seae_order.fieldbyname('WI_ID').value;
|
|
|
Parameters.ParamByName('˳<><CBB3>').Value:=t_op_seae_order.fieldbyname('˳<><CBB3>').value;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=now;
|
|
|
ExecSQL;
|
|
|
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select t_workflow_step.WI_ID,t_workflow_step.W_ID,t_workflow_step.˳<><CBB3>,t_workflow_step.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_workflow_step.<2E>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>,t_workflow_step_emp.<2E><><EFBFBD><EFBFBD>');
|
|
|
sql.Add('from t_workflow_step');
|
|
|
sql.Add('left join t_workflow_step_emp on t_workflow_step.WI_ID=t_workflow_step_emp.WI_ID');
|
|
|
sql.Add('where t_workflow_step.W_ID=:W_ID and ˳<><CBB3>=:˳<><CBB3>');
|
|
|
Parameters.ParamByName('W_ID').Value:=t_op_seae_order.fieldbyname('W_ID').value;
|
|
|
Parameters.ParamByName('˳<><CBB3>').Value:=t_op_seae_order.fieldbyname('˳<><CBB3>').value+1;
|
|
|
Open;First;
|
|
|
while not Eof do
|
|
|
begin
|
|
|
aadoQueryInsert.Close;
|
|
|
aadoQueryInsert.Parameters.ParamByName('W_ID').Value:=fieldbyname('W_ID').value;
|
|
|
aadoQueryInsert.Parameters.ParamByName('WI_ID').Value:=fieldbyname('WI_ID').value;
|
|
|
aadoQueryInsert.Parameters.ParamByName('OR_ID').Value:=t_op_seae_order.fieldbyname('OR_ID').value;
|
|
|
aadoQueryInsert.Parameters.ParamByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>').Value:=fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>').value;
|
|
|
aadoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=fieldbyname('<27><><EFBFBD><EFBFBD>').value;
|
|
|
aadoQueryInsert.Parameters.ParamByName('<27><>ǰ״̬').Value:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
aadoQueryInsert.Parameters.ParamByName('˳<><CBB3>').Value:=fieldbyname('˳<><CBB3>').value;
|
|
|
aadoQueryInsert.ExecSQL;
|
|
|
Next;
|
|
|
end;
|
|
|
frm_main.db.CommitTrans;
|
|
|
finally
|
|
|
if frm_main.db.InTransaction then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
frm_main.db.RollbackTrans;
|
|
|
end;
|
|
|
t_op_seae_order.Refresh;
|
|
|
free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
procedure Tfrm_op_seae_order_wf.t_billsalescharge(Sender: TField);
|
|
|
begin
|
|
|
lblsales.Caption:='';
|
|
|
if (t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'') and (t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'') then
|
|
|
if t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString then begin
|
|
|
lblsales.Caption:='ע<>⣺<EFBFBD><E2A3BA>ί<EFBFBD>е<EFBFBD>λ<EFBFBD><CEBB>Ĭ<EFBFBD><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ'+t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.dxDBGrid1Column9CustomDraw(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[dxDBGrid1Column9.Index]='<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>' then
|
|
|
AColor:=clRed;
|
|
|
if ANode.Strings[dxDBGrid1Column9.Index]='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
|
|
|
AColor:=clYellow;
|
|
|
if ANode.Strings[dxDBGrid1Column9.Index]='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>' then
|
|
|
AColor:=clGreen;
|
|
|
AFont.Color:=clblack;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.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);
|
|
|
begin
|
|
|
if trim(ANode.Strings[dxDBGrid1Column9.Index])='<27><><EFBFBD>˲<EFBFBD>' then begin
|
|
|
AFont.Style:=AFont.Style+[fsStrikeOut];
|
|
|
AFont.Color:=clred;
|
|
|
end;
|
|
|
if trim(ANode.Strings[dxDBGrid1Column9.Index])='<27><><EFBFBD>ƺ<EFBFBD><C6BA><EFBFBD>' then begin
|
|
|
// AFont.Style:=AFont.Style+[fsStrikeOut];
|
|
|
AColor:=clFuchsia;
|
|
|
end;
|
|
|
if trim(ANode.Strings[dxDBGrid1Column9.Index])='<27>Ѹĸ<D1B8>' then begin
|
|
|
// AFont.Style:=AFont.Style+[fsStrikeOut];
|
|
|
AColor:=clYellow;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.getsumstr;
|
|
|
begin
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.bsSkinPageControl2Change(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinPageControl2.TabIndex=2 then
|
|
|
begin
|
|
|
if t_op_seae_order.IsEmpty then exit;
|
|
|
t_op_seae_query.Close;
|
|
|
t_op_seae_query.Parameters.ParamByName('ί<>б<EFBFBD><D0B1><EFBFBD>').Value:=t_op_seae_order.fieldbyName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString;
|
|
|
t_op_seae_query.Open;
|
|
|
if Trim(t_op_seae_query.fieldbyName('<27><><EFBFBD><EFBFBD>').AsString)<>'' then
|
|
|
OpFeeItem(t_op_seae_query.fieldbyName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
getsumstr;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
procedure Tfrm_op_seae_order_wf.Button1Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery1,aQuery2:TAdoQuery;
|
|
|
begin
|
|
|
aQuery1:=CreateAdoQuery;
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
with aQuery2 do
|
|
|
begin
|
|
|
Close;SQL.clear;
|
|
|
sql.Add('update t_OP_seae set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
with aQuery1 do
|
|
|
try
|
|
|
Close;SQL.clear;
|
|
|
sql.Add('select t_OP_seae.<2E><><EFBFBD><EFBFBD>,t_OP_seae_order.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_OP_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add('from t_OP_seae_order');
|
|
|
sql.Add('left join t_OP_seae on t_OP_seae.<2E><><EFBFBD><EFBFBD>=t_OP_seae_order.<2E><><EFBFBD><EFBFBD>');
|
|
|
sql.Add('where t_OP_seae_order.<2E><><EFBFBD><EFBFBD><>''''');
|
|
|
open;First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
aQuery2.Close;
|
|
|
aQuery2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
|
|
|
aQuery2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
aQuery2.ExecSQL;
|
|
|
next;
|
|
|
end;
|
|
|
finally
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.dxDBGrid1Column36CustomDraw(
|
|
|
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[dxDBGrid1Column36.Index]='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
AColor:=clYellow;
|
|
|
if ANode.Strings[dxDBGrid1Column36.Index]='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
|
|
|
AColor:=clGreen;
|
|
|
AFont.Color:=clblack;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_order_wf.dxDBGrid1Column37CustomDraw(
|
|
|
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 strtofloatdef(AText,0)<=0 then
|
|
|
AColor:=clRed;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|
|
|
|
|
|
|