unit u_sys_limited; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms, DB, ADODB, ExtCtrls, bsSkinCtrls, ComCtrls, bsSkinTabs, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb, CheckLst, u_sys_data, DBCtrls, u_sys_data_d, u_sys_data_v, RxLookup, XPMenu, Menus, u_sys_data_price, bsdbctrls, dxtree, dxdbtree, ImgList; type Tfrm_sys_limited = class(TForm) dxDBGrid1: TdxDBGrid; dxDBGrid1DP_ID: TdxDBGridMaskColumn; dxDBGrid1Column2: TdxDBGridMaskColumn; t_sys_open: TADOQuery; t_sys_open1: TDataSource; bsSkinPageControl1: TbsSkinPageControl; bsSkinTabSheet1: TbsSkinTabSheet; bsSkinTabSheet2: TbsSkinTabSheet; bsSkinPanel1: TbsSkinPanel; t_sys_employee1: TDataSource; t_sys_employee: TADOQuery; fra_sys_data1: Tfra_sys_data; fra_sys_data2: Tfra_sys_data; bsSkinButton5: TbsSkinButton; bsSkinButton12: TbsSkinButton; bsSkinButton10: TbsSkinButton; t_sys_code: TADOQuery; fra_sys_data3: Tfra_sys_data; fra_sys_data4: Tfra_sys_data; bsSkinButton1: TbsSkinButton; bsSkinTabSheet3: TbsSkinTabSheet; bsSkinPanel2: TbsSkinPanel; Label1: TLabel; DBEdit1: TDBEdit; fra_sys_data_d5: Tfra_sys_data_d; fra_sys_data_d6: Tfra_sys_data_d; fra_sys_data_d7: Tfra_sys_data_d; fra_sys_data_d8: Tfra_sys_data_d; fra_sys_data_d9: Tfra_sys_data_d; fra_sys_data_d10: Tfra_sys_data_d; fra_sys_data_d11: Tfra_sys_data_d; fra_sys_data_d12: Tfra_sys_data_d; bsSkinTabSheet4: TbsSkinTabSheet; fra_sys_data_v1: Tfra_sys_data_v; fra_sys_data_d13: Tfra_sys_data_d; fra_sys_data_v2: Tfra_sys_data_v; fra_sys_data_v3: Tfra_sys_data_v; fra_sys_data_v4: Tfra_sys_data_v; fra_sys_data_v5: Tfra_sys_data_v; fra_sys_data_v6: Tfra_sys_data_v; bsSkinTabSheet5: TbsSkinTabSheet; bsSkinButton2: TbsSkinButton; fra_sys_data5: Tfra_sys_data; bsSkinButton9: TbsSkinButton; Label9: TLabel; RxDBLookupCombo2: TRxDBLookupCombo; t_sys_lg: TADOQuery; t_sys_lg1: TDataSource; t_sys_lg_open: TADOQuery; t_sys_lg_open1: TDataSource; t_sys_lg_data: TADOQuery; t_sys_lg_data1: TDataSource; PopupMenu1: TPopupMenu; N1: TMenuItem; N2: TMenuItem; N3: TMenuItem; XPMenu1: TXPMenu; fra_sys_data8: Tfra_sys_data; bsSkinTabSheet6: TbsSkinTabSheet; fra_sys_data6: Tfra_sys_data; fra_sys_data7: Tfra_sys_data; fra_sys_data9: Tfra_sys_data; fra_sys_data10: Tfra_sys_data; fra_sys_data11: Tfra_sys_data; fra_sys_data12: Tfra_sys_data; fra_sys_data13: Tfra_sys_data; fra_sys_data_v8: Tfra_sys_data_v; fra_sys_data_v9: Tfra_sys_data_v; bsSkinPanel3: TbsSkinPanel; Label2: TLabel; bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox; bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox; bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox; fra_sys_data14: Tfra_sys_data; fra_sys_data15: Tfra_sys_data; fra_sys_data_d14: Tfra_sys_data_d; fra_sys_data_v7: Tfra_sys_data_v; fra_sys_data_v10: Tfra_sys_data_v; fra_sys_data16: Tfra_sys_data; fra_sys_data17: Tfra_sys_data; fra_sys_data18: Tfra_sys_data; fra_sys_data19: Tfra_sys_data; dxdbgrdclmnDBGrid1Column3: TdxDBGridColumn; N4: TMenuItem; FirstModule: TMenuItem; TwoModule: TMenuItem; N7: TMenuItem; N8: TMenuItem; N9: TMenuItem; N10: TMenuItem; lcxQryTmp: TADOQuery; N5: TMenuItem; bsSkinTabSheet7: TbsSkinTabSheet; fra_sys_data_v11: Tfra_sys_data_v; fra_sys_data20: Tfra_sys_data; fra_sys_data21: Tfra_sys_data; fra_sys_data22: Tfra_sys_data; fra_sys_data23: Tfra_sys_data; bsSkinPanel4: TbsSkinPanel; Label3: TLabel; RxDBLookupCombo6: TRxDBLookupCombo; bsSkinPanel5: TbsSkinPanel; bsSkinButton3: TbsSkinButton; bsSkinCheckRadioBox1: TbsSkinCheckRadioBox; bsSkinCheckRadioBox2: TbsSkinCheckRadioBox; cpt_sys_code_emp: TADOQuery; cpt_sys_code_data: TADOQuery; t_sys_code_data: TADOQuery; st_sys_open: TADOQuery; fra_sys_data24: Tfra_sys_data; qrymodule: TADOQuery; dsrmodule: TDataSource; bsSkinPageControl2: TbsSkinPageControl; tab1: TbsSkinTabSheet; tab2: TbsSkinTabSheet; dxDBGrid2: TdxDBGrid; dxDBGrid2Column1: TdxDBGridMaskColumn; dxDBGrid2Column2: TdxDBGridMaskColumn; dxDBGrid2Column3: TdxDBGridMaskColumn; dxDBGrid2Column4: TdxDBGridCheckColumn; dxDBGrid2Column5: TdxDBGridColumn; dxDBGrid2Column6: TdxDBGridColumn; dxDBTreeView1: TdxDBTreeView; Splitter2: TSplitter; dxDBGrid3: TdxDBGrid; dxDBGridMaskColumn3: TdxDBGridMaskColumn; dxDBGridCheckColumn1: TdxDBGridCheckColumn; dxDBGridColumn1: TdxDBGridColumn; dxDBGridColumn2: TdxDBGridColumn; t_sys_open_tree: TADOQuery; t_sys_open_tree1: TDataSource; ImageList1: TImageList; dxDBGrid3Column5: TdxDBGridColumn; fra_sys_data_v12: Tfra_sys_data_v; fra_sys_data25: Tfra_sys_data; fra_sys_data26: Tfra_sys_data; PopupMenu2: TPopupMenu; N6: TMenuItem; N11: TMenuItem; N12: TMenuItem; fra_sys_data27: Tfra_sys_data; fra_sys_data_d1: Tfra_sys_data_d; t_sys_employee2: TADOQuery; t_sys_employee21: TDataSource; procedure FormShow(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure bsSkinButton5Click(Sender: TObject); procedure update_all(data:Tadoquery;str:string); procedure update_price(data:Tadoquery;str:string); procedure update_group_data_all(data:Tadoquery;str:string;str_boolean:integer); procedure bsSkinButton10Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure bsSkinButton2Click(Sender: TObject); procedure bsSkinButton12Click(Sender: TObject); procedure bsSkinPanel1Resize(Sender: TObject); procedure Label9DblClick(Sender: TObject); procedure N1Click(Sender: TObject); procedure N3Click(Sender: TObject); procedure bsSkinButton9Click(Sender: TObject); procedure t_sys_openBeforePost(DataSet: TDataSet); function if_open_limited(str:string):boolean; procedure enable_bsSkinTabSheet2; procedure enable_bsSkinTabSheet3; procedure enable_bsSkinTabSheet4; procedure enable_bsSkinTabSheet5; procedure enable_bsSkinTabSheet6; procedure enable_bsSkinTabSheet7; procedure t_sys_employeeAfterScroll(DataSet: TDataSet); procedure bsSkinPageControl1Change(Sender: TObject); procedure t_sys_openAfterPost(DataSet: TDataSet); procedure N7Click(Sender: TObject); procedure N8Click(Sender: TObject); procedure N9Click(Sender: TObject); procedure N10Click(Sender: TObject); procedure PopupMenu1Popup(Sender: TObject); procedure bsSkinDBCheckRadioBox1Exit(Sender: TObject); procedure bsSkinDBCheckRadioBox1MouseEnter(Sender: TObject); procedure bsSkinButton3Click(Sender: TObject); procedure t_sys_lg_dataAfterPost(DataSet: TDataSet); procedure dxDBTreeView1Change(Sender: TObject; Node: TTreeNode); procedure t_sys_open_treeBeforePost(DataSet: TDataSet); procedure t_sys_open_treeAfterPost(DataSet: TDataSet); procedure t_sys_employeeBeforeScroll(DataSet: TDataSet); procedure N6Click(Sender: TObject); procedure N12Click(Sender: TObject); procedure fra_sys_data_v7N12Click(Sender: TObject); procedure fra_sys_data_d14N14Click(Sender: TObject); private { Private declarations } function getQuan(fid:integer):String; procedure closealltable; public { Public declarations } end; var frm_sys_limited: Tfrm_sys_limited; op_limited:boolean; implementation uses u_data_share, u_main, u_sys_progress, my_sys_function, u_sys_limited_group; {$R *.dfm} procedure Tfrm_sys_limited.enable_bsSkinTabSheet2; begin //操作销售模块 显示 if if_open_limited('014') or if_open_limited('152') or if_open_limited('288') then begin fra_sys_data1.Visible:=true; //海运进口、出口 fra_sys_data1.t_op.open; fra_sys_data1.t_sql.open; end else begin fra_sys_data1.Visible:=false; fra_sys_data1.t_op.close; fra_sys_data1.t_sql.close; end; if if_open_limited('054') then begin fra_sys_data2.Visible:=true; fra_sys_data2.t_op.open; fra_sys_data2.t_sql.open; end else begin fra_sys_data2.Visible:=false; fra_sys_data2.t_op.close; fra_sys_data2.t_sql.close; end; if if_open_limited('072') then begin fra_sys_data3.Visible:=true; fra_sys_data3.t_op.open; fra_sys_data3.t_sql.open; end else begin fra_sys_data3.Visible:=false; fra_sys_data3.t_op.close; fra_sys_data3.t_sql.close; end; if if_open_limited('080') then begin fra_sys_data4.Visible:=true; fra_sys_data4.t_op.open; fra_sys_data4.t_sql.open; end else begin fra_sys_data4.Visible:=false; fra_sys_data4.t_op.close; fra_sys_data4.t_sql.close; end; /////////// if if_open_limited('021') or if_open_limited('301') or if_open_limited('302') or if_open_limited('232') then begin fra_sys_data_d9.Visible:=true; fra_sys_data_d9.t_op.open; fra_sys_data_d9.t_sql.open; end else begin fra_sys_data_d9.Visible:=false; fra_sys_data_d9.t_op.close; fra_sys_data_d9.t_sql.close; end; if if_open_limited('057') then begin fra_sys_data_d10.Visible:=true; fra_sys_data_d10.t_op.open; fra_sys_data_d10.t_sql.open; end else begin fra_sys_data_d10.Visible:=false; fra_sys_data_d10.t_op.close; fra_sys_data_d10.t_sql.close; end; if if_open_limited('075') then begin fra_sys_data_d11.Visible:=true; fra_sys_data_d11.t_op.open; fra_sys_data_d11.t_sql.open; end else begin fra_sys_data_d11.Visible:=false; fra_sys_data_d11.t_op.close; fra_sys_data_d11.t_sql.close; end; if if_open_limited('083') then begin fra_sys_data_d12.Visible:=true; fra_sys_data_d12.t_op.open; fra_sys_data_d12.t_sql.open; end else begin fra_sys_data_d12.Visible:=false; fra_sys_data_d12.t_op.close; fra_sys_data_d12.t_sql.close; end; end; procedure Tfrm_sys_limited.enable_bsSkinTabSheet3; begin //审核审批模块 显示 if if_open_limited('024') or if_open_limited('027') or if_open_limited('146') then begin fra_sys_data16.Visible:=true; fra_sys_data16.t_op.open; fra_sys_data16.t_sql.open; end else begin fra_sys_data16.t_op.close; fra_sys_data16.t_sql.close; fra_sys_data16.Visible:=false; end; if if_open_limited('060') or if_open_limited('061') or if_open_limited('147') then begin fra_sys_data17.Visible:=true; fra_sys_data17.t_op.open; fra_sys_data17.t_sql.open; end else begin fra_sys_data17.Visible:=false; fra_sys_data17.t_op.close; fra_sys_data17.t_sql.close; end; if if_open_limited('076') or if_open_limited('079') or if_open_limited('235') or if_open_limited('236') then begin fra_sys_data18.Visible:=true; fra_sys_data18.t_op.open; fra_sys_data18.t_sql.open; end else begin fra_sys_data18.Visible:=false; fra_sys_data18.t_op.close; fra_sys_data18.t_sql.close; end; if if_open_limited('084') or if_open_limited('087') or if_open_limited('149') then begin fra_sys_data19.Visible:=true; fra_sys_data19.t_op.open; fra_sys_data19.t_sql.open; end else begin fra_sys_data19.Visible:=false; fra_sys_data19.t_op.close; fra_sys_data19.t_sql.close; end; //// if if_open_limited('028') or if_open_limited('281') then begin fra_sys_data_d5.Visible:=true; fra_sys_data_d6.Visible:=true; fra_sys_data_d5.t_op.open; fra_sys_data_d5.t_sql.open; fra_sys_data_d6.t_op.open; fra_sys_data_d6.t_sql.open; end else begin fra_sys_data_d5.Visible:=false; fra_sys_data_d6.Visible:=false; fra_sys_data_d5.t_op.close; fra_sys_data_d5.t_sql.close; fra_sys_data_d6.t_op.close; fra_sys_data_d6.t_sql.close; end; if if_open_limited('036') or if_open_limited('032') or if_open_limited('034') or if_open_limited('037') or if_open_limited('278') then begin fra_sys_data_d7.Visible:=true; fra_sys_data_d8.Visible:=true; fra_sys_data_d7.t_op.open; fra_sys_data_d7.t_sql.open; fra_sys_data_d8.t_op.open; fra_sys_data_d8.t_sql.open; end else begin fra_sys_data_d7.Visible:=false; fra_sys_data_d8.Visible:=false; fra_sys_data_d7.t_op.close; fra_sys_data_d7.t_sql.close; fra_sys_data_d8.t_op.Close; fra_sys_data_d8.t_sql.close; end; end; procedure Tfrm_sys_limited.enable_bsSkinTabSheet4; begin if if_open_limited('040') or if_open_limited('150') or if_open_limited('062') or if_open_limited('088') or if_open_limited('089') or if_open_limited('041') then begin fra_sys_data_v1.Visible:=true; fra_sys_data_v1.t_op.Open; fra_sys_data_v1.t_sql.Open; end else begin fra_sys_data_v1.Visible:=false; fra_sys_data_v1.t_op.close; fra_sys_data_v1.t_sql.close; end; if if_open_limited('131') or if_open_limited('132') or if_open_limited('133') or if_open_limited('134') or if_open_limited('135') or if_open_limited('136') or if_open_limited('137') or if_open_limited('271') or if_open_limited('138') then begin fra_sys_data_d13.Visible:=true; fra_sys_data_d13.t_op.Open; fra_sys_data_d13.t_sql.Open; fra_sys_data_d1.Visible:=true; fra_sys_data_d1.t_op.Open; fra_sys_data_d1.t_sql.Open; end else begin fra_sys_data_d13.Visible:=false; fra_sys_data_d13.t_op.close; fra_sys_data_d13.t_sql.close; fra_sys_data_d1.Visible:=false; fra_sys_data_d1.t_op.close; fra_sys_data_d1.t_sql.close; end; if if_open_limited('042') or if_open_limited('064') or if_open_limited('098') or if_open_limited('099') or if_open_limited('043') or if_open_limited('129') then begin fra_sys_data_v2.Visible:=true; fra_sys_data_v2.t_op.Open; fra_sys_data_v2.t_sql.Open; end else begin fra_sys_data_v2.Visible:=false; fra_sys_data_v2.t_op.close; fra_sys_data_v2.t_sql.close; end; if if_open_limited('044') or if_open_limited('063') or if_open_limited('100') or if_open_limited('101') or if_open_limited('102') then begin fra_sys_data_v3.Visible:=true; fra_sys_data_v3.t_op.Open; fra_sys_data_v3.t_sql.Open; end else begin fra_sys_data_v3.Visible:=false; fra_sys_data_v3.t_op.close; fra_sys_data_v3.t_sql.close; end; if if_open_limited('045') or if_open_limited('065') or if_open_limited('103') or if_open_limited('104') or if_open_limited('105') or if_open_limited('046') then begin fra_sys_data_v4.Visible:=true; fra_sys_data_v4.t_op.Open; fra_sys_data_v4.t_sql.Open; end else begin fra_sys_data_v4.Visible:=false; fra_sys_data_v4.t_op.close; fra_sys_data_v4.t_sql.close; end; if if_open_limited('047') or if_open_limited('066') or if_open_limited('106') or if_open_limited('107') or if_open_limited('108') or if_open_limited('130') then begin fra_sys_data_v5.Visible:=true; fra_sys_data_v5.t_op.Open; fra_sys_data_v5.t_sql.Open; end else begin fra_sys_data_v5.Visible:=false; fra_sys_data_v5.t_op.close; fra_sys_data_v5.t_sql.close; end; if if_open_limited('048') or if_open_limited('156') or if_open_limited('067') or if_open_limited('109') or if_open_limited('110') or if_open_limited('111') or if_open_limited('049') or if_open_limited('068') or if_open_limited('112') or if_open_limited('113') or if_open_limited('114') or if_open_limited('050') or if_open_limited('157') or if_open_limited('069') or if_open_limited('115') or if_open_limited('116') or if_open_limited('117') then begin fra_sys_data_v6.Visible:=true; fra_sys_data_v6.t_op.Open; fra_sys_data_v6.t_sql.Open; end else begin fra_sys_data_v6.Visible:=false; fra_sys_data_v6.t_op.close; fra_sys_data_v6.t_sql.close; end; if if_open_limited('194') or if_open_limited('195') or if_open_limited('196') or if_open_limited('230') or if_open_limited('204') then begin fra_sys_data_v10.Visible:=true; fra_sys_data_v10.t_op.Open; fra_sys_data_v10.t_sql.Open; end else begin fra_sys_data_v10.Visible:=false; fra_sys_data_v10.t_op.close; fra_sys_data_v10.t_sql.close; end end; procedure Tfrm_sys_limited.enable_bsSkinTabSheet5; begin if if_open_limited('091') or if_open_limited('018') then begin fra_sys_data5.Visible:=true; fra_sys_data5.t_op.Open; fra_sys_data5.t_sql.Open; end else begin fra_sys_data5.Visible:=false; fra_sys_data5.t_op.close; fra_sys_data5.t_sql.close; end; if if_open_limited('127') then begin fra_sys_data12.Visible:=true; fra_sys_data12.t_op.Open; fra_sys_data12.t_sql.Open; end else begin fra_sys_data12.Visible:=false; fra_sys_data12.t_op.close; fra_sys_data12.t_sql.close; end; if if_open_limited('128') then begin fra_sys_data13.Visible:=true; fra_sys_data13.t_op.Open; fra_sys_data13.t_sql.Open; end else begin fra_sys_data13.Visible:=false; fra_sys_data13.t_op.close; fra_sys_data13.t_sql.close; end; if if_open_limited('094') then begin fra_sys_data8.Visible:=true; fra_sys_data8.t_op.Open; fra_sys_data8.t_sql.Open; end else begin fra_sys_data8.Visible:=false; fra_sys_data8.t_op.close; fra_sys_data8.t_sql.close; end; if if_open_limited('120') then begin fra_sys_data_v8.Visible:=true; fra_sys_data_v8.t_op.Open; fra_sys_data_v8.t_sql.Open; end else begin fra_sys_data_v8.Visible:=false; fra_sys_data_v8.t_op.close; fra_sys_data_v8.t_sql.close; end; if if_open_limited('093') then begin fra_sys_data_v9.Visible:=true; fra_sys_data_v9.t_op.Open; fra_sys_data_v9.t_sql.Open; end else begin fra_sys_data_v9.Visible:=false; fra_sys_data_v9.t_op.close; fra_sys_data_v9.t_sql.close; end; if if_open_limited('140') or if_open_limited('022')or if_open_limited('023')or if_open_limited('055')or if_open_limited('056')or if_open_limited('073')or if_open_limited('074')or if_open_limited('081')or if_open_limited('082') then begin fra_sys_data14.Visible:=true; fra_sys_data14.t_op.Open; fra_sys_data14.t_sql.Open; end else begin fra_sys_data14.Visible:=false; fra_sys_data14.t_op.close; fra_sys_data14.t_sql.close; end; if if_open_limited('022')or if_open_limited('023')or if_open_limited('055')or if_open_limited('056')or if_open_limited('073')or if_open_limited('074')or if_open_limited('081')or if_open_limited('082') then begin fra_sys_data_d14.Visible:=true; fra_sys_data_d14.t_op.Open; fra_sys_data_d14.t_sql.Open; end else begin fra_sys_data_d14.Visible:=false; fra_sys_data_d14.t_op.close; fra_sys_data_d14.t_sql.close; end; end; procedure Tfrm_sys_limited.enable_bsSkinTabSheet6; begin if if_open_limited('053') then begin fra_sys_data6.Visible:=true ; fra_sys_data7.Visible:=true ; fra_sys_data9.Visible:=true ; fra_sys_data10.Visible:=true ; fra_sys_data24.Visible:=true ; fra_sys_data15.Visible:=true ; fra_sys_data6.t_op.Open; fra_sys_data6.t_sql.Open; fra_sys_data7.t_op.Open; fra_sys_data7.t_sql.Open; fra_sys_data9.t_op.Open; fra_sys_data9.t_sql.Open; fra_sys_data10.t_op.Open; fra_sys_data10.t_sql.Open; fra_sys_data24.t_op.Open; fra_sys_data24.t_sql.Open; fra_sys_data15.t_op.Open; fra_sys_data15.t_sql.Open; end else begin fra_sys_data6.Visible:=false; fra_sys_data7.Visible:=false; fra_sys_data9.Visible:=false; fra_sys_data10.Visible:=false; fra_sys_data24.Visible:=false; fra_sys_data15.Visible:=false ; fra_sys_data6.t_op.close; fra_sys_data6.t_sql.close; fra_sys_data7.t_op.close; fra_sys_data7.t_sql.close; fra_sys_data9.t_op.close; fra_sys_data9.t_sql.close; fra_sys_data10.t_op.close; fra_sys_data10.t_sql.close; fra_sys_data24.t_op.close; fra_sys_data24.t_sql.close; fra_sys_data15.t_op.close; fra_sys_data15.t_sql.close; end ; if if_open_limited('125') then begin fra_sys_data11.Visible:=true; fra_sys_data11.t_op.open; fra_sys_data11.t_sql.open; end else begin fra_sys_data11.Visible:=false; fra_sys_data11.t_op.close; fra_sys_data11.t_sql.close; end; fra_sys_data_v7.t_op.open; fra_sys_data_v7.t_sql.open; end; function Tfrm_sys_limited.if_open_limited(str:string):boolean; begin if t_sys_open.Locate('权限代码',str,[])then begin result:=t_sys_open.fieldbyname('是否可操作').asboolean; end else result:=false; end; procedure Tfrm_sys_limited.update_group_data_all(data:Tadoquery;str:string;str_boolean:integer); var aQuery:TADOQuery; begin if not data.Active then data.Open; if str='个人数据' then begin data.First; while not data.eof do begin if data.fieldbyname('职员').asstring=data.DataSource.DataSet.fieldbyname('姓名').asstring then begin data.edit; case str_boolean of 1: begin data['是否可视']:=1; data['是否操作']:=1; end; 2: begin data['是否可视']:=1; end; 3: begin data['是否操作']:=1; end; end; data.post; end else begin data.edit; case str_boolean of 1: begin data['是否可视']:=0; data['是否操作']:=0; end; 2: begin data['是否可视']:=0; end; 3: begin data['是否操作']:=0; end; end; data.post; end; data.next; end; end else if str='全部数据' then begin data.First; while not data.eof do begin data.edit; case str_boolean of 1: begin data['是否可视']:=1; data['是否操作']:=1; end; 2: begin data['是否可视']:=1; end; 3: begin data['是否操作']:=1; end; end; data.post; data.next; end; end else if str='没有数据' then begin data.First; while not data.eof do begin data.edit; case str_boolean of 1: begin data['是否可视']:=0; data['是否操作']:=0; end; 2: begin data['是否可视']:=0; end; 3: begin data['是否操作']:=0; end; end; data.post; data.next; end; end else if str='部门数据' then begin aQuery:=CreateAdoQuery; try aQuery.Close; aQuery.SQL.Clear; aQuery.SQL.Add('Select * from t_sys_employee where 部门名称=''' +data.DataSource.DataSet.fieldbyname('部门名称').asstring +''' and 分部名称='''+data.DataSource.DataSet.fieldbyname('分部名称').asstring+''''); aQuery.Open; aQuery.First; { frm_data_share.t_sys_employee.Filtered:=false; frm_data_share.t_sys_employee.Filter:='部门名称='+''''+data.DataSource.DataSet.fieldbyname('部门名称').asstring+''''; frm_data_share.t_sys_employee.Filtered:=true; frm_data_share.t_sys_employee.First; } data.First; while not data.Eof do begin if aQuery.Locate('姓名',data.fieldbyname('职员').asstring,[]) then begin data.edit; case str_boolean of 1: begin data['是否可视']:=1; data['是否操作']:=1; end; 2: begin data['是否可视']:=1; end; 3: begin data['是否操作']:=1; end; end; data.post; end else begin data.edit; case str_boolean of 1: begin data['是否可视']:=0; data['是否操作']:=0; end; 2: begin data['是否可视']:=0; end; 3: begin data['是否操作']:=0; end; end; data.post; end; data.next; end; finally FreeAndNil(aQuery); // frm_data_share.t_sys_employee.Filtered:=false; end end else if str='分公司数据' then //by lcx begin aQuery:=CreateAdoQuery; try aQuery.Close; aQuery.SQL.Clear; aQuery.SQL.Add('Select * from t_sys_employee where 分部名称=''' +data.DataSource.DataSet.fieldbyname('分部名称').asstring+''''); aQuery.Open; aQuery.First; data.First; while not data.Eof do begin if aQuery.Locate('姓名',data.fieldbyname('职员').asstring,[]) then begin data.edit; case str_boolean of 1: begin data['是否可视']:=1; data['是否操作']:=1; end; 2: begin data['是否可视']:=1; end; 3: begin data['是否操作']:=1; end; end; data.post; end else begin data.edit; case str_boolean of 1: begin data['是否可视']:=0; data['是否操作']:=0; end; 2: begin data['是否可视']:=0; end; 3: begin data['是否操作']:=0; end; end; data.post; end; data.next; end; finally FreeAndNil(aQuery); end; end; data.Refresh; if data.Active then data.close; end; procedure Tfrm_sys_limited.update_price(data:Tadoquery;str:string); begin if not data.Locate('职员','全包底价',[])then begin data.insert; data['人员']:=t_sys_employee.fieldbyname('姓名').asstring; data['职员']:='全包底价'; data['属性']:=str; data.post; end; if not data.Locate('职员','底价构成',[])then begin data.insert; data['人员']:=t_sys_employee.fieldbyname('姓名').asstring; data['职员']:='底价构成'; data['属性']:=str; data.post; end; if not data.Locate('职员','一级售价',[])then begin data.insert; data['人员']:=t_sys_employee.fieldbyname('姓名').asstring; data['职员']:='一级售价'; data['属性']:=str; data.post; end; if not data.Locate('职员','二级售价',[])then begin data.insert; data['人员']:=t_sys_employee.fieldbyname('姓名').asstring; data['职员']:='二级售价'; data['属性']:=str; data.post; end; if not data.Locate('职员','三级售价',[])then begin data.insert; data['人员']:=t_sys_employee.fieldbyname('姓名').asstring; data['职员']:='三级售价'; data['属性']:=str; data.post; end; end; procedure Tfrm_sys_limited.update_all(data:Tadoquery;str:string); begin if not data.Active then data.Open; data.First; while not data.Eof do begin if not frm_data_share.t_sys_employee.Locate('姓名',data.fieldbyname('职员').asstring,[])then data.Delete else data.next; end; frm_data_share.t_sys_employee.First; while not frm_data_share.t_sys_employee.eof do begin if not data.Locate('职员',frm_data_share.t_sys_employee.fieldbyname('姓名').asstring,[])then begin data.insert; data['人员']:=t_sys_employee.fieldbyname('姓名').asstring; data['职员']:=frm_data_share.t_sys_employee['姓名']; data['属性']:=str; data.post; end; frm_data_share.t_sys_employee.next; end; if data.Active then data.close; end; procedure Tfrm_sys_limited.FormShow(Sender: TObject); begin // t_sys_employee.open; t_sys_open.open; t_sys_code.open; t_sys_lg.open; t_sys_lg_open.open; t_sys_lg_data.open; t_sys_open_tree.open; qrymodule.Open; if t_project then begin bsSkinPageControl2.ActivePage:=tab2; end else begin bsSkinPageControl2.ActivePage:=tab1; end; if employee<>'DEMO-SA' then begin fra_sys_data1.wwDBComboBox1.Items.Clear; fra_sys_data1.wwDBComboBox1.Items.Add('部门'); fra_sys_data1.wwDBComboBox1.Items.Add('选择'); fra_sys_data1.t_op.close; fra_sys_data1.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data1.t_op.Parameters.ParamByName('属性').value:='0001'; fra_sys_data1.t_op.DataSource:=t_sys_employee1; // fra_sys_data1.t_op.open; fra_sys_data1.t_sql.Parameters.ParamByName('属性').value:='0001'; fra_sys_data1.t_sql.DataSource:=t_sys_employee1; // fra_sys_data1.t_sql.open; fra_sys_data1.bsSkinGroupBox9.Caption:='海运出口操作及商检报关'; if employee<>'DEMO-SA' then begin fra_sys_data2.wwDBComboBox1.Items.Clear; fra_sys_data2.wwDBComboBox1.Items.Add('部门'); fra_sys_data2.wwDBComboBox1.Items.Add('选择'); fra_sys_data2.t_op.close; fra_sys_data2.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data2.t_op.Parameters.ParamByName('属性').value:='0002'; fra_sys_data2.t_op.DataSource:=t_sys_employee1; // fra_sys_data2.t_op.open; fra_sys_data2.t_sql.Parameters.ParamByName('属性').value:='0002'; fra_sys_data2.t_sql.DataSource:=t_sys_employee1; // fra_sys_data2.t_sql.open; fra_sys_data2.bsSkinGroupBox9.Caption:='海运进口操作'; if employee<>'DEMO-SA' then begin fra_sys_data3.wwDBComboBox1.Items.Clear; fra_sys_data3.wwDBComboBox1.Items.Add('部门'); fra_sys_data3.wwDBComboBox1.Items.Add('选择'); fra_sys_data3.t_op.close; fra_sys_data3.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data3.t_op.Parameters.ParamByName('属性').value:='0003'; fra_sys_data3.t_op.DataSource:=t_sys_employee1; // fra_sys_data3.t_op.open; fra_sys_data3.t_sql.Parameters.ParamByName('属性').value:='0003'; fra_sys_data3.t_sql.DataSource:=t_sys_employee1; // fra_sys_data3.t_sql.open; fra_sys_data3.bsSkinGroupBox9.Caption:='空运出口操作'; if employee<>'DEMO-SA' then begin fra_sys_data4.wwDBComboBox1.Items.Clear; fra_sys_data4.wwDBComboBox1.Items.Add('部门'); fra_sys_data4.wwDBComboBox1.Items.Add('选择'); fra_sys_data4.t_op.close; fra_sys_data4.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data4.t_op.Parameters.ParamByName('属性').value:='0004'; fra_sys_data4.t_op.DataSource:=t_sys_employee1; // fra_sys_data4.t_op.open; fra_sys_data4.t_sql.Parameters.ParamByName('属性').value:='0004'; fra_sys_data4.t_sql.DataSource:=t_sys_employee1; // fra_sys_data4.t_sql.open; fra_sys_data4.bsSkinGroupBox9.Caption:='空运进口操作'; if employee<>'DEMO-SA' then begin fra_sys_data20.wwDBComboBox1.Items.Clear; fra_sys_data20.wwDBComboBox1.Items.Add('部门'); fra_sys_data20.wwDBComboBox1.Items.Add('选择'); fra_sys_data20.t_op.close; fra_sys_data20.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data20.t_op.Parameters.ParamByName('属性').value:='0005'; fra_sys_data20.t_op.DataSource:=t_sys_employee1; // fra_sys_data20.t_op.open; fra_sys_data20.t_sql.Parameters.ParamByName('属性').value:='0005'; fra_sys_data20.t_sql.DataSource:=t_sys_employee1; // fra_sys_data20.t_sql.open; fra_sys_data20.bsSkinGroupBox9.Caption:='监管车操作'; if employee<>'DEMO-SA' then begin fra_sys_data25.wwDBComboBox1.Items.Clear; fra_sys_data25.wwDBComboBox1.Items.Add('部门'); fra_sys_data25.wwDBComboBox1.Items.Add('选择'); fra_sys_data25.t_op.close; fra_sys_data25.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data25.t_op.Parameters.ParamByName('属性').value:='0006'; fra_sys_data25.t_op.DataSource:=t_sys_employee1; // fra_sys_data20.t_op.open; fra_sys_data25.t_sql.Parameters.ParamByName('属性').value:='0006'; fra_sys_data25.t_sql.DataSource:=t_sys_employee1; // fra_sys_data20.t_sql.open; fra_sys_data25.bsSkinGroupBox9.Caption:='铁路运输业务'; if employee<>'DEMO-SA' then begin fra_sys_data16.wwDBComboBox1.Items.Clear; fra_sys_data16.wwDBComboBox1.Items.Add('部门'); fra_sys_data16.wwDBComboBox1.Items.Add('选择'); fra_sys_data16.t_op.close; fra_sys_data16.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data16.t_op.Parameters.ParamByName('属性').value:='0011'; fra_sys_data16.t_op.DataSource:=t_sys_employee1; // fra_sys_data16.t_op.open; fra_sys_data16.t_sql.Parameters.ParamByName('属性').value:='0011'; fra_sys_data16.t_sql.DataSource:=t_sys_employee1; // fra_sys_data16.t_sql.open; fra_sys_data16.bsSkinGroupBox9.Caption:='海运出口审核及封帐'; if employee<>'DEMO-SA' then begin fra_sys_data17.wwDBComboBox1.Items.Clear; fra_sys_data17.wwDBComboBox1.Items.Add('部门'); fra_sys_data17.wwDBComboBox1.Items.Add('选择'); fra_sys_data17.t_op.close; fra_sys_data17.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data17.t_op.Parameters.ParamByName('属性').value:='0012'; fra_sys_data17.t_op.DataSource:=t_sys_employee1; // fra_sys_data17.t_op.open; fra_sys_data17.t_sql.Parameters.ParamByName('属性').value:='0012'; fra_sys_data17.t_sql.DataSource:=t_sys_employee1; // fra_sys_data17.t_sql.open; fra_sys_data17.bsSkinGroupBox9.Caption:='海运进口审核及封帐'; if employee<>'DEMO-SA' then begin fra_sys_data18.wwDBComboBox1.Items.Clear; fra_sys_data18.wwDBComboBox1.Items.Add('部门'); fra_sys_data18.wwDBComboBox1.Items.Add('选择'); fra_sys_data18.t_op.close; fra_sys_data18.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data18.t_op.Parameters.ParamByName('属性').value:='0013'; fra_sys_data18.t_op.DataSource:=t_sys_employee1; // fra_sys_data18.t_op.open; fra_sys_data18.t_sql.Parameters.ParamByName('属性').value:='0013'; fra_sys_data18.t_sql.DataSource:=t_sys_employee1; // fra_sys_data18.t_sql.open; fra_sys_data18.bsSkinGroupBox9.Caption:='空运出口审核及封帐'; if employee<>'DEMO-SA' then begin fra_sys_data19.wwDBComboBox1.Items.Clear; fra_sys_data19.wwDBComboBox1.Items.Add('部门'); fra_sys_data19.wwDBComboBox1.Items.Add('选择'); fra_sys_data19.t_op.close; fra_sys_data19.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data19.t_op.Parameters.ParamByName('属性').value:='0014'; fra_sys_data19.t_op.DataSource:=t_sys_employee1; // fra_sys_data19.t_op.open; fra_sys_data19.t_sql.Parameters.ParamByName('属性').value:='0014'; fra_sys_data19.t_sql.DataSource:=t_sys_employee1; // fra_sys_data19.t_sql.open; fra_sys_data19.bsSkinGroupBox9.Caption:='空运进口审核及封帐'; if employee<>'DEMO-SA' then begin fra_sys_data26.wwDBComboBox1.Items.Clear; fra_sys_data26.wwDBComboBox1.Items.Add('部门'); fra_sys_data26.wwDBComboBox1.Items.Add('选择'); fra_sys_data26.t_op.close; fra_sys_data26.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data26.t_op.Parameters.ParamByName('属性').value:='0016'; fra_sys_data26.t_op.DataSource:=t_sys_employee1; fra_sys_data26.t_sql.Parameters.ParamByName('属性').value:='0016'; fra_sys_data26.t_sql.DataSource:=t_sys_employee1; fra_sys_data26.bsSkinGroupBox9.Caption:='铁路运输审核及封帐'; if employee<>'DEMO-SA' then begin fra_sys_data27.wwDBComboBox1.Items.Clear; fra_sys_data27.wwDBComboBox1.Items.Add('部门'); fra_sys_data27.wwDBComboBox1.Items.Add('选择'); fra_sys_data27.t_op.close; fra_sys_data27.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data27.t_op.Parameters.ParamByName('属性').value:='0015'; fra_sys_data27.t_op.DataSource:=t_sys_employee1; fra_sys_data27.t_sql.Parameters.ParamByName('属性').value:='0015'; fra_sys_data27.t_sql.DataSource:=t_sys_employee1; fra_sys_data27.bsSkinGroupBox9.Caption:='海运出口解锁及封锁'; if employee<>'DEMO-SA' then begin fra_sys_data_d5.wwDBComboBox1.Items.Clear; fra_sys_data_d5.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d5.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d5.t_op.close; fra_sys_data_d5.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d5.t_op.Parameters.ParamByName('属性').value:='1001'; fra_sys_data_d5.t_op.DataSource:=t_sys_employee1; // fra_sys_data_d5.t_op.open; fra_sys_data_d5.t_sql.Parameters.ParamByName('属性').value:='1001'; fra_sys_data_d5.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_d5.t_sql.open; fra_sys_data_d5.bsSkinGroupBox9.Caption:='发票申请信息'; if employee<>'DEMO-SA' then begin fra_sys_data_d6.wwDBComboBox1.Items.Clear; fra_sys_data_d6.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d6.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d6.t_op.close; fra_sys_data_d6.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d6.t_op.Parameters.ParamByName('属性').value:='1002'; fra_sys_data_d6.t_op.DataSource:=t_sys_employee1; // fra_sys_data_d6.t_op.open; fra_sys_data_d6.t_sql.Parameters.ParamByName('属性').value:='1002'; fra_sys_data_d6.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_d6.t_sql.open; fra_sys_data_d6.bsSkinGroupBox9.Caption:='业务申请发票'; if employee<>'DEMO-SA' then begin fra_sys_data_d7.wwDBComboBox1.Items.Clear; fra_sys_data_d7.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d7.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d7.t_op.close; fra_sys_data_d7.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d7.t_op.Parameters.ParamByName('属性').value:='1003'; fra_sys_data_d7.t_op.DataSource:=t_sys_employee1; // fra_sys_data_d7.t_op.open; fra_sys_data_d7.t_sql.Parameters.ParamByName('属性').value:='1003'; fra_sys_data_d7.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_d7.t_sql.open; fra_sys_data_d7.bsSkinGroupBox9.Caption:='收付结算信息'; if employee<>'DEMO-SA' then begin fra_sys_data_d8.wwDBComboBox1.Items.Clear; fra_sys_data_d8.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d8.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d8.t_op.close; fra_sys_data_d8.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d8.t_op.Parameters.ParamByName('属性').value:='1004'; fra_sys_data_d8.t_op.DataSource:=t_sys_employee1; // fra_sys_data_d8.t_op.open; fra_sys_data_d8.t_sql.Parameters.ParamByName('属性').value:='1004'; fra_sys_data_d8.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_d8.t_sql.open; fra_sys_data_d8.bsSkinGroupBox9.Caption:='业务申请支付'; if employee<>'DEMO-SA' then begin fra_sys_data_d9.wwDBComboBox1.Items.Clear; fra_sys_data_d9.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d9.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d9.t_op.close; fra_sys_data_d9.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d9.t_op.Parameters.ParamByName('属性').value:='0021'; fra_sys_data_d9.t_op.DataSource:=t_sys_employee1; // fra_sys_data_d9.t_op.open; fra_sys_data_d9.t_sql.Parameters.ParamByName('属性').value:='0021'; fra_sys_data_d9.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_d9.t_sql.open; fra_sys_data_d9.bsSkinGroupBox9.Caption:='海运出口销售'; if employee<>'DEMO-SA' then begin fra_sys_data_d10.wwDBComboBox1.Items.Clear; fra_sys_data_d10.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d10.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d10.t_op.close; fra_sys_data_d10.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d10.t_op.Parameters.ParamByName('属性').value:='0022'; fra_sys_data_d10.t_op.DataSource:=t_sys_employee1; // fra_sys_data_d10.t_op.open; fra_sys_data_d10.t_sql.Parameters.ParamByName('属性').value:='0022'; fra_sys_data_d10.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_d10.t_sql.open; fra_sys_data_d10.bsSkinGroupBox9.Caption:='海运进口销售'; if employee<>'DEMO-SA' then begin fra_sys_data_d11.wwDBComboBox1.Items.Clear; fra_sys_data_d11.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d11.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d11.t_op.close; fra_sys_data_d11.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d11.t_op.Parameters.ParamByName('属性').value:='0023'; fra_sys_data_d11.t_op.DataSource:=t_sys_employee1; // fra_sys_data_d11.t_op.open; fra_sys_data_d11.t_sql.Parameters.ParamByName('属性').value:='0023'; fra_sys_data_d11.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_d11.t_sql.open; fra_sys_data_d11.bsSkinGroupBox9.Caption:='空运出口销售'; if employee<>'DEMO-SA' then begin fra_sys_data_d12.wwDBComboBox1.Items.Clear; fra_sys_data_d12.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d12.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d12.t_op.close; fra_sys_data_d12.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d12.t_op.Parameters.ParamByName('属性').value:='0024'; fra_sys_data_d12.t_op.DataSource:=t_sys_employee1; // fra_sys_data_d12.t_op.open; fra_sys_data_d12.t_sql.Parameters.ParamByName('属性').value:='0024'; fra_sys_data_d12.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_d12.t_sql.open; fra_sys_data_d12.bsSkinGroupBox9.Caption:='空运进口销售'; if employee<>'DEMO-SA' then begin fra_sys_data_v1.wwDBComboBox1.Items.Clear; fra_sys_data_v1.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v1.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v1.t_op.close; fra_sys_data_v1.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v1.t_op.Parameters.ParamByName('属性').value:='0031'; fra_sys_data_v1.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v1.t_op.open; fra_sys_data_v1.t_sql.Parameters.ParamByName('属性').value:='0031'; fra_sys_data_v1.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v1.t_sql.open; fra_sys_data_v1.bsSkinGroupBox9.Caption:='业务台帐统计'; if employee<>'DEMO-SA' then begin fra_sys_data_d13.wwDBComboBox1.Items.Clear; fra_sys_data_d13.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d13.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d13.t_op.close; fra_sys_data_d13.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d13.t_op.Parameters.ParamByName('属性').value:='0032'; fra_sys_data_d13.t_op.DataSource:=t_sys_employee1; // fra_sys_data_d13.t_op.open; fra_sys_data_d13.t_sql.Parameters.ParamByName('属性').value:='0032'; fra_sys_data_d13.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_d13.t_sql.open; fra_sys_data_d13.bsSkinGroupBox9.Caption:='客户对帐管理'; if employee<>'DEMO-SA' then begin fra_sys_data_d1.wwDBComboBox1.Items.Clear; fra_sys_data_d1.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d1.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d1.t_op.close; fra_sys_data_d1.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d1.t_op.Parameters.ParamByName('属性').value:='0030'; fra_sys_data_d1.t_op.DataSource:=t_sys_employee1; fra_sys_data_d1.t_sql.Parameters.ParamByName('属性').value:='0030'; fra_sys_data_d1.t_sql.DataSource:=t_sys_employee1; fra_sys_data_d1.bsSkinGroupBox9.Caption:='客户对帐列表'; if employee<>'DEMO-SA' then begin fra_sys_data_v2.wwDBComboBox1.Items.Clear; fra_sys_data_v2.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v2.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v2.t_op.close; fra_sys_data_v2.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v2.t_op.Parameters.ParamByName('属性').value:='0033'; fra_sys_data_v2.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v2.t_op.open; fra_sys_data_v2.t_sql.Parameters.ParamByName('属性').value:='0033'; fra_sys_data_v2.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v2.t_sql.open; fra_sys_data_v2.bsSkinGroupBox9.Caption:='欠费统计分析'; if employee<>'DEMO-SA' then begin fra_sys_data_v3.wwDBComboBox1.Items.Clear; fra_sys_data_v3.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v3.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v3.t_op.close; fra_sys_data_v3.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v3.t_op.Parameters.ParamByName('属性').value:='0034'; fra_sys_data_v3.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v3.t_op.open; fra_sys_data_v3.t_sql.Parameters.ParamByName('属性').value:='0034'; fra_sys_data_v3.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v3.t_sql.open; fra_sys_data_v3.bsSkinGroupBox9.Caption:='帐龄统计分析'; if employee<>'DEMO-SA' then begin fra_sys_data_v4.wwDBComboBox1.Items.Clear; fra_sys_data_v4.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v4.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v4.t_op.close; fra_sys_data_v4.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v4.t_op.Parameters.ParamByName('属性').value:='0035'; fra_sys_data_v4.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v4.t_op.open; fra_sys_data_v4.t_sql.Parameters.ParamByName('属性').value:='0035'; fra_sys_data_v4.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v4.t_sql.open; fra_sys_data_v4.bsSkinGroupBox9.Caption:='业务发票统计'; if employee<>'DEMO-SA' then begin fra_sys_data_v5.wwDBComboBox1.Items.Clear; fra_sys_data_v5.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v5.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v5.t_op.close; fra_sys_data_v5.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v5.t_op.Parameters.ParamByName('属性').value:='0036'; fra_sys_data_v5.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v5.t_op.open; fra_sys_data_v5.t_sql.Parameters.ParamByName('属性').value:='0036'; fra_sys_data_v5.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v5.t_sql.open; fra_sys_data_v5.bsSkinGroupBox9.Caption:='资金统计分析'; if employee<>'DEMO-SA' then begin fra_sys_data_v6.wwDBComboBox1.Items.Clear; fra_sys_data_v6.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v6.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v6.t_op.close; fra_sys_data_v6.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v6.t_op.Parameters.ParamByName('属性').value:='0037'; fra_sys_data_v6.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v6.t_op.open; fra_sys_data_v6.t_sql.Parameters.ParamByName('属性').value:='0037'; fra_sys_data_v6.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v6.t_sql.open; fra_sys_data_v6.bsSkinGroupBox9.Caption:='业务统计分析'; if employee<>'DEMO-SA' then begin fra_sys_data_v7.wwDBComboBox1.Items.Clear; fra_sys_data_v7.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v7.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v7.t_op.close; fra_sys_data_v7.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v7.t_op.Parameters.ParamByName('属性').value:='0038'; fra_sys_data_v7.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v7.t_op.open; fra_sys_data_v7.t_sql.Parameters.ParamByName('属性').value:='0038'; fra_sys_data_v7.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v7.t_sql.open; fra_sys_data_v7.bsSkinGroupBox9.Caption:='业务计时提醒'; if employee<>'DEMO-SA' then begin fra_sys_data_v10.wwDBComboBox1.Items.Clear; fra_sys_data_v10.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v10.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v10.t_op.close; fra_sys_data_v10.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v10.t_op.Parameters.ParamByName('属性').value:='0039'; fra_sys_data_v10.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v10.t_op.open; fra_sys_data_v10.t_sql.Parameters.ParamByName('属性').value:='0039'; fra_sys_data_v10.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v10.t_sql.open; fra_sys_data_v10.bsSkinGroupBox9.Caption:='财务统计分析'; if employee<>'DEMO-SA' then begin fra_sys_data_v11.wwDBComboBox1.Items.Clear; fra_sys_data_v11.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v11.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v11.t_op.close; fra_sys_data_v11.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v11.t_op.Parameters.ParamByName('属性').value:='9002'; fra_sys_data_v11.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v11.t_op.open; fra_sys_data_v11.t_sql.Parameters.ParamByName('属性').value:='9002'; fra_sys_data_v11.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v11.t_sql.open; fra_sys_data_v11.bsSkinGroupBox9.Caption:='工作报告复核'; if employee<>'DEMO-SA' then begin fra_sys_data_v12.wwDBComboBox1.Items.Clear; fra_sys_data_v12.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v12.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v12.t_op.close; fra_sys_data_v12.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v12.t_op.Parameters.ParamByName('属性').value:='9001'; fra_sys_data_v12.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v11.t_op.open; fra_sys_data_v12.t_sql.Parameters.ParamByName('属性').value:='9001'; fra_sys_data_v12.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v11.t_sql.open; fra_sys_data_v12.bsSkinGroupBox9.Caption:='工作计划'; if employee<>'DEMO-SA' then begin fra_sys_data21.wwDBComboBox1.Items.Clear; fra_sys_data21.wwDBComboBox1.Items.Add('部门'); fra_sys_data21.wwDBComboBox1.Items.Add('选择'); fra_sys_data21.t_op.close; fra_sys_data21.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data21.t_op.Parameters.ParamByName('属性').value:='9003'; fra_sys_data21.t_op.DataSource:=t_sys_employee1; // fra_sys_data21.t_op.open; fra_sys_data21.t_sql.Parameters.ParamByName('属性').value:='9003'; fra_sys_data21.t_sql.DataSource:=t_sys_employee1; // fra_sys_data21.t_sql.open; fra_sys_data21.bsSkinGroupBox9.Caption:='规章制度'; if employee<>'DEMO-SA' then begin fra_sys_data22.wwDBComboBox1.Items.Clear; fra_sys_data22.wwDBComboBox1.Items.Add('部门'); fra_sys_data22.wwDBComboBox1.Items.Add('选择'); fra_sys_data22.t_op.close; fra_sys_data22.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data22.t_op.Parameters.ParamByName('属性').value:='9004'; fra_sys_data22.t_op.DataSource:=t_sys_employee1; // fra_sys_data22.t_op.open; fra_sys_data22.t_sql.Parameters.ParamByName('属性').value:='9004'; fra_sys_data22.t_sql.DataSource:=t_sys_employee1; // fra_sys_data22.t_sql.open; fra_sys_data22.bsSkinGroupBox9.Caption:='操作规范'; if employee<>'DEMO-SA' then begin fra_sys_data23.wwDBComboBox1.Items.Clear; fra_sys_data23.wwDBComboBox1.Items.Add('部门'); fra_sys_data23.wwDBComboBox1.Items.Add('选择'); fra_sys_data23.t_op.close; fra_sys_data23.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data23.t_op.Parameters.ParamByName('属性').value:='9005'; fra_sys_data23.t_op.DataSource:=t_sys_employee1; // fra_sys_data23.t_op.open; fra_sys_data23.t_sql.Parameters.ParamByName('属性').value:='9005'; fra_sys_data23.t_sql.DataSource:=t_sys_employee1; // fra_sys_data23.t_sql.open; fra_sys_data23.bsSkinGroupBox9.Caption:='共享文档及论坛'; if employee<>'DEMO-SA' then begin fra_sys_data5.wwDBComboBox1.Items.Clear; fra_sys_data5.wwDBComboBox1.Items.Add('部门'); fra_sys_data5.wwDBComboBox1.Items.Add('选择'); fra_sys_data5.t_op.close; fra_sys_data5.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data5.t_op.Parameters.ParamByName('属性').value:='0008'; fra_sys_data5.t_op.DataSource:=t_sys_employee1; // fra_sys_data5.t_op.open; fra_sys_data5.t_sql.Parameters.ParamByName('属性').value:='0008'; fra_sys_data5.t_sql.DataSource:=t_sys_employee1; // fra_sys_data5.t_sql.open; fra_sys_data5.bsSkinGroupBox9.Caption:='客户管理'; if employee<>'DEMO-SA' then begin fra_sys_data12.wwDBComboBox1.Items.Clear; fra_sys_data12.wwDBComboBox1.Items.Add('部门'); fra_sys_data12.wwDBComboBox1.Items.Add('选择'); fra_sys_data12.t_op.close; fra_sys_data12.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data12.t_op.Parameters.ParamByName('属性').value:='8001'; fra_sys_data12.t_op.DataSource:=t_sys_employee1; // fra_sys_data12.t_op.open; fra_sys_data12.t_sql.Parameters.ParamByName('属性').value:='8001'; fra_sys_data12.t_sql.DataSource:=t_sys_employee1; // fra_sys_data12.t_sql.open; fra_sys_data12.bsSkinGroupBox9.Caption:='船公司管理'; if employee<>'DEMO-SA' then begin fra_sys_data13.wwDBComboBox1.Items.Clear; fra_sys_data13.wwDBComboBox1.Items.Add('部门'); fra_sys_data13.wwDBComboBox1.Items.Add('选择'); fra_sys_data13.t_op.close; fra_sys_data13.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data13.t_op.Parameters.ParamByName('属性').value:='8002'; fra_sys_data13.t_op.DataSource:=t_sys_employee1; // fra_sys_data13.t_op.open; fra_sys_data13.t_sql.Parameters.ParamByName('属性').value:='8002'; fra_sys_data13.t_sql.DataSource:=t_sys_employee1; // fra_sys_data13.t_sql.open; fra_sys_data13.bsSkinGroupBox9.Caption:='货代同行管理'; if employee<>'DEMO-SA' then begin fra_sys_data6.wwDBComboBox1.Items.Clear; fra_sys_data6.wwDBComboBox1.Items.Add('部门'); fra_sys_data6.wwDBComboBox1.Items.Add('选择'); fra_sys_data6.t_op.close; fra_sys_data6.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data6.t_op.Parameters.ParamByName('属性').value:='3001'; fra_sys_data6.t_op.DataSource:=t_sys_employee1; // fra_sys_data6.t_op.open; fra_sys_data6.t_sql.Parameters.ParamByName('属性').value:='3001'; fra_sys_data6.t_sql.DataSource:=t_sys_employee1; // fra_sys_data6.t_sql.open; fra_sys_data6.bsSkinGroupBox9.Caption:='航线运价管理'; if employee<>'DEMO-SA' then begin fra_sys_data7.wwDBComboBox1.Items.Clear; fra_sys_data7.wwDBComboBox1.Items.Add('部门'); fra_sys_data7.wwDBComboBox1.Items.Add('选择'); fra_sys_data7.t_op.close; fra_sys_data7.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data7.t_op.Parameters.ParamByName('属性').value:='3002'; fra_sys_data7.t_op.DataSource:=t_sys_employee1; // fra_sys_data7.t_op.open; fra_sys_data7.t_sql.Parameters.ParamByName('属性').value:='3002'; fra_sys_data7.t_sql.DataSource:=t_sys_employee1; // fra_sys_data7.t_sql.open; // fra_sys_data7.bsSkinGroupBox9.Caption:='运价合约管理'; fra_sys_data7.bsSkinGroupBox9.Caption:='一级运价'; if employee<>'DEMO-SA' then begin fra_sys_data8.wwDBComboBox1.Items.Clear; fra_sys_data8.wwDBComboBox1.Items.Add('部门'); fra_sys_data8.wwDBComboBox1.Items.Add('选择'); fra_sys_data8.t_op.close; fra_sys_data8.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data8.t_op.Parameters.ParamByName('属性').value:='3003'; fra_sys_data8.t_op.DataSource:=t_sys_employee1; // fra_sys_data8.t_op.open; fra_sys_data8.t_sql.Parameters.ParamByName('属性').value:='3003'; fra_sys_data8.t_sql.DataSource:=t_sys_employee1; // fra_sys_data8.t_sql.open; fra_sys_data8.bsSkinGroupBox9.Caption:='客户合约管理'; if employee<>'DEMO-SA' then begin fra_sys_data9.wwDBComboBox1.Items.Clear; fra_sys_data9.wwDBComboBox1.Items.Add('部门'); fra_sys_data9.wwDBComboBox1.Items.Add('选择'); fra_sys_data9.t_op.close; fra_sys_data9.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data9.t_op.Parameters.ParamByName('属性').value:='3004'; fra_sys_data9.t_op.DataSource:=t_sys_employee1; // fra_sys_data9.t_op.open; fra_sys_data9.t_sql.Parameters.ParamByName('属性').value:='3004'; fra_sys_data9.t_sql.DataSource:=t_sys_employee1; // fra_sys_data9.t_sql.open; // fra_sys_data9.bsSkinGroupBox9.Caption:='同行运价管理'; fra_sys_data9.bsSkinGroupBox9.Caption:='二级运价'; if employee<>'DEMO-SA' then begin fra_sys_data10.wwDBComboBox1.Items.Clear; fra_sys_data10.wwDBComboBox1.Items.Add('部门'); fra_sys_data10.wwDBComboBox1.Items.Add('选择'); fra_sys_data10.t_op.close; fra_sys_data10.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data10.t_op.Parameters.ParamByName('属性').value:='3005'; fra_sys_data10.t_op.DataSource:=t_sys_employee1; // fra_sys_data10.t_op.open; fra_sys_data10.t_sql.Parameters.ParamByName('属性').value:='3005'; fra_sys_data10.t_sql.DataSource:=t_sys_employee1; // fra_sys_data10.t_sql.open; // fra_sys_data10.bsSkinGroupBox9.Caption:='商机报价管理'; fra_sys_data10.bsSkinGroupBox9.Caption:='三级运价'; if employee<>'DEMO-SA' then begin fra_sys_data24.wwDBComboBox1.Items.Clear; fra_sys_data24.wwDBComboBox1.Items.Add('部门'); fra_sys_data24.wwDBComboBox1.Items.Add('选择'); fra_sys_data24.t_op.close; fra_sys_data24.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data24.t_op.Parameters.ParamByName('属性').value:='3006'; fra_sys_data24.t_op.DataSource:=t_sys_employee1; // fra_sys_data24.t_op.open; fra_sys_data24.t_sql.Parameters.ParamByName('属性').value:='3006'; fra_sys_data24.t_sql.DataSource:=t_sys_employee1; // fra_sys_data24.t_sql.open; fra_sys_data24.bsSkinGroupBox9.Caption:='全包底价'; if employee<>'DEMO-SA' then begin fra_sys_data11.wwDBComboBox1.Items.Clear; fra_sys_data11.wwDBComboBox1.Items.Add('部门'); fra_sys_data11.wwDBComboBox1.Items.Add('选择'); fra_sys_data11.t_op.close; fra_sys_data11.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data11.t_op.Parameters.ParamByName('属性').value:='3007'; fra_sys_data11.t_op.DataSource:=t_sys_employee1; // fra_sys_data11.t_op.open; fra_sys_data11.t_sql.Parameters.ParamByName('属性').value:='3007'; fra_sys_data11.t_sql.DataSource:=t_sys_employee1; // fra_sys_data11.t_sql.open; fra_sys_data11.bsSkinGroupBox9.Caption:='运价发布管理'; if employee<>'DEMO-SA' then begin fra_sys_data15.wwDBComboBox1.Items.Clear; fra_sys_data15.wwDBComboBox1.Items.Add('部门'); fra_sys_data15.wwDBComboBox1.Items.Add('选择'); fra_sys_data15.t_op.close; fra_sys_data15.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data15.t_op.Parameters.ParamByName('属性').value:='3008'; fra_sys_data15.t_op.DataSource:=t_sys_employee1; // fra_sys_data15.t_op.open; fra_sys_data15.t_sql.Parameters.ParamByName('属性').value:='3008'; fra_sys_data15.t_sql.DataSource:=t_sys_employee1; // fra_sys_data15.t_sql.open; fra_sys_data15.bsSkinGroupBox9.Caption:='底价构成'; if employee<>'DEMO-SA' then begin fra_sys_data_v8.wwDBComboBox1.Items.Clear; fra_sys_data_v8.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v8.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v8.t_op.close; fra_sys_data_v8.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v8.t_op.Parameters.ParamByName('属性').value:='8003'; fra_sys_data_v8.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v8.t_op.open; fra_sys_data_v8.t_sql.Parameters.ParamByName('属性').value:='8003'; fra_sys_data_v8.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v8.t_sql.open; fra_sys_data_v8.bsSkinGroupBox9.Caption:='宠物客户分析'; if employee<>'DEMO-SA' then begin fra_sys_data_v9.wwDBComboBox1.Items.Clear; fra_sys_data_v9.wwDBComboBox1.Items.Add('部门'); fra_sys_data_v9.wwDBComboBox1.Items.Add('选择'); fra_sys_data_v9.t_op.close; fra_sys_data_v9.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_v9.t_op.Parameters.ParamByName('属性').value:='8004'; fra_sys_data_v9.t_op.DataSource:=t_sys_employee1; // fra_sys_data_v9.t_op.open; fra_sys_data_v9.t_sql.Parameters.ParamByName('属性').value:='8004'; fra_sys_data_v9.t_sql.DataSource:=t_sys_employee1; // fra_sys_data_v9.t_sql.open; fra_sys_data_v9.bsSkinGroupBox9.Caption:='流失客户分析'; if (strtobool(get_parameters_value(153,'false'))=true) then begin if employee<>'DEMO-SA' then begin fra_sys_data_d14.wwDBComboBox1.Items.Clear; fra_sys_data_d14.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d14.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d14.t_op.close; fra_sys_data_d14.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d14.t_op.Parameters.ParamByName('属性').value:='7000'; fra_sys_data_d14.t_op.DataSource:=t_sys_employee1; fra_sys_data_d14.t_sql.Parameters.ParamByName('属性').value:='7000'; fra_sys_data_d14.t_sql.DataSource:=t_sys_employee1; fra_sys_data_d14.dxDBGrid1Column4.Visible:=true; fra_sys_data_d14.N1.Visible:=true; fra_sys_data_d14.N9.Visible:=true; fra_sys_data_d14.bsSkinGroupBox9.Caption:='费用范围'; end else begin if employee<>'DEMO-SA' then begin fra_sys_data_d14.wwDBComboBox1.Items.Clear; fra_sys_data_d14.wwDBComboBox1.Items.Add('部门'); fra_sys_data_d14.wwDBComboBox1.Items.Add('选择'); fra_sys_data_d14.t_op.close; fra_sys_data_d14.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data_d14.t_op.Parameters.ParamByName('属性').value:='7000'; fra_sys_data_d14.t_op.DataSource:=t_sys_employee1; fra_sys_data_d14.t_sql.Parameters.ParamByName('属性').value:='7000'; fra_sys_data_d14.t_sql.DataSource:=t_sys_employee1; fra_sys_data_d14.dxDBGrid1Column4.Visible:=false; fra_sys_data_d14.N1.Visible:=false; fra_sys_data_d14.N9.Visible:=false; fra_sys_data_d14.bsSkinGroupBox9.Caption:='费用修改范围'; end; if employee<>'DEMO-SA' then begin fra_sys_data14.wwDBComboBox1.Items.Clear; fra_sys_data14.wwDBComboBox1.Items.Add('部门'); fra_sys_data14.wwDBComboBox1.Items.Add('选择'); fra_sys_data14.t_op.close; fra_sys_data14.t_op.SQL.Text:='select * from t_sys_code_data where 人员=:姓名 and 属性=:属性 and 职员 in (select 姓名 from t_sys_employee where 部门名称 in (select 部门名称 from t_sys_department where 部门经理='''+employee+''')) order by 职员 '; end; fra_sys_data14.t_op.Parameters.ParamByName('属性').value:='8005'; fra_sys_data14.t_op.DataSource:=t_sys_employee1; // fra_sys_data14.t_op.open; fra_sys_data14.t_sql.Parameters.ParamByName('属性').value:='8005'; fra_sys_data14.t_sql.DataSource:=t_sys_employee1; // fra_sys_data14.t_sql.open; fra_sys_data14.bsSkinGroupBox9.Caption:='费用方案管理'; dxDBGrid1.FullExpand; dxDBGrid2.FullExpand; op_limited:=true; end; procedure Tfrm_sys_limited.FormClose(Sender: TObject; var Action: TCloseAction); begin //SendMsg_gonggao('59',''); frm_data_share.t_sys_code_emp.Requery(); frm_data_share.t_sys_code_data.Requery(); frm_data_share.t_load_employee.Requery(); frm_sys_limited.Hide; frm_sys_limited.ManualFloat(frm_sys_limited.BoundsRect ); frm_main.freeTabs('frm_sys_limited'); op_limited:=false; action:=cafree; frm_sys_limited:=nil; end; procedure Tfrm_sys_limited.bsSkinButton5Click(Sender: TObject); begin close; end; procedure Tfrm_sys_limited.bsSkinButton10Click(Sender: TObject); begin try if not ASSIGNED(frm_sys_progress) then frm_sys_progress:=tfrm_sys_progress.Create(self); frm_sys_progress.Show; frm_sys_progress.bsSkinGauge1.MaxValue:=t_sys_employee.RecordCount*(t_sys_code.RecordCount+42); frm_sys_progress.bsSkinGauge1.MinValue:=0; frm_sys_progress.bsSkinGauge1.Value:=0; frm_sys_progress.Update; t_sys_open.DisableControls; t_sys_employee.first; while not t_sys_employee.eof do begin t_sys_code.First; while not t_sys_code.eof do begin if t_sys_open.Locate('权限代码',t_sys_code.fieldbyname('权限代码').asstring,[])then begin t_sys_open.edit; t_sys_open['一级模块']:=t_sys_code['一级模块']; t_sys_open['二级模块']:=t_sys_code['二级模块']; t_sys_open['权限名称']:=t_sys_code['权限名称']; t_sys_open.post; end else begin t_sys_open.insert; t_sys_open['人员']:=t_sys_employee.fieldbyname('姓名').asstring; t_sys_open['权限代码']:=t_sys_code['权限代码']; t_sys_open['一级模块']:=t_sys_code['一级模块']; t_sys_open['二级模块']:=t_sys_code['二级模块']; t_sys_open['权限名称']:=t_sys_code['权限名称']; t_sys_open.post; end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; t_sys_code.next; end; frm_sys_limited.update_all(fra_sys_data1.t_op,'0001'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data2.t_op,'0002'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data3.t_op,'0003'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data4.t_op,'0004'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data20.t_op,'0005'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data25.t_op,'0006'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data16.t_op,'0011'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data17.t_op,'0012'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data18.t_op,'0013'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data19.t_op,'0014'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data26.t_op,'0016'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data27.t_op,'0015'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d5.t_op,'1001'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d6.t_op,'1002'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d7.t_op,'1003'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d8.t_op,'1004'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d9.t_op,'0021'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d10.t_op,'0022'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d11.t_op,'0023'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d12.t_op,'0024'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v1.t_op,'0031'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d13.t_op,'0032'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d1.t_op,'0030'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v2.t_op,'0033'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v3.t_op,'0034'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v4.t_op,'0035'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v5.t_op,'0036'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v6.t_op,'0037'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v7.t_op,'0038'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v10.t_op,'0039'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v11.t_op,'9002'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v11.t_op,'9001'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data5.t_op,'0008'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data6.t_op,'3001'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data7.t_op,'3002'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data8.t_op,'3003'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data9.t_op,'3004'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data10.t_op,'3005'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_price(fra_sys_data24.t_op,'3006'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data11.t_op,'3007'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data15.t_op,'3008'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data12.t_op,'8001'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data13.t_op,'8002'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v8.t_op,'8003'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v9.t_op,'8004'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data14.t_op,'8005'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d14.t_op,'7000'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; t_sys_employee.next; end; finally frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.MaxValue; frm_sys_progress.free; frm_sys_progress:=nil; t_sys_open.EnableControls; end; end; procedure Tfrm_sys_limited.bsSkinButton1Click(Sender: TObject); begin table_post(t_sys_employee); table_post(t_sys_open); table_post(fra_sys_data1.t_op); table_post(fra_sys_data2.t_op); table_post(fra_sys_data3.t_op); table_post(fra_sys_data4.t_op); table_post(fra_sys_data20.t_op); table_post(fra_sys_data16.t_op); table_post(fra_sys_data17.t_op); table_post(fra_sys_data18.t_op); table_post(fra_sys_data19.t_op); table_post(fra_sys_data_d5.t_op); table_post(fra_sys_data_d6.t_op); table_post(fra_sys_data_d7.t_op); table_post(fra_sys_data_d8.t_op); table_post(fra_sys_data_d9.t_op); table_post(fra_sys_data_d10.t_op); table_post(fra_sys_data_d11.t_op); table_post(fra_sys_data_d12.t_op); table_post(fra_sys_data_v1.t_op); table_post(fra_sys_data_d13.t_op); table_post(fra_sys_data_d1.t_op); table_post(fra_sys_data_v2.t_op); table_post(fra_sys_data_v3.t_op); table_post(fra_sys_data_v4.t_op); table_post(fra_sys_data_v5.t_op); table_post(fra_sys_data_v6.t_op); table_post(fra_sys_data_v7.t_op); table_post(fra_sys_data5.t_op); table_post(fra_sys_data6.t_op); table_post(fra_sys_data7.t_op); table_post(fra_sys_data8.t_op); table_post(fra_sys_data9.t_op); table_post(fra_sys_data10.t_op); table_post(fra_sys_data24.t_op); table_post(fra_sys_data11.t_op); table_post(fra_sys_data15.t_op); table_post(fra_sys_data12.t_op); table_post(fra_sys_data13.t_op); table_post(fra_sys_data14.t_op); table_post(fra_sys_data_v8.t_op); table_post(fra_sys_data_v9.t_op); table_post(fra_sys_data_v11.t_op); table_post(fra_sys_data_v12.t_op); table_post(fra_sys_data_d14.t_op); table_post(fra_sys_data21.t_op); table_post(fra_sys_data22.t_op); table_post(fra_sys_data23.t_op); table_post(fra_sys_data25.t_op); table_post(fra_sys_data27.t_op); end; procedure Tfrm_sys_limited.bsSkinButton2Click(Sender: TObject); begin table_cancel(t_sys_open); table_cancel(fra_sys_data1.t_op); table_cancel(fra_sys_data2.t_op); table_cancel(fra_sys_data3.t_op); table_cancel(fra_sys_data4.t_op); table_cancel(fra_sys_data20.t_op); table_cancel(fra_sys_data16.t_op); table_cancel(fra_sys_data17.t_op); table_cancel(fra_sys_data18.t_op); table_cancel(fra_sys_data19.t_op); table_cancel(fra_sys_data_d5.t_op); table_cancel(fra_sys_data_d6.t_op); table_cancel(fra_sys_data_d7.t_op); table_cancel(fra_sys_data_d8.t_op); table_cancel(fra_sys_data_d9.t_op); table_cancel(fra_sys_data_d10.t_op); table_cancel(fra_sys_data_d11.t_op); table_cancel(fra_sys_data_d12.t_op); table_cancel(fra_sys_data_v1.t_op); table_cancel(fra_sys_data_d13.t_op); table_cancel(fra_sys_data_d1.t_op); table_cancel(fra_sys_data_v2.t_op); table_cancel(fra_sys_data_v3.t_op); table_cancel(fra_sys_data_v4.t_op); table_cancel(fra_sys_data_v5.t_op); table_cancel(fra_sys_data_v6.t_op); table_cancel(fra_sys_data_v7.t_op); table_cancel(fra_sys_data5.t_op); table_cancel(fra_sys_data6.t_op); table_cancel(fra_sys_data7.t_op); table_cancel(fra_sys_data8.t_op); table_cancel(fra_sys_data9.t_op); table_cancel(fra_sys_data10.t_op); table_cancel(fra_sys_data24.t_op); table_cancel(fra_sys_data11.t_op); table_cancel(fra_sys_data15.t_op); table_cancel(fra_sys_data12.t_op); table_cancel(fra_sys_data13.t_op); table_cancel(fra_sys_data14.t_op); table_cancel(fra_sys_data_v8.t_op); table_cancel(fra_sys_data_v9.t_op); table_cancel(fra_sys_data_v11.t_op); table_cancel(fra_sys_data_v12.t_op); table_cancel(fra_sys_data_d14.t_op); table_cancel(fra_sys_data21.t_op); table_cancel(fra_sys_data22.t_op); table_cancel(fra_sys_data23.t_op); table_cancel(fra_sys_data25.t_op); table_cancel(fra_sys_data27.t_op); end; procedure Tfrm_sys_limited.bsSkinButton12Click(Sender: TObject); begin if bsSkinButton12.Caption='权限展开' then begin dxdbgrid2.FullExpand; bsSkinButton12.Caption:='权限合并'; end else begin dxdbgrid2.FullCollapse; bsSkinButton12.Caption:='权限展开'; end; end; procedure Tfrm_sys_limited.bsSkinPanel1Resize(Sender: TObject); var i:integer; begin i:=round((bsSkinPanel1.Width-bsSkinPanel2.Width)/5); bsSkinButton1.Width:=i; bsSkinButton10.Width:=i; bsSkinButton2.Width:=i; bsSkinButton12.Width:=i; end; procedure Tfrm_sys_limited.Label9DblClick(Sender: TObject); begin try if not assigned(frm_sys_limited_group) then frm_sys_limited_group:=tfrm_sys_limited_group.Create (self); frm_sys_limited_group.ShowModal; finally frm_sys_limited_group.free; end; end; procedure Tfrm_sys_limited.N1Click(Sender: TObject); begin t_sys_open.first; while not t_sys_open.eof do begin t_sys_open.edit; t_sys_open['是否可操作']:=1; t_sys_open.post; t_sys_open.next; end; end; procedure Tfrm_sys_limited.N3Click(Sender: TObject); begin t_sys_open.first; while not t_sys_open.eof do begin t_sys_open.edit; t_sys_open['是否可操作']:=0; t_sys_open.post; t_sys_open.next; end; end; procedure Tfrm_sys_limited.bsSkinButton9Click(Sender: TObject); begin if RxDBLookupCombo2.DisplayValue=''then begin showmessage('请先输入权限模版名称!!'); exit; end; if t_sys_open.IsEmpty then begin showmessage('当前用户还没有赋予代码,请先赋予代码!!'); exit; end; if t_sys_lg.Locate('权限模版',RxDBLookupCombo2.DisplayValue,[])then begin try if not ASSIGNED(frm_sys_progress) then frm_sys_progress:=tfrm_sys_progress.Create(self); frm_sys_progress.Show; frm_sys_progress.bsSkinGauge1.MaxValue:=t_sys_lg_open.RecordCount+41*2-1; frm_sys_progress.bsSkinGauge1.MinValue:=0; frm_sys_progress.bsSkinGauge1.Value:=0; frm_sys_progress.Update; t_sys_open.DisableControls; t_sys_lg_open.first; while not t_sys_lg_open.eof do begin if t_sys_open.Locate('权限代码',t_sys_lg_open.fieldbyname('权限代码').asstring,[])then begin t_sys_open.edit; t_sys_open['一级模块']:=t_sys_lg_open['一级模块']; t_sys_open['二级模块']:=t_sys_lg_open['二级模块']; t_sys_open['权限名称']:=t_sys_lg_open['权限名称']; t_sys_open['是否可操作']:=t_sys_lg_open['是否可操作']; t_sys_open.post; end else begin t_sys_open.insert; t_sys_open['人员']:=t_sys_employee.fieldbyname('姓名').asstring; t_sys_open['权限代码']:=t_sys_lg_open['权限代码']; t_sys_open['一级模块']:=t_sys_lg_open['一级模块']; t_sys_open['二级模块']:=t_sys_lg_open['二级模块']; t_sys_open['权限名称']:=t_sys_lg_open['权限名称']; t_sys_open['是否可操作']:=t_sys_lg_open['是否可操作']; t_sys_open.post; end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; t_sys_lg_open.Next; end; frm_sys_limited.update_all(fra_sys_data1.t_op,'0001'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0001',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data1.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data2.t_op,'0002'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0002',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data2.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data3.t_op,'0003'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0003',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data3.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data4.t_op,'0004'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0004',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data4.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data20.t_op,'0005'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0005',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data20.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data25.t_op,'0006'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0006',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data25.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data16.t_op,'0011'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0011',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data16.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data17.t_op,'0012'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0012',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data17.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data18.t_op,'0013'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0013',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data18.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data19.t_op,'0014'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0014',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data19.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data26.t_op,'0016'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0014',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data26.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data27.t_op,'0015'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0015',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data27.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d5.t_op,'1001'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','1001',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d5.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d6.t_op,'1002'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','1002',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d6.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d7.t_op,'1003'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','1003',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d7.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d8.t_op,'1004'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','1004',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d8.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d9.t_op,'0021'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0021',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d9.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d10.t_op,'0022'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0022',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d10.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d11.t_op,'0023'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0023',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d11.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d12.t_op,'0024'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0024',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d12.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v1.t_op,'0031'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0031',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v1.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,2); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d13.t_op,'0032'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0032',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d13.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d1.t_op,'0030'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0030',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d1.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,3); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v2.t_op,'0033'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0033',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v2.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,2); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v3.t_op,'0034'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0034',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v3.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,2); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v4.t_op,'0035'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0035',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v4.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,2); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v5.t_op,'0036'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0036',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v5.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,2); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v6.t_op,'0037'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0037',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v6.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,2); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v7.t_op,'0038'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0038',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v7.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,2); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v10.t_op,'0039'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0039',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v10.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,2); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data5.t_op,'0008'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','0008',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data5.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data6.t_op,'3001'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','3001',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data6.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data7.t_op,'3002'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','3002',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data7.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data8.t_op,'3003'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','3003',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data8.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data9.t_op,'3004'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','3004',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data9.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data10.t_op,'3005'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','3005',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data10.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','3006',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data24.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; // frm_sys_limited.update_price(fra_sys_data_price1.t_op,'3006'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data11.t_op,'3007'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','3007',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data11.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data15.t_op,'3008'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','3008',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data15.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data12.t_op,'8001'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','8001',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data12.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data13.t_op,'8002'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','8002',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data13.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v8.t_op,'8003'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','8003',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v8.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_v9.t_op,'8004'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','8004',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v9.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','9002',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v11.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','9001',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_v12.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data14.t_op,'8005'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','8005',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data14.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data_d14.t_op,'7000'); frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','7000',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data_d14.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data21.t_op,'9003'); //规章 frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','9003',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data21.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data22.t_op,'9004'); //操作规范 frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','9004',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data22.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; frm_sys_limited.update_all(fra_sys_data23.t_op,'9005'); //共享文档 frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; if t_sys_lg_data.locate('模块代码','9005',[]) then begin frm_sys_limited.update_group_data_all(fra_sys_data23.t_op,t_sys_lg_data.fieldbyname('数据范围').asstring,1); end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; finally frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.MaxValue; frm_sys_progress.free; frm_sys_progress:=nil; t_sys_open.EnableControls; end; end; t_sys_open_tree.Refresh; if op_limited and (bsSkinPageControl1.ActivePageIndex<>0) then begin if bsSkinTabSheet2.Showing then begin frm_sys_limited.enable_bsSkinTabSheet2; exit; end; if bsSkinTabSheet3.Showing then begin frm_sys_limited.enable_bsSkinTabSheet3; exit; end; if bsSkinTabSheet4.Showing then begin frm_sys_limited.enable_bsSkinTabSheet4; exit; end; if bsSkinTabSheet5.Showing then begin frm_sys_limited.enable_bsSkinTabSheet5; exit; end; if bsSkinTabSheet6.Showing then begin frm_sys_limited.enable_bsSkinTabSheet6; exit; end; if bsSkinTabSheet7.Showing then begin frm_sys_limited.enable_bsSkinTabSheet7; exit; end; end; end; procedure Tfrm_sys_limited.t_sys_openBeforePost(DataSet: TDataSet); begin t_sys_open['授权人']:=employee; t_sys_open['授权日期']:=now; end; procedure Tfrm_sys_limited.t_sys_employeeAfterScroll(DataSet: TDataSet); begin if op_limited and (bsSkinPageControl1.ActivePageIndex<>0) then begin closealltable; if bsSkinTabSheet2.Showing then begin frm_sys_limited.enable_bsSkinTabSheet2; exit; end; if bsSkinTabSheet3.Showing then begin frm_sys_limited.enable_bsSkinTabSheet3; exit; end; if bsSkinTabSheet4.Showing then begin frm_sys_limited.enable_bsSkinTabSheet4; exit; end; if bsSkinTabSheet5.Showing then begin frm_sys_limited.enable_bsSkinTabSheet5; exit; end; if bsSkinTabSheet6.Showing then begin frm_sys_limited.enable_bsSkinTabSheet6; exit; end; if bsSkinTabSheet7.Showing then begin frm_sys_limited.enable_bsSkinTabSheet7; exit; end; end; end; procedure Tfrm_sys_limited.bsSkinPageControl1Change(Sender: TObject); begin if op_limited then begin closealltable; if bsSkinTabSheet2.Showing then begin frm_sys_limited.enable_bsSkinTabSheet2; exit; end; if bsSkinTabSheet3.Showing then begin frm_sys_limited.enable_bsSkinTabSheet3; exit; end; if bsSkinTabSheet4.Showing then begin frm_sys_limited.enable_bsSkinTabSheet4; exit; end; if bsSkinTabSheet5.Showing then begin frm_sys_limited.enable_bsSkinTabSheet5; exit; end; if bsSkinTabSheet6.Showing then begin frm_sys_limited.enable_bsSkinTabSheet6; exit; end; if bsSkinTabSheet7.Showing then begin frm_sys_limited.enable_bsSkinTabSheet7; exit; end; end; end; procedure Tfrm_sys_limited.t_sys_openAfterPost(DataSet: TDataSet); begin t_sys_open.Refresh; end; procedure Tfrm_sys_limited.N7Click(Sender: TObject); var book1:Tbookmark; begin book1:=t_sys_open.GetBookmark ; with lcxQryTmp,sql do begin close ; clear ; add('update t_sys_code_emp set 是否可操作=1,授权人=:sqr,授权日期=:sqdate '); add(' where 人员=:tmpname and 一级模块=:tmpfirst '); parameters.ParamByName('sqr').Value:=employee ; parameters.ParamByName('sqdate').Value:=now ; parameters.ParamByName('tmpname').Value:=t_sys_open.fieldbyname('人员').value ; parameters.ParamByName('tmpfirst').Value:=t_sys_open.fieldbyname('一级模块').value ; execsql ; end ; t_sys_open.Requery(); t_sys_open.GotoBookmark(book1); t_sys_open.FreeBookmark(book1); end; procedure Tfrm_sys_limited.N8Click(Sender: TObject); var book1:Tbookmark; begin book1:=t_sys_open.GetBookmark ; with lcxQryTmp,sql do begin close ; clear ; add('update t_sys_code_emp set 是否可操作=0 '); add(' where 人员=:tmpname and 一级模块=:tmpfirst '); parameters.ParamByName('tmpname').Value:=t_sys_open.fieldbyname('人员').value ; parameters.ParamByName('tmpfirst').Value:=t_sys_open.fieldbyname('一级模块').value ; execsql ; end ; t_sys_open.Requery(); t_sys_open.GotoBookmark(book1); t_sys_open.FreeBookmark(book1); end; procedure Tfrm_sys_limited.N9Click(Sender: TObject); var book1:Tbookmark; begin book1:=t_sys_open.GetBookmark ; with lcxQryTmp,sql do begin close ; clear ; add('update t_sys_code_emp set 是否可操作=1,授权人=:sqr,授权日期=:sqdate '); add('where 人员=:tmpname and 一级模块=:tmpfirst '); add('and 二级模块=:tmptwo '); parameters.ParamByName('sqr').Value:=employee ; parameters.ParamByName('sqdate').Value:=now ; parameters.ParamByName('tmpname').Value:=t_sys_open.fieldbyname('人员').value ; parameters.ParamByName('tmpfirst').Value:=t_sys_open.fieldbyname('一级模块').value ; parameters.ParamByName('tmptwo').Value:=t_sys_open.fieldbyname('二级模块').value ; execsql ; end ; t_sys_open.Requery(); t_sys_open.GotoBookmark(book1); t_sys_open.FreeBookmark(book1); end; procedure Tfrm_sys_limited.N10Click(Sender: TObject); var book1:Tbookmark; begin book1:=t_sys_open.GetBookmark ; with lcxQryTmp,sql do begin close ; clear ; add('update t_sys_code_emp set 是否可操作=0 where 人员=:tmpname and 一级模块=:tmpfirst '); add('and 二级模块=:tmptwo '); parameters.ParamByName('tmpname').Value:=t_sys_open.fieldbyname('人员').value ; parameters.ParamByName('tmpfirst').Value:=t_sys_open.fieldbyname('一级模块').value ; parameters.ParamByName('tmptwo').Value:=t_sys_open.fieldbyname('二级模块').value ; execsql ; end ; t_sys_open.Requery(); t_sys_open.GotoBookmark(book1); t_sys_open.FreeBookmark(book1); end; procedure Tfrm_sys_limited.PopupMenu1Popup(Sender: TObject); begin FirstModule.Caption:=t_sys_open.fieldbyname('一级模块').Asstring ; TwoModule.Caption:=t_sys_open.fieldbyname('二级模块').Asstring ; end; procedure Tfrm_sys_limited.enable_bsSkinTabSheet7; begin if if_open_limited('020') or if_open_limited('214') then begin fra_sys_data_v11.Visible:=true; fra_sys_data_v11.t_op.open; fra_sys_data_v11.t_sql.open; end else begin fra_sys_data_v11.Visible:=false; fra_sys_data_v11.t_op.close; fra_sys_data_v11.t_sql.close; end; if if_open_limited('019') or if_open_limited('213') then begin fra_sys_data_v12.Visible:=true; fra_sys_data_v12.t_op.open; fra_sys_data_v12.t_sql.open; end else begin fra_sys_data_v12.Visible:=false; fra_sys_data_v12.t_op.close; fra_sys_data_v12.t_sql.close; end; if if_open_limited('348') then begin fra_sys_data20.Visible:=true; fra_sys_data20.t_op.open; fra_sys_data20.t_sql.open; end else begin fra_sys_data20.Visible:=false; fra_sys_data20.t_op.close; fra_sys_data20.t_sql.close; end; if if_open_limited('319') then begin fra_sys_data25.Visible:=true; fra_sys_data25.t_op.open; fra_sys_data25.t_sql.open; end else begin fra_sys_data25.Visible:=false; fra_sys_data25.t_op.close; fra_sys_data25.t_sql.close; end; if if_open_limited('322') or if_open_limited('323') then begin fra_sys_data26.Visible:=true; fra_sys_data26.t_op.open; fra_sys_data26.t_sql.open; end else begin fra_sys_data26.Visible:=false; fra_sys_data26.t_op.close; fra_sys_data26.t_sql.close; end; if (if_open_limited('239')) and (if_open_limited('241')) then begin //规章制度 fra_sys_data21.Visible:=true; fra_sys_data21.t_op.open; fra_sys_data21.t_sql.open; end else begin fra_sys_data21.Visible:=false; fra_sys_data21.t_op.close; fra_sys_data21.t_sql.close; end; if (if_open_limited('242')) and (if_open_limited('244')) then begin //操作规范 fra_sys_data22.Visible:=true; fra_sys_data22.t_op.open; fra_sys_data22.t_sql.open; end else begin fra_sys_data22.Visible:=false; fra_sys_data22.t_op.close; fra_sys_data22.t_sql.close; end; if (if_open_limited('247')) and (if_open_limited('245')) or if_open_limited('305') then begin //共享文档 fra_sys_data23.Visible:=true; fra_sys_data23.t_op.open; fra_sys_data23.t_sql.open; end else begin fra_sys_data23.Visible:=false; fra_sys_data23.t_op.close; fra_sys_data23.t_sql.close; end; if if_open_limited('178') then begin fra_sys_data27.Visible:=true; fra_sys_data27.t_op.open; fra_sys_data27.t_sql.open; end else begin fra_sys_data27.Visible:=false; fra_sys_data27.t_op.close; fra_sys_data27.t_sql.close; end; end; procedure Tfrm_sys_limited.bsSkinDBCheckRadioBox1Exit(Sender: TObject); begin if t_sys_employee.State in [dsedit,dsinsert] then t_sys_employee.Post; end; procedure Tfrm_sys_limited.bsSkinDBCheckRadioBox1MouseEnter( Sender: TObject); begin t_sys_employee.Edit; end; procedure Tfrm_sys_limited.bsSkinButton3Click(Sender: TObject); var aQuery,aQuery2:TADOQuery; begin t_sys_code_data.Close; cpt_sys_code_data.Close; cpt_sys_code_emp.Close; // t_sys_code_data.Parameters.ParamByName('姓名').Value:=t_sys_employee['姓名']; t_sys_code_data.Open; cpt_sys_code_data.Open; cpt_sys_code_emp.Open; cpt_sys_code_data.First; cpt_sys_code_emp.First; st_sys_open.Open; t_sys_employee.Edit; t_sys_employee['应收']:=frm_data_share.t_sys_employee['应收']; t_sys_employee['应付']:=frm_data_share.t_sys_employee['应付']; t_sys_employee['利润']:=frm_data_share.t_sys_employee['利润']; t_sys_employee.Post; if bsSkinCheckRadioBox1.Checked then begin st_sys_open.First; while not st_sys_open.eof do begin st_sys_open.Edit; st_sys_open['是否可操作']:=0; st_sys_open.Post; st_sys_open.Next; end; end; st_sys_open.Refresh; st_sys_open.First; while not st_sys_open.eof do begin if cpt_sys_code_emp.Locate('权限代码',st_sys_open['权限代码'],[]) then begin if cpt_sys_code_emp['是否可操作'] then begin st_sys_open.Edit; st_sys_open['是否可操作']:=1; st_sys_open.Post; end; end; st_sys_open.Next; end; if bsSkinCheckRadioBox1.Checked then begin t_sys_code_data.First; while not t_sys_code_data.eof do begin if (t_sys_code_data['职员']=t_sys_employee['姓名']) then begin t_sys_code_data.Edit; t_sys_code_data['是否可视']:=1; t_sys_code_data['是否操作']:=1; t_sys_code_data.Post; end else begin t_sys_code_data.Edit; t_sys_code_data['是否可视']:=0; t_sys_code_data['是否操作']:=0; t_sys_code_data.Post; end; t_sys_code_data.Next; end; end; cpt_sys_code_data.First; while not cpt_sys_code_data.eof do begin if cpt_sys_code_data['是否可视'] or cpt_sys_code_data['是否操作'] then begin if t_sys_code_data.Locate('属性;职员',VarArrayOf([cpt_sys_code_data['属性'],cpt_sys_code_data['职员']]),[]) then begin t_sys_code_data.Edit; t_sys_code_data['是否可视']:=cpt_sys_code_data['是否可视']; t_sys_code_data['是否操作']:=cpt_sys_code_data['是否操作']; t_sys_code_data.Post; end; end; cpt_sys_code_data.next; end; aQuery:=CreateAdoQuery; try with aQuery do begin SQL.Add('delete from t_sys_code_sql where 人员='''+t_sys_employee['姓名']+''''); ExecSQL; sql.Clear; SQL.Add('insert t_sys_code_sql(人员,属性,语句,可视范围)'); SQL.Add('select '''+t_sys_employee['姓名']+''',属性,语句,可视范围 from t_sys_code_sql where 人员='''+frm_data_share.t_sys_employee['姓名']+''''); ExecSQL; end; finally FreeAndNil(aQuery); end; t_sys_open_tree.Refresh; if op_limited and (bsSkinPageControl1.ActivePageIndex<>0) then begin if bsSkinTabSheet2.Showing then begin frm_sys_limited.enable_bsSkinTabSheet2; exit; end; if bsSkinTabSheet3.Showing then begin frm_sys_limited.enable_bsSkinTabSheet3; exit; end; if bsSkinTabSheet4.Showing then begin frm_sys_limited.enable_bsSkinTabSheet4; exit; end; if bsSkinTabSheet5.Showing then begin frm_sys_limited.enable_bsSkinTabSheet5; exit; end; if bsSkinTabSheet6.Showing then begin frm_sys_limited.enable_bsSkinTabSheet6; exit; end; if bsSkinTabSheet7.Showing then begin frm_sys_limited.enable_bsSkinTabSheet7; exit; end; end; ShowMessage('复制完成'); end; procedure Tfrm_sys_limited.t_sys_lg_dataAfterPost(DataSet: TDataSet); begin t_sys_lg_data.Refresh; end; procedure Tfrm_sys_limited.dxDBTreeView1Change(Sender: TObject; Node: TTreeNode); var str:string; begin if t_sys_open_tree.State in [dsedit] then t_sys_open_tree.post; if showing then if dxDBTreeView1.Selected.HasChildren then begin str:=getQuan(qrymodule.fieldbyname('fmoduleid').asinteger); if str='' then str:='权限代码=''111111'''; t_sys_open_tree.Filtered:=false; t_sys_open_tree.Filter:=str; t_sys_open_tree.Filtered:=true; // ListView1.Items.Clear ; // addlv(qrymodule.fieldbyname('fmoduleid').asinteger); end else begin t_sys_open_tree.Filtered:=false; t_sys_open_tree.Filter:='权限代码='+''''+qrymodule.fieldbyname('权限代码').asstring+''''; t_sys_open_tree.Filtered:=true; end ; end; procedure Tfrm_sys_limited.t_sys_open_treeBeforePost(DataSet: TDataSet); begin t_sys_open_tree['授权人']:=employee; t_sys_open_tree['授权日期']:=now; end; procedure Tfrm_sys_limited.t_sys_open_treeAfterPost(DataSet: TDataSet); begin t_sys_open_tree.Refresh; t_sys_open.Requery; if op_limited and (bsSkinPageControl1.ActivePageIndex<>0) then begin if bsSkinTabSheet2.Showing then begin frm_sys_limited.enable_bsSkinTabSheet2; exit; end; if bsSkinTabSheet3.Showing then begin frm_sys_limited.enable_bsSkinTabSheet3; exit; end; if bsSkinTabSheet4.Showing then begin frm_sys_limited.enable_bsSkinTabSheet4; exit; end; if bsSkinTabSheet5.Showing then begin frm_sys_limited.enable_bsSkinTabSheet5; exit; end; if bsSkinTabSheet6.Showing then begin frm_sys_limited.enable_bsSkinTabSheet6; exit; end; if bsSkinTabSheet7.Showing then begin frm_sys_limited.enable_bsSkinTabSheet7; exit; end; end; end; function Tfrm_sys_limited.getQuan(fid: integer): String; var aQuery:TAdoQuery; str:string; begin aQuery:=CreateAdoQuery; try with aQuery do begin Close;SQL.Clear; SQL.Add('select * from t_sys_module where PID='+inttostr(fid)); SQL.Add(' and 是否明细=1'); Open; first; while not eof do begin if fieldByName('权限代码').AsString<>'' then begin if result='' then result:='权限代码='+''''+fieldByName('权限代码').AsString+'''' else result:=result+'or 权限代码='+''''+fieldByName('权限代码').AsString+'''' end; aQuery.Next; end; Close;SQL.Clear; SQL.Add('select * from t_sys_module where PID='+inttostr(fid)); SQL.Add(' and 是否明细<>1'); Open; first; while not eof do begin str:=getQuan(FieldByName('fmoduleid').AsInteger); if str<>'' then begin if result='' then result:=str else begin result:=result+' or '+str; end; end; aQuery.Next; end; end; finally FreeAndNil(aQuery); end; end; procedure Tfrm_sys_limited.closealltable; begin if fra_sys_data1.t_op.active then begin table_post(fra_sys_data1.t_op); fra_sys_data1.t_op.close; end; if fra_sys_data1.t_sql.active then begin table_post(fra_sys_data1.t_sql); fra_sys_data1.t_sql.close; end; if fra_sys_data2.t_op.active then begin table_post(fra_sys_data2.t_op); fra_sys_data2.t_op.close; end; if fra_sys_data2.t_sql.active then begin table_post(fra_sys_data2.t_sql); fra_sys_data2.t_sql.close; end; if fra_sys_data3.t_op.active then begin table_post(fra_sys_data3.t_op); fra_sys_data3.t_op.close; end; if fra_sys_data3.t_sql.active then begin table_post(fra_sys_data3.t_sql); fra_sys_data3.t_sql.close; end; if fra_sys_data4.t_op.active then begin table_post(fra_sys_data4.t_op); fra_sys_data4.t_op.close; end; if fra_sys_data4.t_sql.active then begin table_post(fra_sys_data4.t_sql); fra_sys_data4.t_sql.close; end; if fra_sys_data20.t_op.active then begin table_post(fra_sys_data20.t_op); fra_sys_data20.t_op.close; end; if fra_sys_data20.t_sql.active then begin table_post(fra_sys_data20.t_sql); fra_sys_data20.t_sql.close; end; if fra_sys_data25.t_op.active then begin table_post(fra_sys_data25.t_op); fra_sys_data25.t_op.close; end; if fra_sys_data25.t_sql.active then begin table_post(fra_sys_data25.t_sql); fra_sys_data25.t_sql.close; end; if fra_sys_data26.t_op.active then begin table_post(fra_sys_data26.t_op); fra_sys_data26.t_op.close; end; if fra_sys_data26.t_sql.active then begin table_post(fra_sys_data26.t_sql); fra_sys_data26.t_sql.close; end; if fra_sys_data27.t_op.active then begin table_post(fra_sys_data27.t_op); fra_sys_data27.t_op.close; end; if fra_sys_data2.t_sql.active then begin table_post(fra_sys_data2.t_sql); fra_sys_data2.t_sql.close; end; if fra_sys_data16.t_op.active then begin table_post(fra_sys_data16.t_op); fra_sys_data16.t_op.close; end; if fra_sys_data16.t_sql.active then begin table_post(fra_sys_data16.t_sql); fra_sys_data16.t_sql.close; end; if fra_sys_data17.t_op.active then begin table_post(fra_sys_data17.t_op); fra_sys_data17.t_op.close; end; if fra_sys_data17.t_sql.active then begin table_post(fra_sys_data17.t_sql); fra_sys_data17.t_sql.close; end; if fra_sys_data18.t_op.active then begin table_post(fra_sys_data18.t_op); fra_sys_data18.t_op.close; end; if fra_sys_data18.t_sql.active then begin table_post(fra_sys_data18.t_sql); fra_sys_data18.t_sql.close; end; if fra_sys_data19.t_op.active then begin table_post(fra_sys_data19.t_op); fra_sys_data19.t_op.close; end; if fra_sys_data19.t_sql.active then begin table_post(fra_sys_data19.t_sql); fra_sys_data19.t_sql.close; end; if fra_sys_data_d5.t_op.active then begin table_post(fra_sys_data_d5.t_op); fra_sys_data_d5.t_op.close; end; if fra_sys_data_d5.t_sql.active then begin table_post(fra_sys_data_d5.t_sql); fra_sys_data_d5.t_sql.close; end; if fra_sys_data_d6.t_op.active then begin table_post(fra_sys_data_d6.t_op); fra_sys_data_d6.t_op.close; end; if fra_sys_data_d6.t_sql.active then begin table_post(fra_sys_data_d6.t_sql); fra_sys_data_d6.t_sql.close; end; if fra_sys_data_d7.t_op.active then begin table_post(fra_sys_data_d7.t_op); fra_sys_data_d7.t_op.close; end; if fra_sys_data_d7.t_sql.active then begin table_post(fra_sys_data_d7.t_sql); fra_sys_data_d7.t_sql.close; end; if fra_sys_data_d8.t_op.active then begin table_post(fra_sys_data_d8.t_op); fra_sys_data_d8.t_op.close; end; if fra_sys_data_d8.t_sql.active then begin table_post(fra_sys_data_d8.t_sql); fra_sys_data_d8.t_sql.close; end; if fra_sys_data_d9.t_op.active then begin table_post(fra_sys_data_d9.t_op); fra_sys_data_d9.t_op.close; end; if fra_sys_data_d9.t_sql.active then begin table_post(fra_sys_data_d9.t_sql); fra_sys_data_d9.t_sql.close; end; if fra_sys_data_d10.t_op.active then begin table_post(fra_sys_data_d10.t_op); fra_sys_data_d10.t_op.close; end; if fra_sys_data_d10.t_sql.active then begin table_post(fra_sys_data_d10.t_sql); fra_sys_data_d10.t_sql.close; end; if fra_sys_data_d11.t_op.active then begin table_post(fra_sys_data_d11.t_op); fra_sys_data_d11.t_op.close; end; if fra_sys_data_d11.t_sql.active then begin table_post(fra_sys_data_d11.t_sql); fra_sys_data_d11.t_sql.close; end; if fra_sys_data_d12.t_op.active then begin table_post(fra_sys_data_d12.t_op); fra_sys_data_d12.t_op.close; end; if fra_sys_data_d12.t_sql.active then begin table_post(fra_sys_data_d12.t_sql); fra_sys_data_d12.t_sql.close; end; if fra_sys_data_d13.t_op.active then begin table_post(fra_sys_data_d13.t_op); fra_sys_data_d13.t_op.close; end; if fra_sys_data_d13.t_sql.active then begin table_post(fra_sys_data_d13.t_sql); fra_sys_data_d13.t_sql.close; end; if fra_sys_data_d1.t_op.active then begin table_post(fra_sys_data_d1.t_op); fra_sys_data_d1.t_op.close; end; if fra_sys_data_d1.t_sql.active then begin table_post(fra_sys_data_d1.t_sql); fra_sys_data_d1.t_sql.close; end; if fra_sys_data_d14.t_op.active then begin table_post(fra_sys_data_d14.t_op); fra_sys_data_d14.t_op.close; end; if fra_sys_data_d14.t_sql.active then begin table_post(fra_sys_data_d14.t_sql); fra_sys_data_d14.t_sql.close; end; if fra_sys_data_v1.t_op.active then begin table_post(fra_sys_data_v1.t_op); fra_sys_data_v1.t_op.close; end; if fra_sys_data_v1.t_sql.active then begin table_post(fra_sys_data_v1.t_sql); fra_sys_data_v1.t_sql.close; end; if fra_sys_data_v2.t_op.active then begin table_post(fra_sys_data_v2.t_op); fra_sys_data_v2.t_op.close; end; if fra_sys_data_v2.t_sql.active then begin table_post(fra_sys_data_v2.t_sql); fra_sys_data_v2.t_sql.close; end; if fra_sys_data_v3.t_op.active then begin table_post(fra_sys_data_v3.t_op); fra_sys_data_v3.t_op.close; end; if fra_sys_data_v3.t_sql.active then begin table_post(fra_sys_data_v3.t_sql); fra_sys_data_v3.t_sql.close; end; if fra_sys_data_v4.t_op.active then begin table_post(fra_sys_data_v4.t_op); fra_sys_data_v4.t_op.close; end; if fra_sys_data_v4.t_sql.active then begin table_post(fra_sys_data_v4.t_sql); fra_sys_data_v4.t_sql.close; end; if fra_sys_data_v5.t_op.active then begin table_post(fra_sys_data_v5.t_op); fra_sys_data_v5.t_op.close; end; if fra_sys_data_v5.t_sql.active then begin table_post(fra_sys_data_v5.t_sql); fra_sys_data_v5.t_sql.close; end; if fra_sys_data_v6.t_op.active then begin table_post(fra_sys_data_v6.t_op); fra_sys_data_v6.t_op.close; end; if fra_sys_data_v6.t_sql.active then begin table_post(fra_sys_data_v6.t_sql); fra_sys_data_v6.t_sql.close; end; if fra_sys_data_v7.t_op.active then begin table_post(fra_sys_data_v7.t_op); fra_sys_data_v7.t_op.close; end; if fra_sys_data_v7.t_sql.active then begin table_post(fra_sys_data_v7.t_sql); fra_sys_data_v7.t_sql.close; end; if fra_sys_data_v8.t_op.active then begin table_post(fra_sys_data_v8.t_op); fra_sys_data_v8.t_op.close; end; if fra_sys_data_v8.t_sql.active then begin table_post(fra_sys_data_v8.t_sql); fra_sys_data_v8.t_sql.close; end; if fra_sys_data_v9.t_op.active then begin table_post(fra_sys_data_v9.t_op); fra_sys_data_v9.t_op.close; end; if fra_sys_data_v9.t_sql.active then begin table_post(fra_sys_data_v9.t_sql); fra_sys_data_v9.t_sql.close; end; if fra_sys_data_v10.t_op.active then begin table_post(fra_sys_data_v10.t_op); fra_sys_data_v10.t_op.close; end; if fra_sys_data_v10.t_sql.active then begin table_post(fra_sys_data_v10.t_sql); fra_sys_data_v10.t_sql.close; end; if fra_sys_data_v11.t_op.active then begin table_post(fra_sys_data_v11.t_op); fra_sys_data_v11.t_op.close; end; if fra_sys_data_v11.t_sql.active then begin table_post(fra_sys_data_v11.t_sql); fra_sys_data_v11.t_sql.close; end; if fra_sys_data_v12.t_op.active then begin table_post(fra_sys_data_v12.t_op); fra_sys_data_v12.t_op.close; end; if fra_sys_data_v12.t_sql.active then begin table_post(fra_sys_data_v12.t_sql); fra_sys_data_v12.t_sql.close; end; if fra_sys_data21.t_op.active then begin table_post(fra_sys_data21.t_op); fra_sys_data21.t_op.close; end; if fra_sys_data21.t_sql.active then begin table_post(fra_sys_data21.t_sql); fra_sys_data21.t_sql.close; end; if fra_sys_data22.t_op.active then begin table_post(fra_sys_data22.t_op); fra_sys_data22.t_op.close; end; if fra_sys_data22.t_sql.active then begin table_post(fra_sys_data22.t_sql); fra_sys_data22.t_sql.close; end; if fra_sys_data23.t_op.active then begin table_post(fra_sys_data23.t_op); fra_sys_data23.t_op.close; end; if fra_sys_data23.t_sql.active then begin table_post(fra_sys_data23.t_sql); fra_sys_data23.t_sql.close; end; if fra_sys_data5.t_op.active then begin table_post(fra_sys_data5.t_op); fra_sys_data5.t_op.close; end; if fra_sys_data5.t_sql.active then begin table_post(fra_sys_data5.t_sql); fra_sys_data5.t_sql.close; end; if fra_sys_data12.t_op.active then begin table_post(fra_sys_data12.t_op); fra_sys_data12.t_op.close; end; if fra_sys_data12.t_sql.active then begin table_post(fra_sys_data12.t_sql); fra_sys_data12.t_sql.close; end; if fra_sys_data13.t_op.active then begin table_post(fra_sys_data13.t_op); fra_sys_data13.t_op.close; end; if fra_sys_data13.t_sql.active then begin table_post(fra_sys_data13.t_sql); fra_sys_data13.t_sql.close; end; if fra_sys_data6.t_op.active then begin table_post(fra_sys_data6.t_op); fra_sys_data6.t_op.close; end; if fra_sys_data6.t_sql.active then begin table_post(fra_sys_data6.t_sql); fra_sys_data6.t_sql.close; end; if fra_sys_data7.t_op.active then begin table_post(fra_sys_data7.t_op); fra_sys_data7.t_op.close; end; if fra_sys_data7.t_sql.active then begin table_post(fra_sys_data7.t_sql); fra_sys_data7.t_sql.close; end; if fra_sys_data8.t_op.active then begin table_post(fra_sys_data8.t_op); fra_sys_data8.t_op.close; end; if fra_sys_data8.t_sql.active then begin table_post(fra_sys_data8.t_sql); fra_sys_data8.t_sql.close; end; if fra_sys_data9.t_op.active then begin table_post(fra_sys_data9.t_op); fra_sys_data9.t_op.close; end; if fra_sys_data9.t_sql.active then begin table_post(fra_sys_data9.t_sql); fra_sys_data9.t_sql.close; end; if fra_sys_data10.t_op.active then begin table_post(fra_sys_data10.t_op); fra_sys_data10.t_op.close; end; if fra_sys_data10.t_sql.active then begin table_post(fra_sys_data10.t_sql); fra_sys_data10.t_sql.close; end; if fra_sys_data11.t_op.active then begin table_post(fra_sys_data11.t_op); fra_sys_data11.t_op.close; end; if fra_sys_data11.t_sql.active then begin table_post(fra_sys_data11.t_sql); fra_sys_data11.t_sql.close; end; if fra_sys_data15.t_op.active then begin table_post(fra_sys_data15.t_op); fra_sys_data15.t_op.close; end; if fra_sys_data15.t_sql.active then begin table_post(fra_sys_data15.t_sql); fra_sys_data15.t_sql.close; end; if fra_sys_data24.t_op.active then begin table_post(fra_sys_data24.t_op); fra_sys_data24.t_op.close; end; if fra_sys_data24.t_sql.active then begin table_post(fra_sys_data24.t_sql); fra_sys_data24.t_sql.close; end; if fra_sys_data14.t_op.active then begin table_post(fra_sys_data14.t_op); fra_sys_data14.t_op.close; end; if fra_sys_data14.t_sql.active then begin table_post(fra_sys_data14.t_sql); fra_sys_data14.t_sql.close; end; end; procedure Tfrm_sys_limited.t_sys_employeeBeforeScroll(DataSet: TDataSet); begin if bsSkinPageControl1.ActivePageIndex<>0 then bsSkinPageControl1.ActivePageIndex:=0; end; procedure Tfrm_sys_limited.N6Click(Sender: TObject); begin t_sys_open_tree.first; while not t_sys_open_tree.eof do begin t_sys_open_tree.edit; t_sys_open_tree['是否可操作']:=1; t_sys_open_tree.post; t_sys_open_tree.next; end; end; procedure Tfrm_sys_limited.N12Click(Sender: TObject); begin t_sys_open_tree.first; while not t_sys_open_tree.eof do begin t_sys_open_tree.edit; t_sys_open_tree['是否可操作']:=0; t_sys_open_tree.post; t_sys_open_tree.next; end; end; procedure Tfrm_sys_limited.fra_sys_data_v7N12Click(Sender: TObject); begin fra_sys_data_v7.N12Click(Sender); end; procedure Tfrm_sys_limited.fra_sys_data_d14N14Click(Sender: TObject); begin fra_sys_data_d14.N14Click(Sender); end; end.