|
|
unit u_op_seae_weituo_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, u_op_sate, u_fee, u_op_card, Menus,
|
|
|
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu, Grids, Wwdbigrd, Wwdbgrid, RxMemDS,
|
|
|
wwdbedit, Wwdotdot, Wwdbcomb, DBCtrlsEh;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_seae_weituo_wf = class(TForm)
|
|
|
Panel2: TPanel;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton38: TbsSkinButton;
|
|
|
t_op_seae_order: TADOQuery;
|
|
|
t_op_seae_order1: 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;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
Label19: TLabel;
|
|
|
RxDBLookupCombo12: TRxDBLookupCombo;
|
|
|
Label4: TLabel;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
DBEdit2: TDBEdit;
|
|
|
Label2: TLabel;
|
|
|
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;
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
bsSkinPageControl2: TbsSkinPageControl;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
N3: TMenuItem;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridColumn;
|
|
|
Label23: TLabel;
|
|
|
DBEdit4: TDBEdit;
|
|
|
dxDBGrid1Column14: TdxDBGridColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridColumn;
|
|
|
Label25: TLabel;
|
|
|
DBEdit7: TDBEdit;
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridColumn;
|
|
|
wwDBComboBox5: TwwDBComboBox;
|
|
|
Label29: TLabel;
|
|
|
dxDBGrid1Column19: TdxDBGridColumn;
|
|
|
t_op_ctn: TADOQuery;
|
|
|
dxDBGrid1Column20: TdxDBGridColumn;
|
|
|
dxDBGrid1Column21: TdxDBGridColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridColumn;
|
|
|
dxDBGrid1Column27: TdxDBGridColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridColumn;
|
|
|
dxDBGrid1Column29: TdxDBGridColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridColumn;
|
|
|
dxDBGrid1Column31: TdxDBGridColumn;
|
|
|
dxDBGrid1Column32: TdxDBGridColumn;
|
|
|
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
|
|
|
dxDBGrid1Column33: TdxDBGridColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridColumn;
|
|
|
dxDBGrid1Column35: TdxDBGridColumn;
|
|
|
dxDBGrid1Column36: TdxDBGridColumn;
|
|
|
dxDBGrid1Column37: TdxDBGridColumn;
|
|
|
dxDBGrid1Column38: TdxDBGridColumn;
|
|
|
t_crm_client_weituo1: TDataSource;
|
|
|
t_crm_client_weituo: TADOQuery;
|
|
|
dxDBGrid1Column39: TdxDBGridColumn;
|
|
|
Label54: TLabel;
|
|
|
RxDBLookupCombo11: TRxDBLookupCombo;
|
|
|
Label53: TLabel;
|
|
|
DBComboBoxEh3: TDBComboBoxEh;
|
|
|
t_ch_accept1: TDataSource;
|
|
|
t_ch_accept: TADOQuery;
|
|
|
t_ch_pay1: TDataSource;
|
|
|
t_ch_pay: TADOQuery;
|
|
|
edit_type: TEdit;
|
|
|
Label26: TLabel;
|
|
|
wwDBComboBox3: TwwDBComboBox;
|
|
|
bsSkinPanel6: TbsSkinPanel;
|
|
|
Label124: TLabel;
|
|
|
Label15: TLabel;
|
|
|
Label13: TLabel;
|
|
|
Label22: TLabel;
|
|
|
Label28: TLabel;
|
|
|
Label31: TLabel;
|
|
|
Label33: TLabel;
|
|
|
Label34: TLabel;
|
|
|
Label40: TLabel;
|
|
|
Label11: TLabel;
|
|
|
Label1: TLabel;
|
|
|
Label51: TLabel;
|
|
|
Label52: TLabel;
|
|
|
Label16: TLabel;
|
|
|
Label73: TLabel;
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
DBEdit5: TDBEdit;
|
|
|
bsSkinGroupBox5: TbsSkinGroupBox;
|
|
|
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox9: TbsSkinDBCheckRadioBox;
|
|
|
wwDBLookupCombo9: TwwDBLookupCombo;
|
|
|
RxDBLookupCombo7: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo10: TwwDBLookupCombo;
|
|
|
RxDBLookupCombo9: TRxDBLookupCombo;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit9: TDBEdit;
|
|
|
RxDBLookupCombo8: TRxDBLookupCombo;
|
|
|
DBEdit1: TDBEdit;
|
|
|
DBEdit14: TDBEdit;
|
|
|
DBEdit15: TDBEdit;
|
|
|
RxDBLookupCombo10: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo20: TRxDBLookupCombo;
|
|
|
bsSkinPanel7: TbsSkinPanel;
|
|
|
Label35: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label12: TLabel;
|
|
|
Label20: TLabel;
|
|
|
Label108: TLabel;
|
|
|
Label109: TLabel;
|
|
|
RxDBLookupCombo28: TRxDBLookupCombo;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
|
|
|
DBMemo1: TDBMemo;
|
|
|
wwDBDateTimePicker7: TwwDBDateTimePicker;
|
|
|
bsSkinButton21: TbsSkinButton;
|
|
|
DBEdit37: TDBEdit;
|
|
|
DBEdit38: TDBEdit;
|
|
|
bsSkinButton22: TbsSkinButton;
|
|
|
bsSkinExPanel1: TbsSkinExPanel;
|
|
|
ADOQuery_wf: TADOQuery;
|
|
|
ADOQuery_wf1: TDataSource;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGrid2Column1: TdxDBGridColumn;
|
|
|
dxDBGrid2Column2: TdxDBGridColumn;
|
|
|
dxDBGrid2Column3: TdxDBGridColumn;
|
|
|
dxDBGrid2Column4: TdxDBGridColumn;
|
|
|
dxDBGrid2Column5: TdxDBGridColumn;
|
|
|
tbl1: TbsSkinTabSheet;
|
|
|
Label17: TLabel;
|
|
|
RxDBLookupCombo13: TRxDBLookupCombo;
|
|
|
Label119: TLabel;
|
|
|
wwDBComboBox8: TwwDBComboBox;
|
|
|
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
|
|
|
Label24: TLabel;
|
|
|
DBEdit6: TDBEdit;
|
|
|
Label18: TLabel;
|
|
|
DBEdit3: TDBEdit;
|
|
|
N4: TMenuItem;
|
|
|
N5: TMenuItem;
|
|
|
PopupMenu4: TPopupMenu;
|
|
|
MenuItem1: TMenuItem;
|
|
|
MenuItem2: TMenuItem;
|
|
|
MenuItem9: TMenuItem;
|
|
|
N75: TMenuItem;
|
|
|
N76: TMenuItem;
|
|
|
N77: TMenuItem;
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
bsSkinExPanel2: TbsSkinExPanel;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
bsSkinButton13: TbsSkinButton;
|
|
|
bsSkinButton14: TbsSkinButton;
|
|
|
bsSkinButton23: TbsSkinButton;
|
|
|
wwDBGrid1: TwwDBGrid;
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo5: TwwDBLookupCombo;
|
|
|
bsSkinExPanel3: TbsSkinExPanel;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
bsSkinButton16: TbsSkinButton;
|
|
|
bsSkinButton17: TbsSkinButton;
|
|
|
bsSkinButton18: TbsSkinButton;
|
|
|
bsSkinButton19: TbsSkinButton;
|
|
|
bsSkinButton20: TbsSkinButton;
|
|
|
bsSkinButton24: TbsSkinButton;
|
|
|
wwDBGrid2: TwwDBGrid;
|
|
|
wwDBLookupCombo4: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo11: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo12: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo14: TwwDBLookupCombo;
|
|
|
Label122: TLabel;
|
|
|
DBMemo33: TDBMemo;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo6: TwwDBLookupCombo;
|
|
|
Label121: TLabel;
|
|
|
RxDBLookupCombo5: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo7: TwwDBLookupCombo;
|
|
|
DBMemo34: TDBMemo;
|
|
|
Label123: TLabel;
|
|
|
DBMemo35: TDBMemo;
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo8: TwwDBLookupCombo;
|
|
|
Label43: TLabel;
|
|
|
DBMemo10: TDBMemo;
|
|
|
RxDBLookupCombo19: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo13: TwwDBLookupCombo;
|
|
|
Label163: TLabel;
|
|
|
DBMemo38: TDBMemo;
|
|
|
Label21: TLabel;
|
|
|
DBMemo39: TDBMemo;
|
|
|
Label165: TLabel;
|
|
|
Label166: TLabel;
|
|
|
Label167: TLabel;
|
|
|
Label169: TLabel;
|
|
|
Label170: TLabel;
|
|
|
Label32: TLabel;
|
|
|
Label27: TLabel;
|
|
|
Label30: TLabel;
|
|
|
DBMemo40: TDBMemo;
|
|
|
DBMemo41: TDBMemo;
|
|
|
DBMemo42: TDBMemo;
|
|
|
wwDBLookupCombo61: TwwDBLookupCombo;
|
|
|
DBEdit81: TDBEdit;
|
|
|
DBEdit82: TDBEdit;
|
|
|
DBEdit83: TDBEdit;
|
|
|
wwDBLookupCombo21: TwwDBLookupCombo;
|
|
|
DBEdit25: TDBEdit;
|
|
|
RxDBLookupCombo15: TRxDBLookupCombo;
|
|
|
dxDBGrid1Column40: TdxDBGridColumn;
|
|
|
t_bz_balance: TRxMemoryData;
|
|
|
wwDBLookupCombo15: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo16: TwwDBLookupCombo;
|
|
|
Label41: TLabel;
|
|
|
RxDBLookupCombo31: TRxDBLookupCombo;
|
|
|
Label36: TLabel;
|
|
|
RxDBLookupCombo14: TRxDBLookupCombo;
|
|
|
Label37: TLabel;
|
|
|
RxDBLookupCombo16: 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 bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton38Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure t_op_seae_orderBeforeCancel(DataSet: TDataSet);
|
|
|
procedure t_op_seae_orderPostError(DataSet: TDataSet; E: EDatabaseError;
|
|
|
var Action: TDataAction);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure t_op_seae_orderBeforePost(DataSet: TDataSet);
|
|
|
procedure t_op_seae_orderBeforeEdit(DataSet: TDataSet);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure DBEdit5Click(Sender: TObject);
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
procedure RxDBLookupCombo12Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo1Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo8Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo1Exit(Sender: TObject);
|
|
|
procedure RxDBLookupCombo8Exit(Sender: TObject);
|
|
|
procedure RxDBLookupCombo4Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo5Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo6Change(Sender: TObject);
|
|
|
procedure DBMemo40Change(Sender: TObject);
|
|
|
procedure DBMemo41Change(Sender: TObject);
|
|
|
procedure DBMemo42Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo6Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo7Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo8Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo6Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo7Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo8Exit(Sender: TObject);
|
|
|
procedure N1Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure N3Click(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure RxDBLookupCombo1Change(Sender: TObject);
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
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 wwDBLookupCombo52Change(Sender: TObject);
|
|
|
procedure bsSkinButton21Click(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo5Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo3Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure t_ch_acceptAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_ch_acceptBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
procedure bsSkinButton13Click(Sender: TObject);
|
|
|
procedure bsSkinButton14Click(Sender: TObject);
|
|
|
procedure wwDBLookupCombo4Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo14Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo14KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure t_ch_payAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_ch_payBeforePost(DataSet: TDataSet);
|
|
|
procedure t_ch_acceptAfterPost(DataSet: TDataSet);
|
|
|
procedure t_ch_payAfterPost(DataSet: TDataSet);
|
|
|
procedure RxDBLookupCombo10Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo10Exit(Sender: TObject);
|
|
|
procedure RxDBLookupCombo20Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo20Exit(Sender: TObject);
|
|
|
procedure bsSkinButton17Click(Sender: TObject);
|
|
|
procedure bsSkinButton16Click(Sender: TObject);
|
|
|
procedure bsSkinButton18Click(Sender: TObject);
|
|
|
procedure bsSkinButton19Click(Sender: TObject);
|
|
|
procedure bsSkinButton20Click(Sender: TObject);
|
|
|
procedure t_op_seae_orderAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_ch_payBeforeEdit(DataSet: TDataSet);
|
|
|
procedure t_ch_acceptBeforeEdit(DataSet: TDataSet);
|
|
|
procedure bsSkinButton22Click(Sender: TObject);
|
|
|
procedure wwDBLookupCombo5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo5Change(Sender: TObject);
|
|
|
procedure bsSkinButton23Click(Sender: TObject);
|
|
|
procedure RxDBLookupCombo7Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo7Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo7Exit(Sender: TObject);
|
|
|
procedure N5Click(Sender: TObject);
|
|
|
procedure MenuItem1Click(Sender: TObject);
|
|
|
procedure N75Click(Sender: TObject);
|
|
|
procedure N77Click(Sender: TObject);
|
|
|
procedure bsSkinButton24Click(Sender: TObject);
|
|
|
procedure dxDBGrid1Column40CustomDraw(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 wwDBLookupCombo15DropDown(Sender: TObject);
|
|
|
procedure wwDBLookupCombo15Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo16Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo16DropDown(Sender: TObject);
|
|
|
procedure t_ch_payBeforeDelete(DataSet: TDataSet);
|
|
|
procedure t_ch_acceptBeforeInsert(DataSet: TDataSet);
|
|
|
procedure t_ch_acceptBeforeDelete(DataSet: TDataSet);
|
|
|
procedure t_ch_payBeforeInsert(DataSet: TDataSet);
|
|
|
procedure RxDBLookupCombo14Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo14Exit(Sender: TObject);
|
|
|
procedure RxDBLookupCombo16Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo16Exit(Sender: TObject);
|
|
|
private
|
|
|
procedure t_billsalescharge(Sender: TField);
|
|
|
|
|
|
|
|
|
procedure t_ch_acceptdjoncharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
procedure t_ch_paydjoncharge(Sender: TField); //<2F><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
procedure t_ch_acceptcrmcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
procedure DatasetNOPricecharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
procedure DatasetAmtcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
function if_Edit_delete:Boolean;
|
|
|
procedure setconcolor;
|
|
|
procedure crmchargeDr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
procedure crmchargeCr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
procedure NOPricechargeDr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
procedure NOPricechargeCr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seae_weituo_wf: Tfrm_op_seae_weituo_wf;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main,u_data_share, my_sys_function, u_sys_progress,
|
|
|
u_op_seae_apply_add, u_op_add_code, u_op_ctn, u_opor_ctn, my_sys_chat,u_op_seae_oder_add,
|
|
|
u_code_fee_project_order_add;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.setconcolor;
|
|
|
procedure consetcolor(fielname:String);
|
|
|
var
|
|
|
i:integer;
|
|
|
scolor:string;
|
|
|
begin
|
|
|
scolor:=get_parameters_value(144,'clInfoBk');
|
|
|
with bsSkinPanel1 do begin
|
|
|
for i:=0 to ControlCount-1 do begin
|
|
|
if Controls[i] is TwwDBComboBox then begin
|
|
|
if TwwDBComboBox(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TwwDBLookupCombo then begin
|
|
|
if TwwDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBEdit then begin
|
|
|
if TDBEdit(Controls[i]).DataField=fielname then begin
|
|
|
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TwwDBDateTimePicker then begin
|
|
|
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBMemo then begin
|
|
|
if TDBMemo(Controls[i]).DataField=fielname then begin
|
|
|
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TRxDBLookupCombo then begin
|
|
|
if TRxDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
{
|
|
|
with bsSkinGroupBox1 do begin
|
|
|
for i:=0 to ControlCount-1 do begin
|
|
|
if Controls[i] is TwwDBComboBox then begin
|
|
|
if TwwDBComboBox(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TwwDBLookupCombo then begin
|
|
|
if TwwDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBEdit then begin
|
|
|
if TDBEdit(Controls[i]).DataField=fielname then begin
|
|
|
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TwwDBDateTimePicker then begin
|
|
|
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBMemo then begin
|
|
|
if TDBMemo(Controls[i]).DataField=fielname then begin
|
|
|
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TRxDBLookupCombo then begin
|
|
|
if TRxDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
}
|
|
|
with bsSkinPanel1 do begin
|
|
|
for i:=0 to ControlCount-1 do begin
|
|
|
if Controls[i] is TDBEdit then begin
|
|
|
if TDBEdit(Controls[i]).DataField=fielname then begin
|
|
|
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TRxDBLookupCombo then begin
|
|
|
if TRxDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBComboBoxEh then begin
|
|
|
if TDBComboBoxEh(Controls[i]).DataField=fielname then begin
|
|
|
TDBComboBoxEh(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>ͬ<EFBFBD><CDAC>ɫ<EFBFBD><C9AB>ʾ
|
|
|
frm_data_share.t_code_empty.Filtered:=false;
|
|
|
frm_data_share.t_code_empty.Filter:='<27><>=''t_op_seae_order''';
|
|
|
frm_data_share.t_code_empty.Filtered:=true;
|
|
|
frm_data_share.t_code_empty.First;
|
|
|
while not frm_data_share.t_code_empty.Eof do
|
|
|
begin
|
|
|
consetcolor(frm_data_share.t_code_empty.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring);
|
|
|
frm_data_share.t_code_empty.next;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_acceptdjoncharge(Sender: TField);
|
|
|
begin
|
|
|
//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
if Sender.FieldName='<27><><EFBFBD><EFBFBD>' then
|
|
|
try
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100);
|
|
|
finally
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
end;
|
|
|
|
|
|
try
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
|
|
|
if (Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
|
|
|
else
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
|
|
|
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
|
|
|
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
|
|
|
finally
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_paydjoncharge(Sender: TField);
|
|
|
begin
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
if Sender.FieldName='<27><><EFBFBD><EFBFBD>' then
|
|
|
try
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100);
|
|
|
finally
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
end;
|
|
|
|
|
|
try
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
|
|
|
if (Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
|
|
|
else
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
|
|
|
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
|
|
|
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
|
|
|
finally
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
{
|
|
|
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
|
|
|
wwDBGrid2.Refresh
|
|
|
else wwDBGrid1.Refresh;
|
|
|
}
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_acceptcrmcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
if not Sender.DataSet.IsEmpty then
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
case StrToInt(edit_type.text) of
|
|
|
1,2:
|
|
|
begin
|
|
|
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').AsString,[]) then
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
if not frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').IsNull then
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat
|
|
|
else Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
3,4:
|
|
|
begin
|
|
|
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').AsString,[]) then
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
if not frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').IsNull then
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat
|
|
|
else Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
if not frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').IsNull then
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat
|
|
|
else Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
end;
|
|
|
{
|
|
|
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
|
|
|
wwDBGrid2.Refresh
|
|
|
else wwDBGrid1.Refresh;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.DatasetAmtcharge(Sender: TField);
|
|
|
begin
|
|
|
if not Sender.DataSet.IsEmpty then
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
|
|
|
try
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('˰<><CBB0>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
if Sender.FieldName='<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
// Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.FieldByName('˰<><CBB0>').asfloat/100));
|
|
|
end;
|
|
|
|
|
|
|
|
|
finally
|
|
|
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
|
|
|
begin
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
Sender.DataSet.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
Sender.DataSet.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
end;
|
|
|
end;
|
|
|
{
|
|
|
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
|
|
|
wwDBGrid2.Refresh
|
|
|
else wwDBGrid1.Refresh;
|
|
|
}
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.DatasetNOPricecharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
if not Sender.DataSet.IsEmpty then
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
if Sender.FieldName='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>' then
|
|
|
begin
|
|
|
try
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
|
|
|
|
|
|
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
// Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
|
|
|
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
|
|
|
if (Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
|
|
|
else
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
|
|
|
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
|
|
|
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
|
|
|
finally
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge
|
|
|
else Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
if Sender.FieldName='˰<><CBB0>' then
|
|
|
begin
|
|
|
try
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
|
|
|
|
|
|
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
|
|
|
// Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
|
|
|
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
|
|
|
if (Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
|
|
|
else
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
|
|
|
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
|
|
|
|
|
|
|
|
|
if (Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat=0) and (UpperCase(Sender.DataSet.Name)='T_CH_PAY') then
|
|
|
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=0
|
|
|
else Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
finally
|
|
|
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
|
|
|
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
|
|
|
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge
|
|
|
else Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.crmchargeDr(Sender: TField);
|
|
|
begin
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').AsString,[]) then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('Ӧ<>տͻ<D5BF>').AsString,[]) then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
wwDBGrid1.Refresh;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.crmchargeCr(Sender: TField);
|
|
|
begin
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').AsString,[]) then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>').AsString,[]) then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
wwDBGrid1.Refresh;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.NOPricechargeDr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<>յ<EFBFBD><D5B5><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
wwDBGrid1.Refresh;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.NOPricechargeCr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
wwDBGrid1.Refresh;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_seae_weituo_wf.if_Edit_delete:Boolean;
|
|
|
var aAdoQuery:TADOQuery;
|
|
|
begin
|
|
|
result:=False;
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('select ״̬ from t_op_seae_order');
|
|
|
sql.Add('where or_id=:or_id and ״̬ in (''<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>'',''<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>'',''<27><><EFBFBD><EFBFBD><EFBFBD>ύ'')');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.FieldByName('or_id').AsInteger;
|
|
|
Open;
|
|
|
if not IsEmpty then result:=True;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
|
|
|
savewwgrid(wwDBGrid1,'<27><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
|
|
|
savewwgrid(wwDBGrid2,'<27><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
|
|
|
|
|
|
frm_op_seae_weituo_wf.Hide;
|
|
|
frm_op_seae_weituo_wf.ManualFloat(frm_op_seae_weituo_wf.BoundsRect );
|
|
|
frm_main.freeTabs('frm_op_seae_weituo_wf');
|
|
|
action:=cafree;
|
|
|
frm_op_seae_weituo_wf:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.Panel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(Panel2.Width/11);
|
|
|
bsSkinButton7.Width:=i;
|
|
|
bsSkinButton6.Width:=i;
|
|
|
bsSkinButton9.Width:=i;
|
|
|
bsSkinButton1.Width:=i;
|
|
|
bsSkinButton11.Width:=i;
|
|
|
bsSkinButton2.Width:=i;
|
|
|
bsSkinButton4.Width:=i;
|
|
|
bsSkinButton3.Width:=i;
|
|
|
bsSkinButton38.Width:=i;
|
|
|
bsSkinButton22.Width:=i;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_Prior(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
table_next(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڶ<EFBFBD><DAB6>տ<EFBFBD>',2,t_op_seae_order1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton11Click(Sender: TObject);
|
|
|
var ID_WordFlow:Integer;
|
|
|
aadoQuery,aadoQueryInsert,badoQuery:TadoQuery;
|
|
|
s,reasons:string;
|
|
|
AmtDr,AmtCr:Double;
|
|
|
|
|
|
book1:Tbookmark;
|
|
|
begin
|
|
|
book1:=t_op_seae_order.GetBookmark;
|
|
|
t_op_seae_order.Requery;
|
|
|
t_op_seae_order.GotoBookmark(book1);
|
|
|
table_before_post(t_op_seae_order,'¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ί<>е<EFBFBD>λ');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD>ѷ<EFBFBD>ʽ');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'װ<><D7B0><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ж<><D0B6><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'Ŀ<>ĵ<EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD>˾');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ҵ<><D2B5><EFBFBD><EFBFBD>ʽ');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if op_empty('t_op_seae_order',t_op_seae_order) then
|
|
|
Abort;
|
|
|
{
|
|
|
badoQuery:=CreateAdoQuery;
|
|
|
with badoQuery do
|
|
|
try
|
|
|
close;sql.clear;
|
|
|
sql.add('select sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as Ӧ<>ս<EFBFBD><D5BD><EFBFBD> from t_ch_fee_order where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><>0 and OR_ID='+t_op_seae_order.fieldbyname('OR_ID').AsString);
|
|
|
open;
|
|
|
AmtDr:=fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
|
|
|
|
|
|
close;sql.clear;
|
|
|
sql.add('select sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_order where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><>0 and OR_ID='+t_op_seae_order.fieldbyname('OR_ID').AsString);
|
|
|
open;
|
|
|
AmtCr:=fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
|
|
|
|
|
|
t_op_seae_order.Edit;
|
|
|
t_op_seae_order.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat:=AmtDr-AmtCr;
|
|
|
if AmtDr<>0 then
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=StrToFloat(FormatFloat('0.00;-0.00;0',(AmtDr-AmtCr)/AmtDr))
|
|
|
finally
|
|
|
fREE;
|
|
|
end;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
if t_op_seae_order.IsEmpty or (Trim(t_op_seae_order.FieldByName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString)='') then
|
|
|
begin
|
|
|
ShowMessage('ί<>б<EFBFBD><D0B1>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_seae_order.fieldbyname('ί<>е<EFBFBD>λ').asstring,[]) then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client_all.fieldbyname('<27>Ƿ<EFBFBD>ͣ<EFBFBD><CDA3>').AsBoolean then
|
|
|
begin
|
|
|
MessageDlg('<27><>ί<EFBFBD>е<EFBFBD>λ<EFBFBD><CEBB>ͣ<EFBFBD><CDA3>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD>룡',mtWarning,[mbok],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
aadoQuery:=CreateAdoQuery;
|
|
|
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;
|
|
|
|
|
|
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;First;
|
|
|
while not Eof do
|
|
|
begin
|
|
|
if (fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
|
|
|
(fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
|
|
|
(fieldbyname('<27>ұ<EFBFBD>').asstring='')or
|
|
|
(fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0)
|
|
|
or ((fieldbyname('<27>ұ<EFBFBD>').asstring='RMB') and (fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>1))
|
|
|
or ((fieldbyname('<27>ұ<EFBFBD>').asstring<>'RMB') and (fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=1))
|
|
|
then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>벻<EFBFBD><EBB2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ');
|
|
|
exit;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
|
|
|
|
|
|
finally
|
|
|
// Free;
|
|
|
end;
|
|
|
//<2F><><EFBFBD>ӷ<EFBFBD>
|
|
|
s:='';
|
|
|
if t_op_seae_order.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD>Ӷ').AsBoolean then
|
|
|
begin
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>ӷ<EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>ѡ<EFBFBD><D1A1>Ϊ:<3A>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>û<EFBFBD><C3BB>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>'
|
|
|
else s:='<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>ѡ<EFBFBD><D1A1>Ϊ:<3A>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>û<EFBFBD><C3BB>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>'+#13#10+s;
|
|
|
end;
|
|
|
finally
|
|
|
// Free;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>ӷ<EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if not IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>ѡ<EFBFBD><D1A1>Ϊ:<3A><EFBFBD><F1A3ACB5>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>'
|
|
|
else s:='<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>ѡ<EFBFBD><D1A1>Ϊ:<3A><EFBFBD><F1A3ACB5>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
finally
|
|
|
// Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// cif <20><><EFBFBD>˷<EFBFBD>
|
|
|
|
|
|
if Pos('PREPAID',UpperCase(t_op_seae_order.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').asstring))>0 then
|
|
|
begin
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>˷<EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='Ԥ<><D4A4><EFBFBD><EFBFBD>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD>պ<EFBFBD><D5BA>˷<EFBFBD>'
|
|
|
else s:='Ԥ<><D4A4><EFBFBD><EFBFBD>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD>պ<EFBFBD><D5BA>˷<EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>˷<EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='Ԥ<><D4A4><EFBFBD><EFBFBD>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>'
|
|
|
else s:='Ԥ<><D4A4><EFBFBD><EFBFBD>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
finally
|
|
|
// Free;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
if Pos('COLLECT',UpperCase(t_op_seae_order.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').asstring))>0 then
|
|
|
begin
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD>ղ<EFBFBD><D5B2><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else s:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD>ղ<EFBFBD><D5B2><EFBFBD><EFBFBD><EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else s:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
|
|
|
finally
|
|
|
// Free;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
if (Pos('HK',UpperCase(t_op_seae_order.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').asstring))>0) or (t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').AsString='<27>밶') then
|
|
|
begin
|
|
|
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =''HK<48><4B><EFBFBD>˷<EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD>˷<EFBFBD>'
|
|
|
else s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD>˷<EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =''HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =''HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =''HK<48><4B><EFBFBD>˷<EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD>˷<EFBFBD>'
|
|
|
else s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD>˷<EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
|
|
|
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =''HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_ch_fee_order');
|
|
|
sql.Add('where or_id=:or_id and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =''HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>=''<27><>'' ');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else s:='<27>밶<EFBFBD><EBB0B6>û<EFBFBD><C3BB>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>HK<48><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+#13#10+s;;
|
|
|
end;
|
|
|
finally
|
|
|
// Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if Trim(s)<>'' then
|
|
|
begin
|
|
|
ShowMessage(s);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
/// <20>ո<EFBFBD>
|
|
|
{
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
Close;Sql.Clear;
|
|
|
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,');
|
|
|
SQL.Add(' SUM(CASE <20><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as Ӧ<><D3A6>USD');
|
|
|
SQL.Add(',');
|
|
|
SQL.Add(' SUM(CASE <20><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as Ӧ<><D3A6>RMB');
|
|
|
SQL.Add(',');
|
|
|
SQL.Add('SUM(CASE <20><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as Ӧ<><D3A6>USD');
|
|
|
SQL.Add(',');
|
|
|
SQL.Add(' SUM(CASE <20><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as Ӧ<><D3A6>RMB');
|
|
|
SQL.Add('from t_ch_fee_ORDER');
|
|
|
sql.Add('where or_id=:or_id');
|
|
|
SQL.Add('group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
if ((FieldByName('Ӧ<><D3A6>USD').AsFloat-FieldByName('Ӧ<><D3A6>USD').AsFloat)<0)
|
|
|
or ((FieldByName('Ӧ<><D3A6>RMB').AsFloat-FieldByName('Ӧ<><D3A6>RMB').AsFloat)<0) then
|
|
|
begin
|
|
|
if Trim(Reasons)='' then
|
|
|
Reasons:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' Ӧ<>ռ<EFBFBD>Ӧ<EFBFBD><D3A6>С<EFBFBD><D0A1>0,'+#13#10
|
|
|
else Reasons:=Reasons+FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' Ӧ<>ռ<EFBFBD>Ӧ<EFBFBD><D3A6>С<EFBFBD><D0A1>0,'+#13#10
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
if Trim(Reasons)<>'' then
|
|
|
begin
|
|
|
if MessageDlg(Reasons,mtWarning,[mbyes,mbno],0)<>mryes then
|
|
|
EXIT;
|
|
|
end;
|
|
|
|
|
|
finally
|
|
|
|
|
|
end;
|
|
|
}
|
|
|
|
|
|
with aadoQuery do
|
|
|
try
|
|
|
if t_op_seae_order.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD>Ӷ').AsBoolean then
|
|
|
begin
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_workflow');
|
|
|
sql.Add('where <20><><EFBFBD>ѷ<EFBFBD>ʽ=:<3A><><EFBFBD>ѷ<EFBFBD>ʽ and ҵ<><D2B5><EFBFBD><EFBFBD>ʽ=:ҵ<><D2B5><EFBFBD><EFBFBD>ʽ and <20><><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>=:<3A>Ƿ<EFBFBD><C7B7><EFBFBD>Ӷ');
|
|
|
Parameters.ParamByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').Value:=t_op_seae_order.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString;
|
|
|
Parameters.ParamByName('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').Value:=t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
Parameters.ParamByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>Ӷ').Value:=1;
|
|
|
Open;First;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ύ,<2C><><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>Ա');
|
|
|
Exit;
|
|
|
end
|
|
|
else if recordcount>=2 then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ύ,<2C><><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>Ա');
|
|
|
Exit;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ID_WordFlow:=fieldbyname('W_ID').AsInteger;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_workflow');
|
|
|
sql.Add('where <20><><EFBFBD>ѷ<EFBFBD>ʽ=:<3A><><EFBFBD>ѷ<EFBFBD>ʽ and ҵ<><D2B5><EFBFBD><EFBFBD>ʽ=:ҵ<><D2B5><EFBFBD><EFBFBD>ʽ and <20><><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>=:<3A>Ƿ<EFBFBD><C7B7><EFBFBD>Ӷ and <20><><EFBFBD><EFBFBD><:ë<><C3AB><EFBFBD><EFBFBD>1 and <20><><EFBFBD><EFBFBD>ֹ>=:ë<><C3AB><EFBFBD><EFBFBD>2');
|
|
|
Parameters.ParamByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').Value:=t_op_seae_order.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString;
|
|
|
Parameters.ParamByName('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').Value:=t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
Parameters.ParamByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>Ӷ').Value:=0;
|
|
|
Parameters.ParamByName('ë<><C3AB><EFBFBD><EFBFBD>1').Value:=t_op_seae_order.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat;
|
|
|
Parameters.ParamByName('ë<><C3AB><EFBFBD><EFBFBD>2').Value:=t_op_seae_order.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat;
|
|
|
Open;First;
|
|
|
if IsEmpty then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ύ,<2C><><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>Ա');
|
|
|
Exit;
|
|
|
end
|
|
|
else if recordcount>=2 then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ύ,<2C><><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>Ա');
|
|
|
Exit;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ID_WordFlow:=fieldbyname('W_ID').AsInteger;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if MessageDlg('ȷʵҪ<CAB5>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)<>mryes then
|
|
|
Exit;
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
frm_main.db.BeginTrans;
|
|
|
|
|
|
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>=1');
|
|
|
Parameters.ParamByName('W_ID').Value:=ID_WordFlow;
|
|
|
|
|
|
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;
|
|
|
|
|
|
t_op_seae_order.edit;
|
|
|
t_op_seae_order.FieldByName('״̬').AsString:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order.post;
|
|
|
|
|
|
frm_main.db.CommitTrans;
|
|
|
finally
|
|
|
if frm_main.db.InTransaction then
|
|
|
begin
|
|
|
showmessage('<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
Send_saleorder_shen('<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>,ί<>б<EFBFBD><D0B1><EFBFBD>:'+t_op_seae_order.FieldByName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString,employee)
|
|
|
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Send_saleorder_shen('<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>,ί<>б<EFBFBD><D0B1><EFBFBD>:'+t_op_seae_order.FieldByName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString,employee);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
table_delete(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_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_weituo_wf.FormShow(Sender: TObject);
|
|
|
var
|
|
|
str,str1:widestring;
|
|
|
|
|
|
begin
|
|
|
t_bz_balance.close;
|
|
|
t_bz_balance.open;
|
|
|
|
|
|
setconcolor;
|
|
|
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 * from t_op_seae_order where (״̬=''<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>'' or ״̬=''<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>'') and '
|
|
|
+open_data('0021','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+' order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_op_seae_order.open;
|
|
|
t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_billsalescharge;
|
|
|
t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_billsalescharge;
|
|
|
|
|
|
|
|
|
t_ch_accept.Close;
|
|
|
t_ch_accept.Open;
|
|
|
|
|
|
|
|
|
t_ch_pay.Close;
|
|
|
t_ch_pay.Open;
|
|
|
|
|
|
t_billsalescharge(nil);
|
|
|
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
|
|
|
loadwwgrid(wwDBGrid1,'<27><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
|
|
|
loadwwgrid(wwDBGrid2,'<27><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
if strtobool(get_parameters_value(161,'true')) then
|
|
|
bsSkinButton11.Caption:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
bsSkinButton11.Caption:='ȷ<>϶<EFBFBD><CFB6><EFBFBD>';
|
|
|
|
|
|
|
|
|
|
|
|
str:='where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>'+''''+'Ŀ<><C4BF>'+'''';
|
|
|
|
|
|
str:=str+'and ί<>е<EFBFBD>λ=1 ';
|
|
|
t_crm_client_weituo.close;
|
|
|
t_crm_client_weituo.sql.clear;
|
|
|
t_crm_client_weituo.sql.add('select * from t_crm_client '+str+' order by <20><><EFBFBD><EFBFBD>');
|
|
|
// t_crm_client_weituo.sql.add('select * from t_crm_client '+str+' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27>ͷ<EFBFBD>Ա','no','no')+' order by <20><><EFBFBD><EFBFBD>');
|
|
|
t_crm_client_weituo.open;
|
|
|
|
|
|
|
|
|
str:='where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>'+''''+'Ŀ<><C4BF>'+'''';
|
|
|
|
|
|
str:=str+'and (<28><><EFBFBD><EFBFBD>˾=1 or <20><>վ=1 or <20><><EFBFBD><EFBFBD>=1 or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=1 or <20><><EFBFBD><EFBFBD>=1 or <20><><EFBFBD><EFBFBD>=1 or <20><><EFBFBD>չ<EFBFBD>˾=1 or <20><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>=1 or <20><><EFBFBD>ݹ<EFBFBD>˾=1 or <20><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>=1 or <20>ֿ<EFBFBD>=1)';
|
|
|
// str:=str+'and (ί<>е<EFBFBD>λ<>1 or ί<>е<EFBFBD>λ is null)';
|
|
|
|
|
|
|
|
|
if t_ch_accept.Active then
|
|
|
begin
|
|
|
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
|
|
|
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
|
|
|
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
TNumericField(t_ch_accept.FieldByName('˰<><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
|
|
|
TNumericField(t_ch_accept.FieldByName('˰<><CBB0>')).EditFormat:=';;';
|
|
|
TNumericField(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
|
|
|
TNumericField(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>')).EditFormat:=';;';
|
|
|
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
TNumericField(t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')).DisplayFormat:='#,##0.00"%";-#,##0.00"%";#';
|
|
|
TNumericField(t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')).EditFormat:='0.00;-0.00;0.00';
|
|
|
end;
|
|
|
|
|
|
if t_ch_pay.Active then
|
|
|
begin
|
|
|
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
|
|
|
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
TNumericField(t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')).DisplayFormat:='#,##0.00"%";-#,##0.00"%";#';
|
|
|
TNumericField(t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')).EditFormat:='0.00;-0.00;0.00';
|
|
|
TNumericField(t_ch_pay.FieldByName('˰<><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
|
|
|
TNumericField(t_ch_pay.FieldByName('˰<><CBB0>')).EditFormat:=';;';
|
|
|
TNumericField(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
|
|
|
TNumericField(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>')).EditFormat:=';;';
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if t_ch_accept.Active then
|
|
|
begin
|
|
|
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
|
|
|
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
|
|
|
|
|
|
wwDBGrid1.ColumnByName('˰<><CBB0>').ReadOnly:=true;
|
|
|
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').ReadOnly:=true;
|
|
|
|
|
|
wwDBGrid1.ColumnByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
|
|
|
wwDBGrid1.ColumnByName('¼<><C2BC><EFBFBD><EFBFBD>').ReadOnly:=true;
|
|
|
end;
|
|
|
|
|
|
if t_ch_pay.Active then
|
|
|
begin
|
|
|
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
|
|
|
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
|
|
|
|
|
|
wwDBGrid2.ColumnByName('˰<><CBB0>').ReadOnly:=true;
|
|
|
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').ReadOnly:=true;
|
|
|
|
|
|
wwDBGrid2.ColumnByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
|
|
|
wwDBGrid2.ColumnByName('¼<><C2BC><EFBFBD><EFBFBD>').ReadOnly:=true;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_op_seae_orderBeforeCancel(DataSet: TDataSet);
|
|
|
begin
|
|
|
delete_no(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_op_seae_orderPostError(DataSet: TDataSet;
|
|
|
E: EDatabaseError; var Action: TDataAction);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str:string;
|
|
|
begin
|
|
|
str:=' and '+open_data('0021','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no');
|
|
|
if Edit1.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
|
|
|
if wwDBComboBox44.text<>''then
|
|
|
str:=str+' and ״̬='+''''+wwDBComboBox44.text+'''';
|
|
|
if RxDBLookupCombo2.DisplayValues[1]<>''then
|
|
|
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
if RxDBLookupCombo3.DisplayValues[1]<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValues[1]+'''';
|
|
|
|
|
|
if RxDBLookupCombo11.DisplayValues[1]<>''then
|
|
|
str:=str+' and <20>˷<EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo11.DisplayValues[1]+'''';
|
|
|
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
if wwDBDateTimePicker3.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker3.text+'''';
|
|
|
if wwDBDateTimePicker5.text<>''then
|
|
|
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.text+'''';
|
|
|
if wwDBDateTimePicker6.text<>''then
|
|
|
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.text+'''';
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
str:=str+' and ״̬<>''<27><><EFBFBD>˲<EFBFBD>''';
|
|
|
|
|
|
|
|
|
t_op_seae_order.Close;
|
|
|
t_op_seae_order.SQL.clear;
|
|
|
t_op_seae_order.SQL.Add('select * from t_op_seae_order where 1=1 '
|
|
|
+str
|
|
|
+' order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_op_seae_order.open;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_op_seae_orderBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_op_seae_order,'¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ί<>е<EFBFBD>λ');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD>ѷ<EFBFBD>ʽ');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'װ<><D7B0><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ж<><D0B6><EFBFBD><EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'Ŀ<>ĵ<EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27>˷<EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD>˾');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ҵ<><D2B5><EFBFBD><EFBFBD>ʽ');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ҵ<><D2B5><EFBFBD><EFBFBD>Դ');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
|
|
|
if bsSkinDBCheckRadioBox1.Checked then
|
|
|
begin
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
if bsSkinDBCheckRadioBox4.Checked then
|
|
|
begin
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
if t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').AsString='<27><>ͨ' then
|
|
|
table_before_post(t_op_seae_order,'<27><>վ');
|
|
|
|
|
|
if t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').AsString='<27>밶' then
|
|
|
begin
|
|
|
if Pos('HK:',t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString)<=0 then
|
|
|
begin
|
|
|
ShowMessage('<27>밶ҵ<EBB0B6><D2B5><EFBFBD><EFBFBD>ί<EFBFBD>б<EFBFBD><D0B1>Ų<EFBFBD><C5B2><EFBFBD><EFBFBD><EFBFBD>HK,<2C><><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if (t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').AsString='<27><>ͨ') or (t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').AsString='<27><><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
if Pos('HK:',t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString)>0 then
|
|
|
begin
|
|
|
ShowMessage('<27><>ͨ,<2C><><EFBFBD><EFBFBD> ҵ<><D2B5><EFBFBD><EFBFBD>ί<EFBFBD>б<EFBFBD><D0B1>Ŵ<EFBFBD><C5B4><EFBFBD>HK,<2C><><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
|
|
|
if t_op_seae_order.FieldByName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').IsNull or (trim(t_op_seae_order['<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>'])='') then
|
|
|
t_op_seae_order['<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>']:=getwtno(1,subComp,department,employee,t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
|
|
|
end else begin
|
|
|
if t_op_seae_order.FieldByName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').IsNull or (trim(t_op_seae_order['<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>'])='') then
|
|
|
t_op_seae_order['<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>']:=getwtno(1,subComp,department,employee,t_op_seae_order.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_op_seae_orderBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if (t_op_seae_order.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString<>employee) and (t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee) then begin
|
|
|
MessageDlg('ֻ<><D6BB><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<DEB8>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>',mtWarning,[mbyes],0);
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if t_op_seae_order.FieldByName('״̬').AsString='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>' then begin
|
|
|
MessageDlg('<27>ѽ<EFBFBD><D1BD>ܶ<EFBFBD><DCB6>ղ<EFBFBD><D5B2><EFBFBD><EFBFBD>ģ<DEB8>',mtWarning,[mbyes],0);
|
|
|
abort;
|
|
|
end;
|
|
|
if t_op_seae_order.FieldByName('״̬').AsString='<27><><EFBFBD>˲<EFBFBD>' then begin
|
|
|
MessageDlg('<27><><EFBFBD>˲ղ<CBB2><D5B2><EFBFBD><EFBFBD>ģ<DEB8>',mtWarning,[mbyes],0);
|
|
|
abort;
|
|
|
end;
|
|
|
if t_op_seae_order.FieldByName('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then begin
|
|
|
MessageDlg('<27><><EFBFBD>˲ղ<CBB2><D5B2><EFBFBD><EFBFBD>ģ<DEB8>',mtWarning,[mbyes],0);
|
|
|
abort;
|
|
|
end;
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_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_weituo_wf.DBEdit5Click(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
if t_op_seae_order.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
if (t_op_seae_order.State=dsinsert)then
|
|
|
t_op_seae_order.post;
|
|
|
|
|
|
try
|
|
|
frm_opor_ctn:=tfrm_opor_ctn.Create (self);
|
|
|
frm_opor_ctn.t_op_ctn.DataSource:=t_op_seae_order1;
|
|
|
frm_opor_ctn_type:=true;
|
|
|
frm_opor_ctn.ShowModal;
|
|
|
finally
|
|
|
frm_opor_ctn.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.dxDBGrid1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo12Change(Sender: TObject);
|
|
|
begin
|
|
|
if RxDBLookupCombo12.DisplayValue='' then
|
|
|
exit;
|
|
|
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo12.DisplayValue,[]) then
|
|
|
t_op_seae_order['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo1Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter_All(RxDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo8Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter(RxDBLookupCombo8);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo1Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboExit(RxDBLookupCombo1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo8Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboExit(RxDBLookupCombo8);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo4Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_order.State=dsinsert)or(t_op_seae_order.State=dsedit)then
|
|
|
begin
|
|
|
if RxDBLookupCombo4.DisplayValue<>'' then
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shiper.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo5Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_order.State=dsinsert)or(t_op_seae_order.State=dsedit)then
|
|
|
begin
|
|
|
if RxDBLookupCombo5.DisplayValue<>'' then
|
|
|
t_op_seae_order['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shouhuo.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo6Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_order.State=dsinsert)or(t_op_seae_order.State=dsedit)then
|
|
|
begin
|
|
|
if RxDBLookupCombo6.DisplayValue<>'' then
|
|
|
t_op_seae_order['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_tongzhi.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.DBMemo40Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_order.state=dsedit)or(t_op_seae_order.state=dsinsert)then
|
|
|
begin
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>']:=total_num(DBMemo40);
|
|
|
t_op_seae_order['<27><>װ']:=total_package(dbmemo40);
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']
|
|
|
:='SAY:'+ntoc(t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat,true)
|
|
|
+t_op_seae_order.FieldByName('<27><>װ').asstring+' ONLY.';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.DBMemo41Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_order.state=dsedit)or(t_op_seae_order.state=dsinsert)then
|
|
|
begin
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>']:=total_num(DBMemo41);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.DBMemo42Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_order.state=dsedit)or(t_op_seae_order.state=dsinsert)then
|
|
|
begin
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>']:=total_num(DBMemo42);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo6Change(Sender: TObject);
|
|
|
begin
|
|
|
if frm_data_share.t_code_code.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo6.text,[]) then
|
|
|
begin
|
|
|
t_op_seae_order.edit;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_code_code.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo7Change(Sender: TObject);
|
|
|
begin
|
|
|
if frm_data_share.t_code_code.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo7.text,[]) then
|
|
|
begin
|
|
|
t_op_seae_order.edit;
|
|
|
t_op_seae_order['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_code_code.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo8Change(Sender: TObject);
|
|
|
begin
|
|
|
if frm_data_share.t_code_code.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo8.text,[]) then
|
|
|
begin
|
|
|
t_op_seae_order.edit;
|
|
|
t_op_seae_order['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_code_code.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo6Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo6.Clear;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo7Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo7.Clear;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo8Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo8.Clear;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.N1Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae_order.Insert;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_op_seae_order['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_op_seae_order['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_op_seae_order['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
t_op_seae_order['״̬']:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order['װ<>˷<EFBFBD>ʽ']:='<27><><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order['<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27>ӻ<EFBFBD><D3BB><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27>ֵ<EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27>Ƿ<EFBFBD><C7B7><EFBFBD>Ӷ']:=0;
|
|
|
t_op_seae_order['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>1']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>2']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>3']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>4']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>5']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>6']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>7']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>8']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>9']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>10']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><>TEU']:=0;
|
|
|
t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_seae_order['װ<><D7B0><EFBFBD><EFBFBD>']:=get_parameters_value(14,'QINGDAO,CHINA');
|
|
|
t_op_seae_order['ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
|
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
Pnt:=bsSkinButton1.ClientToScreen(Point(0,bsSkinButton1.Height));
|
|
|
PopupMenu1.Popup(Pnt.x,Pnt.y);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.N3Click(Sender: TObject);
|
|
|
var
|
|
|
afield,afieldfee : variant;
|
|
|
aOR_ID:integer;
|
|
|
aQuery:TAdoQuery;
|
|
|
i:integer;
|
|
|
s:string;
|
|
|
Boolean_Ctn:Boolean;
|
|
|
begin
|
|
|
if t_op_seae_order.IsEmpty then
|
|
|
begin
|
|
|
exit;
|
|
|
MessageDlg('û<>и<EFBFBD><D0B8>Ƶ<EFBFBD><C6B5><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD>',mtWarning,[mbok],0);
|
|
|
end;
|
|
|
Boolean_Ctn:=false;
|
|
|
afield := vararraycreate([0,t_op_seae_order.fieldcount-1],varvariant);
|
|
|
for i := 0 to (t_op_seae_order.fieldcount-1) do
|
|
|
begin
|
|
|
afield[i] :=t_op_seae_order.fields[i].value ;
|
|
|
end;
|
|
|
aOR_ID:=t_op_seae_order.fieldbyname('OR_ID').AsInteger;
|
|
|
|
|
|
s:=t_op_seae_order.fieldbyname('<27><>װ<EFBFBD><D7B0>').AsString;
|
|
|
|
|
|
t_op_seae_order.append;
|
|
|
for i := 0 to (t_op_seae_order.fieldcount-1) do
|
|
|
begin
|
|
|
if t_op_seae_order.fields[i].FieldName<>'OR_ID' then
|
|
|
t_op_seae_order.fields[i].value := afield[i] ;
|
|
|
end;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=employee;
|
|
|
t_op_seae_order.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').Value:=employee;
|
|
|
t_op_seae_order.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=date;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>˷<EFBFBD>').Value:=0;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>').Value:=department;
|
|
|
t_op_seae_order.fieldbyname('״̬').Value:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').Value:='';
|
|
|
|
|
|
|
|
|
t_op_seae_order.fieldbyname('״̬').Value:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27>ύ<EFBFBD><E1BDBB>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27>ύʱ<E1BDBB><CAB1>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>').Value:='';
|
|
|
|
|
|
|
|
|
t_op_seae_order.fieldbyname('<27><>װ<EFBFBD><D7B0>').Value:=s;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>˷<EFBFBD>').Value:=0;
|
|
|
t_op_seae_order.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').Value:=0;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>˾').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><>վ').Value:='';
|
|
|
t_op_seae_order.fieldbyname('Ĭ<>ϳ<EFBFBD>վ').Value:='';
|
|
|
|
|
|
// t_op_seae_order.Post;
|
|
|
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
{
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
|
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
close;sql.clear;
|
|
|
sql.Add('select * from t_opor_ctn where OR_ID='+inttostr(aOR_ID));
|
|
|
open;
|
|
|
if not t_op_ctn.active then
|
|
|
t_op_ctn.Open;
|
|
|
first;
|
|
|
while not eof do begin
|
|
|
Boolean_Ctn:=true;
|
|
|
t_op_ctn.Insert;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27>ߴ<EFBFBD>').AsString:=aQuery.fieldbyname('<27>ߴ<EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger;
|
|
|
t_op_ctn.fieldbyname('TEU').Asinteger:=aQuery.fieldbyname('TEU').Asinteger;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><>װ').AsString:=aQuery.fieldbyname('<27><>װ').AsString;
|
|
|
t_op_ctn.fieldbyname('Ʒ<><C6B7>').AsString:=aQuery.fieldbyname('Ʒ<><C6B7>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><>ͷ').AsString:=aQuery.fieldbyname('<27><>ͷ').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><>ע').AsString:=aQuery.fieldbyname('<27><>ע').AsString;
|
|
|
t_op_ctn.Post;
|
|
|
next;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
freeandnil(aQuery);
|
|
|
end;
|
|
|
}
|
|
|
// t_op_seae_order.Edit;
|
|
|
// t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_op_seae_order['״̬']:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_seae_order['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_seae_order['<27>ύ<EFBFBD><E1BDBB>']:='';
|
|
|
t_op_seae_order['<27>ύʱ<E1BDBB><CAB1>']:=null;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
t_op_seae_order['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:='';
|
|
|
|
|
|
if not Boolean_Ctn then
|
|
|
t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
|
|
|
|
|
|
// t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:=s;
|
|
|
// t_op_seae_order.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,209);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo1Change(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then begin
|
|
|
if frm_data_share.t_crm_client_weituo.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValues[1],[])then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client_weituo.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
|
|
|
begin
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client_weituo.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end else
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_billsalescharge(Sender: TField);
|
|
|
begin
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
table_post(t_op_seae_order);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_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_weituo_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_weituo_wf.wwDBLookupCombo52Change(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae_order1.DataSet=nil then
|
|
|
exit;
|
|
|
if (t_op_seae_order1.DataSet.state=dsedit)or(t_op_seae_order1.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
if frm_data_share.t_code_disport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',wwDBLookupCombo52.text,[]) then
|
|
|
begin
|
|
|
t_op_seae_order1.DataSet['Ŀ<>ĵ<EFBFBD>']:=wwDBLookupCombo52.text;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton21Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae_order1,'<27><>ע');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo1Change(Sender: TObject);
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƹ<EFBFBD><C6B8><EFBFBD>
|
|
|
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
|
|
|
begin
|
|
|
if not frm_data_share.t_code_fee.IsEmpty then
|
|
|
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo1.text,[]) then
|
|
|
begin
|
|
|
t_ch_accept['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
|
|
|
t_ch_accept['<27><>']:=frm_data_share.t_code_fee.fieldbyname('<27><>').asstring;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
//Ӧ<>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƹ<EFBFBD><C6B8><EFBFBD>
|
|
|
if key=#13 then
|
|
|
begin
|
|
|
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
|
|
|
begin
|
|
|
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue then
|
|
|
begin
|
|
|
if not frm_data_share.t_code_fee.IsEmpty then
|
|
|
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
t_ch_accept['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
|
|
|
t_ch_accept['<27><>']:=frm_data_share.t_code_fee.fieldbyname('<27><>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo5Exit(Sender: TObject);
|
|
|
begin
|
|
|
if t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring<>''then
|
|
|
begin
|
|
|
if (t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring='<27><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>') or (t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring='ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
frm_data_share.t_crm_client.Filtered:=false;
|
|
|
frm_data_share.t_crm_client.Filter:='<27><><EFBFBD><EFBFBD>=1';
|
|
|
frm_data_share.t_crm_client.Filtered:=true;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_data_share.t_crm_client.Filtered:=false;
|
|
|
frm_data_share.t_crm_client.Filter:=t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring+'=1';
|
|
|
frm_data_share.t_crm_client.Filtered:=true;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_data_share.t_crm_client.Filtered:=false;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo3Change(Sender: TObject);
|
|
|
begin
|
|
|
//<2F>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
|
|
|
begin
|
|
|
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo3.text,[])THEN
|
|
|
begin
|
|
|
if wwDBLookupCombo3.text='USD' then begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(184,'true')) then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo3.text)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
if key=#13 then
|
|
|
begin
|
|
|
//<2F>ұ<EFBFBD>
|
|
|
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
|
|
|
begin
|
|
|
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo10.text,[])THEN
|
|
|
begin
|
|
|
if wwDBLookupCombo3.text='USD' then begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(184,'true')) then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_accept.datasource.dataset.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>ͨ<EFBFBD><CDA8>' then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo3.text)
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo3.text)
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_acceptAfterInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
//Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
t_ch_accept['OR_ID']:=t_ch_accept.DataSource.DataSet['OR_ID'];
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_accept['˰<><CBB0>']:=0;
|
|
|
t_ch_accept['˰<><CBB0>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=0;
|
|
|
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
|
|
|
t_ch_accept['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
|
|
|
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString;
|
|
|
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').FocusControl;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_acceptBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
try
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
if (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
|
|
|
begin
|
|
|
if (t_ch_accept.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-t_ch_accept.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
|
|
|
else
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
end;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept['<27><><EFBFBD><EFBFBD>']);
|
|
|
|
|
|
|
|
|
DataSet.fieldbyname('˰<><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('˰<><CBB0>').asfloat/100)*DataSet.fieldbyname('˰<><CBB0>').asfloat/100);
|
|
|
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('˰<><CBB0>').asfloat);
|
|
|
|
|
|
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
|
|
|
|
|
|
finally
|
|
|
// t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
|
|
|
begin
|
|
|
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
abort;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
begin
|
|
|
if t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(184,'true')) then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
t_ch_accept.Append;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton12Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_ch_accept.IsEmpty then
|
|
|
exit;
|
|
|
table_post(t_ch_accept);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton13Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_accept.delete;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton14Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_ch_accept);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo4Change(Sender: TObject);
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƹ<EFBFBD><C6B8><EFBFBD>
|
|
|
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
|
|
|
begin
|
|
|
if not frm_data_share.t_code_fee.IsEmpty then
|
|
|
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo4.text,[]) then
|
|
|
begin
|
|
|
t_ch_pay['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
|
|
|
t_ch_pay['<27><>']:=frm_data_share.t_code_fee.fieldbyname('<27><>').asstring;
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
//Ӧ<>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƹ<EFBFBD><C6B8><EFBFBD>
|
|
|
if key=#13 then
|
|
|
begin
|
|
|
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
|
|
|
begin
|
|
|
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue then
|
|
|
begin
|
|
|
if not frm_data_share.t_code_fee.IsEmpty then
|
|
|
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
t_ch_pay['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
|
|
|
t_ch_pay['<27><>']:=frm_data_share.t_code_fee.fieldbyname('<27><>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo14Change(Sender: TObject);
|
|
|
begin
|
|
|
//<2F>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
|
|
|
begin
|
|
|
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo3.text,[])THEN
|
|
|
begin
|
|
|
if wwDBLookupCombo14.text='USD' then begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(184,'true')) then
|
|
|
begin
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo14.text)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo14.text)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo14.text)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo14KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
if key=#13 then
|
|
|
begin
|
|
|
//<2F>ұ<EFBFBD>
|
|
|
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
|
|
|
begin
|
|
|
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo14.text,[])THEN
|
|
|
begin
|
|
|
if wwDBLookupCombo3.text='USD' then begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(184,'true')) then
|
|
|
begin
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo14.text)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_pay.datasource.dataset.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>ͨ<EFBFBD><CDA8>' then
|
|
|
begin
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo14.text)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo14.text)
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo14.text)
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_payAfterInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
//Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
DataSet['OR_ID']:=DataSet.DataSource.DataSet['OR_ID'];
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:='<27><>';
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
|
DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
DataSet['˰<><CBB0>']:=0;
|
|
|
DataSet['˰<><CBB0>']:=0;
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
DataSet['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
|
|
|
DataSet['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
|
|
|
DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
DataSet['<27><><EFBFBD>뿪Ʊ']:=0;
|
|
|
DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
DataSet['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
|
|
|
DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
|
|
|
DataSet['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
|
|
|
DataSet['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
|
|
|
|
|
|
DataSet['<27><><EFBFBD>㵥λ']:='';
|
|
|
DataSet['˳<><CBB3>']:=DataSet.RecordCount+1;
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').FocusControl;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_payBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
if (DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
|
|
|
begin
|
|
|
if (DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
|
|
|
else
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
end;
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),DataSet['<27><><EFBFBD><EFBFBD>']);
|
|
|
|
|
|
|
|
|
DataSet.fieldbyname('˰<><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('˰<><CBB0>').asfloat/100)*DataSet.fieldbyname('˰<><CBB0>').asfloat/100);
|
|
|
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('˰<><CBB0>').asfloat);
|
|
|
|
|
|
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
|
|
|
|
|
|
finally
|
|
|
// t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if DataSet.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
|
|
|
begin
|
|
|
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',DataSet.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
abort;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
begin
|
|
|
if DataSet.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(184,'true')) then
|
|
|
begin
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_acceptAfterPost(DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TAdOQuery;
|
|
|
AmtDr,AmtCr,HYF:double;
|
|
|
begin
|
|
|
AmtDr:=0;
|
|
|
AmtCr:=0;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do
|
|
|
begin
|
|
|
sql.add('select ');
|
|
|
sql.add('sum(case when <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>˷<EFBFBD>'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) USDDR');
|
|
|
sql.add(',sum(case when <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>˷<EFBFBD>'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) USDCR');
|
|
|
sql.add('from t_ch_fee_order');
|
|
|
sql.add('where OR_ID=:OR_ID');
|
|
|
Parameters.ParamByName('OR_ID').Value:=DataSet.fieldbyname('OR_ID').AsInteger;
|
|
|
open;First;
|
|
|
if not IsEmpty then
|
|
|
begin
|
|
|
HYF:=fieldbyname('USDDR').AsFloat-fieldbyname('USDCR').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
HYF:=0;
|
|
|
end;
|
|
|
|
|
|
close;sql.clear;
|
|
|
sql.add('select sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as Ӧ<>ս<EFBFBD><D5BD><EFBFBD> from t_ch_fee_order where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><>0 and OR_ID='+DataSet.fieldbyname('OR_ID').AsString);
|
|
|
open;
|
|
|
AmtDr:=fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
|
|
|
|
|
|
close;sql.clear;
|
|
|
sql.add('select sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_order where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><>0 and OR_ID='+DataSet.fieldbyname('OR_ID').AsString);
|
|
|
open;
|
|
|
AmtCr:=fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
|
|
|
|
|
|
close;sql.clear;
|
|
|
sql.add('Update t_op_seae_order set <20><><EFBFBD>˷<EFBFBD>=:<3A><><EFBFBD>˷<EFBFBD>,ë<><C3AB><EFBFBD><EFBFBD>=:ë<><C3AB><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.add('where OR_ID=:OR_ID');
|
|
|
Parameters.ParamByName('OR_ID').Value:=DataSet.fieldbyname('OR_ID').AsInteger;
|
|
|
Parameters.ParamByName('<27><><EFBFBD>˷<EFBFBD>').Value:=HYF;
|
|
|
Parameters.ParamByName('ë<><C3AB><EFBFBD><EFBFBD>').Value:=AmtDr-AmtCr;
|
|
|
if AmtDr<>0 then
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=StrToFloat(FormatFloat('0.00;-0.00;0',(AmtDr-AmtCr)/AmtDr))
|
|
|
else Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=0;
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
finally
|
|
|
freeandnil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_payAfterPost(DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TAdOQuery;
|
|
|
AmtDr,AmtCr,HYF:double;
|
|
|
begin
|
|
|
|
|
|
AmtDr:=0;
|
|
|
AmtCr:=0;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do
|
|
|
begin
|
|
|
sql.add('select ');
|
|
|
sql.add('sum(case when <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>˷<EFBFBD>'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) USDDR');
|
|
|
sql.add(',sum(case when <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>˷<EFBFBD>'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) USDCR');
|
|
|
sql.add('from t_ch_fee_order');
|
|
|
sql.add('where OR_ID=:OR_ID');
|
|
|
Parameters.ParamByName('OR_ID').Value:=DataSet.fieldbyname('OR_ID').AsInteger;
|
|
|
open;First;
|
|
|
if not IsEmpty then
|
|
|
begin
|
|
|
HYF:=fieldbyname('USDDR').AsFloat-fieldbyname('USDCR').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
HYF:=0;
|
|
|
end;
|
|
|
|
|
|
close;sql.clear;
|
|
|
sql.add('select sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as Ӧ<>ս<EFBFBD><D5BD><EFBFBD> from t_ch_fee_order where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><>0 and OR_ID='+DataSet.fieldbyname('OR_ID').AsString);
|
|
|
open;
|
|
|
AmtDr:=fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
|
|
|
|
|
|
close;sql.clear;
|
|
|
sql.add('select sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_order where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><>0 and OR_ID='+DataSet.fieldbyname('OR_ID').AsString);
|
|
|
open;
|
|
|
AmtCr:=fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
|
|
|
|
|
|
close;sql.clear;
|
|
|
sql.add('Update t_op_seae_order set <20><><EFBFBD>˷<EFBFBD>=:<3A><><EFBFBD>˷<EFBFBD>,ë<><C3AB><EFBFBD><EFBFBD>=:ë<><C3AB><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.add('where OR_ID=:OR_ID');
|
|
|
Parameters.ParamByName('OR_ID').Value:=DataSet.fieldbyname('OR_ID').AsInteger;
|
|
|
Parameters.ParamByName('<27><><EFBFBD>˷<EFBFBD>').Value:=HYF;
|
|
|
Parameters.ParamByName('ë<><C3AB><EFBFBD><EFBFBD>').Value:=AmtDr-AmtCr;
|
|
|
if AmtDr<>0 then
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=StrToFloat(FormatFloat('0.00;-0.00;0',(AmtDr-AmtCr)/AmtDr))
|
|
|
else Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=0;
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
finally
|
|
|
freeandnil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo10Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter(RxDBLookupCombo10);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo10Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboExit(RxDBLookupCombo10);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo20Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo20.LookupDisplay:='<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>;<3B><><EFBFBD><EFBFBD>';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo20Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo20.LookupDisplay:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton17Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_ch_pay.IsEmpty then
|
|
|
exit;
|
|
|
table_post(t_ch_pay);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton16Click(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
Pnt:=bsSkinButton16.ClientToScreen(Point(0,bsSkinButton16.Height));
|
|
|
PopupMenu4.Popup(Pnt.x,Pnt.y);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton18Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_pay.delete;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton19Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_ch_pay);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton20Click(Sender: TObject);
|
|
|
var aadoquery:TADOQuery;
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
aadoquery:=CreateAdoQuery;
|
|
|
with aadoquery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('select count(*) c from t_ch_project_order');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD>˾=:<3A><><EFBFBD><EFBFBD>˾');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>˾').Value:=t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString;
|
|
|
Open;First;
|
|
|
if FieldByName('c').AsInteger<=0 then
|
|
|
begin
|
|
|
ShowMessage(t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+' û<>з<EFBFBD><D0B7>ʷ<EFBFBD><CAB7><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
try
|
|
|
if not assigned(frm_code_fee_project_order_add) then
|
|
|
frm_code_fee_project_order_add:=tfrm_code_fee_project_order_add.Create (self);
|
|
|
frm_code_fee_project_order_add.op_type.text:='1';
|
|
|
frm_code_fee_project_order_add.fee_type.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
frm_code_fee_project_order_add.t_ch_project.Filtered:=False;
|
|
|
if t_op_seae_order.FieldByName('<27><>վ').AsString<>''then
|
|
|
frm_code_fee_project_order_add.t_ch_project.Filter:='<27><><EFBFBD><EFBFBD>˾='+''''+t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+''''+' and <20><>վ='+''''+t_op_seae_order.FieldByName('<27><>վ').AsString+''''
|
|
|
else frm_code_fee_project_order_add.t_ch_project.Filter:='<27><><EFBFBD><EFBFBD>˾='+''''+t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+'''';
|
|
|
|
|
|
|
|
|
frm_code_fee_project_order_add.t_ch_project.Filtered:=true;
|
|
|
frm_code_fee_project_order_add.t_op_bill1.Enabled:=false;
|
|
|
frm_code_fee_project_order_add.t_op_bill1.DataSet:=t_ch_pay.DataSource.DataSet;
|
|
|
frm_code_fee_project_order_add.t_op_bill1.Enabled:=true;
|
|
|
frm_code_fee_project_order_add.t_ch_fee1.Enabled:=false;
|
|
|
frm_code_fee_project_order_add.t_ch_fee1.DataSet:=t_ch_pay;
|
|
|
frm_code_fee_project_order_add.t_ch_fee1.Enabled:=true;
|
|
|
|
|
|
frm_code_fee_project_order_add.ShowModal;
|
|
|
finally
|
|
|
frm_code_fee_project_order_add.free;
|
|
|
frm_code_fee_project_order_add:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_op_seae_orderAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>˾']:='';
|
|
|
DataSet['<27><>վ']:='';
|
|
|
DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>Ӷ']:=0;
|
|
|
DataSet['ë<><C3AB><EFBFBD><EFBFBD>']:=0;
|
|
|
DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>ʽ']:='<27><>ͨ';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_payBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_acceptBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton22Click(Sender: TObject);
|
|
|
var aadoQuery:TadoQuery;
|
|
|
begin
|
|
|
if bsSkinExPanel1.Visible then
|
|
|
bsSkinExPanel1.Visible:=false
|
|
|
else bsSkinExPanel1.Visible:=True;
|
|
|
|
|
|
|
|
|
with ADOQuery_wf do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select t_workflow_do.<2E><>ǰ״̬,t_workflow_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_workflow_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_workflow_step.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_workflow.·<><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add('from t_workflow_do');
|
|
|
sql.Add('Left join t_workflow_step on t_workflow_do.WI_ID=t_workflow_step.WI_ID');
|
|
|
sql.Add('Left join t_workflow on t_workflow_do.W_ID=t_workflow.W_ID');
|
|
|
sql.Add('where t_workflow_do.or_id=:or_id');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.fieldbyname('or_id').AsInteger;
|
|
|
Open;First;
|
|
|
finally
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
if key=#13 then
|
|
|
begin
|
|
|
//<2F>ұ<EFBFBD>
|
|
|
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
|
|
|
begin
|
|
|
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo5.text,[])THEN
|
|
|
begin
|
|
|
if wwDBLookupCombo5.text='USD' then begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(184,'true')) then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo5.text)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_accept.datasource.dataset.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>ͨ<EFBFBD><CDA8>' then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo5.text)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo5.text)
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo5.text)
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo5Change(Sender: TObject);
|
|
|
begin
|
|
|
//<2F>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
|
|
|
begin
|
|
|
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo5.text,[])THEN
|
|
|
begin
|
|
|
if wwDBLookupCombo5.text='USD' then begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(184,'true')) then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo5.text)
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo5.text)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo5.text)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton23Click(Sender: TObject);
|
|
|
var aadoquery:TADOQuery;
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
{
|
|
|
aadoquery:=CreateAdoQuery;
|
|
|
with aadoquery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('select count(*) c from t_ch_project_order');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD>˾=:<3A><><EFBFBD><EFBFBD>˾');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>˾').Value:=t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString;
|
|
|
Open;First;
|
|
|
if FieldByName('c').AsInteger<=0 then
|
|
|
begin
|
|
|
ShowMessage(t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+' û<>з<EFBFBD><D0B7>ʷ<EFBFBD><CAB7><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
}
|
|
|
try
|
|
|
if not assigned(frm_code_fee_project_order_add) then
|
|
|
frm_code_fee_project_order_add:=tfrm_code_fee_project_order_add.Create (self);
|
|
|
frm_code_fee_project_order_add.op_type.text:='1';
|
|
|
frm_code_fee_project_order_add.fee_type.text:='<27>շ<EFBFBD>';
|
|
|
{
|
|
|
frm_code_fee_project_order_add.t_ch_project.Filtered:=False;
|
|
|
frm_code_fee_project_order_add.t_ch_project.Filter:='<27><><EFBFBD><EFBFBD>˾='+''''+t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+''''+' and <20><>վ='+''''+t_op_seae_order.FieldByName('<27><>վ').AsString+'''';
|
|
|
frm_code_fee_project_order_add.t_ch_project.Filtered:=true;
|
|
|
}
|
|
|
frm_code_fee_project_order_add.t_op_bill1.Enabled:=false;
|
|
|
frm_code_fee_project_order_add.t_op_bill1.DataSet:=t_ch_pay.DataSource.DataSet;
|
|
|
frm_code_fee_project_order_add.t_op_bill1.Enabled:=true;
|
|
|
frm_code_fee_project_order_add.t_ch_fee1.Enabled:=false;
|
|
|
frm_code_fee_project_order_add.t_ch_fee1.DataSet:=t_ch_pay;
|
|
|
frm_code_fee_project_order_add.t_ch_fee1.Enabled:=true;
|
|
|
frm_code_fee_project_order_add.ShowModal;
|
|
|
finally
|
|
|
frm_code_fee_project_order_add.free;
|
|
|
frm_code_fee_project_order_add:=nil;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo7Change(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TAdOQuery;
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
with aQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Select * from t_crm_client_yard');
|
|
|
sql.Add('where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20>Ƿ<EFBFBD>Ĭ<EFBFBD><C4AC>=1');
|
|
|
Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=RxDBLookupCombo7.DisplayValues[1];
|
|
|
Open;First;
|
|
|
if not IsEmpty then
|
|
|
begin
|
|
|
t_op_seae_order['<27><>վ']:=fieldbyname('<27><>վ').asstring;
|
|
|
t_op_seae_order['Ĭ<>ϳ<EFBFBD>վ']:=fieldbyname('<27><>վ').asstring;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_op_seae_order['<27><>վ']:='';
|
|
|
t_op_seae_order['Ĭ<>ϳ<EFBFBD>վ']:='';
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo7Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter(RxDBLookupCombo7);
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo7Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboExit(RxDBLookupCombo7);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.N5Click(Sender: TObject);
|
|
|
var
|
|
|
afield,afieldfee : variant;
|
|
|
aOR_ID:integer;
|
|
|
aQuery:TAdoQuery;
|
|
|
i:integer;
|
|
|
s,poNO:string;
|
|
|
Boolean_Ctn:Boolean;
|
|
|
|
|
|
begin
|
|
|
if t_op_seae_order.IsEmpty then
|
|
|
begin
|
|
|
exit;
|
|
|
MessageDlg('û<>и<EFBFBD><D0B8>Ƶ<EFBFBD><C6B5><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD>',mtWarning,[mbok],0);
|
|
|
end;
|
|
|
if t_op_seae_order.fieldbyname('״̬').Value<>'<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>' then
|
|
|
begin
|
|
|
MessageDlg('ֻ<><D6BB>ԭʼҵ<CABC><D2B5><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD><DCB6>ղſ<D5B2><C5BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>밶ҵ<EBB0B6><D2B5><EFBFBD><EFBFBD>',mtWarning,[mbok],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
|
|
|
Boolean_Ctn:=false;
|
|
|
afield := vararraycreate([0,t_op_seae_order.fieldcount-1],varvariant);
|
|
|
for i := 0 to (t_op_seae_order.fieldcount-1) do
|
|
|
begin
|
|
|
afield[i] :=t_op_seae_order.fields[i].value ;
|
|
|
end;
|
|
|
aOR_ID:=t_op_seae_order.fieldbyname('OR_ID').AsInteger;
|
|
|
|
|
|
s:=t_op_seae_order.fieldbyname('<27><>װ<EFBFBD><D7B0>').AsString;
|
|
|
poNO:=t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString;
|
|
|
|
|
|
t_op_seae_order.append;
|
|
|
for i := 0 to (t_op_seae_order.fieldcount-1) do
|
|
|
begin
|
|
|
if t_op_seae_order.fields[i].FieldName<>'OR_ID' then
|
|
|
t_op_seae_order.fields[i].value := afield[i] ;
|
|
|
end;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=employee;
|
|
|
t_op_seae_order.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').Value:=employee;
|
|
|
t_op_seae_order.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=date;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=date;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>˷<EFBFBD>').Value:=0;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>').Value:=department;
|
|
|
t_op_seae_order.fieldbyname('״̬').Value:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').Value:='HK:'+poNO;
|
|
|
|
|
|
|
|
|
t_op_seae_order.fieldbyname('״̬').Value:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27>ύ<EFBFBD><E1BDBB>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27>ύʱ<E1BDBB><CAB1>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Value:=null;
|
|
|
|
|
|
|
|
|
t_op_seae_order.fieldbyname('<27><>װ<EFBFBD><D7B0>').Value:=s;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>˷<EFBFBD>').Value:=0;
|
|
|
t_op_seae_order.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').Value:=0;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
|
|
|
t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>ʽ').Value:='<27>밶';
|
|
|
|
|
|
t_op_seae_order.Post;
|
|
|
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
close;sql.clear;
|
|
|
sql.Add('select * from t_opor_ctn where OR_ID='+inttostr(aOR_ID));
|
|
|
open;
|
|
|
if not t_op_ctn.active then
|
|
|
t_op_ctn.Open;
|
|
|
first;
|
|
|
while not eof do begin
|
|
|
Boolean_Ctn:=true;
|
|
|
t_op_ctn.Insert;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27>ߴ<EFBFBD>').AsString:=aQuery.fieldbyname('<27>ߴ<EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger;
|
|
|
t_op_ctn.fieldbyname('TEU').Asinteger:=aQuery.fieldbyname('TEU').Asinteger;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><>װ').AsString:=aQuery.fieldbyname('<27><>װ').AsString;
|
|
|
t_op_ctn.fieldbyname('Ʒ<><C6B7>').AsString:=aQuery.fieldbyname('Ʒ<><C6B7>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><>ͷ').AsString:=aQuery.fieldbyname('<27><>ͷ').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><>ע').AsString:=aQuery.fieldbyname('<27><>ע').AsString;
|
|
|
t_op_ctn.Post;
|
|
|
next;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
freeandnil(aQuery);
|
|
|
end;
|
|
|
t_op_seae_order.Edit;
|
|
|
// t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_op_seae_order['״̬']:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_seae_order['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_seae_order['<27>ύ<EFBFBD><E1BDBB>']:='';
|
|
|
t_op_seae_order['<27>ύʱ<E1BDBB><CAB1>']:=null;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
t_op_seae_order['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:='';
|
|
|
|
|
|
if not Boolean_Ctn then
|
|
|
t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
|
|
|
|
|
|
// t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:=s;
|
|
|
t_op_seae_order.post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.MenuItem1Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
t_ch_pay.Append;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.N75Click(Sender: TObject);
|
|
|
var
|
|
|
i,k:integer;
|
|
|
begin
|
|
|
//Ӧ<><D3A6><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>Ƶ<EFBFBD>Ӧ<EFBFBD><D3A6>
|
|
|
if t_ch_pay.IsEmpty then
|
|
|
exit;
|
|
|
try
|
|
|
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
|
|
|
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil; if wwDBGrid2.SelectedList.Count>=1 then
|
|
|
begin
|
|
|
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
|
|
|
begin
|
|
|
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
|
|
|
t_ch_accept.append;
|
|
|
for k:= 0 to (t_ch_pay.fieldcount-1) do
|
|
|
begin
|
|
|
if t_ch_accept.FindField(t_ch_pay.fields[k].FieldName)<>nil then
|
|
|
if (t_ch_pay.fields[k].FieldName<>'CH_ID') and (t_ch_pay.fields[k].DataType<>ftDateTime) then
|
|
|
t_ch_accept.FindField(t_ch_pay.fields[k].FieldName).value:=t_ch_pay.fields[k].value ;
|
|
|
end;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
|
|
|
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
|
|
|
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
|
|
|
|
|
|
t_ch_accept.post;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_accept.append;
|
|
|
for k:= 0 to (t_ch_pay.fieldcount-1) do
|
|
|
begin
|
|
|
if t_ch_accept.FindField(t_ch_pay.fields[k].FieldName)<>nil then
|
|
|
if (t_ch_pay.fields[k].FieldName<>'CH_ID') and (t_ch_pay.fields[k].DataType<>ftDateTime) then
|
|
|
t_ch_accept.FindField(t_ch_pay.fields[k].FieldName).value:=t_ch_pay.fields[k].value ;
|
|
|
end;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
|
|
|
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
|
|
|
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept.post;
|
|
|
end;
|
|
|
finally
|
|
|
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.N77Click(Sender: TObject);
|
|
|
var
|
|
|
k:integer;
|
|
|
begin
|
|
|
//Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>Ӧ<EFBFBD><D3A6>
|
|
|
if t_ch_pay.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
try
|
|
|
t_ch_pay.DisableControls;
|
|
|
if t_ch_accept.Active then
|
|
|
begin
|
|
|
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
|
|
|
t_ch_accept.AfterPost:=nil;
|
|
|
end;
|
|
|
t_ch_pay.first;
|
|
|
while not t_ch_pay.eof do
|
|
|
begin
|
|
|
t_ch_accept.append;
|
|
|
for k:= 0 to (t_ch_pay.fieldcount-1) do
|
|
|
begin
|
|
|
if t_ch_accept.FindField(t_ch_pay.fields[k].FieldName)<>nil then
|
|
|
if (t_ch_pay.fields[k].FieldName<>'CH_ID') and (t_ch_pay.fields[k].DataType<>ftDateTime) then
|
|
|
t_ch_accept.FindField(t_ch_pay.fields[k].FieldName).value:=t_ch_pay.fields[k].value ;
|
|
|
end;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
|
|
|
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
|
|
|
|
|
|
if t_ch_accept['˰<><CBB0>']<=0 then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],[]) then
|
|
|
begin
|
|
|
if not frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').IsNull then
|
|
|
t_ch_accept['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat
|
|
|
end;
|
|
|
t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*t_ch_accept.fieldbyname('˰<><CBB0>').asfloat/100+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
t_ch_accept['˰<><CBB0>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*t_ch_accept.fieldbyname('˰<><CBB0>').asfloat/100*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-t_ch_accept.fieldbyname('˰<><CBB0>').asfloat);
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
end;
|
|
|
|
|
|
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
|
|
|
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
|
|
|
|
|
|
t_ch_accept.post;
|
|
|
|
|
|
|
|
|
t_ch_pay.next;
|
|
|
end;
|
|
|
finally
|
|
|
t_ch_pay.EnableControls;
|
|
|
|
|
|
if t_ch_accept.Active then
|
|
|
begin
|
|
|
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
t_ch_accept.AfterPost:=t_ch_acceptAfterPost;
|
|
|
t_ch_accept.Edit;
|
|
|
t_ch_accept.Post;
|
|
|
// t_op_seae_order.Refresh;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.bsSkinButton24Click(Sender: TObject);
|
|
|
var aadoquery:TADOQuery;
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
aadoquery:=CreateAdoQuery;
|
|
|
with aadoquery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('select count(*) c from t_ch_project_order');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD>˾=''''');
|
|
|
Open;First;
|
|
|
if FieldByName('c').AsInteger<=0 then
|
|
|
begin
|
|
|
ShowMessage(t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+' û<>з<EFBFBD><D0B7>ʷ<EFBFBD><CAB7><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
try
|
|
|
if not assigned(frm_code_fee_project_order_add) then
|
|
|
frm_code_fee_project_order_add:=tfrm_code_fee_project_order_add.Create (self);
|
|
|
frm_code_fee_project_order_add.op_type.text:='1';
|
|
|
frm_code_fee_project_order_add.fee_type.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
frm_code_fee_project_order_add.t_ch_project.Filtered:=False;
|
|
|
frm_code_fee_project_order_add.t_ch_project.Filter:='<27><><EFBFBD><EFBFBD>˾='+'''''';
|
|
|
// ShowMessage(frm_code_fee_project_order_add.t_ch_project.Filter);
|
|
|
|
|
|
|
|
|
frm_code_fee_project_order_add.t_ch_project.Filtered:=true;
|
|
|
frm_code_fee_project_order_add.t_op_bill1.Enabled:=false;
|
|
|
frm_code_fee_project_order_add.t_op_bill1.DataSet:=t_ch_pay.DataSource.DataSet;
|
|
|
frm_code_fee_project_order_add.t_op_bill1.Enabled:=true;
|
|
|
frm_code_fee_project_order_add.t_ch_fee1.Enabled:=false;
|
|
|
frm_code_fee_project_order_add.t_ch_fee1.DataSet:=t_ch_pay;
|
|
|
frm_code_fee_project_order_add.t_ch_fee1.Enabled:=true;
|
|
|
|
|
|
frm_code_fee_project_order_add.ShowModal;
|
|
|
finally
|
|
|
frm_code_fee_project_order_add.free;
|
|
|
frm_code_fee_project_order_add:=nil;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.dxDBGrid1Column40CustomDraw(
|
|
|
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;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo15DropDown(
|
|
|
Sender: TObject);
|
|
|
var
|
|
|
str_list:Tstringlist;
|
|
|
i,k:Integer;
|
|
|
begin
|
|
|
t_bz_balance.close;
|
|
|
t_bz_balance.open;
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='1-<2D><>Ʊ';
|
|
|
t_bz_balance['two']:='<27><>Ʊ';
|
|
|
t_bz_balance['three']:=1;
|
|
|
t_bz_balance.post;
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
|
|
|
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
|
|
|
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000);
|
|
|
t_bz_balance.post;
|
|
|
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
|
|
|
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
|
|
|
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
t_bz_balance['three']:=1;
|
|
|
t_bz_balance.post;
|
|
|
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='4-TEU';
|
|
|
t_bz_balance['two']:='TEU';
|
|
|
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>TEU').asinteger;
|
|
|
t_bz_balance.post;
|
|
|
|
|
|
|
|
|
try
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='5-<2D>ƷѶ<C6B7>';
|
|
|
t_bz_balance['two']:='<27>ƷѶ<C6B7>';
|
|
|
|
|
|
|
|
|
|
|
|
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
|
|
|
begin
|
|
|
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
t_bz_balance['three']:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
t_bz_balance['three']:=1;
|
|
|
end;
|
|
|
t_bz_balance.post;
|
|
|
str_list:=Tstringlist.Create();
|
|
|
str_list.Text:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ʒѱ<C6B7>').asstring;
|
|
|
for i:=0 to str_list.Count-1 do
|
|
|
begin
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:=inttostr(i+k+6)+'-'+copy(str_list[i],1,pos('*',str_list[i])-1);
|
|
|
t_bz_balance['two']:=copy(str_list[i],pos('-',str_list[i])+1,length(str_list[i])+1-pos('-',str_list[i]));
|
|
|
t_bz_balance['three']:=strtofloat(copy(str_list[i],pos('*',str_list[i])+1,pos('-',str_list[i])-pos('*',str_list[i])-1));
|
|
|
t_bz_balance.post;
|
|
|
end;
|
|
|
except
|
|
|
;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo15Change(Sender: TObject);
|
|
|
var AAdoQuery : TADOQuery;
|
|
|
begin
|
|
|
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
|
|
|
begin
|
|
|
if not t_bz_balance.IsEmpty then
|
|
|
if t_bz_balance.Locate('one',wwDBLookupCombo15.text,[])then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=t_bz_balance.fieldbyname('three').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo16Change(Sender: TObject);
|
|
|
var AAdoQuery : TADOQuery;
|
|
|
begin
|
|
|
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
|
|
|
begin
|
|
|
if not t_bz_balance.IsEmpty then
|
|
|
if t_bz_balance.Locate('one',wwDBLookupCombo16.text,[])then
|
|
|
begin
|
|
|
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=t_bz_balance.fieldbyname('three').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.wwDBLookupCombo16DropDown(
|
|
|
Sender: TObject);
|
|
|
var
|
|
|
str_list:Tstringlist;
|
|
|
i,k:Integer;
|
|
|
begin
|
|
|
t_bz_balance.close;
|
|
|
t_bz_balance.open;
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='1-<2D><>Ʊ';
|
|
|
t_bz_balance['two']:='<27><>Ʊ';
|
|
|
t_bz_balance['three']:=1;
|
|
|
t_bz_balance.post;
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
|
|
|
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
|
|
|
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000);
|
|
|
t_bz_balance.post;
|
|
|
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
|
|
|
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
|
|
|
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
t_bz_balance['three']:=1;
|
|
|
t_bz_balance.post;
|
|
|
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='4-TEU';
|
|
|
t_bz_balance['two']:='TEU';
|
|
|
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>TEU').asinteger;
|
|
|
t_bz_balance.post;
|
|
|
|
|
|
|
|
|
try
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:='5-<2D>ƷѶ<C6B7>';
|
|
|
t_bz_balance['two']:='<27>ƷѶ<C6B7>';
|
|
|
|
|
|
|
|
|
|
|
|
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
|
|
|
begin
|
|
|
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
t_bz_balance['three']:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
t_bz_balance['three']:=1;
|
|
|
end;
|
|
|
t_bz_balance.post;
|
|
|
str_list:=Tstringlist.Create();
|
|
|
str_list.Text:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ʒѱ<C6B7>').asstring;
|
|
|
for i:=0 to str_list.Count-1 do
|
|
|
begin
|
|
|
t_bz_balance.Append;
|
|
|
t_bz_balance['one']:=inttostr(i+k+6)+'-'+copy(str_list[i],1,pos('*',str_list[i])-1);
|
|
|
t_bz_balance['two']:=copy(str_list[i],pos('-',str_list[i])+1,length(str_list[i])+1-pos('-',str_list[i]));
|
|
|
t_bz_balance['three']:=strtofloat(copy(str_list[i],pos('*',str_list[i])+1,pos('-',str_list[i])-pos('*',str_list[i])-1));
|
|
|
t_bz_balance.post;
|
|
|
end;
|
|
|
except
|
|
|
;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_payBeforeDelete(DataSet: TDataSet);
|
|
|
begin
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_acceptBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_acceptBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.t_ch_payBeforeInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo14Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter(RxDBLookupCombo14);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo14Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter(RxDBLookupCombo14);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo16Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter(RxDBLookupCombo16);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo_wf.RxDBLookupCombo16Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter(RxDBLookupCombo16);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|
|
|
|
|
|
|
|
|
|