|
|
unit u_op_seae_weituo;
|
|
|
|
|
|
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,DateUtils, bsSkinBoxCtrls;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_seae_weituo = 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;
|
|
|
t_ch_fee: TADOQuery;
|
|
|
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;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
Label26: TLabel;
|
|
|
t_ch_fee1: TDataSource;
|
|
|
t_bz_balance: TRxMemoryData;
|
|
|
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;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label124: TLabel;
|
|
|
Label15: TLabel;
|
|
|
Label13: TLabel;
|
|
|
Label35: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label12: TLabel;
|
|
|
Label20: TLabel;
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
DBEdit5: TDBEdit;
|
|
|
RxDBLookupCombo28: TRxDBLookupCombo;
|
|
|
bsSkinGroupBox5: TbsSkinGroupBox;
|
|
|
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox9: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
|
wwDBGrid1: TwwDBGrid;
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo5: TwwDBLookupCombo;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
bsSkinButton13: TbsSkinButton;
|
|
|
bsSkinButton14: TbsSkinButton;
|
|
|
wwDBLookupCombo4: TwwDBLookupCombo;
|
|
|
wwDBComboBox3: TwwDBComboBox;
|
|
|
wwDBComboBox4: TwwDBComboBox;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
|
|
|
DBMemo1: TDBMemo;
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
wwDBDateTimePicker7: TwwDBDateTimePicker;
|
|
|
bsSkinGroupBox3: TbsSkinGroupBox;
|
|
|
Label16: TLabel;
|
|
|
Label17: TLabel;
|
|
|
Label18: TLabel;
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
DBEdit3: TDBEdit;
|
|
|
DBMemo2: TDBMemo;
|
|
|
Label122: TLabel;
|
|
|
DBMemo33: TDBMemo;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo6: TwwDBLookupCombo;
|
|
|
Label121: TLabel;
|
|
|
RxDBLookupCombo5: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo7: TwwDBLookupCombo;
|
|
|
DBMemo34: TDBMemo;
|
|
|
DBMemo35: TDBMemo;
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo8: TwwDBLookupCombo;
|
|
|
Label123: TLabel;
|
|
|
Label21: TLabel;
|
|
|
DBMemo39: TDBMemo;
|
|
|
Label163: TLabel;
|
|
|
DBMemo38: TDBMemo;
|
|
|
Label165: TLabel;
|
|
|
DBMemo40: TDBMemo;
|
|
|
Label166: TLabel;
|
|
|
DBMemo41: TDBMemo;
|
|
|
Label167: TLabel;
|
|
|
DBMemo42: TDBMemo;
|
|
|
wwDBLookupCombo61: TwwDBLookupCombo;
|
|
|
DBEdit81: TDBEdit;
|
|
|
DBEdit82: TDBEdit;
|
|
|
Label169: TLabel;
|
|
|
DBEdit83: TDBEdit;
|
|
|
Label170: TLabel;
|
|
|
Label32: TLabel;
|
|
|
wwDBLookupCombo21: TwwDBLookupCombo;
|
|
|
Label27: TLabel;
|
|
|
DBEdit25: TDBEdit;
|
|
|
Label30: TLabel;
|
|
|
RxDBLookupCombo15: TRxDBLookupCombo;
|
|
|
Label22: TLabel;
|
|
|
wwDBLookupCombo9: TwwDBLookupCombo;
|
|
|
qrysales: TADOQuery;
|
|
|
dsrsales: TDataSource;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
N3: TMenuItem;
|
|
|
lblsales: TLabel;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridColumn;
|
|
|
Label23: TLabel;
|
|
|
DBEdit4: TDBEdit;
|
|
|
Label24: TLabel;
|
|
|
DBEdit6: TDBEdit;
|
|
|
dxDBGrid1Column14: TdxDBGridColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridColumn;
|
|
|
Label25: TLabel;
|
|
|
DBEdit7: TDBEdit;
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
Label28: TLabel;
|
|
|
RxDBLookupCombo7: TRxDBLookupCombo;
|
|
|
dxDBGrid1Column18: TdxDBGridColumn;
|
|
|
wwDBComboBox5: TwwDBComboBox;
|
|
|
Label29: TLabel;
|
|
|
dxDBGrid1Column19: TdxDBGridColumn;
|
|
|
Label31: TLabel;
|
|
|
wwDBLookupCombo10: TwwDBLookupCombo;
|
|
|
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;
|
|
|
bsSkinButton21: TbsSkinButton;
|
|
|
RxDBLookupCombo9: TRxDBLookupCombo;
|
|
|
Label33: TLabel;
|
|
|
DBEdit37: TDBEdit;
|
|
|
Label108: TLabel;
|
|
|
DBEdit38: TDBEdit;
|
|
|
Label109: TLabel;
|
|
|
wwDBComboBox8: TwwDBComboBox;
|
|
|
Label119: TLabel;
|
|
|
dxDBGrid1Column33: TdxDBGridColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridColumn;
|
|
|
dxDBGrid1Column35: TdxDBGridColumn;
|
|
|
Label34: TLabel;
|
|
|
DBEdit8: TDBEdit;
|
|
|
dxDBGrid1Column36: TdxDBGridColumn;
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
t_ch_accept: TADOQuery;
|
|
|
t_ch_accept1: TDataSource;
|
|
|
t_ch_pay: TADOQuery;
|
|
|
t_ch_pay1: TDataSource;
|
|
|
t_op_seae: TADOQuery;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
dxDBGrid2Column2: TdxDBGridColumn;
|
|
|
dxDBGrid2Column3: TdxDBGridColumn;
|
|
|
dxDBGrid2Column4: TdxDBGridColumn;
|
|
|
dxDBGrid2Column5: TdxDBGridColumn;
|
|
|
dxDBGrid2Column6: TdxDBGridColumn;
|
|
|
dxDBGrid2Column7: TdxDBGridColumn;
|
|
|
dxDBGrid2Column8: TdxDBGridColumn;
|
|
|
dxDBGrid2Column9: TdxDBGridColumn;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
dxDBGridColumn7: TdxDBGridColumn;
|
|
|
dxDBGridColumn8: TdxDBGridColumn;
|
|
|
dxDBGridColumn9: TdxDBGridColumn;
|
|
|
dxDBGridColumn10: TdxDBGridColumn;
|
|
|
Panel1: TPanel;
|
|
|
Memo1: TMemo;
|
|
|
bsSkinButton18: TbsSkinButton;
|
|
|
ADOQuery1: TADOQuery;
|
|
|
t_op_seae1: TDataSource;
|
|
|
t_op_fee: TADOQuery;
|
|
|
t_op_ctn_insert: TADOQuery;
|
|
|
bsSkinTabSheet4: TbsSkinTabSheet;
|
|
|
DBMemo3: TDBMemo;
|
|
|
DBMemo4: TDBMemo;
|
|
|
DBMemo5: TDBMemo;
|
|
|
Label36: TLabel;
|
|
|
Label37: TLabel;
|
|
|
Label38: TLabel;
|
|
|
t_op_seae_act1: TDataSource;
|
|
|
t_op_seae_act: TADOQuery;
|
|
|
DBEdit9: TDBEdit;
|
|
|
Label40: TLabel;
|
|
|
Label41: TLabel;
|
|
|
DBMemo6: TDBMemo;
|
|
|
Label42: TLabel;
|
|
|
DBMemo7: TDBMemo;
|
|
|
DBEdit10: TDBEdit;
|
|
|
wwDBLookupCombo11: TwwDBLookupCombo;
|
|
|
DBMemo8: TDBMemo;
|
|
|
DBMemo9: TDBMemo;
|
|
|
DBEdit11: TDBEdit;
|
|
|
DBEdit12: TDBEdit;
|
|
|
RxDBLookupCombo10: TRxDBLookupCombo;
|
|
|
DBEdit13: TDBEdit;
|
|
|
Label44: TLabel;
|
|
|
Label45: TLabel;
|
|
|
Label46: TLabel;
|
|
|
Label47: TLabel;
|
|
|
Label48: TLabel;
|
|
|
wwDBLookupCombo12: TwwDBLookupCombo;
|
|
|
Label11: TLabel;
|
|
|
RxDBLookupCombo8: TRxDBLookupCombo;
|
|
|
Label1: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
dxDBGrid1Column37: TdxDBGridColumn;
|
|
|
Label43: TLabel;
|
|
|
DBMemo10: TDBMemo;
|
|
|
RxDBLookupCombo19: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo13: TwwDBLookupCombo;
|
|
|
Edit2: TEdit;
|
|
|
Button1: TButton;
|
|
|
dxDBGrid1Column38: TdxDBGridColumn;
|
|
|
Label49: TLabel;
|
|
|
Edit3: TEdit;
|
|
|
Label50: TLabel;
|
|
|
DBEdit14: TDBEdit;
|
|
|
Label51: TLabel;
|
|
|
DBEdit15: TDBEdit;
|
|
|
Label52: TLabel;
|
|
|
DBEdit16: TDBEdit;
|
|
|
Label53: TLabel;
|
|
|
DBEdit17: TDBEdit;
|
|
|
bsSkinDBCheckRadioBox8: TbsSkinDBCheckRadioBox;
|
|
|
Edit4: TEdit;
|
|
|
Edit5: TEdit;
|
|
|
Edit6: TEdit;
|
|
|
CheckBox1: TCheckBox;
|
|
|
Edit7: TEdit;
|
|
|
bsSkinDBComboBox1: TbsSkinDBComboBox;
|
|
|
bsSkinLabel1: TbsSkinLabel;
|
|
|
Label54: TLabel;
|
|
|
RxDBLookupCombo31: TRxDBLookupCombo;
|
|
|
Label55: TLabel;
|
|
|
wwDBComboBox9: TwwDBComboBox;
|
|
|
dxDBGrid1Column39: TdxDBGridColumn;
|
|
|
dxDBGrid1Column41: TdxDBGridColumn;
|
|
|
dxDBGrid1Column42: TdxDBGridColumn;
|
|
|
Label56: TLabel;
|
|
|
RxDBLookupCombo16: TRxDBLookupCombo;
|
|
|
Label57: TLabel;
|
|
|
RxDBLookupCombo17: TRxDBLookupCombo;
|
|
|
Label73: TLabel;
|
|
|
dxDBGrid1Column43: TdxDBGridColumn;
|
|
|
dxDBGrid1Column44: TdxDBGridCheckColumn;
|
|
|
bsSkinButton16: TbsSkinButton;
|
|
|
t_op_seae2: TADOQuery;
|
|
|
wwDBLookupCombo25: TwwDBLookupCombo;
|
|
|
bsSkinButton17: TbsSkinButton;
|
|
|
bsSkinButton19: TbsSkinButton;
|
|
|
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 bsSkinButton8Click(Sender: TObject);
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
procedure bsSkinButton13Click(Sender: TObject);
|
|
|
procedure bsSkinButton14Click(Sender: TObject);
|
|
|
procedure t_op_seae_orderBeforePost(DataSet: TDataSet);
|
|
|
procedure t_ch_feeAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_ch_feeBeforePost(DataSet: TDataSet);
|
|
|
procedure t_op_seae_orderBeforeEdit(DataSet: TDataSet);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure DBEdit5Click(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo3Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo5Change(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 t_ch_feeAfterOpen(DataSet: TDataSet);
|
|
|
procedure t_ch_feeAfterPost(DataSet: TDataSet);
|
|
|
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 wwDBComboBox3DropDown(Sender: TObject);
|
|
|
procedure wwDBComboBox4DropDown(Sender: TObject);
|
|
|
procedure bsSkinPageControl2Change(Sender: TObject);
|
|
|
procedure bsSkinButton18Click(Sender: TObject);
|
|
|
procedure t_op_ctn_insertAfterInsert(DataSet: TDataSet);
|
|
|
procedure wwDBComboBox3Change(Sender: TObject);
|
|
|
procedure wwDBComboBox4Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo19Change(Sender: TObject);
|
|
|
procedure Button1Click(Sender: TObject);
|
|
|
procedure RxDBLookupCombo31Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo31Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo31Exit(Sender: TObject);
|
|
|
procedure wwDBComboBox9DropDown(Sender: TObject);
|
|
|
procedure bsSkinButton16Click(Sender: TObject);
|
|
|
procedure t_op_seaeBeforeRefresh(DataSet: TDataSet);
|
|
|
procedure bsSkinButton17Click(Sender: TObject);
|
|
|
procedure bsSkinButton19Click(Sender: TObject);
|
|
|
private
|
|
|
procedure t_billsalescharge(Sender: TField);
|
|
|
procedure OpFeeItem(bsNo:string);
|
|
|
function checkctn(aOR_ID:integer):Boolean;
|
|
|
procedure t_ch_acceptdjoncharge(Sender: TField);
|
|
|
procedure t_ch_paydjoncharge(Sender: TField);
|
|
|
procedure getsumstr;
|
|
|
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seae_weituo: Tfrm_op_seae_weituo;
|
|
|
|
|
|
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,u_op_seae_oder_add,
|
|
|
u_op_seaewt_pladd, u_op_seae_oder_pladd;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.getsumstr;
|
|
|
var
|
|
|
aQuery1,aQuery2:TAdoQuery;
|
|
|
str1,str2:string;
|
|
|
acceptstr,paystr:widestring;
|
|
|
accepteof,payeof:boolean;
|
|
|
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
memo1.Lines.Clear;
|
|
|
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
|
|
|
aQuery1:=CreateAdoQuery;
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
|
|
|
armb:=0;
|
|
|
ausd:=0;
|
|
|
aot:=0;
|
|
|
atotal:=0;
|
|
|
prmb:=0;
|
|
|
pusd:=0;
|
|
|
pot:=0;
|
|
|
ptotal:=0;
|
|
|
|
|
|
try
|
|
|
accepteof:=false;
|
|
|
payeof:=false;
|
|
|
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
|
|
|
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
|
|
|
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
|
|
|
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
|
|
|
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else begin
|
|
|
acceptstr:=new_query(t_ch_accept);
|
|
|
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
|
|
|
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
|
|
|
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
|
|
|
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
aQuery1.DataSource:=t_ch_accept.DataSource;
|
|
|
end;
|
|
|
aQuery1.Open;
|
|
|
aQuery1.first;
|
|
|
|
|
|
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
|
|
|
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
|
|
|
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
|
|
|
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
|
|
|
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else begin
|
|
|
paystr:=new_query(t_ch_pay);
|
|
|
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
|
|
|
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
|
|
|
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
|
|
|
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
aQuery2.DataSource:=t_ch_pay.DataSource;
|
|
|
end;
|
|
|
aQuery2.Open;
|
|
|
aQuery2.first;
|
|
|
while (not aQuery1.Eof) or (not aQuery2.Eof) do begin
|
|
|
if aQuery1.Eof then begin
|
|
|
str1:=FixLenStr('',72);
|
|
|
end else begin
|
|
|
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
|
|
|
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
|
|
|
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
|
|
|
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
|
|
|
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
|
|
|
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
|
|
|
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
|
|
|
aQuery1.Next;
|
|
|
end;
|
|
|
if aQuery2.Eof then begin
|
|
|
str2:=FixLenStr('',72);
|
|
|
end else begin
|
|
|
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
|
|
|
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
|
|
|
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
|
|
|
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
|
|
|
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
|
|
|
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
|
|
|
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
|
|
|
aQuery2.Next;
|
|
|
end;
|
|
|
memo1.Lines.Add(str1+'|'+str2);
|
|
|
end;
|
|
|
str1:=FixLenStr('-',72,'-');
|
|
|
str2:=FixLenStr('-',72,'-');
|
|
|
memo1.Lines.Add(str1+'|'+str2);
|
|
|
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
|
|
|
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
|
|
|
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
|
|
|
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
|
|
|
memo1.Lines.Add(str1+'|'+str2);
|
|
|
|
|
|
str1:=FixLenStr('-',72,'-');
|
|
|
str2:=FixLenStr('-',72,'-');
|
|
|
memo1.Lines.Add(str1+'|'+str2);
|
|
|
|
|
|
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
|
|
|
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
|
|
|
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
|
|
|
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
|
|
|
|
|
|
if if_open('226') then
|
|
|
memo1.Lines.Add(str1+'|'+str2);
|
|
|
|
|
|
if if_open('319') then
|
|
|
memo1.Lines.Add(str1+'|'+str2);
|
|
|
finally
|
|
|
freeandnil(aQuery1);
|
|
|
freeandnil(aQuery2);
|
|
|
end;
|
|
|
if memo1.Lines.Count>0 then begin
|
|
|
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
|
|
|
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
|
|
|
Memo1.Lines.Insert(0,str1+'|'+str2);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_ch_acceptdjoncharge(Sender: TField);
|
|
|
begin
|
|
|
if (t_ch_fee.state=dsedit)or(t_ch_fee.state=dsinsert)then
|
|
|
begin
|
|
|
if (t_ch_fee.fieldbyname('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').asfloat<>0) and (t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0)then
|
|
|
t_ch_fee['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').asfloat*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_ch_paydjoncharge(Sender: TField);
|
|
|
begin
|
|
|
if (t_ch_fee.state=dsedit)or(t_ch_fee.state=dsinsert)then
|
|
|
begin
|
|
|
if (t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0)then
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_op_seae_weituo.Hide;
|
|
|
frm_op_seae_weituo.ManualFloat(frm_op_seae_weituo.BoundsRect );
|
|
|
frm_main.freeTabs('frm_op_seae_weituo');
|
|
|
action:=cafree;
|
|
|
frm_op_seae_weituo:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.Panel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(Panel2.Width/13);
|
|
|
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;
|
|
|
bsSkinButton16.Width:=i;
|
|
|
bsSkinButton19.Width:=i;
|
|
|
bsSkinButton17.Width:=i;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_Prior(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
table_next(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
table_post(t_ch_fee);
|
|
|
table_post(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
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.bsSkinButton11Click(Sender: TObject);
|
|
|
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>');
|
|
|
|
|
|
|
|
|
////
|
|
|
|
|
|
|
|
|
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
|
|
|
{
|
|
|
if t_op_seae_order.FieldByName('<27><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>').AsBoolean and (Trim(t_op_seae_order.FieldByName('<27><><EFBFBD>۸<EFBFBD><DBB8>Ѷ<EFBFBD><D1B6><EFBFBD>').AsString)='') then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD>۸<EFBFBD><DBB8>Ѷ<EFBFBD><D1B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>');
|
|
|
exit;
|
|
|
end;
|
|
|
}
|
|
|
if Trim(t_op_seae_order.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD>Դ').AsString)='' then
|
|
|
begin
|
|
|
ShowMessage('ҵ<><D2B5><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if Trim(t_op_seae_order.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD>Դ').AsString)='Sales' then
|
|
|
begin
|
|
|
if Trim(t_op_seae_order.FieldByName('<27><>Դ<EFBFBD><D4B4>ϸ').AsString)='' then
|
|
|
begin
|
|
|
ShowMessage('<27><>Դ<EFBFBD><D4B4>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>');
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if strtobool(get_parameters_value(161,'false')) then
|
|
|
begin
|
|
|
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>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_op_seae_order.edit;
|
|
|
if t_op_seae_order.FieldByName('״̬').AsString='<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>' then begin
|
|
|
t_op_seae_order.FieldByName('״̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD>ύ';
|
|
|
t_op_seae_order.post;
|
|
|
end else begin
|
|
|
t_op_seae_order.FieldByName('״̬').AsString:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order.post;
|
|
|
// 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;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
|
|
|
if t_op_seae_order=nil then
|
|
|
exit;
|
|
|
|
|
|
if IsSeaeOrder(t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString) then
|
|
|
begin
|
|
|
MessageDlg('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>,<2C><><EFBFBD><EFBFBD>Ҫȷ<D2AA><C8B7>,<2C><>ˢ<EFBFBD>£<EFBFBD>', mtConfirmation, [mbYes],0);
|
|
|
exit;
|
|
|
end;
|
|
|
try
|
|
|
frm_op_seae_order_add:=tfrm_op_seae_order_add.Create (self);
|
|
|
frm_op_seae_order_add.data1.Enabled:=false;
|
|
|
frm_op_seae_order_add.data1.DataSet:=t_op_seae;
|
|
|
frm_op_seae_order_add.data1.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_add.data2.Enabled:=false;
|
|
|
frm_op_seae_order_add.data2.DataSet:=t_op_seae_order;
|
|
|
frm_op_seae_order_add.data2.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_add.data3.Enabled:=false;
|
|
|
frm_op_seae_order_add.data3.DataSet:=t_op_ctn_insert;
|
|
|
frm_op_seae_order_add.data3.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_add.data4.Enabled:=false;
|
|
|
frm_op_seae_order_add.data4.DataSet:=t_op_fee;
|
|
|
frm_op_seae_order_add.data4.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_add.data5.Enabled:=false;
|
|
|
frm_op_seae_order_add.data5.DataSet:=t_ch_fee;
|
|
|
frm_op_seae_order_add.data5.Enabled:=true;
|
|
|
frm_op_seae_order_add.ShowModal;
|
|
|
finally
|
|
|
frm_op_seae_order_add.Free;
|
|
|
frm_op_seae_order_add:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
if not t_ch_fee.IsEmpty then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
table_delete(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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.OpFeeItem(bsno:string);
|
|
|
begin
|
|
|
if if_open('293') then
|
|
|
begin
|
|
|
if (strtobool(get_parameters_value(153,'false'))=true) then begin
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
begin
|
|
|
t_ch_accept.close;
|
|
|
t_ch_accept.SQL.Clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+' order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_accept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_accept.open;
|
|
|
end else begin
|
|
|
t_ch_accept.close;
|
|
|
t_ch_accept.SQL.Clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and '
|
|
|
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+' order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_accept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_accept.open;
|
|
|
end;
|
|
|
end else begin
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
begin
|
|
|
t_ch_accept.close;
|
|
|
t_ch_accept.SQL.Clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
|
|
|
t_ch_accept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
// t_ch_accept.open;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if if_open('294') then
|
|
|
begin
|
|
|
if (strtobool(get_parameters_value(153,'false'))=true) then
|
|
|
begin
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
begin
|
|
|
t_ch_pay.close;
|
|
|
t_ch_pay.SQL.Clear;
|
|
|
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+' order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_pay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_pay.open;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_pay.close;
|
|
|
t_ch_pay.SQL.Clear;
|
|
|
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and '
|
|
|
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+' order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_pay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_pay.open;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
begin
|
|
|
t_ch_pay.close;
|
|
|
t_ch_pay.SQL.Clear;
|
|
|
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
|
|
|
// t_ch_pay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
|
|
|
t_ch_pay.open;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.FormShow(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(self);
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<C8BA><F2A1A3A1><EFBFBD>';
|
|
|
frm_sys_progress.Show;
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=28;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
frm_sys_progress.Update;
|
|
|
bsSkinPageControl1.ActivePageIndex:=0;
|
|
|
t_op_seae_order.Close;
|
|
|
t_op_seae_order.SQL.clear;
|
|
|
t_op_seae_order.SQL.Add('select * 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_billsalescharge(nil);
|
|
|
t_ch_fee.Open;
|
|
|
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.open;
|
|
|
|
|
|
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.close;
|
|
|
frm_sys_progress:=nil;
|
|
|
wwDBDateTimePicker2.MinDate:=Date;
|
|
|
if strtobool(get_parameters_value(161,'true')) then
|
|
|
bsSkinButton11.Caption:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
bsSkinButton11.Caption:='ȷ<>϶<EFBFBD><CFB6><EFBFBD>';
|
|
|
|
|
|
if if_open('501') then
|
|
|
bsSkinButton16.Visible:=True
|
|
|
else
|
|
|
bsSkinButton16.Visible:=false;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_op_seae_orderBeforeCancel(DataSet: TDataSet);
|
|
|
begin
|
|
|
delete_no(t_op_seae_order);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_op_seae_orderPostError(DataSet: TDataSet;
|
|
|
E: EDatabaseError; var Action: TDataAction);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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 RxDBLookupCombo16.DisplayValues[1]<>''then
|
|
|
str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD>Դ='+''''+RxDBLookupCombo16.DisplayValues[1]+'''';
|
|
|
|
|
|
if RxDBLookupCombo17.DisplayValues[1]<>''then
|
|
|
str:=str+' and <20><>Դ<EFBFBD><D4B4>ϸ='+''''+RxDBLookupCombo17.DisplayValues[1]+'''';
|
|
|
|
|
|
if Edit3.text<>''then
|
|
|
str:=str+' and <20>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD> like '+''''+'%'+Edit3.text+'%'+'''';
|
|
|
|
|
|
|
|
|
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.bsSkinButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_fee.insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton12Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_fee.Post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton13Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_ch_fee);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton14Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_ch_fee);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_op_seae_orderBeforePost(DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
if not checkctn( t_op_seae_order.FieldByName('OR_ID').AsInteger) then
|
|
|
begin
|
|
|
ShowMessage('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD>!');
|
|
|
Abort;
|
|
|
end;
|
|
|
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,'ҵ<><D2B5><EFBFBD><EFBFBD>Դ');
|
|
|
table_before_post(t_op_seae_order,'¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD>˾');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'װ<><D7B0><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ж<><D0B6><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'Ŀ<>ĵ<EFBFBD>');
|
|
|
if ((t_op_seae_order.FieldByName('װ<>˷<EFBFBD>ʽ').AsString='ƴ<>䵥Ʊ') or (t_op_seae_order.FieldByName('װ<>˷<EFBFBD>ʽ').AsString='ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ')) and (t_op_seae_order.FieldByName('<27><>װ<EFBFBD><D7B0>').AsString<>'') then begin
|
|
|
if MessageDlg('<27><>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD>Ϊƴ<CEAA>䵥Ʊ<E4B5A5><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)=mrno then
|
|
|
Abort;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('delete from t_opor_ctn where OR_ID='''+t_op_seae_order.fieldbyname('OR_ID').AsString+'''');
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
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.t_ch_feeAfterInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
t_ch_fee['OR_ID']:=t_op_seae_order['OR_ID'];
|
|
|
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_ch_fee['Ӧ<>յ<EFBFBD><D5B5><EFBFBD>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_fee['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
if t_op_seae_order.FieldByName('ί<>е<EFBFBD>λ').AsString<>'' then
|
|
|
t_ch_fee.FieldByName('Ӧ<>տͻ<D5BF>').AsString:=t_op_seae_order.FieldByName('ί<>е<EFBFBD>λ').AsString;
|
|
|
if t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').AsString<>'' then
|
|
|
t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>').AsString:=t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').AsString;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_ch_feeBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if (t_ch_fee.fieldbyname('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').asfloat<>0) and (t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
|
|
|
begin
|
|
|
t_ch_fee['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=
|
|
|
s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').asfloat*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat);
|
|
|
end;
|
|
|
|
|
|
if (t_ch_fee.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat<>0) then begin
|
|
|
if t_ch_fee.fieldbyname('Ӧ<>ձұ<D5B1>').AsString='' then begin
|
|
|
MessageDlg('Ӧ<>ձұ<D5B1><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
abort;
|
|
|
end;
|
|
|
if t_ch_fee.fieldbyname('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').Asfloat=0 then begin
|
|
|
MessageDlg('Ӧ<>ջ<EFBFBD><D5BB>ʲ<EFBFBD><CAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
t_ch_fee['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_fee['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']);
|
|
|
|
|
|
if (t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0)then
|
|
|
begin
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
|
|
|
s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat);
|
|
|
end;
|
|
|
if (t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then begin
|
|
|
if t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD>ұ<EFBFBD>').AsString='' then begin
|
|
|
MessageDlg('Ӧ<><D3A6><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
abort;
|
|
|
end;
|
|
|
if t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat=0 then begin
|
|
|
MessageDlg('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>ʲ<EFBFBD><CAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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 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.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.DBEdit5Click(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
if (t_op_seae_order.State=dsinsert)then
|
|
|
t_op_seae_order.post;
|
|
|
if t_op_seae_order.IsEmpty then
|
|
|
exit;
|
|
|
if (t_op_seae_order.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ')
|
|
|
or (t_op_seae_order.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='ƴ<>䵥Ʊ')then
|
|
|
exit;
|
|
|
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.wwDBLookupCombo1Change(Sender: TObject);
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
try
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select Top 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,<2C><><EFBFBD><EFBFBD> from t_opor_ctn');
|
|
|
SQL.Add('where OR_ID=:OR_ID');
|
|
|
Parameters.ParamByName('OR_ID').Value:=t_op_seae_order.fieldbyname('OR_ID').asinteger;
|
|
|
open;
|
|
|
end;
|
|
|
if (t_ch_fee.state=dsinsert)or(t_ch_fee.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_fee['Ӧ<>ձұ<D5B1>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
|
|
|
|
|
|
if frm_data_share.t_code_fee.fieldbyname('<27><>').asstring='<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
|
|
|
if not aAdoQuery.IsEmpty then
|
|
|
begin
|
|
|
t_ch_fee['Ӧ<>ձ<EFBFBD>']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD>']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee['Ӧ<>ձ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('<27><>').asstring;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('<27><>').asstring;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
aAdoQuery.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBLookupCombo3Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_ch_fee.state=dsinsert)or(t_ch_fee.state=dsedit) then
|
|
|
begin
|
|
|
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo3.text,[])THEN
|
|
|
begin
|
|
|
if wwDBLookupCombo3.text='USD' then begin
|
|
|
t_ch_fee['Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>']:=getUsdExRate(t_ch_fee.datasource.dataset.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
|
|
|
end else
|
|
|
t_ch_fee['Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBLookupCombo5Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_ch_fee.state=dsinsert)or(t_ch_fee.state=dsedit) then
|
|
|
begin
|
|
|
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo5.text,[])THEN
|
|
|
begin
|
|
|
if wwDBLookupCombo5.text='USD' then begin
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee.datasource.dataset.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
|
|
|
end else
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.dxDBGrid1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo12Change(Sender: TObject);
|
|
|
begin
|
|
|
if RxDBLookupCombo12.DisplayValue='' then
|
|
|
exit;
|
|
|
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo12.DisplayValue,[]) then begin
|
|
|
t_op_seae_order['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_order['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:=frm_data_share.t_sys_employee['ҵ<><D2B5><EFBFBD><EFBFBD>Դ'];
|
|
|
t_op_seae_order['<27><>Դ<EFBFBD><D4B4>ϸ']:=frm_data_share.t_sys_employee['<27><>Դ<EFBFBD><D4B4>ϸ'];
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo1Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter_All(RxDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo8Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboEnter(RxDBLookupCombo8);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo1Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboExit(RxDBLookupCombo1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo8Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxLookupComboExit(RxDBLookupCombo8);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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.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.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.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.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.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.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.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.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.wwDBLookupCombo6Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo6.Clear;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBLookupCombo7Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo7.Clear;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBLookupCombo8Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo8.Clear;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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['װ<><D7B0><EFBFBD><EFBFBD>']:=get_parameters_value(14,'QINGDAO,CHINA');
|
|
|
|
|
|
t_op_seae_order['Ӧ<>պ<EFBFBD><D5BA>˷<EFBFBD>']:=0;
|
|
|
t_op_seae_order['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>']:=0;
|
|
|
|
|
|
if frm_data_share.t_sys_employee.Locate('<27><><EFBFBD><EFBFBD>',employee,[]) then begin
|
|
|
t_op_seae_order['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:=frm_data_share.t_sys_employee.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>Դ').AsString;
|
|
|
t_op_seae_order['<27><>Դ<EFBFBD><D4B4>ϸ']:=frm_data_share.t_sys_employee.fieldbyname('<27><>Դ<EFBFBD><D4B4>ϸ').AsString;
|
|
|
end;
|
|
|
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>Ա']:='';
|
|
|
t_op_seae_order['<27>ͷ<EFBFBD>Ա']:='';
|
|
|
|
|
|
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
Pnt:=bsSkinButton1.ClientToScreen(Point(0,bsSkinButton1.Height));
|
|
|
PopupMenu1.Popup(Pnt.x,Pnt.y);
|
|
|
|
|
|
end;
|
|
|
|
|
|
function Tfrm_op_seae_weituo.checkctn(aOR_ID:integer):Boolean;
|
|
|
var
|
|
|
aQuery:TAdoQuery;
|
|
|
begin
|
|
|
Result:=True;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
with aQuery do
|
|
|
begin
|
|
|
close;sql.clear;
|
|
|
sql.Add('select a.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ as opor<6F><72><EFBFBD><EFBFBD> ,b.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ from t_opor_ctn a inner join t_code_ctn b on a.<2E><><EFBFBD><EFBFBD>=b.<2E><><EFBFBD><EFBFBD> where a.OR_ID='+inttostr(aOR_ID));
|
|
|
open;
|
|
|
end;
|
|
|
aQuery.First;
|
|
|
while not aQuery.Eof do
|
|
|
begin
|
|
|
if aQuery.FieldByName('opor<6F><72><EFBFBD><EFBFBD>').AsString<> aQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString then
|
|
|
begin
|
|
|
Result:=False;
|
|
|
Break;
|
|
|
end;
|
|
|
aQuery.Next;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.N3Click(Sender: TObject);
|
|
|
var
|
|
|
afield,afieldfee : variant;
|
|
|
aOR_ID:integer;
|
|
|
aQuery:TAdoQuery;
|
|
|
i:integer;
|
|
|
s:string;
|
|
|
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;
|
|
|
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;
|
|
|
|
|
|
|
|
|
if not checkctn(aOR_ID) then
|
|
|
begin
|
|
|
ShowMessage('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD>!');
|
|
|
Exit;
|
|
|
end;
|
|
|
|
|
|
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['<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><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_op_seae_order['<27><><EFBFBD>˷<EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
t_op_seae_order['״̬']:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:='';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:='';
|
|
|
t_op_seae_order['<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>']:='';
|
|
|
|
|
|
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 frm_data_share.t_sys_employee.Locate('<27><><EFBFBD><EFBFBD>',employee,[]) then begin
|
|
|
t_op_seae_order['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:=frm_data_share.t_sys_employee.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>Դ').AsString;
|
|
|
t_op_seae_order['<27><>Դ<EFBFBD><D4B4>ϸ']:=frm_data_share.t_sys_employee.fieldbyname('<27><>Դ<EFBFBD><D4B4>ϸ').AsString;
|
|
|
end;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>Ա']:='';
|
|
|
t_op_seae_order['<27>ͷ<EFBFBD>Ա']:='';
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
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;
|
|
|
if Application.MessageBox('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>','<27><>ʾ',MB_YESNO+ MB_ICONINFORMATION)=IDYES then begin
|
|
|
close;sql.clear;
|
|
|
sql.Add('select * from t_ch_orderfee where OR_ID='+inttostr(aOR_ID));
|
|
|
open;
|
|
|
if not IsEmpty then begin
|
|
|
first;
|
|
|
while not eof do begin
|
|
|
t_ch_fee.Insert;
|
|
|
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
t_ch_fee.fieldbyname('Ӧ<>ձ<EFBFBD>').AsString:=aQuery.fieldbyname('Ӧ<>ձ<EFBFBD>').AsString;
|
|
|
t_ch_fee.fieldbyname('Ӧ<>ձұ<D5B1>').AsString:=aQuery.fieldbyname('Ӧ<>ձұ<D5B1>').AsString;
|
|
|
t_ch_fee.fieldbyname('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<>տͻ<D5BF>').AsString:=aQuery.fieldbyname('Ӧ<>տͻ<D5BF>').AsString;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD>').AsString;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD>ұ<EFBFBD>').AsString:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD>ұ<EFBFBD>').AsString;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>').AsString:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>').AsString;
|
|
|
t_ch_fee.post;
|
|
|
next;
|
|
|
end;
|
|
|
end;
|
|
|
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>']:='';
|
|
|
|
|
|
// t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:=s;
|
|
|
t_op_seae_order.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,209);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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['Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client_weituo.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end else
|
|
|
t_op_seae_order['Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_billsalescharge(Sender: TField);
|
|
|
begin
|
|
|
lblsales.Caption:='';
|
|
|
if (t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'') and (t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'') then
|
|
|
if t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString then begin
|
|
|
lblsales.Caption:='ע<>⣺<EFBFBD><E2A3BA>ί<EFBFBD>е<EFBFBD>λ<EFBFBD><CEBB>Ĭ<EFBFBD><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ'+t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_ch_feeAfterOpen(DataSet: TDataSet);
|
|
|
begin
|
|
|
t_ch_fee.FieldByName('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
|
|
|
t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_ch_feeAfterPost(DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TAdOQuery;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
close;sql.clear;
|
|
|
sql.add('select sum(Ӧ<>ս<EFBFBD><D5BD><EFBFBD>) as Ӧ<>ս<EFBFBD><D5BD><EFBFBD> from t_ch_orderfee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>˷<EFBFBD>'' and Ӧ<>ս<EFBFBD><D5BD><EFBFBD><>0 and OR_ID='+DataSet.fieldbyname('OR_ID').AsString);
|
|
|
open;
|
|
|
if not IsEmpty then begin
|
|
|
t_op_seae_order.Edit;
|
|
|
t_op_seae_order.FieldByName('<27><><EFBFBD>˷<EFBFBD>').AsFloat:=fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
|
|
|
t_op_seae_order.post;
|
|
|
end else begin
|
|
|
t_op_seae_order.Edit;
|
|
|
t_op_seae_order.FieldByName('<27><><EFBFBD>˷<EFBFBD>').AsFloat:=0;
|
|
|
t_op_seae_order.post;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
freeandnil(aQuery);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
table_post(t_ch_fee);
|
|
|
table_post(t_op_seae_order);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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.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.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.bsSkinButton21Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae_order1,'<27><>ע');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBComboBox3DropDown(Sender: TObject);
|
|
|
var
|
|
|
str_list:tstringlist;
|
|
|
i:Integer;
|
|
|
begin
|
|
|
wwDBComboBox3.Items.Clear;
|
|
|
wwDBComboBox3.Items.Add('<27><>Ʊ');
|
|
|
wwDBComboBox3.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox3.Items.Add('<27>ƷѶ<C6B7>');
|
|
|
wwDBComboBox3.Items.Add('TEU');
|
|
|
str_list:=Tstringlist.Create();
|
|
|
try
|
|
|
str_list.Text:=t_op_seae_order.fieldbyname('<27>Ʒѱ<C6B7>').asstring;
|
|
|
for i:=0 to str_list.Count-1 do
|
|
|
begin
|
|
|
wwDBComboBox3.Items.Add(copy(str_list[i],pos('-',str_list[i])+1,length(str_list[i])+1-pos('-',str_list[i])));
|
|
|
end;
|
|
|
finally
|
|
|
freeandnil(str_list);
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBComboBox4DropDown(Sender: TObject);
|
|
|
var
|
|
|
str_list:tstringlist;
|
|
|
i:Integer;
|
|
|
begin
|
|
|
wwDBComboBox4.Items.Clear;
|
|
|
wwDBComboBox4.Items.Add('<27><>Ʊ');
|
|
|
wwDBComboBox4.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox4.Items.Add('<27>ƷѶ<C6B7>');
|
|
|
wwDBComboBox4.Items.Add('TEU');
|
|
|
str_list:=Tstringlist.Create();
|
|
|
try
|
|
|
str_list.Text:=t_op_seae_order.fieldbyname('<27>Ʒѱ<C6B7>').asstring;
|
|
|
for i:=0 to str_list.Count-1 do
|
|
|
begin
|
|
|
wwDBComboBox4.Items.Add(copy(str_list[i],pos('-',str_list[i])+1,length(str_list[i])+1-pos('-',str_list[i])));
|
|
|
end;
|
|
|
finally
|
|
|
freeandnil(str_list);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinPageControl2Change(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinPageControl2.TabIndex=2 then
|
|
|
begin
|
|
|
if t_op_seae_order.IsEmpty then exit;
|
|
|
{
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.Parameters.ParamByName('ί<>б<EFBFBD><D0B1><EFBFBD>').Value:=t_op_seae_order.fieldbyName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString;
|
|
|
t_op_seae.Open;
|
|
|
}
|
|
|
if Trim(t_op_seae_order.fieldbyName('<27><><EFBFBD><EFBFBD>').AsString)<>'' then
|
|
|
begin
|
|
|
OpFeeItem(t_op_seae_order.fieldbyName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
getsumstr;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if bsSkinPageControl2.TabIndex=3 then
|
|
|
begin
|
|
|
if Trim(t_op_seae_order.fieldbyName('<27><><EFBFBD><EFBFBD>').AsString)<>'' then
|
|
|
begin
|
|
|
t_op_seae_act.SQL.Clear;
|
|
|
t_op_seae_act.SQL.Add('select <20>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>,֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ,<2C><><EFBFBD><EFBFBD>,<2C><>װ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD>ѷ<EFBFBD>ʽ,ǩ<><C7A9><EFBFBD>ص<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_op_seae');
|
|
|
t_op_seae_act.SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
t_op_seae_act.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae_order.fieldbyName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_seae_act.Open;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton18Click(Sender: TObject);
|
|
|
var aAdoQuery,aAdoQueryInsert:TAdoQuery;
|
|
|
begin
|
|
|
if t_op_seae=nil then
|
|
|
exit;
|
|
|
if t_op_seae_order=nil then
|
|
|
exit;
|
|
|
|
|
|
if t_ch_fee=nil then exit;
|
|
|
|
|
|
if t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
MessageDlg('<27><>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>ɶ<EFBFBD><C9B6><EFBFBD>ί<EFBFBD>в<EFBFBD><D0B2><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD>ã<EFBFBD>', mtConfirmation, [mbYes],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if IsSeaeOrderStatus(t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
begin
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD>ί<EFBFBD>з<EFBFBD><D0B7><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD>ã<EFBFBD>', mtConfirmation, [mbYes],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
aAdoQueryInsert:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Update t_ch_orderfee set <20><><EFBFBD><EFBFBD>״̬=''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>''');
|
|
|
SQL.Add('where or_id='+t_op_seae_order.fieldbyname('or_id').AsString);
|
|
|
end;
|
|
|
|
|
|
with aAdoQueryInsert do
|
|
|
begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Insert Into t_ch_fee (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> ,<2C><><EFBFBD><EFBFBD> ,<2C><><EFBFBD><EFBFBD>״̬ ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ,<2C><> ,<2C><><EFBFBD><EFBFBD> ,<2C><><EFBFBD><EFBFBD> ,<2C><><EFBFBD><EFBFBD> ,<2C>ұ<EFBFBD> ,<2C><><EFBFBD><EFBFBD> ,¼<><C2BC><EFBFBD><EFBFBD> ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ,<2C><><EFBFBD>뿪Ʊ ,<2C><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> ,<2C><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD> ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ,¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ,<2C>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD> ,<2C>Ƿ<EFBFBD><C7B7>渶 ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ ,<2C><><EFBFBD>㵥λ ,˳<><CBB3> ,<2C><><EFBFBD><EFBFBD> ,<2C><><EFBFBD><EFBFBD>)');
|
|
|
SQL.Add('values (:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>״̬,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:<3A><>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A>ұ<EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:¼<><C2BC><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:<3A><><EFBFBD>뿪Ʊ,:<3A><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,:<3A><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:<3A>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>,:<3A>Ƿ<EFBFBD><C7B7>渶,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ,:<3A><><EFBFBD>㵥λ,:˳<><CBB3>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>)');
|
|
|
end;
|
|
|
|
|
|
|
|
|
frm_main.db.BeginTrans;
|
|
|
|
|
|
try
|
|
|
with t_ch_fee do
|
|
|
begin
|
|
|
First;
|
|
|
while not Eof do
|
|
|
begin
|
|
|
if t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='¼<><C2BC>״̬' then
|
|
|
begin
|
|
|
if t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat<>0 then
|
|
|
begin
|
|
|
aAdoQueryInsert.Close;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:='<27><>';
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>״̬').Value:='¼<><C2BC>״̬';
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><>').Value:=t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27>ұ<EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD>ұ<EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD>').Value:=t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD>뿪Ʊ').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=FormatDateTime('YYYY-MM-DD',now);
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27>Ƿ<EFBFBD><C7B7>渶').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD>㵥λ').Value:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾';
|
|
|
aAdoQueryInsert.Parameters.ParamByName('˳<><CBB3>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.ExecSQL;
|
|
|
end;
|
|
|
if t_ch_fee.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat<>0 then
|
|
|
begin
|
|
|
aAdoQueryInsert.Close;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<>տͻ<D5BF>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:='<27><>';
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>״̬').Value:='¼<><C2BC>״̬';
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><>').Value:=t_ch_fee.FieldByName('Ӧ<>ձ<EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27>ұ<EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<>ձұ<D5B1>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_fee.FieldByName('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD>').Value:=t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD>뿪Ʊ').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=FormatDateTime('YYYY-MM-DD',now);
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27>Ƿ<EFBFBD><C7B7>渶').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD>㵥λ').Value:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾';
|
|
|
aAdoQueryInsert.Parameters.ParamByName('˳<><CBB3>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=0;
|
|
|
aAdoQueryInsert.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
aAdoQueryInsert.ExecSQL;
|
|
|
end;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
aAdoQuery.ExecSQL;
|
|
|
frm_main.db.CommitTrans;
|
|
|
finally
|
|
|
aAdoQuery.Free;
|
|
|
aAdoQueryInsert.Free;
|
|
|
t_ch_fee.Requery();
|
|
|
if frm_main.db.InTransaction then
|
|
|
begin
|
|
|
frm_main.db.RollbackTrans;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_op_ctn_insertAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBComboBox3Change(Sender: TObject);
|
|
|
var AAdoQuery : TADOQuery;
|
|
|
begin
|
|
|
AAdoQuery :=CreateAdoQuery;
|
|
|
with AAdoQuery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_opor_ctn');
|
|
|
SQL.Add('where OR_ID=:OR_ID');
|
|
|
SQL.Add('order by <20><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('OR_ID').Value:=t_op_seae_order.fieldbyname('OR_ID').AsInteger;
|
|
|
Open;
|
|
|
if not AAdoQuery.IsEmpty then
|
|
|
if AAdoQuery.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',wwDBComboBox3.text,[])then
|
|
|
begin
|
|
|
if t_ch_fee.State in [dsedit,dsInsert] then
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=AAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
finally
|
|
|
AAdoQuery.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBComboBox4Change(Sender: TObject);
|
|
|
var AAdoQuery : TADOQuery;
|
|
|
begin
|
|
|
AAdoQuery :=CreateAdoQuery;
|
|
|
with AAdoQuery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_opor_ctn');
|
|
|
SQL.Add('where OR_ID=:OR_ID');
|
|
|
SQL.Add('order by <20><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('OR_ID').Value:=t_op_seae_order.fieldbyname('OR_ID').AsInteger;
|
|
|
Open;
|
|
|
if not AAdoQuery.IsEmpty then
|
|
|
if AAdoQuery.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',wwDBComboBox4.text,[])then
|
|
|
begin
|
|
|
if t_ch_fee.State in [dsedit,dsInsert] then
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=AAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
finally
|
|
|
AAdoQuery.Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo19Change(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
if (t_op_seae_order.State=dsinsert)or(t_op_seae_order.State=dsedit)then
|
|
|
begin
|
|
|
if RxDBLookupCombo19.DisplayValue<>'' then
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client_daili.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.Button1Click(Sender: TObject);
|
|
|
var aADOQuery :TADOQuery;
|
|
|
begin
|
|
|
if trim(Edit2.Text)='' then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>');
|
|
|
Exit;
|
|
|
end;
|
|
|
|
|
|
if trim(t_op_seae_order1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)='' then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ֱ<>ӱ༭<D3B1><E0BCAD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD>');
|
|
|
Exit;
|
|
|
end;
|
|
|
|
|
|
if not t_op_seae_order1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
|
|
|
begin
|
|
|
if (Date-t_op_seae_order1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime)>=3 then
|
|
|
begin
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
aADOQuery:=CreateADOQuery;
|
|
|
with aADOQuery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Update t_op_seae set <20><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>˵<EFBFBD><CBB5>=:<3A><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>');
|
|
|
SQL.Add(',Ӧ<>պ<EFBFBD><D5BA>˷<EFBFBD>=:Ӧ<>պ<EFBFBD><D5BA>˷<EFBFBD>,Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>=:Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>');
|
|
|
SQL.Add(',<2C><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
SQL.Add(',<2C><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>=:<3A><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>');
|
|
|
SQL.Add('where <20><><EFBFBD><EFBFBD>='+''''+t_op_seae_order1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').Value:=trim(Edit2.Text);
|
|
|
Parameters.ParamByName('Ӧ<>պ<EFBFBD><D5BA>˷<EFBFBD>').Value:=StrToFloat(Edit4.Text);
|
|
|
Parameters.ParamByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>').Value:=StrToFloat(Edit5.Text);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=StrToFloat(Edit6.Text);
|
|
|
Parameters.ParamByName('<27>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=StrToFloat(Edit7.Text);
|
|
|
if CheckBox1.Checked then
|
|
|
Parameters.ParamByName('<27><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>').Value:=1
|
|
|
else Parameters.ParamByName('<27><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>').Value:=0;
|
|
|
ExecSQL;
|
|
|
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Update t_op_seae_order set <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>=:<3A><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>');
|
|
|
SQL.Add(',Ӧ<>պ<EFBFBD><D5BA>˷<EFBFBD>=:Ӧ<>պ<EFBFBD><D5BA>˷<EFBFBD>,Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>=:Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>');
|
|
|
SQL.Add(',<2C><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
SQL.Add(',<2C><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>=:<3A><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>');
|
|
|
SQL.Add('where OR_ID=:OR_ID');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').Value:=trim(Edit2.Text);
|
|
|
Parameters.ParamByName('OR_ID').Value:=t_op_seae_order1.DataSet.fieldbyname('OR_ID').Asinteger;
|
|
|
Parameters.ParamByName('Ӧ<>պ<EFBFBD><D5BA>˷<EFBFBD>').Value:=StrToFloat(Edit4.Text);
|
|
|
Parameters.ParamByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>').Value:=StrToFloat(Edit5.Text);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=StrToFloat(Edit6.Text);
|
|
|
Parameters.ParamByName('<27>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=StrToFloat(Edit7.Text);
|
|
|
if CheckBox1.Checked then
|
|
|
Parameters.ParamByName('<27><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>').Value:=1
|
|
|
else Parameters.ParamByName('<27><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>').Value:=0;
|
|
|
ExecSQL;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo31Change(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae_order1.DataSet.FieldByName('<27><>Դ<EFBFBD><D4B4>ϸ').AsString:='';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo31Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo31.LookupDisplay:='<27><><EFBFBD><EFBFBD>;ҵ<><D2B5><EFBFBD><EFBFBD>Դ';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo31Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo31.LookupDisplay:='ҵ<><D2B5><EFBFBD><EFBFBD>Դ';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBComboBox9DropDown(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TAdoQuery;
|
|
|
begin
|
|
|
wwDBComboBox9.Items.Clear;
|
|
|
if t_op_seae_order1.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD>Դ').AsString='' then begin
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
close;sql.Clear;
|
|
|
sql.Add('select <20><>Դ<EFBFBD><D4B4>ϸ from t_code_source_dl where ҵ<><D2B5><EFBFBD><EFBFBD>Դ='''+t_op_seae_order1.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD>Դ').AsString+''' order by <20><>Դ<EFBFBD><D4B4>ϸ ');
|
|
|
open;
|
|
|
first;
|
|
|
while not eof do begin
|
|
|
wwDBComboBox9.Items.Add(FieldByName('<27><>Դ<EFBFBD><D4B4>ϸ').AsString);
|
|
|
next;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton16Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
t_op_seae2.close;
|
|
|
t_op_seae2.SQL.Text:='select * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
|
|
|
t_op_seae2.Open;
|
|
|
if t_op_seae2.IsEmpty then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>,<2C><><EFBFBD>ܸ<EFBFBD><DCB8>£<EFBFBD>');
|
|
|
end else begin
|
|
|
if (t_op_seae2.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>') or (t_op_seae2.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then begin
|
|
|
ShowMessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>,<2C><><EFBFBD>ܸ<EFBFBD><DCB8>£<EFBFBD>');
|
|
|
end else begin
|
|
|
t_op_seae2.Edit;
|
|
|
t_op_seae2.FieldByName('<27><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>').AsBoolean:=true;
|
|
|
t_op_seae2.post;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
aQuery.SQL.Text:='update t_op_seae_order set <20><><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>=1 where <20><><EFBFBD><EFBFBD>='''+t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
|
|
|
aQuery.ExecSQL;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
ShowMessage('<27>Ѹ<EFBFBD><D1B8>£<EFBFBD>');
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_op_seaeBeforeRefresh(DataSet: TDataSet);
|
|
|
begin
|
|
|
if not checkctn(t_op_seae_order.fieldbyname('OR_ID').AsInteger) then
|
|
|
begin
|
|
|
ShowMessage('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton17Click(Sender: TObject);
|
|
|
var
|
|
|
aOR_ID:integer;
|
|
|
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;
|
|
|
aOR_ID:=t_op_seae_order.fieldbyname('OR_ID').AsInteger;
|
|
|
|
|
|
|
|
|
if not checkctn(aOR_ID) then
|
|
|
begin
|
|
|
ShowMessage('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD>!');
|
|
|
Exit;
|
|
|
end;
|
|
|
|
|
|
try
|
|
|
frm_op_seaewt_pladd:=tfrm_op_seaewt_pladd.Create (self);
|
|
|
frm_op_seaewt_pladd.data1.Enabled:=false;
|
|
|
frm_op_seaewt_pladd.data1.DataSet:=t_op_seae_order;
|
|
|
frm_op_seaewt_pladd.data1.Enabled:=true;
|
|
|
|
|
|
frm_op_seaewt_pladd.ShowModal;
|
|
|
finally
|
|
|
frm_op_seaewt_pladd.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.bsSkinButton19Click(Sender: TObject);
|
|
|
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>');
|
|
|
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
if t_op_seae_order=nil then
|
|
|
exit;
|
|
|
|
|
|
if IsSeaeOrder(t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString) then
|
|
|
begin
|
|
|
MessageDlg('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>,<2C><><EFBFBD><EFBFBD>Ҫȷ<D2AA><C8B7>,<2C><>ˢ<EFBFBD>£<EFBFBD>', mtConfirmation, [mbYes],0);
|
|
|
exit;
|
|
|
end;
|
|
|
try
|
|
|
frm_op_seae_order_pladd:=tfrm_op_seae_order_pladd.Create (self);
|
|
|
frm_op_seae_order_pladd.data1.Enabled:=false;
|
|
|
frm_op_seae_order_pladd.data1.DataSet:=t_op_seae;
|
|
|
frm_op_seae_order_pladd.data1.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_pladd.data2.Enabled:=false;
|
|
|
frm_op_seae_order_pladd.data2.DataSet:=t_op_seae_order;
|
|
|
frm_op_seae_order_pladd.data2.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_pladd.data3.Enabled:=false;
|
|
|
frm_op_seae_order_pladd.data3.DataSet:=t_op_ctn_insert;
|
|
|
frm_op_seae_order_pladd.data3.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_pladd.data4.Enabled:=false;
|
|
|
frm_op_seae_order_pladd.data4.DataSet:=t_op_fee;
|
|
|
frm_op_seae_order_pladd.data4.Enabled:=true;
|
|
|
|
|
|
frm_op_seae_order_pladd.data5.Enabled:=false;
|
|
|
frm_op_seae_order_pladd.data5.DataSet:=t_ch_fee;
|
|
|
frm_op_seae_order_pladd.data5.Enabled:=true;
|
|
|
frm_op_seae_order_pladd.ShowModal;
|
|
|
finally
|
|
|
frm_op_seae_order_pladd.Free;
|
|
|
frm_op_seae_order_pladd:=nil;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|