|
|
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;
|
|
|
|
|
|
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;
|
|
|
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;
|
|
|
DBComboBoxEh1: TDBComboBoxEh;
|
|
|
Label49: TLabel;
|
|
|
Label50: TLabel;
|
|
|
DBComboBoxEh2: TDBComboBoxEh;
|
|
|
dxDBGrid1Column38: TdxDBGridColumn;
|
|
|
Label51: TLabel;
|
|
|
DBEdit14: TDBEdit;
|
|
|
Label52: TLabel;
|
|
|
DBEdit15: TDBEdit;
|
|
|
t_crm_client_weituo1: TDataSource;
|
|
|
t_crm_client_weituo: TADOQuery;
|
|
|
t_crm_client_cr: TADOQuery;
|
|
|
t_crm_client_cr1: TDataSource;
|
|
|
dxDBGrid1Column39: TdxDBGridColumn;
|
|
|
Label54: TLabel;
|
|
|
RxDBLookupCombo11: TRxDBLookupCombo;
|
|
|
Label53: TLabel;
|
|
|
DBComboBoxEh3: TDBComboBoxEh;
|
|
|
Label73: TLabel;
|
|
|
RxDBLookupCombo20: TRxDBLookupCombo;
|
|
|
dxDBGrid1Column40: TdxDBGridColumn;
|
|
|
RxDBLookupCombo31: TRxDBLookupCombo;
|
|
|
Label55: TLabel;
|
|
|
DBComboBoxEh4: TDBComboBoxEh;
|
|
|
Label134: TLabel;
|
|
|
Label56: TLabel;
|
|
|
DBComboBoxEh5: TDBComboBoxEh;
|
|
|
lblsales: TLabel;
|
|
|
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 DBComboBoxEh1DropDown(Sender: TObject);
|
|
|
procedure DBComboBoxEh2DropDown(Sender: TObject);
|
|
|
procedure DBComboBoxEh3DropDown(Sender: TObject);
|
|
|
procedure RxDBLookupCombo7Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo20Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo20Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo20Exit(Sender: TObject);
|
|
|
procedure RxDBLookupCombo7Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo7Exit(Sender: TObject);
|
|
|
procedure wwDBDateTimePicker2Change(Sender: TObject);
|
|
|
procedure DBComboBoxEh4DropDown(Sender: TObject);
|
|
|
private
|
|
|
procedure t_billsalescharge(Sender: TField);
|
|
|
procedure OpFeeItem(bsNo:string);
|
|
|
|
|
|
procedure t_ch_acceptdjoncharge(Sender: TField);
|
|
|
procedure t_ch_paydjoncharge(Sender: TField);
|
|
|
procedure getsumstr;
|
|
|
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
function if_Edit_delete:Boolean;
|
|
|
procedure setconcolor;
|
|
|
procedure crmchargeDr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
procedure crmchargeCr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
procedure NOPricechargeDr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
procedure NOPricechargeCr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seae_weituo: 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, my_sys_chat,u_op_seae_oder_add;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.setconcolor;
|
|
|
procedure consetcolor(fielname:String);
|
|
|
var
|
|
|
i:integer;
|
|
|
scolor:string;
|
|
|
begin
|
|
|
scolor:=get_parameters_value(144,'clInfoBk');
|
|
|
with bsSkinPanel1 do begin
|
|
|
for i:=0 to ControlCount-1 do begin
|
|
|
if Controls[i] is TwwDBComboBox then begin
|
|
|
if TwwDBComboBox(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TwwDBLookupCombo then begin
|
|
|
if TwwDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBEdit then begin
|
|
|
if TDBEdit(Controls[i]).DataField=fielname then begin
|
|
|
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TwwDBDateTimePicker then begin
|
|
|
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBMemo then begin
|
|
|
if TDBMemo(Controls[i]).DataField=fielname then begin
|
|
|
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TRxDBLookupCombo then begin
|
|
|
if TRxDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
with bsSkinGroupBox1 do begin
|
|
|
for i:=0 to ControlCount-1 do begin
|
|
|
if Controls[i] is TwwDBComboBox then begin
|
|
|
if TwwDBComboBox(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TwwDBLookupCombo then begin
|
|
|
if TwwDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBEdit then begin
|
|
|
if TDBEdit(Controls[i]).DataField=fielname then begin
|
|
|
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TwwDBDateTimePicker then begin
|
|
|
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then begin
|
|
|
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBMemo then begin
|
|
|
if TDBMemo(Controls[i]).DataField=fielname then begin
|
|
|
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TRxDBLookupCombo then begin
|
|
|
if TRxDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
with bsSkinPanel1 do begin
|
|
|
for i:=0 to ControlCount-1 do begin
|
|
|
if Controls[i] is TDBEdit then begin
|
|
|
if TDBEdit(Controls[i]).DataField=fielname then begin
|
|
|
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TRxDBLookupCombo then begin
|
|
|
if TRxDBLookupCombo(Controls[i]).DataField=fielname then begin
|
|
|
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end else if Controls[i] is TDBComboBoxEh then begin
|
|
|
if TDBComboBoxEh(Controls[i]).DataField=fielname then begin
|
|
|
TDBComboBoxEh(Controls[i]).Color:=StringToColor(scolor);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>ͬ<EFBFBD><CDAC>ɫ<EFBFBD><C9AB>ʾ
|
|
|
frm_data_share.t_code_empty.Filtered:=false;
|
|
|
frm_data_share.t_code_empty.Filter:='<27><>=''t_op_seae_order''';
|
|
|
frm_data_share.t_code_empty.Filtered:=true;
|
|
|
frm_data_share.t_code_empty.First;
|
|
|
while not frm_data_share.t_code_empty.Eof do
|
|
|
begin
|
|
|
consetcolor(frm_data_share.t_code_empty.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring);
|
|
|
frm_data_share.t_code_empty.next;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
procedure Tfrm_op_seae_weituo.crmchargeDr(Sender: TField);
|
|
|
begin
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').AsString,[]) then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('Ӧ<>տͻ<D5BF>').AsString,[]) then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
wwDBGrid1.Refresh;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.crmchargeCr(Sender: TField);
|
|
|
begin
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').AsString,[]) then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>').AsString,[]) then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
wwDBGrid1.Refresh;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.NOPricechargeDr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<>յ<EFBFBD><D5B5><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
wwDBGrid1.Refresh;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.NOPricechargeCr(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
|
|
|
begin
|
|
|
Sender.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
wwDBGrid1.Refresh;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_seae_weituo.if_Edit_delete:Boolean;
|
|
|
var aAdoQuery:TADOQuery;
|
|
|
begin
|
|
|
result:=False;
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('select ״̬ from t_op_seae_order');
|
|
|
sql.Add('where or_id=:or_id and ״̬ in (''<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>'',''<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>'',''<27><><EFBFBD><EFBFBD><EFBFBD>ύ'')');
|
|
|
Parameters.ParamByName('or_id').Value:=t_op_seae_order.FieldByName('or_id').AsInteger;
|
|
|
Open;
|
|
|
if not IsEmpty then result:=True;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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/10);
|
|
|
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;
|
|
|
|
|
|
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);
|
|
|
var shenhe:string;
|
|
|
begin
|
|
|
table_before_post(t_op_seae_order,'¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ί<>е<EFBFBD>λ');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD>ѷ<EFBFBD>ʽ');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'װ<><D7B0><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'ж<><D0B6><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
table_before_post(t_op_seae_order,'Ŀ<>ĵ<EFBFBD>');
|
|
|
|
|
|
table_before_post(t_op_seae_order,'<27><><EFBFBD><EFBFBD>˾');
|
|
|
|
|
|
|
|
|
if op_empty('t_op_seae_order',t_op_seae_order) then
|
|
|
Abort;
|
|
|
|
|
|
|
|
|
if frm_data_share.t_crm_client_ship.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Trim(t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString),[]) then
|
|
|
begin
|
|
|
shenhe:=Trim(frm_data_share.t_crm_client_ship.FieldByName('<27><><EFBFBD><EFBFBD>˾Ҫ<CBBE><D2AA>').AsString);
|
|
|
end;
|
|
|
|
|
|
if shenhe='<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
if t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0> <20><><EFBFBD><EFBFBD>˾:'+t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+' <20><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
Exit;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
if shenhe='<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
if (t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='') or (t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='') then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0> <20><><EFBFBD><EFBFBD>˾:'+t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+' <20><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺<CBBA><CDB8><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if shenhe='<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
t_op_seae_order.edit;
|
|
|
t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='';
|
|
|
t_op_seae_order.post;
|
|
|
end
|
|
|
else
|
|
|
if shenhe='<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
end;
|
|
|
|
|
|
|
|
|
////
|
|
|
|
|
|
if not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
|
|
|
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>ύ'; //<2F><><EFBFBD>ƺ<EFBFBD><C6BA><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;
|
|
|
if shenhe<>'' then
|
|
|
Send_fee_sales('<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>,ί<>б<EFBFBD><D0B1><EFBFBD>:'+t_op_seae_order.FieldByName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FormatDateTime('YYYY-MM-DD',t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime),'161',t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)
|
|
|
else
|
|
|
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
|
|
|
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 if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
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);
|
|
|
var
|
|
|
str,str1:widestring;
|
|
|
|
|
|
begin
|
|
|
setconcolor;
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(self);
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<C8BA><F2A1A3A1><EFBFBD>';
|
|
|
frm_sys_progress.Show;
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=28;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
frm_sys_progress.Update;
|
|
|
bsSkinPageControl1.ActivePageIndex:=0;
|
|
|
t_op_seae_order.Close;
|
|
|
t_op_seae_order.SQL.clear;
|
|
|
t_op_seae_order.SQL.Add('select * from t_op_seae_order where (״̬=''<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>'' or ״̬=''<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>'') and '
|
|
|
+open_data('0021','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+' order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_op_seae_order.open;
|
|
|
t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_billsalescharge;
|
|
|
t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_billsalescharge;
|
|
|
t_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;
|
|
|
|
|
|
if strtobool(get_parameters_value(161,'true')) then
|
|
|
bsSkinButton11.Caption:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
bsSkinButton11.Caption:='ȷ<>϶<EFBFBD><CFB6><EFBFBD>';
|
|
|
|
|
|
|
|
|
|
|
|
str:='where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>'+''''+'Ŀ<><C4BF>'+'''';
|
|
|
|
|
|
str:=str+'and ί<>е<EFBFBD>λ=1 ';
|
|
|
t_crm_client_weituo.close;
|
|
|
t_crm_client_weituo.sql.clear;
|
|
|
t_crm_client_weituo.sql.add('select * from t_crm_client '+str+' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27>ͷ<EFBFBD>Ա','no','no')+' order by <20><><EFBFBD><EFBFBD>');
|
|
|
t_crm_client_weituo.open;
|
|
|
|
|
|
|
|
|
str:='where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>'+''''+'Ŀ<><C4BF>'+'''';
|
|
|
|
|
|
str:=str+'and (<28><><EFBFBD><EFBFBD>˾=1 or <20><>վ=1 or <20><><EFBFBD><EFBFBD>=1 or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=1 or <20><><EFBFBD><EFBFBD>=1 or <20><><EFBFBD><EFBFBD>=1 or <20><><EFBFBD>չ<EFBFBD>˾=1 or <20><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>=1 or <20><><EFBFBD>ݹ<EFBFBD>˾=1 or <20><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>=1 or <20>ֿ<EFBFBD>=1)';
|
|
|
// str:=str+'and (ί<>е<EFBFBD>λ<>1 or ί<>е<EFBFBD>λ is null)';
|
|
|
t_crm_client_cr.close;
|
|
|
t_crm_client_cr.sql.clear;
|
|
|
t_crm_client_cr.sql.add('select * from t_crm_client '+str+' order by <20><><EFBFBD><EFBFBD>');
|
|
|
t_crm_client_cr.open;
|
|
|
|
|
|
if not if_open('408') then
|
|
|
DBComboBoxEh1.Enabled:=True
|
|
|
else
|
|
|
DBComboBoxEh1.Enabled:=false;
|
|
|
|
|
|
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
wwDBGrid1.ColumnByName('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').ReadOnly:=true
|
|
|
else wwDBGrid1.ColumnByName('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').ReadOnly:=false;
|
|
|
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
wwDBGrid1.ColumnByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true
|
|
|
else wwDBGrid1.ColumnByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=false;
|
|
|
//DBComboBoxEh1
|
|
|
|
|
|
|
|
|
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 RxDBLookupCombo11.DisplayValues[1]<>''then
|
|
|
str:=str+' and <20>˷<EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo11.DisplayValues[1]+'''';
|
|
|
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
if wwDBDateTimePicker3.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker3.text+'''';
|
|
|
if wwDBDateTimePicker5.text<>''then
|
|
|
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.text+'''';
|
|
|
if wwDBDateTimePicker6.text<>''then
|
|
|
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.text+'''';
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
str:=str+' and ״̬<>''<27><><EFBFBD>˲<EFBFBD>''';
|
|
|
|
|
|
|
|
|
t_op_seae_order.Close;
|
|
|
t_op_seae_order.SQL.clear;
|
|
|
t_op_seae_order.SQL.Add('select * from t_op_seae_order where 1=1 '
|
|
|
+str
|
|
|
+' order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_op_seae_order.open;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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);
|
|
|
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,'ҵ<><D2B5><EFBFBD><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 op_empty('t_op_seae_order',t_op_seae_order) then //<2F><>Ϊ<EFBFBD><CEAA><EFBFBD>ж<EFBFBD>
|
|
|
abort;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
t_ch_fee['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
|
t_ch_fee['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['<27><><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;
|
|
|
{
|
|
|
t_ch_fee['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
|
|
|
}
|
|
|
|
|
|
t_ch_fee.fieldbyname('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat
|
|
|
+t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat/100*t_ch_fee.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
|
|
|
|
|
|
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat
|
|
|
*t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat/100*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat);
|
|
|
|
|
|
t_ch_fee.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
if t_ch_fee.fieldbyname('Ӧ<>տͻ<D5BF>').AsString='' then
|
|
|
begin
|
|
|
MessageDlg('Ӧ<>տͻ<D5BF><CDBB><EFBFBD><EFBFBD><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>']);
|
|
|
|
|
|
|
|
|
t_ch_fee['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat/(1+t_ch_fee.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*t_ch_fee.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
t_ch_fee['Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_fee.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat-t_ch_fee.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat
|
|
|
+t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat/100*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat
|
|
|
*t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').asfloat/100*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat);
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat);
|
|
|
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;
|
|
|
if t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
MessageDlg('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><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>']);
|
|
|
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/(1+t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
|
|
|
t_ch_fee['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat-t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
|
|
|
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 not if_Edit_delete then
|
|
|
begin
|
|
|
ShowMessage('״̬Ϊ:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if t_op_seae_order.FieldByName('״̬').AsString='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>' then begin
|
|
|
MessageDlg('<27>ѽ<EFBFBD><D1BD>ܶ<EFBFBD><DCB6>ղ<EFBFBD><D5B2><EFBFBD><EFBFBD>ģ<DEB8>',mtWarning,[mbyes],0);
|
|
|
abort;
|
|
|
end;
|
|
|
if t_op_seae_order.FieldByName('״̬').AsString='<27><><EFBFBD>˲<EFBFBD>' then begin
|
|
|
MessageDlg('<27><><EFBFBD>˲ղ<CBB2><D5B2><EFBFBD><EFBFBD>ģ<DEB8>',mtWarning,[mbyes],0);
|
|
|
abort;
|
|
|
end;
|
|
|
if t_op_seae_order.FieldByName('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then begin
|
|
|
MessageDlg('<27><><EFBFBD>˲ղ<CBB2><D5B2><EFBFBD><EFBFBD>ģ<DEB8>',mtWarning,[mbyes],0);
|
|
|
abort;
|
|
|
end;
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then t_op_seae_order.post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
if (t_op_seae_order.State=dsinsert)then
|
|
|
t_op_seae_order.post;
|
|
|
|
|
|
try
|
|
|
frm_opor_ctn:=tfrm_opor_ctn.Create (self);
|
|
|
frm_opor_ctn.t_op_ctn.DataSource:=t_op_seae_order1;
|
|
|
frm_opor_ctn_type:=true;
|
|
|
frm_opor_ctn.ShowModal;
|
|
|
finally
|
|
|
frm_opor_ctn.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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,wwDBLookupCombo3.text);
|
|
|
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,wwDBLookupCombo5.text);
|
|
|
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
|
|
|
t_op_seae_order['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order['<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27>ӻ<EFBFBD><D3BB><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27>ֵ<EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27>Ƿ<EFBFBD><C7B7><EFBFBD>Ӷ']:=0;
|
|
|
t_op_seae_order['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>1']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>2']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>3']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>4']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>5']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>6']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>7']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>8']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>9']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD>10']:=0;
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_seae_order['<27><>TEU']:=0;
|
|
|
t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
|
|
|
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_seae_order['װ<><D7B0><EFBFBD><EFBFBD>']:=get_parameters_value(14,'QINGDAO,CHINA');
|
|
|
|
|
|
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;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.N3Click(Sender: TObject);
|
|
|
var
|
|
|
afield,afieldfee : variant;
|
|
|
aOR_ID:integer;
|
|
|
aQuery:TAdoQuery;
|
|
|
i:integer;
|
|
|
s:string;
|
|
|
Boolean_Ctn:Boolean;
|
|
|
begin
|
|
|
if t_op_seae_order.IsEmpty then begin
|
|
|
exit;
|
|
|
MessageDlg('û<>и<EFBFBD><D0B8>Ƶ<EFBFBD><C6B5><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD>',mtWarning,[mbok],0);
|
|
|
end;
|
|
|
Boolean_Ctn:=false;
|
|
|
afield := vararraycreate([0,t_op_seae_order.fieldcount-1],varvariant);
|
|
|
for i := 0 to (t_op_seae_order.fieldcount-1) do
|
|
|
begin
|
|
|
afield[i] :=t_op_seae_order.fields[i].value ;
|
|
|
end;
|
|
|
aOR_ID:=t_op_seae_order.fieldbyname('OR_ID').AsInteger;
|
|
|
|
|
|
s:=t_op_seae_order.fieldbyname('<27><>װ<EFBFBD><D7B0>').AsString;
|
|
|
|
|
|
t_op_seae_order.append;
|
|
|
for i := 0 to (t_op_seae_order.fieldcount-1) do
|
|
|
begin
|
|
|
if t_op_seae_order.fields[i].FieldName<>'OR_ID' then
|
|
|
t_op_seae_order.fields[i].value := afield[i] ;
|
|
|
end;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=employee;
|
|
|
t_op_seae_order.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').Value:=employee;
|
|
|
t_op_seae_order.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=date;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>˷<EFBFBD>').Value:=0;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>').Value:=department;
|
|
|
t_op_seae_order.fieldbyname('״̬').Value:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').Value:='';
|
|
|
|
|
|
|
|
|
t_op_seae_order.fieldbyname('״̬').Value:='<27>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27>ύ<EFBFBD><E1BDBB>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27>ύʱ<E1BDBB><CAB1>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Value:=null;
|
|
|
t_op_seae_order.fieldbyname('<27><>װ<EFBFBD><D7B0>').Value:=s;
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:='';
|
|
|
|
|
|
|
|
|
t_op_seae_order.Post;
|
|
|
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
close;sql.clear;
|
|
|
sql.Add('select * from t_opor_ctn where OR_ID='+inttostr(aOR_ID));
|
|
|
open;
|
|
|
if not t_op_ctn.active then
|
|
|
t_op_ctn.Open;
|
|
|
first;
|
|
|
while not eof do begin
|
|
|
Boolean_Ctn:=true;
|
|
|
t_op_ctn.Insert;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27>ߴ<EFBFBD>').AsString:=aQuery.fieldbyname('<27>ߴ<EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger;
|
|
|
t_op_ctn.fieldbyname('TEU').Asinteger:=aQuery.fieldbyname('TEU').Asinteger;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><>װ').AsString:=aQuery.fieldbyname('<27><>װ').AsString;
|
|
|
t_op_ctn.fieldbyname('Ʒ<><C6B7>').AsString:=aQuery.fieldbyname('Ʒ<><C6B7>').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><>ͷ').AsString:=aQuery.fieldbyname('<27><>ͷ').AsString;
|
|
|
t_op_ctn.fieldbyname('<27><>ע').AsString:=aQuery.fieldbyname('<27><>ע').AsString;
|
|
|
t_op_ctn.Post;
|
|
|
next;
|
|
|
end;
|
|
|
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><D5B2><EFBFBD>˰<EFBFBD><CBB0>').Asfloat:=aQuery.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').Asfloat;
|
|
|
|
|
|
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>˰<EFBFBD><CBB0>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6>˰<EFBFBD><CBB0>').Asfloat;
|
|
|
t_ch_fee.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').Asfloat:=aQuery.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><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><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>']:='';
|
|
|
|
|
|
if not Boolean_Ctn then
|
|
|
t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
|
|
|
|
|
|
// t_op_seae_order['<27><>װ<EFBFBD><D7B0>']:=s;
|
|
|
t_op_seae_order.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.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);
|
|
|
var aDatetime:TDatetime;
|
|
|
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>']:='';
|
|
|
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>㷽ʽ').asstring:=getzqlx(RxDBLookupCombo1.DisplayValues[1],'',wwDBDateTimePicker2.Date);
|
|
|
|
|
|
aDatetime:=_getzq(RxDBLookupCombo1.DisplayValues[1],wwDBDateTimePicker2.Date);
|
|
|
if Pos('1899',FormatDateTime('YYYY-MM-DD',aDatetime))<=0 then
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=aDatetime
|
|
|
else t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=null
|
|
|
|
|
|
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('Ӧ<>տͻ<D5BF>').OnChange:=crmchargeDr;
|
|
|
t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>').OnChange:=crmchargecr;
|
|
|
|
|
|
t_ch_fee.FieldByName('Ӧ<>ղ<EFBFBD><D5B2><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=NOPricechargeDr;
|
|
|
t_ch_fee.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=NOPricechargeCr;
|
|
|
|
|
|
t_ch_fee.FieldByName('Ӧ<><D3A6>˰<EFBFBD><CBB0>').OnChange:=NOPricechargeDr;
|
|
|
t_ch_fee.FieldByName('Ӧ<><D3A6>˰<EFBFBD><CBB0>').OnChange:=NOPricechargeCr;
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
TNumericField(t_ch_fee.FieldByName('Ӧ<><D3A6>˰<EFBFBD><CBB0>')).DisplayFormat:='#.####"%";#.####"%";#.##';
|
|
|
TNumericField(t_ch_fee.FieldByName('Ӧ<><D3A6>˰<EFBFBD><CBB0>')).EditFormat:=';;';
|
|
|
|
|
|
TNumericField(t_ch_fee.FieldByName('Ӧ<><D3A6>˰<EFBFBD><CBB0>')).DisplayFormat:='#.####"%";#.####"%";#.##';
|
|
|
TNumericField(t_ch_fee.FieldByName('Ӧ<><D3A6>˰<EFBFBD><CBB0>')).EditFormat:=';;';
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.t_ch_feeAfterPost(DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TAdOQuery;
|
|
|
AmtDr,AmtCr:double;
|
|
|
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;
|
|
|
|
|
|
close;sql.clear;
|
|
|
sql.add('select sum(Ӧ<>ս<EFBFBD><D5BD><EFBFBD>*Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>) as Ӧ<>ս<EFBFBD><D5BD><EFBFBD> from t_ch_orderfee where OR_ID='+DataSet.fieldbyname('OR_ID').AsString);
|
|
|
open;
|
|
|
AmtDr:=fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
|
|
|
|
|
|
close;sql.clear;
|
|
|
sql.add('select sum(Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_orderfee where OR_ID='+DataSet.fieldbyname('OR_ID').AsString);
|
|
|
open;
|
|
|
AmtCr:=fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
|
|
|
|
|
|
t_op_seae_order.Edit;
|
|
|
t_op_seae_order.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat:=AmtDr-AmtCr;
|
|
|
if AmtDr<>0 then
|
|
|
t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=StrToFloat(FormatFloat('0.00;-0.00;0',(AmtDr-AmtCr)/AmtDr))
|
|
|
else t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
|
|
|
|
|
|
t_op_seae_order.post;
|
|
|
|
|
|
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;
|
|
|
t_op_seae_order1.DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_disport['<27><><EFBFBD><EFBFBD>'];
|
|
|
end;
|
|
|
|
|
|
if frm_data_share.t_crm_client_ship.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_seae_order1.Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring,[])then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(314,'false')) then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
|
|
|
begin
|
|
|
t_op_seae_order1.Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if frm_data_share.t_code_trade.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo20.DisplayValues[1],[])then
|
|
|
begin
|
|
|
if frm_data_share.t_code_trade.fieldbyname('<27><><EFBFBD>߸<EFBFBD><DFB8><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
|
|
|
begin
|
|
|
t_op_seae_order1.Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_code_trade.fieldbyname('<27><><EFBFBD>߸<EFBFBD><DFB8><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
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.DBComboBoxEh1DropDown(Sender: TObject);
|
|
|
var AdoQuery1:TAdoQuery;
|
|
|
begin
|
|
|
DBComboBoxEh1.items.clear;
|
|
|
AdoQuery1:=CreateAdoQuery;
|
|
|
with AdoQuery1 do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
SQL.Add('select * from t_sys_employee where ״̬=''<27><>ְ''');
|
|
|
SQL.Add('Order by <20><><EFBFBD><EFBFBD>');
|
|
|
Open;first;
|
|
|
while not Eof do
|
|
|
begin
|
|
|
DBComboBoxEh1.Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
Next;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.DBComboBoxEh2DropDown(Sender: TObject);
|
|
|
var AdoQuery1:TAdoQuery;
|
|
|
begin
|
|
|
DBComboBoxEh2.items.clear;
|
|
|
AdoQuery1:=CreateAdoQuery;
|
|
|
with AdoQuery1 do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
SQL.Add('select * from t_sys_employee where ״̬=''<27><>ְ''');
|
|
|
SQL.Add('Order by <20><><EFBFBD><EFBFBD>');
|
|
|
Open;first;
|
|
|
while not Eof do
|
|
|
begin
|
|
|
DBComboBoxEh2.Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
Next;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.DBComboBoxEh3DropDown(Sender: TObject);
|
|
|
var AdoQuery1:TAdoQuery;
|
|
|
begin
|
|
|
DBComboBoxEh3.items.clear;
|
|
|
AdoQuery1:=CreateAdoQuery;
|
|
|
with AdoQuery1 do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
SQL.Add('select * from t_sys_employee where ״̬=''<27><>ְ''');
|
|
|
SQL.Add('Order by <20><><EFBFBD><EFBFBD>');
|
|
|
Open;first;
|
|
|
while not Eof do
|
|
|
begin
|
|
|
DBComboBoxEh3.Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
Next;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo7Change(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae_order1.DataSet=nil then
|
|
|
exit;
|
|
|
if t_op_seae_order1.DataSet.State in [dsinsert,dsEdit] then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client_ship.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo7.DisplayValues[1],[])then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(314,'false')) then begin
|
|
|
if frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
|
|
|
begin
|
|
|
t_op_seae_order1.Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if frm_data_share.t_code_trade.Locate('<27><><EFBFBD><EFBFBD>',t_op_seae_order1.Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
|
|
|
begin
|
|
|
if frm_data_share.t_code_trade.fieldbyname('<27><><EFBFBD>߸<EFBFBD><DFB8><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
|
|
|
begin
|
|
|
t_op_seae_order1.Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_code_trade.fieldbyname('<27><><EFBFBD>߸<EFBFBD><DFB8><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo20Change(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae_order1.DataSet=nil then
|
|
|
exit;
|
|
|
if t_op_seae_order1.DataSet.State in [dsinsert,dsEdit] then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client_ship.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_seae_order1.Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring,[])then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(314,'false')) then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
|
|
|
begin
|
|
|
t_op_seae_order1.Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if frm_data_share.t_code_trade.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo20.DisplayValues[1],[])then
|
|
|
begin
|
|
|
if frm_data_share.t_code_trade.fieldbyname('<27><><EFBFBD>߸<EFBFBD><DFB8><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
|
|
|
begin
|
|
|
t_op_seae_order1.Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_code_trade.fieldbyname('<27><><EFBFBD>߸<EFBFBD><DFB8><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo20Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo20.LookupDisplay:='<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>;<3B><><EFBFBD><EFBFBD>;<3B><><EFBFBD>߸<EFBFBD><DFB8><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo20Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo20.LookupDisplay:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo7Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo7.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.RxDBLookupCombo7Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo7.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.wwDBDateTimePicker2Change(Sender: TObject);
|
|
|
var aDatetime:TDatetime;
|
|
|
begin
|
|
|
if t_op_seae_order.State in [dsedit,dsinsert] then
|
|
|
begin
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD>㷽ʽ').asstring:=getzqlx(RxDBLookupCombo1.DisplayValues[1],'',wwDBDateTimePicker2.Date);
|
|
|
aDatetime:=_getzq(RxDBLookupCombo1.DisplayValues[1],wwDBDateTimePicker2.Date);
|
|
|
if Pos('1899',FormatDateTime('YYYY-MM-DD',aDatetime))<=0 then
|
|
|
t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=aDatetime
|
|
|
else t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=null
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_weituo.DBComboBoxEh4DropDown(Sender: TObject);
|
|
|
var AdoQuery1:TAdoQuery;
|
|
|
begin
|
|
|
TDBComboBoxEh(Sender).items.clear;
|
|
|
AdoQuery1:=CreateAdoQuery;
|
|
|
with AdoQuery1 do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
SQL.Add('select * from t_sys_employee where ״̬=''<27><>ְ''');
|
|
|
SQL.Add('Order by <20><><EFBFBD><EFBFBD>');
|
|
|
Open;first;
|
|
|
while not Eof do
|
|
|
begin
|
|
|
TDBComboBoxEh(Sender).Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
Next;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|