|
|
unit u_info_price_managelist;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, ExtCtrls, bsSkinCtrls, DB, ADODB, Grids, Wwdbigrd, Wwdbgrid,
|
|
|
StdCtrls, wwdblook, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
|
|
|
dxDBTLCl, dxGrClms, Mask, DBCtrls, RxLookup, wwdbdatetimepicker, Wwkeycb,
|
|
|
ComCtrls, bsSkinTabs, wwdbedit, Wwdotdot, Wwdbcomb, Menus, Buttons,
|
|
|
bsdbctrls, dbcgrids, DBGridEh, Tabs;
|
|
|
|
|
|
type
|
|
|
Tfrm_info_price_managelist = class(TForm)
|
|
|
Panel1: TPanel;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
Notebook1: TNotebook;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
t_price_list: TADOQuery;
|
|
|
ds_vessel_plan1: TDataSource;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
Label10: TLabel;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
wwDBComboBox20: TwwDBComboBox;
|
|
|
Label2: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
t_vessel_lines: TADOQuery;
|
|
|
ds_vessel_lines1: TDataSource;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
t_vessel_ships: TADOQuery;
|
|
|
DataSource1: TDataSource;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
bsSkinButton13: TbsSkinButton;
|
|
|
bsSkinButton14: TbsSkinButton;
|
|
|
v_price_list_detail: TADOQuery;
|
|
|
N3: TMenuItem;
|
|
|
N4: TMenuItem;
|
|
|
t_price_detail: TADOQuery;
|
|
|
Label1: TLabel;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
dxDBGrid5: TdxDBGrid;
|
|
|
dxDBGridMaskColumn47: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn48: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn49: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn50: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn51: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn52: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn53: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn12: TdxDBGridColumn;
|
|
|
dxDBGridColumn13: TdxDBGridColumn;
|
|
|
dxDBGridColumn14: TdxDBGridColumn;
|
|
|
dxDBGridDateColumn3: TdxDBGridDateColumn;
|
|
|
dxDBGrid5Column58: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn54: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn55: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn56: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn57: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn58: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn59: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn4: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn60: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn61: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn62: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn63: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn64: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn15: TdxDBGridColumn;
|
|
|
dxDBGridColumn16: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn65: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn66: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn67: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn68: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn69: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn70: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn71: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn72: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn73: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn74: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn85: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn86: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn87: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn88: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn89: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn90: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn91: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn92: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn93: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn94: TdxDBGridMaskColumn;
|
|
|
dxDBGrid5Column56: TdxDBGridColumn;
|
|
|
dxDBGrid5Column57: TdxDBGridColumn;
|
|
|
dxDBGrid5Column50: TdxDBGridColumn;
|
|
|
dxDBGrid5Column52: TdxDBGridColumn;
|
|
|
dxDBGrid5Column53: TdxDBGridColumn;
|
|
|
dxDBGrid5Column54: TdxDBGridColumn;
|
|
|
v_price_release_detail1: TDataSource;
|
|
|
v_price_release_detail: TADOQuery;
|
|
|
dxDBGrid5Column55: TdxDBGridColumn;
|
|
|
N5: TMenuItem;
|
|
|
N6: TMenuItem;
|
|
|
Panel2: TPanel;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMemoColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridColumn;
|
|
|
dxDBGrid1Column21: TdxDBGridColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridColumn;
|
|
|
dxDBGrid1Column27: TdxDBGridColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridColumn;
|
|
|
dxDBGrid1Column29: TdxDBGridColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridColumn;
|
|
|
dxDBGrid1Column31: TdxDBGridColumn;
|
|
|
dxDBGrid1Column32: TdxDBGridColumn;
|
|
|
dxDBGrid1Column33: TdxDBGridColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridColumn;
|
|
|
dxDBGrid1Column35: TdxDBGridColumn;
|
|
|
dxDBGrid1Column36: TdxDBGridColumn;
|
|
|
dxDBGrid1Column37: TdxDBGridColumn;
|
|
|
dxDBGrid1Column38: TdxDBGridColumn;
|
|
|
dxDBGrid1Column39: TdxDBGridColumn;
|
|
|
dxDBGrid1Column40: TdxDBGridColumn;
|
|
|
dxDBGrid1Column41: TdxDBGridColumn;
|
|
|
dxDBGrid1Column42: TdxDBGridColumn;
|
|
|
dxDBGrid1Column43: TdxDBGridColumn;
|
|
|
dxDBGrid1Column44: TdxDBGridColumn;
|
|
|
dxDBGrid1Column45: TdxDBGridColumn;
|
|
|
dxDBGrid1Column46: TdxDBGridColumn;
|
|
|
dxDBGrid1Column47: TdxDBGridColumn;
|
|
|
dxDBGrid1Column48: TdxDBGridColumn;
|
|
|
dxDBGrid1Column49: TdxDBGridColumn;
|
|
|
dxDBGrid1Column50: TdxDBGridColumn;
|
|
|
dxDBGrid1Column51: TdxDBGridColumn;
|
|
|
dxDBGrid1Column52: TdxDBGridColumn;
|
|
|
dxDBGrid1Column53: TdxDBGridColumn;
|
|
|
dxDBGrid1Column54: TdxDBGridColumn;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
TabControl1: TTabSet;
|
|
|
a_shen_modify_old: TADOQuery;
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn2: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn7: TdxDBGridColumn;
|
|
|
dxDBGridColumn8: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn21: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn27: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn28: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn29: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn30: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn31: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn32: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn33: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn34: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn35: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn36: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn37: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn38: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn9: TdxDBGridColumn;
|
|
|
dxDBGridColumn10: TdxDBGridColumn;
|
|
|
dxDBGridColumn11: TdxDBGridColumn;
|
|
|
dxDBGridColumn17: TdxDBGridColumn;
|
|
|
dxDBGridColumn18: TdxDBGridColumn;
|
|
|
v_price_release_nodetail: TADOQuery;
|
|
|
v_price_release_nodetail1: TDataSource;
|
|
|
N7: TMenuItem;
|
|
|
N8: TMenuItem;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
MenuItem1: TMenuItem;
|
|
|
MenuItem2: TMenuItem;
|
|
|
MenuItem3: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
MenuItem5: TMenuItem;
|
|
|
dxDBGrid1Column55: TdxDBGridColumn;
|
|
|
N9: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N17: TMenuItem;
|
|
|
N18: TMenuItem;
|
|
|
N19: TMenuItem;
|
|
|
N20: TMenuItem;
|
|
|
N21: TMenuItem;
|
|
|
N22: TMenuItem;
|
|
|
v_price_list_detail1: TDataSource;
|
|
|
N23: TMenuItem;
|
|
|
N24: TMenuItem;
|
|
|
N25: TMenuItem;
|
|
|
N26: TMenuItem;
|
|
|
N27: TMenuItem;
|
|
|
N28: TMenuItem;
|
|
|
N29: TMenuItem;
|
|
|
N30: TMenuItem;
|
|
|
bsSkinColorDialog1: TColorDialog;
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure t_price_shipAfterInsert(DataSet: TDataSet);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure t_price_shipBeforeEdit(DataSet: TDataSet);
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
procedure bsSkinPanel3Resize(Sender: TObject);
|
|
|
procedure dxDBGrid2DblClick(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure t_price_listBeforeEdit(DataSet: TDataSet);
|
|
|
procedure t_price_listAfterInsert(DataSet: TDataSet);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure N2Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
procedure bsSkinButton14Click(Sender: TObject);
|
|
|
procedure bsSkinButton13Click(Sender: TObject);
|
|
|
procedure t_price_listBeforeDelete(DataSet: TDataSet);
|
|
|
procedure dxDBGrid1Column4CustomDraw(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 N4Click(Sender: TObject);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure v_price_list_detailAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_price_detailAfterInsert(DataSet: TDataSet);
|
|
|
procedure N6Click(Sender: TObject);
|
|
|
procedure TabControl1Change(Sender: TObject; NewTab: Integer;
|
|
|
var AllowChange: Boolean);
|
|
|
procedure N8Click(Sender: TObject);
|
|
|
procedure MenuItem1Click(Sender: TObject);
|
|
|
procedure MenuItem3Click(Sender: TObject);
|
|
|
procedure MenuItem5Click(Sender: TObject);
|
|
|
procedure Button1Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N20Click(Sender: TObject);
|
|
|
procedure N22Click(Sender: TObject);
|
|
|
procedure N23Click(Sender: TObject);
|
|
|
procedure N25Click(Sender: TObject);
|
|
|
procedure N28Click(Sender: TObject);
|
|
|
procedure N30Click(Sender: TObject);
|
|
|
private
|
|
|
aBColor:TColor;
|
|
|
function GetCntr(str:String):String;
|
|
|
function GetPriceColor(ai,FName:String):TColor;
|
|
|
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_info_price_managelist: Tfrm_info_price_managelist;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, u_data_share, my_sys_function, u_info_price_ship,
|
|
|
u_info_price_port, u_info_price_managelistset, u_info_price_return;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption+'1');
|
|
|
frm_info_price_managelist.Hide;
|
|
|
frm_info_price_managelist.ManualFloat(frm_info_price_managelist.BoundsRect );
|
|
|
frm_main.freeTabs('frm_info_price_managelist');
|
|
|
action:=cafree;
|
|
|
frm_info_price_managelist:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_Prior(t_price_list);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
table_next(t_price_list);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton11Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_price_list);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_price_list);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_price_list);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
if not t_vessel_ships.Active then
|
|
|
t_vessel_ships.Open;
|
|
|
|
|
|
if not if_open('231') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
// t_vessel_plan.insert;
|
|
|
frm_info_price_ship:=Tfrm_info_price_ship.Create(Self);
|
|
|
try
|
|
|
frm_info_price_ship.showmodal;
|
|
|
finally
|
|
|
FreeAndNil(frm_info_price_ship);
|
|
|
end;
|
|
|
// bsSkinPageControl1.activePageIndex:=1;
|
|
|
// bsSkinButton10.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('<27><><EFBFBD>˼۱<CBBC><DBB1><EFBFBD>ӡ',2,ds_vessel_plan1,nil,nil,nil,ds_vessel_plan1,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.t_price_shipAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
// t_price_ship['<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>']:=date;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.FormShow(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
S:String;
|
|
|
begin
|
|
|
t_vessel_lines.Open;
|
|
|
{
|
|
|
t_vessel_plan.sql.Clear;
|
|
|
t_vessel_plan.sql.add('SELECT * FROM t_vessel_plan where 1=1 ');
|
|
|
t_vessel_plan.sql.add(' and '+open_data('9001','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no'));
|
|
|
t_vessel_plan.sql.add(' order by <20><><EFBFBD><EFBFBD>');
|
|
|
t_vessel_plan.open;
|
|
|
|
|
|
t_vessel_plan.SQL.SaveToFile('e:\1.txt');
|
|
|
}
|
|
|
// t_price_agreement.open;
|
|
|
|
|
|
loadreggrid(dxdbgrid1,true,caption+'1');
|
|
|
|
|
|
aBColor:=StringToColor(get_parameters_value(82,'clYellow'));
|
|
|
|
|
|
|
|
|
wwDBComboBox20.Items.IndexOf(FormatDateTime('YYYY',Now));
|
|
|
wwDBComboBox20.Text:=FormatDateTime('YYYY',Now);
|
|
|
Edit1.Text:=IntToStr(WeekofYear(Now));
|
|
|
// bsSkinButton1.OnClick(nil);
|
|
|
|
|
|
TabControl1.Tabs.Clear;
|
|
|
TabControl1.Tabs.Add('ȫ<><C8AB>');
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Select distinct <20><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD> from t_price_port order by <20><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>');
|
|
|
Open;
|
|
|
First;
|
|
|
while not Eof do begin
|
|
|
if Trim(FieldByName('<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>').AsString)<>'' then
|
|
|
TabControl1.Tabs.Add(FieldByName('<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>').AsString);
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
TabControl1.TabIndex:=0;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
i:Integer;
|
|
|
cntrstr:string;
|
|
|
function getcarrierFieldName(aYear,aweek:String):string;
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
S,S1:string;
|
|
|
i,j:Integer;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
i:=0;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select <20>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD> from t_vessel_plan where <20><><EFBFBD><EFBFBD>='+aYear+' and <20>ܴ<EFBFBD>='+aWeek);
|
|
|
SQL.Add(' Order by <20>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD> Desc');
|
|
|
OPEN;
|
|
|
First;
|
|
|
if (Trim(FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString)='') or (FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').IsNull) then begin
|
|
|
Result:='<27>˼<EFBFBD>1';
|
|
|
end else begin
|
|
|
while not eof do begin
|
|
|
if (Trim(FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString)='') or (FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').IsNull) then begin
|
|
|
Result:='<27>˼<EFBFBD>'+inttostr(i);
|
|
|
Exit;
|
|
|
end else begin
|
|
|
S:=FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
j:=Strtoint(Trim(copy(S,5,Length(s)-4)))+1;
|
|
|
if i<j then i:=j;
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
Result:='<27>˼<EFBFBD>'+inttostr(i);
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
begin
|
|
|
if wwDBComboBox20.Text='' then begin
|
|
|
MessageDlg('<27><><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>',mtWarning,[mbYes],0);
|
|
|
Exit;
|
|
|
end;
|
|
|
if Edit1.Text='' then begin
|
|
|
MessageDlg('<27>ܴβ<DCB4><CEB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>',mtWarning,[mbYes],0);
|
|
|
Exit;
|
|
|
end;
|
|
|
if RxDBLookupCombo4.DisplayValue='' then begin
|
|
|
MessageDlg('<27><><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>',mtWarning,[mbYes],0);
|
|
|
Exit;
|
|
|
end;
|
|
|
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
|
|
|
v_price_list_detail.Close;
|
|
|
v_price_list_detail.SQL.Clear;
|
|
|
v_price_list_detail.SQL.Add('Select * from t_price_List_Detail where <20><><EFBFBD><EFBFBD>='''+cntrstr+''' and <20><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text+' and <20>ܴ<EFBFBD>='+Edit1.Text);
|
|
|
v_price_list_detail.Open;
|
|
|
|
|
|
t_vessel_ships.open;
|
|
|
t_vessel_ships.first;
|
|
|
while not t_vessel_ships.eof do begin
|
|
|
if (Trim(t_vessel_ships.FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString)<>'') AND (not t_vessel_ships.FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').IsNull) then begin
|
|
|
dxdbgrid1.ColumnByFieldName(Trim(t_vessel_ships.FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString)).Caption:=Trim(t_vessel_ships.FieldByName('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString);
|
|
|
dxdbgrid1.ColumnByFieldName(Trim(t_vessel_ships.FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString)).Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName(Trim(t_vessel_ships.FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString)).ReadOnly:=True;
|
|
|
end;
|
|
|
t_vessel_ships.Next;
|
|
|
end;
|
|
|
|
|
|
str:='SELECT l.* FROM t_price_list l,t_price_port p where p.<2E>ۿڴ<DBBF><DAB4><EFBFBD>=l.Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD> ';
|
|
|
str:=Str+' and '+open_data('3001','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no');
|
|
|
if RxDBLookupCombo4.DisplayValue<>''then
|
|
|
str:=str+' and l.<2E><><EFBFBD><EFBFBD>='+''''+cntrstr+'''';
|
|
|
if wwDBComboBox20.Text<>''then
|
|
|
str:=str+' and l.<2E><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text;
|
|
|
if Edit1.Text<>''then
|
|
|
str:=str+' and l.<2E>ܴ<EFBFBD>='+Edit1.Text;
|
|
|
if RxDBLookupCombo1.DisplayValue<>''then
|
|
|
str:=str+' and l.<2E><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>='+''''+RxDBLookupCombo1.DisplayValue+'''';
|
|
|
|
|
|
t_price_list.close;
|
|
|
t_price_list.sql.Clear;
|
|
|
t_price_list.sql.add(str);
|
|
|
t_price_list.sql.add(' order by p.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_price_list.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.t_price_shipBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if do_data('3001',t_price_list.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')=false then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
CanClose:=frm_close_query(t_price_list);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_price_list,'<27><><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinPanel3Resize(Sender: TObject);
|
|
|
begin
|
|
|
{
|
|
|
wwDBLookupCombo52.Width:=bsSkinPanel3.Width-bsSkinButton13.Width-10;
|
|
|
bsSkinButton13.left:=bsSkinPanel3.Width-bsSkinButton13.Width-2;
|
|
|
bsSkinButton14.left:=bsSkinPanel3.Width-bsSkinButton13.Width-2;
|
|
|
RxDBLookupCombo20.Width:=bsSkinPanel3.Width-RxDBLookupCombo20.left;
|
|
|
Label13.Left:=round((bsSkinPanel3.Width-Label13.Width)/2);
|
|
|
wwDBLookupCombo1.Width:=bsSkinPanel3.Width-bsSkinButton13.Width-10;
|
|
|
Label6.Left:=round((bsSkinPanel3.Width-Label13.Width)/2);
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.dxDBGrid2DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
cntrstr:String;
|
|
|
begin
|
|
|
if not if_open('236') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if t_price_list.IsEmpty then Exit;
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
t_price_list.First;
|
|
|
while not t_price_list.Eof do begin
|
|
|
with aQuery do begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
sql.Add('Select * from t_price_List_Detail where Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_price_list.FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+cntrstr+''' and <20><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text+' and <20>ܴ<EFBFBD>='+Edit1.Text);
|
|
|
Open;
|
|
|
first;
|
|
|
while not eof do begin
|
|
|
aQuery.Edit;
|
|
|
aQuery.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='ͨ<><CDA8>';
|
|
|
aQuery.Post;
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
t_price_list.Edit;
|
|
|
t_price_list.FieldByName('״̬').AsString:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
|
|
|
t_price_list.post;
|
|
|
t_price_list.Next
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
v_price_list_detail.Close;
|
|
|
v_price_list_detail.Open;
|
|
|
t_price_list.Close;
|
|
|
t_price_list.Open;
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.t_price_listBeforeEdit(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not if_open('232') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if DataSet.FieldByName('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then begin
|
|
|
MessageDlg('<27>Ѿ<EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8>',mtWarning,[mbYes],0);
|
|
|
Abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.t_price_listAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_price_list['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_price_list['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_price_list['<27><><EFBFBD><EFBFBD>']:=StrToInt(wwDBComboBox20.Text);
|
|
|
t_price_list['<27>ܴ<EFBFBD>']:=StrToInt(Edit1.Text);
|
|
|
t_price_list['<27><><EFBFBD><EFBFBD>']:=RxDBLookupCombo4.KeyValue;
|
|
|
t_price_list['״̬']:='<27>½<EFBFBD>';
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N2Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,107);
|
|
|
end;
|
|
|
|
|
|
function Tfrm_info_price_managelist.GetCntr(str: String): String;
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
if str='' then exit;
|
|
|
for i:=1 to Length(Str) do begin
|
|
|
if str[i]<>'''' then
|
|
|
Result:=result+Str[i];
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
// if not t_vessel_ships.Active then Exit;
|
|
|
// if t_vessel_ships.IsEmpty then Exit;
|
|
|
|
|
|
if not if_open('230') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
// t_vessel_plan.insert;
|
|
|
frm_info_price_port:=Tfrm_info_price_port.Create(Self);
|
|
|
try
|
|
|
frm_info_price_port.showmodal;
|
|
|
finally
|
|
|
FreeAndNil(frm_info_price_port);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton12Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery,aQuery2,aQuery3:TADOQuery;
|
|
|
aPerWeek:TDate;
|
|
|
aYear,aWeek,cntrstr:String;
|
|
|
begin
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
if not t_price_detail.Active then t_price_detail.Open;
|
|
|
|
|
|
aPerWeek:=dayofW(wwDBComboBox20.Text,strtoint(Edit1.Text));
|
|
|
aPerWeek:=aPerWeek-7;
|
|
|
aYear:=FormatDateTime('YYYY',aPerWeek);
|
|
|
aWeek:=IntToStr(WeekofYear(aPerWeek));
|
|
|
if not if_open('232') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if not t_price_list.active then begin
|
|
|
MessageDlg('<27><><EFBFBD>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><C8BB><EFBFBD>ٸ<EFBFBD><D9B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!',mtError,[mbYes],0);
|
|
|
Exit;
|
|
|
end;
|
|
|
t_price_list.Filtered:=false;
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
aQuery3:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Select * from t_price_list where <20><><EFBFBD><EFBFBD>='+aYear+' and <20>ܴ<EFBFBD>='+aWeek+' and <20><><EFBFBD><EFBFBD>='''+cntrstr+'''');
|
|
|
Open;
|
|
|
First;
|
|
|
while not eof do begin
|
|
|
if not t_price_list.Locate('Ŀ<>ĸ<EFBFBD>',FieldByName('Ŀ<>ĸ<EFBFBD>').AsString,[]) then begin
|
|
|
t_price_list.Insert;
|
|
|
t_price_list['Ŀ<>ĸ<EFBFBD>']:=FieldByName('Ŀ<>ĸ<EFBFBD>').AsString;
|
|
|
t_price_list['Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>']:=FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').AsString;
|
|
|
t_price_list['<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>']:=FieldByName('<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>1']:=FieldByName('<27>˼<EFBFBD>1').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>2']:=FieldByName('<27>˼<EFBFBD>2').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>3']:=FieldByName('<27>˼<EFBFBD>3').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>4']:=FieldByName('<27>˼<EFBFBD>4').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>5']:=FieldByName('<27>˼<EFBFBD>5').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>6']:=FieldByName('<27>˼<EFBFBD>6').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>7']:=FieldByName('<27>˼<EFBFBD>7').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>8']:=FieldByName('<27>˼<EFBFBD>8').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>9']:=FieldByName('<27>˼<EFBFBD>9').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>10']:=FieldByName('<27>˼<EFBFBD>10').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>11']:=FieldByName('<27>˼<EFBFBD>11').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>12']:=FieldByName('<27>˼<EFBFBD>12').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>13']:=FieldByName('<27>˼<EFBFBD>13').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>14']:=FieldByName('<27>˼<EFBFBD>14').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>15']:=FieldByName('<27>˼<EFBFBD>15').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>16']:=FieldByName('<27>˼<EFBFBD>16').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>17']:=FieldByName('<27>˼<EFBFBD>17').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>18']:=FieldByName('<27>˼<EFBFBD>18').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>19']:=FieldByName('<27>˼<EFBFBD>19').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>20']:=FieldByName('<27>˼<EFBFBD>20').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>21']:=FieldByName('<27>˼<EFBFBD>21').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>22']:=FieldByName('<27>˼<EFBFBD>22').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>23']:=FieldByName('<27>˼<EFBFBD>23').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>24']:=FieldByName('<27>˼<EFBFBD>24').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>25']:=FieldByName('<27>˼<EFBFBD>25').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>26']:=FieldByName('<27>˼<EFBFBD>26').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>27']:=FieldByName('<27>˼<EFBFBD>27').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>28']:=FieldByName('<27>˼<EFBFBD>28').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>29']:=FieldByName('<27>˼<EFBFBD>29').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>30']:=FieldByName('<27>˼<EFBFBD>30').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>31']:=FieldByName('<27>˼<EFBFBD>31').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>32']:=FieldByName('<27>˼<EFBFBD>32').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>33']:=FieldByName('<27>˼<EFBFBD>33').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>34']:=FieldByName('<27>˼<EFBFBD>34').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>35']:=FieldByName('<27>˼<EFBFBD>35').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>36']:=FieldByName('<27>˼<EFBFBD>36').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>37']:=FieldByName('<27>˼<EFBFBD>37').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>38']:=FieldByName('<27>˼<EFBFBD>38').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>39']:=FieldByName('<27>˼<EFBFBD>39').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>40']:=FieldByName('<27>˼<EFBFBD>40').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>41']:=FieldByName('<27>˼<EFBFBD>41').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>42']:=FieldByName('<27>˼<EFBFBD>42').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>43']:=FieldByName('<27>˼<EFBFBD>43').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>44']:=FieldByName('<27>˼<EFBFBD>44').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>45']:=FieldByName('<27>˼<EFBFBD>45').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>46']:=FieldByName('<27>˼<EFBFBD>46').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>47']:=FieldByName('<27>˼<EFBFBD>47').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>48']:=FieldByName('<27>˼<EFBFBD>48').AsString;
|
|
|
t_price_list['<27>˼<EFBFBD>49']:=FieldByName('<27>˼<EFBFBD>49').AsString;
|
|
|
t_price_list.Post;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Select * from t_price_list_detail where <20><><EFBFBD><EFBFBD>='+aYear+' and <20>ܴ<EFBFBD>='+aWeek+' and <20><><EFBFBD><EFBFBD>='''+cntrstr+'''');
|
|
|
Open;
|
|
|
First;
|
|
|
while not eof do begin
|
|
|
if not v_price_list_detail.Locate('Ŀ<>ĸ<EFBFBD>;<3B><><EFBFBD><EFBFBD>˾',VarArrayOf([FieldByName('Ŀ<>ĸ<EFBFBD>').AsString,FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString]),[]) then begin
|
|
|
v_price_list_detail.Insert;
|
|
|
v_price_list_detail['Ŀ<>ĸ<EFBFBD>']:=FieldByName('Ŀ<>ĸ<EFBFBD>').AsString;
|
|
|
v_price_list_detail['Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>']:=FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').AsString;
|
|
|
v_price_list_detail['<27><><EFBFBD>뷢<EFBFBD><EBB7A2><EFBFBD>˼<EFBFBD>']:=FieldByName('<27><><EFBFBD>뷢<EFBFBD><EBB7A2><EFBFBD>˼<EFBFBD>').AsBoolean;
|
|
|
v_price_list_detail['<27>Ƿ<EFBFBD><C7B7><EFBFBD>']:=FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>').AsBoolean;
|
|
|
v_price_list_detail['<27><>ɫ']:=FieldByName('<27><>ɫ').AsString;
|
|
|
v_price_list_detail['<27><><EFBFBD><EFBFBD>˾']:=FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString;
|
|
|
v_price_list_detail['<27>ֶ<EFBFBD>']:=FieldByName('<27>ֶ<EFBFBD>').AsString;
|
|
|
v_price_list_detail['<27><><EFBFBD><EFBFBD>״̬']:='<27>½<EFBFBD>';
|
|
|
v_price_list_detail.Post;
|
|
|
aQuery2.Close;aQuery2.SQL.Clear;
|
|
|
aQuery2.SQL.Add('Select * from t_price_detail where LD_ID='+FieldByName('LD_ID').AsString);
|
|
|
aQuery2.Open;
|
|
|
aQuery3.Close;aQuery3.SQL.Clear;
|
|
|
aQuery3.SQL.Add('Select <20><><EFBFBD><EFBFBD> from t_vessel_plan where <20><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text+' and <20>ܴ<EFBFBD>='+Edit1.Text+' and <20><><EFBFBD><EFBFBD>˾='''+FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+'''');
|
|
|
aQuery3.Open;
|
|
|
|
|
|
aQuery2.First;
|
|
|
while not aQuery2.Eof do begin
|
|
|
t_price_detail.Insert;
|
|
|
t_price_detail['LD_ID']:=v_price_list_detail['LD_ID'];
|
|
|
t_price_detail['<27>˼<EFBFBD>']:=aQuery2['<27>˼<EFBFBD>'];
|
|
|
t_price_detail['Ʒ<><C6B7>']:=aQuery2['Ʒ<><C6B7>'];
|
|
|
t_price_detail['<27><>ע']:=aQuery2['<27><>ע'];
|
|
|
aQuery3.First;
|
|
|
while not aQuery3.Eof do begin
|
|
|
if aQuery3['<27><><EFBFBD><EFBFBD>']='һ' then
|
|
|
t_price_detail['<27><>һ']:=1;
|
|
|
if aQuery3['<27><><EFBFBD><EFBFBD>']='<27><>' then
|
|
|
t_price_detail['<27>ܶ<EFBFBD>']:=1;
|
|
|
if aQuery3['<27><><EFBFBD><EFBFBD>']='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
if aQuery3['<27><><EFBFBD><EFBFBD>']='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
if aQuery3['<27><><EFBFBD><EFBFBD>']='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
if aQuery3['<27><><EFBFBD><EFBFBD>']='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
if aQuery3['<27><><EFBFBD><EFBFBD>']='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
aQuery3.Next;
|
|
|
end;
|
|
|
t_price_detail.Post;
|
|
|
aQuery2.Next;
|
|
|
end;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
|
|
|
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Select * from t_price_port order by <20>ۿ<EFBFBD><DBBF><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
Open;
|
|
|
First;
|
|
|
while not eof do begin
|
|
|
if not t_price_list.Locate('Ŀ<>ĸ<EFBFBD>',FieldByName('<27>ۿ<EFBFBD><DBBF><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
|
|
|
t_price_list.Insert;
|
|
|
t_price_list['Ŀ<>ĸ<EFBFBD>']:=FieldByName('<27>ۿ<EFBFBD><DBBF><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
t_price_list['Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>']:=FieldByName('<27>ۿڴ<DBBF><DAB4><EFBFBD>').AsString;
|
|
|
t_price_list['<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>']:=FieldByName('<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>').AsString;
|
|
|
t_price_list.Post;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
FreeAndNil(aQuery2);
|
|
|
FreeAndNil(aQuery3);
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton14Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery,aQuery2:TADOQuery;
|
|
|
subStr,str,cntrstr,sqlstr:string;
|
|
|
FM_ID:String;
|
|
|
function GetCorpID(Corp:string):string;
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('sELECT <20><><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+Corp+'''');
|
|
|
Open;
|
|
|
Result:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
function GetEtdStr(aYear,aWeek:Integer;one,two,three,four,five,six,seven:Boolean):String;
|
|
|
var
|
|
|
FirstweekDay,endWeekday,aPerWeek: TDate;
|
|
|
i:integer;
|
|
|
S:String;
|
|
|
begin
|
|
|
Result:='';
|
|
|
S:='';
|
|
|
aPerWeek:=dayofW(inttostr(aYear),aWeek);
|
|
|
i:=DayOfWeek(aPerWeek);
|
|
|
FirstweekDay:=aPerWeek-(i-2);
|
|
|
endWeekday:=FirstweekDay+6;
|
|
|
if one then begin
|
|
|
S:=' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay)+'''';
|
|
|
end;
|
|
|
if two then begin
|
|
|
if S<>'' THEN
|
|
|
S:=S+' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+1)+''''
|
|
|
else
|
|
|
S:=' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+1)+'''';
|
|
|
|
|
|
end;
|
|
|
if three then begin
|
|
|
if S<>'' THEN
|
|
|
S:=S+' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+2)+''''
|
|
|
else
|
|
|
S:=' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+2)+'''';
|
|
|
|
|
|
end;
|
|
|
if four then begin
|
|
|
if S<>'' THEN
|
|
|
S:=S+' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+3)+''''
|
|
|
else
|
|
|
S:=' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+3)+'''';
|
|
|
|
|
|
end;
|
|
|
if five then begin
|
|
|
if S<>'' THEN
|
|
|
S:=S+' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+4)+''''
|
|
|
else
|
|
|
S:=' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+4)+'''';
|
|
|
end;
|
|
|
if six then begin
|
|
|
if S<>'' THEN
|
|
|
S:=S+' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+5)+''''
|
|
|
else
|
|
|
S:=' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+5)+'''';
|
|
|
|
|
|
end;
|
|
|
if seven then begin
|
|
|
if S<>'' THEN
|
|
|
S:=S+' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+6)+''''
|
|
|
else
|
|
|
S:=' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+6)+'''';
|
|
|
end;
|
|
|
|
|
|
if S='' then begin
|
|
|
S:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='''+FormatDateTime('YYYY-MM-DD',FirstweekDay)+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='''+FormatDateTime('YYYY-MM-DD',FirstweekDay+6)+'''';
|
|
|
end;
|
|
|
Result:=S;
|
|
|
end;
|
|
|
|
|
|
begin
|
|
|
if not if_open('235') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD>˼ۣ<CBBC>ϵͳ<CFB5><CDB3><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD>Ϣ<EFBFBD><CFA2>ȷʵҪ<CAB5><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?',mtConfirmation,[mbYes,mbNo],0)=mrYes then begin
|
|
|
frm_main.db.BeginTrans;
|
|
|
t_price_list.First;
|
|
|
t_vessel_ships.Close;
|
|
|
t_vessel_ships.Open;
|
|
|
try
|
|
|
try
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
with aQuery do begin
|
|
|
while not t_price_list.Eof do begin
|
|
|
t_vessel_ships.First;
|
|
|
cntrstr:=t_price_list.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from v_price_Detail where <20><><EFBFBD><EFBFBD>='''+cntrstr+''' and <20><><EFBFBD><EFBFBD>='+t_price_list.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+' and <20>ܴ<EFBFBD>='+t_price_list.FieldByName('<27>ܴ<EFBFBD>').AsString+' AND Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_price_list.FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').AsString+'''');
|
|
|
Open;
|
|
|
First;
|
|
|
while not eof do begin
|
|
|
sqlstr:='('+GetEtdStr(aQuery.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger,aQuery.FieldByName('<27>ܴ<EFBFBD>').AsInteger,aQuery['<27><>һ'],aQuery['<27>ܶ<EFBFBD>'],aQuery['<27><><EFBFBD><EFBFBD>'],aQuery['<27><><EFBFBD><EFBFBD>'],aQuery['<27><><EFBFBD><EFBFBD>'],aQuery['<27><><EFBFBD><EFBFBD>'],aQuery['<27><><EFBFBD><EFBFBD>'])+')';
|
|
|
sqlstr:=sqlstr+' and <20><><EFBFBD><EFBFBD>˾='''+getCorp(aQuery.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString)+'''';
|
|
|
sqlstr:=sqlstr+' and ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+Trim(aQuery.FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').AsString)+'''';
|
|
|
if aQuery.FieldByName('Ʒ<><C6B7>').AsString<>'' then
|
|
|
sqlstr:=sqlstr+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+aQuery.FieldByName('Ʒ<><C6B7>').AsString+'''';
|
|
|
|
|
|
aQuery2.Close;aQuery2.SQL.Clear;
|
|
|
aQuery2.SQL.Add('Select * from t_ch_fee where <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>״̬ not in (''<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'',''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') and ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>=1 and <20><>='''+cntrstr+''' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_seae where '+sqlstr+' )');
|
|
|
// ShowMessage(aQuery2.SQL.TEXT);
|
|
|
aQuery2.Open;
|
|
|
|
|
|
|
|
|
aQuery2.First;
|
|
|
while not aQuery2.Eof do begin
|
|
|
|
|
|
aQuery2.Edit;
|
|
|
|
|
|
a_shen_modify_old.Close;
|
|
|
a_shen_modify_old.SQL.Clear;
|
|
|
a_shen_modify_old.SQL.Add('Select * from t_ch_fee_modify where CH_ID='+aQuery2.FieldByName('CH_ID').AsString);
|
|
|
a_shen_modify_old.Open;
|
|
|
a_shen_modify_old.Insert;
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ';
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD>㵥λ']:=aQuery2['<27><><EFBFBD>㵥λ'];
|
|
|
a_shen_modify_old['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=aQuery2['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><>']:=aQuery2['<27><>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27>ұ<EFBFBD>']:=aQuery2['<27>ұ<EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['CH_ID']:=aQuery2['CH_ID'];
|
|
|
a_shen_modify_old['<27><>ע']:=aQuery2['<27><>ע'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><D7BC><EFBFBD><EFBFBD>';
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
a_shen_modify_old.post;
|
|
|
FM_ID:=a_shen_modify_old['FM_ID'];
|
|
|
a_shen_modify_old.EDIT;
|
|
|
a_shen_modify_old['MD_ID']:=FM_ID;
|
|
|
a_shen_modify_old.post;
|
|
|
|
|
|
if (aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat=0) and (FieldByName('<27>˼<EFBFBD>').AsFloat<>0) then
|
|
|
aQuery2.FieldByName('<27><>ע').AsString:=' ';
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27>˼<EFBFBD>').AsFloat;
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
aQuery2.FieldByName('<27>˼۱<CBBC><DBB1><EFBFBD>').AsInteger:=aQuery['ID'];
|
|
|
aQuery2.Post;
|
|
|
a_shen_modify_old.Insert;
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ';
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD>㵥λ']:=aQuery2['<27><><EFBFBD>㵥λ'];
|
|
|
a_shen_modify_old['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=aQuery2['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><>']:=aQuery2['<27><>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['<27>ұ<EFBFBD>']:=aQuery2['<27>ұ<EFBFBD>'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27><><EFBFBD><EFBFBD>'];
|
|
|
a_shen_modify_old['CH_ID']:=aQuery2['CH_ID'];
|
|
|
a_shen_modify_old['<27><>ע']:=aQuery2['<27><>ע'];
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
a_shen_modify_old['MD_ID']:=FM_ID;
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><D7BC><EFBFBD><EFBFBD>';
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
a_shen_modify_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
a_shen_modify_old.post;
|
|
|
|
|
|
aQuery2.Next;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
t_price_list.Edit;
|
|
|
t_price_list['״̬']:='<27>˼۷<CBBC><DBB7><EFBFBD>';
|
|
|
t_price_list['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Now;
|
|
|
t_price_list.Post;
|
|
|
t_price_list.Next;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
FreeAndNil(aQuery2);
|
|
|
end;
|
|
|
showmessage('<27>˼۳ɹ<DBB3><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
frm_main.db.CommitTrans;
|
|
|
|
|
|
except
|
|
|
frm_main.db.RollbackTrans;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton13Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
cntrstr:String;
|
|
|
begin
|
|
|
if not if_open('236') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
t_price_list.First;
|
|
|
while not t_price_list.Eof do begin
|
|
|
with aQuery do begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
sql.Add('Select * from t_price_List_Detail where Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_price_list.FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+cntrstr+''' and <20><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text+' and <20>ܴ<EFBFBD>='+Edit1.Text);
|
|
|
Open;
|
|
|
first;
|
|
|
while not eof do begin
|
|
|
aQuery.Edit;
|
|
|
aQuery.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27>½<EFBFBD>';
|
|
|
aQuery.Post;
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
t_price_list.Edit;
|
|
|
t_price_list.FieldByName('״̬').AsString:='<27>½<EFBFBD>';
|
|
|
t_price_list.post;
|
|
|
t_price_list.Next
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
v_price_list_detail.Close;
|
|
|
v_price_list_detail.Open;
|
|
|
t_price_list.Close;
|
|
|
t_price_list.Open;
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.t_price_listBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
cntrstr:String;
|
|
|
begin
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]); if not if_open('233') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if DataSet.FieldByName('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then begin
|
|
|
MessageDlg('<27>Ѿ<EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8>',mtWarning,[mbYes],0);
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_ch_fee where <20>˼۱<CBBC><DBB1><EFBFBD> in (select ID from v_price_Detail where <20><><EFBFBD><EFBFBD>='+t_price_list.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+' and <20>ܴ<EFBFBD>='+t_price_list.FieldByName('<27>ܴ<EFBFBD>').AsString+' and Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_price_list.FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+cntrstr+''')');
|
|
|
Open;
|
|
|
if not IsEmpty then begin
|
|
|
MessageDlg('<27><><EFBFBD>˼<EFBFBD><CBBC>ѷ<EFBFBD><D1B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>˼ۣ<CBBC>',mtWarning,[mbOk],0);
|
|
|
Abort;
|
|
|
end else begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Delete from t_price_detail where LD_ID in (select LD_ID from t_price_List_Detail where <20><><EFBFBD><EFBFBD>='+t_price_list.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+' and <20>ܴ<EFBFBD>='+t_price_list.FieldByName('<27>ܴ<EFBFBD>').AsString+' and Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_price_list.FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+cntrstr+''')');
|
|
|
ExecSQL;
|
|
|
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Delete from t_price_List_Detail where <20><><EFBFBD><EFBFBD>='+t_price_list.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+' and <20>ܴ<EFBFBD>='+t_price_list.FieldByName('<27>ܴ<EFBFBD>').AsString+' and Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_price_list.FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+cntrstr+'''');
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
function Tfrm_info_price_managelist.GetPriceColor(ai,
|
|
|
FName: String): TColor;
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.dxDBGrid1Column4CustomDraw(
|
|
|
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 v_price_list_detail.Locate('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>;<3B>ֶ<EFBFBD>',VarArrayOf([ANode.Strings[dxDBGrid1Column54.Index],AColumn.FieldName]),[]) then begin
|
|
|
try
|
|
|
AFont.Color:=StringToColor(v_price_list_detail.fieldbyname('<27><>ɫ').asstring);
|
|
|
if v_price_list_detail['<27><><EFBFBD>뷢<EFBFBD><EBB7A2><EFBFBD>˼<EFBFBD>'] then
|
|
|
AColor:=aBColor
|
|
|
else
|
|
|
AColor:=clWhite;
|
|
|
if v_price_list_detail['<27><><EFBFBD><EFBFBD>״̬']='<27><><EFBFBD><EFBFBD>' then begin
|
|
|
AFont.Style:=AFont.Style+[fsStrikeOut];
|
|
|
AColor:=clBlue;
|
|
|
end;
|
|
|
if v_price_list_detail['<27><><EFBFBD><EFBFBD>״̬']='ͨ<><CDA8>' then
|
|
|
AFont.Style:=AFont.Style+[fsItalic,fsBold,fsUnderline];
|
|
|
|
|
|
except
|
|
|
AFont.Color:=clBlack;
|
|
|
AColor:=clWhite;
|
|
|
end;
|
|
|
end else begin
|
|
|
AFont.Color:=clBlack;
|
|
|
AColor:=clWhite;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N4Click(Sender: TObject);
|
|
|
var
|
|
|
Cntrstr:String;
|
|
|
aQuery3:TADOQuery;
|
|
|
begin
|
|
|
if not if_open('232') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if not (Pos('<27>˼<EFBFBD>',dxDBGrid1.FocusedField.FieldName)>0) then Exit;
|
|
|
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
|
|
|
|
|
|
if not v_price_List_Detail.Locate('Ŀ<>ĸ<EFBFBD>;<3B>ֶ<EFBFBD>',VarArrayOf([t_price_list['Ŀ<>ĸ<EFBFBD>'],dxDBGrid1.FocusedField.FieldName]),[]) then begin
|
|
|
t_price_detail.Open;
|
|
|
v_price_List_Detail.Insert;
|
|
|
v_price_List_Detail['Ŀ<>ĸ<EFBFBD>']:=t_price_list['Ŀ<>ĸ<EFBFBD>'];
|
|
|
v_price_List_Detail['Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>']:=t_price_list['Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>'];
|
|
|
v_price_List_Detail['<27>ֶ<EFBFBD>']:=dxDBGrid1.FocusedField.FieldName;
|
|
|
v_price_List_Detail['<27><><EFBFBD><EFBFBD>˾']:=Trim(dxdbgrid1.ColumnByFieldName(dxDBGrid1.FocusedField.FieldName).Caption);
|
|
|
v_price_List_Detail.Post;
|
|
|
aQuery3:=CreateAdoQuery;
|
|
|
try
|
|
|
aQuery3.Close;aQuery3.SQL.Clear;
|
|
|
aQuery3.SQL.Add('Select <20><><EFBFBD><EFBFBD> from t_vessel_plan where <20><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text+' and <20>ܴ<EFBFBD>='+Edit1.Text+' and <20><><EFBFBD><EFBFBD>˾='''+dxdbgrid1.ColumnByFieldName(dxDBGrid1.FocusedField.FieldName).Caption+'''');
|
|
|
aQuery3.Open;
|
|
|
t_price_detail.Insert;
|
|
|
aQuery3.First;
|
|
|
while not aQuery3.Eof do begin
|
|
|
if Trim(aQuery3['<27><><EFBFBD><EFBFBD>'])='һ' then
|
|
|
t_price_detail['<27><>һ']:=1;
|
|
|
if Trim(aQuery3['<27><><EFBFBD><EFBFBD>'])='<27><>' then
|
|
|
t_price_detail['<27>ܶ<EFBFBD>']:=1;
|
|
|
if Trim(aQuery3['<27><><EFBFBD><EFBFBD>'])='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
if Trim(aQuery3['<27><><EFBFBD><EFBFBD>'])='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
if Trim(aQuery3['<27><><EFBFBD><EFBFBD>'])='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
if Trim(aQuery3['<27><><EFBFBD><EFBFBD>'])='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
if Trim(aQuery3['<27><><EFBFBD><EFBFBD>'])='<27><>' then
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
aQuery3.Next;
|
|
|
end;
|
|
|
t_price_detail.Post;
|
|
|
finally
|
|
|
FreeAndNil(aQuery3);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
frm_info_price_managelistset:=Tfrm_info_price_managelistset.Create(Self);
|
|
|
try
|
|
|
frm_info_price_managelistset.t_price_List_Detail.Close;
|
|
|
frm_info_price_managelistset.t_price_List_Detail.SQL.Clear;
|
|
|
frm_info_price_managelistset.t_price_List_Detail.SQL.Add('select * from t_price_List_Detail where <20><><EFBFBD><EFBFBD>='''+cntrstr+''' and <20><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text+' and <20>ܴ<EFBFBD>='+Edit1.Text+' AND Ŀ<>ĸ<EFBFBD>='''+t_price_list['Ŀ<>ĸ<EFBFBD>']+''' and <20>ֶ<EFBFBD>='''+dxDBGrid1.FocusedField.FieldName+'''');
|
|
|
frm_info_price_managelistset.t_price_List_Detail.Open;
|
|
|
frm_info_price_managelistset.t_price_Detail.Open;
|
|
|
frm_info_price_managelistset.ShowModal;
|
|
|
finally
|
|
|
FreeAndNil(frm_info_price_managelistset);
|
|
|
bsSkinButton1.OnClick(nil);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.bsSkinButton15Click(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
// bsSkinPanel4.Visible:=false;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.v_price_list_detailAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
v_price_list_detail['<27><><EFBFBD><EFBFBD>']:=StrToInt(wwDBComboBox20.Text);
|
|
|
v_price_list_detail['<27>ܴ<EFBFBD>']:=StrToInt(Edit1.Text);
|
|
|
v_price_list_detail['<27><><EFBFBD><EFBFBD>']:=RxDBLookupCombo4.KeyValue;
|
|
|
v_price_list_detail['<27><><EFBFBD>뷢<EFBFBD><EBB7A2><EFBFBD>˼<EFBFBD>']:=1;
|
|
|
v_price_list_detail['<27>Ƿ<EFBFBD><C7B7><EFBFBD>']:=1;
|
|
|
v_price_list_detail['<27><><EFBFBD><EFBFBD>״̬']:='<27>½<EFBFBD>';
|
|
|
v_price_list_detail['<27><>ɫ']:='clBlack';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.t_price_detailAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_price_detail['LD_ID']:=v_price_list_detail['LD_ID'];
|
|
|
t_price_detail['<27>˼<EFBFBD>']:=0;
|
|
|
t_price_detail['<27><>һ']:=0;
|
|
|
t_price_detail['<27>ܶ<EFBFBD>']:=0;
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_price_detail['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N6Click(Sender: TObject);
|
|
|
var
|
|
|
cntrstr:String;
|
|
|
begin
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
v_price_release_detail.Close;
|
|
|
v_price_release_detail.SQL.Clear;
|
|
|
v_price_release_detail.SQL.Add('Select * from v_price_release_detail where <20>˼۱<CBBC><DBB1><EFBFBD> in (select ID from v_price_Detail where <20><><EFBFBD><EFBFBD>='+Trim(wwDBComboBox20.Text)+' and <20>ܴ<EFBFBD>='+Trim(Edit1.Text)+' and <20><><EFBFBD><EFBFBD>='''+cntrstr+''' and Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_price_list['Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>']+''' and <20><><EFBFBD><EFBFBD>˾='''+Trim(dxdbgrid1.ColumnByFieldName(dxDBGrid1.FocusedField.FieldName).Caption)+''')');
|
|
|
v_price_release_detail.Open;
|
|
|
bsSkinPageControl1.ActivePage:=bsSkinTabSheet2;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.TabControl1Change(Sender: TObject;
|
|
|
NewTab: Integer; var AllowChange: Boolean);
|
|
|
var
|
|
|
S:String;
|
|
|
begin
|
|
|
if not t_price_list.Active then Exit;
|
|
|
|
|
|
if Trim(TabControl1.Tabs.Strings[NewTab])='ȫ<><C8AB>' then begin
|
|
|
t_price_list.Filtered:=false;
|
|
|
t_price_list.Filter:='';
|
|
|
end else begin
|
|
|
S:=Trim(TabControl1.Tabs.Strings[NewTab]);
|
|
|
t_price_list.Filtered:=false;
|
|
|
t_price_list.Filter:='<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>='''+S+'''';
|
|
|
t_price_list.Filtered:=True;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N8Click(Sender: TObject);
|
|
|
var
|
|
|
cntrstr:String;
|
|
|
begin
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
v_price_release_nodetail.Close;
|
|
|
v_price_release_nodetail.SQL.Clear;
|
|
|
v_price_release_nodetail.SQL.Add('Select * from v_price_release_nodetail where <20><><EFBFBD><EFBFBD><><3E>˼<EFBFBD> and <20><><EFBFBD><EFBFBD>='''+cntrstr+''' and <20><><EFBFBD><EFBFBD>='+Trim(wwDBComboBox20.Text)+' and <20>ܴ<EFBFBD>='+Trim(Edit1.Text));
|
|
|
v_price_release_nodetail.Open;
|
|
|
bsSkinPageControl1.ActivePage:=bsSkinTabSheet3;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.MenuItem1Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinTabSheet2.showing then
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid5);
|
|
|
exit;
|
|
|
end;
|
|
|
if bsSkinTabSheet3.showing then
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid2);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.MenuItem3Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinTabSheet2.showing then
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid5);
|
|
|
exit;
|
|
|
end;
|
|
|
if bsSkinTabSheet3.showing then
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid2);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.MenuItem5Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinTabSheet2.showing then
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid5);
|
|
|
exit;
|
|
|
end;
|
|
|
if bsSkinTabSheet3.showing then
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid2);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.Button1Click(Sender: TObject);
|
|
|
var
|
|
|
aPerWeek:TDate;
|
|
|
I:Integer;
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N12Click(Sender: TObject);
|
|
|
var
|
|
|
Cntrstr:String;
|
|
|
aQuery3:TADOQuery;
|
|
|
begin
|
|
|
if not if_open('232') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if not (Pos('<27>˼<EFBFBD>',dxDBGrid1.FocusedField.FieldName)>0) then Exit;
|
|
|
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
|
|
|
if v_price_List_Detail.Locate('Ŀ<>ĸ<EFBFBD>;<3B>ֶ<EFBFBD>',VarArrayOf([t_price_list['Ŀ<>ĸ<EFBFBD>'],dxDBGrid1.FocusedField.FieldName]),[]) then begin
|
|
|
if v_price_List_Detail['<27><><EFBFBD><EFBFBD>״̬']='ͨ<><CDA8>' then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>');
|
|
|
end else begin
|
|
|
aQuery3:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery3 do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Delete from t_price_detail where LD_ID='+v_price_List_Detail.FieldByNAME('LD_ID').AsString);
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
t_price_list.Edit;
|
|
|
t_price_list.fieldByName(V_price_List_Detail['<27>ֶ<EFBFBD>']).asString:='';
|
|
|
t_price_list.Post;
|
|
|
v_price_list_detail.Delete;
|
|
|
finally
|
|
|
FreeAndNil(aQuery3);
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N20Click(Sender: TObject);
|
|
|
var
|
|
|
cntrstr:String;
|
|
|
begin
|
|
|
if not if_open('236') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if not (Pos('<27>˼<EFBFBD>',dxDBGrid1.FocusedField.FieldName)>0) then Exit;
|
|
|
|
|
|
cntrstr:=RxDBLookupCombo4.DisplayValues[0];
|
|
|
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
|
|
|
|
|
|
if v_price_List_Detail.Locate('Ŀ<>ĸ<EFBFBD>;<3B>ֶ<EFBFBD>',VarArrayOf([t_price_list['Ŀ<>ĸ<EFBFBD>'],dxDBGrid1.FocusedField.FieldName]),[]) then begin
|
|
|
frmPirceReturn:=TfrmPirceReturn.Create(Self);
|
|
|
try
|
|
|
frmPirceReturn.t_price_List_Detail.Close;
|
|
|
frmPirceReturn.t_price_List_Detail.SQL.Clear;
|
|
|
frmPirceReturn.t_price_List_Detail.SQL.Add('select * from t_price_List_Detail where <20><><EFBFBD><EFBFBD>='''+cntrstr+''' and <20><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text+' and <20>ܴ<EFBFBD>='+Edit1.Text+' AND Ŀ<>ĸ<EFBFBD>='''+t_price_list['Ŀ<>ĸ<EFBFBD>']+''' and <20>ֶ<EFBFBD>='''+dxDBGrid1.FocusedField.FieldName+'''');
|
|
|
frmPirceReturn.t_price_List_Detail.Open;
|
|
|
frmPirceReturn.ShowModal;
|
|
|
finally
|
|
|
FreeAndNil(frmPirceReturn);
|
|
|
bsSkinButton1.OnClick(nil);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N22Click(Sender: TObject);
|
|
|
begin
|
|
|
if not if_open('232') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if t_price_list.IsEmpty then exit;
|
|
|
if v_price_List_Detail.IsEmpty then exit;
|
|
|
|
|
|
if v_price_List_Detail.Locate('Ŀ<>ĸ<EFBFBD>;<3B>ֶ<EFBFBD>',VarArrayOf([t_price_list['Ŀ<>ĸ<EFBFBD>'],dxDBGrid1.FocusedField.FieldName]),[]) then begin
|
|
|
v_price_list_detail.Edit;
|
|
|
v_price_list_detail.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27>½<EFBFBD>';
|
|
|
v_price_list_detail.Post;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N23Click(Sender: TObject);
|
|
|
begin
|
|
|
if not if_open('236') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if t_price_list.IsEmpty then exit;
|
|
|
if v_price_List_Detail.IsEmpty then exit;
|
|
|
|
|
|
if v_price_List_Detail.Locate('Ŀ<>ĸ<EFBFBD>;<3B>ֶ<EFBFBD>',VarArrayOf([t_price_list['Ŀ<>ĸ<EFBFBD>'],dxDBGrid1.FocusedField.FieldName]),[]) then begin
|
|
|
v_price_list_detail.Edit;
|
|
|
v_price_list_detail.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='ͨ<><CDA8>';
|
|
|
v_price_list_detail.Post;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N25Click(Sender: TObject);
|
|
|
var
|
|
|
FName:string;
|
|
|
begin
|
|
|
if not if_open('236') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if t_price_list.IsEmpty then exit;
|
|
|
if v_price_List_Detail.IsEmpty then exit;
|
|
|
FName:=dxDBGrid1.FocusedField.FieldName;
|
|
|
t_price_list.First;
|
|
|
while not t_price_list.eof do begin
|
|
|
if v_price_List_Detail.Locate('Ŀ<>ĸ<EFBFBD>;<3B>ֶ<EFBFBD>',VarArrayOf([t_price_list['Ŀ<>ĸ<EFBFBD>'],FName]),[]) then begin
|
|
|
v_price_list_detail.Edit;
|
|
|
v_price_list_detail.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='ͨ<><CDA8>';
|
|
|
v_price_list_detail.Post;
|
|
|
end;
|
|
|
t_price_list.Next;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N28Click(Sender: TObject);
|
|
|
begin
|
|
|
if not if_open('232') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if t_price_list.IsEmpty then exit;
|
|
|
if v_price_List_Detail.IsEmpty then exit;
|
|
|
if bsSkinColorDialog1.Execute then
|
|
|
begin
|
|
|
if v_price_List_Detail.Locate('Ŀ<>ĸ<EFBFBD>;<3B>ֶ<EFBFBD>',VarArrayOf([t_price_list['Ŀ<>ĸ<EFBFBD>'],dxDBGrid1.FocusedField.FieldName]),[]) then begin
|
|
|
v_price_list_detail.Edit;
|
|
|
v_price_list_detail['<27><>ɫ']:=ColorToString(bsSkinColorDialog1.Color);
|
|
|
v_price_list_detail.Post;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_managelist.N30Click(Sender: TObject);
|
|
|
var
|
|
|
FName:string;
|
|
|
begin
|
|
|
if not if_open('232') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if t_price_list.IsEmpty then exit;
|
|
|
if v_price_List_Detail.IsEmpty then exit;
|
|
|
if bsSkinColorDialog1.Execute then
|
|
|
begin
|
|
|
FName:=dxDBGrid1.FocusedField.FieldName;
|
|
|
t_price_list.First;
|
|
|
while not t_price_list.eof do begin
|
|
|
if v_price_List_Detail.Locate('Ŀ<>ĸ<EFBFBD>;<3B>ֶ<EFBFBD>',VarArrayOf([t_price_list['Ŀ<>ĸ<EFBFBD>'],FName]),[]) then begin
|
|
|
v_price_list_detail.Edit;
|
|
|
v_price_list_detail['<27><>ɫ']:=ColorToString(bsSkinColorDialog1.Color);
|
|
|
v_price_list_detail.Post;
|
|
|
end;
|
|
|
t_price_list.Next;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|